You are on page 1of 9

>> Gp1=tf([1],[1 1])

Transfer function:

-----

s+1

>> step(Gp1)

>> Gp12=tf([1],[1 3])

Transfer function:

-----

s+3

>> hold on;

>> step(Gp12)

>> Gp13=tf([1],[1 6])

Transfer function:

-----

s+6

>> hold on;

>> step(Gp13)
Step Response
1

0.9

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
Time (seconds)

>> Gp2=tf([1],[1 0.1 1])

Transfer function:

---------------

s^2 + 0.1 s + 1

>> step(Gp2)

>> Gp21=tf([1],[1 0.1 3])

Transfer function:

---------------

s^2 + 0.1 s + 3
>> hold on;

>> step(Gp21)

>> Gp22=tf([1],[1 0.1 6])

Transfer function:

---------------

s^2 + 0.1 s + 6

>> hold on;

>> step(Gp22)

Step Response
2

1.8

1.6

1.4

1.2
Amplitude

0.8

0.6

0.4

0.2

0
0 20 40 60 80 100 120
Time (seconds)

>>
Gp3=tf([1],[1 0.2 1 1])
Transfer function:

---------------------

s^3 + 0.2 s^2 + s + 1

>> step(Gp3)

>> Gp31=tf([1],[1 0.2 1 3])

Transfer function:

---------------------

s^3 + 0.2 s^2 + s + 3

>> hold on;

>> step(Gp31)

>> Gp32=tf([1],[1 0.2 1 6])

Transfer function:

---------------------

s^3 + 0.2 s^2 + s + 6

>> hold on;

>> step(Gp32)
79
x 10 Step Response
14

12

10

6
Amplitude

-2

-4
0 50 100 150 200 250
Time (seconds)

79
x 10 Step Response
14

12

10

6
Amplitude

-2

-4
0 50 100 150 200 250
Time (seconds)
79
x 10 Step Response
14

12

10

6
Amplitude

-2

-4
0 50 100 150 200 250
Time (seconds)

>> t=0:0.02:20 ;

>> u=t;

>> sys=tf([1],[1 1]);

>> lsim(sys,u,t)

>> sys=tf([1],[1 3]);

>> hold on;

>> lsim(sys,u,t)

>> sys([1],[1 6]);

>> hold on;

>> lsim(sys,u,t)
Linear Simulation Results
20

18

16

14

12
Amplitude

10

0
0 2 4 6 8 10 12 14 16 18 20
Time (sec)

>> t=0:0.02:20;

>> u=t;

>> sys=tf([1],[1 0.1 1]);

>> lsim(sys,u,t)

>> sys=tf([1],[1 0.1 3]);

>> hold on;

>> lsim(sys,u,t)

>> sys=tf([1],[1 0.1 6]);

>> hold on;

>> lsim(sys,u,t)
Linear Simulation Results
20

18

16

14

12
Amplitude

10

0
0 2 4 6 8 10 12 14 16 18 20
Time (sec)

>> t=0:0.02:20;

>> u=t;

>> sys=tf([1],[1 0.2 1 1]);

>> lsim(sys,u,t)

>> sys=tf([1],[1 0.2 1 3]);

>> hold on;

>> lsim(sys,u,t)

>> sys=tf([1],[1 0.2 1 6]);

>> hold on;

>> lsim(sys,u,t)
4
x 10 Linear Simulation Results
4

-2
Amplitude

-4

-6

-8

-10
0 2 4 6 8 10 12 14 16 18 20
Time (sec)

You might also like