Lab#9: Steady State Error Analysis and Design

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

Lab#9 : Steady State Error Analysis and Design

In Lab Tasks

Task 1:
PART 1
clc
num = [0 500 3500 5000];
denum = [1 30 296 960];
s= tf(num,denum);
s=feedback(s,1,-1);

t = 0:0.1:10;
u = heaviside(t);
subplot(3,1,1)
step(s,t) %for step function
title("STEP FUNCTION")
p = 20.*t.*u;
subplot(3,1,2)
lsim(s,p,t);
title("RAMP FUNCTION")
z = 5.*t.^2.*u;
subplot(3,1,3)
lsim(s,z,t);
title("PARABOLIC FUNCTION")

OUTPUT:
PART 2
clc
num = [0 500 6500 26000 30000];
denum = [1 30 296 960 0];

s= tf(num,denum);
s=feedback(s,1,-1);

t = 0:0.1:10;
u = heaviside(t);
subplot(3,1,1)
step(s,t) %for step function
title("STEP FUNCTION")
p = 20.*t.*u;
subplot(3,1,2)
lsim(s,p,t);
title("RAMP FUNCTION")
z = 5.*t.^2.*u;
subplot(3,1,3)
lsim(s,z,t);
title("PARABOLIC FUNCTION")

OUTPUT:
PART 3
clc
num = [500 12000 111500 498000 1058000 840000];
denum = [1 30 296 960 0 0];

s= tf(num,denum);
s=feedback(s,1,-1);

t = 0:0.1:10;
u = heaviside(t);
subplot(3,1,1)
step(s,t) %for step function
title("STEP FUNCTION")
p = 20.*t.*u;
subplot(3,1,2)
lsim(s,p,t);
title("RAMP FUNCTION")
z = 5.*t.^2.*u;
subplot(3,1,3)
lsim(s,z,t);
title("PARABOLIC FUNCTION")

OUTPUT:
Lab Task 2:

PART 1
num = [672 3360]; % The value of k is 672
denum = [1 21 146 336];
s= tf(num,denum)
s=feedback(s,1,-1);
step(s)

steadystaterror=abs(1-1.26)

OUTPUT

COMMENTS

Steady state error = 0.2600

Comments: When the ’k’ is increased, then increase in the overshoot is seen and by decreasing
the value of ‘k’ increases the steady state time and decreases the overshoot.
PART 2

num = [189 2268]; %The value of k is 189.


denum = [1 32 252];
s = tf(num,denum)
y = feedback (s,1,-1);
step(y);
steadystateerror=abs(1-0.902)

OUTPUT
Lab Task 3:

 Normal Input

MATLAB Code
num = [1];
denum = [1 1 0];
sys = tf(num,denum);
t = 0:0.1:10;
u = heaviside(t);
k = 70;
f = feedback(k*sys, 1, -1)
step(f)
Results
 Reference Input

MATLAB Code
k = 70;
num = k*[1];
denum = [1 1 0];
sys = tf(num,denum);
t = 0:0.1:10;
u = heaviside(t);
f = feedback(1, sys, -1)
step(f)
Results
 Disturbance Input

MATLAB Code
k = 70;
num = [1];
denum = [1 1 0];
sys = tf(num,denum);
t = 0:0.1:10;
u = heaviside(t);
f = feedback(-sys, k, 1)
step(f)

Results

 Reference + Disturbance Input

MATLAB Code
k = 70;
num1 = k*[1];
denum1 = [1 1 0];
sys1 = tf(num1,denum1);
t = 0:0.1:10;
u = heaviside(t);
f1 = feedback(1, sys1, -1)

num2 = [1];
denum2 = [1 1 0];
sys2 = tf(num2,denum2);
f2 = feedback(-sys2, k, 1)
lsim(f1,f2,u,t);
Results

Critical Analysis / Conclusion

You might also like