0% found this document useful (0 votes)
48 views7 pages

LAB01 Control System

This document contains the lab assignment of a student named Zabeeh ullah. The assignment involves plotting the step response and impulse response of two transfer functions in MATLAB and Simulink and providing the code and figures.

Uploaded by

Muhammad Daniyal
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)
48 views7 pages

LAB01 Control System

This document contains the lab assignment of a student named Zabeeh ullah. The assignment involves plotting the step response and impulse response of two transfer functions in MATLAB and Simulink and providing the code and figures.

Uploaded by

Muhammad Daniyal
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/ 7

COMSATS University Islamabad Abbottabad

Campus
Department of Electrical (Power) Engineering
Lab Assignment: 01

Name : Zabeeh ullah


Registration Number : FA19-EPE-028
Class/Section :EPE-6C
Subject : Control System
Course Teacher Name : Sidra Mumtaz
Submission Date :15-March-2022
Section : EPE-6C
Task:

Following are the two transfer functions. Plot the step and impulse response and label
properly in script as well as in Simulink.

1. (s+1)/(s2+2s+1)

Matlab Code:

clear all;
close all;
clc
NUMERATOR = [1 1]; % (s+1)
DENOMINATOR = [1 2 1]; % (s^2+2s+1)
sys=tf(NUMERATOR,DENOMINATOR) % Transfer Function
impulse (sys) % Impulse Response
hold on;
step(sys) % Step Response
grid on;
xlabel('Time','fontweight','bold')
ylabel('Amplitude','fontweight','bold')
title('Impulse and Step Response for system G(s)=(s+1)/(s^2+2s+1)')
legend('Impulse Response','Step Response')
Figure:

Impulse and Step Response for system G(s)=(s+1)/(s2 +2s+1)


1
Impulse Response
0.9
Step Response

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7
Time (seconds)

Simulink Model
Code:

plot(tout,simout)
hold on;
plot(tout,simout1)
grid on
xlabel('Time')
ylabel('Amplitude')
title('Impulse and Step Response for system G(s)=(s+1)/(s^2+2s+1)')
legend('Impulse Response','Step Response');

Figure:
Impulse and Step Response for system G(s)=(s+1)/(s2 +2s+1)
1
Impulse Response
0.9
Step Response

0.8

0.7

0.6
Amplitude

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10
Time

2. 10/(s+1)(s+3)(s+5)
Or 10/s^3+9s^2+23s+15
Matlab Code:

clear all;
close all;
clc
NUMERATOR = [10]; % 10
DENOMINATOR = [1 9 23 15]; % s^3+9s^2+23s+15
sys=tf(NUMERATOR,DENOMINATOR) % Transfer Function
impulse (sys) % Impulse Response
hold on;
step(sys) % Step Response
grid on;
xlabel('Time','fontweight','bold')
ylabel('Amplitude','fontweight','bold')
title('Impulse and Step Response for system G(s)=10/s^3+9s^2+23s+15')
legend('Impulse Response','Step Response')

Figure:
Impulse and Step Response for system G(s)=10/s 3 +9s 2 +23s+15
0.7
Impulse Response
0.6 Step Response

0.5
Amplitude

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9
Time (seconds)

Simulink Model

Code:

plot(tout,simout)
hold on;
plot(tout,simout1)
grid on
xlabel('Time')
ylabel('Amplitude')
title('Impulse and Step Response for system G(s)=(10)/s^3+9s^2+23s+15')
legend('Impulse Response','Step Response');

Figure:
Impulse and Step Response for system G(s)=(10)/s3 +9s 2 +23s+15
0.7
Impulse Response
Step Response
0.6

0.5
Amplitude

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10
Time

You might also like