Top Banner
Department of Automatic Control and Systems Engineering Overheads for ACS211 Systems analysis and control Anthony Rossiter Department of Automatic Control and Systems Engineering University of Sheffield www.shef.ac.uk/acse © University of Sheffield 2009 This work is licensed under a Creative Commons Attribution 2.0 License .
39

Systems Analysis & Control: Steady State Errors

Dec 06, 2014

Download

Education

jarossiter

In the context of control engineering feedback loops, these slides describe how to find the steady-state error between a target and the system.
Links to more slides at

http://controleducation.group.shef.ac.uk/OER_index.htm
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Overheads for ACS211 Systems analysis and control Anthony Rossiter

Department of Automatic Control and Systems Engineering

University of Sheffieldwww.shef.ac.uk/acse

© University of Sheffield 2009 This work is licensed under a

Creative Commons Attribution 2.0 License.

Page 2: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Contents• ACS211: Compensation and steady-state errors• Final value theorem (FVT)• Fast response• Illustration of offset• What about the inputs?• Gain insufficient• Examples• MATLAB CODE• Offset free tracking• Offset free tracking requirement (steps).• Integral action• MATLAB CODE• Tutorial questions (at home)• Tracking ramps• Offset to ramps• Solutions• Figures for 1st and 3rd pairs (errors only)• Zero offset to ramps• Tutorial questions (at home)• Figures for offsets• Extra tutorial question: validation• Examples of closed-loop transfer functions• Reminders• Given • MATLAB code to investigate k• Credits

Page 3: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

ACS211: Compensation and steady-state errors

Anthony Rossiter

Dept. ACSE

3

Some of this is revision of ACS114

Page 4: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Final value theorem (FVT)

For analysis of offset, students should be able to prove the following (was done in ACS114).

Examples:

