0% found this document useful (0 votes)
52 views129 pages

DSP 1

This document discusses digital signal processing and key concepts in discrete-time signals and systems. It covers: - Types of signals including 1D, 2D and 3D signals. All natural signals are analog and become digital after sampling. - Sampling theory including the Nyquist sampling theorem which states the minimum sampling frequency must be at least twice the highest frequency component to allow perfect reconstruction. - Properties of discrete-time systems including linearity, time-invariance, and memory. Linear time-invariant (LTI) systems are described. - Examples are provided to demonstrate concepts like sampling, time-shifting, linearity, time-invariance, and representing signals using impulse functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views129 pages

DSP 1

This document discusses digital signal processing and key concepts in discrete-time signals and systems. It covers: - Types of signals including 1D, 2D and 3D signals. All natural signals are analog and become digital after sampling. - Sampling theory including the Nyquist sampling theorem which states the minimum sampling frequency must be at least twice the highest frequency component to allow perfect reconstruction. - Properties of discrete-time systems including linearity, time-invariance, and memory. Linear time-invariant (LTI) systems are described. - Examples are provided to demonstrate concepts like sampling, time-shifting, linearity, time-invariance, and representing signals using impulse functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 129

Digital Signal Processing I

EEE 313
Dept. of EEE, BUBT
Signal
“Stream of information Types by dimension:
that varies with some ➢1D: Audio, ECG
variables”
➢2D: Photograph
• Continuous Signal:
sin(Ωt) ➢3D: Video
• Discrete Signal:
sin(ωn) All natural signals are analog.
When an analog signal is sampled,
quantized and coded, it becomes a
digital signal.
Sampling
x(t) = A cos(Ωt) • Ω = Analog Angular Frequency
(rad/second) = 2πF
• F = Analog Frequency
After sampling with Ts interval, (cycle/second)
x(nTs) = A cos(ΩnTs) • Fs = Sampling Frequency
= A cos(2πFnTs) (sample/second) = 1 / Ts
= A cos(2πnF/Fs) • f = Discrete Time Frequency
= A cos(2πfn) (cycle/sample) = F / Fs
Example: f = 1/70 means “70
samples are collected in 1 cycle”.
Nyquist's
Sampling For lossless reconstruction,
Theorem Fs ≥ 2F
“A bandlimited continuous-time or, F / Fs ≤ 1 / 2
signal can be perfectly or, f ≤ 1 / 2
reconstructed from its samples
if the waveform is sampled over So, fmax can be 1 / 2.
twice as fast as its highest
frequency component.” Note: Smaller f is better.
Because smaller f means: more
samples are taken in each cycle.
Nyquist (continued)…

Fs = 1.1 F Fs = 1.9 F
Fs = 2 F
Periodicity
𝑥 𝑛 + 𝑁 = 𝐴 cos 𝜔 𝑛 + 𝑁
Previously, period was time. But here, period is sample.
Also, ω = 2πf = 2πk/N, and k is integer.
𝑥 𝑛 + 𝑁 = 𝐴 cos 𝜔𝑛 + 𝜔𝑁
2𝜋𝑘
= 𝐴 cos 𝜔𝑛 + 𝑁
𝑁
= 𝐴 cos 𝜔𝑛 + 2𝜋𝑘
= 𝐴 cos 𝜔𝑛
=𝑥 𝑛
Note: f (= k/N) must be rational number.
Question: Is “15 cos 5πn ” a valid representation of
discrete-time signal? Also find for “15 cos 10n ”.
5
➢15 cos 5𝜋𝑛 = 15 cos 2𝜋 𝑛
2
5
Here, 𝑓 = , which can not be a rational number.
2
So, NOT a valid representation.
5
➢15 cos 10𝑛 = 15 cos 2𝜋 𝑛
𝜋
5
Here, 𝑓 = , which can not be a rational number (because π is irrational)
𝜋
So, NOT a valid representation.
Question: 𝑥(𝑡) = 20 cos Ω1 𝑡 + 30 cos Ω2 𝑡 , where 𝐹1 = 2000 Hz
and 𝐹2 = 3000 Hz. What is the minimum sampling frequency for
lossless reconstruction? Find the expression of 𝑥 𝑛 for 4000 Hz
sampling frequency.
𝐹𝑆(𝑚𝑖𝑛) must be twice the maximum frequency component in 𝑥 𝑡 .
So, it should be 6000 Hz.
Now, 𝑥 𝑡 = 20 cos Ω1 𝑡 + 30 cos Ω2 𝑡
= 20 cos 2𝜋𝐹1 𝑡 + 30 cos 2𝜋𝐹2 𝑡
= 20 cos 2𝜋2000𝑡 + 30 cos 2𝜋3000𝑡
So, 𝑥 𝑛 = 20 cos 2𝜋 2000Τ4000 𝑛 + 30 cos 2𝜋 3000Τ4000 𝑛
1 3
= 20 cos 2𝜋 𝑛 + 30 cos 2𝜋 𝑛
2 4
continued…

Red: 20 cos 2𝜋2000𝑡 Green:


Blue: 30 cos 2𝜋3000𝑡 20 cos 2𝜋2000𝑡 + 30 cos 2𝜋3000𝑡
Time-Shifting of DT Sequence
Delay Advance
y[n] = x[n - d], where d is integer. y[n] = x[n + a], where a is integer.

Let, x[n] = [… 2 5 7 6 9 1 …] Let, x[n] = [… 2 5 7 6 9 1 …]


y[n] = x[n-1] y[n] = x[n+1]
y[-1] = x[-1-1] = x[-2] = 2 y[-1] = x[-1+1] = x[0] = 7
y[0] = x[0-1] = x[-1] = 5 y[0] = x[0+1] = x[1] = 6
y[1] = x[1-1] = x[0] = 7 y[1] = x[1+1] = x[2] = 9
y[2] = x[2-1] = x[1] = 6 and so on. y[2] = x[2+1] = x[3] = 1 and so on.
So, y[n] = [… 2 5 7 6 9 1 …] So, y[n] = [… 2 5 7 6 9 1 …]
Basic Properties of Discrete-Time System
(1) Memory
A system is memoryless if output depends only on present value.
Let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 2 𝑛 , where T{x[n]} means a transform in a system.
Now, 𝑦 5 = 𝑥 2 5 , 𝑦 17 = 𝑥 2 17 and so on.
It is memoryless.

Now let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 − 2 .
Thus, 𝑦 5 = 𝑥 5 + 𝑥 3 , it depends on past value.
It needs memory.
continued…
Now let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 + 3 .
Thus, 𝑦 5 = 𝑥 5 + 𝑥 8 , it depends on future value.
It needs memory.

Question: x[n] = [9 6 5 1 4 0 7 0 3 …]; 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 𝑛 − 𝑥[𝑛 + 1].


Find y[-1], y[0], y[1], y[2], y[3]. Is this system memoryless?
y[-1] = x[-1] – x[0] = 1 – 4 = -3
y[0] = x[0] – x[1] = 4 – 0 = 4
y[1] = x[1] – x[2] = 0 – 7 = -7
y[2] = x[2] – x[3] = 7 – 0 = 7
y[3] = x[3] – x[4] = 0 – 3 = -3
The system depends on future values. So, not memoryless.
continued…
(2) Linearity
A system is linear if it satisfies additivity & homogeneity of degree one.
(a) Additivity: For every pair of signal x1[n] and x2[n],
𝑇 𝑥1 𝑛 + 𝑥2 𝑛 = 𝑇 𝑥1 𝑛 + 𝑇 𝑥2 𝑛
(b) Homogeneity of degree one: For every signal x[n] and scalar a,
𝑇 𝑎𝑥 𝑛 = 𝑎 𝑇 𝑥 𝑛
Combining these two, 𝑇 𝑎𝑥1 𝑛 + 𝑏𝑥2 𝑛 = 𝑎 𝑇 𝑥1 𝑛 + 𝑏𝑇 𝑥2 𝑛

For example, let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 2 𝑛 .


Now, 𝑥1 𝑛 + 𝑥2 𝑛 2 ≠ 𝑥1 2 𝑛 + 𝑥2 2 𝑛 .
So, it’s non-linear.
continued…

Additivity Homogeneity
continued…
Question: x1[n] = [ 2 0 4 6 …]; x2[n] = [ 1 3 2 7 …]. Using these sequences,
show if linearity holds for the following system: y[n] = T{x[n]} = x2[n].
𝑦1 𝑛 = 𝑇 𝑎𝑥1 𝑛 + 𝑏𝑥2 𝑛
= 2+1 2 0+3 2 4+2 2 6+7 2 …
= [ 9 9 36 169 … ]

𝑦2 𝑛 = 𝑎 𝑇 𝑥1 𝑛 + 𝑏𝑇 𝑥2 𝑛
= 22 + 12 02 + 32 42 + 22 62 + 72 …
= 5 9 20 85 …
So, 𝑦1 ≠ 𝑦2
The system is non-linear.
continued…
Question: x1[n] = [ 2 0 4 6 …]; x2[n] = [ 1 3 2 7 …]. Using these sequences,
show if linearity holds for the following system: y[n] = T{x[n]} = 2x[n].
𝑦1 𝑛 = 𝑇 𝑎𝑥1 𝑛 + 𝑏𝑥2 𝑛
= 2 2+1 2 0+3 2 4+2 2 6+7 …
= 6 6 12 26 …

𝑦2 𝑛 = 𝑎 𝑇 𝑥1 𝑛 + 𝑏𝑇 𝑥2 𝑛
= [ (4 + 2) 0 + 6 8 + 4 12 + 14 … ]
= [ 6 6 12 26 … ]
So, 𝑦1 = 𝑦2
The system is linear.
continued…
(3) Time-Invariance
A system is time-invariant if for all
nd, the input with values 𝑥1 𝑛 =
𝑥 𝑛 − 𝑛𝑑 produces output with
values 𝑦1 𝑛 = 𝑦 𝑛 − 𝑛𝑑 .
In other words:
(a) Get your output with no
input delay, then delay the output.
(b) Delay the input, then get
output.
If both cases are matched, the
system is time-invariant.
continued…

Let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 2𝑛
x[n] = [… a b c d e f g h …]

y[n] = [… b d f h …] ; y[0]=x[0], y[-1]=x[-2], y[1]=x[2], y[2]=x[4]


y1[n] = y[n-1] = [… b d f h …] [output is delayed]; y1[0]=y[-1], y1[1]=y[0], y1[2]=y[1]
x[n-1] = [… a b c d e f g h …] [input is delayed]
y2[n] = [… a c e g …] [output for delayed input]
Here, 𝑦1 𝑛 ≠ 𝑦2 𝑛 .
So, it’s time-variant.
continued…

Let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 3𝑛
x[n] = [… 2 4 3 8 6 4 2 1 4 9 5 9 7 …]

y[n] = [… 2 8 2 9 7 …] ; y[0]=x[0], y[-1]=x[-3], y[1]=x[3], y[2]=x[6]


y1[n] = y[n-1] = [… 2 8 2 9 7…] [output is delayed]; y1[-1]=y[-2], y1[0]=y[-1]
x[n-1] = [… 2 4 3 8 6 4 2 1 4 9 5 9 7 …] [input is delayed]
y2[n] = [… 3 4 4 9 …] [output for delayed input]
Here, 𝑦1 𝑛 ≠ 𝑦2 𝑛 .
So, it’s time-variant.
continued…

