You are on page 1of 33

MODERN CONTROL

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

Date: October 25th, 2013

Linear Difference Equation and Z-Transform


Linear difference equations and the z-transform
Techniques used in design and analysis of a digital control system.

Example of systems that use digital computers:


Radar antenna positioning system
Airplane autopilot control
Chemical process control
Machine tool control

Goal: Representing a digital computer as a transfer function


similar to other subsystems.
Note: Control system design using analog, i.e., continuous time
devices, are still used and are valid
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Difference Equation
Sequence of real values associated with temporal index k,
{k = 0, 1, 2, }

Digital control concerns in generating a sequence u(k), i.e., control


effort, given a sequence y(k), i.e., sampled data measurements
sequence
The kth control effort is defined in terms of kth measurement or sample

u(k ) f [ y(k ), y(k 1),, y(k n), u(k 1), u(k 2),, u(k n)]
Assumption: u(k) is a linear combination of measurements and past control
efforts

u(k ) bn1u(k 1) b0u(k n) am y(k ) am1 y(k 1) a0 y(k m)


Where: ai and bi are independent of k, i.e., time invariant
Task: Selection of ai and bi such that the control signal has the dynamic properties
if the desired control
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Z-Transform of a Sequence
F * (s) L[ f * (t )] Z f (kT ) k 0 f (kT )e kTs

Let z = eTs
F ( z ) k 0 f (kT ) z k

Long-hand form:
F ( z ) f (0) f (T ) z 1 f (2T ) z 2 f (kT ) z k

Example: Sequence of finite series


F ( z ) Z f (k ) f (0) f (1) z 1 f (2) z 2

F ( z ) Z f (k ) k 0 f (k ) z k

Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Unit Step Sequence
0
u (kT )
1

k 0
k 0

z-transform
U ( z ) Z [u(kT )] k 0 f (kT ) z k

Geometric series convergence


1 1
z
1
1 2

z z
z 1 1 z 1
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Unit Ramp Sequence
f (kT ) kT

z-transform
F ( z ) Z [ f (kT )] k 0 f (kT ) z

T k 0 kz k

T ( z 1 2 z 2 3z 3 ) .i
Multiply by z both sides

zF ( z ) T (1 2 z 1 3z 2 4 z 3 ) .ii
Subtract eqn. i and ii
zF ( z) F ( z) ( z 1) F ( z ) T (1 z 1 z 2 z 3 )

1
1
2
But

1
1 z
1
Tz
( z 1) F ( z ) T

1 z 1 z 1

F ( z)

Tz
( z 1) 2
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Exponential Function Sequence
k 0
0
f (kT ) akT
k 0
e

z-transform
F ( z ) Z [e akT ] k 0 (e aT z 1 ) k

Geometric series convergence


z

z e aT
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


General Exponential function Sequence
f (k ) r k

z-transform
F ( z ) Z [r k ] k 0 f (r 1 z ) k

F ( z)

z
zr

for z r

Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Discrete Impulse Function Sequence
1
f (k )
0

k 0
k 0

z-transform
F ( z ) Z [ (k )] Z [1] k 0 z k 1

Delayed impulse function sequence

Z-transform

0 k n
f (k )
1 k n 0
F ( z ) Z[ (k n)] Z n
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Solving Linear Difference Equation with Z-Transform
Delay and advance theorem
Theorem 1: Z f (k n) z n F ( z )
Theorem 2:

Z f (k n) z n F ( z ) z n f (0) zf (n 1)

Note: s is associated with differentiation of a differential equation


z is associated with the shifting of the difference equation

Example: Consider a homogenous first-order differential equation


x(k 1) 0.8x(k ) 0

Initial value x(0) = 1


zX ( z ) zx(0) 0.8 X ( z ) 0

X ( z)

z
z 0.8

x(k ) (0.8) k
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Z-Transform of a Transfer Function and Impulse Response
Sequence
Consider a general discrete system described by a difference
equation
y(k n) an1 y(k n 1) a1 y(k 1) a0 y(k )
d nu (k 1) d n1u (k n 1) d 0u (k )

Employing advance theorem and ignoring initial conditions


( z n an1 z n1 az a0 )Y ( z) (d n z n d n1 z n1 dz d0 )U ( z )

Y ( z ) d n z n d n 1 z n 1 dz d 0
H ( z)
n
U ( z)
z an 1 z n 1 az a0
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Z-Transform of a Transfer Function and Impulse Response
Sequence
Example: Find the transfer function associated with the secondorder difference equation
y(k 2) 2 y(k 1) y(k ) u(k 1) u(k )

z-transform
( z 2 2 z 1)Y ( z ) ( z 1)U ( z )

Y ( z)
z 1
H ( z)
2
U ( z) z 2z 1
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Pulse Transfer Function
Consider the following block diagram

U*(s) Sample input to G(s)


X0(s) Continuous output
X0*(s) Sampled output
The figure is the pulse transfer function where U*(s) = U(z)
and X0(z) = X0*(s)
X 0 ( z)
G( z)
U ( z)
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Pulse Transfer Function
Cascaded blocks

X 0 ( z)
G1 ( z )G2 ( z )
U ( z)

X 0 ( z)
Z G1G2 ( s)
U ( z)
X 0 ( z)
G1G2 ( z )
U ( z)

Note: G1G2(z) G1(z)G2(z)


Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Pulse Transfer Function
Example: Find the pulse transfer function

G(s) G1G2 (s)


1
G( s) 1 e

s
(
s

1
)

Z-transform
z (1 e T )
1
G( z ) 1 z
T
(
z

1
)(
z

e
)

Ts

T
z 1 z (1 e )
G( z )

T
z
(
z

1
)(
z

e
)

Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Pulse Transfer Function
Example cont
(1 e T )
0.393
G( z )

T
(
z

e
) z 0.607

X0
0.393z 1
( z)
Xi
1 0.607 z 1

Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Closed-loop Pulse Transfer Function
Consider the error sampled system given as follows:

C
G( z )
( z)
R
1 GH ( z )

GH ( z ) Z GH ( s)

For a sampler between G(s) and H(s)


C
G( z )
( z)
R
1 G( z ) H ( z )
Dr. Richard H. Mgaya

Linear Difference Equation and Z-Transform


Z-Transform pairs

Dr. Richard H. Mgaya

Inverse Z-Transform
Long Division
Example: Find inverse sequence of the function:
z2 z
F ( z) 2
z 3z 4

Multiply by z-2 in the numerator and denominator


1 z 1
F ( z)
1 3z 1 4 z 2

Division

1 4 z 8z
1 3z 1 4 z 2 1 z 1
1 3z 1 4 z 2
4 z 1 4 z 2
4 z 1 12 z 22 16 z 33
8z 16 z
8z 2 24 z 3 32 z 4
8z 3 32 z 4

Sequence
f (0) 1
f (1) 4
f (2) 8

Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Assumption:
- Complex power of variable z are at the denominator
- Roots of the denominator are known/found
1
F ( z)
( z 1)( z 0.8)

Partial fraction expansion

F ( z) A

Bz
Cz

z 1 z 0.8

Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Example
Consider the following z-domain function
z2 z
F ( z)
( z 0.6)( z 0.8)( z 1)

Find the inverse sequence


F ( z)

Az
A1 z
Az
2 3
z 0.6 z 0.8 z 1

Constant term omitted no constant on the numerator


z 1
1.6
A1

20
( z 0.8)( z 1) z 0.6 (0.2)(0.4)

A2

z 1
1.8

45
( z 0.6)( z 1) z 0.8 (0.2)(0.2)
Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Example Cont
z 1
2
A3

25
( z 0.6)( z 0.8) z 1 (0.4)(0.2)
20 z
45 z
25 z
F ( z)

z 0.6 z 0.8 z 1

Sequence
f (k ) 20(0.6) k 45(0.8) k 25

Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Distinct Real Roots
Assumption:

Expansion:

F ( z)

N ( z)
( z p1 )( z p2 ) ( z pn )

F ( z ) A0

A1 z
Az
2
z p1 z p2

Constant term A0 to assure equality incase of a constant on the numerator


Multiply both sides by z pi

Ai

z pi
F ( z)
z
z pi

A0 is given for z = 0
Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Distinct Complex Roots
Alternative I: Partial fraction expansion to find coefficients
followed by Euler identities for the sequence
Alternative II: Transforms of damped sinusoidal sequences

kT

kT

Ze

Ze

z 2 zeT cos T
cos kT 2
z z 2e T cos T e 2T

zeT sin T
sin kT 2
z z 2e T cos T e 2T

Roots in polar form:


z1, 2 eT (cos T j sin T )
z1, 2 e T e jT Re j
Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Consider the following function:
F ( z)

