kk2.1.5 pid tuning - meetupfiles.meetup.com/12309932/kk2_tuning.pdf · general tuning procedure 1....
TRANSCRIPT
KK2.1.5 PID Tuning
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
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”
P – Proportional Gain
• Applies response that is proportional to the
magnitude of error between set point and
output
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
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
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
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)
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
KK2 Functions
• ‘Self Level’ P gain = power to self level
– Too high will produce oscillations
– Tune after primary PI gains are set
KK 2 Functions
• Stick Scaling describes stick senstivity
– Similar to dual rates on your transmitter