Let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 5𝑥 𝑛
x[n] = [… 4 1 2 5 0 1 …]

y[n] = [… 20 5 10 25 0 5 …]
y1[n] = y[n-1] = [… 20 5 10 25 0 5 …] [output is delayed]; y1[0]=y[-1], y1[1]=y[0]
x[n-1] = [… 4 1 2 5 0 1 …] [input is delayed]
y2[n] = [… 20 5 10 25 0 5 …] [output for delayed input]
Here, 𝑦1 𝑛 = 𝑦2 𝑛 .
So, it’s time-invariant.
Linear Time-Invariant (LTI) System
1, 𝑛 = 0
Unit impulse, 𝛿 𝑛 =ቊ
0, 𝑛 ≠ 0
Now let, 𝑥 𝑛 = 5 7 9 2 4 1…

= 5𝛿 𝑛 + 7𝛿 𝑛 − 1 + 9𝛿 𝑛 − 2 + ⋯
𝑘=∞

= ෍ 𝑥 𝑘 𝛿[𝑛 − 𝑘]
𝑘=−∞
Now,
𝑘=∞

𝑦 𝑛 =𝑇 𝑥 𝑛 =𝑇 ෍ 𝑥 𝑘 𝛿[𝑛 − 𝑘]
𝑘=−∞
continued…
If linearity holds, then
𝑘=∞ 𝑘=∞

𝑦 𝑛 =𝑇 ෍ 𝑥 𝑘 𝛿[𝑛 − 𝑘] = ෍ 𝑥 𝑘 𝑇 𝛿[𝑛 − 𝑘]
𝑘=−∞ 𝑘=−∞
And, for time-invariance, the impulse response,
ℎ 𝑛 = 𝑇 𝛿[𝑛]
ℎ 𝑛 − 𝑘 = 𝑇 𝛿[𝑛 − 𝑘]
So, for LTI system,
𝑘=∞ 𝑘=∞

𝑦 𝑛 = ෍ 𝑥 𝑘 ℎ[𝑛 − 𝑘] = ෍ ℎ 𝑘 𝑥[𝑛 − 𝑘]
𝑘=−∞ 𝑘=−∞
Convolution Sum Formula
𝑘=∞ 𝑘=∞

𝑦 𝑛 = ෍ 𝑥 𝑘 ℎ[𝑛 − 𝑘] = ෍ ℎ 𝑘 𝑥[𝑛 − 𝑘]
𝑘=−∞ 𝑘=−∞
Using convolution sum, we can predict output for any kind of input
without physically putting on the equipment.

Some properties of convolution:


• Commutative: 𝑥 𝑛 ∗ ℎ 𝑛 = ℎ 𝑛 ∗ 𝑥 𝑛
• Associative: 𝑥 𝑛 ∗ℎ 𝑛 ∗𝑤 𝑛 =𝑥 𝑛 ∗ ℎ 𝑛 ∗𝑤 𝑛
• Distributive: 𝑥 𝑛 ∗ ℎ 𝑛 + 𝑤 𝑛 = 𝑥 𝑛 ∗ ℎ 𝑛 + 𝑥 𝑛 ∗ 𝑤[𝑛]
(4) Stability
A system is stable if bounded input produces bounded output. [BIBO]
𝑥[𝑛] ≤ 𝐵𝑥 ; 𝑦[𝑛] ≤ 𝐵𝑦
We know, 𝑦 𝑛 = σ𝑘=∞ 𝑘=−∞ 𝑥 𝑘 ℎ[𝑛 − 𝑘] for LTI system.
For stability of LTI system,
𝑘=∞

𝑦[𝑛] ≤ ෍ 𝑥 𝑘 ℎ 𝑛−𝑘
𝑘=−∞ 𝑘=∞

⟹ 𝑦[𝑛] ≤ 𝐵𝑥 ෍ ℎ 𝑛 − 𝑘
𝑘=−∞
So, σ𝑛=∞
𝑛=−∞ ℎ[𝑛] < ∞ (Necessary & Sufficient condition)
This means, impulse response must be absolutely summable.
Question: Find if the following systems are stable or not:
• y[n] = x[n] – x[n+1]
If input is bounded, then difference between bounded values will
also be bounded. So, the system is stable.
• y[n] = x[n] + 7
If input is bounded, then addition of bounded values will also be
bounded. So, the system is stable.
• y[n] = log (x[n])
If 0 is found anywhere in the sequence x[n], then output
becomes log(0) = – ∞. So, the system is unstable.
• y[n] = n x[n]
Even if input is bounded, we don’t know the boundary of n. So,
the system is unstable.
Definitions
• Causal: A causal system is one whose output depends only
on the present and the past inputs.
• Non-Causal: A system that has some dependence on input
values from the future (in addition to possible dependence
on past or current input values) is termed a non-causal or
acausal system
• Anti-Causal: A system that depends solely on future input
values is an anticausal system.
(5) Causality
A system is causal if output depends on present and/or past input.
y[n] = 4x[n] System is causal.
y[n] = 2x[n-1] System is causal.
y[n] = 7x[n] + 5x[n-1] System is causal.
y[n] = 7x[n] + 5x[n+1] System is non-causal.
y[n] = 5x[n+1] System is anti-causal & non-causal.

Note:
1. All anti-causal systems are non-causal, but not the opposite.
2. All memoryless systems are causal.
3. Real-time system can not be non-causal.
continued…
We know, 𝑦 𝑛 = σ𝑘=∞ 𝑘=−∞ ℎ 𝑘 𝑥[𝑛 − 𝑘] for LTI system.
or, 𝑦 𝑛 = ⋯ + ℎ −2 𝑥 𝑛 + 2 + ℎ −1 𝑥 𝑛 + 1 + ℎ 0 𝑥 𝑛 +
ℎ 1 𝑥 𝑛−1 +ℎ 2 𝑥 𝑛−2 +⋯
For casual system, future values don’t exist.
So, h[-1] = h[-2] = h[-3] = … = 0
Simply, for any LTI system to be causal:
h[k] = 0, when k < 0
Question: x[n]=[ 1 2 3 ], h[n]=[ 4 5 6 ]. Find the
convolution.
1 2 3
6 5 4
y[0] = 4
y[1] = 5+8 = 13 1 2 3
6 5 4
y[2] = 6+10+12 = 28
y[3] = 12+15 = 27 1 2 3
y[4] = 18 6 5 4

1 2 3
So, y[n] = [ 4 13 28 27 18 ] 6 5 4

1 2 3
6 5 4
Question: x[n]=[ 1 2 3 4 5 ], h[n]=[ 4 5 6 ]. Find the
convolution.
y[0] = 12+15+16 = 43 1 2 3 4 5 1 2 3 4 5
6 5 4 6 5 4
y[1] = 18+20+20 = 58
y[2] = 24+25 = 49
1 2 3 4 5 1 2 3 4 5
y[3] = 30
6 5 4 6 5 4
y[-1] = 6+10+12 = 28
y[-2] = 5+8 = 13 1 2 3 4 5 1 2 3 4 5
y[-3] = 4 6 5 4 6 5 4

So, y[n] = [4 13 28 43 58 49 30] 1 2 3 4 5


6 5 4
Convolution (graph)
Quantization
“Process of mapping
continuous infinite values
to a smaller set of
discrete finite values”
Quantization by Rounding
Quantization by Truncation
Question: Quantize the sequence using integer rounding and
truncation: x[n]= [ 7.4 2.3 6.5 5.7 9.2 -0.6 -1.9 0.5 -9.6 -2 -0.5 ].
Also find the error sequence.

• Rounding: xq[n]=[ 7 2 7 6 9 -1 -2 1 -10 -2 -1 ]


Error: e[n] = [ -0.4 -0.3 0.5 0.3 -0.2 -0.4 -0.1 0.5 -0.4 0 -0.5 ]
• Truncation: xq[n] = [ 7 2 6 5 9 0 -1 0 -9 -2 0 ]
Error: e[n] = [ -0.4 -0.3 -0.5 -0.7 -0.2 0.6 0.9 -0.5 0.6 0 0.5 ]
SQNR for Rounding
• x[n] = Sample input
• xq[n] = Quantized output
• e[n] = Quantization error
• Δ = Step size or Resolution
• xmin = minimum of x[n]
• xmax = maximum of x[n]
• L = Number of level

∆ ∆
Now, − ≤ 𝑒[𝑛] ≤
2 2
where
𝑥𝑚𝑎𝑥 − 𝑥𝑚𝑖𝑛 SQNR: Signal to Quantization Noise Ratio
∆=
𝐿−1
continued…
If the signal is sinusoid,
then xmax= A, xmin= - A.
For coding, if number of bits used is b,
𝑥𝑚𝑎𝑥 −𝑥𝑚𝑖𝑛 2𝐴 2𝐴
then ∆= = 𝑏 ≈ 𝑏 [when b is higher]
𝐿−1 2 −1 2
𝑃𝑥 𝐴𝑣𝑔 𝑃𝑜𝑤𝑒𝑟 𝑜𝑓 𝑆𝑖𝑔𝑛𝑎𝑙
𝑆𝑄𝑁𝑅 = =
𝑃𝑒 𝐴𝑣𝑔 𝑃𝑜𝑤𝑒𝑟 𝑜𝑓 𝐸𝑟𝑟𝑜𝑟
∆ൗ ∆ൗ
3
1 2
2 1 𝑒 2 ∆2
𝑃𝑒 = න 𝑒 𝑑𝑒 = =
∆ −∆ൗ ∆ 3 −∆ൗ 12
2 2
𝐴2
And, for sinusoid, 𝑃𝑥 =
2
continued…

𝐴2 Τ2 𝐴2 Τ2 2𝐴
So, 𝑆𝑄𝑁𝑅 = ൗ ∆2Τ12 = ൘ 4𝐴2 ∵ ∆=
ൗ12 2𝑏
22𝑏
3
= ∙ 22𝑏
2
∴ 𝑆𝑄𝑁𝑅 𝑑𝐵 = 10 log10 (𝑆𝑄𝑁𝑅)
3
= 10 log10 ∙ 22𝑏
2
3
= 10 log10 + log10 22𝑏 log(ab) = log(a) + log(b)
2
= 10 0.176 + 0.6𝑏
= 𝟏. 𝟕𝟔 + 𝟔𝒃
Question: An A/D converter uses 7-bit uniform rounding
quantization for a sinusoidal signal. Find the SQNR(dB). If 8-bit
was used, what would be the improvement in SQNR(dB)? If the
sinusoid’s amplitude is 17, find resolution in both cases.

• For 7-bit, SQNR(dB) = (1.76 + 6 x 7) dB = 43.76 dB


• For 8-bit, SQNR(dB) = (1.76 + 6 x 8) dB = 49.76 dB
So, the improvement is (49.76 – 43.76) dB, or, 6 dB
• Resolution for 7-bit, Δ1 = (2 x 17) / (27) = 0.2656
• Resolution for 8-bit, Δ2 = (2 x 17) / (28) = 0.1328
Linear Constant-Coefficient Difference Equation
(LCCDE)
𝑦 𝑛 + 𝑎1 𝑦 𝑛 − 1 + 𝑎2 𝑦 𝑛 − 2 + ⋯ + 𝑎𝑀 𝑦 𝑛 − 𝑀
= 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 + 𝑏2 𝑥 𝑛 − 2 + ⋯ + 𝑏𝑁 𝑥[𝑛 − 𝑁]
Solution:
• Homogeneous [zero-input], yh[n]
• Particular [steady-state], yp[n]
Total solution = y[n] = yh[n] + yp[n]

y[n] = x[n] + 7 y[n-1]


or, y[n] – 7 y[n-1] = x[n]
Example: Find the homogeneous solution of a system
described by the 1st-order difference equation:
𝑦[𝑛] + 5𝑦[𝑛 − 1] = 𝑥[𝑛] --------(i)
We know, 𝑦ℎ 𝑛 = 𝐶1 𝜆1 𝑛 + 𝐶2 𝜆2 𝑛 + ⋯ + 𝐶𝑁 𝜆𝑁 𝑛 [for order N]
Now, for eqn (i), 𝑦ℎ 𝑛 = 𝐶𝜆𝑛 [because it is 1st order]
Then, we substitute an assumed solution (for x[n]=0) in eqn (i).
𝜆𝑛 + 5𝜆𝑛−1 = 0
⟹ 𝜆𝑛−1 𝜆 + 5 = 0
⟹ 𝜆 = −5
So, the solution becomes 𝑦ℎ 𝑛 = 𝐶 −5 𝑛 -------(ii)
For n=0 (with x[n]=0), eqn (i) becomes 𝑦[0] + 5𝑦[−1] = 0
⟹ 𝑦[0] = −5𝑦[−1]
For n=0, eqn (ii) becomes 𝑦ℎ [0] = 𝐶
continued…
So, 𝐶 = − 5𝑦[−1]
Then we substitute 𝐶 in eqn (ii),
𝑦ℎ 𝑛 = −5 𝑦 −1 −5 𝑛
⟹ 𝑦ℎ 𝑛 = −5 𝑛+1 𝑦 −1

∴ 𝑦ℎ 𝑛 = (−5)𝑛+1 𝑦 −1 , 𝑛 ≥ 0

Note:
If the value of y[−1] is given, it must be included in the solution.
For y[−1] = 2, 𝑦ℎ 𝑛 = 2 ∙ (−5)𝑛+1 , 𝑛 ≥ 0
Example: Find the homogeneous solution of a system described by the
2nd-order difference equation:
𝑦 𝑛 − 3𝑦 𝑛 − 1 − 4𝑦[𝑛 − 2] = 0 --------(i)
𝑛 𝑛 𝑛
We know, 𝑦ℎ 𝑛 = 𝐶1 𝜆1 + 𝐶2 𝜆2 + ⋯ + 𝐶𝑁 𝜆𝑁 [for order N]
𝑛 𝑛
Now, for eqn (i), 𝑦ℎ 𝑛 = 𝐶1 𝜆1 + 𝐶2 𝜆2 [because it is 2nd order]
Then, we substitute an assumed solution in eqn (i).
𝜆𝑛 − 3𝜆𝑛−1 − 4𝜆𝑛−2 = 0
⟹ 𝜆𝑛−2 𝜆2 − 3𝜆 − 4 = 0
⟹ 𝜆2 − 3𝜆 − 4 = 0
⟹ 𝜆 = −1, 4
So, the solution becomes 𝑦ℎ 𝑛 = 𝐶1 −1 𝑛 + 𝐶2 4 𝑛 -----(ii)
From eqn (i), 𝑦 𝑛 = 3𝑦 𝑛 − 1 + 4𝑦[𝑛 − 2]
∴ 𝑦 0 = 3𝑦 −1 + 4𝑦[−2]
𝑎𝑛𝑑, 𝑦 1 = 3𝑦 0 + 4𝑦[−1]
continued…
⟹ 𝑦 1 = 3 3𝑦 −1 + 4𝑦 −2 + 4𝑦[−1]
⟹ 𝑦 1 = 13𝑦 −1 + 12𝑦[−2]
From eqn (ii), 𝑦 0 = 𝐶1 + 𝐶2
𝑎𝑛𝑑, 𝑦 1 = −𝐶1 + 4𝐶2
∴ 𝐶1 + 𝐶2 = 3𝑦 −1 + 4𝑦[−2] -----(iii)
𝑎𝑛𝑑, −𝐶1 + 4𝐶2 = 13𝑦 −1 + 12𝑦[−2] -----(iv)
After solving eqn (iii) and (iv),
−1 4
𝐶1 = 𝑦 −1 + 𝑦[−2]
5 5
16 16
𝐶2 = 𝑦 −1 + 𝑦[−2]
5 5
−1 4 𝑛
16 16 𝑛
∴ 𝑦ℎ 𝑛 = 𝑦 −1 + 𝑦[−2] −1 + 𝑦 −1 + 𝑦[−2] 4
5 5 5 5
for 𝑛 ≥ 0
Correlation
• Crosscorrelation:
“Measure of similarity 𝑛=∞
between signals”
𝑟𝑥𝑦 𝑙 = ෍ 𝑥 𝑛 𝑦[𝑛 − 𝑙]
𝑛=−∞
Use: radar, sonar, GPS etc.
• Autocorrelation:
𝑛=∞

𝑟𝑥𝑥 𝑙 = ෍ 𝑥 𝑛 𝑥[𝑛 − 𝑙]
𝑛=−∞
Convolution vs Crosscorrelation vs Autocorrelation

rfg rff

rgf rgg
Question: Find rxy[n] and ryx[n] for the following:
x[n]=[ 7 4 6 1 ], y[n]=[ 1 0 1 9 ].
7 4 6 1 7 4 6 1
rxy[0] = 0+4+54 = 58 1 0 1 9 1 0 1 9
rxy[1] = 7+0+6+9 = 22
rxy[2] = 4+0+1 = 5 7 4 6 1 7 4 6 1
1 0 1 9 1 0 1 9
rxy[3] = 6+0 = 6
rxy[4] = 1 7 4 6 1
rxy[-1] = 7+36 = 43 1 0 1 9

rxy[-2] = 63
7 4 6 1
So, rxy[n] = [ 63 43 58 22 5 6 1 ] 1 0 1 9

And, ryx[n] = [ 1 6 5 22 58 43 63 ] 7 4 6 1
1 0 1 9
Question: Find autocorrelation for the following:
x[n]=[ 7 4 6 ]
7 4 6
7 4 6
rxx[0] = 49+16+36 = 101
7 4 6
rxx[1] = 28+24 = 52
7 4 6
rxx[2] = 42
rxx[-1] = 28+24 = 52 7 4 6
rxx[-2] = 42 7 4 6

So, rxx[n] = [ 42 52 101 52 42 ]


7 4 6
7 4 6

7 4 6
7 4 6
continued…
Normalized Correlation Sequence
𝑟𝑥𝑥 [𝑛]
𝜌𝑥𝑥 [𝑛] =
𝑟𝑥𝑥 [0]

𝑟𝑥𝑦 [𝑛]
𝜌𝑥𝑦 𝑛 =
𝑟𝑥𝑥 0 ∙ 𝑟𝑦𝑦 [0]

For example, if 𝑟𝑥𝑥 𝑛 = [5 10 20 10 5]


then 𝜌𝑥𝑥 𝑛 = [0.25 0.5 1 0.5 0.25]
Discrete Time Fourier Transform (DTFT)
𝑛=∞

𝑋 𝑒 𝑗𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=−∞
𝑋 𝑒 𝑗𝜔 is a continuous function of ω, where ω = ΩTs.
𝑋 𝑒 𝑗𝜔 is periodic with period of 2π.
𝑋 𝑒 𝑗𝜔 = 𝑋 𝑒 𝑗(𝜔+2𝜋𝑘) where k is any integer

To convert 𝑋 𝑒 𝑗𝜔 to x[n], inverse DTFT (IDTFT) is applied:


1 𝜋
𝑥𝑛 = න 𝑋 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔
2𝜋 −𝜋
continued…

Discrete & Aperiodic Continuous & Periodic

𝜋 𝑛=∞
1
𝑥𝑛 = න 𝑋 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 𝑋 𝑒 𝑗𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
2𝜋 −𝜋
𝑛=−∞
continued…

Existence of DTFT Spectra


• Sufficient condition: 𝑋 𝑒 𝑗𝜔 is generally complex.
𝑛=∞ • Magnitude spectrum:
𝑋 𝑒 𝑗𝜔 ≤ ෍ 𝑥 𝑛 <∞ 𝑋 𝑒 𝑗𝜔
𝑛=−∞ = ℜ 𝑋 𝑒 𝑗𝜔 2 + ℑ 𝑋 𝑒 𝑗𝜔 2
x[n] must be absolutely summable. • Phase spectrum:
Then, DTFT converges to a finite ℑ 𝑋 𝑒 𝑗𝜔
result for all ω. ∡ 𝑋 𝑒 𝑗𝜔 = tan−1
ℜ 𝑋 𝑒 𝑗𝜔
Note: Both are continuous & periodic.
continued…

Unit Impulse Unit Step


1, 𝑛=0 1, 𝑛≥0
𝛿 𝑛 =ቊ 𝑢 𝑛 =ቊ
0, 𝑛≠0 0, 𝑛<0

δ[n] = [ … 0 0 0 0 1 0 0 0 0 … ] u[n] = [ … 0 0 0 0 1 1 1 1 1 … ]
Question: Find the DTFT of x[n] = u[n] – u[n-3]
u[n] = [… 0 0 0 0 0 1 1 1 1 1 1 1 1 …]
u[n-3] = [… 0 0 0 0 0 0 0 0 1 1 1 1 1 …]
x[n] = [… 0 0 0 0 0 1 1 1 0 0 0 0 0 …]
We know,
𝑛=∞

𝑋 𝑒 𝑗𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=−∞
𝑛=2

= ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=0
= 𝑥 0 𝑒 −𝑗𝜔0 + 𝑥 1 𝑒 −𝑗𝜔1 + 𝑥 2 𝑒 −𝑗𝜔2
= 1 + 𝑒 −𝑗𝜔 + 𝑒 −2𝑗𝜔
Question: Find the DTFT of 𝑥 𝑛 = 1Τ 𝑛 𝑢[𝑛]
2
𝑛=∞ 𝑛
We know, 1 −𝑗𝜔
𝑛=∞ ⟹𝑋 𝑒 𝑗𝜔 = ෍ 𝑒
2
𝑋 𝑒 𝑗𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛 𝑛=0
0 1 2
𝑛=−∞ 1 −𝑗𝜔 1 −𝑗𝜔
1 −𝑗𝜔
𝑛=∞ = 𝑒 + 𝑒 + 𝑒 +⋯
𝑛 2 2 2
= ෍ 1ൗ2 𝑢[𝑛]𝑒 −𝑗𝜔𝑛 1 2
𝑛=−∞ 1 −𝑗𝜔 1 −𝑗𝜔
=1+ 𝑒 + 𝑒 +⋯
But, u[n] = 0 when n < 0. 2 2
So, This is a convergent geometric series (because
𝑛=∞ the |ratio| is < 1)
𝑛
𝑋 𝑒 𝑗𝜔 1
= ෍ ൗ2 𝑒 −𝑗𝜔𝑛 1
𝑗𝜔
∴𝑋 𝑒 =
𝑛=0 1 −𝑗𝜔
1− 𝑒
u[n] 2
𝑎
[ using formula 𝑆∞ = ]
1−𝑟
Question: Find the IDTFT of
1, − 𝜋ൗ ≤ 𝜔 ≤ 𝜋ൗ
X 𝑒 𝑗𝜔
=൝ 4 4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
We know, 1 1 𝜋
𝑗 4𝑛
𝜋
−𝑗 4 𝑛
= ∙ 𝑒 −𝑒
1 𝜋 𝜋𝑛 2𝑗
𝑥𝑛 = න 𝑋 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 1 𝜋
2𝜋 −𝜋 = sin 𝑛
𝜋𝑛 4
1 𝜋Τ4 𝑗𝜔𝑛
⟹𝑥 𝑛 = න 𝑒 𝑑𝜔 𝑒 𝑗𝜃 −𝑒 −𝑗𝜃
2𝜋 −𝜋Τ4 [ We know, sin 𝜃 = ]
2𝑗
1 1 𝑗𝜔𝑛 𝜋Τ4 1 1 𝜋
= ∙ 𝑒 ⟹ 𝑥 𝑛 = ∙ 𝜋 sin 𝑛
2𝜋 𝑗𝑛 −𝜋Τ4 4 𝑛 4
4
1 𝜋
⟹ 𝑥 𝑛 = 𝑠𝑖𝑛𝑐 𝑛
4 4
continued…
1 𝜋
𝑥 𝑛 = 𝑠𝑖𝑛𝑐 𝑛
4 4
Some Properties of DTFT
• Linearity
𝐷𝑇𝐹𝑇
𝑥 𝑛 = 𝑎𝑥1 𝑛 + 𝑏𝑥2 𝑛 𝑋 𝑒 𝑗𝜔 = 𝑎𝑋1 𝑒 𝑗𝜔 + 𝑏𝑋2 𝑒 𝑗𝜔
• Time Delay
𝐷𝑇𝐹𝑇
𝑦 𝑛 =𝑥 𝑛−𝑘 𝑌 𝑒 𝑗𝜔 = 𝑋 𝑒 𝑗𝜔 𝑒 −𝑗𝜔𝑘
• Frequency Shift
𝐷𝑇𝐹𝑇
𝑗𝜔𝑐 𝑛
𝑦 𝑛 =𝑒 𝑥𝑛 𝑌 𝑒 𝑗𝜔 = 𝑋 𝑒 𝑗 𝜔−𝜔𝑐
• Convolution
𝐷𝑇𝐹𝑇
𝑦 𝑛 =𝑥 𝑛 ∗ℎ 𝑛 𝑌 𝑒 𝑗𝜔 = 𝑋 𝑒 𝑗𝜔 𝐻 𝑒 𝑗𝜔
• Differentiation
𝐷𝑇𝐹𝑇
𝑗𝜔
𝑑
𝑦 𝑛 = 𝑛𝑥 𝑛 𝑌 𝑒 =𝑗 𝑋 𝑒 𝑗𝜔
𝑑𝜔
continued…
• Time Reversal
𝐷𝑇𝐹𝑇
𝑦 𝑛 = 𝑥 −𝑛 𝑌 𝑒 𝑗𝜔 = 𝑋 𝑒 −𝑗𝜔
• Conjugation
𝐷𝑇𝐹𝑇

𝑦 𝑛 =𝑥 𝑛 𝑌 𝑒 𝑗𝜔 = 𝑋 ∗ 𝑒 −𝑗𝜔
• Modulation
𝐷𝑇𝐹𝑇 1 1
𝑦 𝑛 = 𝑥 𝑛 cos 𝜔0 𝑛 𝑌 𝑒 𝑗𝜔 = 𝑋 𝑒𝑗 𝜔−𝜔0
+ 𝑋 𝑒𝑗 𝜔+𝜔0
2 2
• Multiplication
𝐷𝑇𝐹𝑇 1 𝜋
𝑥 𝑛 = 𝑥1 𝑛 ∙ 𝑥2 𝑛 𝑋 𝑒 𝑗𝜔 = න 𝑋1 𝑒 𝑗𝜏 𝑋2 𝑒 𝑗 𝜔−𝜏 𝑑𝜏
2𝜋 −𝜋
• Parseval’s Theorem
𝑛=∞
2
1 𝜋 2
෍ 𝑥[𝑛] = න 𝑋 𝑒 𝑗𝜔 𝑑𝜔
2𝜋 −𝜋
𝑛=−∞
Discrete Fourier Transform
(DFT)
Recall the DTFT of x[n],
𝑛=∞

𝑋 𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=−∞ We take N equidistant samples in the
Let’s sample X(ω) periodically in interval 0 ≤ 𝜔 < 2𝜋 with spacing 𝛿𝜔 =
2𝜋
frequency at a spacing of 𝛿𝜔. 𝑁
𝑛=∞
2𝜋
Since X(ω) is periodic with period 2π, 𝑋 𝑘 = ෍ 𝑥 𝑛 𝑒 −𝑗2𝜋𝑘𝑛/𝑁
only samples in the fundamental 𝑁
𝑛=−∞
frequency range are necessary. where k = 0,1,2,…,N–1
continued…
But, the equally spaced frequency samples After equidistant sampling of X(ω) for N ≥ L,
2𝜋 𝑛=𝐿−1
𝑋 𝑘 do not uniquely represent the 2𝜋
𝑁 𝑋(𝑘) ≡ 𝑋 𝑘 = ෍ 𝑥 𝑛 𝑒 −𝑗2𝜋𝑘𝑛/𝑁
original sequence x[n] when x[n] has infinite 𝑁
𝑛=0
duration. 𝑛=𝑁−1

Instead, the frequency samples correspond ⟹ 𝑋(𝑘) = ෍ 𝑥 𝑛 𝑒 −𝑗2𝜋𝑘𝑛/𝑁


to a periodic sequence of period N, that is 𝑛=0
an aliased version of x[n]. where k = 0,1,2,…,N–1
So, a finite-duration sequence x[n] of length The N-point inverse DFT (IDFT):
L has a DTFT: 𝑘=𝑁−1
𝑛=𝐿−1 1
𝑥𝑛 = ෍ 𝑋(𝑘)𝑒 𝑗2𝜋𝑘𝑛/𝑁
𝑋 𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛 ; 0 ≤ 𝜔 ≤ 2𝜋 𝑁
𝑘=0
𝑛=0 where n = 0,1,2,…,N–1
continued…
1, 0 ≤ 𝑛 ≤ 𝐿 − 1
Let’s see the DTFT and DFT of 𝑥 𝑛 = ቊ ; 𝐿 = 10
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Example: Find the 4-point DFT of x[n]=[ 2 1 7 5 ]
𝑛=3

𝑋 𝑘 = ෍ 𝑥[𝑛]𝑒 −𝑗2𝜋𝑛𝑘/4
𝑛=0
where k = 0, 1, 2, 3
⟹ 𝑋 𝑘 = 𝑥 0 𝑒 0 + 𝑥 1 𝑒 −𝑗2𝜋𝑘Τ4 + 𝑥 2 𝑒 −𝑗2𝜋2𝑘Τ4 + 𝑥[3]𝑒 −𝑗2𝜋3𝑘Τ4
⟹ 𝑋 𝑘 = 2 + 𝑒 −𝑗𝜋𝑘Τ2 + 7𝑒 −𝑗𝜋𝑘 + 5𝑒 −𝑗3𝜋𝑘Τ2
• 𝑋(0) = 2 + 1 + 7 + 5 = 15
• 𝑋 1 = 2 + 𝑒 −𝑗𝜋Τ2 + 7𝑒 −𝑗𝜋 + 5𝑒 −𝑗3𝜋Τ2 = −5 + 4𝑗
• 𝑋 2 = 2 + 𝑒 −𝑗𝜋 + 7𝑒 −𝑗𝜋2 + 5𝑒 −𝑗3𝜋 = 3
• 𝑋 3 = 2 + 𝑒 −𝑗𝜋3Τ2 + 7𝑒 −𝑗𝜋3 + 5𝑒 −𝑗3𝜋3Τ2 = −5 − 4𝑗
Magnitude, 𝑋(𝑘) = 15 6.403 3 6.403
Angle, ∡𝑋 𝑘 = [ 0 2.467 0 − 2.467 ]
z-Transform
𝑛=∞ Example: Determine the z-transforms of
𝑋 𝑧 = ෍ 𝑥 𝑛 𝑧 −𝑛 the following finite-duration signals:
𝑛=−∞ • x1[n]=[ 9 2 4 6 3 1 ]
where z is a complex variable.
X1(z)=9z2+2z+4+6z–1+3z–2+z–3,
𝑧
ROC: entire z-plane except z=0 and z=∞
𝑥[𝑛] ՞ 𝑋(𝑧)
The Region of Convergence (ROC) • x2[n]=[ 1 0 7 9 5 ]
of X(z) is the set of values of z for
which X(z) attains a finite value. X2(z)=1+7z–2+9z–3+5z–4,
ROC: entire z-plane except z=0
More example: Determine the z-transforms of the following
finite-duration signals:
• x3[n]=δ[n]
X3(z)=1 ; ROC: entire z-plane
• x4[n]=δ[n–6]
X4(z)=z–6 ; ROC: entire z-plane except 𝑧 = 0
• x5[n]=δ[n+7]
X5(z)=z7 ; ROC: entire z-plane except 𝑧 = ∞
• x6[n]=[ 4 6 0 7 ]

X6(z)=4z3+6z2+7; ROC: entire z-plane except 𝑧 = ∞


Example: Determine the z-transform of the signal:
𝑛
𝑥 𝑛 = 1ൗ3 𝑢[𝑛]
1 1 2 1 3 1 4
We get, 𝑥 𝑛 = 1 …
3 3 3 3

1 −1 1 2 −2 1 3 −3 1 4 −4
Thus, 𝑋 𝑧 = 1 + 𝑧 + 𝑧 + 𝑧 + 𝑧 +⋯
3 3 3 3
2 3 4
1 −1 1 −1 1 −1 1 −1
=1+ 𝑧 + 𝑧 + 𝑧 + 𝑧 +⋯
3 3 3 3
𝑎
Recall for infinite geometric series, 𝑆∞ = , where |𝑟| < 1
1−𝑟
1 −1 1
So, 𝑧 <1⟹ 𝑧 >
3 3
1 1
∴𝑋 𝑧 = ; 𝑅𝑂𝐶: 𝑧 >
1 −1 3
1− 𝑧
3
Existence of X(z)
Let, 𝑧 = 𝑟𝑒 𝑗𝜃 , where 𝑟 = 𝑧 , and 𝜃 = ∡𝑧
𝑛=∞ 𝑛=∞

𝑋 𝑧 = ෍ 𝑥[𝑛]𝑧 −𝑛 = ෍ 𝑥[𝑛]𝑟 −𝑛 𝑒 −𝑗𝜃𝑛


𝑛=−∞ 𝑛=−∞
In the ROC of X(z), 𝑋(𝑧) < ∞
𝑛=∞ 𝑛=∞

