0% found this document useful (0 votes)
45 views10 pages

Comsats University Islamabad Abbottabad Campus Lab Assigment

This document is a lab assignment submitted by Yaseen Ayaz to Dr. Bilal Khan. It contains code to analyze the step response of various transfer functions and find their rise time, peak time, percentage overshoot, and settling time. It also contains code to find the values of a controller gain K that result in 10% overshoot, a settling time of 5 seconds, and a rise time of 1 second for a given closed-loop system.

Uploaded by

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

Comsats University Islamabad Abbottabad Campus Lab Assigment

This document is a lab assignment submitted by Yaseen Ayaz to Dr. Bilal Khan. It contains code to analyze the step response of various transfer functions and find their rise time, peak time, percentage overshoot, and settling time. It also contains code to find the values of a controller gain K that result in 10% overshoot, a settling time of 5 seconds, and a rise time of 1 second for a given closed-loop system.

Uploaded by

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

ASS

COMSATS UNIVERSITY ISLAMABAD


ABBOTTABAD CAMPUS
Page number 0
LAB ASSIGMENT

Submitted By:
YASEEN AYAZ

Registration No:
FA18-BCE-020

Course:
CONTROL SYSTEM

Submitted To:
Dr. BILAL KHAN

Date:
April 7, 2021
Task 1:
For the following systems represented by the transfer function G(s), plot the step
response in MATLAB and find the Rise time, Peak time, % overshoot and settling time.

9
1. G1= S + 2 S+ 9
2

CODE:
clear all
close all
clc
s=tf('s');
G1=9/((s^2)+(2*s)+9);
figure;
legend('G1');
grid on;
step(G1);

OUTPUT:

1|Page
9
2. G2= S + 3 S+ 9
2

CODE:
clear all
close all
clc
s=tf('s');
G2=9/((s^2)+(3*s)+9);
figure;
step(G2);
legend('G2');
grid on;

OUTPUT:

6
3. G3= S + 5 S+ 6
2

2|Page
CODE:
clear all
close all
clc
s=tf('s');
G3=6/((s^2)+(5*s)+6);
figure;
step(G3);
legend('G3');
grid on;

OUTPUT:

3|Page
9
4. G4= S + S 4 +3 S+9
2 2

CODE:
clear all
close all
clc
s=tf('s');
G4=9/((s^3)+(4*s^2)+(3*s)+9);
figure;
step(G4);
legend('G4');
grid on;

OUTPUT:

Q: For G3(s) why there is no overshoot?


Answer: There is no value greater than final value thus there is no overshoot.

4|Page
Task 2:
For the below mentioned block diagram, plot the step response for the closed-loop transfer
function C(s)/R(s).

1. Find the value of K for which the overshoot is 10%.


CODE:
% DONE BY YASEEN BCE-020
clear all
close all
clc
s=tf('s');
G1 = 1/(s*(s+2)*(s+3))
H1 = s;
G = feedback(G1,H1);
K=1;
Kt=0;
for K=1:0.1:100
Gc=feedback(K*G,1);
S=stepinfo(Gc);
if(S.Overshoot>9&&S.Overshoot<=10)
Kt=K;
break;
end
end
figure;
step(feedback(Kt*G,1));
stepinfo(feedback(Kt*G,1));

OUTPUT:

5|Page
2. Find the value of K for which the settling time is 5 secs.
CODE:
% DONE BY YASEEN BCE-020
clear all
close all
clc
s=tf('s');
G1=1/(s*(s+2)*(s+3));
H1=s;
G=feedback(G1,H1);
k=1;
kt=0;
for k=1:0.1:100
Gc=feedback(k*G,1);
S=stepinfo(Gc);
if(S.SettlingTime>4.9 && S.SettlingTime<=5)
kt=k;
break;

6|Page
end
end
figure;step(feedback(kt*G,1))
stepinfo(feedback(kt*G,1))

OUTPUT:

3. Find the value of K for which the rise time is 1 sec.


CODE:
% DONE BY YASEEN BCE-020
clear all

7|Page
close all
clc
s=tf('s');
G1 = 1/(s*(s+2)*(s+3))
H1 = s;
G = feedback(G1,H1);
K=1;
Kt=0;
for K=1:0.1:100
Gc=feedback(K*G,1);
S=stepinfo(Gc);
if(S.RiseTime>0.5&&S.RiseTime<=1)
Kt=K;
break;
end
end
figure;
step(feedback(Kt*G,1));
stepinfo(feedback(Kt*G,1));

OUTPUT:

8|Page
9|Page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy