You are on page 1of 58

ECE 352 Systems II

Manish K. Gupta, PhD


Office: Caldwell Lab 278
Email: guptam @ ece. osu. edu
Home Page: http://www.ece.osu.edu/~guptam
TA: Zengshi Chen Email: chen.905 @ osu. edu
Office Hours for TA : in CL 391: Tu & Th 1:00-2:30 pm
Home Page: http://www.ece.osu.edu/~chenz/
Acknowledgements
Various graphics used here has been
taken from public resources instead of
redrawing it. Thanks to those who have
created it.
Thanks to Brian L. Evans and Mr. Dogu
Arifler
Thanks to Randy Moses and Bradley
Clymer
ECE 352

Slides edited from:


Prof. Brian L. Evans and Mr. Dogu Arifler
Dept. of Electrical and Computer Engineering
The University of Texas at Austin course:
EE 313 Linear Systems and Signals Fall 2003
Z-transforms
Z-transforms
For discrete-time systems, z-transforms play
the same role of Laplace transforms do in
continuous-time systems
Bilateral Forward z-transform Bilateral Inverse z-transform

hk z k
1
H [ z]
k
h[k ]
2 j R
H [ z ] z k 1dz

As with the Laplace transform, we compute


forward and inverse z-transforms by use of
transforms pairs and properties
Region of Convergence
Region of the complex z- Four possibilities (z=0 is
plane for which forward a special case and may
z-transform converges or may not be included)
Im{z} Im{z}

Entire Disk
plane Re{z} Re{z}

Im{z} Im{z}

Intersection
Complement of a disk and
of a disk Re{z} complement Re{z}

of a disk
Z-transform Pairs
h[k] = d[k] h[k] = ak u[k]
0

d k z d k z

a uk z
k k
H [ z] 1 H [ z] k k
k k 0
Region of convergence: entire z- k
k
plane a
a z k k

k 0 z
h[k] = d[k-1]
k 0

1 a
if 1
a z
1 1
H [ z] d k of1 convergence:
Region
k
z d k 1 z z
k

entire z-
k 1
k 1
z
Region of convergence: |z| >
plane |a| which is the
h[n-1] z-1 H(z) complement of a disk
Stability
Rule #1: For a causal sequence, poles are inside
the unit circle (applies to z-transform functions
that are ratios of two polynomials)
Rule #2: More generally, unit circle is included
in region of convergence. (In continuous-time,
the imaginary axis would be in the region of
convergence of the Laplace transform.)
a uk
Z 1
k
for z a
1 a z 1
This is stable if |a| < 1 by rule #1.
It is stable if |z| > 1 > |a| by rule #2.
Inverse z-transform
c j

f k
1

k 1
F z z dz
2j c j

Yuk! Using the definition requires a contour


integration in the complex z-plane.
Fortunately, we tend to be interested in only a
few basic signals (pulse, step, etc.)
Virtually all of the signals well see can be built up
from these basic signals.
For these common signals, the z-transform pairs have
been tabulated (see Tables)
Example
z 2 2z 1
X [ z]
3 1
Ratio of polynomial z-
z2 z
2 2 domain functions
X [ z]
1 2 z 1 z 2 Divide through by the
3 1
1 z 1 z 2 highest power of z
2 2

X [ z]
1 2 z 1 z 2 Factor denominator
1 1
1 z 1 z 1
into first-order factors
2
Use partial fraction
A1 A2
X [ z ] B0 decomposition to get
1 1 1 z 1
1 z
2 first-order terms
Example (cont)
2
1 2 3 1
2
z z 1 z 2 2 z 1 1
2
Find B0 by polynomial
z 2 3z 1 2 division
5 z 1 1
1 5 z 1
X [ z] 2 Express in terms of B0
1 1
1 z 1 z
1

2

A1
1 2 z 1 z 2

1 4 4
9
Solve for A1 and A2
1 z 1 z 1 2
1 2

1 2 z 1 z 2 1 2 1
A2 8
1 1
1 z 1
2 z 1 1 2
Example (cont)
Express X[z] in terms of With the unilateral z-
B0, A1, and A2 transform, or the
bilateral z-transform
X z 2
9 8

1 1 1 z 1
1 z
with region of
2 convergence, the inverse
Use table to obtain z-transform is unique.
inverse z-transform
k
1
xk 2 d k 9 uk 8 uk
2
Z-transform Properties
Linearity
a1 f1k a2 f 2 k a1F1z a2 F2 z

