Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

CP9.

2 (a)
Given that

G ( s )=

5
s+5

Matlab code
s=tf('s');
G=s/(s+5);
nyquist(G)
Output

Figure 1: plot for CP9.2 (a)

CP9.2 (b)
Given that

G ( s )=

50
s +10 s+2 5
2

Matlab code
s=tf('s');
G=50/(s^2+10*s+25);
nyquist(G)
Output

Figure 2: plot for CP9.2 (b)

CP9.2 (c)
Given that

G ( s )=

15
s +3 s2 +3 s+1
3

Matlab code
s=tf('s');
G=15/(s^3+3*s^2+3*s+1);
nyquist(G)
Output

Figure 3 : plot for CP9.2 (c)

CP9.4
Using hit and trial we have selected K=15 for which phase margin is 40 degree.
Matlab code
s=tf('s');
k=15;
G=k/(s+12);
Td=[0:0.01:0.3];
for j=1:length(Td)
[magitude,phase,w]=bode(G);
ph(1:length(phase))=phase(1,1,:); ph=ph';
ph2=ph-w*Td(j)*180/pi;
[GainMargin,PhaseMargin,Wcg,Wcp]=margin(magitude,ph2,w);
clear ph ph2
PMo(j)=PhaseMargin;
end
plot(Td,PMo), grid
xlabel('Time delay (sec)')
ylabel('Phase margin (deg)')
Output

Figure 4: Plot for Cp9.4

CP9.6
Using nominal value of b0=0.5 we get
2

0.5(s 2500)
G p=
2
(s3)(s +50 s+1000)
And the PI controller transfer function is

Gc =

10(s +3)
s

Matlab code
s=tf('s');
Gp=-0.5*(s^2-2500)/((s-3)*(s^2+50*s+1000));
Gc=10*(s+3)/s;
G=series(Gp,Gc)
bode(G)

[magitude,phase,w] = bode(G);
[GainMargin,PhaseMargin,wg,wc] = margin(magitude,phase,w)
Output
G=
-5 s^3 - 15 s^2 + 12500 s + 37500
--------------------------------s^4 + 47 s^3 + 850 s^2 - 3000 s
Continuous-time transfer function.

GainMargin = 2.2343
PhaseMargin = 26.1883
wg = 26.3299
wc = 2.6468

Figure 5 : Plot for Cp9.6


Using routh Hurwitz criterion on

s 4 +42s3 +835s2 +9500 s+(37500+b0 )


It is found that the range of b0 is 0.14 < b0 < 1.1.

CP9.8
Matlab code
A=[0 1;-1 -15];
B=[0;30];
C=[8 0];
D=[0];
[num,den]=ss2tf(A,B,C,D)
G=tf(num,den)
nyquist(G)
Output
G=
240
-------------s^2 + 15 s + 1

Figure 6 : Nyquist plot for CP9.8

CP9.10.
Matlab Code
s=tf('s');
% Part a
t=0;
Gt=exp(-t*s);
Gp=1/(s+1);
Gh=10/s;
G=Gt*Gp*Gh;
nyquist(G)
%Part b
t=0.05;
Gt=exp(-t*s);
Gp=1/(s+1);
Gh=10/s;
G=Gt*Gp*Gh
[GM,PM,w]=margin(G)
Output

Figure 7 : Nyquist plot for CP9.10 (a)


(b) At T=0.05s

PM = 9.1286

You might also like