Professional Documents
Culture Documents
Problem 1 Solution I: S TF G 1/ ( (s+2.5) (s+4.5) (s+7) ) Rlocus (G) Grid
Problem 1 Solution I: S TF G 1/ ( (s+2.5) (s+4.5) (s+7) ) Rlocus (G) Grid
Solution
I
s=tf('s');
G=1/((s+2.5)*(s+4.5)*(s+7));
rlocus(G);
grid on
Root Locus
15
0.7
0.82
0.56
0.42
0.28
0.14
10
0.91
5 0.975
20
0
17.5
15
12.5
10
7.5
2.5
-5 0.975
0.91
-10
0.82
-15
-20
0.7
0.56
-15
0.42
-10
0.28
0.14
-5
II
Root Locus
0.503
0.5
0.497
0.493
0.49
3.76
3.75
4.3
0.506
3.74
3.73
4.28
3.72
3.71
System: G
Gain: 101
Pole: -2.15 + 3.72i
Damping: 0.5
Overshoot (%): 16.3
Frequency (rad/s): 4.3
0.51
3.7
3.69
3.68
4.26
4.24
0.512
3.67
4.22
3.66
-2.19
-2.18
-2.17
-2.16
-2.15
-2.14
-2.13
-2.12
-2.11
K = 101
Check the third pole for K=101, closed loop TF:
M(s) =
101
(:2.5)(:4.5)(: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 NOT greater 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.
s=tf('s');
M = 101/((s+2.5)*(s+4.5)*(s+7));
F = feedback(M,1);
step(F)
Step Response
0.7
System: F
Settling Time (seconds): 1.95
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0.5
1.5
2.5
Time (seconds)
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
Imaginary part
dnew
4
Ts(new)
.
n
(sec)
.
Root Locus
6
0.56
0.42
0.28
0.14
0.7
4
0.82
3
0.91
0.975
0.975
-1
-5
-4
-3
-2
-1
-1
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.5)(:4.5)(: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)
Test point 2
M(s) =
(:0.5)
(:2.5)(:4.5)(: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.5)(:4.5)(: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) =
98.7(s:0.6)
Gc(s) = K1 +
Therefore
K1 = 98.7
K2 = 59.22
K2
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)
Step Response
1
System: F2
Settling Time (seconds): 8.06
0.9
System: F1
Peak amplitude: 0.643
Overshoot (%): 14.4
At time (seconds): 0.962
System: F1
Settling Time (seconds): 1.95
0.8
0.7
Amplitude
0.6
0.5
0.4
0.3
0.2
0.1
0
10
12
14
16
Time (seconds)
IX.
Uncompensated
TF, G(s)H(s)
()
.5)(
Simulation
.5)(
Pi-Compensated
()
(
.5)(
Simulation
. )
.5)(
Dom. Poles
-2.15 j 3.72
-2.02 j 3.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
0.44
Other Poles
-9.6988
-0.3781
Zeroes
None
-0.6
Comments
Second-order approx.
not valid
*some values (poles and zeroes etc.) were obtained using MatLab, codes and obtained values can be
found from the preceding process.
Kp
e
. 8
( .5)( .5)( )
Kp
. 8
Ts = 1.95
Kp
e
98.7(0.6)
Kp
dnew
dnew
Tp
Ts(new)
(sec)
.
.
Problem 2
Solution
I.
s=tf('s');
G=1/(s*(s+15)*(s+6));
rlocus(G);
grid on
Root Locus
40
0.76
0.86
0.64
0.5
0.34
0.16
30
20 0.94
10 0.985
60
0
50
40
30
20
10
-10 0.985
-20 0.94
-30
0.86
-40
-60
0.76
-50
0.64
-40
0.5
-30
0.34
-20
0.16
-10
10
20
II
Root Locus
4.47
0.458
4
0.456
0.453
0.451
0.449
0.446
4.46
3.99
4.45
3.98
System: G
Gain: 338
Pole: -2.03 + 3.96i
Damping: 0.456
Overshoot (%): 20
Frequency (rad/s): 4.45
0.46
3.97
4.44
3.96
4.43
3.95 0.463
4.42
3.94
4.41
3.93
-2.06
-2.05
-2.04
-2.03
-2.02
-2.01
-1
-2
-1.99
K = 388
Check the third pole for K=101, closed loop TF:
M(s) =
388
(:15)(: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 =
3.96
1
2
(sec)
5 (sec)
so;
.
Tp (new)
dnew
Real part
dnew
Tp(new)
dnew
n
.8
7.95
Root Locus
16
0.64
0.5
0.34
0.16
14 0.76
12
10 0.86
8
6 0.94
4
0.985
116.74deg
2
0
16
14
12
10
-14
-12
-10
-8
-6
-4
-2
-2
0.985
-16
We need to find gain K and zero z. To find location of zero se use an angle criteria:
Root Locus
16
0.64
0.5
0.34
0.16
14 0.76
12
10 0.86
8
6 0.94
4
0.985
116.74deg
2
0
16
14
12
10
-14
-12
-10
-8
-6
-4
-2
-2
0.985
-16
-1
Root Locus
0.452
0.449
0.447
8.95
8
0.454
8.9
7.95
System: G
Gain: 92.6
Pole: -4.03 + 7.85i
Damping: 0.456
Overshoot (%): 20
Frequency (rad/s): 8.83
0.456
7.9
0.458
8.85
7.85
8.8
0.461
7.8
8.75
0.463
7.75
8.7
-4.06
-4.05
-4.04
-4.03
-4.02
K=92.6
-4.01
-4
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)
System: F1
Step Response
Peak amplitude: 1.22
Overshoot (%): 22
At time (seconds): 0.388
1.4
1.2
System: F2
System: F2
Peak amplitude: 1.23
Settling Time (seconds): 1.82
Overshoot (%): 23
At time (seconds): 0.792
System: F1
Settling Time (seconds): 0.936
Amplitude
0.8
0.6
0.4
0.2
0.5
1.5
Time (seconds)
2.5
3.5
*F1 Compensated
*F2 Uncompensated
Uncompensated
G(s)=
Dominant Poles
Simulation
K
(:15)(:6)
PD-Compensated
G(s)=
Simulation
K(s:10.86)
(:15)(:6)
-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
0.27
0.09
-16.8491
-12.8844
none
-10.86
2nd is valid
Other Poles
Zeroes
Comments
8
5( )
Kv
e
Tp
Ts
Kv
.
.
d
d
.
.
.
.
. ( .8 )
5( )
Kv
e
Tp
Kv
Tp
Tp
d
Ts
Tp
d
n .8
d
. 5
5
.
. 8
Problem 3
Solution
PD Controller
I
s=tf('s');
G=1/(s*(s+4)*(s+6)*(s+10));
rlocus(G)
grid on
Root Locus
20
0.76
0.64
0.5
0.34
0.16
15 0.86
10
0.94
0.985
25
0
-5
-10
20
15
10
0.985
0.94
-15 0.86
0.76
-20
-25
0.64
-20
-15
0.5
0.34
-10
0.16
-5
II
10
15
Root Locus
0.406
0.404
0.401
0.399
0.396
0.394
2.01
2.19
2.005
2.18
0.408
System: G
Gain: 413
Pole: -0.878 + 1.99i
Damping: 0.404
Overshoot (%): 25
Frequency (rad/s): 2.18
1.995
2.17
2.17
1.99
2.17
0.411
1.985
2.16
1.98
2.15
1.975
-0.895
-0.89
-0.885
-0.88
-0.875
K=413
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
-0.87
-0.865
-0.86
0.878
.5 (sec)
Ts 2 (sec)
IV. Desired location for the compensated poles:
Real part
dnew
Imaginary part
dnew
4
Ts
.5
Root Locus
0.64
7
6
0.5
0.34
0.16
0.76
6
5
5
Imaginary Axis (seconds-1)
0.86
3
0.94
2
1
0.985
0.985
0
-1
-2
2
-7
-6
-5
-4
-3
-2
-1
-1
Location of zero
Root Locus
0.64
7
6
0.5
0.34
0.16
0.76
6
5
5
Imaginary Axis (seconds-1)
0.86
3
0.94
2
1
0.985
0.985
0
-1
-2
2
-7
-6
-5
-4
-3
-2
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
-1
Root Locus
4.64 0.409
0.404
0.399
0.394
0.389
0.384
5
4.62
4.6
4.98
System: M
Gain: 294
Pole: -2 + 4.53i
Damping: 0.404
Overshoot (%): 25
Frequency (rad/s): 4.95
4.58 0.413
4.56
4.54
4.95
4.92
4.52
4.9
0.418
4.5
4.88
4.48
4.85
4.46
-2.06
-2.04
-2.02
-2
-1.98
K=294
VII Designed PD Compensator
Gc(s) = 294(s+2.96)
K1 = 870.24
K2 = 294
-1.96
-1.94
-1.92
-13.3382
-1.9991 + 4.5275i
-1.9991 - 4.5275i
-2.6637
System: H
Step 1.24
Response
Peak amplitude:
Overshoot (%): 23.6
At time (seconds): 1.82
System: F
1.41.19
Peak amplitude:
Overshoot (%): 18.7
At time (seconds): 0.796
1.2
System: F
Settling Time (seconds): 1.78
1
Amplitude
System: H
Settling Time (seconds): 4.07
0.8
0.6
0.4
0.2
Time (seconds)
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)
K=286
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)
K3
294(:2.96)(:0.003)
= 871.122+294s++
2.61
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)
System: U
Step 1.24
Response
Peak amplitude:
System: PD
1.41.19
Peak amplitude:
Overshoot (%): 18.7
At time (seconds): 0.796
1.2
Amplitude
System: PID
Peak amplitude: 1.19
Overshoot (%):118.8
At time (seconds): 0.796
System: PID
System: U
Settling Time (seconds): 1.78Settling Time (seconds): 4.07
0.8
0.6
0.4
0.2
Time (seconds)
Control Engineering()
Homework 8