Shifting
f k m uk m z m F z

m
f k m uk z F z z f k z m
m m

k 1
Z-transform Properties

f1 k f 2 k f m f k m
1 2 Convolution definition
m

Take z-transform
Z f1 k f 2 k Z f1 m f 2 k m
m Z-transform definition


f1 m f 2 k m z k
k m

Interchange summation
f m f k mz
m
1
k
2
k


f1 m f 2 r z r m
r=k-m

m k

m


f1 mz f 2 r z r
m k Z-transform definition
F1 z F2 z
Example
g k k uk uk 6
k uk k uk 6
k uk k 6 uk 6 6 uk 6
1 z
G z
z 1 z
6 6
z 12
z 6
z 1
2
z z 1
z 1 6

z 12 z 5 z 12 z 5 z 1
z5
5
z

1

z 1 6
z z 12 z 5 z 12 z 1 z 5 z 1
z6 6z 5
5
z z 1
2
Difference Equations
Linear Difference Equations
Discrete-time f[k] +
y[k]
LTI systems +
+ Unit
Delay
can be 1/2 y[k-1]
characterized Unit
by difference Delay
1/8 y[k-2]
equations
y[k] = (1/2) y[k-1] + (1/8) y[k-2] + f[k]
Taking z-transform of the difference equation
gives description of the system in the z-domain
Advances and Delays
Sometimes differential equations will be
presented as unit advances rather than delays
y[k+2] 5 y[k+1] + 6 y[k] = 3 f[k+1] + 5 f[k]
One can make a substitution that reindexes the
equation so that it is in terms of delays
Substitute k with k-2 to yield
y[k] 5 y[k-1] + 6 y[k-2] = 3 f[k-1] + 5 f[k-2]
Before taking the z-transform, recognize that
we work with time k 0 so u[k] is often implied
y[k-1] = y[k-1] u[k] y[k-1] u[k-1]
Example
System described by a difference equation
y[k] 5 y[k-1] + 6 y[k-2] = 3 f[k-1] + 5 f[k-2]
y[-1] = 11/6, y[-2] = 37/36
f[k] = 2-k u[k]
1 1 1 1
Y z 5 Y z y 1 6 2 Y z y 1 y 2 3 F z f 1 5 2 F z f 1 f 2
1 1
z z z z z z
5 6 11
1 2 Y z 3
3 5

z z z z 0.5 z z 0.5
26 z 7 z 18 z
Y z
15 z 0.5 3 z 2 5 z 3
26 7 k 18 k
yk 0.5 2 3 uk
k

15 3 5
Transfer Functions
Previous example describes output in time
domain for specific input and initial conditions
It is not a general solution, which motivates us
to look at system transfer functions.
In order to derive the transfer function, one
must separate
Zero state response of the system to a given input
with zero initial conditions
Zero input response to initial conditions only
Transfer Functions
Consider the zero-state response
No initial conditions: y[-k] = 0 for all k > 0
Only causal inputs: f[-k] = 0 for all k > 0
Write general nth order difference equation
yk an 1 yk 1 a0 yk n bn f k bn 1 f k 1 b0 f k n

yk m uk Y z 0 f k m uk F z 0
1 1
m m
z z
1 a n 1
z 1 a1 z1 n a0 z n Y z bn bn 1 z 1 b1 z1 n b0 z n F z
Y z Z zero state response bn bn 1 z 1 b1 z1 n b0 z n
H z
F z Z input 1 an 1 z 1 a1 z1 n a0 z n
Y z H z F z
Stability
Knowing H[z], we can compute the output given
any input
F[z] H[z] Y[z]
Since H[z] is a ratio of two polynomials, the roots
of the denominator polynomial (called poles)
control where H[z] may blow up
H[z] can be represented as a series
Series converges when poles lie inside (not on) unit circle
Corresponds to magnitudes of all poles being less than 1
System is said to be stable
Relation between h[k] and H[z]
Either can be used to describe the system
Having one is equivalent to having the other since they
are a z-transform pair
By definition, the impulse response, h[k], is
y[k] = h[k] when f[k] = d[k]
Z{h[k]} = H[z] Z{d[k]} H[z] = H[z] 1
h[k] H[z]
Since discrete-time signals can be built up from
unit impulses, knowing the impulse response
completely characterizes the LTI system
Complex Exponentials
Complex exponentials have yk hk f k hk z k