𝑋(𝑧) = ෍ 𝑥[𝑛]𝑟 −𝑛 𝑒 −𝑗𝜃𝑛 ≤ ෍ 𝑥[𝑛]𝑟 −𝑛


𝑛=−∞ 𝑛=−∞
So, 𝑋(𝑧) is finite if 𝑥[𝑛]𝑟 −𝑛 is absolutely summable.
𝑛=−1 𝑛=∞

𝑋(𝑧) ≤ ෍ 𝑥 𝑛 𝑟 −𝑛 + ෍ 𝑥[𝑛]𝑟 −𝑛
𝑛=−∞ 𝑛=0
continued…
𝑛=∞ 𝑛=∞

𝑋(𝑧) ≤ ෍ 𝑥 −𝑛 𝑟 𝑛 + ෍ 𝑥[𝑛]𝑟 −𝑛
𝑛=1 𝑛=0
• ROC for 1st sum consists of all points inside a
circle of radius 𝑟1
• ROC for 2nd sum consists of all points outside a
circle of radius 𝑟2

Thus, X(z) exists if 𝑟2 < 𝑟 < 𝑟1


❑If 𝑟2 > 𝑟1 , there is no common ROC,
and X(z) doesn’t exist.
continued…
Recall the example: 𝑛
1 𝑧 1 1
𝑥𝑛 = 𝑢 𝑛 ՞𝑋 𝑧 = ; 𝑅𝑂𝐶: 𝑧 >
3 1 −1 3
1− 𝑧
3
Similarly,
𝑛𝑢
𝑧 1
𝑥𝑛 = 𝑎 𝑛 ՞𝑋 𝑧 = −1
; 𝑅𝑂𝐶: 𝑧 > 𝑎
1 − 𝑎𝑧
where 𝑎 can be real or complex.
Example: Determine the z-transform of the signal:
𝑥 𝑛 = −5𝑛 𝑢[−𝑛 − 1]
−1 −1 −1 −1
We get, 𝑥 𝑛 = … −5−4 −5−3 −5−2 −5−1 𝟎 = [… 𝟎]
54 53 52 5
−1 −1 −1 −1
Thus, 𝑋 𝑧 = ⋯ + 𝑧4 + 𝑧3 + 𝑧2 + 𝑧1
54 53 52 5
4 3 2 1
1 1 1 1
= − …+ 𝑧 + 𝑧 + 𝑧 + 𝑧
5 5 5 5
𝑎
Recall for infinite geometric series, 𝑆∞ = , where |𝑟| < 1
1−𝑟
1
So, 𝑧 <1⟹ 𝑧 <5
5
1
𝑧 1
∴𝑋 𝑧 =− 5 = ; 𝑅𝑂𝐶: 𝑧 < 5
1 −1
1 − 𝑧 1 − 5𝑧
5
continued…
Recall the previous example:
𝑧 1
𝑥𝑛 = −5𝑛 𝑢 −𝑛 − 1 ՞ 𝑋 𝑧 = −1
; 𝑅𝑂𝐶: 𝑧 < 5
1 − 5𝑧
Similarly,
𝑧 1
𝑥𝑛 = −𝑎𝑛 𝑢 −𝑛 − 1 ՞ 𝑋 𝑧 = −1
; 𝑅𝑂𝐶: 𝑧 < 𝑎
1 − 𝑎𝑧
where 𝑎 can be real or complex.
Example: Determine the z-transform of the signal:
𝑥 𝑛 = 𝑎𝑛 𝑢 𝑛 + 𝑏 𝑛 𝑢[−𝑛 − 1]
For the 1st term, 𝑅𝑂𝐶: 𝑧 > 𝑎
For the 2nd term, 𝑅𝑂𝐶: 𝑧 < 𝑏
▪ If 𝑎 > 𝑏 , two ROC don’t overlap.
So, X(z) doesn’t exist.
▪ If 𝑎 < 𝑏 , the ROC is ring-shaped.
X(z) exists. 𝑅𝑂𝐶: 𝑎 < 𝑧 < 𝑏
For 2nd case,
1 1
𝑋 𝑧 = −1

1 − 𝑎𝑧 1 − 𝑏𝑧 −1
ROC Characteristic
Finite-Duration Signal Infinite-Duration Signal

(Causal)
(Anti-Causal)
(Two-Sided/Non-causal)
Some Properties of z-Transform
𝑧
Linearity: 𝑥 𝑛 = 𝑎𝑥1 𝑛 + 𝑏𝑥2 𝑛 ՞ 𝑋 𝑧 = 𝑎𝑋1 𝑧 + 𝑏𝑋2 (𝑧)
Example: Find the z-transform for 𝑥 𝑛 = 10 4𝑛 − 17 9𝑛 𝑢[𝑛]
We get, 𝑥 𝑛 = 10 4𝑛 𝑢 𝑛 − 17 9𝑛 𝑢 𝑛
= 10𝑥1 𝑛 − 17𝑥2 [𝑛]
𝑧 1
• 𝑥1 𝑛 = 4𝑛 𝑢 𝑛 ՞ 𝑋1 𝑧 = −1 ; 𝑅𝑂𝐶: 𝑧 >4
1−4𝑧
𝑧 1
𝑛
• 𝑥2 𝑛 = 9 𝑢 𝑛 ՞ 𝑋2 𝑧 = −1 ; 𝑅𝑂𝐶:
𝑧 >9
1−9𝑧
10 17
∴𝑋 𝑧 = −1
− −1
; 𝑅𝑂𝐶: 𝑧 > 9
1 − 4𝑧 1 − 9𝑧
continued…
𝑧
Time-Shifting: 𝑦 𝑛 = 𝑥 𝑛 − 𝑘 ՞ 𝑌 𝑧 = 𝑧 −𝑘 𝑋(𝑧)
Example: Using time-shifting, find z-transform for y1[n]=x[n+3] and
y2[n]=x[n-2]; where x[n]=[ 2 0 5 4 6 3 ].

We get, 𝑋 𝑧 = 2 + 5𝑧 −2 + 4𝑧 −3 + 6𝑧 −4 + 3𝑧 −5 ; 𝑅𝑂𝐶: 𝑧 > 0


• 𝑌1 𝑧 = 𝑧 3 𝑋(𝑧)
= 2𝑧 3 + 5𝑧 + 4 + 6𝑧 −1 + 3𝑧 −2 ; 𝑅𝑂𝐶: 0 < 𝑧 < ∞
• 𝑌2 𝑧 = 𝑧 −2 𝑋(𝑧)
= 2𝑧 −2 + 5𝑧 −4 + 4𝑧 −5 + 6𝑧 −6 + 3𝑧 −7 ; 𝑅𝑂𝐶: 𝑧 > 0
continued…
𝑧
Scaling: If 𝑥 𝑛 ՞ 𝑋 𝑧 ; 𝑅𝑂𝐶: 𝑟1 < 𝑧 < 𝑟2
𝑧
Then 𝑎𝑛 𝑥 𝑛 ՞ 𝑋 𝑎−1 𝑧 ; 𝑅𝑂𝐶: 𝑎 𝑟1 < 𝑧 < 𝑎 𝑟2
𝑧
Time Reversal: If 𝑥 𝑛 ՞ 𝑋 𝑧 ; 𝑅𝑂𝐶: 𝑟1 < 𝑧 < 𝑟2
𝑧 1 1
Then 𝑥 −𝑛 ՞ 𝑋 𝑧 −1 ; 𝑅𝑂𝐶: < 𝑧 <
𝑟2 𝑟1
Example: Determine the z-transform for x[n]=u[-n].
𝑧
1
Recall that, 𝑢 𝑛 ՞ ; 𝑅𝑂𝐶: 𝑧 >1
1−𝑧 −1
𝑧 1
∴ 𝑢 −𝑛 ՞ ; 𝑅𝑂𝐶: 𝑧 < 1
1−𝑧
continued…
𝑧 𝑑𝑋 𝑧
Differentiation: 𝑦 𝑛 = 𝑛𝑥 𝑛 ՞ 𝑌 𝑧 = −𝑧 ; 𝑅𝑂𝐶 𝑢𝑛𝑐ℎ𝑎𝑛𝑔𝑒𝑑
𝑑𝑧
Example: Determine the z-transform for 𝑦 𝑛 = 𝑛 6𝑛 𝑢[𝑛]
We recall,
𝑧 1
𝑥𝑛 = 𝑎𝑛 𝑢 𝑛 ՞𝑋 𝑧 = −1
; 𝑅𝑂𝐶: 𝑧 > 𝑎
1 − 𝑎𝑧
𝑛
𝑧 1
𝑥𝑛 = 6 𝑢 𝑛 ՞𝑋 𝑧 = −1
; 𝑅𝑂𝐶: 𝑧 > 6
1 − 6𝑧
𝑧 𝑑𝑋(𝑧)
∴𝑦 𝑛 = 𝑛𝑥 𝑛 ՞ 𝑌 𝑧 = −𝑧 ; 𝑅𝑂𝐶: 𝑧 > 6
𝑑𝑧
𝑑 1 6𝑧 −1
⟹𝑌 𝑧 = −𝑧 −1
= −1 2
; 𝑅𝑂𝐶: 𝑧 > 6
𝑑𝑧 1 − 6𝑧 1 − 6𝑧
continued…
𝑧
Convolution: 𝑥 𝑛 = 𝑥1 𝑛 ∗ 𝑥2 𝑛 ՞ 𝑋 𝑧 = 𝑋1 (𝑧)𝑋2 (𝑧)
Example: Using convolution property of z-transform, find
𝑥[𝑛] = 𝑥1 [𝑛] ∗ 𝑥2 [𝑛], where x1=[ 5 0 7 ], x2=[ 2 4 ]

• 𝑋1 𝑧 = 5 + 7𝑧 −2 ; 𝑅𝑂𝐶: 𝑧 > 0
• 𝑋2 𝑧 = 2 + 4𝑧 −1 ; 𝑅𝑂𝐶: 𝑧 > 0
∴ 𝑋 𝑧 = 𝑋1 (𝑧)𝑋2 (𝑧)
⟹ 𝑋 𝑧 = 5 + 7𝑧 −2 2 + 4𝑧 −1
= 10 + 20𝑧 −1 + 14𝑧 −2 + 28𝑧 −3 ; 𝑅𝑂𝐶: 𝑧 > 0
∴ 𝑥 𝑛 = [ 10 20 14 28 ]
Poles & Zeros for Rational X(z)
𝑏0 𝑧 − 𝑧1 𝑧 − 𝑧2 … 𝑧 − 𝑧𝑀
𝑋 𝑧 = 𝑧 𝑁−𝑀 ∙
𝑎0 𝑧 − 𝑝1 𝑧 − 𝑝2 … 𝑧 − 𝑝𝑁
❑The zeros of X(z) are the values of z for which 𝑋(𝑧) = 0
❑The poles of X(z) are the values of z for which 𝑋(𝑧) = ∞
Note:
• ROC of X(z) should not contain any poles.
• If N > M, then X(z) has (N–M) zeros at origin.
• If M > N, then X(z) has (M–N) poles at origin.
• Poles or zeros may also occur at 𝑧 = ∞
Example: Determine the pole-zero plot for the signal:
𝑥 𝑛 = 4𝑛 𝑢[𝑛]
We recall,
1
𝑋 𝑧 = −1
; 𝑅𝑂𝐶: 𝑧 > 4
1 − 4𝑧
𝑧
⟹𝑋 𝑧 = ; 𝑅𝑂𝐶: 𝑧 > 4
𝑧−4
X(z) has one zero at z=0

