You are on page 1of 15

ASSIGNMENT - 10

SHYAM SHANKAR H R
EE15B127

November 9, 2017

Question 1
K
a) G(s) = (s+4)(s+10)(s+15) for a gain margin 10dB

Solution:

The bode plot of the transfer function (for K=1) is shown below:

1
Figure 1: Bode plot of G(s) = (s+4)(s+10)(s+15)

From the plot, the gain margin, i.e., 1/(magnitude corresponding to phase −1800 ) is 76.5 (in decibel scale).
Required phase margin: 10 dB.
So, the magnitude plot needs to be shifted up by 76.5dB - 10dB = 66.5dB. This corresponds to a magnitude
factor of 10(66.5/20) = 2113.489
Thus, the required factor, K is obtained as 2118.489
2118.489
∴Compensated system: G(s) = (s+4)(s+10)(s+15) .
A better design will result if we find gain margin value programmatically. The following matlab code
computes the required compensated system:

close all;
s = tf('s');
G = 1/((s+4)*(s+10)*(s+15));
figure;
bode(G);
[Gm,Pm,Wgm,Wpm] = margin(G);
k1 = 20*log10(Gm); %gain margin in decibels
k = 10^((k1-10)/20);

1
figure;
bode(k*G);

Here we find the phase margin is actually 76.4574dB. k is obtained to be 2103.1


The bode plot of the compensated system is shown below:

2103.1
Figure 2: Bode plot of G(s) = (s+4)(s+10)(s+15)

From the plot we see that the gain margin is exactly 10dB as desired.

K
b) G(s) = (s)(s+4)(s+10) for a phase margin 400 .

Solution:

The bode plot of the transfer function (for K=1) is shown below:

1
Figure 3: Bode plot of G(s) = (s)(s+4)(s+10)

2
From the plot, the phase margin = 89.50 . Since the required phase is 400 , the gain crossover frequency
should correspond to a phase of 1800 − 400 = 1400 . The corresponding frequency is found to be 27.4 rad/s. The
magnitude corresponding to it is -42.9dB. So, by shifting the plot up by 42.9dB, we can achieve the required
phase margin. 42.9dB corresponds to a magnitude of 10(42.9/20) = 139.637 = k.
139.637
∴Compensated system: G(s) = (s)(s+4)(s+10) .
The following matlab code computes the required compensated system:

close all;
s = tf('s');
G = 1/((s)*(s+4)*(s+10));
figure;
bode(G);
[Gm,Pm,Wgm,Wpm] = margin(G);
k = 10^(42.9/20);
figure;
bode(k*G);

The bode plot of the compensated system is shown below:

139.637
Figure 4: Bode plot of G(s) = (s)(s+4)(s+10) .

From the plot we see that the phase margin is 39.90 ≈ 400 as desired.

K(s+2)
c) G(s) = (s)(s+4)(s+6)(s+10) for a gain crossover frequency ωgc = 1rad/s.

Solution:

The bode plot of the transfer function (for K=1) is shown below:

3
(s+2)
Figure 5: Bode plot of G(s) = (s)(s+4)(s+6)(s+10)

From the plot, the gain crossover frequency is about 0.00819 rad/s. Since the required gain crossover
frequency is 1 rad/s. So, the magnitude plot needs to be shifted up by the value at frequency 1 rad/s, which
is 41dB. This corresponds to multiplication by a factor of 10(41/20) , which is the value of K required. Thus the
value of K is found to be 112.2
112.2(s+2)
∴Compensated system: G(s) = (s)(s+4)(s+6)(s+10) .
The following matlab code computes the required compensated system:

close all;
s = tf('s');
G = 1*(s+2)/((s)*(s+4)*(s+6)*(s+10));
figure;
bode(G);
hold on;
k = 10^(41/20);
figure;
bode(k*G);

The bode plot of the compensated system is shown below:

112.2(s+2)
Figure 6: Bode plot of G(s) (s)(s+4)(s+6)(s+10) .

From the plot we see that the gain crossover frequency 0.985 rad/s ≈ 1 rad/s as desired.

4
Question 2
K
Consider a unity feedback closed loop system with G(s) = s(0.1s+1)(s+1) . Design a lead compensator
such that phase margin is 450 , gain margin not less than 8dB, and the static velocity error
constant Kv is 4sec−1 . Plot unit step and unit ramp response curves of the compensated system.

Solution:

The bode plot of the transfer function (for K=1) is shown below:

(1)
Figure 7: Bode plot of G(s) = (s)(0.1s+1)(s+1)

The gain margin is 20.8dB and phase margin is 47.40 . Before manipulating them, we should adjust the
steady state error constant (velocity constant) Kv . The required value of Kv is 4sec−1 . The present value of Kv
is lims→0 s ∗ G(s) = 1. So, the value of the constant, K should be 4.
(4)
∴New transfer function, G1(s) = (s)(0.1s+1)(s+1) . The bode plot of this function is shown below:

