EEE350: Control Systems Semester 1, 2013
Dr. Nur Syazreen Ahmad email:
[email protected] School of Electrical and Electronic Engineering Universiti Sains Malaysia
Lecture 3: Nov 2013
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
Introduction
A simple closed-loop system with output disturbance d o (t )
In this lecture, basic concepts will be introduced, using our insight in time domain, Laplace domain and frequency domain properties.
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
Proportional Control
The most simple form of continuous feedback is proportional control, where u (t ) = k p ( r (t )
− y (t ))
for some proportional gain k p > 0. Consider a simple system where its open-loop response (without C (s )) is given by Y (s ) = G (s )R (s ) + D (s ).
Closed-loop response: Y (s ) = T (s )R (s ) + S (s )D (s ).
with S (s ) =
1
1 + k p G (s ) k p G (s ) . T (s ) = 1 + k p G (s ) S (s ): sensitivity T (s ): complementary sensitivity
Proportional Control The most simple form of continuous feedback is proportional control, where u (t ) = k p (r (t ) − y (t ))
for some proportional gain k p > 0. Consider a simple system where its open-loop response is given by Y (s ) = G (s )R (s ) + D (s ).
So the closed-loop response with a proportional controller C (s ) = k p will be Y (s ) = T (s )R (s ) + S (s )D (s ).
with S (s ) =
1
1 + k p G (s ) k p G (s ) T (s ) = 1 + k p G (s )
sensitivity complementary sensitivity.
P Control: First Order Plant Suppose the plant is first order with G (s ) =
At steady-state, we have
b
y ss = T (0)r ss + S (0)d ss
s + a
=
with a, b > 0. Then the sensitivities are S (s ) =
1
=
s + a
Y (s ) =
s + a + k p b
R (s ) +
s + a + k p b
Observe the following: S (s ) + T (s ) = 1.
The closed-loop response is always stable since the closed-loop pole is −a − k p b < 0.
a a + k p b
d ss .
→
e ss = r ss − y ss
The closed-loop response is thus s + a
a + k p b
r ss +
Recall that y ss = lim s 0 sY (s ) Steady-state error (SSE):
1 + k p G (s ) s + a + k p b k p G (s ) k p b = T (s ) = 1 + k p G (s ) s + a + k p b
k p b
k p b
= D (s ).
1 −
k p b a + k p b
r ss −
a a + k p b
d ss .
As k p ↑, T (0) → 1 and S (0) → 0. So y ss → r ss (SSE ↓). S (s ) and T (s ) are both first order, and they share the same denominator with break frequency a + k p b . The CL bandwidth ( ωb = a + k p b ) > OL bandwidth (ωb = a), and increases with k p .
P Control: Stable First Order Plant Example 1
G (s ) =
1 , s + 1
C (s ) = 10.
Inputs: a square wave set point change at t = 10 s and a step disturbance at t = 30 s . 1.5 Step disturbance p o o l n e p o
1
SSE
0.5
0 0
1 p o o l d e s o l c
Slow response
5
10
15
20
25
30
40
Fast response Suppressed disturbance
0.5 SSE
0 0
35
5
10
15
20 time
25
30
35
40
Open and closed-loop time responses for first order plant with P control
P Control: Stable First Order Plant Example 1 1 , C (s ) = 10. s + 1 Inputs: a square wave set point change at t = 10 s and a step disturbance at t = 30 s G (s ) =
Frequency Responses
Bode Diagram Gm = Inf , Pm = Inf
10
0
5 G(s)
−10
0
) B d ( e d u −20 t i n g a M
) B d ( n i a g
T (s)
−5
−10
−30
−15
−40 0
S (s )
−20
) g e d ( e −45 s a h P
−25 −30 −4 10
−90 −1
10
0
10
1
10 Frequency (rad/sec)
2
10
3
10
−2
10
0
10 frequency
2
10
Open and closed-loop frequency responses for first order plant with P control
Bode plot of T (s ) for Example 1
(1)The CL bandwidth > OL bandwidth (2)SSE in CL
P Control: Unstable First Order Plant Suppose instead G (s ) is unstable, which is given by G (s ) =
b with s + a
G (s ) = b > 0
and
a < 0.
The plant unstable in open-loop, but the closed-loop response Y (s ) =
k p b s + a R (s ) + D (s ) s + a + k p b s + a + k p b
is stable provided a + k p b > 0
Example 1b:
⇔ k > − b a . p
So the negative feedback can be used to stabilize and open-loop unstable plant.
We need k p > system.
−
2 −3
2 s
−3
= 32 to stabilize the
P Control: Stable 2nd Order Plant (with no zero) Suppose the plant is 2 nd order with b 0 . G (s ) = 2 s + a 1 s + a 0
ωn =
a 0 + k p b 0
and increases as k p increases.
Sensitivities: s 2 + a 1 s + a 0 = 2 S (s ) = 1 + k p G (s ) s + a 1 s + a 0 + k p b
1
T (s ) =
The natural frequency is
k p G (s ) k p b = 2 . 1 + k p G (s ) s + a 1 s + a 0 + k p b
Focusing on the complementary sensitivity T (s ), we should observe: The steady-state gain is T (0) =
k p b 0 a o + k p b 0
and approaches 1 for large k p .
The damping ratio is ζ =
a 1
2
a 0 + k p b 0
and approaches 0 for large k p .
P Control: Stable 2nd Order Plant (with no zero) Example 2
G (s ) =
4 , s 2 + 5s + 4
C (s ) = 10.
1.5 Step disturbance
Inputs: same as in Example 1. We have: ωn = ζ = So,
a 0 + k p b 0 a 1
2
a 0 + k p b 0
=
SSE in CL
↓
Slow response
0.5
0
5
10
15
20
25
30
35
40
a 1
2ωn
1 p o o l d e s o l c
p
∝
n e p o
1
0
: faster response (ωn ) but with oscillation (ζ ). Recall: the rise time t r 1/ωn for a 2nd order plant with no zero.
↑ k
p o o l
↑
0.5
Fast response & oscillatory
Suppressed disturbance
0 −0.5 0
5
10
15
20 time
25
30
35
Open- and closed-loop time responses for 2nd order plant (no zero) with P control
40
P Control: Stable 2nd Order Plant (with no zero) Example 2
G (s ) =
4 , s 2 + 5s + 4
C (s ) = 10.
Inputs: same as in Example 1. Frequency Responses
Bode Diagram Gm = Inf dB (at Inf rad/sec) , Pm = 70.9 deg (at 7.56 rad/sec)
10
10
5
0
G (s )
) B −10 d ( e d u −20 t i n g a −30 M
0 T (s )
−5 ) B d ( −10 n i a g
−40 −50 0
−15 ) g e d (
e s a h P
−45
S (s )
−20
−90
−25
−135 −180 −1
10
0
1
10
10
2
10
Frequency (rad/sec)
Bode plot of T (s ) for Example 2
−30 −4 10
−2
10
0
10 frequency
2
10
Open- and closed-loop frequency responses for second order plant (no zero) with P control
P Control: Higher Order Plants If the gain is sufficiently high then P control will destabilize any higher order plant with relative degree > 2. Example 3
G (s ) =
15 , s 3 + 9s 2 + 23s + 15
C (s ) = k p
Inputs: same as in Example 1. Sensitivities: s 3 + 9s 2 + 23s + 15 = 3 S (s ) = 1 + k p G (s ) s + 9s 2 + 23s + 15 + 15k p
1
T (s ) =
k p G (s ) 15k p = 3 . s + 9s 2 + 23s + 15 + 15k p 1 + k p G (s )
P Control: Higher Order Plants Example 3
G (s ) =
15 , s 3 + 9s 2 + 23s + 15
C (s ) = k p
Inputs: same as in Example 1. Frequency Responses 5 = k
1.5
20
1
15
n e h w 0.5 e s n o p 0 s e r
10 5
−0.5 0
5
10
15
20
25
30
35
40
0 1 1 = k n e h 0.5 w e s n o 0 p s e r
) B d ( n i a g
G (s )
0 T (s )
−5 −10
S (s)
−15 −20 −25
−0.5 0
5
10
15
20
25
30
35
40
time
Closed-loop time responses for Example 3 with P control gains k = 5 and k = 10.
−30 −4 10
−2
10
0
10 frequency
2
10
Open and closed-loop frequency responses for Example 3 with P control k = 5.
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
Integral Action and PI Control
Structure of a PI controller
Proportional control with high gain is desirable since it
but other problems often arise such as
Integral Action and PI Control Integral action: to ensure zero steady state error (to step set point changes and to step disturbances). PI (proportional integral) control:
u (t ) = k p e (t ) +
t
1 T i
e (τ )d τ .
So the transfer function for a PI controller is C PI (s ) =
U (s ) = k p 1 +
=
G (s ) =
1 sT i
k p (T i s + 1) T i s
T i s
The term T i is called the integral time. High values of T i reduce the integral action, while low values increase it. For a first order plant
Taking Laplace transforms,
k p (T i s + 1)
E (s )
E (s ).
b s + a
.
the sensitivities are given by S (s ) = T (s ) =
s (s + a ) s 2 + (a + k p b )s + k p b /T i k p b (s + 1/T i ) s 2 + (a + k p b )s + k p b /T i
In particular, S (0) = 0 T (0) = 1
,
PI Control: First Order Plant Example 4 Consider G (s ) =
1 s + 1
and three PI controllers with different integral actions as follows 3 C 1 (s ) = 4 1 + , 4s 1 C 2 (s ) = 4 1 + ,
s
C 3 (s ) = 4
1 +
5 . 4s
Note that the integral actions for C 1 (s ), C 2 (s ) and C 3 (s ) are T 1 = 4 /3, T 2 = 1 and T 3 = 4 /5 respectively. Inputs: same as in Example 1.
1 1 C0.5
0 0
5
10
15
20
25
30
35
40
0
5
10
15
20
25
30
35
40
0
5
10
15
20
25
30
35
40
1 2 C0.5
0
1 3 C0.5
0 time
Closed-loop time responses for Example 4 with three different PI controllers.
PI Control: First Order Plant Example 4 Consider G (s ) =
1 s + 1
Frequency Responses 10 5
and three PI controllers with different integral actions as follows
Complementary sensitivities
Sensitivities
0 −5
3 C 1 (s ) = 4 1 + , 4s 1 C 2 (s ) = 4 1 + ,
s
5 C 3 (s ) = 4 1 + . 4s Note that the integral actions for C 1 (s ), C 2 (s ) and C 3 (s ) are T 1 = 4 /3, T 2 = 1 and T 3 = 4 /5 respectively. Inputs: same as in Example 1.
) B d (
G(s)
−10 n
i a g
−15 −20 −25 −30 −4 10
−3
10
−2
10
−1
10
0
10 frequency
1
10
2
10
3
10
Open and closed-loop frequency responses for Example 4 with three different PI controllers.
PI Control General PI Controllers Suppose G (s ) =
In this case, we may write n(s ) , d (s )
C (s ) =
nc (s ) d c (s )
thus
˜c (s ) d c (s ) = s d ˜c (s ). Suppose for some other polynomials d further that nc (0) = 0, then we have
T (s ) =
n(s )nc (s ) , n(s )nc (s ) + d (s )d c (s )
T (0) =
S (s ) =
d (s )d c (s ) . n(s )nc (s ) + d (s )d c (s )
n(0)nc (0) = 1, n(0)nc (0)
S (0) =
0 = 0. n(0)nc (0)
The controller has integral action if
|C ( j ω)| → ∞
as
ω
→ 0.
This occurs if d c (0) = 0
but nc (0) = 0.
Since we have y ss = T (0)r ss + S (0)d ss
at steady-state, then we will have a perfect set point tracking and disturbance suppression with a PI controller (i.e. the SSE will be zero).
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
Derivative Action and PD Control PD and PDγ control P controller with high gain can increase the closed-loop bandwidth. But in the case where high gain P control is unachievable, integral action will not generally increase the bandwidth. In this case derivative action is useful, and the simplest form is PD (proportional derivative) control. An idealised PD controller takes the form
u (t ) = k p e (t ) + T d
de (t ) dt
In practice analog PD controllers are usually implemented with transfer function
C PD γ (s ) = k p 1 +
T d s
1 + γ Td s
with small γ . This is sometimes called PD γ control.
.
T d is called the derivative time. The
transfer function of an idealised PD controller is C PD (s ) = k p (1 + T d s )
This is improper (and hence unrealisable).
Structure of a PDγ controller
PD Control: 2nd order plant Consider the 2nd order system G (s ) =
b 0 s 2 + a 1 s + a 0
together with an idealised PD controller C PD . Sensitivities: G (s )C PD (s ) T (s ) = 1 + G (s )C PD (s )
= S (s ) =
k p b 0 (1 + T d s ) s 2 + (a 1 + k p T d b 0 )s + (a 0 + k p b 0 )
1 1 + G (s )C PD (s )
s 2 + a 1 s + a 0 = 2 s + (a 1 + k p T d b 0 )s + (a 0 + k p b 0 )
The derivative action gives us an extra degree of freedom, that allows us to choose ωn and ζ independently. Specifically we can choose k p = T d =
ωn2
− a
0
b 0
2ζωn
− a
k p b 0
1
PD Control: 2nd order plant Example 5 Consider the sample plant used in Example 2, i.e. G (s ) =
4 . s 2 + 5s + 4
The P controller with k p = 10 leads to a step response with some brief oscillations. This gain gives a CL natural frequency ωn2 = b 0 k p + a 0 = 4
× 10 + 4 = 44.
With T d = 0 the damping ratio is ζ =
a 1
2ωn
≈ 0.38.
=
5 √ 2 44
Suppose we require ζ = 0.75. Then we should set T d
√ 2ζω − a 2 × 0.75 × 44 − 5 = = 10 × 44 k b ≈ 0.12. n
1
p 0
A PDγ controller with γ = 0.1 takes the form 0.12s C PD γ (s ) = 10 1 + 1 + 0.012s
PD Control: 2nd order plant Example 5 4 , G (s ) = 2 s + 5s + 4
0.12s C PD γ (s ) = 10 1 + 1 + 0.012s
1.5
p o o l
1
n e p o 0.5
0 0
5
10
15
0
5
10
15
20
25
30
35
40
20
25
30
35
40
1 p o o l d 0.5 e s o l c
0
time
Open- and closed-loop time responses for Example 5 with a PDγ controller
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary
PID Control and Ziegler-Nichols tuning
Structure of a PIDγ controller
PID controllers include proportional, integral and derivative action. The standard form of a PID controller is: 1 + T d s . C PID (s ) = k p 1 +
T i s
As with the idealised PD controller this is unrealisable, and a PID controller usually takes the form C PID γ (s ) = k p
1 +
1 T i s
+
T d s 1 + γ Td s
with γ small.
PID Control and Ziegler-Nichols tuning
There are many tuning rules for choosing k p , T i and T d in a PID controller. The Ziegler-Nichols rules are the most popular: there are two different sets of rules: Ziegler-Nichols step response method Ziegler-Nichols frequency response method
PID Control and Ziegler-Nichols tuning Ziegler-Nichols step response method The Ziegler-Nichols step response tuning rules are appropriate for plants whose unit step response appears similar to that in the figure (this is reasonable for many process control applications). In this case a tangent line is drawn at the steepest part of the slope, and the parameters a and L determined from where the tangent intersects the y and a axes respectively. Gains are then chosen according to the table.
−
−
Controller P PI PID
k p 1/a 0.9/a 1.2/a
T i
T d
3L 2L
L/2
Table 1 : Ziegler-Nichols step response method gains
Measurements for Ziegler-Nichols step response method
PID Control and Ziegler-Nichols tuning Ziegler-Nichols frequency response method For some plants it is inappropriate to perform open-loop step tests (for example, the plant may be marginally stable in open loop). In this case, it is sometimes possible to tune a PID controller using the Ziegler-Nichols frequency response method. Here the plant is kept in closed-loop, but with a proportional only controller. The gain of the controller is increased until the plant oscillates with steady amplitude (i.e. with a higher gain the plant goes unstable and with a lower gain the closed-loop step response of the plant attenuates). The corresponding gain is called the ultimate gain K u and the period of the corresponding oscillations is called the ultimate period T u . PID gains should then be set according to the table. Controller P PI PID
k p 0.5K u 0.4K u 0.4K u
T i
T d
0.8T u 0.5T u
0.125T u
Outline
1
PID Control Introduction Proportional Control Integral Action and PI Control Derivative Action and PD Control PID Control and Ziegler-Nichols tuning Summary