Ee481 p11 Root Locus Design

Post on 26-Oct-2014

142 views 1 download

Tags:

transcript

EE481 Control Systems

Kunio Takaya

Electrical and Computer Engineering

University of Saskatchewan

October 28, 2009

Chapter 9: Design Via Root Locus

** Go to full-screen mode now by hitting CTRL-L

1

University of Saskatchewan, Electrical Engineering

EE 481.3 Control Systems

April 2009, Kunio Takaya

Textbook: Norman S. Nise, “Control Systems Engineering” Fifth

Edition, John Wiley & Sons, Inc. 2008, ISBN-13 978-0471-79475-2.

Marks: Midterm Exam: 30%, Final Exam 55%, and Assignments

15%

1. Modeling in the frequency domain

• Laplace transform

• Transfer functions

2. Modeling in the time domain

2

• Linear differential equations

• State-Space representation

3. Time response

• Second-Order Systems

• Poles and zeros

• Time domain solution of state equations

4. Reduction of multiple subsystems

• Block diagrams and Signal-Flow graphs

• Mason’s rule

• Similarity transformations

5. Stability

• Routh-Hurwitz criterion

• Stability in State-Space

3

6. Steady-State errors

• Steady-State error for unity gain feedback

• Steady-State error for disturbance

7. Root Locus techniques

• Sketching the root locus

• Transient response design via gain adjustment

8. Design via root locus

• Cascade compensation

• Improving transient response and steady-state error

9. Frequency response techniques

• Bode plots

• Nyquist diagrams

• Systems with time delay

4

10. Design via frequency response

• Lag compasation

• Lead compensation

Classes: MWF 8:30-9:30 a.m. 1B79 Engineering

My office: 3B31

Email: kunio.takaya@usask.ca

5

What is the Root Locus?

The open loop transfer function is Go(s) =K1K2

s(s+ 10)=

K

s(s+ 10).

Its closed loop transfer function is,

Gc(s) =Go

1 +Go=

K

s2 + 10s+K

6

7

8

Properties of the root locus

T (s) =KG(s)

1 +KG(s)H(s)

KG(s)H(s) = −1 = 1 6 (2k+ 1)180◦, where k = 0,±1,±2,±3, · · ·

9

The closed loop poles have to satisfy the following conditions.

jKG(s)H(s)j = 1 (1)

6 KG(s)H(s) = (2k + 1)180◦ (2)

K that satisfies the first condition is given by

K =1

jG(s)jjH(s)j

10

11

A value of K satisfying Eq. (1) is s = −2± j√

22 .

6 θ1 + 6 θ2 − 6 θ3 − 6 θ4 = 180◦

K =L3L4

L1L2= 0.33

12

An example of Root Locus

13

1 Design Via Root Locus

We follow the following appoaches to study the root locus based

design.

1. cascade compensators to improve the steady state error

PI Controller and (Phase) Lag Compasator

2. cascade compensators to improve the transient response

PD Controller and (Phase) Lead Compensator

3. cascade compensators to improve the steady state error and

transient response

PID Controller and (Phase) Lag-Lead Compensator, Notch

Filter

We will look at both of analytical approach, and try-and-error

approach (MATLAB).

14

2 PI (Proportional and Integral) Controller,

adding an integrator and a zero

Gc(s) =s+ zcs

15

16

17

Example 9.1 PI controller

Eliminate the steady state error for step input without changing

transient response by a PI compensator,

Gc(s) =K(s+ 0.1)

sfor G(s) =

1

(s+ 1)(s+ 2)(s+ 10)

The closed loop system’s damping ratio should be ζ = 0.174.

18

19

20

21

Example 9.1 MATLAB Solution

% Example 9.1 p.441

% K. Takaya

’(ch8p2) Example 9.1’ % Display label.

clear all % Clear variables from workspace.

close all; % clear graph on screen.

numg=[1]; % Define numerator of G(s).

deng=poly([-1 -2 -10]); % Define denominator of G(s).

’G(s)’ % Display label.

G=tf(numg,deng) % Create and display G(s).

figure(1);

