Sie sind auf Seite 1von 79

EE480.3 Digital Control Systems

Part 9. Frequency Response Method - using the bilinear transformation

Kunio Takaya

Electrical and Computer Engineering

University of Saskatchewan

March 26, 2008

** Go to full-screen mode now by hitting CTRL-L

1

Contents

1 CONTROL SYSTEM DESIGN III

3

2 Routh-Hurwitz stability criterion

10

3 Phase Lead or Lag Compensator

17

4 DIGITAL CONTROLLER DESIGN 3

22

5 PID Controller Design

56

2

1 CONTROL SYSTEM DESIGN III Bilinear Transformation

Consider integration based on trapezoidal rule.

y(k) y(k-1) x(k) x(k-1)
y(k)
y(k-1)
x(k)
x(k-1)

T

Let the integrated area to k be y(k). Then, using the area to k 1 given by y(k 1), the approximated area under the curve is

y(k) = y(k 1) + T [x(k) + x(k 1)]

2

3

y(k) = y(k 1) + T [x(k) + x(k 1)]

2

Taking the z-transform,

Y (z)

=

(1 z 1 )Y (z)

=

Y (z)

 

=

X(z)

z 1 Y (z) + T [X(z) + z 1 X(z)]

2

T (1 + z 1 )X(z)

2

T

1

+ z 1 z 1

2

1

We let integration in the Laplace transform 1 s equal to the

integration in the z-domain.

1 s = T

2

1

+ z 1 z 1

1

4

Then, we define the bilinear transformation,

s =

2

1

1

z + z 1

T

1

=

2

z

1 + 1 .

T

z

Since this is a new mapping function between s-domain and z-domain, we use w instead of s. The bilinear transformation defines w-domain as

 

2

1 z 1

w =

T

1 + z 1

=

2

z

1

w =

T

z

+ 1

2

z

1 + 1 ,

T

z

w

z = 1 + T 1 T w

2

2

whereas the Laplace s-domain relates to the z-domian by

z = e sT

Both mapping functions make the stable system poles be jzj < 1.

5

MATLAB function for the bilinear transformation is bilinear and corresponding impulse invariant transformation is impinvar. The following program shows the transformation applied to

%

z=[];

p=[-1,-2];

T=0.1;

K=2;

csys=tf(K*poly(z),poly(p))

s=2/(s+1)(s+2)

s-domain:

G(s) =

2

(s + 1)(s + 2)

[numd,dend]=bilinear(K*poly(z),poly(p),1/T)

roots(numd) pbl=roots(dend)

plot(pbl,[0,0],’rx’);

axis([-1,1,-1,1]);

axis

square;

hold

on;

[numd,dend]=impinvar(K*poly(z),poly(p),1/T)

 

roots(numd) piv=roots(dend)

plot(piv,[0,0],’bx’);

axis([-1,1,-1,1]);

axis

square;

hold

on;

6

The impulse invariant transformation is

G(z) = 0.0172

z

(z 0.9048)(z 0.8187)

The bilinear transformation is

G(z) = 0.0043

(z 1) 2

(z 0.9048)(z 0.8182)

The poles are very close to each other, though the zeros are dissimilar.

Exercise: Transform the following continuous time system to its Bilinear Transform. Sampling frequency is 10 samples per sec, or T = 0.1.

E(s) =

1

s(s + 1)

7

Nonlinear frequency relationship

2

1

z 1

T

1 + z 1

z=e jωT

=

=

=

=

2

T

2

T

1 e jωT

1 + e jωT

e j ωT

2

(e j ωT e j ωT )

2

2

e j ωT

2

(e j ωT + e j ωT )

2

2

j T tan ωT

w

2

2

Thus, ω w has a nonlinear relation ship with ω given by

ω w =

T tan ωT

2

2

8

.

In the relationship between s -domain and z -domain, z = e s T ,

In the relationship between s-domain and z-domain, z = e sT , analog frequency is defined by s = whereas digital (discrete

time) frequency ω d is defined by e jω d = e jωT . Therefore, ω = ω T d .

9

frequency range in ω, ω d and ω w

ω

ω d

ω w

=

=

=

0 ω ω s

2

= 2πf s

2

0 ω d = ωT π

0 ω w = T tan ωT

2

2

= π

T

T tan π

2

2

=

