Digital Filter Design
Digital Filter Design
𝒃𝒊 filter coefficients,
The transfer function of the FIR filter: K+1 filter length
Symmetric
• To obtain causal FIR filter, h(n) is delayed by M samples.
Where,
Ideal Impulse Responses for Standard FIR Filters
Example FIR Low Pass Filter Design
a. Design a 3-tap FIR LPF with cut-off frequency of 800 Hz and a sampling rate of 8,000 Hz using the Fourier transform method.
b. Determine the transfer function and difference equation of the designed FIR system.
π π 3π
c. Compute and plot the magnitude frequency response for Ω = 0, 4 , 2 , and π radians.
4
Solution
Normalized cut-off frequency
3-tap filter 2𝑀 + 1 = 3 𝑀=1 ℎ 𝑛 𝑓𝑜𝑟 𝑛 𝑓𝑟𝑜𝑚 − 𝑀 𝑡𝑜 𝑀 𝑛 = −1, 0, 1,
Using symmetry
Delaying h(n) by
M = 1 sample
Example - Contd.
b. The transfer function: Causal FIR filter coefficients
inverse z-transform
difference equation
c. The magnitude frequency response and phase response
Substituting
in 𝐻(𝑧)
Factoring term
M=8 samples
delay
Nonlinear Phase
Input:
Linear phase filter output:
90 degree Non-linear phase filter output:
Input:
Solution:
normalized cut-off
frequencies
𝑴=𝟐
5-tap FIR 2M + 1 = 5 then M=2
𝑆𝑦𝑚𝑚𝑒𝑡𝑟𝑦
Example: Window Method –contd
Hamming
window
function 𝑆𝑦𝑚𝑚𝑒𝑡𝑟𝑦
Windowed
impulse
response
Solution:
Choose nearest higher odd N = 25
Application: Noise Reduction
We can design a digital filter to remove frequency components (noise) other than the desired frequency range.
Application: Noise Reduction –contd.
Frequency Sampling Design Method
Simple to design
The key feature of frequency sampling is that the filter coefficients can be calculated based on the specified magnitudes of the
desired filter frequency response uniformly in the frequency domain.
𝐻𝑘 are obtained from sampled desired
frequency response at equally spaced instants
Filter length = 2M+1 in frequency domain
𝑁 = 2𝑀 + 1 = 7 ⟶ 𝑀 = 3,
Example 25-Tap FIR filter, 8 bit code (sign + 7 bits for fraction Error is bounded by (less than)
−𝐵
𝐾 + 1 25
Let infinite precision coeff. = 0.00759455135346 𝐾+1 2 = = 7 = 0.0977
2𝐵 2
0.00759455135346 × 27 = 0.9721 ≅ 1 (rounded up to the integer)
Quantized coeff. = 1 27 = 0.0078125