2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference...

34
2.14 Fall 2004 2.14 Fall 2004 Digital Control - Z-plane analysis Digital Control - Z-plane analysis

Transcript of 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference...

Page 1: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

2.14 Fall 20042.14 Fall 2004

Digital Control - Z-plane analysisDigital Control - Z-plane analysis

Page 2: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 2

Difference Equations and DynamicsDifference Equations and Dynamics

• Consider the Discrete TransferFunction:

The corresponding Difference Equation is:

next output = p*current output + K* current input

G(z) =Y (z)U (z)

=K

(z − p)

Y(z)(z − p) = KU (z)

yi+1 − pyi = Kui ⇒ yi+1 = pyi + Kui

Page 3: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 3

Step DynamicsStep Dynamicsyi+1 = pyi + pui

I ui y i

1 1 0.0002 1 0.5003 1 0.7504 1 0.8755 1 0.9386 1 0.9697 1 0.9848 1 0.9929 1 0.99610 1 0.99811 1 0.99912 1 1.00013 1 1.000

⇒ yi+1 = 0.5(yi + ui)for p=0.5 and K=0.5 and u=unit step:

Page 4: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 4

Step ResponseStep Response

0

0.2

0.4

0.6

0.8

1

1.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

First Order Transfer Function!

G(z) =Y (z)U (z)

=K

(z − p)=

0.5z −0.5

Page 5: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 5

Effect of Root Effect of Root pp

Time (samples)

Ampl

itude

TextEnd

Step Response

0 2 4 6 8 100

0.02

0.04

0.06

0.08

0.1

Time (samples)

Ampl

itude

TextEnd

Step Response

0 2 4 6 8 100

0.02

0.04

0.06

0.08

0.1

Time (samples)

Ampl

itude

TextEnd

Step Response

0 2 4 6 8 10 120

0.2

0.4

0.6

0.8

1

Time (samples)

Ampl

itude

TextEnd

Step Response

0 50 100 1500

50

100

150

p=0.1 p=0.25

p=0.5p=1.0

Page 6: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 6

Effect of Root Effect of Root pp

Time (samples)

Ampl

itude

TextEnd

Step Response

0 2 4 6 8 100

0.05

0.1

0.15

0.2

0.25

Time (samples)

Ampl

itude

TextEnd

Step Response

0 2 4 6 8 10 120

0.1

0.2

0.3

0.4

0.5

Time (samples)

Ampl

itude

TextEnd

Step Response

0 10 20 30 400

0.2

0.4

0.6

0.8

1

Time (samples)

Ampl

itude

TextEnd

Step Response

0 2 4 6 8 100

0.02

0.04

0.06

0.08

0.1

p=-0.1 p=-0.25

p=-0.5p=-1.0

Page 7: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 7

WhatWhat’’s Next?s Next?

•• Z- domain modeling of control systemZ- domain modeling of control system•• Root locus in z-domain (itRoot locus in z-domain (it’’s the same!)s the same!)•• Cycle to Cycle Stability LimitsCycle to Cycle Stability Limits

Page 8: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 8

Analysis of Dynamics ofAnalysis of Dynamics ofDiscrete Feedback SystemsDiscrete Feedback Systems

•• Given the Discrete Transfer FunctionGiven the Discrete Transfer FunctionFor the Process GFor the Process Gpp(z)(z)

•• What are the Dynamics of the resultingWhat are the Dynamics of the resultingClosed Loop System?:Closed Loop System?:

Gc(z) Gp(z)

H(z)

-R(z) Y(z)

Page 9: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 9

Closed-Loop DynamicsClosed-Loop Dynamics

Gc(z) Gp(z)

H(z)

-R(z) Y(z)

Y (z)R(z)

= T (z) =GcGp

1+GcGpH

and the characteristic equation is:

1 +Gc(z)Gp (z)H(z) = 0

Page 10: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 10

Z-Domain Root LocusZ-Domain Root Locus

1 +GcGpH(z) = 0

In general the CE:

will be a polynomial in z:

anzn + an−1z

n −1 + an −2zn− 2 + ...a1z + a0 = 0

and the roots of this polynomial willdefine the dynamics of our system

Page 11: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 11

S-Z Plane MappingS-Z Plane Mapping

Recall the Definition: z = esT

And that s = σ + jω

then z in polar coordinates is given by:

e(σ + jω )T = eσTejωT

z = eTσ ∠z =ωT

Page 12: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 12

MappingMapping

