Abdul Rehman - 200196 - CS - Lab5
Abdul Rehman - 200196 - CS - Lab5
Abdul Rehman - 200196 - CS - Lab5
LAB ASSESSMENT:
Excellent Good Average Satisfactory Unsatisfactory
Attributes
(5) (4) (3) (2) (1)
Ability to Conduct
Experiment
Ability to assimilate the
results
Effective use of lab
equipment and follows the
lab safety rules
Data presentation
Experimental results
Conclusion
Date: Signature:
Task#1:
1. Set up the Given transfer func�on:
For a: 1, 2, 3, 4 and plot the step response of each of the four transfer func�ons on a single
graph by using the Simulink LTI Viewer. Also, record the values of setling �me and rise �me for
each step response.
Code:
clc
clear all
close all
num=[1];
den=[-1];
den=poly(den);
a=tf(num,den)
num=[2];
den=[-2];
den=poly(den);
b=tf(num,den)
num=[3];
den=[-3];
den=poly(den);
c=tf(num,den)
num=[4];
den=[-4];
den=poly(den);
d=tf(num,den)
ltiview(a,b,c,d)
Output:
TF Functions:
a Rise Time Settling Time
1 2.2 3.91
2 1.1 1.96
3 0.732 1.3
4 0.549 0.978
Chart Title
4.5
4
3.5
3
Time(s)
2.5
2
1.5
1
0.5
0
1 2 3 4
Pole(a)
As you can see if poles are close to the origin, then rise �me and setling �me is high as
compare to the poles away from origin.
2. Using Simulink, set up the system below.
For a and b so that the imaginary part of the poles remains the same, but the real part is
increased two �mes.
For a and b so that the imaginary part of the poles remains the same, but the real part is
decreased 1/2 �mes.
Using the Simulink LTI Viewer, plot the step response of each of the three transfer func�ons on a
single graph. Also, record the values of percent overshot, setling �me, peak �me, and rise �me for
each step response.
Code:
clc
clear all
close all
b=25;
a=4;
num=[25];
den=[1 4 25];
tf_A=tf(num,den)
A=roots(den);
B=poly([-4.0000+4.5826i -4.0000-4.5826i]);
num=[37.0002];
den=[1.0000 8.0000 37.0002];
tf_B=tf(num,den)
B=poly([-1.0000+4.5826i -1.0000-4.5826i]);
num=[22.0002];
den=[1.0000 8.0000 22.0002];
tf_C=tf(num,den)
ltiview(tf_A,tf_B,tf_C);
Output:
TF Functions:
As we can see when we double the real part the rise �me increase, setling �me decreases and
overshoot is also controlled. Also, if we half the real part then rise �me increases and setling �me
also decreases and overshoot is almost around 1%.
3. Using Simulink, set up the systems with:
a=4, b=25.
a and b so that the real part of the poles remains the same but the imaginary part is increased
two �mes.
a and b so that the real part of the poles remains the same but the imaginary part is increased
four �mes
Using the Simulink LTI Viewer, plot the step response of each of the three transfer func�ons on a
single graph. Also, record the values of percent overshoot, setling �me, peak �me, and rise �me for
each step response.
Code:
clc
clear all
close all
b=25;
a=4;
num=[25];
den=[1 4 25];
tf_A=tf(num,den)
A=roots(den);
B=poly([-2.0000+2*4.5826i -2.0000-2*4.5826i]);
num=[88.0009];
den=[1.0000 8.0000 88.0009];
tf_B=tf(num,den)
B=poly([-2.0000+4*4.5826i -2.0000-4*4.5826i]);
num=[340.0036];
den=[1.0000 8.0000 340.0036];
tf_C=tf(num,den)
ltiview(tf_A,tf_B,tf_C);
Output:
TF Functions:
We can see if imaginary part is doubled rise time reduces, settling time is
also and overshoot so. But if we multiply it with 4 rise time is almost 0.1,
settling time is increased and overshoot too.
4. Using Simulink, set up the systems with:
a=4, b=25
a and b so that the damping ra�o remains the same but the natural frequency is increased two
�mes.
a and b so that the damping ra�o remains the same but the natural frequency is increased four
�mes
Using the Simulink LTI Viewer, plot the step response of each of the three transfer func�ons on a
single graph. Also, record the values of percent overshoot, setling �me, peak �me, and rise �me for
each step response.
Code:
clc
clear all
close all
num=[25];
den=[1 4 25];
tf_A=tf(num,den)
num=[100];
den=[1 8 100];
tf_B=tf(num,den)
num=[400];
den=[1 16 400];
tf_C=tf(num,den)
ltiview(tf_A,tf_B,tf_C);
Output:
TF Functions: