Lecture20 - Lecture #20 - Blimp April 12, 2010 Outline Lab...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture #20 - Blimp April 12, 2010 Outline Lab 5 Control algorithms algorithms Lab 5 Port car code to gondola on turntable Fan on turntable acts like fan in blimp tail Create code to maintain heading Open loop vs. closed loop Proportional control (P) Proportional plus derivative control (PD) Proportional plus integral plus derivative control (PID) (PID) Thrust fans are operational Set thrust fan angle Control thrust fan speed based on ranger distance This is why the gondola is mounted up side down. Refer to the document in the LMS Laboratory 5 material: Gondola_info April 12, 2010 Lecture #20 - Blimp 2 April 12, 2010 Lecture #20 - Blimp 3 Lab Lab 5 Use LCD display and number pad Present speed control is open loop There isn’t any sensing of the actual car speed Output from ultrasound sensor range Input desired heading Input 4 gain constants For heading Heading proportional gain Heading derivative gain Altitude proportional gain proportional gain Altitude derivative gain Control algorithm pulsewidth generation Speed controller and car For altitude Result is the actual speed of the car. Algorithm could be: PWM = neutral + K*(set_range – actual_range) Still use printf – send telemetry data to your laptop for performance plots. April 12, 2010 Lecture #20 - Blimp 4 Be careful that PWM is always within limits April 12, 2010 Lecture #20 - Blimp 5 1 Lecture #20 - Blimp April 12, 2010 The Steering Servo – this is closed loop control Control of the steering servo motor can be based on the following block diagram. Desired heading neutral offset error The Steering Servo The steering control can be simple proportional control. ti + kp - pulsewidth generation Servo/car actual heading (feedback) Compass Take: error = (desired heading) – (actual heading) PWM = centerpw + Kp* error Take: error = (desired heading – actual heading) (d If our proportional control is set correctly, our control loop will automatically try turn the car until it is traveling in the desired direction. April 12, 2010 Lecture #20 - Blimp 6 This is proportional control, the PWM is proportional to the error April 12, 2010 Lecture #20 - Blimp 7 Lab 5 -Tail or Thrust Motor Control Control of the tail (steering) and thrust motors (altitude) can be based on the following block diagram desired heading (or altitude) PID - What is Proportional Plus Integral Plus Derivative Control? Proportional control yields a pulsewidth that is proportional to the instantaneous value of the error Integral control yields a pulsewidth that is proportional to the timecontrol yields pulsewidth that is proportional to the time integral of the error. PD controller PW to speed controller Motor and blimp actual heading (altitude) Integral control keeps track of the error history. Derivative control yields a puslewidth that is proportional to the time rate of change in the error Pulsewidth the control algorithm sets the pulse width sent to a speed controller in the gondola. (The speed controller also outputs PWM.) Actual heading (altitude) is determined using the sensors. April 12, 2010 Lecture #20 - Blimp 8 The time derivative of the error, d/dt(error) For discrete reading, the derivative has the form or (present_error – previous_error) / time_between_readings Proportional plus integral plus derivative (PID) control combines the features of proportional control and integral control and derivative control through superposition. The proportional part is used to get fast response. The integral part is used to get zero steady-state error. steadyThe derivative part provides damping. April 12, 2010 Lecture #20 - Blimp 9 2 Lecture #20 - Blimp April 12, 2010 http://www.embedded.com/2000/0010/0010feat3.htm http://www.embedded.com/2000/0010/0010feat3.htm No control (open loop) and just proportional control. View the website above Read chapter 7 of the LITEC Manual Car has lots of friction – it is a naturally damped system. Proportional control works well. Blimp has very little damping Derivative Blimp has very little damping. Derivative control control provides damping, and allows larger proportional gains. April 12, 2010 Lecture #20 - Blimp 10 Open loop control isn’t control. For pure proportional control: - The system responds quicker with higher proportional gains. - Too high of a proportional gain will cause isolations or even instability - For systems with little natural damping, a pure proportional controller will cause oscillations. The blimp has very little natural damping. April 12, 2010 Lecture #20 - Blimp 11 http://www.embedded.com/2000/0010/0010feat3.htm http://www.embedded.com/2000/0010/0010feat3.htm PI control for a system with no natural damping Proportional plus Derivative control for a system with no natural damping Pure Integral control. Proportional Plus Integral Intergral control: - Removes steady state errors - Is slow to respond. April 12, 2010 P + I works if the system has natural damping. The damping for the blimp is vary small. (The figure above is for a naturally damped system.) Lecture #20 - Blimp 12 Pure derivative control isn’t shown. It will stop the blimp from turning, but won’t try to match a desired heading. April 12, 2010 Derivative Control - Provides damping - Therefore allows larger proportional gains - Which results in quicker response - PD control will not remove steady state errors Lecture #20 - Blimp 13 3 Lecture #20 - Blimp April 12, 2010 How is PD Control Implemented? PD PD control works well for both blimp heading control and altitude control heading control and altitude control. One way to implement PD control: error = desired - actual new_pw = KP * error + KD * (error – previous_error) previous_error) previous_error = error test new_pw against limits motor_pw = new_pw Other Control Techniques There are many other control techniques. For example, feedforward compensation is useful when there is a sudden change in the desired position. The feedforward path monitors the input command (or disturbance) and directly command (or a disturbance) and directly computes computes the required pulsewidth, without waiting for the feedback loop. 14 April 12, 2010 Lecture #20 - Blimp 15 April 12, 2010 Lecture #20 - Blimp Other Control Techniques feedforward conversion ratio PID controller Some details Print Gondola_info from RPILMS actual Desired PW voltage conversion motor feedback With PD control the gains can be larger so the With PD control, the gains can be larger, so the control control calculations can result in numbers that are negative or larger than what can be represented by an int. Look at the statements on type casting the int control equation – do what it says. We have put the left thrust fan on CEX2 and the right on CEX3 You need to set up both For lab and on CEX3. You need to set up both. For lab 5 and 6, use the same calculated pulse width for both. April 12, 2010 Lecture #20 - Blimp 16 April 12, 2010 Lecture #20 - Blimp 17 4 Lecture #20 - Blimp April 12, 2010 Today’s Class Finish Lab 4, start Worksheet 9 & Lab 5. Limit your time on a gondola to 30 minutes if another team team is waiting. Exam 2 – review lecture on LMS Conflicts contact: Alexey – gutina2@rpi.edu Exam 2 next class. In class – next class - LMS Monday April 19 for sections 1 and 2 Monday April 19 for sections and Tuesday April 20 for sections 3 and 4 Written (coding) part Tuesday April 20, 7-8:30pm, DCC-308 20, 7-8:30pm, DCC Coverage through Lab 4 – plus simple questions on control April 12, 2010 Lecture #20 - Blimp 18 5 ...
View Full Document

This note was uploaded on 04/08/2011 for the course ENGR 2350 taught by Professor Fukanari during the Spring '08 term at Rensselaer Polytechnic Institute.

Ask a homework question - tutors are online