(4)
Figure 8: Bode plot of G1(s) = (s)(0.1s+1)(s+1)

Now, the gain margin is 8.79dB and phase margin is 17.70 . The gain margin is almost near the desired
value (>8dB). So, let’s adjust the phase margin. We need to increase the phase margin by 450 − 17.70 = 27.30 .

5
We can use a lead compensator to do it. As a buffer/safelty margin we add 100 more to it. So, the desired
(1+sT )
phase addition is φm = 37.30 . If we model our lead compensator as Gc(s) = (1+sαT ) . Here, α is given by
1−sin(φm )
1+sin(φm ) = 0.24534.
Principally, we may place the peak of the compensator phase response at ωgc = 1.185 rad/s. The magni-
tude here rises up by 20log( √1α ) = 6.102dB. So we can position the peak at that point where the magnitude is
-6.102dB (the compensator rises it up by 6.102dB, to make it the gain crossover frequency). This frequency,
1
ωx is found to be around 2.71 rad/s. Now, using ωgc = T √ α
, T is found to be 0.745s.
4 (1+0.745s)
∴The compensated transfer function is of the form G2(s) = s(0.1s+1)(s+1) (1+18277s) .
The bode plot of the compensated system is shown below:

4 (1+0.745s)
Figure 9: Bode plot of G1(s) = s(0.1s+1)(s+1) (1+18277s) .

From the plot, we observe that the gain margin is 13.4dB (> 8dB) as required; and phase margin = 42.50 ≈450
as desired. Also, the Kv value is maintained at 4sec−1 .
Step response of the system:

4 (1+0.745s)
Figure 10: Step response of closed loop system with G1(s) = s(0.1s+1)(s+1) (1+18277s) .

Ramp response of the system:

6
4 (1+0.745s)
Figure 11: Ramp response of closed loop system with G1(s) = s(0.1s+1)(s+1) (1+18277s) .

Question 5
An electric ventricular assist device (EVAD) that helps pump blood concurrently to a defective
natural heart in sick patient can be shown to have a transfer function G(s) as shown in figure.
The input, Em (s), is the motor’s armature voltage, and the output is Pao (s), the aortic blood
pressure. The EVAD will be controlled in the closed loop configuration shown in figure 1. Design
a phase lag compensator to achieve a tenfold improvement in the steady state error to step
inputs without appreciably affecting the transient response of the uncompensated system. Plot
unit step response curves of the compensated system.

Figure 12: Control of EVAD system

Solution:
1361
The transfer function of the given system is: G(s) = s2 +69s+70.85 . The bode plot of the function is obtained as
shown:

7
1361
Figure 13: Bode plot of G(s) = s2 +69s+70.85 .

To preserve the transient response, we should maintain the initial values of phase margin and gain
crossover frequency, i.e, 77.30 and 19.2 rad/s respectively. We are required to improve the steady state
error, by a factor of 10 times. It means that we should employ proportional control with K = 10. New transfer
13610
function: G1(s) = s2 +69s+70.85 . The bode plot of this function is as shown:

13610
Figure 14: Bode plot of G1(s) = s2 +69s+70.85 .

Now, the phase margin has reduced to 32.90 and gain crossover frequency increased to 107 rad/s. We can
(1+sT )
bring them to original state using a lag compensator. Gc(s) = (1+sβT ).

First, we need to find the magnitude at the frequency for which phase is 1800 -77.30 =102.70 . From the plot
(as shown below), this magnitude is found to be 19.9dB. The lag compensator should give an attenuation =
19.9dB at this point, to make 19.4 rad/s the crossover frequency.

8
13610
Figure 15: Bode plot of G1(s) = s2 +69s+70.85 .

The attenuation provided by lag compensator is 20log( β1 ) = -19.9dB. ⇒β= 9.885. The crossover frequency
should be sufficiently far away from T1 of the compensator, to ensure complete attenuation. We can take T1 =
(1+1.94s)
0.1*19.4 rad/s = 1.94 rad/s. So, the lag compensator would be Gc1(s) = (1+19.178s) .
13610 (1+1.94s)
The net system would be G1(s)*Gc1(s) = s2 +69s+70.85 (1+19.178s) . The bode plot of the system is shown below:

13610 (1+1.94s)
Figure 16: Bode plot of G1(s)Gc1(s) = s2 +69s+70.85 (1+19.178s) .

The gain crossover frequency = 19.5 rad/s ≈19.2 rad/s as in original system. The phase margin is 75.70 ≈
77.30 as in the original system.
The unit step response of the system is given as follows:

9
13610 (1+1.94s)
Figure 17: Step response of closed loop system of G1(s)Gc1(s) = s2 +69s+70.85 (1+19.178s) .

