0% found this document useful (0 votes)
62 views58 pages

EPM 4056 Feedback Control Analysis and Design: Trim. 48-Trimester 2 2011/2012 Ching Seong Tan Multimedia University

1. The document discusses digital control systems and concepts related to discrete-time signals and systems, including sampling, the z-transform, and properties of common discrete-time signals. 2. It explains how continuous-time signals are converted to discrete-time signals through sampling and how discrete-time linear time-invariant systems can be characterized by difference equations and the z-transform. 3. The z-transform is introduced as a mapping of discrete-time signals to complex functions of z, and properties such as linearity, time-shifting, and convolution are described. Common signals like impulses, steps, and exponentials are transformed to demonstrate the technique.

Uploaded by

Tan Yong Liang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views58 pages

EPM 4056 Feedback Control Analysis and Design: Trim. 48-Trimester 2 2011/2012 Ching Seong Tan Multimedia University

1. The document discusses digital control systems and concepts related to discrete-time signals and systems, including sampling, the z-transform, and properties of common discrete-time signals. 2. It explains how continuous-time signals are converted to discrete-time signals through sampling and how discrete-time linear time-invariant systems can be characterized by difference equations and the z-transform. 3. The z-transform is introduced as a mapping of discrete-time signals to complex functions of z, and properties such as linearity, time-shifting, and convolution are described. Common signals like impulses, steps, and exponentials are transformed to demonstrate the technique.

Uploaded by

Tan Yong Liang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 58

1

EPM 4056 Feedback Control Analysis and Design



Trim. 48- Trimester 2 2011/2012

Ching Seong Tan
Multimedia University
2
Content
Digital Control Systems - part 1

Sampled data systems.

The z-transform

Digital control concepts.
Continuous-Time Signals
A signal that changes continuously in time:







Defined at all times t (no gap)
Signal can take arbitrary values
Example: temperature, position, velocity,
0 , ), ( > < < t t t e
3
Continuous-Time LTI Systems
A continuous-time system has input and output that are
both continuous-time signals



Continuous-time linear time-invariant (LTI) system given
by differential equation:




Model completely determined by the order n of the system, the
coefficients and
) (t e ) (t y
dt
t dy
dt
t y d
t e
dt
t de
dt
t e d
t y
n
n
n
n
n
n
) ( ) (
) (
) ( ) (
) (
1 0 1
o o | | | + + + =
4
Discrete-Time LTI Systems
A discrete-time system has input and output that are both discrete-
time signals





Discrete-time linear time-invariant (LTI) system given by linear
difference equation




Model completely determined by the order n of the system, and the
coefficients a and b
) (k e ) (k y
) ( ) 1 ( ) ( ) 1 ( ) ( ) (
0 1 0 1
n k y a k y a n k e b k e b k e b k y
n n n
+ + + =


5
Example: 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
6
Discrete-Time Signals
A signal (sequence, or series) whose values are defined only at
discrete times:







Signal defined only at integer times k
Signal can still take arbitrary values
, 2 , 1 , 0 , 1 , 0 , 1 , ), ( = = k or k k e
7
Where are discrete-time signals from?
Some come naturally
Population of a species in different generations
Annual growth percentage of GDP
Results of a numerical algorithm in different rounds of iteration
Some arise by sampling continuous-time signals at regular time
intervals, say, every T seconds

8
Digital Signals







The process of representing an arbitrary continuous value y(kT) with
binary bits of finite word length is called quantization (A/D)
Quantized signal is discrete in both time and value, called a digital
signal
9
Sampling and Data Reconstruction
In the control system, sampling and data reconstruction of signals
are needed to interface the digital computer with the physical world
10
Sampled-Data Control System
Digital controller is designed together with sampler and
data hold
How to characterize the input-output relation from e(t) to u(t)
based on the transfer function D(z) of the digital controller?






Start from the simplest case: digital controller does nothing
) (t e
Sampler Data hold
) (kT e ) (t e
) (t e
Sampler
Digital
controller
) (kT e
Data hold Plant
) (kT u ) (t u ) (t y
11
Mathematical Models of Physical Systems
Control systems give desired output by controlling the input.
Therefore control systems and mathematical modeling are
inter-linked.








Mathematical models of control systems are ordinary
differential equations
12
Transform methods
Continuous System and Laplace Transform
differential equations: describe continuous time systems
Laplace Transform: analyze linear, time invariant, continuous
time systems (LTICS)

Discrete Time Systems and z- Transforms
difference equations: describe operation of discrete time
systems
Z-transform: analyze linear, time invariant, discrete time
systems (LTIDS)

13
Laplace Transform
Differential
equations
Input
excitation e(t)
Output
response r(t)
Time Domain Frequency Domain
Algebraic
equations
Input
excitation E(s)
Output
response R(s)
Laplace Transform
Inverse Laplace Transform
14
Z-Transform
Given a discrete-time signal



Its (double-sided) z-transform is defined by


Its (single-sided) z-transform is defined by



z-transform F(z) is a function of the complex variable z,
and is only well defined on a region of the z-plane (DOC)
We will always assume single-sided (causal) signals and
single-sided z-transform, unless otherwise stated
, 2 , 1 , 0 1 , 0 , 1 , ), ( = = k or k k f

=

= = =
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!

You might also like