0% found this document useful (0 votes)
38 views12 pages

Lab Report - Exp 7 - 1913145

This lab report summarizes the results of simulations performed in MATLAB on unity feedback control systems. The simulations varied damping ratio and natural frequency parameters. Key results include: 1) Varying damping ratio from 0.1 to 0.9 at a fixed natural frequency of 2 rad/s showed relationships between phase margin and damping ratio, and between phase margin and peak overshoot. 2) Varying natural frequency from 0.8 to 8 rad/s at a fixed damping ratio of 0.5 showed relationships between phase margin and natural frequency, bandwidth and rise time, and gain crossover frequency and rise time. 3) Varying a gain parameter K from 0.1 to 5.5 in

Uploaded by

Sumon Tenpass
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views12 pages

Lab Report - Exp 7 - 1913145

This lab report summarizes the results of simulations performed in MATLAB on unity feedback control systems. The simulations varied damping ratio and natural frequency parameters. Key results include: 1) Varying damping ratio from 0.1 to 0.9 at a fixed natural frequency of 2 rad/s showed relationships between phase margin and damping ratio, and between phase margin and peak overshoot. 2) Varying natural frequency from 0.8 to 8 rad/s at a fixed damping ratio of 0.5 showed relationships between phase margin and natural frequency, bandwidth and rise time, and gain crossover frequency and rise time. 3) Varying a gain parameter K from 0.1 to 5.5 in

Uploaded by

Sumon Tenpass
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Lab report on

Control System Lab (EE 313)

Submitted by:

Guided by:
DR. Rajeeb Dey

DepartmeNt of electrical eNgiNeeriNg

NatioNal iNstitute of techNology silchar


Matlab Programs and Outputs
n2
Consider a unity feedback system with OLTF G( s) = , subjected to a unit
s( s + 2n )

step input as reference.


1. Vary  from 0.1 to 0.9 keeping n = 2 rad/s.
a) Plot P.M vs M P
b) Plot P.M vs 
2. Vary n from 0.8 to 8 rad/s keeping  = 0.5
a) Plot P.M vs n
b) Plot b vs t r
c) Plot GCF Vs t r
3. Plot the following for a unity feedback system with OLTF
K
G (s) = varying K from 0.1-5.5.
s( s + 1)( s + 2)

a. Plot P.M vs M P
b. Plot b vs t r
c. Plot GCF vs t r

1) Code:
clc
clear all
close all
zeta=[0.1:0.2:0.9];
wn=2;
for i=1:length(zeta)
z=[];
p=[0 -(2*zeta(i)*wn)]
k=wn^2;
[num,den]=zp2tf(z,p,k);
sys1(i)=zpk(z,p,k)
G=tf(num,den);
sys(i)=feedback(G,1);
fdata(i)=allmargin(sys1(i));
Pm(i)=fdata(i).PhaseMargin;
time(i)=stepinfo(sys(i));
Mp(i)=time(i).Overshoot;
end
subplot(2,1,1)
plot(zeta,Pm)
title('phase margin vs damping ratio')
xlabel('zeta')
ylabel('PhaseMargin')
grid on
subplot(2,1,2)
plot(Mp,Pm)
title('Phase margin vs phase margin
peakovershoot')
xlabel('peak overshoot')
ylabel('PhaseMargin')
grid on

Output:
p =0 -0.4000

sys1 =

4
---------
s (s+0.4)

Continuous-time zero/pole/gain model.

p =0 -1.2000

sys1 = From input 1 to output:


4
---------
s (s+0.4)
From input 2 to output:
4
---------
s (s+1.2)
Continuous-time zero/pole/gain model.
p =0 -2
sys1 =From input 1 to output:
4
---------
s (s+0.4)

From input 2 to output:


4
---------
s (s+1.2)

From input 3 to output:


4
-------
s (s+2)

Continuous-time zero/pole/gain model.

p =0 -2.8000

sys1 =From input 1 to output:


4
---------
s (s+0.4)

From input 2 to output:


4
---------
s (s+1.2)

From input 3 to output:


4
-------
s (s+2)

From input 4 to output:


4
---------
s (s+2.8)

Continuous-time zero/pole/gain model.


p =0 -3.6000

sys1 = From input 1 to output:


4
---------
s (s+0.4)
From input 2 to output:

4
---------
s (s+1.2)

From input 3 to output:


4
-------
s (s+2)

From input 4 to output:


4
---------
s (s+2.8)

From input 5 to output:


4
---------
s (s+3.6)

Continuous-time zero/pole/gain model.

Graph:

Fig-1: Plot of  from 0.1 to 0.9 keeping n = 2 rad/s.


2)Code:
clc;
clear all;
close all;
zeta=0.5;
wn=[1:1:8];
for i=1:length(wn)
num=wn(i)^2;
den=[1 2*zeta*wn(i) 0];
G=tf(num,den);
sys(i)=feedback(G,1);
fd(i)=allmargin(G);
pm(i)=fd(i).PhaseMargin;
t(i)=stepinfo(sys(i));
tr(i)=t(i).RiseTime;
mp(i)=t(i).Overshoot;
wb(i)=bandwidth(sys(i));
wgc(i)=getGainCrossover(G,1);
end
subplot(3,1,1)
plot(wn,pm)
xlabel("natural frequency")
ylabel('Phas Margin')
title("Phase Margin vs natural frequency")
grid
subplot(3,1,2)
plot(tr,wb)
xlabel("Rise Time")
ylabel('Bandwidth')
title("Badwidth vs Rise Time")
grid
subplot(3,1,3)
plot(tr,wgc)
xlabel("Rise Time")
ylabel('Gain Crossover Frequency')
title("Gain Crossover Frequency vs Rise Time")
grid
Output Graph:

Fig-2: Plot of n from 0.8 to 8 rad/s keeping  = 0.5

3)Code:
clc;
clear all;
close all;
k=[0.1:0.1:5.5]
for i=1:length(k)
num=k(i);
den=[1 3 2 0];
G=tf(num,den);
sys(i)=feedback(G,1);
fd(i)=allmargin(G);
pm(i)=fd(i).PhaseMargin;
t(i)=stepinfo(sys(i));
tr(i)=t(i).RiseTime;
mp(i)=t(i).Overshoot;
wb(i)=bandwidth(sys(i));
wgc(i)=getGainCrossover(G,1);
end
subplot(3,1,1)
plot(mp,pm)
xlabel("Overshoot")
ylabel('Phas Margin')
title("Phase Margin vs Overshoot")
grid
subplot(3,1,2)
plot(tr,wb)
xlabel("Rise Time")
ylabel('Bandwidth')
title("Badwidth vs Rise Time")
grid
subplot(3,1,3)
plot(tr,wgc)
xlabel("Rise Time")
ylabel('Gain Crossover Frequency')
title("Gain Crossover Frequency vs Rise Time")
grid

Output:

Fig-3: Results from Command window


Graph:

K
Fig-4:Plot the following for a unity feedback system with OLTF G (s) =
s( s + 1)( s + 2)

varying K from 0.1-5.5.

You might also like