controls project.pdf

13
7/27/2019 Controls PROJECT.pdf http://slidepdf.com/reader/full/controls-projectpdf 1/13 1 Mark Molloy ******** 4/27/06 Linear Controls Systems PROJECT: Design of PID and Lead/Lag Compensators “…This one still has the old ‘tagger’ on it…”  -Nigel Tuffnell, - Spinal Tap 

Upload: feynman2

Post on 14-Apr-2018

255 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 1/13

1

Mark Molloy

********4/27/06

Linear Controls Systems PROJECT:

Design of PID and Lead/Lag Compensators

“…This one still has the old ‘tagger’ on it…”  -Nigel Tuffnell, - Spinal Tap 

Page 2: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 2/13

2

Controls Project

Introduction:

The purpose of this project is to take a given transfer function (in the s-domain), withunity feedback, and design compensators to improve (speed up) the transient response

and drive the steady-state error towards zero.

We analyze two examples from the Norman Nise textbook:

Example 9.5 –  The given specs are 20% O.S. and a reduction of uncompensated ‘peak  

time’ by a factor of 0.6 as well as zero positional steady-state error.

Skill Assessment Exercise 9.3 –  The given specs are 20% O.S. and a reduction of uncompensated ‘settling time’ by ‘2 times’ (a factor of 0.5). 

We are also asked to reduce velocity steady- state error by ‘10 times’ (a factor of 0.1). 

Controls Project – PID Compensator (Example 9.5)

Results:

