DSP Slide IV
DSP Slide IV
▪ A filter is one in which rejects unwanted frequencies and allow the desired
frequencies.
▪ Based on the magnitude spectrum, filters are classified as lowpass, high
pass , band pass and band reject filters.
In the passband:
In the stopband:
▪ In practice, we cannot implement filter characteristics with abrupt
transitions
E.g. the impulse response of ideal low pass filter is sinc(t), which is non-
causal.
▪ The problem of obtaining a realizable transfer function given the
specifications is approximation.
2
As n gets larger 𝐻(𝑗𝜔) approaches
ideal LP
y(n)=σ∞
𝑘=0 ℎ 𝑘 𝑥(𝑛 − 𝑘) Infinite impulse response (IIR)
y(n)=σ𝑁−1
𝑘=0 ℎ 𝑘 𝑥(𝑛 − 𝑘) Finite impulse response (FIR)
𝑁−1
σ𝑁
𝑘=0 𝑏𝑘 𝑧
−𝑘
𝐻 𝑧 = IIR transfer function Rational function
1 + σ𝑀
𝑘=1 𝑎𝑘 𝑧
−𝑘
E.g system described by 𝑦(𝑛) = 𝑥(𝑛) + 𝑥(𝑛 − 1), ℎ(𝑛) = {1,1} is FIR filter
and 𝑦 𝑛 = 𝑦 𝑛 − 1 + 𝑥 𝑛 , ℎ 𝑛 = 𝑢 𝑛 is IIR filter.
FIR IIR
▪ Polynomial system function ▪ Rational system function
▪ Zeros ▪ Poles + zeros
▪ Stable ▪Stable/unstable
▪ Easy to get linear phase ▪ Hard to control phase
▪High order (20 - 2000) ▪ Low order (4-20)
▪ Unrelated to analog filter ▪Designed on the basis of analog filter
where, h(k); k=0,1,…, N-1 are the impulse response coefficients of the filter.
• Filter order= N-1.
• Filter Length= N
FIR filters can have an exactly linear phase response
For symmetric and anti symmetric FIR filters; the condition for linear phase is
ℎ 𝑛 = ±ℎ 𝑁 − 1 − 𝑛 , 𝑛 = 0,1,2, … , 𝑁 − 1
1. Window method
2. Frequency sampling method
3. Optimal filter design method
Hamming 2𝜋𝑛
0.5 − 0.5cos( )
𝑁
2𝜋
𝜋 5 2𝜋𝑛
1 1 𝑠𝑖𝑛
ℎ𝑑 𝑛 = න 𝐻𝑑 𝜔 𝑒 −𝑗𝜔𝑛 𝑑𝜔 = න 1𝑒 −𝑗𝜔𝑛 𝑑𝜔 = 5
2𝜋 2𝜋 𝜋𝑛
−𝜋 2𝜋
−5
2𝜋
5
1 0
1 2𝜋
ℎ𝑑 0 = න 1. 𝑒 𝑑𝜔 = 2 = 0.4
2𝜋 2𝜋 5
−2𝜋
5
2𝜋
𝑠𝑖𝑛 𝑛 1, 0,1, … , 6
5 ,𝑛 ≠ 0 Take 𝑊𝑅 𝑛 = ቊ
∴ ℎ𝑑 𝑛 = 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝜋𝑛
0. 4 ,𝑛 = 0
ℎ𝑑 𝑛 , 𝑛 = 0,1, … , 6
ℎ 𝑛 =ቊ
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
2𝜋 2𝜋
sin 1 sin 2
5 5
ℎ 1 = = 0.302 ℎ 2 = = 0.093
𝜋(1) 𝜋(2)
2𝜋 2𝜋
sin 3 sin 4
5 5
ℎ 3 = = −0.062 ℎ 4 = = −0.075
𝜋(3) 𝜋(4)
2𝜋
sin 6
5
ℎ 6 = = 0.05
𝜋(6)
❖ The popular methods of IIR filter design uses the technique of first designing in
analog domain and then transforming the analog filter into an equivalent digital IIR
filter .
Why Transform to Analog IIR Filter Design?
▪ Analog approximation techniques are highly advanced
▪ Many analog filter design methods have relatively closed-form design formulas.
▪ Extensive tables are available for analog filter design
Transformation Techniques
1. A set of specs for the digital (discrete-time) filter is given.
2. Transform the specs from the D.T. to C.T. (z → s)
3. Design a C.T. IIR filter : H (s )
a
4. s → z H a (s) → H ( z )
2. jΏ axis in the s-plane (CT) needs to be transformed to the unit circle in the z-
domain.
3. LHP in the s-domain is mapped into inside the unit circle in the z-domain.
Analog to Digital filter transformation methods
Approximation of Derivatives
Impulse Invariance transformation
✓Bilinear Transformation(best)
Bilinear Transformation
▪ The bilinear transformation yields stable digital filters from stable analogue
filters
▪ Bilinear transformation avoids the problem of aliasing encountered with the use
of the impulse invariant transformation, because it maps the entire imaginary axis
in the s-plane on to the unit circle in the z-plane.
2
𝑠𝑇 𝑠𝑇 1 𝑠𝑇 𝑠𝑇
𝑒2 1+ + +⋯ 1+
𝑧 = 𝑒 𝑠𝑇 = = 2 2! 2 ≅ 2
−𝑠𝑇
𝑠𝑇 1 𝑠𝑇 2 𝑠𝑇
𝑒 2 1− + +⋯ 1 −
2 2! 2 2
2 𝑧−1
∴ 𝑠=
𝑇 𝑧+1
2 𝑟𝑒 𝑗𝜔 −1 2 𝑟𝑒 𝑗𝜔 −1 𝑟𝑒 𝑗𝜔 +1
𝑝𝑢𝑡 𝑧 = 𝑟𝑒 𝑗𝜔 𝑠 = =
𝑇 𝑟𝑒 𝑗𝜔 +1 𝑇 𝑟𝑒 𝑗𝜔 +1 𝑟𝑒 𝑗𝜔 +1
2 𝑟 2 −1 2𝑟𝑠𝑖𝑛𝜔
= + 𝑗 Since 𝑠 = 𝜎 + 𝑗Ω
𝑇 1+𝑟 2 +2𝑟𝑐𝑜𝑠𝜔 1+𝑟 2 +2𝑟𝑐𝑜𝑠𝜔
2 𝑟 2 −1 2 2𝑟𝑠𝑖𝑛𝜔
𝜎= ,Ω = ( )
𝑇 1+𝑟 2 +2𝑟𝑐𝑜𝑠𝜔 𝑇 1+𝑟 2 +2𝑟𝑐𝑜𝑠𝜔
Observation
3𝑠
𝐻𝑎 𝑠 =
𝑠 2 +0.5𝑠+2
1
Normalized 1st order Butterworth filter H s =
s+1
The high pass filter for ΩC=ΩP=7265 rad/sec can be obtained by using the
transformation