special property when they hmz k m

are input into LTI systems. m


Output will be same complex z k


h[m]z
m
m

exponential weighted by H[z] z k H z

When we specialize the z-domain to frequency


domain, the magnitude of H[z] will control
which frequencies are attenuated or passed.
Z and Laplace Transforms
Z and Laplace Transforms
Are complex-valued functions of a complex
frequency variable
Laplace: s = + j 2 f
Z: z = e jW
Transform difference/differential equations
into algebraic equations that are easier to solve
Z and Laplace Transforms
No unique mapping from Z to Laplace domain
or vice-versa
Mapping one complex domain to another is not unique
One possible mapping is impulse invariance.
The impulse response of a discrete-time LTI system is a
sampled version of a continuous-time LTI system.
Z Laplace
f t y t
~ ~
f[k] H[z] y[k] H[esT]
Z and Laplace Transforms

f t f k d t kT
~ Z
k 0
f[k] H[z] y[k]
y t yk d t kT
~
k 0

Y s H s F s

~ ~

yk e
k 0
s T k
H s f k e k T s
k 0

Let z e s T : Laplace
f t y t
~ ~
yk z
k o
k
H [ z ] f k z
k 0
k H[esT]

Y [ z] H [ z] F[ z]
Impulse Invariance Mapping
Impulse invariance mapping is z = e s T
Im{s} Im{z}

Re{s} Re{z}
-1 1 1

-1
s = -1 j z = 0.198 j 0.31 (T = 1)
s = 1 j z = 1.469 j 2.287 (T = 1)

Laplace Domain Z Domain


Left-hand plane Inside unit circle
Imaginary axis Unit circle
Right-hand plane Outside unit circle
Sampling Theorem
Sampling
Many signals originate as continuous-time
signals, e.g. conventional music or voice.
By sampling a continuous-time signal at
isolated, equally-spaced points in time, we
obtain a sequence of numbers
sk sk Ts s(t)
Ts
k {, -2, -1, 0, 1, 2,} t
Ts is the sampling period

