You are on page 1of 44

Signal Processing

Week 8 + 9: z-Transform

Marcel Peeters
Contents

• Introduction z-Transform
• Recap: Laplace
• z-Transform examples
• Solving difference equations
• Poles and zeroes
– Stability
– Frequency response

SP – Week 8+9: z-Transform 2


Recap Week 6 + 7
𝑥(𝑛) h(𝑛)
• Frequency-Domain Analysis Fourier transf.
– Discrete Fourier Series
(periodic signals) 𝑋 (Ω) 𝐻(Ω)
– Discrete Fourier Transform
(non-periodic signals)
× multiplication

– Frequency response (transfer function)


difference equation
𝑌 (Ω)
inverse Fourier transf.

𝑦(𝑛)

SP – Week 8+9: z-Transform 3


Week 8 + 9: z-Transform
𝑥(𝑛) h(𝑛)
• Contents: z-transform
– z-Transform definition
– Poles and zeros in z-plane 𝑋 (𝑧) 𝐻(𝑧)

• Why z-Transform? × multiplication


– Compact notation
– Used by DSP designers
– Poles and zeros
𝑌 (𝑧)
• Stability inverse z-transform
• Frequency response
𝑦(𝑛)

SP – Week 8+9: z-Transform 4


Discrete Fourier Transform – Example 1


𝑋 ( Ω )= ∑ 𝑥[𝑛]𝑒− 𝑗 Ω𝑛
𝑛=−∞

𝑋 ( Ω )=0.2 {𝑒 +𝑒 +1+𝑒 +𝑒 }= 0.2 {1+2cos ( Ω )+2cos ( 2 Ω ) }


𝑗2Ω 𝑗Ω −𝑗Ω − 𝑗2Ω

SP – Week 8+9: z-Transform 5


Discrete Fourier Transform – Example 2

∞ ∞
−𝑗𝛺 𝑛 0.5
+0.125𝑒 +…=0.5 ∑ {0.5 𝑒 } = − 𝑗𝛺
𝑋 ( 𝛺 )=−𝑗𝛺∑ 𝑥 [−𝑛𝑗2𝛺] 𝑒
− 𝑗 𝛺𝑛
𝑋 ( 𝛺 )=0.5 +0.25𝑒 𝑛=−∞
𝑛=0 1−0.5 𝑒

0.5 0.5 0.5


|𝑋 (Ω)|= 2 2= 2 2 =
√(1−0.5cosΩ) +(0.5sinΩ) √1−cosΩ+0.25cos Ω+0.25sin Ω √1.25−cosΩ
SP – Week 8+9: z-Transform 6
z-Transform vs. Discrete Fourier Transform

• Problem: powers of
• Solution: define
∞ ∞
𝑋 ( Ω )= ∑ 𝑥[𝑛]𝑒
− 𝑗 Ω𝑛
𝑋 ( 𝑧 )= ∑ 𝑥 [𝑛] 𝑧 −𝑛
𝑛=−∞ 𝑛=0

• Power-series of
– Coefficients equal to sequential values of time signal

SP – Week 8+9: z-Transform 7


z-Transform
• Unilateral z-Transform: ∞
𝑥 (𝑛)
𝑋 ( 𝑧 )=𝑍 { 𝑥 (𝑛 ) }= ∑ 𝑛
, 𝑧 ∈ℂ
𝑛=0 𝑧
• Bilateral z-Transform (sum starting at ) also exists
• Tables with properties and standard transforms , e.g.:

−1 𝑛 𝑧
𝑥 ( 𝑛 −1 ) ↔ 𝑧 𝑋 ( 𝑧 ) +𝑥 ( −1 ) 𝑎 𝑢(𝑛)↔
𝑧−𝑎

SP – Week 8+9: z-Transform 8


Time shift

Rule Consequence:
Difference equation

becomes
Although not always true, we
assume in this course that all Algebraic equation
initial values are zero!

SP – Week 8+9: z-Transform 9


Differential equations vs. Difference equations
• Example differential equation:

• Example difference equation:

SP – Week 8+9: z-Transform 10


Recap: Laplace – solving
differential equations

Continuous
• Differential equations
• Laplace transform
• Back transform using partial Calculation rules  

fraction decomposition and


table with standard transforms

𝐹 ( 𝑠 ) =ℒ ( 𝑓 ( 𝑡 ) ) =∫ 𝑓 (𝑡)𝑒
− 𝑠𝑡
𝑑𝑡
0

SP – Week 8+9: z-Transform 11


Recap: Laplace – example

What is the impulse response of the following electrical network?


R
uin(t) C uout(t)

• Differential equation:

• Laplace transform:

• Impulse response: and


SP – Week 8+9: z-Transform 12
Continuous vs. Discrete

Continuous Discrete
• Differential equations • Difference equations
• Laplace transform • z-Transform
• Back transform using partial • Back transform using partial
fraction decomposition and fraction decomposition and
table with standard transforms table with standard transforms
∞ ∞
𝑥 (𝑛)
𝐹 ( 𝑠 ) =ℒ ( 𝑓 ( 𝑡 ) ) =∫ 𝑓 (𝑡)𝑒 𝑋 ( 𝑧 )=𝑍 { 𝑥 (𝑛 ) }= ∑
− 𝑠𝑡
𝑑𝑡
0 𝑛=0 𝑧𝑛
SP – Week 8+9: z-Transform 13
Example
• Solve the differential equation • Solve the difference equation

• Using the standard method • Using the standard method


• Using the Laplace transform • Using the z-Transform

(standard transform) (standard transform)

SP – Week 8+9: z-Transform 14


z-Transform
• Unilateral z-Transform: ∞
𝑥 (𝑛)
𝑋 ( 𝑧 )=𝑍 { 𝑥 (𝑛 ) }= ∑ 𝑛
𝑛=0 𝑧
• Bilateral z-Transform (sum starting at ) also exists
• Tables with properties and standard transforms , e.g.:

−1 𝑛 𝑧
𝑥 ( 𝑛 −1 ) ↔ 𝑧 𝑋 ( 𝑧 ) +𝑥 ( −1 ) 𝑎 𝑢(𝑛)↔
𝑧−𝑎

SP – Week 8+9: z-Transform 15


Some simple examples

Find the -transform of

Find the inverse -transform of

Find the inverse -transform of

SP – Week 8+9: z-Transform 16


Example – long division
• Given the following z-Transform:

• Quickly determine the first few values of


• Hint: use long division

SP – Week 8+9: z-Transform 17


Simple example

Solve:

Solution in z-domain:

Solution:

SP – Week 8+9: z-Transform 18


Checklist for solving difference equations

• Select the correct z-transforms from the table and apply


them
• Solve from the resulting equation
• Use fraction decomposition to write in its standard form
• Use the inverse z-transform to find your solution
• Check your answer!
– Initial conditions
– Difference equation
SP – Week 8+9: z-Transform 19
Example 1
• Given the following difference equation (low-pass filter):

• Determine the impulse and step response as an explicit expression


for

SP – Week 8+9: z-Transform 20


Recap: Discrete delta function
• Unit impulse function: • Unit step function:
1 for 𝑛 = 0 1 for 𝑛 ≥ 0
ሺ ሻ
𝛿 𝑛 =ቊ 𝑢ሺ𝑛ሻ = ቊ
0 otherwise 0 for 𝑛 < 0

• Sifting property:
𝛿(𝑛) 𝑢(𝑛)
+∞ 1 1
∑ 𝑥 ( 𝑘 ) 𝛿 ( 𝑛−𝑘 )=𝑥 (𝑛)
𝑛=0
𝑛→
𝑛=0
𝑛→
𝑘=− ∞

SP – Week 8+9: z-Transform 21


Recap: Impulse response (discrete)

• Impulse response:

𝛿(𝑛) T h(𝑛)

• Transfer function:

SP – Week 8+9: z-Transform 22


Example 1
• Given the following difference equation (low-pass filter):

• Determine the impulse and step response as an explicit expression


for
• Solution:
– Impulse response:
– Step response:

SP – Week 8+9: z-Transform 23


Example 1 – visual results
1.2

0.8

0.6

0.4

0.2

0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51

Step function Step response Impulse response

SP – Week 8+9: z-Transform 24


Example 2
• Given the following difference equation:

• Determine an explicit expression for 0

SP – Week 8+9: z-Transform 25


Example 3
• Given the following difference equation:

