PI&PD Controller Sample Problem
-
Upload
mark-jayson-mercado -
Category
Documents
-
view
246 -
download
1
Transcript of PI&PD Controller Sample Problem
-
7/27/2019 PI&PD Controller Sample Problem
1/28
Problem 1Solution
I
s=tf('s');G=1/((s+2.5)*(s+4.5)*(s+7));rlocus(G);grid on
II
-20 -15 -10 -5 0 5-15
-10
-5
0
5
10
150.140.280.420.560.70.82
0.91
0.975
0.140.280.420.560.70.82
0.91
0.975
2.557.51012.51517.5
Root Locus
Real Axis (seconds-1)
ImaginaryAx
is(seconds-1)
-2.19 -2.18 -2.17 -2.16 -2.15 -2.14 -2.13 -2.12 -2.11
3.66
3.67
3.68
3.69
3.7
3.71
3.72
3.73
3.74
3.75
3.76
0.490.4930.4970.50.503
0.506
0.51
0.512
4.22
4.24
4.26
4.28
4.3
System: G
Gain: 101
Pole: -2.15 + 3.72i
Damping: 0.5
Overshoot (%): 16.3
Frequency (rad/s): 4.3
Root Locus
Real Axis ( seconds-1)
Imag
inaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
2/28
K = 101
Check the third pole for K=101, closed loop TF:
M(s) =101
(:2.)(:4.)(:7)
s=tf('s');M = 101/((s+2.5)*(s+4.5)*(s+7));F = feedback(M,1);pole(F)
ans =
-9.6988
-2.1506 + 3.7294i
-2.1506 - 3.7294i
Since the third pole s = -9.6988 is NOTgreater than five times the real part of the dominant pole
(-2.1506), therefore the approximation that the system is a second-order is not valid. In this case the
actual settling time/peak time of original equation which can be found using the plot of the step
response must be considered.
-
7/27/2019 PI&PD Controller Sample Problem
3/28
s=tf('s');M = 101/((s+2.5)*(s+4.5)*(s+7));F = feedback(M,1);step(F)
From the graph above it was found that the actual settling time Ts= 1.95 (sec).
III.
Considering the desired parameter that Ts(new) 5 x Ts ;
Taking the maximum possible value
Ts(new) = 5 x 1.95 = 9.75 (sec)
IV.
Desired location for the compensated poles:
Real part dnew 4
Ts(new) . (sec)
Imaginary part dnew .n .
Step Response
Time (seconds)
Amplitude
0 0.5 1 1.5 2 2.5 30
0.1
0.2
0.3
0.4
0.5
0.6
0.7
System: F
Settling Time (seconds): 1.95
-
7/27/2019 PI&PD Controller Sample Problem
4/28
V.System with PI controller looks like
Graph the locus of the compesated sytem with varying values of zero to find a suitable value of K,
then plot the step response of each system until we come up with the our desired value of settling
time (Ts ).
Test point 1
M(s) =(:0.1)
(:2.)(:4.)(:7)
K = 100
Taking the step response using the obtained value of K
s=tf('s');M = (100*(s+0.1))/(s*(s+2.5)*(s+4.5)*(s+7));F=feedback(M,1);step(F)
Ts = 54.1 (sec)
-5 -4 -3 -2 -1 0
-1
0
1
2
3
4
5
60.140.280.420.56
0.7
0.82
0.91
0.975
0.975
1
2
3
4
5
1
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
5/28
Test point 2
M(s) =(:0.)
(:2.)(:4.)(:7)
K = 99.1
Taking the step response using the obtained value of K
s=tf('s');M = (99.1*(s+0.5))/(s*(s+2.5)*(s+4.5)*(s+7));F=feedback(M,1);step(F)
Ts = 9.91 (sec)
Test point 3
M(s) =(:0.6)
(:2.)(:4.)(:7)
K = 98.7
Taking the step response using the obtained value of K
s=tf('s');M = (98.7*(s+0.6))/(s*(s+2.5)*(s+4.5)*(s+7));F=feedback(M,1);step(F)
Ts = 8.06 (sec)
This value of settling time satisfies our the condition T s(new) 5 x Ts. Therefore it is safe to say that the
location of the zero for this system should be at -0.6.
VI.
Gc(s) =
9.7(:0.6)
Gc(s) = K1 +2
Therefore
K1 = 98.7
K2= 59.22
-
7/27/2019 PI&PD Controller Sample Problem
6/28
VII.Validation of second order system approximation
s=tf('s');M = (98.71*(s+0.6))/(s*(s+2.5)*(s+4.5)*(s+7) );F=feedback(M,1);pole(F)
ans =
-9.5760
-2.0229 + 3.5020i
-2.0229 - 3.5020i
-0.3781
Pole and zero dont cancel each other, second order approximation is not valid. We have to
simulate compensated system to make sure all requirements have been met.
VIII.Plot step responses for uncompensated and compensated system.
s=tf('s');G=101/((s+2.5)*(s+4.5)*(s+7));F1=feedback(G,1);H=(98.7*(s+0.6))/(s*(s+2.5)*(s+4.5)*(s+7));
F2=feedback(H,1);step(F1,F2)
-
7/27/2019 PI&PD Controller Sample Problem
7/28
IX.
Uncompensated Simulation Pi-Compensated Simulation
TF, G(s)
H(s)
()
( . 5)( .5)( )
()
( .)
( .5)( . 5)(
Dom. Poles -2.15 j3.72 -2.02 j3.5
Gain, K 101 98.7
0.5 0.5
%OS 16.3 14.4 16.3
Ts 1.95 1.95 9.75 8.06
Tp 0.962 0.962 4.42 >16
Kp 1.28
e 0.44 0
Other Poles -9.6988 -0.3781
Zeroes None -0.6
Comments Second-order approx.
Step Response
Time (seconds)
Amplitude
0 2 4 6 8 10 12 14 160
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
System: F2
Settling Time (seconds): 8.06
System: F1
Settling Time (seconds): 1.95
System: F1
Peak amplitude: 0.643
Overshoot (%): 14.4
At time (seconds): 0.962
-
7/27/2019 PI&PD Controller Sample Problem
8/28
not valid
*some values (poles and zeroes etc.) were obtained using MatLab, codes and obtained values can be
found from the preceding process.
Kp
(.5)(.5)() .8
e
K p
.8 .
Ts = 1.95
Kp 9.7(0.6)
0
e
K p
Ts= 5 x 1.95 = 9.75 (sec)
dnew 4
Ts(new) . (sec)
dnew .n .
Tp
d
. .
-
7/27/2019 PI&PD Controller Sample Problem
9/28
Problem 2
Solution
I.
s=tf('s');G=1/(s*(s+15)*(s+6));rlocus(G);grid on
II
-60 -50 -40 -30 -20 -10 0 10 20-40
-30
-20
-10
0
10
20
30
400.160.340.50.640.76
0.86
0.94
0.985
0.160.340.50.640.760.86
0.94
0.985
1020304050
Root Locus
Real Axis (seconds -1)
ImaginaryAxis(seconds-1)
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seconds-1)
-2.06 -2.05 -2.04 -2.03 -2.02 -2.01 -2 -1.99
3.93
3.94
3.95
3.96
3.97
3.98
3.99
4
System: G
Gain: 338
Pole: -2.03 + 3.96i
Damping: 0.456
Overshoot (%): 20
Frequency (rad/s): 4.45
0.4460.4490.4510.4530.45658
0.46
0.463
4.41
4.42
4.43
4.44
4.45
4.46
.
-
7/27/2019 PI&PD Controller Sample Problem
10/28
K = 388
Check the third pole for K=101, closed loop TF:
M(s) =3
(:1)(:6)
s=tf('s');G=388/(s*(s+15)*(s+6));F=feedback(G,1);pole(F)
ans =
-16.8746
-2.0627 + 4.0163i
-2.0627 - 4.0163i
The third pole s = -16.8746 is twelve times farther from the j-axis than the dominant poles, so the
approximation is valid and we can use the peak time.
III. Peak time of uncompensated system is
Tp =
d
3.96 . (sec)
We need to reduce settling time by1
2so;
Tp (new) .
.5 (sec)
IV. Desired location for the compensated poles:
Imaginary part dnew
()7.95
Real part dnew dnew
n.8
.
Desired compensated poles:
-
7/27/2019 PI&PD Controller Sample Problem
11/28
V. System with PD compensator looks like:
We need to find gain K and zero z. To find location of zero se use an angle criteria:
-16 -14 -12 -10 -8 -6 -4 -2 0 2
-2
0
2
4
6
8
10
12
14
16 0.160.340.50.64
0.76
0.86
0.94
0.985
0.985
246810121416
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(second
s-1)
116.74deg
-
7/27/2019 PI&PD Controller Sample Problem
12/28
-16 -14 -12 -10 -8 -6 -4 -2 0 2
-2
0
2
4
6
8
10
12
14
16 0.160.340.50.64
0.76
0.86
0.94
0.985
0.985
246810121416
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seco
nds-1)
116.74deg
-
7/27/2019 PI&PD Controller Sample Problem
13/28
VI. Value of PD Compensator
s=tf('s');G=(388*(s+10.86))/(s*(s+15)*(s+6));rlocus(G);grid on
K=92.6
VII Designed PD Compensator
Gc(s) = 92.6(s+10.86)
K1 = 1000.56
K2= 92.6
-4.06 -4.05 -4.04 -4.03 -4.02 -4.01 -4
7.75
7.8
7.85
7.9
7.95
8
System: G
Gain: 92.6
Pole: -4.03 + 7.85i
Damping: 0.456
Overshoot (%): 20
Frequency (rad/s): 8.83
0.4470.4490.452
0.454
0.456
0.458
0.461
0.463
8.7
8.75
8.8
8.85
8.9
8.95
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
14/28
VIII Validation of secnd order system approximation
s=tf('s');G=(92.6*(s+10.86))/(s*(s+15)*(s+6));F=feedback(G,1);pole(F)
ans =
-4.7845 +18.5937i
-4.7845 -18.5937i
-11.4311
Second order system approximation is not valid.
IX Step responses for uncompensated and compensated system
s=tf('s');G=388/(s*(s+15)*(s+6));F2=feedback(G,1);H=(92.6*(s+10.86))/(s*(s+15)*(s+6));F1=feedback(H,1);step(F1,F2)
Step Response
Time (seconds)
A
mplitude
0 0.5 1 1.5 2 2.5 3 3.50
0.2
0.4
0.6
0.8
1
1.2
1.4
System: F2
Settling Time (seconds): 1.82
System: F1
Settling Time (seconds): 0.936
System: F2
Peak amplitude: 1.23
Overshoot (%): 23
At time (seconds): 0.792
System: F1
Peak amplitude: 1.22
Overshoot (%): 22
At time (seconds): 0.388
-
7/27/2019 PI&PD Controller Sample Problem
15/28
*F1 Compensated
*F2 Uncompensated
X
Uncompensated Simulation PD-Compensated Simulation
TF, G(s) H(s) G(s)=
(:1)(:6) G(s)=
(:10.6)
(:1)(:6)
Dominant Poles -2.03 j3.96 -4.07 j7.95
Gain, K 338 92.7
0.45 0.45
%OS 20% 23% 20% 22
Ts 1.97 1.82 0.983 0.936
Tp 0.79 0.79 0.395 0.388
Kv 3.76 11.19
e 0.27 0.09
Other Poles -16.8491 -12.8844
Zeroes none -10.86
Comments 2ndis valid 2ndis not valid
Kv 8
5() .
e
Kv
.
.
Tp
d
. .
Ts
d
. .
-
7/27/2019 PI&PD Controller Sample Problem
16/28
Kv .(.8)
5() .
e
Kv
. .
Tp Tp
.
.5
Tp
d
d
Tp
.5 .5
d d
n .8 .
Ts
d
. .8
-
7/27/2019 PI&PD Controller Sample Problem
17/28
Problem 3
Solution
PD Controller
I
s=tf('s');G=1/(s*(s+4)*(s+6)*(s+10));rlocus(G)
grid on
II
-25 -20 -15 -10 -5 0 5 10 15-20
-15
-10
-5
0
5
10
15
200.160.340.50.640.76
0.86
0.94
0.985
0.160.340.50.640.76
0.86
0.94
0.985
5101520
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
18/28
K=413
Check the third pole for K=413, closed loop TF:
M(s) =413
(:4)(:6)(:10)
s=tf('s');M = 413/(s*(s+4)*(s+6)*(s+10));F = feedback(M,1);pole(F)
ans =
-9.1188 + 1.9910i
-9.1188 - 1.9910i
-0.8812 + 1.9910i
-0.8812 - 1.9910i
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seco
nds-1)
-0.895 -0.89 -0.885 -0.88 -0.875 -0.87 -0.865 -0.861.975
1.98
1.985
1.99
1.995
2
2.005
2.01
System: G
Gain: 413
Pole: -0.878 + 1.99iDamping: 0.404
Overshoot (%): 25
Frequency (rad/s): 2.18
0.3940.3960.3990.4010.4040.406
0.408
0.411
2.15
2.16
2.17
2.17
2.17
2.18
2.19
-
7/27/2019 PI&PD Controller Sample Problem
19/28
The approximation of the system to be a second order is valid.
III Settling time of uncompensated system
Ts 4
4
0.7 .5 (sec)
Ts 2 (sec)
IV. Desired location for the compensated poles:
Real part dnew 4
Ts
Imaginary part dnew n. .5
V. System with PD compensator looks like:
-7 -6 -5 -4 -3 -2 -1 0 1 2
-2
-1
0
1
2
3
4
5
6
7 0.160.340.50.64
0.76
0.86
0.94
0.985
0.985
1
2
3
4
5
6
7
1
2
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
20/28
Location of zero
VI Gain(K) of th PD Compensator
s=tf('s');M = (s+2.96)/(s*(s+4)*(s+6)*(s+10));rlocus(M)grid on
-7 -6 -5 -4 -3 -2 -1 0 1 2
-2
-1
0
1
2
3
4
5
6
7 0.160.340.50.64
0.76
0.86
0.94
0.985
0.985
1
2
3
4
5
6
7
1
2
Root Locus
Real Axis (seconds-1)
ImaginaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
21/28
K=294
VII Designed PD Compensator
Gc(s) = 294(s+2.96)
K1 = 870.24
K2= 294
VIII Validation of the second order assumption
ans =
s=tf('s');M = (294*(s+2.96))/(s*(s+4)*(s+6)*(s+10));F=feedback(M,1);pole(F)
-2.06 -2.04 -2.02 -2 -1.98 -1.96 -1.94 -1.92
4.46
4.48
4.5
4.52
4.54
4.56
4.58
4.6
4.62
4.64
System: M
Gain: 294
Pole: -2 + 4.53i
Damping: 0.404Overshoot (%): 25
Frequency ( rad/s): 4.95
0.3840.3890.3940.3990.4040.409
0.413
0.418
4.85
4.88
4.9
4.92
4.95
4.98
5
Root Locus
Real Axis (seconds -1)
ImaginaryAxis(seconds-1)
-
7/27/2019 PI&PD Controller Sample Problem
22/28
-13.3382
-1.9991 + 4.5275i
-1.9991 - 4.5275i
-2.6637
Second order system approximation is valid.
IX Step responses for uncompensated and compensated system
Upon graphing the step responses, Ts=1.78 (sec) which satisfies our desired conditions (T s )
and (overshoot response 5%).
Step Response
Time (seconds)
Amplitude
0 1 2 3 4 5 6 70
0.2
0.4
0.6
0.8
1
1.2
1.4System: F
Peak amplitude: 1.19
Overshoot (%): 18.7
At time (seconds): 0.796
System: H
Peak amplitude: 1.24
Overshoot (%): 23.6
At time (seconds): 1.82
System: F
Settling Time (seconds): 1.78
System: HSettling Time (seconds): 4.07
-
7/27/2019 PI&PD Controller Sample Problem
23/28
PI Controller
Test point 1
s=tf('s');G=((s+0.1)*(s+2.96))/(s^2*(s+4)*(s+6)*(s+10));rlocus(G)grid on
K = 292
Taking the step response using the obtained value of K
s=tf('s');G=(292*(s+2.96)*(s+0.1))/(s^2*(s+4)*(s+6)*(s+10));F=feedback(G,1);step(F)
Ts > 3.5 (sec)
Test point 2
s=tf('s');G=((s+0.3)*(s+2.96))/(s^2*(s+4)*(s+6)*(s+10));rlocus(G)grid on
K=286
-
7/27/2019 PI&PD Controller Sample Problem
24/28
Taking the step response using the obtained value of K
s=tf('s');G=(286*(s+2.96)*(s+0.3))/(s^2*(s+4)*(s+6)*(s+10));F=feedback(G,1);step(F)
Ts = 5.05 (sec)
Based on the first to test points as we increse the value of zero the value of Ts also increases, which
we should avoid in order to achieve the desired parameter. So this time we try to adjust the decimal
point backwards.
Test point 3
s=tf('s');G=((s+0.003)*(s+2.96))/(s^2*(s+4)*(s+6)*(s+10));rlocus(G)grid on
K=294
Taking the step response using the obtained value of K
s=tf('s');G=(294*(s+2.96)*(s+0.003))/(s^2*(s+4)*(s+6)*(s+10));F=feedback(G,1);step(F)
Ts = 1.78 (sec)
Ts , Therefore at this location of zero is valid for our PI design.
Designed PID Compensator
K1 + K2s+3
=
294(:2.96)(:0.003)
= 871.122+294s++
2.61
-
7/27/2019 PI&PD Controller Sample Problem
25/28
Validation of second order system approximation
s=tf('s');G=(294*(s+0.003)*(s+2.96))/(s^2*(s+4)*(s+6)*(s+10));F=feedback(G,1);pole(F)
ans =
-13.3378
-1.9980 + 4.5262i
-1.9980 - 4.5262i
-2.6632
-0.0030
Approximation is valid.
Plot of responses (Uncompensated, PD, PID)
s=tf('s');G=(294*(s+0.003)*(s+2.96))/(s^2*(s+4)*(s+6)*(s+10));PID=feedback(G,1);H= (413)/(s*(s+4)*(s+6)*(s+10));U=feedback(H,1);J=(294*(s+2.96))/(s*(s+4)*(s+6)*(s+10));PD=feedback(J,1);step(U,PD, PID)
-
7/27/2019 PI&PD Controller Sample Problem
26/28
Computation of some parameters:
Kp =
es = 0
Kv = 413/(4)(6)(10) = 1.72
er =1/1.72 = 0.58
Kp=
es = 0
Kv= 294(2.96)/(4)(6)(10) = 3.63
er = 1/3.63 = 0.275
Mark Jayson Mercado()
20128048
Step Response
Time (seconds)
Amplitude
0 1 2 3 4 5 6 70
0.2
0.4
0.6
0.8
1
1.2
1.4
System: U
Settling Time (seconds): 4.07
System: PID
Settling Time (seconds): 1.78
System: U
Peak amplitude: 1.24
Overshoot (%): 23.6
At time (seconds): 1.82
System: PID
Peak amplitude: 1.19
Overshoot (%): 18.8
At time (seconds): 0.796
System: PD
Peak amplitude: 1.19
Overshoot (%): 18.7
At time (seconds): 0.796
System: PID
Time (seconds): 1.88
Amplitude: 0.995
-
7/27/2019 PI&PD Controller Sample Problem
27/28
Control Engineering()
Homework 8
-
7/27/2019 PI&PD Controller Sample Problem
28/28