DSP 1
DSP 1
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…
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.
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 …]
Let, 𝑦 𝑛 = 𝑇 𝑥 𝑛 = 𝑥 3𝑛
x[n] = [… 2 4 3 8 6 4 2 1 4 9 5 9 7 …]
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.
𝑦[𝑛] ≤ 𝑥 𝑘 ℎ 𝑛−𝑘
𝑘=−∞ 𝑘=∞
⟹ 𝑦[𝑛] ≤ 𝐵𝑥 ℎ 𝑛 − 𝑘
𝑘=−∞
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
∆ ∆
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.
∴ 𝑦ℎ 𝑛 = (−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
7 4 6
7 4 6
continued…
Normalized Correlation Sequence
𝑟𝑥𝑥 [𝑛]
𝜌𝑥𝑥 [𝑛] =
𝑟𝑥𝑥 [0]
𝑟𝑥𝑦 [𝑛]
𝜌𝑥𝑦 𝑛 =
𝑟𝑥𝑥 0 ∙ 𝑟𝑦𝑦 [0]
𝑋 𝑒 𝑗𝜔 = 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=−∞
𝑋 𝑒 𝑗𝜔 is a continuous function of ω, where ω = ΩTs.
𝑋 𝑒 𝑗𝜔 is periodic with period of 2π.
𝑋 𝑒 𝑗𝜔 = 𝑋 𝑒 𝑗(𝜔+2𝜋𝑘) where k is any integer
𝜋 𝑛=∞
1
𝑥𝑛 = න 𝑋 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔 𝑋 𝑒 𝑗𝜔 = 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
2𝜋 −𝜋
𝑛=−∞
continued…
δ[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
𝑋 𝑘 = 𝑥[𝑛]𝑒 −𝑗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 ]
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 𝜃 = ∡𝑧
𝑛=∞ 𝑛=∞
𝑋(𝑧) ≤ 𝑥 𝑛 𝑟 −𝑛 + 𝑥[𝑛]𝑟 −𝑛
𝑛=−∞ 𝑛=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
(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 ].
• 𝑋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
−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:
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
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
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
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…
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 𝜔𝑠 − 𝜔𝑝
2
𝑛 − 0.5𝑀
𝐼0 𝛽 1−
0.5𝑀
𝑤𝑛 =
, 0≤𝑛≤𝑀
𝐼0 (𝛽)
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 James Frederick Kaiser
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
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.