Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
29 views

International Islamic University, Islamabad: LAB EXPERIMENT # 5: Time Response Analysis of 1st Order and

This document summarizes the results of a lab experiment analyzing the time response of first and second order systems using MATLAB. It includes: - MATLAB code to model and simulate step responses of two first order systems with different time constants. - Analysis showing the first system settles within 78 seconds and the second within 29 seconds. - MATLAB code modeling step responses of second order systems with varying damping ratios, showing effects on rise time, peak time, overshoot, and settling time. - MATLAB code and analysis of a second order system with specified parameters, identifying its rise time, peak time, maximum overshoot, steady state value, and settling time.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

International Islamic University, Islamabad: LAB EXPERIMENT # 5: Time Response Analysis of 1st Order and

This document summarizes the results of a lab experiment analyzing the time response of first and second order systems using MATLAB. It includes: - MATLAB code to model and simulate step responses of two first order systems with different time constants. - Analysis showing the first system settles within 78 seconds and the second within 29 seconds. - MATLAB code modeling step responses of second order systems with varying damping ratios, showing effects on rise time, peak time, overshoot, and settling time. - MATLAB code and analysis of a second order system with specified parameters, identifying its rise time, peak time, maximum overshoot, steady state value, and settling time.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

International Islamic University, Islamabad

CONTROL SYSTEMS LAB

LAB EXPERIMENT # 5: Time Response Analysis of 1st Order and


2nd Order Systems using MATLAB
Date of Experiment:
Report submitted on:

Marks obtained:
Remarks: .
Instructors Signature:

Script>>
r=2000; %ohm
c=.01; %farad
t=r*c;
num=[1];
den=[t 1];
h=tf(num,den);

figure(1)
step(h)
r1=2500; %ohm
c1=.003; %farad
t1=r1*c1;
num1=[1];
den1=[t1 1];
h1=tf(num1,den1);
figure(2)
step(h1)
MAtlab Command
Untitled

for t=r*c=2000*.01=20 this is time constant for first graph which show
value=.63*1=.63 of original value
for t=r*c=2500*.003=7.5 this is time constant for secnd graph which show
value=.63*1=.63 of org value

r=2000; %ohmc=.01;
%faradt=r*c;num=[1];
den=[t 1];
h=tf(num,den);
figure(1)step(h)r1=2500;

%ohmc1=.003;
%farad
t1=r1*c1;
num1=[1];
den1=[t1 1];
h1=tf(num1,den1);
figure(2)step(h1)
t = 0: 0.05: 100;
[y, x, t] = step (num, den, t);
t = 0: 0.05: 100;
[y1, x1, t] = step (num1, den1, t);
s = 2001; while y(s) > 0.98;
s = s -1;end
s1 = 2001;
while y1(s1) > 0.98;
s1 = s1 -1;
end
settling_time1 = (s - 1) * 0.05 settling_time2 = (s1 - 1) * 0.05
in command >> Untitledsettling_time1 = 78.2000 settling_time2 =
29.3000
CASE 1) =0.1 , n = 1
>>num = [0 0 1]; den = [1 .2 2]; sys=tf(num,den);

step(sys);

Step Response

A m p lit u d e

0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

10

20

30

40

50

60

Time (s ec onds )

CASE 1) =0.4 , n = 1
num = [0 0 1];den = [1 .8 2];sys=tf(num,den);step(sys);
Step Res pons e

0.7

0.6

A m p lit u d e

0.5

0.4

0.3

0.2

0.1

CASE 1) =0.7 , n = 1
num = [0 0 1];den = [1 1.4 2];sys=tf(num,den);step(sys);

Time (s ec onds)

10

12

14

Step Response

0.7

0.6

A m p lit u d e

0.5

0.4

0.3

0.2

0.1

Time (seconds)

CASE 1) =1.0 , n = 1
num = [0 0 1];den = [1 2 2];sys=tf(num,den);step(sys);
Step Res pons e

0.7

A m p l it u d e

0.6

0.5

0.4

0.3

0.2

0.1

Time (s econds)

CASE 1) =2.0 , n = 1
num = [0 0 1];den = [1 4 2];sys=tf(num,den);step(sys);

Rise time

Peak Time

% Overshoot

Settling time

0.1

0.779sec

2.22sec

80%

38.2sec

0.5

0.4

0.925sec

2.36sec

39.5%

9.73sec

0.5

0.7

1.15sec

2.55sec

16.7%

5.74sec

0.5

1.0

1.52sec

3.15sec

4.32%

4.22sec

0.5

2.0

3.85sec

0sec

0%

7sec

0.5

PART B)
num = [0 0 25];den = [1 7 50];t = 0: 0.005: 5;[y, x, t] = step (num, den, t);
%Rise Time r = 1;[ ymax, tp ] = max(y);while y(r) <ymax; r = r + 1; end
rise_time = (r - 1) * 0.005;
%Peak Time[ ymax, tp ] = max(y);peak_time = (tp - 1) * 0.005;
% Maximum Overshoot
max_overshoot = ymax - 1;
% max_overshoot = 0.0948

Steady state value

% Settling Time
s = 1001; while y(s) > 0.98 & y(s) < 1.02; s = s -1; end
settling_time = (s - 1) * 0.005;
plot(t,y);

You might also like