Proportional-Integral-Derivative
Controller
Presented by: Sancho McCann
Simple Control Loop
Control Plant Feedback
Examples
Control Plant Feedback
Throttle Auto-engine Wheel speed
Air temp Room temp Thermostat temp
Steering direction Car Distance from path
Voltage Electric motor Fan speed
Fan speed CPU temp CPU temp sensor
Speed control: lookup table
10 kph 3% Throttle
20 kph 6% Throttle
40 kph 20% Throttle
80 kph 50% Throttle
140 kph 100% Throttle
What to do?
Goal (set-point): 21 kph
How much should you change your throttle?
What to do?
Set-point: 80 kph
How much should you change your throttle?
Proportional Controller
• Far from set point? Change throttle more
• Close to set point? Change throttle less
"control = (setpoint # currentState) • pGain
!
Example
Proportional-Derivative Control
• Approaching set point quickly? Ease off
throttle.
pTerm = (setPoint " currState) • pGain
dTerm = (prevState " currState) • dGain
#control = pTerm + dTerm
!
Example
Problem with Derivative Term
Enhances noise
Integral Term
• Helps state average around the set point
• Accumulate historic error
• Allow this integral to inform the control
decision
Examples
Extremes
• What if
– P term is too low?
– P term is too high?
– D term is too low?
– D term is too high?
– I term is too low?
– I term is too high?
Tuning (one manual method)
• Start with low pGain (< 1)
• Set dGain ~ 100x pGain
• Increase dGain until oscillation
– Halve until no oscillation reduced
• Increase pGain until oscillation
– Halve that value
• Set iGain very low and increase until a
small overshoot is noticeable
Can be complex: Autopilot
Heading Roll Aileron