You are on page 1of 22

MODERN CONTROL

SYSTEMS ENGINEERING
COURSE #: CS421
INSTRUCTOR:
DR. RICHARD H. MGAYA

Date: October 25th, 2013

Digital Compensator Design


Digital Compensator Design Using Pole Placement
Example: Continuous control system (a) is to be replaced by
digital control system (b)

a) Find the value of K that give damping ratio, , of 0.5 for the continuous
system
b) Find the closed-loop bandwidth b and make the sampling frequency s a
factor 10 time higher. What is the sampling period, T?
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
c) Find the open-loop impulse transfer function G(z) when the sample and
hold device is cascaded with the plant
d) With D(z) = K from system (a), plot the responses of the systems
e) Map the closed-loop poles from the s-plane to the z-plane and design the
compensator D(z) such that both continuous and discrete system responses are
identical, i.e., = 0.5

Solution:
a) Root locus

s 0.5 j 0.866

or
0.5, 0.866rad / s
K 0.336
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
b) Plotting closed-loop frequency response
Bode Diagram
Gm = Inf dB (at Inf rad/sec) , Pm = 89.5 deg (at 1.01 rad/sec)
20

Magnitude (dB)

0
System: f
Frequency (rad/sec): 1.28
Magnitude (dB): -3.07

-20
-40
-60
-80
0

Phase (deg)

-45
-90
-135
-180
-2

10

-1

10

10

10

10

Frequency (rad/sec)

Bandwidth, b = 1.29 rad/s


10 time higher, i.e., 12.9 rad/s
Therefore,
T 0.5 sec
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
c) Cascaded system

3
G ( z ) 1 z 1 Z 2

s s 1

Using transformation pair

3 e 0.5 0.5 z 1 1.5e 0.5


G( z)
z 1( z e 0.5 )

Simplify

G( z)

0.3196( z 0.8467)
( z 1)( z 0.6065)
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
d) D(z) = K = 0.336

Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
e) Mapping closed-loop poles from s to z-plane
z eT
T = 0.5

0.50.5
z

e
0.779
Magnitude:

Phase:

z T 0.866 0.5 0.433rad 24.8

Polar to Cartesian

z 0.707 j 0.327
Characteristic equation:

z 2 1.414 z 0.607 0

... i
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
Characteristic equation for cascade compensator D(z) and the plant G(z) is
given as:

1 D( z )G ( z ) 0

... ii

If equation i and ii are to be identical then the compensator is given in the


form:
K ( z a)

D( z )

z b

Select a such that non unity pole in G(z) is cancelled

D( z )G ( z )

K ( z 0.6065) 0.3196( z 0.8467)

z b
( z 1)( z 0.6065)

Characteristic equation:

0.3196 K ( z 0.8467)
( z b)( z 1)
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
Simplify:

z 2 (0.319 K b 1) z (0.2706K b) 0

... iii

Equating i and iii:

0.3196 K b 1 1.414
0.2706 K b
0.607
0.5902 K 1 0.807

0.5902K 0.193
K 0.327
(0.2706 0.327) 0.607 b
b 0.519
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:
Compensator D(z):

U ( z ) 0.327( z 0.6065)
D( z )

E( z)
z 0.519
Similarly:

(1 0.6065 z 1 )
D( z ) 0.327
1 0.519 z 1
Difference equation for the control algorithm:

u (kT ) 0.327e(kT ) 0.1983e(k 1)T 0.519u (k 1)T

Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Design Using Pole Placement Cont
Solution:

Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane
Generally, for plant dynamics with slow pole, i.e., near z = 1, a
compensator with a zero is used to cancel the slow pole
Placing a pole with faster response
Hardware may limit the control effort - saturation

Let the z-domain transfer function of the plant have a pole at


p1, which we wish to cancel, the compensator will be of the
form:
K c ( z p1 )
D( z )
z pc

The numerator cancel the pole of the plant and pc is the selected pole
place far away from z = 1
Integrator pole at z = 1 reduces the steady-state error
Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
Example: Consider the plant for thermal control system
G( s)