This means that one zone of periodic frequency axis produced by

π

sampling, ± T in s-domain, corresponds to 0 ω w < in the

frequency axis of w-plane. The frequency axis is the imaginary axis . Therefore, the inside of the unit circle in z-plane is mapped into the entire LHP in the w-plane. Thus, we can see that the Routh-Hurwitz stability criteion becomes applicable if bilinear transformation is applied to a discrete time transfer function in z-transform and converted to w-domain.

10

2 Routh-Hurwitz stability criterion

+

K

z+1

z(z-1)

2 Routh-Hurwitz stability criterion + K z+1 z(z-1) - Test the stability of this closed loop
2 Routh-Hurwitz stability criterion + K z+1 z(z-1) - Test the stability of this closed loop

-

2 Routh-Hurwitz stability criterion + K z+1 z(z-1) - Test the stability of this closed loop

Test the stability of this closed loop system. Determine the range of K that keeps the system stable. The open loop transfer function is

G(z) = K

z + 1

z(z 1) .

 

2

z

1

w =

 

T

z

+ 1

G(w)

=

K

z + 1

z(z 1)

w

z = 1 + T 1 T w

2

2

z=

1+ T w 2 1− T w 2
1+ T w
2
1− T w
2

11

= K

= K

1 + T w

2

1 T w

2

+ 1

1 + T w ( 1 + T w
1

2 w

T

2

2

1 T

2

w 1)

1 T w

2

(1 + T w) T

2

2 w

The characteristic equation is

1 + G(w) = 1 + K

1 T

2 w

(1 + T w) T

2

2 w

= 0

( T ) 2 w 2 + T (1 K)w + K = 0

2

2

12

w

w

w

2

1

0

( T ) 2

2

T

2

(1 K)

K

K

0

0

Therefore, 0 < K < 1 is necessary for the system to be stable.

Routh Hurwitz stability criterion

When the characteristic equation is given by

b n w n + b n1 w n1 + ··· + b 1 w + b 0 = 0

13

w

w

w

w

.

.

.

n

n1

n2

n3

b

b

c

d 1

.

.

.

n

n1

1

b n1 b n2 b n b n3

c 1 =

b

n1

d 1 =

c 1 b n3 c 2 b n1

c

1

b

b

c

d 2

.

.

.

n2

n3

2

b n4 ···

b n5 ···

c

d 3

.

.

.

3

b n1 b n4 b n b n5

c 2 =

d 2 =

b

n1

c 1 b n5 c 3 b n1

c

1

The number of sign changes in the first column gives the number of unstable poles.

14

Example

An open loop transfer function

yields

G(z) = K

z + 1

(z 1) 2

G(w) = K 2 (Tw) Tw 2

The characteristic equation is

T 2 w 2 KTw + 2K = 0.

w

w

w

2

1

0

T 2

2K

KT

0

2K

0

15

Since the number of sign changes is 2, this system is always unstable regardless of the value of K. This system is the same as

analog system,

instability.

1 2 . So, the unity gain feedback always results in

s

16

3 Phase Lead or Lag Compensator

A discrete time phase lead/lag compensator is designed by using

the bilinear transformation that maps the inside of the unit circle

in z-plane to the entire LHP of w-plane. The phase lead/lag

compensator is designed in w-domain utilizing the techniques available for continuous time compensator design, then map it back to the z-domain by the bilinear transformation. The first order w-domain compensator is given by analogy to s-domain as

D(w) = a 0

17

1 +

w

ω

w 0

1 +

w

ω w p

A pole is at w = ω w p and a zero is at w = ω w 0 .

A pole is at w = − ω w p and a zero is at w

18

• Phase lead compensator: ω w p > ω w 0 • Phase lag compensator:

Phase lead compensator: ω w p > ω w 0

Phase lag compensator:

ω w 0 > ω w p

19

Substituting w = 2

function,

z 1

T z + 1

for w in the compensator transfer

D(z)

=

a

0

 

2

z

1

1 +

T

z

+ 1

 

ω

w 0

 

2

z

1

1 +

T

z

+ 1

 

ω

w p

= a

0

 

2

z

1

ω w 0 ω w p + ω w p

T

z + 1

 

2

z

1

ω w 0 ω w p + ω w 0

T

z + 1

=

a 0 ω w 0 ω w p T (z + 1) + 2ω w p (z 1)