ssampled t skT d t k T
s s
k
s[ k ] Sampled analog waveform
Shannon Sampling Theorem
A continuous-time signal x(t) with frequencies
no higher than fmax can be reconstructed from
its samples x[k] = x(k Ts) if the samples are
taken at a rate fs which is greater than 2 fmax.
Nyquist rate = 2 fmax
Nyquist frequency = fs/2.
What happens if fs = 2fmax?
Consider a sinusoid sin(2 fmax t)
Use a sampling period of Ts = 1/fs = 1/2fmax.
Sketch: sinusoid with zeros at t = 0, 1/2fmax, 1/fmax,
Sampling Theorem Assumptions
The continuous-time signal has no frequency
content above the frequency fmax
The sampling time is exactly the same between
any two samples
The sequence of numbers obtained by sampling
is represented in exact precision
The conversion of the sequence of numbers to
continuous-time is ideal
Why 44.1 kHz for Audio CDs?
Sound is audible in 20 Hz to 20 kHz range:
fmax = 20 kHz and the Nyquist rate 2 fmax = 40 kHz
What is the extra 10% of the bandwidth used?
Rolloff from passband to stopband in the magnitude
response of the anti-aliasing filter
Okay, 44 kHz makes sense. Why 44.1 kHz?
At the time the choice was made, only recorders capable of
storing such high rates were VCRs.
NTSC: 490 lines/frame, 3 samples/line, 30 frames/s =
44100 samples/s
PAL: 588 lines/frame, 3 samples/line, 25 frames/s = 44100
samples/s
Sampling
As sampling rate increases, sampled waveform
looks more and more like the original
Many applications (e.g. communication
systems) care more about frequency content in
the waveform and not its shape
Zero crossings: frequency content of a sinusoid
Distance between two zero crossings: one half period.
With the sampling theorem satisfied, sampled sinusoid
crosses zero at the right times even though its
waveform shape may be difficult to recognize
Aliasing
Analog sinusoid y[k] = y(Ts k)
x(t) = A cos(2f0t + f) = A cos(2(f0 + lfs)Tsk + f)
= A cos(2f0Tsk + 2 lfsTsk + f)
Sample at Ts = 1/fs = A cos(2f0Tsk + 2 l k + f)
x[k] = x(Ts k) = = A cos(2f0Tsk + f)
A cos(2 f0 Ts k + f) = x[k]
Keeping the sampling Here, fsTs = 1
period same, sample Since l is an integer,
y(t) = A cos(2(f0 + lfs)t + f) cos(x + 2l) = cos(x)
where l is an integer y[k] indistinguishable from
x[k]
Aliasing
Since l is any integer, an infinite number of
sinusoids will give same sequence of samples
The frequencies f0 + l fs for l 0 are called
aliases of frequency f0 with respect fs to because
all of the aliased frequencies appear to be the
same as f0 when sampled by fs
Generalized Sampling Theorem
Sampling rate must be greater than twice the
bandwidth
Bandwidth is defined as non-zero extent of spectrum of
continuous-time signal in positive frequencies
For lowpass signal with maximum frequency fmax,
bandwidth is fmax
For a bandpass signal with frequency content on the
interval [f1, f2], bandwidth is f2 - f1
Difference Equations and Stability
Example: Second-Order Equation
y[k+2] - 0.6 y[k+1] - 0.16 y[k] = 5 f[k+2] with
y[-1] = 0 and y[-2] = 6.25 and f[k] = 4-k u[k]
Zero-input response
Characteristic polynomial g2 - 0.6 g - 0.16 = (g + 0.2) (g - 0.8)
Characteristic equation (g + 0.2) (g - 0.8) = 0
Characteristic roots g1 = -0.2 and g2 = 0.8
Solution y0[k] = C1 (-0.2)k + C2 (0.8)k
Zero-state response
y s k h
k
f k
Impulse Input
Response
Example: Impulse Response
h[k+2] - 0.6 h[k+1] - 0.16 h[k] = 5 d[k+2]
with h[-1] = h[-2] = 0 because of causality
In general, from Lathi (3.41),
h[k] = (b0/a0) d[k] + y0[k] u[k]
Since a0 = -0.16 and b0 = 0,
h[k] = y0[k] u[k] = [C1 (-0.2)k + C2 (0.8)k] u[k]
Lathi (3.41) is similar to Lathi (2.41):
y[k ] m[k ] u[k ] y[k 1] m[k 1] u[k 1]
m[k 1] u[k ] d [k ]
Lathi (3.41) balances m[k 1] u[k ] m[k 1] d [k ]
impulsive events at origin
Example: Impulse Response
Need two values of h[k] to solve for C1 and C2
h[0] - 0.6 h[-1] - 0.16 h[-2] = 5 d[0] h[0] = 5
h[1] - 0.6 h[0] - 0.16 h[-1] = 5 d[1] h[1] = 3
Solving for C1 and C2
h[0] = C1 + C2 = 5
h[1] = -0.2 C1 + 0.8 C2 = 3
Unique solution C1 = 1, C2 = 4
h[k] = [(-0.2)k + 4 (0.8)k] u[k]
Example: Solution
Zero-state response solution (Lathi, Ex. 3.13)
ys[k] = h[k] * f[k] = {[(-0.2)k + 4(0.8)k] u[k]} * (4-k u[k])
ys[k] = [-1.26 (4)-k + 0.444 (-0.2)k + 5.81 (0.8)k] u[k]
Total response: y[k] = y0[k] + ys[k]
y[k] = [C1(-0.2)k + C2(0.8)k] +
[-1.26 (4)-k + 0.444 (-0.2)k + 5.81 (0.8)k] u[k]
With y[-1] = 0 and y[-2] = 6.25
y[-1] = C1 (-5) + C2(1.25) = 0
y[-2] = C1(25) + C2(25/16) = 6.25
Solution: C1 = 0.2, C2 = 0.8
Repeated Roots
For r repeated roots of Q(g) = 0
y0[k] = (C1 + C2 k + + Cr kr-1) gk
Similar to the continuous-time case
Continuous Discrete
Time Time Case
e t u (t ) g k u[k ] non-repeated
roots
repeated
t m e t u (t ) k mg k u[k ]
roots
Stability for an LTID System
Im g
Asymptotically stable if and Marginally Stable Unstable
only if all characteristic roots g
are inside unit circle. |g|
b Re g
Unstable if and only if one or -1 1

both of these conditions exist: Stable

At least one root outside unit circle