X(z) has one pole at z=4


Time-Domain Behavior with Pole Location
“Causal Sequence 𝑥 𝑛 = 𝑎𝑛 𝑢[𝑛] ”
Single Real Pole (Positive) Single Real Pole (Negative)

−1 < 𝑎 < 0
0<𝑎<1

𝑎=1 𝑎 = −1

𝑎>1 𝑎 < −1
Time-Domain Behavior with Pole Location
“Causal Sequence 𝑥 𝑛 = 𝑛𝑎𝑛 𝑢[𝑛] ”
Double Real Pole (Positive) Double Real Pole (Negative)

−1 < 𝑎 < 0
0<𝑎<1

𝑎=1 𝑎 = −1

𝑎 < −1
𝑎>1
continued…
▪ Causal real signals with simple
real poles or simple complex
conjugate pairs of poles, which
are inside or on the unit circle,
are always bounded in
amplitude.
▪ Time behavior of a signal
depends strongly on the location
of its poles relative to the unit
circle.
▪ Zeros also affect the behavior of
a signal but not as strongly as
poles.
Some Common z-Transform Pairs
x[n] X(z) ROC
𝛿[𝑛] 1 Entire z-plane

1
𝑢[𝑛] 𝑧 >1
1 − 𝑧 −1
1
𝑎𝑛 𝑢[𝑛] 𝑧 > 𝑎
1 − 𝑎𝑧 −1
𝑎𝑧 −1
𝑛𝑎𝑛 𝑢[𝑛] 𝑧 > 𝑎
1 − 𝑎𝑧 −1 2
1
−𝑎𝑛 𝑢[−𝑛 − 1] 𝑧 < 𝑎
1 − 𝑎𝑧 −1
𝑎𝑧 −1
−𝑛𝑎𝑛 𝑢[−𝑛 − 1] 𝑧 < 𝑎
1 − 𝑎𝑧 −1 2
1 − 𝑎𝑧 −1 cos 𝜔0
𝑎𝑛 cos 𝜔0 𝑛 𝑢[𝑛] 𝑧 > 𝑎
1 − 2𝑎𝑧 −1 cos 𝜔0 + 𝑎2 𝑧 −2
𝑎𝑧 −1 sin 𝜔0
𝑎𝑛 sin 𝜔0 𝑛 𝑢[𝑛] 𝑧 > 𝑎
1 − 2𝑎𝑧 −1 cos 𝜔0 + 𝑎2 𝑧 −2
Inverse z-Transform
1
𝑥𝑛 = ර 𝑋(𝑧)𝑧 𝑛−1 𝑑𝑧
2𝜋𝑗 𝐶
where C is a counterclockwise closed path encircling the origin and entirely in ROC.

Methods:

• Direct evaluation by contour integration


• Expansion into a series of terms, in the variables 𝑧
• Partial-fraction expansion and table lookup
Example: Find the inverse z-transform for
1 4
𝑋 𝑧 = ; 𝑅𝑂𝐶: 𝑧 >
8 3
1 − 2𝑧 −1 + 𝑧 −2
9
We get,
𝑧 𝐴 𝐵
∴ = +
𝑧2 4 2 4 2
𝑋 𝑧 = 𝑧− 𝑧− 𝑧− 𝑧−
8 3 3 3 3
𝑧2 − 2𝑧 +
9 2 4
⟹𝑧=𝐴 𝑧− +𝐵 𝑧−
𝑧2 3 3
⟹𝑋 𝑧 =
4 2 Putting 𝑧 = 2Τ3 , we get 𝐵 = −1
𝑧− 𝑧−
3 3
Putting 𝑧 = 4Τ3 , we get 𝐴 = 2
𝑋 𝑧 𝑧
⟹ = 𝑋 𝑧 2 −1
𝑧 4 2
𝑧− 𝑧− ∴ = +
3 3 𝑧 4 2
𝑧− 𝑧 −
3 3
𝑋 𝑧 𝐴 𝐵
⟹ = + 2 1
𝑧 4 2 ⟹𝑋 𝑧 = −
𝑧− 𝑧 − 4 −1 2 −1
3 3 1− 𝑧 1 − 𝑧
3 3
continued…
2 1 4
𝑋 𝑧 = 4 − 2 ; 𝑅𝑂𝐶: 𝑧 > ----------------(i)
1− 𝑧 −1 1−3𝑧 −1 3
3

So, x[n] is causal, and both terms in eqn (i) are causal terms.
𝑛 𝑛
4 2
∴𝑥 𝑛 =2 𝑢𝑛 − 𝑢[𝑛]
3 3
2
• What if 𝑅𝑂𝐶: 𝑧 < ?
3
So, x[n] is anti-causal, and both terms in eqn (i) are anti-causal terms.
𝑛 𝑛
4 2
∴ 𝑥 𝑛 = −2 𝑢 −𝑛 − 1 + 𝑢[−𝑛 − 1]
3 3
continued…
2 1
𝑋 𝑧 = 4 − 2 ----------------(i)
1− 𝑧 −1 1−3𝑧 −1
3
2 4
• What if 𝑅𝑂𝐶: < 𝑧 < ?
3 3
So, x[n] is two-sided, and one term in eqn (i) is causal, another is anti-causal.
For ROC to exist (overlap):
2
▪ 𝑧 > provides causal part.
3
4
▪ 𝑧 < provides anti-causal part.
3
𝑛 𝑛
4 2
∴ 𝑥 𝑛 = −2 𝑢 −𝑛 − 1 − 𝑢[𝑛]
3 3
Example: Find the inverse z-transform for
1
𝑋 𝑧 = ; 𝑥 𝑛 𝑖𝑠 𝑐𝑎𝑢𝑠𝑎𝑙
1 + 𝑧 −1 1 − 𝑧 −1 2

We get, After solving, 𝐴 = 1Τ4 ; 𝐵 = 3Τ4 ; 𝐶 = 1Τ2


𝑧3 𝑋 𝑧 1ൗ 3ൗ 1ൗ
𝑋 𝑧 = ∴ = 4 + 4 + 2
𝑧+1 𝑧−1 2 2
𝑧 𝑧+1 𝑧−1 𝑧−1
𝑋 𝑧 𝑧2 1ൗ 3ൗ 1ൗ 𝑧 −1
⟹ = 4 + 4 + 2
𝑧 𝑧+1 𝑧−1 2 ⟹𝑋 𝑧 =
1 + 𝑧 −1 1 − 𝑧 −1 1 − 𝑧 −1 2
𝑋 𝑧 𝐴 𝐵 𝐶 1 3 1
⟹ = + + 2 ∴ 𝑥 𝑛 = −1 𝑢 𝑛 + 1 𝑢 𝑛 + 𝑛 1 𝑛 𝑢[𝑛]
𝑛 𝑛
𝑧 𝑧+1 𝑧−1 𝑧−1 4 4 2
𝑧2 𝐴 𝐵 𝐶 1 3 1
∴ 2 = + + ⟹𝑥 𝑛 = −1 𝑛 + + 𝑛 𝑢[𝑛]
𝑧+1 𝑧−1 𝑧+1 𝑧−1 𝑧−1 2 4 4 2
⟹ 𝑧2 = 𝐴 𝑧 − 1 2 + 𝐵 𝑧 + 1 𝑧 − 1 + 𝐶 𝑧 + 1
Example: Find the inverse z-transform for
2𝑧 −1
𝑋 𝑧 = −1 −2
; 𝑥 𝑛 𝑖𝑠 𝑐𝑎𝑢𝑠𝑎𝑙
1 − 2𝑧 + 2𝑧

2𝑧
We get, 𝑋 𝑧 = −𝑗 𝑗
𝑧 2 −2𝑧+2 ⟹𝑋 𝑧 = +
1 − (1 + 𝑗)𝑧 −1 1 − (1 − 𝑗)𝑧 −1
𝑋 𝑧 2
⟹ = ∴ 𝑥 𝑛 = −𝑗 1 + 𝑗 𝑛 + 𝑗 1 − 𝑗 𝑛 𝑢 𝑛
𝑧 𝑧− 1+𝑗 𝑧− 1−𝑗
Formula: 𝐴𝑝𝑛 + 𝐴∗ 𝑝∗ 𝑛 = 2 𝐴 ∙ 𝑝 𝑛 cos 𝜔𝑛 + 𝜃
𝑋 𝑧 𝐴 𝐴∗
⟹ = + where 𝐴 = 𝐴 𝑒 𝑗𝜃 and 𝑝 = 𝑝 𝑒 𝑗𝜔
𝑧 𝑧− 1+𝑗 𝑧− 1−𝑗 𝜋 𝑛𝜋
⟹ 𝑥 𝑛 = 2 2 cos 𝑛 − 𝑢[𝑛]
After solving, 𝐴 = −𝑗; 𝐴∗ = 𝑗 4 2
𝑋 𝑧 −𝑗 𝑗 𝑛 𝜋
∴ = + ∴ 𝑥 𝑛 = 2 2 sin 𝑛 𝑢[𝑛]
𝑧 𝑧 − (1 + 𝑗) 𝑧 − (1 − 𝑗) 4

Note: Here, 𝐴 = −𝑗 = 1𝑒 −𝑗𝜋Τ2


𝑝 = 1 + 𝑗 = 2𝑒 𝑗𝜋Τ4
System Function 𝐻(𝑧)
H(z) represents the z-domain characterization of a system, whereas h[n] is the
corresponding time-domain characterization of the system.
𝑧
𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ 𝑛 ՞ 𝑌 𝑧 = 𝑋 𝑧 𝐻(𝑧)
𝑌(𝑧)
𝐻 𝑧 =
𝑋(𝑧)
Example: Determine the system function and the impulse response of the causal
1
system described by the difference equation: 𝑦[𝑛] = 𝑦[𝑛 − 1] + 7𝑥[𝑛]
5

Computing the z-transform of this 𝑌 𝑧 7 1


difference equation, ⟹𝐻 𝑧 = = ; 𝑅𝑂𝐶: 𝑧 >
𝑋 𝑧 1 5
1 −1 1 − 𝑧 −1
𝑌 𝑧 = 𝑧 𝑌 𝑧 + 7𝑋 𝑧 5
𝑛
5 1
1 −1 ∴ℎ 𝑛 =7 𝑢[𝑛]
⟹𝑌 𝑧 1− 𝑧 = 7𝑋 𝑧 5
5 Note: This system has pole at 1Τ5 and zero at origin.
Example: An LTI system has ℎ 𝑛 = 𝛿 𝑛 + 0.5𝛿 𝑛 − 1 .
Find the system’s unit step response.

We get, 𝐻 𝑧 = 1 + 0.5𝑧 −1 ; 𝑅𝑂𝐶: 𝑧 > 0