ω w 0 ω w p T (z + 1) + 2ω w 0 (z 1)

20

Thus,

K d

z 0

z

p

(ω w 0 T + 2)

(ω w p T + 2) ×

= a 0 ω w p

ω w 0

= K d z z 0 z z p

z

+ ω w 0 T 2 ω w 0 T + 2

z

+ ω w p T 2 ω w p T + 2

= a 0

ω w p (ω w 0 T + 2)

2) = a 0 ω w p (ω w 0 +

 

2

)

T

ω w 0 (ω w p +

2

)

T

ω w 0 (ω w p T +

=

=

ω w 0 T 2

ω w 0 T + 2 =

ω w p T 2

ω w p T + 2 =

ω w 0 2

T

2

ω w 0 +

T

ω w p 2

T

2

ω w p +

T

21

4 DIGITAL CONTROLLER DESIGN 3

Frequency Response Method

K z - z 0 ZOH

K

z

- z

0

ZOH
ZOH

d

-

T

z

- z p

K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)

G(s)

K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
K z - z 0 ZOH d - T z - z p G(s)
+
+

Design a phase lead or phase lag compensator

D(z) = K d z z z z p 0

such that the (open loop) system satisfies a given phase margin of φ m 100ζ so that the (closed loop) system has damping ratio of ζ.

22

Since the frequency response method based on phase margin and gain margin established in the Laplace domain (s-domain) is used here, the frequency response of D(z) combined with a plant transfer function G(z) with ZOH must be transformed into w-domain by using the bilinear transformation. Because, the stable region of the z-plane that is the inside of a unit circle, is mapped into the entire LHP (Left Half Plane) of the w-plane.

The parameters K d , z 0 and z p of the first order phase lead/lag compensator are determined in terms of a 0 , ω w 0 , ω w p defined in the w-domain.

23

Calculations of Frequency Response in w-domain

In order to obtain frequency response (Bode plot) in w-domain, do the following steps.

1. Find the transfer function in the z-transform,

G(z) = (1 z 1 )Z G(s)

s

2. Calculate the frequency response G(e jωT ) for 0 ωT π with a proper step size. Record the actual frequncy scale of 0 ω ω s =

3. Calculate corresponding frequency ω w to the frequencies used to calculate G(e jωT ).

π

T

ω w =

T tan ωT

2

2

24

4. Make a frequency response table to help drawing the Bode diagram.

ω

jG(e jωT )j

G(e jωT )

ω

w

···

···

···

···

···

···

···

···

.

.

.

.

.

.

.

.

.

.

.

.

5. Draw the Bode Diagram, both for jG(e jωT )j and G(e jωT ) using the frequency scale of ω w , not ω. This process is often called as frequency pre-warping.

25

Design Approach

Design Approach • Digital controller design to determine D ( z ) by the frequency response

Digital controller design to determine D(z) by the frequency response method uses phase margin φ m as a key parameter.

Design is to make the phase margin of the open loop trnasfer function D(w)G(w) have a specified phase margin φ m at a frequency ω w 1 .

26

Finding the new cross-over frequency ω w 1 requires several conditions to be met, and also requires “try and error” until a satisfactory value is found.

We are designing (determining)

D(w) = a 0

1 +

w

ω

w 0

1 +

w

ω w p

where, a pole is at w = ω w p and a zero is at w = ω w 0 .

27

Characteristic Equation of the Closed Loop Systems

The only mathematical condition required at ω w 1 is

D(w 1 )G(w 1 ) = 1 (180 + φ m ) = 1 (+180 + φ m )

For magnitude,

jD(w 1 )j jG(w 1 )j = 1

For phase,

jD(w 1 )j =

1

jG(w 1 )j

D(w 1 ) + G(w 1 ) = 180 + φ m

θ = D(w 1 ) = 180 + φ m G(w 1 )

28

Mathematical Design Formula for Phase Lead/Lag Compesators

The phase margin of the open loop trnasfer function D(w)G(w) satisfies a specified phase margin φ m at a frequency ω w 1 , if the parameters a 1 and b 1 of

D(w) = a b 1 1 w w + + a 1 0

= a 0

where,

are set to satisfy

w ω 0 = a 0

a

1

1 + a 1 w

a

0

1

+ b 1 w

and

29