rlocus(G) % Draw root locus (H(s)=1).

title(’Original Root Locus’) % Add title.

z=input(’Damping ratio: enter 0.174 = ’);

% Input damping ratio from the keyboard.

wn=0;

sgrid(z,wn) % Overlay desired damping ratio line

% on root locus.

title([’Root Locus with ’,num2str(z),’ damping ratio’])

% Define title for root locus

% showing percent overshoot used.

[K,p]=rlocfind(G) % Generate gain, K, and closed-loop

% poles, p, for point selected

22

% interactively on the root locus.

pause;

’T(s)’ % Display label.

T=feedback(K*G,1) % Find closed-loop transfer function

% with selected K and display.

figure(2);

step(T) % Generate closed-loop step response

% for point selected on root locus.

title([’Step Response for K=’,num2str(K)])

% Give step response a title which

% includes the value of K.

Kp=K*1/(1*2*10)

ess=1/(1+Kp)

[numc,denc]=tfdata(T,’v’)

finalvalu=numc(4)/denc(4)

pause;

numg1=poly([-0.1]); % Define numerator of G(s).

deng1=poly([0 -1 -2 -10]); % Define denominator of G(s).

’G1(s)’ % Display label.

G1=tf(numg1,deng1) % Create and display G(s).

figure(3);

rlocus(G1) % Draw root locus (H(s)=1).

title(’Original Root Locus’) % Add title.

23

wn=0;

sgrid(z,wn) % Overlay desired damping ratio line

% on root locus.

title([’Root Locus with ’,num2str(z),’ damping ratio’])

[K1,p1]=rlocfind(G1) % Generate gain, K, and closed-loop

% poles, p, for point selected

% interactively on the root locus.

pause

’T1(s)’ % Display label.

T1=feedback(K1*G1,1) % Find closed-loop transfer function

% with selected K1 and display.

figure(4);

time=[0:0.2:40];

step(T,’r’,T1,’b’,time) % Generate closed-loop step response

% for point selected on root locus.

title([’Step Response for K=’,num2str(K), ’ and K1=’, num2str(K1)])

24

3 Phase Lag Compensator, adding a pole

and a zero

Gc(s) =s+ zcs+ pc

We try to improve error coefficient K from the original system’s Ko

to a compensated system’s Kn. For this particular systemof type I,

we improve Kv, velocity error coefficient.

Kv = lims→0

sG(s) and e(∞) =1

Kv

25

26

Kvo = lims→0

sG(s) = lims→0

sK(s+ z1)(s+ z2) · · ·s(s+ p1)(s+ p2) · · ·

=Kz1z2 · · ·p1p2 · · ·

Kvn = lims→0

sG′(s) = lims→0

sK(s+ zc)(s+ z1)(s+ z2) · · ·s(s+ pc)(s+ p1)(s+ p2) · · ·

=K(z1z2 · · ·)(zc)(p1p2 · · ·)(pc)

Choose such that Kvn = Kvozcpc> Kvo

Thus, relative positions of the compensator pole and zero are

zc > pc or − zc < −pc.

27

28

Example 9.2 Phase Lag compensator

Compensate the system to improve the steady state error by a

factor of 10 if the system is operating with a damping ratio of

0.174. The uncompensated system that gives ζ = 0.174 is shown in

the next root locus plot.

29

30

Adjust zc and pc for required steady state error

The root locus gain K to cross the ζ = 0.174 line is K = 164.6.

The position error coefficient Kplant of the plant is

Kplant = lims→0

1

(s+ 1)(s+ 2)(s+ 10)=

1

20

Kp (DC gain) = K ×Kplant = 164.6× 1

20= 8.23

and e(∞) =1

1 +Kp= 0.108

Now, we want to reduce the steady state error by a factor of 10.

e(∞) =0.108

10= 0.0108

Since e(∞) =1

1 +Kp= 0.0108,

31

The new Kp is

Kp =1− e(∞)

e(∞)=

1− 0.0108

0.0108= 91.95

From

KN = KOzcpc> KO,

zcpc

=KpN

KpO=

91.95

8.23= 11.13

Where, pc = 0.01 has arbitrarily chosen.

zc = 11.13pc = 0.111

32

Find compensator gain K such that damping factor is ζ = 0.174

% Example 9.2 p.446

% K. Takaya, Oct. 21, 2009

numZero=[-0.111];

denPole=[-0.01, -1, -2, -10];

num=poly(numZero);

den=poly(denPole);

sys=tf(num,den);

’Draw damping ratio 0.174 line’

rlocus(sys);

sgrid(0.174, 0);

[K,p]=rlocfind(sys)

33

The compensator gain K = 158.1 was found by MATLAB program.

34

35

Try pole at s = −0.001 instead of s = −0.01. This results in a

larger offset.

36

37

4 PD Compensator, adding a zero

Gc(s) = s+ zc

The Proportional and Derivative (PD) controller generally quickens

the transient response. Zeros will pull the root locus toward the

zero. Poles will push the root locus away from the pole.

Look at time constant T =1

ζωnwhich determines the decay part

of 2nd order response, e−ζωnt. (a) T = 1, (b) T = 1/3 = 0.33, (c)

T = 1/2.5 = 0.4, (d) T = 1/1.869 = 0.535 for ζ = 0.4 of

G(s) =K

(s+ 1)(s+ 2)(s+ 5).

38

39

40

41

Example 9.3 PD controller

Design a PD controller to yields 16% overshoot, with a threefold

reduction in settling time.

% OS = e−(ζπ/√

1−ζ2) × 100

16% overshoot yields ζ = 0.504. Draw the root locus of

uncompensated system.

42

The second order poles are at −1.205± j2.064. Time constant is

T = 1/1.205. The settling time is

Ts =4

ζωn=

4

1.205= 3.320

43

The new settling time of threefold reduction is

T ′s = Ts/3 = 1.107 =⇒ σ =1

T ′s/4= 3.613

The new closed loop pole is at s = −σ ± jωd.

44

From cos θ = ζ = 0.504, we obtain θ = 59.735◦.

ωd = σ tan θ = 6.193

This s = −σ ± jωd = −3.613± j6.193 must be on the root locus

satisfying the angle condition,

− 6 s− 6 (s+ 4)− 6 (s+ 6) + 6 (s+ σ) = 180◦

−120.2593◦ − 86.4242◦ − 68.9216◦ + 6 (s+ σ) = 180◦

6 (s+ σ) = 95.6051◦

6.193

3.631− σ= tan(180◦ − 95.6◦) =⇒ σ = 3.006

45

46

47

The third pole is at s = −2.775 which is too close to the real part

of second order poles, and (closed loop) pole and zero are close but

do not cancel each other, so the second order approximation is not

valid. The residue of the third order pole by the partial fraction

48

expansion can tell if the second order approximation is valid or not.

49

5 PID Compensator, adding two zeros and

a pole at s = 0

Gc(s) = KP +KI

s+KDs =

KP s+KI +KDs2

s

=KD(s2 +

KP

KDs+

KI

KD)

s

1. Evaluate the uncompensated system to determine how much

improvement is required in transient response.

2. Design the PD controller that meets the transient response

specifications

3. Simulate to be sure if the PD controller meets the

specifications.

50

4. Design the PI controller to yield the required steady-state error.

5. Determine gains KP , KI , and KD

6. Simulate to be sure if all requirements have been met.

Example 9.5 PID controller design

Design a PID controller so that the system can operate with a peak

time that is two-thirds that of the uncompensated system at 20%

overshoot and with zero steady-state error for a step input.

Step 1, Find uncompensated peak time Tp for 20% overshoot

51

Using MATLAB, plot the root locus and find the characteristics ofthe uncompensated system.

’(ch9p2) Example 9.5 PID’ % Display label.

’Uncompensated System’ % Display label.

numg=poly([-8]); % Generate numerator of G(s).

deng=poly([-3 -6 -10]); % Generate denominator of G(s).

G=tf(numg,deng)

pos=20

z=-log(pos/100)/sqrt(pi^2+[log(pos/100)]^2);

% Calculate damping ratio.

K0=[0:1:300];

rlocus(G, K0) % Plot uncompensated root locus.

sgrid(z,0) % Overlay desired percent overshoot line.

title([’Uncompensated Root Locus with ’ , num2str(pos),...

’% overshoot Line’]) % Title uncompensated root locus.

[K,p]=rlocfind(G) % Generate gain, K, and closed-loop

% poles, p, for point selected

% interactively on the root locus.

hold on;

’Closed-loop poles = ’ % Display label.

p % Display closed-loop poles.

f=input(’Give pole number that is operating point ’);

% Choose uncompensated system

% dominant pole.

52

’Summary of estimated specifications for selected point on’

’uncompensated root locus’ % Display label.

operatingpoint=p(f) % Display uncompensated dominant pole.

gain=K % Display uncompensated gain.

estimated_settling_time=4/abs(real(p(f)))

% Display uncompensated settling time.

estimated_peak_time=pi/abs(imag(p(f)))

% Display uncompensated peak time.

estimated_percent_overshoot=pos % Display uncompensated percent overshoot.

estimated_damping_ratio=z % Display uncompensated damping ratio.

estimated_natural_frequency=sqrt(real(p(f))^2+imag(p(f))^2)

% Display uncompensated natural frequency.

53

54

The damping ratio is calculated by

ζ =− ln(%OS/100)

π2 + [ln(%OS/100)]2= 0.456 for %OS = 20%

The uncompensated poles found from the root locus are at

s = σ ± jωd = −5.415± j10.57 at gain K = 121.5. The peak time

is,

Tp =π

ωn√

1− ζ2=

π

ωd= 0.297

Step 2, Design PD controller to reduce Tp to two-thirds

’(ch9p2) Example 9.5 PID’ % ... continued

’reduce peak time to 2/3’

Tp=(2/3)* estimated_peak_time

’new omega_d’

wd=pi/Tp

’angle to operating point’

theta=angle(p(f));

theta_deg=theta*180/pi

55

sigma=wd/tan(theta)

’compensated pole location’

x=sigma+j*wd

plot(sigma,wd,’*b’,sigma,-wd,’*b’);

pause

’add PD controller, additional zero’

angle8=angle(x+8);

angle8d=angle8*180/pi

angle3=angle(x+3);

angle3d=angle3*180/pi

angle6=angle(x+6);

angle6d=angle6*180/pi

angle10=angle(x+10);

angle10d=angle10*180/pi

anglePD=-angle8d+angle3d+angle6d+angle10d-180

anglePD=-angle8+angle3+angle6+angle10-pi;

% wd/(zc+sigma)=tan anglePD

’PD zero location’

zc=wd/tan(anglePD)-sigma

pause

numkv=conv([1 zc],numg); % add (s+zc).

denkv=deng; % denominator is the same.

pdG=tf(numkv,denkv); % Create pdG(s).

pdG=minreal(pdG); % Cancel common poles and zeros.

56

rlocus(pdG) % plot new root locus

Since we have to reduce Tp down to two-thirds,

ωd =π

Tp=

π

(2/3)0.297= 15.87

The line of ζ = 0.456 and ωd = 15.87 yield the compensated poles

are at s = −8.13± j15.87. The angle of the new pole must satisfy,

6 (s+ 8) + 6 (s+ zc)− 6 (s+ 3)− 6 (s+ 6)− 6 (s+ 10) = ±180◦

6 (s+ zc) = 18.37◦ is found from the MATLAB program.

57

(σ + zc) tan 18.36 = 15.87 =⇒ zc = 55.92

Thus, GPD(s) = s+ 55.92

58

Plot the root locus for the compensated system with PD controller.

Using rlocfind(G) find the compensated closed loop poles and

gain. s = −8.13± j15.87 and K = 5.34.

59

Step 4, Design PI controller to make the steady state error to

be zero. The PI controller,

GPI =s+ z0

s=s+ 0.5

s.

reduces the steady state error of Type 0 systems to zero. The value

of z0 is arbitrary as long as z0 is close to the pole at s = 0. Choose

z0 = 0.5.

