KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1....
Transcript of KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1....
![Page 1: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/1.jpg)
KK2.1.5 PID Tuning
![Page 2: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/2.jpg)
Control Theory 101
• Open loop: No feedback
– Examples: Water faucet, stove top burner setting
• Closed loop: Some sensor to give feedback
and adjust input
– Examples: Thermostat, cruise control, servo
![Page 3: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/3.jpg)
What is PID?
• PID = Proportional, Integral, Derivative
• Common form of closed loop control
• “P depends on the present error, I on the
accumulation of past errors, and D is a
prediction of future errors”
![Page 4: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/4.jpg)
P – Proportional Gain
• Applies response that is proportional to the
magnitude of error between set point and
output
![Page 5: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/5.jpg)
I – Integral Gain
• Applies response that is a function of the
magnitude and duration of the error
• Good for eliminating small steady state error
• Provides “heading hold” function on RC gyro
![Page 6: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/6.jpg)
D – Derivative Gain
• Applies response that is a function of the
slope of the error over time
• Helps settle the system
• Allows for higher P gain
![Page 7: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/7.jpg)
RC Flight Controller Tuning
• P gain is the primary gain to tune
– Makes the helicopter more responsive to inputs
– Oscillation, or “wag” if set too high
• I gain provides heading hold effect
– “locked” feel, eliminates drift
– Slow oscillation if set too high
• D gain damps the response
– Helps you run higher P gain
– Very high frequency oscillation if set too high
![Page 8: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/8.jpg)
General Tuning Procedure
1. Incrementally set the P gain higher until wag
is observed.
2. Slightly reduce P gain to stable level
3. Increment D gain in small step
4. Repeat steps 1-4, D gain allows higher P gain
5. Play with I gain until the heli holds angle in
forward flight (no pitch up)
![Page 9: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/9.jpg)
KK2 Functions
• Only PI control – no need to tune D
• Always tune with self level off
• Leave PI limits at default
• Roll and pitch are usually the same gain on
square quadcopter
![Page 10: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/10.jpg)
KK2 Functions
• ‘Self Level’ P gain = power to self level
– Too high will produce oscillations
– Tune after primary PI gains are set
![Page 11: KK2.1.5 PID Tuning - Meetupfiles.meetup.com/12309932/KK2_Tuning.pdf · General Tuning Procedure 1. Incrementally set the P gain higher until wag is observed. 2. Slightly reduce P](https://reader035.fdocuments.us/reader035/viewer/2022062919/5edf5a03ad6a402d666ab3e5/html5/thumbnails/11.jpg)
KK 2 Functions
• Stick Scaling describes stick senstivity
– Similar to dual rates on your transmitter