= a 0

1

+

w

ω

w 0

1 +

w

ω w p

w ω p =

1

b

1

a 1

b 1

=

=

1 a 0 jG(w 1 )j cos θ

ω w 1 jG(w 1 )j sin θ cos θ a 0 jG(w 1 )j

ω w 1 sin θ

where, θ = D(w 1 ) = 180 + φ m G(w 1 ). The DC gain a 0 must be known from other criteria such as steady state error e ss or DC gain.

30

Verification (check)

D(w 1 )

=

=

Thus,

ja 1 ω w 1 + a 0

jb 1 ω w 1 + 1

=

1 a 0 jG(w

)j cos θ

j

 

1

ω w 1 + a 0

 

ω w 1 jG(w 1 )j sin θ

 

j

cos θ a 0 jG(w 1 )j

ω w 1 + 1

 

ω w 1 sin θ

jG(w 1 )j × j(1 a 0 jGj cos θ) + a 0 jGj sin θ j(cos θ a 0 jGj) + sin θ

1

D(w 1 ) 2

=

=

=

1

jGj 2

1

(1 a 0 jGj cos θ) 2 + (a 0 jGj sin θ) 2

(cos θ a 0 jGj) 2 + sin 2 θ

1

2

2a 0 jGj cos θ + a 0 jGj 2

2

jGj 2 1 2a 0 jGj cos θ + a 0 jGj 2

1

jGj 2

31

For phase angle,

D(w 1 )

tan D(w 1 )

=

=

=

=

1 + j a 1

a 0 ω w 1

1 + jb 1 w 1

tan 1 a 0 ω w 1 tan 1 b 1 ω w 1

1

a

tan tan 1 a 0 ω w 1 tan tan 1 b 1 ω w 1

1

a

1 + tan tan 1 a 0 ω w 1 × tan tan 1 b 1 ω w 1

1

a

a

a 0 ω w 1 b 1 ω w 1

1

1 + a

1

a 0 ω w 1 × b 1 ω w 1

32

Substituting,

a 1 ω w 1 = 1 a 0 jGj cos θ jGj sin θ

and

b 1 ω w 1 = cos θ a 0 jGj sin θ

tan D(jω w 1 )

=

2

sin θ(1 2a 0 jGj cos θ + a 0 jGj 2 )

cos

2

θ(1 2a 0 jGj cos θ + a 0 jGj 2 )

= tan θ

Thus, the compensator D(w 1 ) satisfies

jD(w 1 )j =

1

jG(w 1 )j

33

and

D(jω w 1 ) = θ

Range to choose ω w 1 for Phase-Lead Case

This formula based method is straightforward and works well as long as the choice of ω w 1 is proper. The range of frequency ω w from which ω w 1 should be chosen is specified by the following conditions for phase lead compensators.

1. θ = D(w 1 ) = 180 + φ m G(w 1 ) > 0 requires to choose ω w 1 to satisfy a phase condition

G(w 1 ) < 180 + φ m .

2. Since jD(w )j > a 0 , jD(w 1 )j > a 0 . Then, ω w 1 should satisfy a gain condition,

jG(w 1 )j =

1

jD(w 1 )j <

1

a 0

3. In the transfer function D(w), a 0 , a 1 and b 1 must be all

34

positive as ω w 0 = a 0

compensators. Referring to

a 1

and ω w p =

1

b

1

a 1 ω w 1 = 1 a 0 jGj cos θ jGj sin θ

and

.

sin θ > 0 for phase lead

b 1 ω w 1 = cos θ a 0 jGj sin θ

.

the numerators must be positive as well.

1 a 0 jGj cos θ > 0

and

1

a 0 jG(jω w 1 )j > cos θ

cos θ a 0 jGj > 0

> a 0 jG(w 1 )j

This condition is written for jG(w 1 )j as

jG(w 1 )j < cos θ

a

0

35

<

1

a 0 cos θ

Thus,

jG(w 1 )j < cos θ a 0

,

which is more restrictive than the condition derived from the

gain, jG(w 1 )j <

1

.

a 0

36

Range to choose ω w 1 for Phase-Lag Case

The range of frequency ω w from which ω w 1 should be chosen is specified by the following conditions for phase lag compensators.

1. θ = D(w 1 ) = 180 + φ m G(w 1 ) < 0 requires to choose ω w 1 to satisfy a phase condition

