0% found this document useful (0 votes)
84 views31 pages

Control Systems I: Lecture 11: PID Control Readings: A&M, Ch. 10, Guzzella, Chapter 11.2

The document discusses proportional-integral-derivative (PID) control. It begins by introducing proportional control and discussing how increasing the proportional gain affects the closed-loop response, stability, steady-state error, and sensitivity to noise. Next, it introduces adding an integrator to proportional control, which helps eliminate steady-state error but can cause instability. The overall goal is to learn how to design a PID controller by understanding the effects of the proportional, integral, and derivative terms.

Uploaded by

Alex Mar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views31 pages

Control Systems I: Lecture 11: PID Control Readings: A&M, Ch. 10, Guzzella, Chapter 11.2

The document discusses proportional-integral-derivative (PID) control. It begins by introducing proportional control and discussing how increasing the proportional gain affects the closed-loop response, stability, steady-state error, and sensitivity to noise. Next, it introduces adding an integrator to proportional control, which helps eliminate steady-state error but can cause instability. The overall goal is to learn how to design a PID controller by understanding the effects of the proportional, integral, and derivative terms.

Uploaded by

Alex Mar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Control Systems I

Lecture 11: PID Control

Readings: A&M, Ch. 10, Guzzella, Chapter 11.2,

Emilio Frazzoli

Institute for Dynamic Systems and Control


D-MAVT
ETH Zürich

December 1st, 2017

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 1 / 31


Tentative schedule

# 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

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 2 / 31


Today’s learning objectives

Learn what a PID control is and how to design one:

Proportional control: what it is, pro’s and con’s

Derivative control: what it is, pro’s and con’s

Integral control: what it is, pro’s and con’t

Tuning strategies for PID controllers.

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 3 / 31


A nice intro to PID control

https://www.youtube.com/watch?v=4Y7zG48uHRo

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 4 / 31


Recall: Control Specifications

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)

Frequency domain specifications (command tracking, disturbance/noise


rejection, closed-loop bandwidth):
Bode obstacle course (low/high frequency)
Crossover frequency

Control synthesis: how do we choose a feedback control system that


achieves these objectives?

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 5 / 31


Controller design methods

What other methods do exist to design controllers C (s) that meet design
specifications? Many approaches, among them:

PID, Loop Shaping, LQR, LQG-LTR, H∞, Discrete-time optimal control,


continuous-time optimal control, model predictive control,...

Today we look at the most widely used approach for SISO systems: PID
control.

PID - control (proportional-integral-derivative control) is the most widely


applied controller design because it is able to cope well with the majority of
cases encountered in practice.

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 6 / 31


Proportional 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.

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 7 / 31


Proportional gain selection
1.2
k=2
k=5
k=10
k=50
1

0.8

0.6
y

0.4

0.2

0
0 1 2 3 4 5 6 7 8 9 10
t

As the proportional gain increases,


The closed-loop system remains stable;
The steady-state error decreases;
The response becomes faster;
The sensitivity to noise increases.
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 8 / 31
Proportional gain selection
Root Locus
3
0.999 0.997 0.995 0.989 0.975 0.88

2
1

Imaginary Axis (seconds-1 )


1 1

60 50 40 30 20 10
0

-1 1

1
-2

0.999 0.997 0.995 0.989 0.975 0.88


-3
-60 -50 -40 -30 -20 -10 0 10
Real Axis (seconds-1 )

Closed-loop transfer function


L(s) 1
T (s) = = ,
1 + kL(s) s +1+k
i.e., the closed-loop pole is at s = −1 − k (see root locus above).
1 1
Steady-state error to a unit step: ess = lims→0 1+kL(s) = 1+k

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 9 / 31


Proportional gain selection
Bode Diagram
40

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)

As the proportional gain increases,


Phase margin remains > 90◦ ;
The crossover frequency increases;
The low-frequency gain increases;
The high-frequency gain increases;
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 10 / 31
Introducing an integrator

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

As the integral gain increases,


The steady-state error is zero (as long as kI is not zero)
The response becomes more oscillatory (warning!)
The sensitivity to noise does not change!

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 12 / 31


Integral gain selection
Root Locus
30

20

Imaginary Axis (seconds-1 )


10

-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!

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 13 / 31


Integral gain selection
Bode Diagram
80

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)

As the integral gain increases,


