EPM 4056 Feedback Control Analysis and Design: Trim. 48-Trimester 2 2011/2012 Ching Seong Tan Multimedia University
EPM 4056 Feedback Control Analysis and Design: Trim. 48-Trimester 2 2011/2012 Ching Seong Tan Multimedia University
=
= = =
k
k
k z k f k f Z z F , 1 , 0 , 1 , , ) ( )] ( [ ) (
=
= = =
0
, 2 , 1 , 0 , ) ( )] ( [ ) (
k
k
k z k f k f Z z F
15
Z-Transform
How to do Z-Transform?
How to do inverse Z-Transform?
How to infer properties of a signal from its Z-transform?
16
Z-Transform of a Signal
Z
-1
e(0)
e(1)
e(2)
e(3)
e(4)
=
0 k
k
z e(k) E(z)
E(z)
Z
e(0) z
0
+e(1) z
-1
+e(2) z
-2
+e(3) z
-3
+e(4) z
-4
e(k)
Mapping from a discrete signal to a function of z
Many Z-Transforms have this form:
=
=
=
m
j
j
j
n
i
i
i
z b
z a
E(z)
0
0
Rational Function of z
Z
-1
e(0)
e(1)
e(2)
e(3)
e(4)
=
0 k
k
z e(k) E(z)
E(z)
Z
e(0) z
0
+e(1) z
-1
+e(2) z
-2
+e(3) z
-3
+e(4) z
-4
e(k)
Mapping from a discrete signal to a function of z
Many Z-Transforms have this form:
Rational Function of z
17
Z Transform of Unit Impulse Signal
e
impulse
(k) E
impulse
(z)
Z
Z
-1
e(0) = 1
e(1) = 0
e(2) = 0
e(3) = 0
e(4) = 0
1 z
0
+0 z
-1
+0 z
-2
+0 z
-3
+0 z
-4
-1 0 1 2 3 4 5 6 7 8 9
0
0.5
1
1 = (z) E
impulse
18
Delayed Unit Impulse Signal
e
delay
(k) E
delay
(z)
Z
Z
-1
e(0) = 0
e(1) = 1
e(2) = 0
e(3) = 0
e(4) = 0
0 z
0
+1 z
-1
+0 z
-2
+0 z
-3
+0 z
-4
1
= z (z) E
delay
-1 0 1 2 3 4 5 6 7 8 9
0
0.5
1
19
Z-Transform of Unit Step Signal
e
step
(k) E
step
(z)
Z
Z
-1
e(0) = 1
e(1) = 1
e(2) = 1
e(3) = 1
e(4) = 1
1 z
0
+1 z
-1
+1 z
-2
+1 z
-3
+1 z
-4
... z z z (z) E
step
+ + + + =
3 2 1
1
-1 0 1 2 3 4 5 6 7 8 9
0
0.5
1
20
Z-Transform of Unit Step Signal
, n
, |a| 1 <
a
a
a
) a ... a a a)( (
a ... a a
n
n
n
+ + + +
= + + + +
1
1
1
1 1
1
1
2
2
A little bit more math
assuming
a
a
a
a
) a ... a a a)( (
... a a
n
n
n
n
+ + + +
= + + +
1
1
1
1
lim
1
1 1
lim 1
1
2
2
1 1
1
1
1
3 2 1
= = + + + + =
z
z
-z
... z z z (z) E
step
21
Z-Transform of Exponential Signal
e
exp
(k) E
exp
(z)
Z
Z
-1
e(0) = 1
e(1) = a
e(2) = a
2
e(3) = a
3
e(4) = a
4
1 z
0
+a z
-1
+a
2
z
-2
+a
3
z
-3
+a
4
z
-4
1
3 3 2 2 1
exp
1
1
1
-
-az
... z a z a az (z) E
=
+ + + + =
-1 0 1 2 3 4 5 6 7 8 9
0
1
2
3
4
5
6
a=1.2
Remember
this!
22
Z-Transform of sin/cos
ik
e e(k)=
1
1
1
- i
z -e
E(z)
=
2
) cos
ik ik
e e
(k e(k)
+
= =
Time Domain
Z-Transform
i
e e
(k e(k)
ik ik
2
) sin
= =
-ik
e e(k)=
1
1
1
- -i
z -e
E(z)
=
2 1
1
2 1 2 1
1
1 1 1 1
1 1
cos 2 1
cos 1
sin cos 1
cos 1
2
sin cos 1
1
sin cos 1
1
2
1
1
1
1
+
=
+
=
+
+
=
+
=
z z
z
) z ( ) z (
z
)/
z i z z i z
(
)/
z e z -e
( E(z)
i - i
2 1
1
cos 2 1
sin
=
z z -
z
E(z)
-
-
i e
i
sin cos + = Euler Formula:
2
cos
i i
e e
+
=
2i
e e
sin
i i u u
u
=
23
Exponentially Modulated sin/cos
2
) cos
cos exp
k i k i
k
) (ae ) (ae
(k a (k) e
+
= =
i
) (ae ) (ae
(k a (k) e
k i k i
k
2
) sin
sin exp
= =
2 2 1
1
cos 2 1
sin
+
=
z a z a -
z a
E(z)
-
-
2 2 1
1
cos 2 1
sin
+
=
z a z a -
z a
E(z)
-
-
A damped oscillating signal a typical output of a second order system
0 2 4 6 8 10 12 14 16 18
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
e(k)=cos(k*pi/6)*0.9
k
24
Properties of z-Transform
| |
) ( ) 1 ( ) (
0
1
) (
lim lim
lim
1 z k
1
0
1
2 1 2 1
1
0
0
2 2 1 1 2 2 1 1
0
z E z k e
E(z) ) e(
E(z)
z
z
(z) E e(n) (k) e
(z) (z)E E (k) (k)*e e
dz
dE(z)
-z ke(k)
) E(z e(k)
e(k)z E(z) z n)u(k) e(k
E(z) z n)| n)u(k e(k
(z) E a (z) E a (k) e a (k) e a
e(k)z E(z) k e
z
k
n
-a ak
n
k
k n
-n
n
k
-k
= =
+
+ +
=
=
=
>
linearity
delayed
forwarded
convolution
initial value
final value
complex trans.
definition
25
Inverse Z-Transform
Table Lookup if the Z-Transform looks familiar,
look it up in the Z-Transform table!
Power series method (Long Division)
Partial Fraction Expansion
e(k) E(z)
Z
Z
-1
?
(k) u (k) u e(k)
ramp step
2 3 + =
(z) E (z) E
) z (
z
z
E(z)
ramp step
2 3
1
2
1
3
2 1
1
1
+ =
+
Z
-1
?
26
Power Serious Method
Sort both nominator and denominator with
descending order of z first
2 1
1
2 1
3
+
=
z z
z
E(z)
e(0)=3, e(1)=5, e(2)=7, e(3)=9, , guess:
e(k)=3e
step
(k)+2e
ramp
(k)
27
Partial Fraction Expansion
Many Z-transforms of interest can be expressed
as division of polynomials of z
=
=
=
m
j
j
j
n
i
i
i
z b
z a
E(z)
0
0
May be trickier:
complex root
duplicate root
) p )...(z p )(z p (z b
z b ... z b z b b
m m
m
m
=
+ + + +
2 1
2
2 1 0
=
+ =
m
j
j
j
p z
c
c E(z)
1
0
, p (k) e
k
j d p
j
1
exp
=
+ =
m
j
d p impulse
(k) e (k) e c e(k)
j
1
exp 0
where k>0
1
1
1
1
z p
z
j
28
Example
8 6
14 14 3
2
2
+
+
=
z z
z z
E(z)
4 2
2 1
0
+ =
z
c
z
c
c E(z)
> +
=
=
0 4 2
0
1
2
1
1
0
k , c c
k , c
e(k)
k k
(z-2)(z-4)
E
1
(z)=c
0
Z
-1
e
1
(k)=c
0
*e
impulse
(k)
Z
-1
Z
-1
e
2
(k)=c
1
*2
k-1
, k>0
2
1
2
=
z
c
(z) E
4
2
3
=
z
c
(z) E
e
2
(k)=c
2
*4
k-1
, k>0
c
0
? c
1
? c
2
?
29
Get The Constants!
8 6
14 14 3
2
2
+
+
=
z z
z z
E(z)
4 2
2 1
0
+ =
z
c
z
c
c E(z)
(z-2)(z-4)
,
z
c
z
c
c E(z)
4 2
2 1
0
+ =
, z , c E(z)
0
3
8 6
14 14 3
lim
2
2
0
=
+
+
=
z z
z z
c
z
, c
z
) (z c
)c (z )E(z) (z- K(z)
2
1
0
2
4
4 4 +
+ = =
3
2
14 14 3
4
4
2
2
=
+
= =
= z
|
z
z z
c ) K(
30
Partial Fraction Expansion contd
E(z) c
z
= lim
0
=
=
=
m
j
j
j
n
i
i
i
z b
z a
E(z)
0
0
=
+ =
m
j
j
j
p z
c
c E(z)
1
0
How to get c
0
and c
j
s ?
)E(z) (z-p (z) E
j p
j
=
) (p E c
j p j
j
=
define
31
Example Complete Solution
3
8 6
14 14 3
lim lim
2
2
0
=
+
+
= =
z z
z z
E(z) c
z z
4
14 14 3
8 6
14 14 3
2
2
2
2
2
z-
z z
z z
z z
) (z (z) E
+
=
+
+
=
2
14 14 3
8 6
14 14 3
4
2
2
2
4
z-
z z
z z
z z
) (z (z) E
+
=
+
+
=
8 6
14 14 3
2
2
+
+
=
z z
z z
E(z)
4 2
2 1
0
+ =
z
c
z
c
c E(z)
1
4 2
14 2 14 2 3
2
2
2 1
=
+
= =
-
) ( E c
3
2 4
14 4 14 4 3
4
2
4 2
=
+
= =
-
) ( E c
4
3
2
1
3
+ =
z z
E(z)
> +
=
=
0 4 3 2
0 3
1 1
k ,
k ,
e(k)
k k
32
Solving Difference Equations
m) e(k b ... ) e(k b n) y(k a ... ) y(k a y(k)
m n
+ + + + + = 1 1
1 1
E(z) z b ... E(z) z b Y(z) z a ... Y(z) z a Y(z)
m
m
n
n
+ + + + + =
1
1
1
1
E(z)
z a ... z a
z b ... z b
Y(z)
n
n
m
m
+ +
=
1
1
1
1
1
... y(k)=
Z
Z
-1
Transfer
Function
33
A Difference Equation Example
Exponentially Weighted Moving Average
y(k)=cy(k-1)+(1-c)u(k-1)
34
Solve it!
1
1
1
1
1 1
1
1
1
8 0 1
2 1
4 0 1
6 0
8 0
2 1
4 0
6 0
8 0 4 0
6 0
8 0 1 4 0 1
6 0
4 0 1
6 0
=
=
=
=
z .
z .
z .
z .
. z
.
. z
.
) . )(z . (z
z .
) z . - )( z . - (
z .
E(z)
z .
z .
Y(z)
- -
-
LTI: y(k)=0.4y(k-1)+0.6e(k-1)
e
(k)=0.8
k
y
(k)?
E(z) z . Y(z) z . Y(z)
1 1
6 0 4 0
+ =
Z
1
8 0 1
1
=
z .
E(z)
Z
1 1
8 0 2 1 4 0 6 0
k- k
. . . . - y(k) + =
Z
-1
-1 0 1 2 3 4 5 6 7 8 9
0
0.2
0.4
0.6
0.8
1
-1 0 1 2 3 4 5 6 7 8 9
0
0.2
0.4
0.6
0.8
1
35
Signal Characteristics from Z-Transform
If E(z) is a rational function, and
Then Y(z) is a rational function, too
Poles are more important determine key
characteristics of y(k)
m) e(k b ... ) e(k b n) y(k a ... ) y(k a y(k)
m n
+ + + + + = 1 1
1 1
[
[
=
=
= =
m
j
j
n
i
i
) p (z
) z (z
D(z)
N(z)
Y(z)
1
1
zeros
poles
36
Why are poles important?
[
[
=
=
=
+ =
= =
m
j
j
j
m
j
j
n
i
i
p z
c
c
) p (z
) z (z
D(z)
N(z)
Y(z)
1
0
1
1
=
+ =
m
j
k-
j j impulse
p c (k) e c Y(k)
1
1
0
Z
-1
Z domain
Time domain
poles
components
37
Various pole values (1)
-1 0 1 2 3 4 5 6 7 8 9
0
0.5
1
1.5
2
2.5
-1 0 1 2 3 4 5 6 7 8 9
0
0.2
0.4
0.6
0.8
1
-1 0 1 2 3 4 5 6 7 8 9
0
0.2
0.4
0.6
0.8
1
-1 0 1 2 3 4 5 6 7 8 9
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
-1 0 1 2 3 4 5 6 7 8 9
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
p=1.1
p=1
p=0.9
p=-1.1
p=-1
p=-0.9
-1 0 1 2 3 4 5 6 7 8 9
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
38
Conclusion for Real Poles
If and only if all poles absolute values are
smaller than 1, y(k) converges to 0
The smaller the poles are, the faster the
corresponding component in y(k) converges
A negative poles corresponding component is
oscillating, while a positive poles corresponding
component is monotonous
39
How fast does it converge?
e(k)=a
k
, consider e(k)0 when the absolute value of
e(k) is smaller than or equal to 2% of e(0)s
absolute value
|a|
k
. . |a| k
. |a|
k
ln
4
912 3 02 0 ln ln
02 0
~
= =
=
11
36 0
4
7 0 ln
4
7 0
~
~
=
. | . |
k
. a
Remember
This!
0 2 4 6 8 10 12
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
y(k)=0.7
k
y(11)=0.0198
40
Why do we need Z-Transform?
A signal can be characterized with its Z-transform
(poles, final value )
In an LTI system, Z-transform of Y(z) is the
multiplication of Z-transform of E(z) and the
transfer function
The LTI system can be characterized by the
transfer function, or the Z-transform of the unit
impulse response
41
Sampler and Zero-Order Hold
) (t e
) (t e
) (s E
Sampler and zero-order hold
) (s E
In general, original signal e(t) can not be fully reconstructed
42
Sampler and Zero-Order Hold
What is the effect of sampler and hold in frequency domain?
Laplace transform of
Z-transform of
Laplace transform of
) (t e
)] ( [( ) ( t e L s E =
) (kT e
=
=
0
) ( ) (
k
k
z kT e z E
+ + = )] 2 ( ) ( )[ ( )] ( ) ( )[ 0 ( ) ( T t u T t u T e T t u t u e t e
]
1
[ ] ) ( [
] ][ ) 2 ( ) ( ) 0 ( [
] )[ ( ]
1
)[ 0 ( ) (
0
2
2
2
s
e
e kT e
s
e
s
e
e T e e T e e
s
e
s
e
T e
s
e
s
e s E
Ts
k
kTs
Ts Ts
Ts Ts
Ts Ts Ts
=
+ + + + =
+ + =
=
=
= =
0
*
) ( ) ( ) (
k
kTs
e z
e kT e z E s E
TS
) (t e
43
Sampler and Zero-Order Hold
the sampler and zero-order hold can be broken up in two steps
In time domain
) (s E
) ( * s E
) (s E
s
Ts
c 1
) (t e
) ( * t e
) (t e
T
T
T
44
Ideal Sampler
) (t e ) ( * t e
) (t
T
o
) (t e
) ( * t e
T
Representation of the idea sampler
Impulse
modulator
) ( ) ( ) ( * t t e t e
T
o =
) (t e
45
First Perspectives of Sampler and Hold
In the time domain:
) (t e ) ( * t e ) (t e
T
Zero-Order Hold
Sampler
In the frequency domain (a mixture of z- and Laplace transforms):
) (s E
) (z E
) (s E
T
Zero-Order Hold
Sampler
=
=
0
) ( ) (
k
k
z kT e z E
is called the z-transform of E(s)
46
Second Perspectives of Sampler and Hold
In the time domain:
=
=
0
) ( ) ( *
k
kTs
e kT e s E
) (t e
) (kT e
) (t e
T
Ideal Sampler
In the frequency domain:
) (s E
) ( * s E
) (s E
T
is called the star-transform of E(s)
T
Data hold
s
Ts
c 1
47
Relating Two Perspectives
48
Star-Transform
Given E(s), find
Method I
Method II
Method III find E(z) either from the table,
or by
then
49
Effect of Time Delay on Star-Transform
When is an integer multiple of the sampling period T, we
have the simple relation
nT t =
0
50
Properties of E*(s)
Property 1
E*(s) is periodic in s with period
Example
51
Properties of E*(s)
Property 2
If E(s) has a pole at p, then E*(s) has poles at
Example
52
Data Reconstruction
Shannons Sampling Theorem
the signal e(t) can be uniquely determined from its
sampling e*(t) with sampling period T if its Fourier
transform E(j) contains no frequency component
greater than /T
Or equivalently, one has to sample the signal twice as
fast as the fastest changing part in e(t) in order to be
able to reconstruct it uniquely
53
Data Reconstruction in Frequency Domain
54
Zero-Order Hold
A physically feasible (causal) data hold transfer function
is given by
with unit impulse response
Frequency response
55
First-Order Hold
Given a sequence of sampled data e(kT ), k = 0, 1, . . .
reconstruct the signal between sampling times
approximately by first order Euler expansion
56
Fractional-Order Holds
Given a sequence of sampled data reconstruct the signal
between sampling times approximately as follows
57
58
Thank you!