s

0

s = 0z = e0 = 1 z

+1

z = eTσ ∠z =ωT

Page 13: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 13

Mapping Mapping jjωω Axis Axis

s

0

s = + jωz = e jωT = unit length vector at angle ωT

z

+1

ωT

Page 14: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 14

Mapping Mapping jjωω Axis Axis

jω z

0 +1

Note: when ωT = π, we have reached -1 on z-plane

π /T

− π /T

And when ωT = -π, we have come around the other way

Page 15: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Settling Time MappingSettling Time Mapping

z

+1

S-plane lines of constant settling:

0

ωT

s

ts=4/p

-p

s = −p + jωz = e− pT+ jωT = e− pTe jωT

circle of radius e-pT

r=e-pT

11/10/04

ts ≈ −4Tln(r)

Page 16: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Settling Time MappingSettling Time Mapping

s z

0 +1

ωT

circle of radius e-pT

CLOSER TO Z=0 = FASTER SETTLING

ts

Page 17: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Damping Ratio MappingDamping Ratio Mapping

s z

0 +1

β

11/10/04

∠s = β = constant0 ≤ s ≤ ∞

s

Page 18: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Stability?Stability?

s z

0 +1

jw axis maps to the “unit circle”

roots inside the unit circle are stable, outside are unstable

π /T

−π /T

Page 19: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Mapping: Negative Real AxisMapping: Negative Real Axis

s z

0+1

+jω

-jω

∠z =ωT = 00 ≤ s ≤ −∞⇒ e0 ≤ z ≤ e−∞ ⇒1 ≤ z ≤ 0

Page 20: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 20

Mapping: WhatMapping: What’’s lefts left

s z

0 +1

π /T

−π /T

−∞

oscillatory region

real-root

Page 21: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Axis

Imag

Axis

TextEnd

Pole-zero mapzgrid zgrid from Matlabfrom Matlab Lines of

constantdamping ratio(ζ=0.7 shown)

Lines of constantnatural frequency

Page 22: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Axis

Imag

Axis

TextEnd

Pole-zero map

Z-Plane - ResponseZ-Plane - ResponseRelationshipRelationship

Page 23: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 23

Simple First Order Control SystemSimple First Order Control System

KC Gp(z)-R(z) Y(z)

Gp(z) =K

(z − p) open loop root = +p

Page 24: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 24

Root LocusRoot LocusROOTS OF 1+KCG-P(z) = 0 ?

Same rules as before:Starts at open loop pole = +pReal axis part to left of

odd number of polesEnds at zero at infinity

p

z

Page 25: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 25

Root Locus- InterpretationRoot Locus- Interpretation

p

z

+1

slow, no oscillation

faster, nooscillation

fastest w/oovershoot

beginsoscillating

very oscillatory

unstable

Page 26: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

-1 -0.5 0 0.5 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Real Axis

Imag

Axis

Now forNow for

k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

11/10/04

G(z) =K

(z − p)=

0.5z − 0.5 K=0.5

p=0.5

Page 27: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Response?Response?k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

Page 28: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Response?Response?k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

11/10/04

Page 29: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Response?Response?k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

Page 30: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Response?Response?k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

Page 31: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Response?Response?k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

Page 32: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Response?Response?k r

0.22 0.39

0.73 0.13

1 0

1.5 -0.27

2.8 -0.92

3 -1

Page 33: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

11/10/04 2.14 Fall 2004 33

Steady State Unit Step Error?Steady State Unit Step Error?

Our closed-loop TF =

unit step

For s - domain y(∞) = lims→0

s G(s) 1s

For z - domain y(∞) = limz→1

(z −1) G(z) zz −1

T (z) =

KcK

z − p

1 +K

cK

z − p

=KcK

z − p + KcK

Page 34: 2.14 Fall 2004 - MITweb.mit.edu/2.14/www/PSets/nov17.pdf11/10/04 2.14 Fall 2004 2 Difference Equations and Dynamics •Consider the Discrete Transfer Function: The corresponding Difference

Steady State Error?Steady State Error?

Kc p y(∞)

0.22 0.39 0.18

0.73 0.13 0.44

1 0 0.5

1.5 -0.27 0.6

2.8 -0.92 0.74

3 -1 0.75

Steady State Error isMinimizedas K increases

limz→1

(z −1) T (z) zz −1

= (z −1) KcKz − p + KcK

z

(z −1)

=KcK

1− p + KcK

K=0.5p=0.5