Phase margin decreases;
The crossover frequency increases;
The low-frequency gain increases — but goes to infinity near 0 in all cases ;
The high-frequency gain does not change.
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 14 / 31
Proportional Control — Higher order systems

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

How do the previous consideration extend to higher-order systems, e.g., 2nd


order?

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 15 / 31


Proportional gain selection
1.8

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

As the proportional gain increases,


The closed-loop system become more oscillatory (warning!);
The steady-state error decreases;
The response becomes faster;
The sensitivity to noise increases.
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 16 / 31
Proportional gain selection
Root Locus
15 14
0.17 0.115 0.085 0.056 0.036 0.016
12

10
10
0.26
8

Imaginary Axis (seconds-1 )


5 4
0.5
2

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

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 17 / 31


Proportional gain selection
Bode Diagram
40

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)

As the proportional gain increases,


Phase margin gets smaller and smaller!
The crossover frequency increases;
The low-frequency gain increases;
The high-frequency gain increases;
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 18 / 31
Introducing a differentiator
50

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

As the derivative gain increases,


The steady-state error not affected;
The response becomes less oscillatory, but potentially slower
The sensitivity to noise increases!

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 20 / 31


Derivative gain selection
Root Locus
30

20

Imaginary Axis (seconds-1 )


10

-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!

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 21 / 31


Derivative gain selection
Bode Diagram
40
k_P=50, k_D=2
20 k_P=50, k_D=5
k_P=50, k_D=10

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)

As the derivative gain increases,


Phase margin increases;
The crossover frequency increases;
The low-frequency gain does not change;
The high-frequency gain increases.
E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 22 / 31
Proportional-Integral-Derivative Control
5

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

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 23 / 31


PID Tuning

PID tuning corresponds to choosing the parameters kp , ki and kd to reach the


feedback control design specifications.
PID tuning can be done with tuning rules by hand or numerically using
MATLAB or other tools (the latter requires a system model).
There exist heuristic methods to tune a PID controller without a model of
the plant P(s), e.g. the tuning rules proposed by Ziegler and Nichols.
My recommendation: think of a PID as

(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 .

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 24 / 31


Summary

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.

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 25 / 31


Today’s learning objectives

Learn what a PID control is and how to design one:

Proportional control: what it is, what it does, pro’s and con’s

Derivative control: what it is, what it does, pro’s and con’s

Integral control: what it is, what it does, pro’s and con’s

Tuning strategies for PID controllers.

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 26 / 31


Ziegler Nichols Tuning Rules

Assumption: Plant can be approximated by the transfer function


k
P(s) = e −Ts
τs + 1
with T /(T + τ ) small.

Apply the controller C (s) = kp to the system starting at kp = 0 and increase


kp until the system is in a steady-state oscillation, then note the ”critical kp ”
called kp∗ and the corresponding critical oscillation period T ∗ .

Use kp∗ and T ∗ to calculate the control gains:


type kp Ti Td
P 0.5 · kp∗ ∞ · T∗ 0 · T∗
PI 0.45 · kp∗ 0.85 · T ∗ 0 · T∗
PD 0.55 · kp∗ ∞ · T∗ 0.15 · T ∗
PID 0.6 · kp∗ 0.5 · T ∗ 0.125 · T ∗

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 27 / 31


Ziegler Nichols Tuning Rules

Graphically:

1 (Lino Guzzella ”Analysis and Synthesis of Single-Input Single-Output Control Systems)


E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 28 / 31
Ziegler Nichols Tuning Example
1
Plant: P(s) =
(s + 1) · (s 2 + 2s + 2)
0.5
Approximation: Papprox = · e −0.01s
0.5 · s + 1

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 29 / 31


Ziegler Nichols Tuning Example
Set Ti = ∞, Td = 0, τ = 0 and increase gain kp .
Critical gain kp∗ = 10 with critical oscillation period T ∗ = 2π
ω∗ = 2π
2 =π

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 30 / 31


Ziegler Nichols Tuning Example
P, PI, PD, PID controller according to Ziegler and Nichols tuning rules.
PID controller derived with MATLAB sisotool.
Ziegler Nichols tuning rules can be useful when no model of the plant is
available but generally other tuning rules provide better results.

E. Frazzoli (ETH) Lecture 11: Control Systems I 1/12/2017 31 / 31

You might also like