Presentation is loading. Please wait.

Presentation is loading. Please wait.

Two-legged self-balancing System

Similar presentations


Presentation on theme: "Two-legged self-balancing System"— Presentation transcript:

1 Two-legged self-balancing System
Sponsored by UVATT Supervisor: Stephen Neville Robert Prinz Mark Kuoppola Tifenn Vialatte

2 Tilt Sensor Single axis (1-D) Output: analog (0 to 5V)
Zero Angle Voltage = 2.5V Sensitivity = 35 mV/˚

3 H-bridge Motor Speed Controller
Average voltage across armature changes as the duty cycle changes. Direction of the motor can be changed by switching the polarity of the armature (by switching the corresponding MOSFETs). FORWARD MOSFET State Q4 ON Q2 OFF Q1 PWM Q3 REVERSE

4 Overall System Block Diagram
Serial Cable Tilt Sensor MC 1488 Serial Input Buffer Real-time operation Matlab Fuzzy logic controller Arc 1489 Serial Output Motor Controller LED display A-D converter TTL Serial Data Output process PIC Processor Computer Port C RB7 – RB4 Input 1: Tilt Output 1: Duty-cycle

5 Fuzzy Logic Controller
Solution 1 Classical inverted pendulum: 2 inputs, 1 output Membership functions: Inputs: Tilt in degrees, change of tilt Output: motor duty cycle Solution 2 (selected for testing) Similar to fuzzy air conditioning system Membership functions: Input: Tilt in degrees Output: motor duty cycle P Z N PB NB

6 Fuzzy Logic Controller (Cont’d)
Overall controller Layout Membership functions Tilt Motor duty cycle Rules Rules in action

7 Serial Port Communication
+12V 0 V -12V Start ……. 7 Stop TTL  RS232 ; RS232  TTL MC1488:RS232 line driver MC1489: RS232 line receiver TTL 5 V 0 V Start ……. 7 Stop Bit Bit Logic TTL RS232 <1.2V >+3V 1 >3.3V <-3V Interrupt on RB0 Rotate right through carry

8 Membership functions: initial conditions established
System Path: Overview PIC sends tilt value to computer MC 1488 TTL to RS232 Converter A-to-D on PIC Tilt Serial Data Transmission Membership functions: initial conditions established Input to Matlab Fuzzy Inference System (FIS) Received bytes buffer on computer Value read from buffer Union of consequents defuzzified (centroid method) Union of fuzzy consequents fired by rules Output value saved to motor-duty Output to RS232 Serial cable MC1489 RS232 to TTL converter External interrupt input on PIC processor PIC duty cycle values updated then output to motor controller Motor controller H bridge pulsed at duty cycle New tilt To beginning

9 System Path: Input Side
PIC PIC MC 1488 Converts TTL signal to RS232 Data stream Data Comm Tilt variable digital serial data stream generated 8-bit resolution Tilt voltage correspond to 8-bit value between 0 and 255 Serial Cable Tilt value PIC MC 1488 Motor Duty Initial Conditions Fuzzy Inference System

10 System Path: Output Side
MC 1489 PIC Serial Cable Quad line receiver Converts RS232 to TTL data stream External Interrupt on falling edge of start bit RS232 Signal of motor-duty PIC Data Comm Duty cycle input to transistor controlling the H-bridge Start bit ignored Data bits sampled and saved Wheels turn, aligning robot


Download ppt "Two-legged self-balancing System"

Similar presentations


Ads by Google