csd2_pid
DESCRIPTION
Control System Design, PIDTRANSCRIPT
..........
.....
.....................................................................
.....
......
.....
.....
.
.
......Control System Design-II
Dr. Abdul Qayyum Khan
Room No. SE-302Department of Electrical Engineering,
Pakistan Institute of Engineering and Applied Sciences,P.O. Nilore Islamabd Pakistan
Email: [email protected]://faculty.pieas.edu.pk/aqayyum/
Copyrighted@AQKhan. All rights reserved 1 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
PID Controllers I
PID controllers were occasionally discussed
PID Controllers
comprises more than 50% industrial controllers
are adjusted on-site −→ many tuning methods have been proposed
are useful, especially when the plant model is unknown
are useful, but not necessarily to be optimal in many cases
Copyrighted@AQKhan. All rights reserved 2 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Tuning Rules for PID Controllers I
The transfer function is
Gpid = Kp
(I + Tds +
1
Ti s
)where the PID parameters
Copyrighted@AQKhan. All rights reserved 3 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Tuning Rules for PID Controllers II
Kp : Proportional GainTd : Derivative Time ConstantTi : Integral Time Constant
Tuning the PID parameters =⇒ Ziegler and Nichols methodsFirst method:
Obtain a step response of the plant to be controlledIf there is no integrator and no complex conjugate poles (dominant),then the unit step response looks like S-shapedNote down the characteristics of the S-shaped curve.(1) Delay time L, (2) Time Constant TThe transfer function of the plant is approximated as
Y (s)
U(s)=
Ke−Ls
Ts + 1
Then the parameters of the PID controller can be set according to thefollowing table
Copyrighted@AQKhan. All rights reserved 4 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Tuning Rules for PID Controllers III
Type of Controller Kp Ti Td
P TL
∞ 0
PI 0.9TL
L0.3
0
PID 1.2TL
2L 0.5L
The PID controller according to the 1st method of Z&N
Gpid(s) = Kp
(I + Td s +
1
Ti s
)= 1.2
T
L
(I + 0.5Ls +
1
2Ls
)= 0.6T
(s + 1
L
)2s
One pole at the origin;double zeros at s = − 1
L
Second method
This method applies when the response is not S-shapedPut Ti = ∞, Td = 0. Vary Kp unless sustained oscillation starts.Note down that value of Kp = Kcr
Copyrighted@AQKhan. All rights reserved 5 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Tuning Rules for PID Controllers IV
Also determine, the corresponding period Pcr
Then the parameters of the PID controller can be set according to thefollowing table
Type of Controller Kp Ti Td
P 0.5Kcr ∞ 0
PI 0.45KcrPcr1.2
0
PID 0.6Kcr 0.5Pcr 0.125Pcr
The PID controller according to the 1st method of Z&N
Gpid(s) = Kp
(I + Td s +
1
Ti s
)= 0.6Kcr
(I + 0.125Pcr s +
1
0.5Pcr
)
= 0.075KcrPcr
(s + 4
Pcr
)2
s
One pole at the origin;double zeros at s = − 4
Pcr
Copyrighted@AQKhan. All rights reserved 6 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Tuning Rules for PID Controllers V
Comments:
Z&N rules have been widely used for tuning PID controller in theprocess industryIf the mathematical model of the plant to be controlled is known e.g.Transfer function; then root locus is used to find Kcr and Pcr ; that is,
Pcr =2π
wcr
If the root-locus parameter does not cross jw− axis, this method willnot applyFor the plant with known mathematical model, many other analyticaland graphical methods can be used besides Z&N.Z&N and all methods proposed in literature provide initial guess. Theparameters may further be tuned for desirable response.
Copyrighted@AQKhan. All rights reserved 7 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Tuning Rules for PID Controllers VI
Table: Effects of increasing a parameter independently
Parameter Rise time Overshoot Settling time Steady-state error StabilityKp Decrease Increase Small change Decrease DegradeKi Decrease Increase Increase Eliminate DegradeKd Minor change Decrease Decrease No effect in theory Improve if Kd small
Copyrighted@AQKhan. All rights reserved 8 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Modification OF PID Control Schemes I
Figure: PID controlled system and equivalent block diagram
Copyrighted@AQKhan. All rights reserved 9 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Modification OF PID Control Schemes II
R(s) : Reference Signal
E (s) : Error Signal
D(s) : Disturbance Signal
Y (s) : Output Signal
N(s) : Noise Signal
B(s) : Observed Signal
Notice that for R(s) : Step function; U(s) will involve delta functiondue to Tds term. Due to this reason; Tds is replaced by Td s
1+γTd s
Advantage: U(s) will involve sharp pulses instead of impulses. Thisphenomenon is known as set-point kick
Copyrighted@AQKhan. All rights reserved 10 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
PI-D Control I
To avoid set-point kick phenomenon
Derivative action in the feedback path
Copyrighted@AQKhan. All rights reserved 11 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
PI-D Control II
The transfer functions Y (s)R(s)
Y (s)
R(s)
∣∣∣∣D=0,N=0
=
(1 +
1
Ti s
)KpGp(s)
1 + KpGc(s)Gp(s)
The transfer functions Y (s)D(s)
Y (s)
D(s)
∣∣∣∣R=0,N=0
=Gp(s)
1 + KpGc(s)Gp(s)
where
Gc(s) =
(I + Tds +
1
Ti s
)
Copyrighted@AQKhan. All rights reserved 12 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
I-PD Control I
PID & PI-D (R(s) = step, U(s) will involve step)
NOT desirable in many occasion
Advantageous if move KP+ Derivative action into feedback path
Copyrighted@AQKhan. All rights reserved 13 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
I-PD Control II
Only feedback signal is affected
The transfer functions Y (s)R(s)
Y (s)
R(s)
∣∣∣∣D=0,N=0
=
(1
Ti s
)KpGp(s)
1 + KpGc(s)Gp(s)
The transfer functions Y (s)D(s)
Y (s)
D(s)
∣∣∣∣R=0,N=0
=Gp(s)
1 + KpGc(s)Gp(s)
where
Gc(s) =
(I + Tds +
1
Ti s
)
Copyrighted@AQKhan. All rights reserved 14 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control I
PI-D: Derivative control action is in feedback path
I-PD: Proportional+derivative control in feedback path
PI-PD: to move some portion of the controllers
PI-PD Control: Characteristics of this control lie between PID controland I-PD control
PID-PD Control: One control is Feed forward path and one is inFeedback path.
Copyrighted@AQKhan. All rights reserved 15 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control II
In the above figure
D(s) : Process disturbance
Copyrighted@AQKhan. All rights reserved 16 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control III
N(s) : Measurement noise
R(s) : Reference Input
Gp(s) : Plant Transfer function (fixed and uncertain)
Gc(s) : Controller transfer function
Notice that
Gyr =Y (s)
R(s)=
GcGp
1 + GcGp
Gyd =Y (s)
D(s)=
Gp
1 + GcGp
Gyn =Y (s)
N(s)= − GcGp
1 + GcGp= −Gyr
Copyrighted@AQKhan. All rights reserved 17 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control IV
Also
Gyr =Gp − Gyd
Gp
Gyn =Gyd − Gp
Gp
Notice that if Gyd is known, then Gyr and Gyn are fixed. This means thatby only computing Gyd , Gyr and Gyn can be determined. Hence the abovesystem is one-degree of freedom. Consider another example
Copyrighted@AQKhan. All rights reserved 18 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control V
Copyrighted@AQKhan. All rights reserved 19 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control VI
Gyr =Y (s)
R(s)=
Gc1Gp
1 + GcGp
Gyd =Y (s)
D(s)=
Gp
1 + GcGp
Gyn =Y (s)
N(s)= − GcGp
1 + GcGp
where
Gc = Gc1 + Gc2
Also
Gyr = Gc1Gyd
Gyn =Gyd − Gp
Gp
Copyrighted@AQKhan. All rights reserved 20 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control VII
For Gyd is known, Gyn is fixed. Even then Gyr is unknown due to Gc1. Itmeans that the two loops are independent. Hence the system is atwo-degrees of freedom control system. Take a look at the following figure
Copyrighted@AQKhan. All rights reserved 21 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control VIII
Gyr =Y (s)
R(s)=
Gc1Gp
1 + Gc1Gp+
Gc2Gp
1 + Gc1Gp
Gyd =Y (s)
D(s)=
Gp
1 + Gc1Gp
Gyn =Y (s)
N(s)= − Gc1Gp
1 + Gc1Gp
Also
Gyr = Gc2Gyd +Gp − Gyd
Gp
Gyn =Gyd − Gp
Gp
If Gyd is given, Gyn is fixed. Gyr is not fixed. Gc1 can be tunedindependently from Gc2.
Comments
Copyrighted@AQKhan. All rights reserved 22 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Two Degrees of Freedom PID Control IX
The degrees of freedom means the control loops which are tuned toget the desired response.
If two control loops are to be tuned independently, then the controlsystem will be two degrees of freedom. The same arguments can beused for one degree of freedom and more degrees of freedom
Sometimes the name degrees of freedom is given based on theindependent control variables to be tuned
Copyrighted@AQKhan. All rights reserved 23 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement approach to improve responsecharacteristics I
It is useful techniques when it is desired to minimize steady stateerror in systems subjected to changing inputs (step input, Rampinput, acceleration input).
In high performance control, zero steady state error is always desired.
Example Problem
Consider the figure 2, design a Control System that will exhibit no steadystate error for ramp and acceleration input and force the response to stepdisturbance input to approach zero as quickly as possible.
Copyrighted@AQKhan. All rights reserved 24 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement approach to improve responsecharacteristics II
Figure: Two-degrees of freedom control system
Copyrighted@AQKhan. All rights reserved 25 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement approach to improve responsecharacteristics III
Solution:
Let Gp(s) = K A(s)B(s) be minimum phase and
A(s) = (s + z1) (s + z2) · · · (s + zm)
B(s) = sN (s + pN+1) (s + pN+2) · · · (s + pn)
where N = 0, 1, 2 and n ≥ m.Let Gc1 be a PID controller followed by a filter 1
A(s) ; that is,
Gc1 =α1s
2 + β1s + γ1s
1
A(s)
Copyrighted@AQKhan. All rights reserved 26 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement approach to improve responsecharacteristics IV
and Gc2 be PID,PI,PD,I,D or P controller followed by a filter 1A(s) ; that is,
Gc2 =α2s
2 + β2s + γ2s
1
A(s)
where α2, β2, γ2 might be zero depending upon the choice of control.Recall
Gyr =Y (s)
R(s)=
Gc1Gp
1 + GcGp
Gyd =Y (s)
D(s)=
Gp
1 + GcGp
where
Gc = Gc1 + Gc2
Copyrighted@AQKhan. All rights reserved 27 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement approach to improve responsecharacteristics V
we need
Gc = Gc1 + Gc2 =αs2 + βs + γ
s
1
A(s)
Then
Gyd =Y (s)
D(s)=
Gp
1 + GcGp
=K A(s)
B(s)
1 + αs2+βs+γs
1
��A(s)K��A(s)
B(s)
KsA(s)
sB(s) + K (αs2 + βs + γ)
Copyrighted@AQKhan. All rights reserved 28 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement approach to improve responsecharacteristics VI
if D(s) = ds : Step input with magnitude d , then
Y (s) = �sKA(s)
sB(s) + K (αs2 + βs + γ)× d
�s
assuming the system is stable, using final value theorem
Y (∞) = lims→0
sKdA(s)
sB(s) + K (αs2 + βs + γ)= 0
Notice that
The denominator of YR and Y
D is the same which means that thecharacteristics equation is the same
The poles can be adjusted to improve the response
What is the importance of adjusting zeros of the closed loop system
Copyrighted@AQKhan. All rights reserved 29 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement I
Consider a system
Y
R=
p(s)
sn+1 + ansn + an−1sn−1 + · · ·+ a2s2 + a1s + a0
If we choose p(s) = a2s2 + a1s + a0, then the steady state error will be
zero for step, ramp, and acceleration input.Define E (s) = R(s)− Y (s), then
E (s) = R(s)− a2s2 + a1s + a0
sn+1 + ansn + an−1sn−1 + · · ·+ a2s2 + a1s + a0R(s)
=
[1− a2s
2 + a1s + a0sn+1 + ansn + an−1sn−1 + · · ·+ a2s2 + a1s + a0
]R(s)
Copyrighted@AQKhan. All rights reserved 30 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement II
For R(s) = 1s : step input
E (∞) = lims→0
[sE (s)]
= lims→0
s
[1− a2s
2 + a1s + a0sn+1 + · · ·+ a2s2 + a1s + a0
]1
s
= lims→0
�s
[1− a2s
2 + a1s + a0sn+1 + · · ·+ a2s2 + a1s + a0
]1
�s
= 0
Copyrighted@AQKhan. All rights reserved 31 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement III
For R(s) = 1s2
: Ramp input
E (∞) = lims→0
[sE (s)]
= lims→0
s
[1− a2s
2 + a1s + a0sn+1 + · · ·+ a2s2 + a1s + a0
]1
s2
= lims→0
[1− a2s
2 + a1s + a0sn+1 + · · ·+ a2s2 + a1s + a0
]1
s
= lims→0
[sn+1 + · · ·+ s3
sn+1 + · · ·+ a2s2 + a1s + a0
]1
s
= lims→0
s
[sn + · · ·+ s2
sn+1 + · · ·+ a2s2 + a1s + a0
]1
s
= lims→0
�s
[sn + · · ·+ s2
sn+1 + · · ·+ a2s2 + a1s + a0
]1
�s
= 0
Copyrighted@AQKhan. All rights reserved 32 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement IV
For R(s) = 1s3
: Acceleration input
E (∞) = lims→0
[sE (s)]
= lims→0
s
[1− a2s
2 + a1s + a0sn+1 + · · ·+ a2s2 + a1s + a0
]1
s3
= lims→0
[1− a2s
2 + a1s + a0sn+1 + · · ·+ a2s2 + a1s + a0
]1
s2
= lims→0
[sn+1 + · · ·+ s3
sn+1 + · · ·+ a2s2 + a1s + a0
]1
s2
= lims→0
��s2[
sn−1 + · · ·+ s
sn+1 + · · ·+ a2s2 + a1s + a0
]1
��s2
= 0
Copyrighted@AQKhan. All rights reserved 33 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement V
Determination of Gc1
Consider again
Y (s)
R(s)=
a2s2 + a1s + a0
sn+1 + ansn + an−1sn−1 + · · ·+ a2s2 + a1s + a0
As we have
Y (s)
R(s)= Gc1
Y (s)
D(s)
=sGc1KdA(s)
sB(s) + K (αs2 + βs + γ)
=sGc1KdA(s)
sn+1 + ansn + an−1sn−1 + · · ·+ a2s2 + a1s + a0
Copyrighted@AQKhan. All rights reserved 34 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement VI
Since Gc1 is PID controller and is given by
Gc1 =α1s
2 + β1s + γ1s
1
A(s)
Now
Y (s)
R(s)=
K(α1s
2 + β1s + γ1)
sn+1 + ansn + an−1sn−1 + · · ·+ a2s2 + a1s + a0
Therefore we choose Kα1 = a2, Kβ1 = a1, Kγ1 = a0, so that
Gc1 =a2s
2 + a1s + a0Ks
1
A(s)
Copyrighted@AQKhan. All rights reserved 35 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Zero placement VII
Determination of Gc2:As
Gc1 + Gc2 =αs2 + βs + γ
s
1
A(s)
Gc2 =αs2 + βs + γ
s
1
A(s)− a2s
2 + a1s + a0Ks
1
A(s)
=(Kα− a2) s
2 + (Kβ − a1) s + (Kγ − a0)
Ks
1
A(s)
Copyrighted@AQKhan. All rights reserved 36 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem I
Consider two degrees of freedom control system shown in Figure. Theplant transfer function is
Gp(s) =10
s(s + 1)
Design controllers Gcl(s) and Gc2(s) such that the maximum overshoot inthe response to the unit-step reference input be less than 19%, but morethan 2%, and the settling time be less than 1 sec. It is desired that thesteady-state errors in following the ramp reference input and accelerationreference input be zero.The response to the unit-step disturbance inputshould have a small amplitude and settle to zero quickly.
Copyrighted@AQKhan. All rights reserved 37 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem II
Copyrighted@AQKhan. All rights reserved 38 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem III
Copyrighted@AQKhan. All rights reserved 39 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem IV
0 1 2 3 4 5 6 7 8 9 10−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
Time [second]
SS
E
Steady State Error
Acceleration Rampstep
Copyrighted@AQKhan. All rights reserved 40 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem V
Step Response
Time (seconds)
Am
plitu
de
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.90
0.2
0.4
0.6
0.8
1
1.2
1.4
System: sysPeak amplitude: 1.18Overshoot (%): 17.9At time (seconds): 0.106
Copyrighted@AQKhan. All rights reserved 41 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem I
Consider two degrees of freedom control system shown in Figure. Theplant transfer function is
Gp(s) =5
(s + 1)(s + 5)
Design controllers Gcl(s) and Gc2(s) such that
The maximum overshoot in the response to the unit-step referenceinput be less than 25% and the settling time be less than 2 sec.
It is desired that the steady-state errors in following the rampreference input and acceleration reference input be zero.
The response to the unit-step disturbance input should have a smallamplitude and settle to zero eventually.
Copyrighted@AQKhan. All rights reserved 42 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem II
Copyrighted@AQKhan. All rights reserved 43 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem III
0 0.5 1 1.5 2 2.5 3−0.2
0
0.2
0.4
0.6
0.8
1
1.2
Time [Seconds]
SS
E
SSE
StepRampAcceleration
Copyrighted@AQKhan. All rights reserved 44 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem IV
0 1 2 3 4 5 6 7 8 9 100
0.2
0.4
0.6
0.8
1
1.2
Time[Seconds]
Output
Step Reference input Response
Copyrighted@AQKhan. All rights reserved 45 / 46
..........
.....
.....................................................................
.....
......
.....
.....
.
Design Problem V
0 1 2 3 4 5 6 7 8 9 10−0.005
0
0.005
0.01
0.015
0.02
0.025
0.03Response to Step Disturbance
Time [Second]
Response
Copyrighted@AQKhan. All rights reserved 46 / 46