Our uncompensated transfer function is: 

)10)(6)(3(

8

)(

sss

s

s

 K 

GU   

Constant ‘percent over shoot’ corresponds to a line drawn from the origin at an anglegiven by the damping ratio of the O.S.

We calculate the following:

13.117

)45595.(cos

45595.

1

 

 

 

 

We find the intersection of our function’s root locus with the line: s = -5.4 ± 10.5jThe value of gain (K) at this point is 120.05.

Designing the PD compensator:

We use the s value above to calculate an uncompensated peak time of .2981 seconds.Multiplying by .6 we obtain .17884 seconds as the desired (compensated) peak time.

Page 3: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 3/13

3

We then use the compensated peak time to derive a new ‘s coordinate’ for our 

compensated system.

The σ intercept must be such that the new s coordinate is also on the 20% O.S. line.We find s = -9.003 ± 17.57j satisfies these requirements.

Summing the angles from the open-loop zeros and poles to this point, adding the total to

180 degrees, and subtracting multiples of 360, we find the angle to the derivativecompensator zero is 22.5 degrees. Using these values we find the zero at σ = -51.42Thus our PD compensator is:

)42.51()( ss PD

G  

Designing the PI compensator:This part is relatively easy: An ideal integral compensator must have a single s in the

denominator. We chose the arbitrary pole close to the origin for cancellation purposes,

σ = -0.1Thus our PI compensator is:

s

s

s

)1.()(

 PI G  

Designing the PID compensator:

s

ss

sss

)42.51)(1.()()()(

 K 

GGG PI  PD PID

 

Where K is the gain of the entire PID compensated system at the design point.

However, the design point of the PID will be slightly different from the design point of 

the PD. This is because we now include the zero at – 51.42 in the angle summation.Searching the 20% O.S. line again, summing all the angles of the 4 poles and 3 zeros

we arrive at a PID design point of  s = -8.4 ± 16.48j.

Calculating the gain of the entire PID compensated system at the new design point:K = 6.326

The PID gains are:

K3 = 6.326K2 = 32.53K1 = 3225.92

The table on the following page summarizes our calculated values:

Page 4: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 4/13

4

Uncompensated PD PID

Plant/Compensator 

Dominant Poles

K     

n   

% OS

S T   

 P T   

 P  K   

)(e  

)10)(6)(3(

8

sss

s K  

-5.4 ± 10.5j

120.05.45595

11.84

20

.741

.2981

5.33

.1578

)10)(6)(3(

)42.51(8

sss

ss K  

-9.003 ± 17.57j

7.21.45595

19.75

20

.4443

.1788

16.477

.0572

)10)(6)(3(

1.)42.51(8

ssss

sss K  

-8.4 ± 16.48j

6.326.45595

18.42

20

.4762

.1906

∞ 

0

Simulations:

In this section we run simulations, using our hand-calculated values.We use Matlab to plot a root locus of the final PID compensated system.

We used Simulink to plot the time response of the uncompensated system,

as well as the PD and PID compensated systems.

The figure below shows the M file used to plot the root locus:

Page 5: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 5/13

5

The figure below shows the root locus of the final PID compensated system.

The dominant poles on the 20% OS line (s = -8.58 ± 16.4j) are very close to the

calculated values (s = -8.4 ± 16.48j).

The figure below shows the Simulink schematic for plotting the three time responses.

It contains transfer functions for all three cases listed in the table on page 3:

Page 6: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 6/13

6

Peak Time:The table below shows the calculated values vs. simulink values for the peak time design

spec  1788. P 

T   

As we can see, the PD and PID values exceed the spec: 

Calc. Values Simulink 

2981.Uncomp P T   

1788. PD P 

T   

1906. PID P 

T   

2972.Uncomp P T   

1562. PD P 

T   

1682. PID P 

T   

The figure below shows the transient response of the three cases. This is the source of the

values listed on the right side of the table.

Yellow – UncompensatedPurple – PD Compensated

Blue – PID Compensated

Error:The final figure (on the following page) is the steady-state positional error, as depicted by

simulink for the three cases.As we can see the error is never driven completely to zero (although it is improved

immensely). The following table summarizes calculated vs. simulink values with regard

to the design spec of error = 0:

Page 7: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 7/13

7

Calc. Values Simulink 

0)(

0572.)(

1578.)(

 PID P 

 PD P 

Uncomp P 

e

e

e

 

0510.)(

0570.)(

1570.)(

 PID P 

 PD P 

Uncomp P 

e

e

e

 

The uncompensated and PD simulink values are nearly identical to the calculated values.

However, the PID simulink value does not equal zero.

The figure below shows a zoom used to obtain the values on the right side of the table:

Conclusion:

This was a very successful simulation.All detail calculations are included in the end of this report.

Page 8: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 8/13

8

Controls Project – Lead/Lag Compensator (Skill Assessment Ex 9.3)

Results:Here we are to design a Lead / Lag compensator for the following transfer function:

)7()(

ss

s K 

GU 

 

Coincidentally we have the same line drawn at 117 degrees as the previous section.(Corresponding to a 20% OS):

13.117

)45595.(cos

45595.

1

 

 

 

 

We find the intersection of our functions root locus with the line is s = -3.5 ± 6.8jThe value of gain (K) at this point is 58.49.

From the σ = -3.5 value, we calculate the uncompensated settling time as 1.1429 seconds.

Our design spec is to reduce this by half (1.1429/2 = .57143 seconds).We use this new settling time to calculate design point of the σ-intercept of the new

dominant pole locations, s = -7 ± 13.5j.

Lead Design:

The instructions of this exercise specify the lead zero to be at σ = -3.

Summing angles we find the angle to the lead pole is 79 degrees and its location is

σ = -9.53. Thus our lead compensator takes the form:

)53.9(

)3()(

s

s

s Lead 

G  

Lag Design:

Multiplying the uncompensated function by the lead compensator and calculating thegain at the lead compensated design point, we find K = 200.3

Using this value to calculate the velocity error, we find a modest improvement over the

uncompensated error (see table).

We find an ‘improvement still needed factor ’ of 9.276. We use this, along with a chosen lag pole location of .01 to calculate the lag zero location

of  σ = -.09276. Thus our lag compensator takes the form:

)01.(

)09276.()(

s

s

s Lag G  

So our lead/lag compensator takes the form:

)53.9)(01.(

)09276.)(3()()()(

ss

ss

sss

 K GGG  Lag  Lead  LLC   

Page 9: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 9/13

9

Where K = 200.03 at the design point.

The table below summarizes the calculated values:

Uncompensated Lead/Lag

Plant/Compensator 

Dominant Poles

K     

n   

% OS

S T   

 P T   

 K  )(e  

)7( ss

 K   

-3.5 ± 6.8j

58.49.45595

7.67

20

1.143.4620

8.356

.11968

)53.9)(7)(01.(

)09276.(3

ssss

ss K   

-7 ± 13.5j

200.03.45595

15.35

20

.571

.2327

83.44

.01197

Simulations:

In this section we ran simulations, using our hand-calculated values.

We used Matlab to do a root locus of the final Lead/Lag compensated system.We used Simulink to plot the time responses of the uncompensated and

Lead/Lag systems. The figure below shows the M file used to plot the root locus:

The figure below shows the root locus of the final Lead/Lag compensated system.

Page 10: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 10/13

10

The dominant poles on the 20% OS line (s = -6.93 ± 13.5j) are virtually identical to the

calculated values (s = -7 ± 13.5j).

The figure below shows the simulink schematic for plotting the time response.

It contains transfer functions for both cases listed in the table on page 9:

Page 11: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 11/13

11

Settling Time:

The table below shows the calculated vs. simulink values for the design spec of 

5710.S 

T   

As we can see, the simulink compensated value is slightly longer than the spec:

Calc. Values Simulink 

143.1UncompS T   

5710. LLS 

T   

095.1UncompS T   

6300. LLS 

T   

The figure below shows the transient response of the three cases. This is the source of the

values listed on the right side of the table above.

Yellow – Uncompensated

Purple – Lead/Lag Compensated

Page 12: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 12/13

12

Error:

The following figure depicts the steady-state velocity error. The traces are color coded asfollows:

Yellow – Input Ramp

Purple – Uncompensated,Blue – Lead/Lag CompensatedAs we can see below, the initial improvement in error is miniscule.

What is happening is this: The lag open-loop pole is very close to the origin, which

 produces a very long transient response.

The following two figures make this very clear.

The figure below shows the three traces from 2 to 2.5 seconds. The error of thecompensated system shows little improvement over the uncompensated system during thistime. However in the figure on the next page, (showing the three traces around 196

seconds) we can see the ramp error is vastly improved and within specs.

Page 13: Controls PROJECT.pdf

7/27/2019 Controls PROJECT.pdf

http://slidepdf.com/reader/full/controls-projectpdf 13/13

13

Calc. Values Simulink 

0119.)(

1190.)(

 LLV 

UncompV 

e

0120.)(

1200.)(

 LLV 

UncompV 

e

Conclusion:

The was a successful simulation in that it was very close to specs (settling time / steady

state velocity error), however, if this were a real device, the 2 minute delay in reaching

error specs would be most likely unacceptable and require further revision.See detail calculations included.