# STEP RESPONSE OF FIRST ORDER SYSTEM

figure(1);
t=0:0.1:10;
s=0;
for i=0:1:5;
num=[0 2];
den=[s 3];
s=s+0.5;
j=step(num,den,t);
plot(t,j);
hold on;
end;
xlabel('----->T(SEC)');
ylabel('----->T(C(t))');
title('STEP RESPONSE OF FIRST ORDER SYSTEM');

Simulation:
STEP RESPONSE OF FIRST ORDER SYSTEM
0.7

0.6

----->T(C(t))

0.5

0.4

0.3

0.2

0.1

0

0

1

2

3

4

5
6
----->T(SEC)

7

8

9

10

xlabel('----->T(SEC)').p). s=0.5.1 0. ylabel('----->T(C(t))'). plot(t. s=s+0.3 ----->T(C(t)) 0.15 0.2 0.5:2.35 0.t).STEP RESPONSE OF SECOND ORDER SYSTEM figure(2). hold on. end. title('STEP RESPONSE OF SECOND ORDER SYSTEM'). num=[0 1]. p=step(num. for i=0:0. t=0:0. den=[1 3 3].1:10.den. Simulation: STEP RESPONSE OF SECOND ORDER SYSTEM 0.25 0.05 0 0 1 2 3 4 5 6 ----->T(SEC) 7 8 9 10 .

num=[0 0 1].den.1:50. Simulation: UNDER DAMPED 1.y).2 0 0 5 10 15 20 25 TIME 30 35 40 45 50 . m=1. b=1.4 1.t).2 AMPLITUDE 1 0. t=0:0.6 0. y=step(num. ylabel('AMPLITUDE').8 0.4 0. title('UNDER DAMPED'). den=[m b k].UNDERDAMPED: clear all. plot(t. xlabel('TIME'). k=1.

m=1. t=0:0. den=[m b k]. y=step(num.4 0.2 1 0.den. Simulation: UNDAMPED 2 1.6 0.8 0. plot(t.1:50.y). num=[0 0 1].UNDAMPED: clc.8 1. title('UNDAMPED').t).6 AMPLITUDE 1.2 0 0 5 10 15 20 25 TIME 30 35 40 45 50 . ylabel('AMPLITUDE'). xlabel('TIME').4 1. close all. k=1. b=0. clear all.

ylabel('AMPLITUDE').4 0.OVERDAMPED: clear all. plot(t.8 AMPLITUDE 0. m=1.den.1 0 0 5 10 15 20 25 TIME 30 35 40 45 50 .t). xlabel('TIME').9 0.5 0.3 0. Simulation: OVER DAMPED 1 0.7 0.6 0.1:50. title('OVER DAMPED').y). t=0:0. k=1. y=step(num.2 0. den=[m b k]. num=[0 0 1]. b=4.

t=0:0.4 0.CRITICALLY DAMPED: clear all.1:50. den=[m b k].2 0 0 5 10 15 20 25 TIME 30 35 40 45 50 .4 1.y). k=1.8 0.2 AMPLITUDE 1 0. plot(t.t). ylabel('AMPLITUDE'). y=step(num. title('CRITICALLY DAMPED'). xlabel('TIME'). b=2. m=1.den.6 0. Simulation: CRITICALLY DAMPED 1. num=[0 0 1].

BODE PLOT: clc. den1=[1 0].den2). den2=[1 3]. den=conv(den3. den3=conv(den1.den)).den4). bode(tf(num. Simulation: Bode Diagram Magnitude (dB) 50 0 -50 -100 -90 Phase (deg) -135 -180 -225 -270 -1 10 0 1 10 10 Frequency (rad/sec) 2 10 . den4=[1 4]. num=[0 20]. clear all.