Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Lab: 05

Understanding the concept of stability

Objective:
To evaluate the effect of poles and zero’s location upon the stability of system.

Required Software Packages:


MATLAB, Simulink and the Control System Toolbox

TASKS:
a. Find the step response of above model and observe the output in scope. From
the output, find out whether the given system is stable, unstable or marginally
stable.
b. Generate above models in MATLAB mfile and find the step response using step

().
c. Plot zeros and poles of the system using pzmap().Also find the exact location of

pole and zeros in MATLAB using [z,p]=tf2zp(num,den)


d. From the above observations find out whether the given system is stable,

unstable or marginally stable.

1. Using Simulink, set up the system bellow

16
a. G(s) =
s4+8s2+16

Code:
clc
clear all
close all
n =[16];
d= [1 0 8 0 16];
p=tf(n,d);
step(p)
[z,p]=tf2zp(n,d);
pzmap(p,z);
Output:

Simulink:

Output:
Discussion:

Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph diverges on the end so this system is
unstable.

1000
b. G(s) =
s3+10s2+31s+1030

Code:
clc
clear all
close all
n =[1000];
d= [1 10 31 1030];
p=tf(n,d)
step(p)
[z,p]=tf2zp(n,d);
pzmap(p,z);

Output:
Simulink:

Output:
Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph diverges on the end so this system is
unstable.

15
c. G(s) =
(s+3)(s+5)

Code:
clc
clear all
close all
n=[15];
d= [-3 -5];
p=tf(n,d);
step(p)
[z,p]=tf2zpk(n,d)
pzmap(p,z);

Output:
Simulink:

Output:

Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph diverges on the end so this system is
unstable.

15
d. G(s) =
(s−3)(s−5)

Code:
clc
clear all
close all
n =[15];
d= [3 5];
p=tf(n,d);
step(p)
[z,p]=tf2zpk(n,d)
pzmap(p,z);

Output:
Simulink:

Output:
Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph diverges on the end so this system is
unstable.

8
e. G(s) =
𝑠 2−4𝑠+8

Code:
clc
clear all
close all
n =[8];
d= [1 -4 8];
p=tf(n,d);
step(p)
[z,p]=tf2zpk(n,d)
pzmap(p,z);

Output:

Simulink
Diagram:
Output:

Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph diverges on the end so this system is
unstable.

4
f. G(s) =
𝑠 2+4

Code:
clc
clear all
close all
n =[4];
d= [1 0 4];
p=tf(n,d);
step(p)
[z,p]=tf2zpk(n,d)
pzmap(p,z);

Output:
Simulink:

Output:
Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph continuously oscillating so this system is
marginal.

2. Using the Simulink, construct the given model, find the step response and observe the
output in scope. Using linmod(‘sys’) find out transfer function of the Simulink model,
take step response and compare outputs of MATLAB code and Simulink model. Observe
the stability condition of system.

Code:
clc
clear all
close all
[n,d]=linmod('lab5_task2')
p=tf(n,d)
step(p)
Simulink:

Output:

Simulink:
Output:

Brief discussion:
In this task we are plotting the zeros and the poles in Simulink as well as in MATLAB to see weather
our system is stable or no as we can see that the graph diverges on the end so this system is
unstable.

Conclusion:
In this lab we learned about the stability of system as well as the zeros and the poles of our system.
Moreover, Stability is a standard requirement of control systems to prevent loss of control and
equipment damage. In linear feedback systems, stability can be assessed by looking at the poles of the
closed-loop transfer function. Poles and Zeros of a transfer function are the frequencies for which the
value of the denominator and numerator of transfer function becomes zero respectively. The values of
the poles and the zeros of a system determine whether the system is stable, and how well the system
performs.

You might also like