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

CP4.1 (M.

File)
%CP4.1
s=tf('s');
% open loop TF
G=12/(s^2+2*s+10);
% closed loop with unity feedback
cl_G=feedback(G,1)
step(cl_G)
Output:
cl_G =
12
-------------s^2 + 2 s + 22

Figure 1 : step response of CP4.1


From step response overshoot (%) =50.4
Final value = 0.545
Error = desired value final value = 1-0.545= 0.455

CP4.2 (M.file)
%CP4.2
s=tf('s');
% open loop TF
G=4/(s^2+2*s+20);
step(G)
Output:

Figure 2 : step response of CP4.2


As from the step response the final value = 0.2
And desired value is 1.
So,
Steady state error = desired value final value = 1-0.2 = 0.8

CP4.3 (M.file)
%CP4.3
s=tf('s');
% for k=10 closed loop TF
G_k10=(5*10)/(s^2+15*s+10);
step(G_k10)
hold all
% for k=200 closed loop TF
G_k200=(5*200)/(s^2+15*s+200);
step(G_k200)
% for k=500 closed loop TF
G_k500=(5*500)/(s^2+15*s+500);
step(G_k500)
legend('K=10','K=200','K=500',-1)
Output:

Figure 3 : Co- plot of step responses for CP4.3


Table: Different parameters at different values of K
K
10
20
0

Overshoot (%) Settling time Steady State Value


0
5.67
5
14
0.409
5

Steady State error (1-final value)


-4
-4

50
0

32.7

0.496

-4

CP4.4 (M.file)
%CP4.4
s=tf('s');
Gc=10;
Gp=1/(s^2+1.91*s);
%for closed loop TF T=Y/R take Td=0
G1=feedback(Gc*Gp,1)
subplot(1,2,1)
step(G1)
%for closed loop TF T=Y/Td take R=0 so that Gc comes in feedback
G2=feedback(Gp,Gc)
subplot(1,2,2)
step(G2)
Output:
G1 =
10
----------------s^2 + 1.91 s + 10
Continuous-time transfer function.

G2 =
1
----------------s^2 + 1.91 s + 10
Continuous-time transfer function.

Figure 4: Step Responses for CP4.4


The estimated steady state tracking error due to unit step input is 0 whereas the due to unit
disturbance input is 0.1.
(d) The maximum steady state tracking error due to unit step input is 1.37-1=0.37 at
t=1.1seconds and due to unit disturbance input, it is 0.137 at time 1.1 seconds, shown in figure 4.

You might also like