B.Divya Sudha 19EE10015 Cs Session 7 Report Given Plots
B.Divya Sudha 19EE10015 Cs Session 7 Report Given Plots
Divya Sudha
19EE10015
CS SESSION 7 Report
Given plots
tf1 =
125
-------
s (s+5)
bode(tf1,{0.01,100000})
grid on
tf2 = zpk([-1,-20],[-10,-3.15-9.4909*i,-3.15+9.4909*i],15.1434)
tf2 =
15.143 (s+1) (s+20)
-------------------------
(s+10) (s^2 + 6.3s + 100)
bode(tf1,{0.01,100000})
grid on
tf1 = zpk([],[0,-5],125.00025)
tf1 =
125
-------
s (s+5)
t = 0:1e-5:1
t =
1.0e-03 *
0 0.0100 0.0200 0.0300 0.0400 0.0500 0.0600 0.0700
func = sin(200*pi*t);
plot(t, func);
title('input function')
xlim([0 0.01])
grid on;
figure
op = lsim(tf1,func,t);
plot(t, op);
title('output')
grid on;
plot(t, op);
xlim([0.99 1])
title('output steady state')
tf2 = zpk([-1,-20],[-10,-3.15-9.4909*i,-3.15+9.4909*i],15.1434)
tf2 =
t = 0:1e-5:1
t =
1.0e-03 *
0 0.0100 0.0200 0.0300 0.0400 0.0500 0.0600 0.0700
func = sin(200*pi*t);
plot(t, func);
title('input function')
xlim([0 0.01])
grid on;
figure
op = lsim(tf2,func,t);
plot(t, op);
title('output')
grid on;
plot(t, op);
xlim([0.99 1])
title('output steady state')
Additional questions
1)
sys =
800 (s+0.5)
-----------------
s (s+2)^2 (s+100)
Gm = 45.3344
Pm = 73.5524
Wcg = 18.7769
Wcp = 2.0569
bode(sys,{0.01,1e5})
grid on
bode(feedback(sys,1),{0.01,1e5})
grid on
from the above transfer function if k=200.985 then the gain margin is 0db
2)
num = [22.5]
num = 22.5000
den =
1.0000 4.9000 12.6000 36.0000
sys = tf(num,den)
sys =
22.5
---------------------------
s^3 + 4.9 s^2 + 12.6 s + 36
bode(sys)
[Gm Pm Wcg Wcp] = margin(sys)
Gm = 1.1445
Pm = 6.0803
Wcg = 3.5500
Wcp = 3.4511
bode(sys,logspace(-2,5))
bode(feedback(sys,1),logspace(-2,5))