Control Systems I: Lecture 11: PID Control Readings: A&M, Ch. 10, Guzzella, Chapter 11.2
Control Systems I: Lecture 11: PID Control Readings: A&M, Ch. 10, Guzzella, Chapter 11.2
Emilio Frazzoli
# Date Topic
1 Sept. 22 Introduction, Signals and Systems
2 Sept. 29 Modeling, Linearization
3 Oct. 6 Analysis 1: Time response, Stability
4 Oct. 13 Analysis 2: Diagonalization, Modal coordi-
nates.
5 Oct. 20 Transfer functions 1: Definition and properties
6 Oct. 27 Transfer functions 2: Poles and Zeros
7 Nov. 3 Analysis of feedback systems: internal stability,
root locus
8 Nov. 10 Frequency response
9 Nov. 17 Analysis of feedback systems 2: the Nyquist
condition
10 Nov. 24 Specifications for feedback systems
11 Dec. 1 PID Control
12 Dec. 8 Loop Shaping
13 Dec. 15 Implementation issues
14 Dec. 22 Robustness
https://www.youtube.com/watch?v=4Y7zG48uHRo
Type of the system (order of ramp to track with zero steady-state error):
Number of integrators in L(s)
Time domain specifications (max overshoot, settling time, rise time, ...):
Location of dominant closed-loop poles (damping ratio and real part)
What other methods do exist to design controllers C (s) that meet design
specifications? Many approaches, among them:
Today we look at the most widely used approach for SISO systems: PID
control.
disturbance
Step
1
5
reference error control s+1 output
Step1 Gain Transfer Fcn Scope
measurement noise
Band-Limited
White Noise
The control input tries to move the system in a direction that is opposite to
the error, and is proportional to the error in magnitude.
0.8
0.6
y
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
t
2
1
60 50 40 30 20 10
0
-1 1
1
-2
20
Magnitude (dB)
0
-20
-40
0
k=2
k=5
k=10
Phase (deg)
k=50
-45
-90
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Step
1 5 disturbance
s
Integrator I Gain
control 1
2 simout
reference error control s+1 output
Step1 P Gain Transfer Fcn To Workspace
measurement noise
Band-Limited
White Noise
Integrating the error allows one to detect potential ”biases” in the system
behavior.
An integral control action tries to move the response in order to reduce the
detected biases.
PI control: Z t
u(t) = kP e(t) + kI e(τ )dτ,
0
kI kP s + kI kP /kI · s + 1
C (s) = kP + = = kI .
s s s
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 11 / 31
Integral gain selection
1.6
k P=2, k I = 2
k P=2, k I = 2
1.4
k P=2, k I = 5
k P=10, k I = 50
1.2
0.8
y
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
t
20
-10
-20
-30
-90 -80 -70 -60 -50 -40 -30 -20 -10 0 10
Real Axis (seconds-1 )
1
Steady-state error to a unit step: ess = lims→0 1+C (s)L(s) =0
The root locus shows us that as the integral gain increases, the closed-loop
poles go from being “slow” and overdamped to being “fast” but with low
damping!
60
40
Magnitude (dB)
20
-20
-40
-60
-90
Phase (deg)
-120
-150
-180
10 -2 10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
Step
disturbance
control 2
50 simout
reference error control s2+2s+2 output
Step1 P Gain Transfer Fcn To Workspace
measurement noise
Band-Limited
White Noise
1.6
1.4
1.2
1
y
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
t
10
10
0.26
8
2
0.5 4
-5
6
8
0.26
-10
10
12
0.17 0.115 0.085 0.056 0.036 0.016
-15 14
-2.5 -2 -1.5 -1 -0.5 0 0.5
Real Axis (seconds-1 )
The root locus shows that as the proportional gain increases, the closed-loop
poles have decreasing damping ratio.
1 1
Steady-state error to a unit step: ess = lims→0 1+kL(s) = 1+k
20
Magnitude (dB)
0
-20
-40
-60
-80
0
-45
Phase (deg)
-90
-135
-180
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Derivative D Gain
Step
disturbance
control 2
50 simout
reference error control s2+2s+2 output
Step1 P Gain Transfer Fcn To Workspace
measurement noise
Band-Limited
White Noise
Differentiating the error allows one to “predict” what the error will do in the
near future.
An derivative control action tries to avoid overshooting, hence damping the
system.
PD control:
u(t) = kP e(t) + kD ė(t)
C (s) = kP + kD s.
Note that this is not a causal transfer function (not physically realizable in
s
general). This is typically fixed by approximating the derivative as s ≈ cs+1
for some large c.)
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 19 / 31
Derivative gain selection
1.4
k P=50, k D=2
k P=50, k D=5
1.2 k P=50, k D=10
k P=50, k D=50
0.8
y
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
t
20
-10
-20
-30
-120 -100 -80 -60 -40 -20 0 20
Real Axis (seconds-1 )
1 1
Steady-state error to a unit step: ess = lims→0 1+C (s)L(s) = 1+kP L(0)
The root locus shows us that as the derivative gain increases, the closed-loop
poles are “pulled” into the left half plane!
Magnitude (dB)
k_P=50, k_D=50
0
-20
-40
-60
0
-45
Phase (deg)
-90
-135
-180
10 -2 10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
Derivative D Gain
Step
1 disturbance
10
s
Integrator D Gain1
control 2
10 simout
reference error control s2+2s+2 output
Step1 P Gain Transfer Fcn To Workspace
measurement noise
Band-Limited
White Noise
One can also combine the effects of an integrator and of a differentiator with
the basic proportional controller.
PID control: Z t
u(t) = kP e(t) + kI e(τ )dτ + kD ė(t),
0
kI kD s 2 + kP s + kI
C (s) = kP + + kD s = .
s s
(s − z1 )(s − z2 )
C (s) = kRL
s
i.e., as two zeros and one pole at the origin. Decide where you want these
zeros (in the complex plane, or in terms of natural frequency and damping
ratio on the Bode plot), and what you want the (root-locus) gain to be.
Finally, compute the corresponding kP , kI , kD .
Proportional control
Decrease the steady-state error;
Increase the closed-loop bandwidth;
Increase sensitivity to noise;
Can reduce stability margins for higher-order systems (2nd order or more).
Integral control
Eliminates the steady-state error to a step (if the closed-loop is stable);
Reduces stability margins, can make a higher-order system unstable.
Derivative control
Reduce overshooting, increase damping;
Improves stability margins;
Increase sensitivity to noise.
Graphically: