ee 4314 comphnvhvn

26
EE 4314 Examples on Compensator Design Spring 2011

Upload: salimseif1

Post on 04-Jun-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 1/26

EE 4314

Examples on Compensator Design

Spring 2011

Page 2: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 2/26

Stability Margins

Gain margin: (GM): Factorby which the gain can beraised before instability

results Phase margin (PM):

Amount by which the

phase of G(jω) exceeds-180° when |KG(jω)|=1 

Page 3: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 3/26

Stability Margins

GM and PM are measuresof how close the Nyquistplot comes to encircling

the -1 point

Page 4: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 4/26

Lead Compensator Design Summary

Page 5: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 5/26

Lag Compensator Design Summary

Page 6: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 6/26

Design Example – Root Locus (p. 261)

G s     s  e   s

  160  s 2.5  s 0.7

 s2 5 s  40  s2 0.03 s 0.06

The transfer function between theelevator input and the pitch attitude

is

where

is the pitch angle* (degrees)

is the elevator angle (degrees)

 

 

 e

Design the controller so that

1. Rise time of 1 sec or less2. Overshoot less than 10%

* see sec 10.3 for details

Page 7: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 7/26

Design Example – Root Locus

According to the specifications:

From (3.60) p.116:

t r  

 1.8

 n

From (3.64) p.118:

 M  p  e   / 1   2

 

 n 1.8   rad /sec

 

   0.6

As a result, desired closed-loop pole should be at:

 p      j d 

where

    n

 d   n   1 2 (3.56) p.112

Page 8: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 8/26

Design Example – Root Locus

Let’s look at open loop response of the system, by using Matlab: 

>> num = 160 .* conv([1 2.5], [1 0.7]);>> den = conv([1 5 40], [1 0.03 0.06]);>> sysOl = tf(num, den);>> step(sysOl)

Page 9: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 9/26

Design Example – Root Locus

Now, look at the root locus of the system:

>> Wn = 1.8;

>> DR = 0.6;>> sigma = DR * Wn;>> Wd = Wn * sqrt(1 - DR^2);>> p = -sigma + j*Wd;>> q = -sigma - j*Wd;>> rlocus(sysOl)>> hold on

>> plot(p, '*')>> plot(q, '*')>> grid on

Page 10: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 10/26

Design Example – Root Locus

Root Locus Plot

Page 11: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 11/26

Design Example – Root Locus

Using “rlocfind” command to find the gain K that yield the closed-looppoles that locate as close to the desired poles location as possible:

>> rlocfind(sysOl)Select a point in the graphics window

selected_point =

-0.9755 + 0.4105i

ans =

0.3260

Use K = 0.3260

Page 12: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 12/26

Design Example – Root Locus

Use proportional gain K = 0.326 to see if it gives satisfactory close-

loop response:

>> sysClP = feedback(0.326*sysOl, 1)

Transfer function:52.16 s^2 + 166.9 s + 91.28

--------------------------------------------s^4 + 5.03 s^3 + 92.37 s^2 + 168.4 s + 93.68

>> step(sysClP)

The overshoot is greater than10 %, rise time is okay.

Page 13: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 13/26

Design Example – Root Locus

Since proportional control is not enough, we can use leadcompensator – as a lead compensator would shift the root locusfurther to the left (lowering rise time and decreasing the transientovershoot (p. 249).

From p. 250, the zero of the lead compensator should be placed in

the neighborhood of the desired closed-loop Wn, and the poleof the lead compensator should be 5 to 20 times of the value of thezero. Let’s pick z = 2 (as Wn = 1.8) and p = 2 * 10 = 20. 

 D s  K   s 2

 s 20

Page 14: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 14/26

Design Example – Root Locus

Now pick gain K of the lead compensator:

>> lead = tf([1 2], [1 20]);>> sysLead = lead * sysOl;>> rlocus(sysLead)>> hold on>> plot(p, '*')>> plot(q, '*')>> grid on>> hold off

>> rlocfind(sysLead)Select a point in the graphics window

selected_point =

-8.7708 +14.3523i

ans =

1.7599

Page 15: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 15/26

Design Example – Root Locus

Simulate the step response of the new closed-loop system:

>> sysClLead = feedback(1.7599 * sysLead, 1)

Transfer function:281.6 s^3 + 1464 s^2 + 2295 s + 985.5

------------------------------------------------------s^5 + 25.03 s^4 + 422.4 s^3 + 2270 s^2 + 2327 s + 1034

>> step(sysClLead)

Page 16: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 16/26

Design Example – Root Locus

 D s 1.7599  s 2

 s 20

Page 17: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 17/26

Design Example – Compensator Design from Freq. Response

Example 6.17 (p. 358) – a Type 1 Servomechanism System

 KG s  K    10 s s /2.5 1  s /6 1

Design a lead compensator so that the PM = 45° and Kv = 10.

From p. 356:

Step 1: Pick K to satisfy error constant

from p. 181

 K v  lim s0

 sK G s  K    100 1 0 1

 K   1

D i E l C t D i f F R

Page 18: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 18/26

Design Example – Compensator Design from Freq. Response

Step 2: Evaluate the PM of the uncompensated system using Kobtained from step 1

>> Gs = tf(10, conv([1 0], conv([1/2.5 1], [1/6 1])))

Transfer function:10

----------------------------0.06667 s^3 + 0.5667 s^2 + s

>> [mag, phase, w] = bode(Gs);>> [GM, PM, Wcg, Wcp] = margin(mag, phase, w)

GM =

0.8540

PM =

-4.1158

Wcg =

3.8730

Wcp =

4.1910

Page 19: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 19/26

Design Example – Compensator Design from Freq. Response

Step 3: Add extra margin (about 5-10°) and determine the phase lead

 max 45o

5o

(4o

)

54o

Step 4: Determine from (6.40) p. 349: 

 

   1 sin max

1 sin max

 

   0.1

Step 5: Pick at the crossover frequency: ma x

1/T   m ax    

T   0.5

 

 D s   Ts 1

 Ts 1

  0.5 s 1

0.05 s 1

Page 20: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 20/26

Design Example – Compensator Design from Freq. Response

Step 6: Draw the compensated frequency response and check the PM:

>> lead = tf([0.5 1], [0.05 1]);>> sysLead = lead * Gs;>> [mag, phase, w] = bode(sysLead);>> [GM, PM, Wcg, Wcp] = margin(mag, phase, w)

GM =

2.3204

PM =

22.9367

Wcg =

11.5132

Wcp =

7.2994

Page 21: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 21/26

Design Example – Compensator Design from Freq. Response

We can use “sisotool” command to find GM, PM, Wcp, Wcg: 

>> sisotool(sysLead)

Page 22: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 22/26

Design Example – Compensator Design from Freq. Response

Step 6: Iterate on the design until all specifications are met.Add an additional lead compensator if necessary.

We can see that with only on lead compensator, we can only get thePM of 23°.

So, we need to repeat Step 1 – Step 5 again to add additional leadcompensator.

Assuming the second iteration gives:

 D s   Ts 1

 Ts 1

  0.25 s 1

0.025 s 1

Page 23: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 23/26

Design Example – Compensator Design from Freq. Response

Let’s check the PM new compensated system: 

>> secondLead = tf([0.25 1], [0.025 1]);

>> sysDoubleLead = secondLead * sysLead;>> [mag, phase, w] = bode(sysDoubleLead);>> [GM, PM, Wcg, Wcp] = margin(mag, phase, w)

GM =

3.8669

PM =

45.6362

Wcg =

30.7887

Wcp =

13.7805

Page 24: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 24/26

Design Example – Compensator Design from Freq. Response

The overall compensator becomes:

 D s   0.5 s 1(0.05 s 1)

0.25 s 1(0.025 s 1)

Let’s take a look at the step responses of the compensated system: 

>> sysLeadCl = feedback(sysLead, 1);>> sysDoubleLeadCl = feedback(sysDoubleLead, 1);>> step(sysLeadCl)>> hold on>> step(sysDoubleLeadCl)>> hold off>> grid on>> legend('Single Lead Compensator', 'Double Lead Compensator')

Page 25: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 25/26

Design Example – Compensator Design from Freq. Response

Step responses of the single lead compensator system vs doublelead compensator system

Page 26: Ee 4314 Comphnvhvn

8/13/2019 Ee 4314 Comphnvhvn

http://slidepdf.com/reader/full/ee-4314-comphnvhvn 26/26

Compensator Design Conclusion

Lead Compensator => PD Controller

• Speed up system response• Lowering the rise time•

 Decreasing the overshoot

Lag Compensator => PI Controller

• Improve steady-state accuracy