Title: ZTransforms and Transfer Functions
1Z-Transforms and Transfer Functions
2Outline
- Signals and Systems
- Z-Transforms
- How to do Z-Transforms
- How to do inverse Z-Transforms
- How to infer properties of a signal from its
Z-transform - Transfer Functions
- How to obtain Transfer Functions
- How to infer properties of a system from its
Transfer Function
3Signals
- The signals we are studying in this course
Discrete Signals - A discrete signal takes value at each
non-negative time instance
4Example of a System
Filter
raw readings from a noisy temperature sensor -
Input Signal
smooth temperature values after filtering -
Output Signal
A (SISO) system takes an input signal,
manipulates it and gives a corresponding output
signal.
5Control System
Reference Input
Measured Output
Controller
Target System
Control error
Control Input
Transducer
Transduced Output
6Common Signals
exponential
(ak)
agt1
impulse
alt1
delayed impulse
sine
step
cosine
ramp
exponentially modulated cosine/sine
7Z-Transform of a Signal
u(k)
Z-1
u(0) u(1) u(2) u(3) u(4)
8Z-Transform Contd
- Mapping from a discrete signal to a function of z
- Many Z-Transforms have this form
- Helps intuitively derive the signal properties
- Does it converge?
- To which value does it converge?
- How fast does it converges to the value?
Rational Function of z
9Z Transform of Unit Impulse Signal
Z
uimpulse(k)
Uimpulse(z)
Z-1
u(0) 1 u(1) 0 u(2) 0 u(3) 0 u(4) 0
1 z0 0 z-1 0 z-2 0 z-3 0 z-4
10Delayed Unit Impulse Signal
Z
udelay(k)
Udelay(z)
Z-1
u(0) 0 u(1) 1 u(2) 0 u(3) 0 u(4) 0
0 z0 1 z-1 0 z-2 0 z-3 0 z-4
11Z-Transform of Unit Step Signal
Z
ustep(k)
Ustep(z)
Z-1
u(0) 1 u(1) 1 u(2) 1 u(3) 1 u(4) 1
1 z0 1 z-1 1 z-2 1 z-3 1 z-4
12Unit Step Signal - continued
13Z-Transform of Exponential Signal
Z
uexp(k)
Uexp(z)
Z-1
u(0) 1 u(1) a u(2) a2 u(3) a3 u(4) a4
1 z0 a z-1 a2 z-2 a3 z-3 a4
z-4
Remember this!
14LTI Systems
- Linear, Time Invariant (LTI) System
- Many systems we analyze or design are or can be
approximated by LTI systems - We have a well-established theory for LTI system
analysis and design - Example - A simple moving average
- y(k)u(k-1)u(k-2)u(k-3)/3
15Control System
Reference Input
Measured Output
Controller
Target System
Control error
Control Input
Transducer
Transduced Output
16What does Linear mean exactly?
17Time Invariance
Idiom u(k-n) is u(k) delayed by n time units!
18Reality Check
- Typically speaking, are computing systems linear?
Why? - Consider saturation
- Typically speaking, are computing systems
time-invariant? Why?
19Unit Impulse Response
Claim If we know yimpulse(k), we can obtain
y(k) corresponing to ANY input u(k)! yimpulse(k)
contains ALL information about the input-output
relationship of an LTI system.
20An Example 3-MA
uimpulse(k)
6 x
uimpulse(k-1)
9 x
u(k)
uimpulse(k-2)
3 x
21An Example 3-MA
yimpulse(k)
6 x
yimpulse(k-1)
9 x
y(k)
yimpulse(k-2)
3 x
22Convolution
- y(5) u(0) yimpulse(k)
- u(1) yimpulse(k-1)
- u(2) yimpulse(k-2)
- u(3) yimpulse(k-3)
- u(4) yimpulse(k-4)
yimpulse(k)
u(0) x
yimpulse(k-1)
u(1) x
y(k)
yimpulse(k-2)
u(2) x
23Important Theorem
Time Domain
u(k)
(convolution)
v(k)
y(k)
U(z)
V(z)
Y(z)
(multiplication)
Z Domain
24Z-Transform/Inverse Z-Transform
LTI yimpuse(k)0.3k-1
u (k)0.7k
y (k)?
(convolution)
Transfer Function
(multiplication)
25Delay the Unit Step Signal
y(k)u(k-1)
LTI yimpuse(k) udelayed(k)
u (k)
y (k)
ustep (k)
udelayed(k)
(convolution)
udstep(k)
Transfer Function
(multiplication)
26Delayed Unit Step Signal Contd
Z
udstep(k)
Udstep(z)
Z-1
u(0) 0 u(1) 1 u(2) 1 u(3) 1 u(4) 1
0 z0 1 z-1 1 z-2 1 z-3 1 z-4
Remember this!
27Transfer Function
- Transfer function provides a much more intuitive
way to understand the input-output relationship,
or system characteristics of an LTI system - Stability
- Accuracy
- Settling time
- Overshoot
-
28Signals and Systems in Computer Systems
Spike, one-time fluctuation in input/output, or
disturbance
Change of reference value
- Multiple changes of reference value
- Sum of delayed step signals
- ustep(k)8ustep(k-3)-4ustep(k-6)
Input got delayed for n time units
y(k)u(k-n)
29n-Delay
y(k)u(k-n)
Transfer function z-n
30Unit Shift and n-Shift
y(k)u(k1)
Caveat u(0) disappears
y(k)u(kn)
31Other properties of Z-Transform
Z-Transform
Time Domain
Y(z)aU(z)
y(k)au(k)
Scaling
Y(z)U(z)V(z)
y(k)u(k)v(k)
Superposition
32sin? cos?
33From Exponential to Trigonometric
?
Zcos(k?)? Zsin(k?)?
Euler Formula
34Z-Transform of sin/cos
Z-Transform
Time Domain
35Exponentially Modulated sin/cos
A damped oscillating signal a typical output of
a second order system
36An LTI System Discrete Integrator
y(k)y(k-1)u(k-1)
Y(k)u(k-1)u(k-2)u(1)u(0)
LTI yimpuse(k) udstep(k)
u (k)
y (k)
ustep(k)
udstep(k)
(convolution)
uramp(k)
Z-1
Transfer Function
(multiplication)
37Inverse Z-Transform
Z
u(k)
U(z)
Z-1?
- Table Lookup if the Z-Transform looks familiar,
look it up in the Z-Transform table! - Long Division
- Partial Fraction Expansion
Z-1?
38Long Division
- Sort both nominator and denominator with
descending order of z first
- u(0)3, u(1)5, u(2)7, u(3)9, , guess
u(k)3ustep(k)2uramp(k)
39Partial Fraction Expansion
- Many Z-transforms of interest can be expressed as
division of polynomials of z
May be trickier complex root duplicate root
40An Example
(z-2)(z-4)
Z-1
u2(k)c24k-1, kgt0
c0? c1? c2?
41Get The Constants!
(z-2)(z-4)
42Partial Fraction Expansion contd
How to get c0 and cjs ?
define
43An Example Complete Solution
44Solving Difference Equations
Transfer Function
45A Difference Equation Example
Exponentially Weighted Moving Average
y(k)cy(k-1)(1-c)u(k-1)
46Solve it!
LTI y(k)0.4y(k-1)0.6u(k-1)
u (k)0.8k
y (k)?
47Signal Characteristics from Z-Transform
- If U(z) is a rational function, and
- Then Y(z) is a rational function, too
- Poles are more important determine key
characteristics of y(k)
zeros
poles
48Why are poles important?
Z domain
poles
Time domain
components
49Various pole values (1)
p-1.1
p1.1
p-1
p1
p0.9
p-0.9
50Various pole values (2)
p0.9
p-0.9
p0.6
p-0.6
p0.3
p-0.3
51Conclusion 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
52How fast does it converge?
- U(k)ak, consider u(k)0 when the absolute value
of u(k) is smaller than or equal to 2 of u(0)s
absolute value
Remember This!
53Why 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 U(z) and the
transfer function - The LTI system can be characterized by the
transfer function, or the Z-transform of the unit
impulse response
54Transfer Function
Transfer Function
55Example
LTI y(k)0.4y(k-1)0.6u(k-1)
u (k)0.8k
y (k)?
56When There Are Complex Poles
If
If
Or in polar coordinates,
57What If Poles Are Complex
- If Y(z)N(z)/D(z), and coefficients of both D(z)
and N(z) are all real numbers, if p is a pole,
then ps complex conjugate must also be a pole - Complex poles appear in pairs
Time domain
58An Example
Z-Domain Complex Poles
Time-Domain Exponentially Modulated Sin/Cos
59Poles Everywhere
60Observations
- Using poles to characterize a signal
- The smaller is r, the faster converges the
signal - r lt 1, converge
- r gt 1, does not converge, unbounded
- r1?
- When the angle increase from 0 to pi, the
frequency of oscillation increases - Extremes 0, does not oscillate, pi, oscillate
at the maximum frequency
61Change Angles
Im
Re
-0.9
0.9
62Changing Absolute Value
Im
Re
1
63Conclusion for Complex Poles
- A complex pole appears in pair with its complex
conjugate - The Z-1-transform generates a combination of
exponentially modulated sin and cos terms - The exponential base is the absolute value of the
complex pole - The frequency of the sinusoid is the angle of the
complex pole (divided by 2p)
64Steady-State Analysis
- If a signal finally converges, what value does it
converge to? - When it does not converge
- Any pj is greater than 1
- Any r is greater than or equal to 1
- When it does converge
- If all pjs and rs are smaller than 1, it
converges to 0 - If only one pj is 1, then the signal converges to
cj - If more than one real pole is 1, the signal does
not converge (e.g. the ramp signal)
65An Example
converge to 2
66Final Value Theorem
- Enable us to decide whether a system has a steady
state error (yss-rss)
67Final Value Theorem
If any pole of (1-z)Y(z) lies out of or ON the
unit circle, y(k) does not converge!
68What Can We Infer from TF?
- Almost everything we want to know
- Stability
- Steady-State
- Transients
- Settling time
- Overshoot
69Bounded Signals
70BIBO Stability
- Bounded Input Bounded Output Stability
- If the Input is bounded, we want the Output is
bounded, too - If the Input is unbounded, its okay for the
Output to be unbounded - For some computing systems, the output is
intrinsically bounded (constrained), but limit
cycle may happen
71Limit Cycle
Output constrained, But oscillating Bad!
Imagine CPU utilization Constantly switching
from 1 to 0, 0 to 1,
Solution make sure the system works in a
linearized operating region
72Are these BIBO?
73Better Way to Decide BIBO or NOT
Theorem A system G(z) is BIBO stable iff all
the poles of G(z) are inside the unit circle.
74Example
LTI y(k)0.4y(k-1)0.6u(k-1)
u (k)0.8k
y (k)?
Z
Z
BIBO? only one pole at 0.4, so BIBO!
75Steady State Gain
yss
76Steady-State Gain Contd
- Which value does the output converges to when the
input is an unit step signal? - First of all, it has to converge
Final Value Theorem
Unit Step Input
77More General Cases
Z
Transfer Function
78Example
LTI y(k)0.4y(k-1)0.6u(k-1)
u (k)1
y (k)?
Z
Z
Yss? G(1)1, so yss1
79System Orders
- System Order Number of Poles
- The higher the system order is, the more complex
the system behavior is - Some poles are more important than others
- Why?
- If piltpj,pi/pjk-1 approaches 0 when k is
large (pik-1 converges faster than pjk-1)
80Overshoot and Setting Time
- If not all poles are positive real numbers,
overshoot may happen - Easy to figure out when the system is first order
- For higher order systems, approximation to first
order systems works under certain conditions - Setting time
- First order system
- Higher order systems
81How fast does it converge?
- U(k)ak, consider u(k)0 when the absolute value
of u(k) is smaller than or equal to 2 of u(0)s
absolute value
Remember This!
82Examples Positive Pole
Dominant Pole 0.9
83Examples Negative Pole
Dominant Pole -0.9
84Dominant Pole
- We can approximate a high-order system with a
first-order system with the dominant pole of the
high-order system - IF the dominant pole DOES exist
- Can give a pretty good estimation of settling
time - Can give a reasonable estimate of the maximum
overshoot - Some high-order systems do not have dominant
pole! for example
85No Dominant Pole
86Dominant Pole Contd
- If there is a dominant pole, it must be the pole
with the maximum magnitude - The largest pole should have at least twice the
magnitude of the other poles! - If the dominant pole is real (p), the high-order
system can be approximated by a first-order system
87Summary
- Signals/Systems
- An LTI system can be specified by
- Difference equation
- Unit impulse response
- Transfer function
- If one is known, how to get the other two?
- Characterize a signal with Z-transform
- Z-domain (poles) -gt Time domain (convergence,
etc.) - Characterize a system with Transfer function
- BIBO stability
- Steady-State Gain
- Transients overshoot, settling time
- If there exists a dominant pole