𝑧 1
And, 𝑥 𝑛 = 𝑢 𝑛 ՞ 𝑋 𝑧 = −1 ; 𝑅𝑂𝐶:
𝑧 >1
1−𝑧
1 + 0.5𝑧 −1
∴𝑌 𝑧 =𝐻 𝑧 𝑋 𝑧 =
1 − 𝑧 −1
1 0.5𝑧 −1
⟹𝑌 𝑧 = −1
+ −1
; 𝑅𝑂𝐶: 𝑧 > 1
1−𝑧 1−𝑧
∴ 𝑦 𝑛 = 𝑢 𝑛 + 0.5𝑢[𝑛 − 1]
Example: Compute the step response of a causal LTI system
with zero at 1, pole at 3, and H(0) = 4. Also find the LCCDE.
𝑧−1 0−1
Let, 𝐻 𝑧 = 𝑘 ∙ ⟹𝐻 0 =4=𝑘∙ ⟹ 𝑘 = 12
𝑧−3 0−3
𝑧−1 1 − 𝑧 −1
∴ 𝐻 𝑧 = 12 ∙ = 12 ∙ −1
; 𝑅𝑂𝐶: 𝑧 > 3
𝑧−3 1 − 3𝑧
𝑧 1
And, 𝑥 𝑛 = 𝑢 𝑛 ՞ 𝑋 𝑧 = ; 𝑅𝑂𝐶:
𝑧 >1
1−𝑧 −1
−1
1−𝑧 1 12
∴ 𝑌 𝑧 = 𝐻 𝑧 𝑋 𝑧 = 12 ∙ −1
∙ −1
= −1
; 𝑅𝑂𝐶: 𝑧 > 3
1 − 3𝑧 1−𝑧 1 − 3𝑧
∴ 𝑦 𝑛 = 12 3 𝑛 𝑢[𝑛]
𝑌(𝑧) 1 − 𝑧 −1 12 − 12𝑧 −1
= 𝐻 𝑧 = 12 ∙ −1
=
𝑋(𝑧) 1 − 3𝑧 1 − 3𝑧 −1
∴ 𝑦 𝑛 − 3𝑦 𝑛 − 1 = 12𝑥 𝑛 − 12𝑥[𝑛 − 1]
Causality & Stability with z-Transform
• An LTI system is causal if and only if the ROC of H(z) is the exterior of a
circle of radius 𝑟 < ∞, including the point 𝑧 = ∞.
• An LTI system is BIBO stable if and only if the ROC of H(z) includes the
unit circle.
A causal LTI system is BIBO stable if and only if all the poles of H(z) are
inside the unit circle.
Example: An LTI system is characterized by the following system
function:
1
𝐻 𝑧 =
1 − 3.5𝑧 −1 + 1.5𝑧 −2
System is non-causal. Specify ROC of H(z). Determine h[n]. Find stability.
After partial-fraction expansion, we get:
−1ൗ 6ൗ
𝐻 𝑧 = 5 + 5
1 −1 1 − 3𝑧 −1
1− 𝑧
2
1
Since the system is non-causal (given), 𝑅𝑂𝐶: < 𝑧 <3
2
𝑛
1 1 6
∴ℎ 𝑛 =− 𝑢 𝑛 − 3 𝑛 𝑢[−𝑛 − 1]
5 2 5
ROC contains “unit circle”, so the system is stable.
continued…
−1ൗ 6ൗ
𝐻 𝑧 = 5 + 5
1 −1 1 − 3𝑧 −1
1− 𝑧
2
What if the system is causal? What if the system is anti-causal?
𝑅𝑂𝐶: 𝑧 > 3 1
𝑛 𝑅𝑂𝐶: 𝑧 <
1 1 6 2
∴ℎ 𝑛 =− 𝑢 𝑛 + 3 𝑛 𝑢[𝑛] 1 1
𝑛
6
5 2 5 ∴ℎ 𝑛 = 𝑢 −𝑛 − 1 − 3 𝑛 𝑢[−𝑛 − 1]
5 2 5
ROC doesn’t contain “unit circle”, so ROC doesn’t contain “unit circle”, so
the system is unstable. the system is unstable.
Pole-Zero Cancellation
When a z-transform has a pole that is at the same location as a zero,
the pole is cancelled by the zero.
➢H(z) itself → order of the system reduced by one.
➢Product of H(z) and X(z) → pole of the system suppressed by zero in
x[n], or vice versa.
By proper selection of the zeros of x[n], it is possible to suppress one or
more system modes in the response of the system.
By proper selection of the zeros of H(z), it is possible to suppress one or
more modes of x[n] from the response of the system.
Example: Find h[n] for a causal system is described by the following LCCDE:
𝑦 𝑛 = 2.5𝑦 𝑛 − 1 − 𝑦 𝑛 − 2 + 𝑥 𝑛 − 5𝑥 𝑛 − 1 + 6𝑥[𝑛 − 2]
We get, 𝑦 𝑛 − 2.5𝑦 𝑛 − 1 + 𝑦 𝑛 − 2 = 𝑥 𝑛 − 5𝑥 𝑛 − 1 + 6𝑥[𝑛 − 2]
Applying z-transform,
𝑌 𝑧 − 2.5𝑧 −1 𝑌 𝑧 + 𝑧 −2 𝑌 𝑧 = 𝑋 𝑧 − 5𝑧 −1 𝑋 𝑧 + 6𝑧 −2 𝑋(𝑧)
⟹ 𝑌 𝑧 1 − 2.5𝑧 −1 + 𝑧 −2 = 𝑋(𝑧) 1 − 5𝑧 −1 + 6𝑧 −2
𝑌 𝑧 1 − 5𝑧 −1 + 6𝑧 −2
⟹𝐻 𝑧 = =
𝑋 𝑧 1 − 2.5𝑧 −1 + 𝑧 −2
𝑧 2 − 5𝑧 + 6 𝑧−2 𝑧−3
⟹ 𝐻(𝑧) = 2 =
𝑧 − 2.5𝑧 + 1 𝑧 − 2 𝑧 − 0.5
𝑧−3 𝑧 − 0.5 − 2.5 2.5
⟹𝐻 𝑧 = = =1−
𝑧 − 0.5 𝑧 − 0.5 𝑧 − 0.5
2.5𝑧 −1 1
⟹𝐻 𝑧 =1− −1
; 𝑅𝑂𝐶: 𝑧 >
1 − 0.5𝑧 2
∴ ℎ 𝑛 = 𝛿 𝑛 − 2.5 0.5 𝑛−1 𝑢[𝑛 − 1]
Example: A causal LTI system is described by:
5 1
𝑦 𝑛 = 𝑦 𝑛 − 1 − 𝑦 𝑛 − 2 + 𝑥[𝑛]
6 6
Find the input signal that will cancel the nearest pole to the origin. Also
find system response for that input.
5 −1 1 −2 The nearest pole is at 1Τ3 (to be cancelled).
𝑌 𝑧 1− 𝑧 + 𝑧 = 𝑋(𝑧) 1 −1
6 6 So, X(z) must be 1 − 𝑧 ; ROC: 𝑧 > 0
3
𝑌(𝑧) 1
∴𝐻 𝑧 = = 1
𝑋(𝑧) 1 − 5 𝑧 −1 + 1 𝑧 −2 ∴ 𝑥 𝑛 = 𝛿 𝑛 − 𝛿[𝑛 − 1]
6 6 3
1 1 1
⟹𝐻 𝑧 = Now, 𝑌 𝑧 = 𝐻 𝑧 𝑋 𝑧 = 1 −1 ; 𝑅𝑂𝐶: 𝑧 >
1−2𝑧 2
1 1
1 − 𝑧 −1 1 − 𝑧 −1 𝑛
2 3 1
This system has two real poles at 1Τ2 and 1Τ3 ∴𝑦𝑛 = 𝑢[𝑛]
2
1
System 𝑅𝑂𝐶: 𝑧 >
2
continued…
• What if you want to cancel the farthest pole from the origin?
1
𝐻 𝑧 =
1 1
1 − 𝑧 −1 1 − 𝑧 −1
2 3
The farthest pole is at 1Τ2 (to be cancelled).
1 −1
So, X(z) must be 1 − 𝑧 ; 𝑅𝑂𝐶: 𝑧 > 0
2
1
∴ 𝑥 𝑛 = 𝛿 𝑛 − 𝛿[𝑛 − 1]
2
1 1
Now, 𝑌 𝑧 = 𝐻 𝑧 𝑋 𝑧 = 1 ; 𝑅𝑂𝐶: 𝑧 >
1−3𝑧 −1 3
𝑛
1
∴𝑦𝑛 = 𝑢[𝑛]
3
Example: A cell phone signal 𝑥[𝑛] is distorted by multipath reflections
off of city buildings. What your cell phone receives is not 𝑥[𝑛] but 𝑦[𝑛],
where 𝑦 𝑛 = 𝑥 𝑛 − 0.75𝑥 𝑛 − 1 + 0.125𝑥 𝑛 − 2 . Can you find a
filter that recovers 𝑥[𝑛] from 𝑦[𝑛]?

We need to compute the inverse filter 𝑔[𝑛] that can undo the effect of ℎ[𝑛].
𝑌(𝑧)
𝐻 𝑧 = = 1 − 0.75𝑧 −1 + 0.125𝑧 −2
𝑋(𝑧)
𝑧 2 − 0.75𝑧 + 0.125
⟹𝐻 𝑧 =
𝑧2
We want ℎ[𝑛] ∗ 𝑔[𝑛] = 𝛿[𝑛], which implies 𝐻(𝑧)𝐺(𝑧) = 1.
1 𝑧2
𝐺 𝑧 = = 2
𝐻(𝑧) 𝑧 − 0.75𝑧 + 0.125
continued…
𝑧2
⟹𝐺 𝑧 =
𝑧 − 0.5 𝑧 − 0.25
𝐺 𝑧 𝑧
⟹ =
𝑧 𝑧 − 0.5 𝑧 − 0.25
𝐺 𝑧 2 −1
⟹ = +
𝑧 𝑧 − 0.5 𝑧 − 0.25
2𝑧 𝑧
⟹𝐺 𝑧 = −
𝑧 − 0.5 𝑧 − 0.25
2 1
⟹𝐺 𝑧 = −1

1 − 0.5𝑧 1 − 0.25𝑧 −1
∴ 𝑔 𝑛 = 2 0.5 𝑛 𝑢 𝑛 − 0.25 𝑛 𝑢[𝑛]
Digital Filter Analog vs Digital
• Analog filters are cheap, fast, and have a
large dynamic range.
Use: • Digital filters are vastly superior in the
• Signal separation (e.g. level of performance.
EKG contaminated with Digital Filter Type
noise)
i. FIR Filter: has Finite Impulse Response
• Signal restoration (e.g. [carried out by convolution]
image captured with
shaky camera) ii. IIR Filter: has Infinite Impulse Response
[carried out by recursion]
Filter Parameters
Every linear filter has
• impulse response
• step response
• frequency response

Some info about dB:


Every 20 dB means that the
amplitude has changed by a
factor of 10.
-3 dB means that the
amplitude is reduced to
0.707, and the power is
reduced to 0.5.
Information is Represented in Signals
• Step response describes how information represented in the time
domain is being modified by the system.
• Frequency response shows how information represented in the
frequency domain is being changed.
Good performance in the time domain results in poor performance in
the frequency domain, and vice versa.
Example:
Filter for noise removal from an EKG: step response is the important
parameter, and frequency response is of little concern.
Filter for a hearing aid: frequency response is all important, while step
response doesn't matter.
Time Domain Parameters of Digital Filter

