25
Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots by hand (when we could have used a computer program to generate sketches). How might this be useful? C a n m o r e c l e a r l y s e e h o w individual terms affect system performance and system output. Easier to understand why different changes in the control loop might be used compensate for specific shortcomings and specific terms in the system. 1

Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Embed Size (px)

Citation preview

Page 1: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Last day:

(1) Identify individual entries in a Control Loop Diagram

(2) Sketch Bode Plots by hand (when we could have used a computer

program to generate sketches).

How might this be useful?

• Can more clearly see how individual terms affect system performance and system output.

• Easier to understand why different changes in the control loop might be used compensate for specific shortcomings and specific terms in the system.

1

Page 2: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

• Defining stability

• Interpreting stability from the magnitude and phase plots

2

Stability

Page 3: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Stability - definition

“A stable system is a system which generates a bounded output when given a bounded input.”

• E.g. a sine wave input results in a sine wave output that doesn’t grow unbounded until the system finally “breaks”.

• Resonance is still acceptable (the output can become very large, as long as it does not become unbounded)

• In analyzing systems, we are MOST concerned about stability in Feedback Loops. Let's have a closer look at how a Feedback Loop might become unstable by looking at a Feedback Loop Diagram.

3

Page 4: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

A closer look at Feedback Loop diagram for simplification:

Calculate the output

Value using Algebra:

Y = G * Error

= G * (X-FY)

= GX - GFY

Y * (1+GF)=G X

Y/X= G/(1+GF)

GF

G

X

YH

1

G(s)

F(s)

+

-

X(s) Y(s)

Motor and amplifier behaviour

Sensor behaviour

Error

Where:

G= forward transfer function

GF = loop transfer function

This is the transfer function for a Feedback Loop!

4

Page 5: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Aside – general ru les for S imp lifying System B lock Diagrams

• You can often derive the overall transfer function of a system using just the System Block Diagrams

• The final result may have just a single block containing all the original control, process and feedback blocks

• Simplify the diagram by combining functions together at the different nodes.

5

Page 6: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Image from:http://www.indianshout.com/control-systems-study-material-block-diagram-reduction/2152

Aside: Rules for simplifying block diagrams:

This is a feedback loop

simplification. We just

solved for this

relationship on Slide 4!

6

Page 7: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

This is the ultimate simplification of a feedback system, into a

single step

X(s) Y(s)

)()(1

)(

sFsG

sG

7

G(s)

F(s)

+

-

X(s) Y(s)

Motor and amplifier behaviour

Sensor behaviour

Error

Page 8: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

For feedback loops, putting the feedback loop into this form is

useful to identify something important about stability of the

system.

X(s) Y(s)

)()(1

)(

sFsG

sG

GF

G

X

YH

1

overall transfer function

Major Question: What happens when GF gets to be a

value of -1?

● H gets bigger and bigger, becoming an unstable

system.

• GF can become -1 depending on the gain and

phase of the system. This is the whole point of

stability analysis, to determine the gain and phase

when the system becomes unstable..8

Page 9: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Stability analysis usually assumes that the feedback element F(s) =1

(unity gain) , in order to simplify the analysis.

• Most of the time, stab ility ana lysis in contro l theory assumes that the feedback ga in is a constant value of 1. This simplifies analysis to just looking at the true open-loop gain G(s):

X(s) Y(s)

)(1

)(

sG

sG

G

G

X

YH

1

overall transfer function

X(s) G(s)

1

+-

Y(s)

Therefore, H becomes unstable if G ever

becomes a value of -1

G is called the open-loop gain since G is the

gain in the system if the feedback loop is

removed.9

Page 10: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Stability comes from avoiding G(s)=-1

• G(s) = -1 when magnitude plot = 1 = 0 dB, and phase plot* = -180 degrees

• A stable system is one where the open-loop gain is less than 1 when the open-loop phase

angle is -180 degrees

• An unstable system is one where the open-loop gain is greater than 1 at the same time that the

open-loop phase is -180 degrees (since this guarantees that at some point, the value G(s)

would be “equal” to -1**)

Aside:

( * the word “phase” is from the fact that “s”, H(s), and G(s) are all really complex number (with real

and imaginary components), which can be represented with a magnitude and phase value )

( **actually, this is only the “real” part of G(s) which equals -1, since G(s) is a complex # with real

and imaginary parts, but really that doesn’t matter in this analysis, it still guarantees that the

system will become unstable at some point )

10

Page 11: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

For clarification: Why analyze the open-loop response instead of the

closed-loop response directly?

X(s) Y(s)

)(1

)(

sG

sG

Why not analyze this entire expression

H(s) instead of just analyzing G(s)?

Because G(s) remains bounded and stable even as the entire expression H(s)

becomes unstable. That is, the open-loop system can remain stable, but as soon as

it is used in a feedback loop there is a chance that the entire system will inherently

become unstable!

We can use Bode plots and straight-line asymptotes to examine G(s) even when the

system becomes unstable, but we don’t have any tools to accurately analyze H(s) as

the entire expression becomes unbounded and unstable.

H(s)

Page 12: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

You check stability by looking at the gain and phase margin of the open-loop system

12

Plot from lecture notes, 8B, pg. 12

• Gain Margin- the amount of gain that you could add to the system before reaching a gain of 1 = 0 dB. Measured at the phase

crossing frequency (phase = +/-1800)

• Phase Margin- the amount of phase you could add/subtract to the system before

reaching +/-1800. Measured at the gain crossing frequency (gain = 1 = 0dB)

wgain_cross= gain crossing (frequency at which gain =

0dB, and where the phase margin is measured)

wphase_cross= phase crossing (frequency at which

phase = +/- 180deg, and where gain margin is measured)

wgain_cross w phase_cross

Magnitude plot

Phase plot

-180

0

0db

Page 13: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

What can you do with the gain and phase margin?

• Te lls you how much proportiona l gain (k) you can add to the system (to make the system operate faster) without becoming unstable.

• Tells you how you might select and design a controller to compensate for aspects of the system (e.g. PID) to increase stability or improve performance

13

Page 14: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

14

Changing the Performance by using

Controllers/Compensators

• Controllers alter the Bode Plots of the overall system

• PID controls revisited

• Improving performance with Controllers / Compensators

Page 15: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Some Terminology

• Controllers/Compensators

– An operation introduced into a control loop to make it operate in a desired way (rise time, fall time, stability, etc).

• Bandwidth

– The range of frequencies over which a system “operates”.

– Sometimes defined as the range of frequencies over which the magnitudes exceeds some arbitrary threshold (e.g. gain of 1, magnitude of -40dB, magnitude of 0.05, etc).

– In control theory, often defined as a drop of -3dB drop from the maximum value (a drop of 1/sqrt(2)).

15

Page 16: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

16Images from: http://rf-filter-circuits.blogspot.com/

Bode plot of pole (aka “lowpassfilter”)

(bandwidth = FC– 0 = FC)

BandpassFilter (bandwidth = FH– FL)

BandpassFilter with narrow band

(bandwidth = FH– FL)

Aside: Why is -3 dB drop used?

-3dB = 20 log(0.7071...) = 20 log (1 /sqrt(2))

A -3 dB drop is equal to a drop of 1/sqrt(2) in the

magnitude of the signal. This means thesquareof the

amplitude drops by a factor of 2 at the -3dB point. This is

also called the half-power point (“power” is usually the

magnitude squared)... Don’t worry, not mentioned again in

this course)

FC= corner frequency, FH= high cutoff frequency, FL= low cutoff frequency

Bode Plots – bandwidth measurements

Page 17: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Controllers/compensators change the Bode Plot (and therefore the

performance) of the system

17

10

0

-10

-20

dB

(Compensated System ) = (Controller )* (Uncompensated)

The bode plot for the final Compensated System is the same as putting the

Uncompensated and Controller bode plots in cascade series (and then combining multiple

bode plots as we have done in previous examples).

Controller

Page 18: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

PID Controllers Revisited

18

In the in-class demo (arm moving back and

forth when connected to a potentiometer),

turning one of the three tuning knobs

changed the constant values Kp, Ki, and Kd

(i.e. We were changing the constants for

proportional, derivative and integral gain in

the transfer function)

sKs

KKsC D

IP )(

Page 19: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

PID Controllers

• Looks like this has 2 zeros (z1 and z2), proportional gain, and one integrator (s in denominator)

• Can use this controller to generate phase compensation as well as a higher operating frequency

bandwidth

Proportional Gain– increases speed of system

Derivative Gain- Acts like the damping /friction term ;

Used to get reduce overshoot.

Integral Gain- reduces steady-state error (error

value accumulates over time, changes inputs)

s

zszsk

s

KsKsKsK

s

KKsC IPD

DI

P

))(()( 21

2

19

Page 20: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

PID Controller - Bode plots

Image from: http://courses.ece.ubc.ca/360/lectures/Lecture24.pdf

Amplitude boost at low frequency –

reduces steady-state error

Phase margin increase at high

frequencies, higher bandwidth

Higher gain at high

frequencies might lead to

problems.

20

s

zszsk

s

KsKsKsK

s

KKsC IPD

DI

P

))(()( 21

2

Page 21: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Use PID or other types of contro llers to get a “more desirable” output

1. How to get faster response?

– Increase proportional gain

– Increase the system bandwidth (frequency response)

2. How to reduce overshoot?

– Increase damping (e.g. Increase derivative gain)

3. How to eliminate steady-state error

– Increase integral gain

21

Page 22: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

1. How to get faster response?In general:

wider bandwidth = faster response

higher gain = faster response

22

System T4 has a higher bandwidth than

System T3 on the magnitude Bode Plot

(frequency domain)

Figure: Response of two second-order systems

(fromDorf,Beiser)

Therefore, System T4 has a faster rise

time than System T3 (time domain).

May or may not result in higher

overshoot, oscillations.

frequency

time

Page 23: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

Time Response to a step-input of a system

with increasing proportional gain Kp.

Note that as the gain increases:

•rise time is faster

•overshoot and oscillations are higher

•steady-state error is reduced (gets closer to

desired final value of 1)

All of these were seen in the PID demo done

in-class as well -

http://blog.analogmachine.org/2012/02/04/pid-control-demonstra

tion/

An increase in the proportional gain shifts the

Bode Plot vertically upwards (this may also

increase system bandwidth as well)23

(fromDorf,Beiser)

1. How to get faster response?In general:

wider bandwidth = faster response

higher gain = faster response

Page 24: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

2. How to reduce overshoot

Increase damping / increase derivative gain

24

Image from: http://www.industrialheating.com/Articles/Column/bdcffcf0ddbb7010VgnVCM100000f932a8c0____

Increasing KD

Time Response to a step-input of a system

with increasing derivative gain KD.

Note that as KDincreases, system

overshoot and oscillation decreases and

disappears; higher KDvalues can severely

reduce response time (a very slow-reacting

system).

Page 25: Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch … ·  · 2014-10-29... Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots

3. How to reduce steady-state error

Increase integral gain

25

Example from: http://www.stanford.edu/~boyd/ee102/int-ctrl.pdf

If KIis chosen correctly, the steady-state

error reduces to zero in a reasonable

time.

If KItoo small, results in slow asymptotic

approach to zero (may take a long time)

If KIis too large, oscillatory response, or

even instability may result.