G(w 1 ) > 180 + φ m .

2. Since jD(w )j < a 0 , jD(w 1 )j < a 0 . Then, ω w 1 should satisfy a gain condition,

jG(w 1 )j =

1

jD(w 1 )j >

1

a 0

3. In the transfer function D(w), a 0 , a 1 and b 1 must be all

positive as ω w 0 = a 0

a 1

and ω w p =

37

1

b

1

.

sin θ < 0 for phase lag

compensators. Referring to

a 1 ω w 1 = 1 a 0 jGj cos θ jGj sin θ

and

b 1 ω w 1 = cos θ a 0 jGj sin θ

.

the numerators must be negative as well.

1 a 0 jGj cos θ < 0

and

cos θ a 0 jGj < 0

1

a 0 jG(jω w 1 )j < cos θ < a 0 jG(w 1 )j

This condition yields,

jG(w 1 )j >

a 0 cos θ > cos θ

1

a

0

Thus,

jG(w 1 )j >

1

a 0 cos θ .

38

This is more restrictive than jG(w 1 )j > 1

a

0

39

.

Design specific to Phase lag Compensator

The first order phase lag compensator can be designed by the formula similarly as in the case of phase lead compensator. However, there is a basic difference in the principle of compensating for a required phase margin.

Phase lead compensators add a positive phase to increase the phase margin without drastically changing the 0 dB crossover frequency.

A phase lag compensators is used to lower the overall gain to shift the 0 dB crossover frequency to a much smaller value so that a larger phase margin is obtained.

Since the 0 dB crossover frequency ω w 1 is shifted to a lower frequency where the phase response of the Bode diagram is not affected by the compensator, selecting ω w 1 can be done on the Bode

40

diagram of G(w) alone without being affected by the compensator. First, find a new crossover frequency ω w 1 where the condition,

G(w 1 ) = 180 + φ m + 5

is satisfied. 5 accounts for a slight phase angle derease by the phase lag compensator. The rule of thumb to set ω w 0 in the compensator’s transfer function,

D(w) = a 0

1 +

w

ω

w 0

1 +

w

ω w p

=

a 1 w + a 0

b 1 w + 1

is to pick one decade lower than the ω w 1 , i.e.

ω w 0 = 0.1 × ω w 1 .

41

For a phase lag compensator, ω w p < ω w 0 .

Thus,

jD(ω w 1 )j = a 0

1 + j ω w 1

ω w 0

1 + j ω w 1

ω w p

a 0 ω w p

ω

w 0

=

1

G(w 1 )

ω w p =

ω

w 0

a 0 jG(w 1 )j =

0.1 ω w 1

a 0 jG(w 1 )j

42

Example 8.1 page 294

The servo motor is to control the horizontal (azimuth) angle for pointing a radar antenna. The transfer function is given by

G(s) =

1

s(s + 1)(0.5s + 1)

The z-transform of this system combined with ZOH is

G(z) = 4.0140 × 10 5

(z + 3.5954)(z + 0.2580)

(z 1)(z 0.9512)(z 0.9048) .

The Bode diagram drawn for w-domain with respect to the frequency axis of ω w is shown.

43

Magnitude Response

20 0 −20 −40 −60 10 −1 10 0 frequency in rad/s 10 1 Magnitude
20
0
−20
−40
−60
10 −1
10 0
frequency in rad/s
10 1
Magnitude in dB

Phase Response

−50 −100 −150 −200 −250 −300 10 −1 10 0 frequency in rad/s 10 1
−50
−100
−150
−200
−250
−300
10 −1
10 0
frequency in rad/s
10 1
Phase in degrees

44

Design a phase lag compensator that achieves a phase margin of φ m = 55 for a 0 = 1.

G(w 1 ) = 180 + 55 + 5 = 120

By the Bode diagram, ω w 1 0.36. At this frequency jG(w 1 )j = 2.57 = 8.2dB. Therefore,

ω w 0 = 0.1 ω w 1 = 0.036

ω w p =

0.1 ω w

1

w 1 )j = 0.0140

a 0 jG(

Using these values of a 0 , ω w 0 and ω w p ,

D(z) = 0.3891

z 0.9982

z

0.9993 .

The frequency response after compensation is shown in the frequency axis of ω w .

45