Question 6
The transfer function from applied force to arm displacement for the arm of a hard disk drive
has been identified as G(s) as shown in fig. The position of the arm will be controlled using the
unity feedback gain system. Design a lead compensator to achieve closed loop stability with a
transient response of 16% overshoot and a settling time of 2 milli seconds for a step input. Plot
unit step response curves of the compensated system.

Figure 18: Control of hard disk drive arm

Solution:
105
The transfer function of the given system is: G(s) = 3s2 . The bode plot of the function is obtained as shown:

10
105
Figure 19: Bode plot of G(s) = 3s2 .

The phase margin is 00 and gain margin is 0dB. The specifications are 16% OverShoot and 2ms settling
time.
√−ζπ
Using %OS = e 1−ζ2 × 100%, we get ζ= 0.504.
4
Using Ts = ζωn ,
we get ωn = 3969.293 rad/s
Desired phase response is given by
!
−1 2ζ
γ = tan p√
1 + 4ζ4 − 2ζ2

qp
ωgc = ωn 1 + ζ4 − 2ζ2

We find, γ = 52.13790 and ωgc = 3109.7 rad/s. We shall take desired phase rise as γ+100 = 62.13790 .
(1+sT ) 1−sin(φm )
If we model our lead compensator as Gc(s) = (1+sαT ) . Here, α is given by 1+sin(φm ) = 0.0615. Principally,
we may place the peak of the compensator phase response at ωgc = 3109.7 rad/s. The magnitude here rises
up by 20log( √1α ) = 12.1092dB. So we can position the peak at that point where the magnitude is -12.1092dB
(the compensator rises it up by 12.1092dB, to make it the gain crossover frequency). This frequency, ωx is
1
found to be around 367 rad/s. Now, using ωgc = T √ α
, T is found to be 0.0110s.
105 (1+0.011s)
∴The compensated transfer function is of the form G2(s) = 3s2 (1+0.0006765s) .
The bode plot of the compensated system is shown below:

11
105 (1+0.011s)
Figure 20: Bode plot of G2(s) = 3s2 (1+0.0006765s) .

The unit step response of the system is shown below:

105 (1+0.011s)
Figure 21: Step response of closed loop system of G2(s) = 3s2 (1+0.0006765s) .

The %overshoot obtained is 17.20 and settling time is 0.028s.

Question 7
The remote robot manipulator’s block diagram is shown below:

12
Figure 22: Control of remote robot manipulator

Given data:

• Delay constant of transmission: T = 1.28s


• Time constant of manipulator: T = 0.25s

1. Set the gain K so that the system has a phase margin of approximately 30 . Evaluate the
percentage steady-state error for this system for a step input.
2. To reduce the steady-state error for a position command input to 5% and to achieve a phase
margin of approximately 50 add a lag compensation network in cascade with K. Plot the
step response.

Solution:
−2sT
a) The transfer function of the given system is: G(s)H(s) = K esT +1 . The bode plot of this system is shown:

−2sT
Figure 23: Bode plot system of G(s)H(s) = 1 esT +1 .

The desired phase margin = 300 . So phase at crossover = −1500 .


180 −1 0
 ω) − tan (ωT ) = 150 ⇒ω= 0.93313 rad/s.
π (−2T
e−sT 1
sT +1 = 1.026 ⇒K = 1.02684
ω=0.93313
−2sT
Therefore, the system becomes: G(s)H(s) = 1.02684 esT +1 . The bode plot for this system is shown below:

13
−2sT
Figure 24: Bode plot of G(s)H(s) = 1.02684 esT +1 .

The phase margin is 300 as desired.


Steady state error constant = KP
1
Steady state error = 1+Kp
KP = K
1
Steady state error = 1+K P
× 100% = 49.33%
The step response of this system is as shown:

−2sT
Figure 25: Step response of closed loop system of G(s)H(s) = 1.02684 esT +1 .

1
b) Reduce steady state error to 5%, phase 500 . Steady state error = 1+KK C
= 0.05⇒Kc =18.50. To make
0
phase margin = 50 , the gain at gain crossover ωgc =0.809 rad/s should be zero. We can add a margin of
about 60 to the desired phase margin, i.e, 560 . The corresponding ωgc =0.768 rad/s.
Magnitude at this ωgc = 25.4dB. The compensator should drop 25.4dB at 0.768 rad/s.
 
1
20log = −25.4
β

β = 18.6597

14
1
We shall set T at 0.1ωgc . ⇒T = 13.0276s

240.9s + 18.5
⇒ Gc =
243s + 1
1
A better response can be obtained by taking T = 0.048ω gc
. Here, phase margin will be 50.10 .
The bode plot of the compensated system and its step response are obtained as shown below:

Figure 26: Step response of closed loop system of compensated system

15

You might also like