4

)(lim)(lim 0 ssYty st

)}1(2

1)({;

2

1)(lim

)2(

1)(

})({;0)(lim)2)(1(

1)(

})({;0)(lim2

1)(

20

20

20

ts

tts

ts

etyssYss

sY

eetyssYss

sY

etyssYs

sY

Convergent signals only

Page 5: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Fast response

• How do we get a system to respond fast to an error between target and output?

• What is the mathematical expression for this?

• Why is this law insufficient to give offset free tracking in general?

5

Think about this for a few minutes and tell me.

Page 6: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

In these slides assume following feedback structure

6

Page 7: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Illustration of offset

G=tf(1,[1 3 2])

K=1;

K2=10;

figure(1);clf reset

step(feedback(G*K,1),feedback(G*K2,1));

hold on

plot([-0.1,0,0,4],[0,0,1,1],'r');

axis([-0.1 4 0 1.2]);

legend('K=1','K2=10','target');

7

Note how as gain increases, speed of response improves, but always an offset.

0 0.5 1 1.5 2 2.5 3 3.5 40

0.2

0.4

0.6

0.8

1

1.2

Step Response

Time (sec)

Am

plitu

de K=1

K2=10

target

offset

23

12

ss

G

Page 8: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

What about the inputs?

Note how the input amplitude depends upon the error (target –output) and the gain K.

A bigger gain means a bigger initial input so a faster response and a smaller offset.

8

0 0.5 1 1.5 2 2.5 3 3.5 40

0.5

1

Outputs

Time (sec)

Am

plitu

de

K=1

K2=10

target

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-5

0

5

10Inputs

Time (sec)

Am

plitu

de

In steady-state we have consistency from:y=G(0)u, u=K(r-y) which gives y=[G(0)K/(1+G(0)K)] r

Page 9: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Gain insufficientIt is clear that gain alone is insufficient

to remove offset.

9

)()()(1

1)(

)()())()(1(

)()()()()()()()(

)()()()(

srsKsG

se

srsesKsG

sesKsGsrsesesKsu

susGsrse

Let r(s)=(1/s) and use FVT. )0()0(1

11.)()(1

1lim)(lim 00 KGssKsG

ssse ss

Page 10: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Examples

Find the steady state offset for the following, system controller pairs, assuming the target is a unit step.

10

8)2)(10(

1;

5.0133

1;

212

1232

Kss

G

Ksss

G

Kss

G

Page 11: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Answers

System 1

System 2

System 3

11

3

1

21

1

)0()0(1

1

KG

8)2)(10(

1;

5.0133

1;

212

1232

Kss

G

Ksss

G

Kss

G

3

2

5.01

1

)0()0(1

1

KG

71.028

20

)208(1

1

)0()0(1

1

KG

0 1 2 3 4 5 6 70

0.5

1ERRORS

Time (sec)

Amplit

ude

0 1 2 3 4 5 6 7 8 9 10

0.70.80.9

Step Response

Time (sec)Am

plitud

e

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

0.70.80.9

Step Response

Time (sec)

Amplit

ude

Page 12: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

MATLAB CODEG1=tf(1,[1 2 1])

K1=2;

G2=tf(1,[1 3 3 1])

K2=0.5;

G3=tf(1,[1 12 20])

K3=8;

figure(1);clf reset

subplot(311)

step(feedback(1,G1*K1));

title('ERRORS','Fontsize',18)

subplot(312)

step(feedback(1,G2*K2));

subplot(313)

step(feedback(1,G3*K3));

12

Note there are spaces between these numbers, so it is [1 space 3 space 3 space 1]

You can use commas if that is easier to read

You may be able to copy and past this code straight into MATLAB from the PDF file.

Page 13: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Offset free tracking

• What conditions are required for offset free tracking of steady targets? how do we control speed in a car? what are the key steps and concepts? what form of control law is this?

• Having understood the key concept, can we prove this mathematically?

13

Page 14: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Offset free tracking requirement (steps).

Begin from the FVT [Assume target is a unit step or 1/s ]

It is clear that e(t) tends to zero if and only if the term G(0)K(0) is infinite.

14

)0()0(1

11.)()(1

1lim)(lim)(lim 00 KGssKsG

sssete sst

Zero offset requires either G(s) or K(s) to include an integrator that is a term of the form (1/s).

Clearly with no cancelling derivative term

Page 15: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Integral actionMost practical control laws include an

integrator to ensure offset free tracking of constant targets.

15

sK

sssG

sK

ssG

2.0133

1

4.012

1

23

2

0 5 10 15 20 25-0.5

0

0.5

1ERRORS

Time (sec)

Am

plitu

de

0 5 10 15 20 25 30 35-0.5

0

0.5

1

Time (sec)

Am

plitu

de

Page 16: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

MATLAB CODEG1=tf(1,[1 2 1])

K1=tf(0.4,[1 0]);

G2=tf(1,[1 3 3 1])

K2=tf(0.2,[1 0]);

figure(2);clf reset

subplot(211)

step(feedback(1,G1*K1));

title('ERRORS','Fontsize',18)

subplot(212)

step(feedback(1,G2*K2));

title(' ','Fontsize',18)

16

Note the term [1 0] defines (s+0)

i.e. coefficient of 1 on s and coefficient of 0 on the constant

Page 17: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Tutorial questions (at home)

Find the offset for a unit step target for the following pairs of compensators and systems.

Validate all your answers with MATLAB.

17

8.035

)3(;

)2(6.0

235

1

;4

12

3

8)4)(2)(1(

)3(;

6.0235

1;

432

1

23232

232

Ksss

sG

s

sK

sssG

sK

ss

sG

Ksss

sG

Ksss

G

Kss

G

One is not as expected. WHY?

Page 18: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

18

0 1 2 3 4 5 60

0.5

1ERRORS

Time (sec)

Am

plitu

de

0 5 10 15 20 25

0.70.80.9

Step Response

Time (sec)

Am

plitu

de

0 0.5 1 1.5 2 2.5 3 3.5 4 4.50

0.5

1Step Response

Time (sec)

Am

plitu

de

Figures for previous page

0 50 100 150-2

0

2x 10

6 ERRORS

Time (sec)

Am

plitu

de

0 50 100 150 200 250 300 350-1

0

1

Time (sec)

Am

plitu

de

0 2 4 6 8 10 12 14-1

0

1

Time (sec)

Am

plitu

de

Page 19: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Tracking ramps

1. Why would you want to track a ramp given this diverges to infinity?

2. How would you compute the offset to a ramp target?

3. How will an actuator supply an input big enough to track a ramp in general?

Discuss this with you neighbours briefly.

19

WARNING: When using MATLAB, remember only to compute convergent signals, hence you cannot easily plot ramp responses which go to infinity.

Page 20: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Targets that are ramps

May operate over limited time scales.

Circular motion (DVD players, etc.).

As input energy is limited, usually ramps can only be tracked asymptotically where the system model itself contains an integrator.

20

Page 21: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Offset to rampsRevert back to the FVT but now use a target

of r(s)=(1/s2). [or scaled variant as appropriate]

Clearly, the error diverges to infinity unless there is an integrator in G(s) or K(s).

21

2

1.)()(1

1)(

)()(1

1)(

ssKsGsr

sKsGse

)()(

11.)()(1

1lim)(lim)(lim

200 sKssGor

ssKsGsssete sst

)()(

1lim)(lim 0 sKssG

te st

Page 22: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

ExamplesFind the offset to a ramp r=(1/s2) for

the following compensator system pairs.

22

sK

sssG

s

sK

sssG

sK

ssG

2.0133

1

)4(

)3(2.0133

1

;4.012

1

23

232

Page 23: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

ExamplesFind the offset to a ramp r=(1/s2) for

the following compensator system pairs.

23

sK

sssG

s

sK

sssG

sK

ssG

2.0133

1

)4(

)3(2.0133

1

;4.012

1

23

232

Page 24: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

SolutionsFind the offset to a ramp r=(1/s2) for

the following compensator system pairs.

24

5;2.0)()(lim2.0

133

1

;0)()(lim

)4(

)3(2.0133

1

5.2;4.0)()(lim4.012

1

0

23

0

23

0

2

esKssG

sK

sssG

esKssG

s

sK

sssG

esKssG

sK

ssG

s

s

s

Page 25: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Figures for 1st and 3rd pairs (errors only)

25

0 2 4 6 8 10 12 14 16 18 200

5

10

15

20ERRORS

Time (sec)

Am

plitu

de

0 2 4 6 8 10 12 14 16 18 200

5

10

15

20

Time (sec)

Am

plitu

de

ramp=0:20;time=ramp; G1=tf(1,[1 2 1])K1=tf(0.4,[1 0]);G2=tf(1,[1 3 3 1])K2=tf(0.2,[1 0]);figure(2);clf resetsubplot(211)lsim(feedback(1,G1*K1),time,ramp);title('ERRORS','Fontsize',18)subplot(212)lsim(feedback(1,G2*K2),time,ramp);title(' ','Fontsize',18)

Page 26: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Zero offset to ramps

Look at the FVT and determine how to get zero offset for a ramp target.

Tell me what you think.

26

Page 27: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Zero offset to ramps

Clearly, zero offset requires two integrators in G(s)K(s) so that:

Warning: Throughout we have assumed a simple feedback structure. You must modify all rules if the feedback structure is different (e.g. more compensators, something in return path, etc.).

27

0)(

lim)()(

1lim

)()()(

2

002 ssM

s

sKssGs

sMsKsG ss

Page 28: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Tutorial questions (at home)

Find the offset for a ramp target r=(1/s2) for the following pairs of compensators and systems.

Validate all your answers with MATLAB.

28

8.035

)3(;

)2(6

35

1

;4.012

3

2)4)(2)(1(

)3(

;6.035

1;

432

1

23232

232

Ksss

sG

s

sK

sss

sG

sK

ss

sG

sK

sss

sG

Ksss

G

Kss

G

Page 29: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Tutorial questions for home

1. How might you deal with targets that are parabola?

2. Why in general would a controller containing proportional and integral be a good idea? [Usually denoted PI and the most common structure in industry].

3. Industry often uses PID. What does the D stand for and why does this help? What problems can it introduce? [Look at some books if you are stuck]

29

Page 30: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Figures for offsets30

2 4 6 8 10 12 14 16 18 200

10

20ERRORS

Time (sec)

Amplit

ude

2 4 6 8 10 12 14 16 18 200

10

20Linear Simulation Results

Time (sec)

Amplit

ude

2 4 6 8 10 12 14 16 18 200

10

20Linear Simulation Results

Time (sec)

Amplit

ude

2 4 6 8 10 12 14 16 18 200

10

20ERRORS

Time (sec)

Ampl

itude

2 4 6 8 10 12 14 16 18 20-20

0

20

Time (sec)

Ampl

itude

2 4 6 8 10 12 14 16 18 200

10

20

Time (sec)

Ampl

itude

Page 31: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Extra tutorial question: validation

MATLAB can be used to validate your computations in several easy ways:

1. Compute and display closed-loop responses as in these notes.

2. Compute closed-loop transfer function explicitly and evaluate steady-state gain.

G1=tf(1,[1 2 3])

K1=4;

G2=tf(1,[1 5 3 0])

K2=0.6;

Gc1=feedback(G1*K1,1)

gain1=bode(Gc1,0)

Gc2=feedback(G2*K2,1)

gain2=bode(Gc2,0)

31

Page 32: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Examples of closed-loop transfer functionsTry these examples by hand and with

MATLAB:

Gc(0) gives steady-state output for a step input r(s)=1/s.

32

1)0(6.035

6.0

6.035

1

57.07

4)0(

72

4

432

1

2323

22

cc

cc

Gsss

GK

sssG

Gss

GK

ssG

Page 33: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Reminders1. The closed-loop must be stable or the FVT does

not apply.

2. Next we will consider how to determine whether a closed-loop is stable or not and also whether performance is expected to be good or bad.

3. In previous years the lecturer spent some time on state space models. I have omitted this year to avoid overload, however awareness of state space is essential in the longer term. Spend a few hours looking at this in the text books. The lecturer of ACS214/206 will assume some familiarity!

4. State space is introduced formally in year 3.

33

Page 34: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Given s

sksK

ssG

2)(;

3

2)(

1. Find the closed-loop transfer functions from target to input and target to output.

2. Find the open-loop and closed-loop poles for k=1. Which are better and why?

3. Determine the open-loop (usual to ignore K(s) for open loop) and closed-loop offset for a unit step and unit ramp.

4. Propose a value for k. Give a justification.

Page 35: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Given

1. Find the closed-loop transfer functions from target to input and target to output.

2. Find the open-loop and closed-loop poles for k=1. Which are better and why?

;)3()2(2

)3)(2(2

1)(

;)3()2(2

)2(2

1)(

sssk

ssk

GK

KsG

sssk

sk

GK

GKsG

cu

cy

s

sksK

ssG

2)(;

3

2)(

);3(

);4)(1(451

;4)32()3()2(22

2

ssp

sssspk

ksksssskp

o

c

c

Page 36: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

Given s

sksK

ssG

2)(;

3

2)(

• Determine the open-loop (usual to ignore K(s) for open loop) and closed-loop offset for a unit step and unit ramp.

Open-loop steady-state for a step is 2/3. Offset for a ramp will be infinite.

Closed-loop steady state errors are

• Best value for k involves a compromise between speed of response and input activity. See MATLAB for illustration.

2.2.

31)(;0

)0()0(1

1)(

ksGKrampe

KGstepe

Page 37: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

MATLAB code to investigate k

G=tf(2,[1 3]); K=tf([1 2],[1 0]);

Gcy=feedback(G*K,1); Gcu=feedback(K,G);

figure(1);clf reset

pzmap(Gcy);

step(Gcy,Gcu);legend('Output','Input');

figure(1);clf reset

k=1:.5:4;clear u y t

t=linspace(0,2,200);

for kk=1:7;

[y(:,kk),tt]=step(feedback(G*K*k(kk),1),t);

[u(:,kk),tt] = step(feedback(K*k(kk),G),t);

end

subplot(211); plot(t,y);

subplot(212);plot(tt,u);

legend('k=1','k=1.5','k=2','k=2.5','k=3','k=3.5','k=4');

Page 38: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

How fast can response get?

Use MATLAB to try a very large value of k

step(feedback(G*K*1000,1),t)

Where do poles go as k tends to infinity?

Page 39: Systems Analysis & Control: Steady State Errors

Department of Automatic Control and Systems

Engineering

This resource was created by the University of Sheffield and released as an open educational resource through the Open Engineering Resources project of the HE Academy Engineering Subject Centre. The Open Engineering Resources project was funded by HEFCE and part of the JISC/HE Academy UKOER programme.

© 2009 University of Sheffield

This work is licensed under a Creative Commons Attribution 2.0 License.

The name of the University of Sheffield and the logo are the name and registered marks of the University of Sheffield. To the fullest extent permitted by law the University of Sheffield reserves all its rights in its name and marks which may not be used except with its written permission.

The JISC logo is licensed under the terms of the Creative Commons Attribution-Non-Commercial-No Derivative Works 2.0 UK: England & Wales Licence.  All reproductions must comply with the terms of that licence.

The HEA logo is owned by the Higher Education Academy Limited may be freely distributed and copied for educational purposes only, provided that appropriate acknowledgement is given to the Higher Education Academy as the copyright holder and original publisher.

Where Matlab® screenshots are included, they appear courtesy of The MathWorks, Inc.