LR 8
LR 8
Name
Registration Number
Class
Lab Assessment
Post Lab Total
Pre- In-
Data Data Writing
Lab Lab
Presentation Analysis Style
Introduction :-
The Routh-Hurwitz stability criterion provides a simple algorithm to decide whether or not the
zeros of a polynomial are all in the left half of the complex plane (such a polynomial is called at
times "Hurwitz").
The Routh-Hurwitz criteria is comprised of three separate tests that must be satisfied. If any single
test fails, the system is not stable and further tests need not be performed. For this reason, the tests
are arranged in order from the easiest to determine to the hardest.
From Routh table we find that this system is stable for 50.5<K<163.89 so we choose K=110
Code:
z=[-0.01 -6]; %Zeros
p=[0 -20 -100]; %Poles
k=110;
K=zpk(z,p,k)
G=tf([10],[1 10 29])
t=0:0.1:10;
x=ones(1,length(t));
y=lsim((K.*G)/(1+K.*G),x,t);
plot(t,y,'linewidth',2),grid on
ii.
From Routh table we find out that K> 5.8711*10-4, so we use K=10
2
7570 (s + 103.8 s+ 82.4)
T (s )= 3 2
s + 7570 s +781846 s+623768
Code:
k=10;
T=[0 7570 785766 623768]
B=[1 7570 781846 623768]
G=tf(T,B)
t=0:0.1:2;
x=ones(1,length(t));
O=lsim(G,x,t);
plot(t,O,'linewidth',2), grid on
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
iii.
63∗10 6
K ( s )=K G ( s )=
( s +30 ) ( s +140 ) (s+ 2.5)
From routh table we find out that -1.67*10-4 <K <0.0123 lies in this range so we
select K=0.01
Code:
k=0.01;
T=[0 0 0 154980]
B=[1 170 4625 165480]
G=tf(T,B)
t=0:0.1:2;
x=ones(1,length(t));
O=lsim(G,x,t);
subplot(2,1,1)
plot(t,O,'linewidth',2),grid on
subplot(2,1,2)
plot(t,x,'linewidth',3),grid on
1.5
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
1.5
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
In Lab Tasks:
Task 1:
For the following transfer function study the effect of additional zeros on the response of second
order system, note down the change in Ts, Tr, %OS, damping ratio, un-damped natural frequency
and poles of the system, let
D=s^2+2s+9
i. G1(s)=9/D
ii. G2(s)=((s+3)*9/3)/D
iii. G3(s)=((s+5)*9/5)/D
iv. G4(s)=((s+10)*9/10)/D
Code :-
clc
clear all;
close all;
clc;
s=tf('s');
D=((s^2)+(2*s)+(9));
G1=9/D;
G2=((s+3)*9/3)/D;
G3=((s+5)*9/5)/D;
G4=((s+10)*9/10)/D;
step(G1,G2,G3,G4)
[wn,z,p]=damp(G1)
[wn,z,p]=damp(G2)
[wn,z,p]=damp(G3)
[wn,z,p]=damp(G4)
stepinfo(G1)
stepinfo(G2)
stepinfo(G3)
stepinfo(G4)
wn =
3.0000
3.0000
z=
0.3333
0.3333
p=
-1.0000 + 2.8284i
-1.0000 - 2.8284i
wn =
3.0000
3.0000
z=
0.3333
0.3333
p=
-1.0000 + 2.8284i
-1.0000 - 2.8284
wn =
3.0000
3.0000
z=
0.3333
0.3333
p=
-1.0000 + 2.8284i
-1.0000 - 2.8284i
wn =
3.0000
3.0000
z=
0.3333
0.33333
p=
-1.0000 + 2.8284i
-1.0000 - 2.8284i
ans = RiseTime: 0.4568
SettlingTime: 3.7005
SettlingMin: 0.8916
SettlingMax: 1.3293
Overshoot: 32.9277
Undershoot: 0
Peak: 1.3293
PeakTime: 1.1052
ans =
RiseTime: 0.2665
SettlingTime: 3.4739
SettlingMin: 0.8245
SettlingMax: 1.5328
Overshoot: 53.2824
Undershoot: 0
Peak: 1.5328
PeakTime: 0.7829
ans =
RiseTime: 0.3552
SettlingTime: 3.5351
SettlingMin: 0.8682
SettlingMax: 1.4005
Overshoot: 40.0506
Undershoot: 0
Peak: 1.4005
PeakTime: 0.8750
ans =
RiseTime: 0.4246
SettlingTime: 3.6071
SettlingMin: 0.8861
SettlingMax: 1.3458
Overshoot: 34.5838
Undershoot: 0
Peak: 1.3458
PeakTime: 1.01
Step Response
1.6
G1
G2
G3
1.4
G4
1.2
1
Amplitude
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7
Time (seconds)
In this task, I observed that as zeros are moving away from origin, overshoot is decreasing but
rise time is increasing.
Task 2:
Consider the following systems with D=s^2+2s+4, from the step response determine which are
minimum phase and which are non-minimum phase systems. Compare the response of G1 and G2
(find Ts, Tr and Tp) for both, which system is fast and why? Also compare systems G2 and G3, find
pole and zero for both systems and determine why both systems have different responses?
i. G1(s)=(s+4)/D
ii. G2(s)=(-s+4)/D
iii. G3(s)=(s-4)/D
Code :-
clear all;
close all;
clc;
s=tf('s');
D=(s^2+(2*s)+4);
G1=(s+4)/D;
G2=(-s+4)/D;
G3=(s-4)/D;
% figure();
step(G1,G2)
figure();
step(G2,G3)
figure();
pzmap(G1)
hold on
pzmap(G2,'r')
pzmap(G3,'k')
hold off
Step Response
1.2
0.8
0.6
Amplitude
0.4
0.2
-0.2
0 1 2 3 4 5 6 7
Time (seconds)
Step Response
1.5 Pole-Zero Map
2
1 1.5
0.5
)
-1
0.5
0
0
-0.5 -0.5
-1
-1
-1.5
-1.5
0 1 2 3 4 5 6 7
-2
Time (seconds) -4 -3 -2 -1 0 1 2 3 4
Real Axis (seconds -1)
We can observe from step response that for G1 rise time is less but settling time is greater. For
G2, rise time is slow but settling time is fast. For G3, it is inversion of G2.
TASK 3:
Verify the value of “K” for all the systems, calculated in pre-lab task, using Simulink. Also find
open loop stability, total response stability and natural response stability. Also design “K”.
sys= tf('s')
K=-0.000166
% T= (K *(s+0.01)*(s+6))/(s*(s+20)*(s+100))
% G= 10/(s^2+ 10*s+29)
%
% T1= (K *(s+0.8)*(s+103))/s
% G1= 7570/((s+62.61)*(s-62.61))
%
T2= K
G2= (63* 1000000)/((s+30)*(s+140)*(s+2.5))
% f1=series(T,G)
% t1=feedback(f1,1)
% f2=series(T1,G1)
% t2=feedback(f2,1)
f3=series(T2,G2)
t2=feedback(f3,1)
step(t2)
Step Response Step Response
0 2
1.8
-50 1.6
1.4
-100 1.2
Amplitude
Amplitude
1
-150 0.8
0.6
-200 0.4
0.2
-250 0
0 100 200 300 400 500 600 700 800 900 1000 0 2 4 6 8 10 12
Time (seconds) Time (seconds)