1
( s 0.1957)( s 2.554)

Compensate the plant in s-domain and then convert the design


to z-plane by employing the method of bilinear transformation
Solution:
Place a zero p1 at s = - 0.1957 and pc at 4

D( s)

K ( s 0.1957)
s4

Closed-loop characteristic equation

K ( s 0.1957)
1 G ( s ) D( s ) 1
0
( s 4)( s 0.1957)( s 2.544)
Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
Closed-loop characteristic polynomial

s 2 6.544s 10.216 K 0
Undamped natural frequency:

Damping ratio

n 10.216 K
2 n 6.544

Let = 0.707

6.544
2 10.216 K
K 11.259

Characteristic equation:

s 2 6.544s 21.475 0
Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
From the characteristic polynomial undamped and damped natural
frequency are given as:

n 4.63rad/s
d 3.274rad/s
D( s)

11.259( s 0.1957)
s4

(a)

Proportional Compensator:
Kp : compensator D(s) = Kp:

s 2 2.7495s K p 0.5 0
Since = 0.707, then Kp = 3.28, n = 1.94 rad/s and d = 1.37 rad/s
Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
Sampling interval T = 0.25:

2 z 1
z 1
8
T z 1
z 1

Discrete compensator D(z) from eqn (a):

D( z )
Simplify:

11.2598( z 1) /( z 1) 0.1957)
8( z 1) /( z 1) 4
z 0.952
D( z ) 7.69

z 0.333

Zero-order-hold plant transfer function:

G( z)

0.025( z 0.816)
( z 0.952)( z 0.528)
Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
Closed-loop discrete time characteristic equation:

z 2 0.699 z 0.332 0
z1, 2 0.3345 j 0.469

Note: The roots are too low for acceptable performance


Alternatively,

D( z )

K1 ( z 0.952)
z 0.333

Root locus:

D( z )

4( z 0.952)
z 0.333

Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
First-Order Compensator for discrete time system:

D( z )

4( z 0.952)
z 0.333

Compensated versus proportional control

Dr. Richard H. Mgaya

Digital Compensator Design


Compensator Design via z-plane Cont
Alternatively
Cancel the poles of the plant G(z) and insert integrator pole and the
pole for faster response

D( z )

K c ( z 0.528)( z 0.952)
( z 1)( z 0.2)

Compensator gain Kc for = 0.7


Root locus: Kc = 7
Second-Order Compensator for discrete time system:

D( z )

7( z 0.528)( z 0.952)
( z 1)( z 0.2)
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Implementation
Controller Gc(z) placed in a forward path can be implemented in a
computer through numerical algorithm
Computer
Emulating Compensator

E (z )

Plant with
Sample-and-Hold

X (z )

G p (z )

G (z )

C (z )

Consider a second-order compensator:

X ( z ) a3 z 3 a2 z 2 a1 z a0
Gc ( z )

E( z)
b2 z 2 b1 z b0
Cross multiply and solving for terms with highest power of z on X(z):

b z
2

b1 z b0 X ( z ) a3 z 3 a2 z 2 a1 z a0 E ( z )

b2 z 2 X ( z ) a3 z 3 a2 z 2 a1 z a0 E ( z ) b1 z b0 X ( z )
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Implementation Cont
Division by coefficients of X(z):

a3
b1 1 b0 2
a2 a1 1 a0 2

X ( z) z
z
z E ( z ) z z X ( z )
b2 b2
b2
b2
b2

b2

Inverse Laplace:

x* (t )

a3 *
a
a
a
e (t T ) 2 e* (t ) 1 e* (t T ) 0 e* (t 2T )
b2
b2
b2
b2

b0 *
b1 *
x (t T ) x (t 2T )
b2
b2

Present sample of the compensator is the function of future,


present and past samples of e*(t) and past output values of
x*(t)
Dr. Richard H. Mgaya

Digital Compensator Design


Digital Compensator Implementation Cont
Flow chart of a digital compensator for a3 equals zero
The output can not be dependent on the future value of the input

Dr. Richard H. Mgaya

You might also like