N ( z)
P( z )( z 2 2 Rz R 2 )

R e 2T

cosT

The limit of implies the poles of the quadratic term are


complex
Partial fraction expansion:
A( z 2 zR )
BzR sin T
F ( z) 2

Q( z )
2
2
2
z 2 Rz R
z 2 Rz R

The 1st and 2nd terms are the z-transform of


RkcosT and RksinT respectively, Q(z) is the reminder
Dr. Richard H. Mgaya

Inverse Z-Transform
Partial Fraction Expansion
Example: Find the inverse of the following function
z2 z
F ( z) 2
( z 1.13z 0.64)

Identify R, and by inspection


R 0.64 0.8

1.13 1.13

0.7063
2R
1.6

But = cos T
T cos 1 cos 1 (0.7063) 0.7865rad

sin T sin(0.7865) 0.7079

Dr. Richard H. Mgaya

Inverse Z-Transform
Correct form of the partial fraction expansion:
A( z 2 z (0.8)(0.7063)) Bz (0.8)(0.7079)
Cz
F ( z)

z 2 1.13z 0.64
z 2 1.13z 0.64 z 0.8

A( z 2 0.565 z )
B(0.5663z )
Cz
2
2

z 1.13z 0.64 z 1.13z 0.64 z 0.8

z 0.8
z 1
1.8
C F ( z)
2

4.787
z
z 1.13z 0.64 z 0.8 0.376

Dr. Richard H. Mgaya

Inverse Z-Transform
Find the common denominator and equate the numerator:
z 2 z A( z 2 0.565)( z 0.8) Bz (0.5663)( z 0.8)
4.787( z 2 1.13z 0.64)
z 2 z ( A 4.787) z 3 [0.235 A 0.5663B 5.409]z 2
[0.452 A 0.8B 3.064]z

Equating the coefficients of z:


z 3 : 0 A 4.787
z 2 : 1 0.235 A 0.5663B 5.409
z : 1 0.452 A 0.8B 3.064
A 4.787

1 0.235(4.787) 5.409
B
9.33
0.5663

Inverse transform sequence

f (k ) 4.787(0.8) k cos(0.7865k ) 9.33(0.8) k sin(0.7865k ) 4.787(0.8) k


Dr. Richard H. Mgaya

Pole location on the z-Plane


Relationship Between Pole location and the nature of the temporal
sequence
Consider the following function
Az
z p
p real poles of F ( z )

F ( z)

Time domain sequence:


f (k ) Ap k

k 0

Note:

p < -1: the solution will oscillate and increase magnitude for large k
-1< p < 0: the solution will decay in oscillatory fashion
0 < p < 1: the solution will decay in exponential manner as k becomes large

p > 1:the solution will grow in exponential nature


Dr. Richard H. Mgaya

Pole location on the z-Plane


Relationship Between Pole location and the nature of the
temporal sequence
Consider the following function
N ( z)
F ( z) 2
z bz c
denominato r has complex roots

Partial fraction expansion:


Az
A*
F ( z)

z p z p*
* - denotes complex conjugate

In polar notation the complex poles are written as follows:


p e j

p* e j
Dr. Richard H. Mgaya

Pole location on the z-Plane


Relationship Between Pole location and the nature of the
temporal sequence
Coefficients of A and A*:
A j

Substitution:
f (k ) ( j ) R k e jk ( j ) R k e jk

R k e jk e jk j e jk e jk

Eulers identities:
f (k ) R k (2cos k 2 sin k )

sine and cosine functions are bounded by unity (1)


Thus, Rk determines the asymptotic nature of the sequence
Dr. Richard H. Mgaya

Pole location on the z-Plane


Relationship Between Pole location and the nature of the
temporal sequence
R is the radial distance from the origin to the complex pole
If R is greater than unity the sequence will be unbounded for large k
If R is less than unity but positive the sequence will converge to zero
for large k

Conclusion:
Poles within the unit circle of the z-plane contribute to decreasing
sequence stable
Poles on the unit circle contribute to oscillatory sequence marginal
stable
Poles outside the unit circle contribute to unbounded increasing
unstable
Dr. Richard H. Mgaya

Pole location on the z-Plane


Relationship Between Pole location and the nature of the
temporal sequence
Pole location: z-plane

Nature of the sequence

Dr. Richard H. Mgaya

You might also like