60

GPID =K(s+ 55.92)(s+ 0.5)

s=

4.6(s+ 55.92)(s+ 0.5)

s

61

=4.6(s2 + 56.42s+ 27.96

s=KD(s2 +

KP

KDs+

KI

KD)

s

Thus, our design is KP = 259.5, KI = 128.6, and KD = 4.6. Step

responses are shown below.

62

63

6 Lead Lag Compensator, adding two zeros

and two poles

Gc(s) = Ks+ zc1s+ pc1

× s+ zc2s+ pc2

The design procedure is as follows:

1. Evaluate the uncompensated system to determine how much

improvement is required in transient response.

2. Design the Phase Lead compensator that meets the transient

response specifications

3. Simulate to be sure if the Lead controller meets the

specifications.

4. Evaluate the steady-state error performance of the

uncompensated system to determine how much more

64

improvement is required.

5. Design the Phase Lag compensator to yield the required

steady-state error.

6. Simulate to be sure if all requirements have been met.

Example 9.6 Lag-Lead compensator design

Design a Lag-Lead compensator such that the system will operate

with 20% overshoot, and a twofold reduction in settling time.

Further, the compensated system will exhibit a tenfold

improvement in steady-state error for a ramp input.

65

Step 1.

20% overshoot yields ζ = 0.456.

ζ =− ln(%OS/100)

π2 + [ln(%OS/100)]2= 0.456 for %OS = 20%

Using the root locus for the uncompensated system, the

intersection of the locus and the 20% overshoot line gives the

operating point,

s = −1.794± 3.501 and Gain K = 192.1

The time constant of the dominant poles is,

T =1

ζωn=

1

1.794= 0.5574, =⇒ Ts = 4T = 2.2297

66

Step 2

We want a twofold reduction in settling time.

Ts (new) = 1.115 =⇒ −ζωn = 2× 1.794 = −3.588

ωd = ζωn tan 117.13◦ = 3.588 tan 117.13◦ = 7.003

In order to have the intersection at -3.588, we have to move the

root locus to left. We can place the zero of the Lead compensator

67

s+ zc1 = 0 to the system pole at s = −6.

The transfer function of the Lead compensated system is

GLead(s) = Ks+ zc1s+ pc1

× 1

s(s+ 6)(s+ 10)

= Ks+ 6

s+ pc1

1

s(s+ 6)(s+ 10)= K

1

s(s+ pc1)(s+ 10)

− 6 s− 6 (s+ pc1)− 6 (s+ 10) = ±180◦

6 s = 117.13◦,

6 (s+ 10) = 6 (−3.588± j7.003)− (−10)

= tan−1

(

7.003

6.4120

)

= 47.5225◦

6 (s+ pc1) = − 6 s− 6 (s+ 10)+180◦ = 47.5225−117.13+180 = 15.3475◦

68

7.003

pc − 3.588= tan 15.3475◦ =⇒ pc = −29.1

Glead(s) = K1

s(s+ pc1)(s+ 10)= K

1

s(s+ 29.1)(s+ 10)

Step 3, 4

69

Thus, K = 1977 is found from the root locus.

Step 5

Glead(s) = 19771

s(s+ 29.1)(s+ 10)

70

This system is of Type 1, so consider the velocity error coefficient

Kv.

Kv = lims→0

sGlead(s) =1977

291= 6.7938 =⇒ e(∞) = 0.1472

The steady state error of the uncompensated system is 0.312,

which must be reduced by a tenfold, i.e. 0.0312.

0.1472× α = 0.0312 =⇒ α = 0.2120 additional error reduction

In terms of gain ratio,

KvN

KvO=zcpc

=1

0.2120= 4.713 =

zc = 0.04713

pc = 0.01

Gc,Lag =s+ 0.04713

s+ 0.01

71

Step 6

Therefore,

GLag,Lead = Ks+ 0.04713

s(s+ 10)(s+ 29.1)(s+ 0.01)

K = 1971 will be found from the root locus.

72

73

The value of K that gives ζ = 0.456 is found from the root locus as

K = 1971.

74

75

76

77