Vous êtes sur la page 1sur 4

10/13/10 2:56 AM

C:\Mydata\USC\courses\EMCH516_Controls...\root_locus_example.m

% ROOT LOCUS EXAMPLE


clc; clear
% close all
format short
s=tf('s')
num=s^2-2*s+2
den=(s+2)*(s+1)
G=num/den
%% root locus plot
figure(1) ;
subplot(1,2,1)
rlocus(G)
K=1.45:0.001:1.55;
subplot(1,2,2)
rlocus(G,K);
axis([-0.02 0.02 1.4140 1.4143])
%% step response plot
figure(2);
Kc=1.5;
t=0:0.1:100;
% below critical value
k=Kc-0.1;
G_CL=feedback(k*G,1)
subplot(3,1,1)
step(G_CL,t)
title('subcritical step response k=1.49')
% at critical value
subplot(3,1,2)
k=Kc;
G_CL=feedback(k*G,1)
step(G_CL,t)
title('critical step response k=1.5')
% above critical value
subplot(3,1,3)
k=Kc+0.1;
G_CL=feedback(k*G,1)
step(G_CL,t)
title('supercritical step response k=1.51')

1 of 2

10/13/10 2:56 AM

Transfer function:
s

Transfer function:
s^2 - 2 s + 2

Transfer function:
s^2 + 3 s + 2

Transfer function:
s^2 - 2 s + 2
------------s^2 + 3 s + 2

Transfer function:
1.4 s^2 - 2.8 s + 2.8
--------------------2.4 s^2 + 0.2 s + 4.8

Transfer function:
1.5 s^2 - 3 s + 3
----------------2.5 s^2 + 5

Transfer function:
1.6 s^2 - 3.2 s + 3.2
--------------------2.6 s^2 - 0.2 s + 5.2
>>

MATLAB Command Window

1 of 1

Root Locus

1.5

1.4143

1.4143

0.5

1.4142

Imaginary Axis

Imaginary Axis

Root Locus

1.4141

-0.5

1.4141

-1

1.4141

-1.5
-2.5

-2

-1.5

-1

-0.5
Real Axis

0.5

1.5

System: G
Gain: 1.5
Pole: 0 + 1.41i
Damping: -0
Overshoot (%): 100
Frequency (rad/sec): 1.41

1.414
-0.02

-0.015

-0.01

-0.005
0
Real Axis

0.005

0.01

0.015

0.02

subcritical step response k=1.49

Amplitude

2
1
0
-1
-2

10

20

30

40

50
Time (sec)

60

70

80

90

100

70

80

90

100

70

80

90

100

critical step response k=1.5

Amplitude

2
1
0
-1
-2

10

20

30

40

50
Time (sec)

60

supercritical step response k=1.51

Amplitude

50

-50

10

20

30

40

50
Time (sec)

60

Vous aimerez peut-être aussi