• Determine an explicit expression for

SP – Week 8+9: z-Transform 26


Convolution vs. z-Transform
0 1 2 3 4 5 6 7 8 …
1 –2 3 –1 –1 0 0 0 0 …
2 1 –1 0 0 0 0 0 0 …
2 –3 3 3 –6 0 1 0 0 …

𝑋 ( 𝑧 )=1 −2 𝑧 − 1+3 𝑧 −2 − 𝑧 − 3 − 𝑧 − 4

𝐻 ( 𝑧 )=2+ 𝑧 −1 − 𝑧 − 2

𝑌 ( 𝑧 )= 𝑋 ( 𝑧 ) 𝐻 ( 𝑧 )=2− 3 𝑧 −1 +3 𝑧 − 2 +3 𝑧 − 3 − 6 𝑧 − 4 +𝑧 − 6

SP – Week 8+9: z-Transform 27


Final Value Theorem
• Final value theorem:

• Final value of step response:

• For  ()  result is DC response

SP – Week 8+9: z-Transform 28


Example

• Question: final value of

SP – Week 8+9: z-Transform 29


Example – stability
• z-Transform / transfer function:

• Signal / impulse response:

• Bounded (stable) if and only if

SP – Week 8+9: z-Transform 30


Poles and zeroes

• z-Transform of a real digital signal or transfer function of LTI system:

• Zeros: roots of numerator 


• Poles: roots of denominator 

• Stable if all poles within unit circle in complex z-plane

SP – Week 8+9: z-Transform 31


Example
• Draw the poles and zeroes for:

complex
• Poles: z-plane
conjugates

• Zeroes:

• (2x)
unit circle

SP – Week 8+9: z-Transform 32


Poles in Polar Coordinates
• Stability depends on radius of poles in z-plane
– Represent poles in polar coordinates: z-plane

• Stable only if

• Difference equation:

SP – Week 8+9: z-Transform 33


Effects of Zeroes/Poles in Origin
• Zeroes or poles in origin lead to time shift of filter

• Example:

• Output dependes on  2 samples delay


– Solve by adding second order zero in origin

SP – Week 8+9: z-Transform 34


Frequency Response

• Magnitude of transfer function:


– Product of all zero-vector lengths
– Divided by product of all pole-vector lengths

¿ 𝐻 ( 𝑧 )∨ ¿ ¿ 𝑁 ( 𝑧 )∨ ¿ ¿
𝐾 ∙|𝑧 − 𝑧 1|∙|𝑧 − 𝑧 2|∙|𝑧 − 𝑧 3|⋯
¿ 𝐷 ( 𝑧 )∨¿= ¿
| 𝑧 −𝑝 1|∙| 𝑧 −𝑝 2|∙∨ 𝑧 − 𝑝 3∨ ⋯

– Additional gain factor alters scale but not shape

SP – Week 8+9: z-Transform 35


Example
𝑧 − 0.8
• Sketch the frequency response for the system: 𝐻 ( 𝑧 )=
𝑧 +0.8

z-plane

SP – Week 8+9: z-Transform 36


Exercise
• Sketch the frequency response for the following system:

z-plane

unit circle
SP – Week 8+9: z-Transform 37
Exercise – Answer

z-plane

unit circle

SP – Week 8+9: z-Transform 38


z-plane
First Order Filter (1)
• First order filter with zero in origin:

• Difference equation:

SP – Week 8+9: z-Transform 39


z-plane
First Order Filter (2)
• First order filter with zero in origin:

• Difference equation:

SP – Week 8+9: z-Transform 40


Second Order Filter
• Second order filter with zeroes in origin:
z-plane

• Difference equation:

SP – Week 8+9: z-Transform 41


Second Order Filter
z-plane

• Example 1:

SP – Week 8+9: z-Transform 42


Second Order Filter
z-plane

• Example 2:

SP – Week 8+9: z-Transform 43


Homework

• Review this week


– Book chapters 4.1 – 4.3
– Book exercises 4.1, 4.2, 4.4, 4.6, 4.8, 4.10, 4.11
– Week 8 + 9 exercises on Canvas

• Prepare next week


– Book chapters 6.1 + 6.2

SP – Week 8+9: z-Transform 44

You might also like