𝑦 𝑛 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥 𝑛 − 1 + ⋯ + 𝑏𝑀 𝑥[𝑛 − 𝑀]
𝑀
= 𝑏𝑘 𝑥[𝑛 − 𝑘]
𝑘=0
𝑎𝑘 𝑦 𝑛 − 𝑘 = 𝑏𝑘 𝑥[𝑛 − 𝑘]
𝑘=0 𝑘=0
– Windowing technique
– Frequency Sampling technique
– Optimum technique
• In this module, only windowing technique will be discussed. Thus
the following pages are discussing the windowing technique.
Windowing Technique
• For IIR filter design based on bilinear transformation, the filter is
design based on established analog filter such as Butterworth and
Chebyshev filter.
• In contrast, designing FIR filter based on windowing technique is
basically done by truncating ideal filter which is an IIR type (filter
length = ∞) into FIR type. The truncation process is done at time-
domain.
• The result of the truncation process is an even impulse response.
Thus, delay is applied to solve the non-causality of the even impulse
response.
• DTFT is then use to analyze the frequency response characteristic of
the filter such as ripple and transformation bandwidth.
Frequency Response
• 𝐻 𝜔𝑐 = 0.5
𝜔𝑝 +𝜔𝑠
• 𝜔𝑐 =
2
Filter Design Procedure (Step 1)
Step 1
• Determine filter characteristic (𝜔𝑝 , 𝜔𝑠 , 𝜔𝑐 , 𝑀, window function)
1 𝑓𝑜𝑟 𝜔 ≤ 𝜔𝑐
• 𝐻𝑑 𝜔 = ቊ
0 𝑓𝑜𝑟 𝜔𝑐 < |𝜔| ≤ 𝜋
1 𝜋
• ℎ𝑑 𝑛 = −𝜋 𝐻𝑑 𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔
2
sin 𝜔𝑐 𝑛
𝑓𝑜𝑟 𝑛≠0
• = ቐ 𝜔𝜋𝑛𝑐
𝑓𝑜𝑟 𝑛=0
𝜋
Filter Design Procedure (Step 2)
𝜔𝑐 𝜔𝑐 𝑛
ℎ𝑑 𝑛 = 𝑠𝑖𝑛𝑐
𝜋 𝜋
ωc/π
n
-∞ ∞
Filter Design Procedure (Step 3)
Step 3
• Multiply ℎ𝑑 𝑛 with the chosen window function 𝑤[𝑛].
• This is to reduce the infinite length of signal ℎ𝑑 𝑛 into finite as this
is an FIR filter. Hence, the length of the FIR filter will equals to the
length of the window function.
• Thus the filter length, 𝑁 is equals to 𝑀 + 1 where 𝑀 is the filter
order.
Filter Design Procedure (Step 4)
Step 4
• Delay ℎ[𝑛] with 𝑛𝑑 to obtain a causal impulse response (ℎ 𝑛 = 0
for 𝑛 < 0)
• 𝑛𝑑 can be computed as follow
𝑀
• 𝑛𝑑 =
2
𝑀
• ℎ 𝑛 = ℎ𝑑 𝑛 − .𝑤 𝑛
2
Simplified Steps
• STEP 1: Find cutoff frequency, 𝜔𝑐 .
• STEP 2: Choose order-𝑀 window function, 𝑤 𝑛 based on the
specified filter characteristics. Refer next slide for the list of
the window functions.
• STEP 3: Solve the impulse response,
𝜔𝑐 𝜔𝑐
ℎ𝑛 = 𝑠𝑖𝑛𝑐 𝑛 − 𝑀/2 .𝑤 𝑛 𝑓𝑜𝑟 0 ≤ 𝑛 ≤ 𝑀
𝜋 𝜋
Window Function
Below are few of the window functions with length of 𝑁 (order of 𝑀)
𝑅𝑒𝑐𝑡𝑎𝑛𝑔𝑢𝑙𝑎𝑟: 𝑤 𝑛 = 1, 0≤𝑛≤𝑁−1
2𝜋𝑛
𝐻𝑎𝑚𝑚𝑖𝑛𝑔: 𝑤 𝑛 = 0.54 − 0.46𝑐𝑜𝑠 , 0≤𝑛 ≤𝑁−1
𝑀
1 2𝜋𝑛
𝐻𝑎𝑛𝑛𝑖𝑛𝑔: 𝑤𝑛 = 1 − 𝑐𝑜𝑠 , 0≤𝑛≤𝑁−1
2 𝑀
2𝜋𝑛 4𝜋𝑛
𝐵𝑙𝑎𝑐𝑘𝑚𝑎𝑛: 𝑤 𝑛 = 0.42 − 0.5𝑐𝑜𝑠 − 0.08𝑐𝑜𝑠 ,… 0≤𝑛≤𝑁−1
𝑀 𝑀
Window Function
• Below is the plot of the window function
Rectangular Hamming
Hanning
Blackman
0 𝑀
Window Function
• Ripple and bandwidth of the FIR filter depend on the window
function. The ripple 𝛿 and transition bandwidth ∆𝜔 for several
window functions are listed in table below
Solution
Step 1: Find cutoff frequency. From the question, 𝜔𝑐 = 0.5𝜋 𝑟𝑎𝑑,
𝑀 = 20.
0.5𝜋 0.5𝜋 20
= 𝑠𝑖𝑛𝑐 𝑛− .𝑤 𝑛
𝜋 𝜋 2
= 0.5𝑠𝑖𝑛𝑐 0.5 𝑛 − 10 . 𝑤 𝑛
Hamming Blackman
Example 1 (cont.)
The magnitude spectrum and magnitude dB of these filters are shown
in the following figures.
𝜔(𝜋 𝑟𝑎𝑑)
Example 1 (cont.)
𝜔(𝜋 𝑟𝑎𝑑)
Example 2
Design an FIR lowpass filter based on rectangular window with filter
characteristic below
𝜔𝑝 = 0.2𝜋, 𝜔𝑠 = 0.4𝜋
Solution
Step 1: Find cutoff frequency, 𝜔𝑐 .
0.2𝜋+0.4𝜋
𝜔𝑐 = = 0.3𝜋
2
0.3𝜋 0.3𝜋 9
= 𝑠𝑖𝑛𝑐 𝑛−
𝜋 𝜋 2
𝑛 𝜔(𝜋 𝑟𝑎𝑑)
𝜔(𝜋 𝑟𝑎𝑑)
Quiz 1
• Design an FIR lowpass filter with below specifications based on
windowing technique:
𝛿 = 0.007
∆𝜔 = 0.6𝜋
𝑀 ≤ 12
𝜔𝑐 = 1.5708
References
1) John G. Proakis, Dimitris K Manolakis, “Digital Signal Processing:
Principle, Algorithm and Applications”, Prentice-Hall, 4th edition
(2006).
2) Sanjit K. Mitra, “Digital Signal Processing-A Computer Based
Approach”, McGraw-Hill Companies, 3rd edition (2005).
3) Alan V. Oppenheim, Ronald W. Schafer, “Discrete-Time Signal
Processing”, Prentice-Hall, 3rd edition (2009).