Better:
✓Fast step response
✓No overshoot
✓Linear Phase
Frequency Domain Parameters of Digital Filter

Better:
✓ Fast roll-off
✓ Flat passband
✓ Good stopband attenuation
Low-Pass Filter to High-Pass Filter
Band-Pass & Band-Reject Filter from LPF & HPF
Moving Average Filter
𝑀−1
1
𝑦 𝑖 = ෍ 𝑥 𝑖+𝑗
𝑀
𝑗=0
For example, a 5-point MA filter:
𝑥 80 + 𝑥 81 + 𝑥 82 + 𝑥 83 + 𝑥[84]
𝑦 80 =
5
𝑥 78 + 𝑥 79 + 𝑥 80 + 𝑥 81 + 𝑥[82]
Alternatively, 𝑦 80 =
5
1 1 1 1 1
A 5-point filter has the filter kernel: [… 0 0 0 0…]
5 5 5 5 5
That is, MA filter is a convolution of the input signal with a rectangular
pulse having an area of unity.
Remember: MA filter is an FIR filter.
continued…

The amount of noise reduction is equal to the square-root of the number


of points in the average.
For example, a 100 point moving average filter reduces the noise by a
factor of 10.
Frequency Response of MA Filter
• MA is an exceptionally good smoothing filter.
• But, MA is an exceptionally bad low-pass filter.

Frequency response of an M-point MA filter:


1 sin 𝜋𝑓𝑀
𝐻𝑓 =
𝑀 sin 𝜋𝑓
Windowed-Sinc Filter

While this infinite length (in time


domain) is not a problem for
mathematics, it is a show stopper for
computers.

Now there is excessive ripple in the


passband and poor attenuation in
the stopband.
Increasing the length of the filter
kernel does not reduce these
problems.
continued…
Windowing comes to the rescue!

Multiplying the truncated-sinc (c),


by the Blackman or Hamming
window (e), results in the
windowed-sinc filter kernel shown
in (f).

The passband is now flat, and the


stopband attenuation is so good it
cannot be seen in this graph.
Window: Hamming vs Blackman
• Hamming Window:
2𝜋𝑛
𝑤 𝑛 = 0.54 − 0.46 cos
𝑀
• Blackman Window:
2𝜋𝑛 4𝜋𝑛
𝑤 𝑛 = 0.42 − 0.5 cos + 0.08 cos
𝑀 𝑀

Comparison:
Hamming has about a 20% faster roll-off than Blackman.
Blackman has a better stopband attenuation (−74 dB) than Hamming (−53 dB).
Blackman has a passband ripple of about 0.02%, while Hamming is typically 0.2%.

Conclusion:
In general, Blackman should be your first choice; a slow roll-off is easier to handle
than poor stopband attenuation.
Designing the Windowed-Sinc Filter
Parameters:
➢Cutoff frequency, 𝑓C
➢Length of the filter kernel, 𝑀 + 1
Value for 𝑀 sets the roll-off:
4
𝐵𝑊tran ≈
𝑀
Both 𝑓C and 𝐵𝑊tran are expressed as
fraction of the sampling rate. Thus, they
M=60
must be between 0 and 0.5.
𝑓C is measured at the one-half amplitude
point.
continued…
Filter Kernel: (Blackman LPF)
𝑀 2𝜋𝑛 4𝜋𝑛
ℎ 𝑛 = 𝐾 sinc 2𝜋𝑓C 𝑛− ∙ 0.42 − 0.5 cos + 0.08 cos
2 𝑀 𝑀
for 0 ≤ 𝑛 ≤ 𝑀
𝐾 is chosen to provide unity gain at zero frequency (normalizing coefficient).
𝑀 must be an even integer.
Example: EEG pattern containing alpha rhythm occurs between 7 and 12 Hz, and
beta rhythm occurs between 17 and 20 Hz. Design a Blackman LPF that can separate
alpha from beta rhythms. The EEG signal was digitized at a sampling rate of 100
sample/second. Set your transition bandwidth at 4 Hz.
Let, 𝑓C = 14 Hz = 0.14 of sampling rate.
Given, 𝐵𝑊tran = 4 Hz = 0.04 of sampling rate.
4 4
∴𝑀= = = 100
𝐵𝑊tran 0.04

𝑀 2𝜋𝑛 4𝜋𝑛
ℎ 𝑛 = 𝐾 sinc 2𝜋𝑓C 𝑛 − ∙ 0.42 − 0.5 cos + 0.08 cos
2 𝑀 𝑀

2𝜋𝑛 4𝜋𝑛
= 𝐾 sinc 0.28𝜋 𝑛 − 50 ∙ 0.42 − 0.5 cos + 0.08 cos
100 100

for 0 ≤ 𝑛 ≤ 100
Kaiser Window
𝛿 = 𝑚𝑖𝑛 𝛿𝑝 , 𝛿𝑠
𝐴 = −20 log10 𝛿
0.1102 𝐴 − 8.7 , 𝐴 > 50
𝛽 = ቐ0.5842 𝐴 − 21 0.4 + 0.07886 𝐴 − 21 , 21 ≤ 𝐴 ≤ 50
0, 𝐴 < 21
𝐴−8
𝑀 = even
2.285 𝜔𝑠 − 𝜔𝑝

• 𝑀 + 1 is the length of the window.


• 𝛽 is the shape parameter.
Large values of 𝛽 result in reduced
ripple.
continued…

2
𝑛 − 0.5𝑀
𝐼0 𝛽 1−
0.5𝑀
𝑤𝑛 =
, 0≤𝑛≤𝑀
𝐼0 (𝛽)
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 James Frederick Kaiser

where 𝐼0 ∙ is the 0th-order modified Bessel function of the 1st kind,


that can be easily generated using:
𝑘=∞
0.5𝑥 𝑘 2
𝐼0 𝑥 = 1 + ෍
𝑘!
𝑘=1
✓A Kaiser Window is nearly optimum in the sense of having the most energy in its
main-lobe for a given side-lobe amplitude.
Example: Design an FIR LPF using Kaiser window according to the
following specifications
0.99 ≤ 𝐻 𝑒 𝑗𝜔 ≤ 1.01 0 ≤ 𝜔 ≤ 0.19𝜋
𝐻 𝑒 𝑗𝜔 ≤ 0.01 0.21𝜋 ≤ 𝜔 ≤ 𝜋
Solve:
𝛿 = 𝑚𝑖𝑛 𝛿𝑝 , 𝛿𝑠 = 𝑚𝑖𝑛 0.01,0.01 = 0.01
𝐴 = −20 log10 𝛿 = −20 log10 0.01 = 40
𝛽 = 0.5842 𝐴 − 21 0.4 + 0.07886 𝐴 − 21 = 0.5842 19 0.4 + 0.07886 19
⟹ 𝛽 = 3.395
𝐴−8 40 − 8
𝑀 = even = even
2.285 𝜔𝑠 − 𝜔𝑝 2.285 0.21𝜋 − 0.19𝜋
= even 222.8 = 224
continued…

2
𝑛 − 0.5𝑀
𝐼0 𝛽 1−
0.5𝑀
∴𝑤 𝑛 =
, 0≤𝑛≤𝑀
𝐼0 (𝛽)
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝐼0 0.0304 224𝑛 − 𝑛2
⟹𝑤 𝑛 =൞ , 0 ≤ 𝑛 ≤ 224
𝐼0 (3.395)
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
∴ ℎ 𝑛 = ℎ𝑑 𝑛 ∙ 𝑤[𝑛]
where ℎ𝑑 [𝑛] = 𝐾 sinc 0.2𝜋 𝑛 − 112
𝜔𝑝 + 𝜔𝑠 0.19𝜋 + 0.21𝜋
𝜔𝐶 = =
2 2
⟹ 𝜔𝐶 = 0.2𝜋
IIR (Recursive) Filter
𝑦 𝑛 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 + 𝑏2 𝑥 𝑛 − 2 + 𝑏3 𝑥 𝑛 − 3 + ⋯
+𝑎1 𝑦 𝑛 − 1 + 𝑎2 𝑦 𝑛 − 2 + 𝑎3 𝑦 𝑛 − 3 + ⋯
𝑎1 , 𝑎2 , 𝑎3 , … , 𝑏0 , 𝑏1 , 𝑏2 , 𝑏3 , … are called Recursion Coefficients.
IIR filters execute very rapidly, but 3-stage Recursive Filter
have less performance and flexibility
than other digital filters.
In theory, recursive filter convolves
the input signal with a very long filter
kernel; although only a few
coefficients are involved.
Single Pole Recursive Filter
LPF HPF

Proper coefficient selection can also make the digital


recursive filter mimic an analog RC HPF or LPF.
continued…
Coefficient Selection:
(Single Pole IIR Filter) • Physically, 𝐾 is the amount of decay
➢LPF: between adjacent samples.
𝑏0 = 1 − 𝐾 • For example, 𝐾 = 0.87 means that the value
𝑎1 = 𝐾 of each sample in the output signal is 0.87
➢HPF: the value of the sample before it.
1+𝐾 • The higher the value of 𝐾, the slower the
𝑏0 =
2 decay.
1+𝐾 • 0<𝐾<1
𝑏1 = −
2 • 𝐾 = 𝑒 −2𝜋𝑓C , where 𝑓C = −3 dB cutoff frequency.
𝑎1 = 𝐾
continued…
❑Single Pole Recursive Filter in action:
𝐾 = 0.95 (for LPF), 𝐾 = 0.86 (for HPF)

Remember: Single Pole Recursive Filter performs well in the time-domain, and poorly in the
frequency-domain. Performance at higher 𝑓C (with respect to sampling rate) is terrible!
Special: 4-stage Recursive LPF
[comparable to the Blackman, but faster]
Coefficient Selection:
𝑏0 = 1 − 𝐾 4
𝑎1 = 4𝐾
𝑎2 = −6𝐾 2
𝑎3 = 4𝐾 3
𝑎4 = −𝐾 4
where 𝐾 = 𝑒 −14.445𝑓C
Narrow-band Filters
Band-Pass Filter Band-Reject Filter
𝑏0 = 1 − 𝐾1 𝑏0 = 𝐾1
𝑏1 = 2 𝐾1 − 𝐾2 cos 2𝜋𝑓 𝑏1 = −2𝐾1 cos 2𝜋𝑓
𝑏2 = 𝐾2 2 − 𝐾1 𝑏2 = 𝐾1
𝑎1 = 2𝐾2 cos 2𝜋𝑓 𝑎1 = 2𝐾2 cos 2𝜋𝑓
where 𝐾2 = 1 − 3 𝐵𝑊 ;
𝑎2 = −𝐾2 2 𝑎2 = −𝐾2 2
1 − 2𝐾2 cos 2𝜋𝑓 + 𝐾2 2
𝐾1 =
2 − 2 cos 2𝜋𝑓

𝑓 =center frequency
𝐵𝑊 =bandwidth measured
at 0.707 amplitude
[both expressed as fraction of
sampling frequency]
Phase Response

• What is so wrong with nonlinear phase? Many applications cannot tolerate the left and
right edges looking different. This can be misinterpreted as a feature (terrible)!!!
• ℎ[𝑛] of recursive filter is not symmetrical between left and right, therefore has a
nonlinear phase.

You might also like