Repeated roots on unit circle
Lathi, Fig. 3.16
Marginally stable if and only if no roots are
outside unit circle and no repeated roots are on
unit circle (see Figs. 3.17 and 3.18 in Lathi)
Stability in Both Domains
Im g Im
Marginally
Stable Marginally
Unstable
Stable

-1 1
Re g Re

Stable
Stable Unstable

Discrete-Time Systems Continuous-Time Systems

Marginally stable: non-repeated characteristic roots on the unit


circle (discrete-time systems) or imaginary axis (continuous-
time systems)
Frequency Response of
Discrete-Time Systems
Frequency Response
For continuous-time systems the response to
sinusoids are e j t H j e j t
cos t H j cos t H j
For discrete-time systems in z-domain
z k H z z k
For discrete-time systems in discrete-time
e j W k H e j W e j W k
frequency

cosW k H e j W cos W k H e j W
Response to Sampled Sinusoids
Start with a continuous-time sinusoid
cos t
Sample it every T seconds (substitute t = k T)
cos k T
We show discrete-time sinusoid with
cosW k cos k T
Resulting in W T
Discrete-time frequency is equal to continuous-
time frequency multiplied by sampling period
Example
Calculate the frequency response of the system
given as a difference equation as
y[k 1] 0.8 y[k ] x[k 1]

Assuming zero initial conditions we can take


the z-transform of this difference equation
Y [ z ]z 0.8 X [ z ]z
Y z
H z
z 1

X z z 0.8 1 0.8 z 1

Since z e jW

He jW

1
1 0.8e jW

1
1 0.8cos W j sin W
Example
Group real and imaginary parts
He jW

1
1 0.8 cos W j 0.8 sin W
The absolute value (magnitude response) is
He 1 0.8 cos W j0.8 sin W
jW 1

1

1 0.8 cos W2 0.8 sin W2
1

1.64 1.6 cos W
Example
The angle (phase response) is
0.8 sin W
H e jW 1
0 tan
1 0.8 cos W
where 0 comes from the angle of the nominator and the
term after comes from the denominator of H e jW
Reminder: Given a complex number a + j b the
absolute value and angle is given as
a j b a 2 b 2
b
a j b tan 1
a
Example
We can calculate the output of this system for a
sinusoid at any frequency by substituting W
with the frequency of the input sinusoid.
H e jW 5

2 3
W

H e jW 53.13

2 3
W
Discrete-time Frequency Response
As in previous example, frequency response of
a discrete-time system is periodic with 2
Why? Frequency response is function of the complex
exponential which is periodic with 2 : e j W e j W 2 m
Absolute value of discrete-time frequency
response is even and angle is odd symmetric.
Discrete-time sinusoid is symmetric around
cosW 2m k cosWk 2mk cos Wk
cos W x k cosW x k cosk sin W x k sin k
cosW x k cosk
cos W x cos W x
Aliasing and Sampling Rate
Continuous-time sinusoid can have a frequency
from 0 to infinity
By sampling a continuous-time sinusoid,
sample
cos t cos k T cosW k
t kT
Discrete-time frequency W unique from 0 to

0 T 0 f s 0 2f f s 0 f f s / 2
T
We only can represent frequencies up to half of the
sampling frequency.
Higher frequencies exist would be wrapped to some
other frequency in the range.
Effect of Poles and Zeros of H[z]
The z-transform of a difference equation can be
written in a general form as
H z bn
z z1 z z2 z zm
z g 1 z g 2 z g m
We can think of complex number as a vector in
the complex plane. Im
Since z and zi are both complex zi
numbers the difference is again z zi
a complex number thus a vector z
in the complex plane.
Re
Effect of Poles and Zeros of H[z]
Each difference term in H[z] may be represented
as a complex number in polar form
Magnitude is the distance of Im
the pole/zero to the chosen
point (frequency) on unit circle. 1
d1
g1 x
Angle is the angle of vector d2 r2
f
z2 1 f2
r
with the horizontal axis. z1 1
o o Re
jf1 jf2 jfm 2
H e jW bn 1 j1 2 j 2 m j m
r e r e r e g2 x
d1e d 2e d m e
r1r2 rm j f1 f2 fm 1 2 m
bn e
d1d 2 d m
Effect of Poles/Zeros (Lathi)
H H

T T
x

o x
- -/2
H H

H H

T T
x
o x o x
x
- -
H H

You might also like