Control System Design Project
Control System Design Project
Lewis 1999
All rights reserved
Z-Transform
∞ ∞
1 z
Y ( z ) = ∑ a k z −k = ∑ (az −1 ) k = −1
= .
k =0 k =0 1 − az z−a
1
This has a pole at z=a and a zero at z=0.
Example. The discrete unit step u −1 (k ) = 1,1,1, L (i.e. a sequence of 1's which begins at
time k=0) is a special case of the discrete exponential having a=1. Its Z-transform is
1 z
Y ( z) = = ,
1− z −1
z −1
which has a pole at z=1 and a zero at z=0.
Example. The discrete unit pulse u 0 (k ) = 1,0,0, L (i.e. a one occurring at time k=0) has
transform
∞
Y ( z ) = ∑ u 0 (k ) = 1 ,
k =0
i.e. a constant surface which has no poles or zeros.
Given this mapping, it is now instructive to compare the examples above with
their continuous-time counterparts. In fact, note that the continuous unit step, which has
the Laplace transform of 1/s, has a pole at s=0, while the discrete unit step has a pole at
z=1. The continuous exponential eαt has a pole at s=α, while the discrete exponential
has a pole at z = eαT , with T the sampling period. The discrete unit pulse and the
(continuous) unit impulse both have constant transforms of 1.
2
Inverse Z-Transform
z
Suppose Y ( z ) = . One can determine the associated time series yk
z − 1.7 z + 0.72
2
z −1 + 1.7 z −2 + L
z − 1.7 z + 0.72
2
z .
z − 1.7 + 0.72 z −1
1.7 − 0.72 z −1
1.7 − 2.89 z −1 + 1.224 z − 2
The inverse Z-transform appears in the quotient, so that yk= 0, 1, 1.7, …
Exactly as for the Laplace transform inverse, one may use the PFE. Thus, write
z 1 10 − 10 10 z − 10 z
Y ( z) = 2 = ⋅z = + ⋅z = + .
z − 1.7 z + 0.72 ( z − 0.9)( z − 0.8) z − 0.9 z − 0.8 z − 0.9 z − 0.8
The residues are determined exactly as in the continuous-time case. Note, however, that
one keeps the factor z out of the PFE to obtain the z in the numerators of the expansion.
This is necessary since Z-transforms generally have a zero at z=0.
Now, according to the examples worked above, the time series is given as
y k = 10(0.9 k − 0.8 k )u −1 (k ) .
Evaluating the first few terms gives yk = 0, 1, 1.7, … This is the same result obtained by
long division.
Difference Equations
3
described in terms of differential equations, one needs a numerical integrator, which is
inconvenient. This applies to any controller K(s) described in terms of Laplace
transforms. The simulation of DIFERENCE EQUATIONS is far easier than the
simulation of differential equations. This means that controllers described in terms of
difference equations are very easy to implement on a digital microprocessor. This applies
to controllers K(z) described in terms of Z-transforms. Before showing how to design
digital controllers, we briefly discuss difference equations, and relate them to Z-
transforms.
We will abuse notation now and define an operator z-1 in the time domain. To see
what z-1yk means, write its transform as
∞ ∞
Y ' ( z ) = ∑ ( z −1 y k ) z − k = ∑ y k z −( k +1)
k =0 k =0
Now change variables to K=k+1 to see that
∞
Y ' ( z ) = ∑ y K −1 z − K .
K =1
That is, z-1yk is a delayed version yk-1 of the time series.
The Z-transform SHIFT PROPERTY says that multiplying the Z-transform by z-1
delays the time series by one. Compare this to the Laplace transform property which says
that multiplying the transform by 1/s amounts to integrating the time function.
Now one may write the input/output relation of the digital system as
4
y k + a1 y k −1 + L + a n y k − n = b0 u k − d + b1u k − d −1 + L + bm u k − d −m
or
y k = − a1 y k −1 − L − a n y k − n + b0 u k −d + b1u k −d −1 + L + bm u k − d − m .
This is a difference equation describing the digital system.
The meaning of the system delay is that a control uk applied at time k has no
influence on the output until time k+d. In the, last example, for instance, uk affects yk+1,
not yk.
The relation between the Laplace transform variable s and the Z-transform
variable z is z=esT, with T the sampling period. However, using this to transform K(s) to
K(z) will give non-polynomial transfer functions. Note that
1 + sT
e ≈
sT 2
1− sT
2
Therefore define the BLT by
1 + sT
z= 2,
1− sT
2
and its inverse
2 z −1
s= .
T z +1
5
K ( z ) = K ( s ) s = 2 z −1 .
T z +1
6
T z + 1 TdD z − 1
K ( z ) = k 1 + + ,
TiD z − 1 T z − η D
where the digital integral and derivative time constants are
TiD = 2Ti
ηT
TdD =
1 + ηT
2Td
and the discrete filtering pole is given by
1 − ηT
2Td
ηD = .
1+ η T
2Td
This is the digital controller. No Runge-Kutta routine is needed to implement it, only
difference equations, which are easily programmed on a computer.
7
Note that the integral input is computed by adding to its previous value the
average of two consecutive error terms. The derivative term is computed from the
difference between two consecutive error terms.