0% found this document useful (0 votes)
181 views

Finite Impulse Response (FIR) Filter: Dr. Dur-e-Shahwar Kundi Lec-7

The document discusses the design process for digital filters. It involves 5 steps: 1) specifying filter requirements, 2) calculating filter coefficients, 3) realizing the filter structure, 4) analyzing finite word length effects, and 5) implementing in software/hardware. It describes methods for calculating FIR and IIR filter coefficients, including the window method, frequency sampling, and optimal methods for FIR filters and impulse invariant, bilinear transformation, and pole-zero placement for IIR filters. The document uses examples to demonstrate analyzing the frequency response of designed filters and realizing FIR filters using the window method.

Uploaded by

UsamaKhalid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
181 views

Finite Impulse Response (FIR) Filter: Dr. Dur-e-Shahwar Kundi Lec-7

The document discusses the design process for digital filters. It involves 5 steps: 1) specifying filter requirements, 2) calculating filter coefficients, 3) realizing the filter structure, 4) analyzing finite word length effects, and 5) implementing in software/hardware. It describes methods for calculating FIR and IIR filter coefficients, including the window method, frequency sampling, and optimal methods for FIR filters and impulse invariant, bilinear transformation, and pole-zero placement for IIR filters. The document uses examples to demonstrate analyzing the frequency response of designed filters and realizing FIR filters using the window method.

Uploaded by

UsamaKhalid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Finite Impulse Response (FIR)

Filter
Dr. Dur-e-Shahwar Kundi
Lec-7
Filter Design Steps
The design of digital filter involves five steps:
• Specification of filter requirements.
• Calculation of suitable filter coefficients.
• Realization of filter by a suitable structure.
• Analysis of effects of finite word length on filter performance
• Implementation of filter in software or hardware
Specification of Filter Requirement
• The amplitude-frequency response of FIR/IIR filter is specified in
the form of tolerance scheme.

• Figure depicts the tolerance


scheme for lowpass filter.
– δp : Peak passband deviation
– δs : Peak stopband deviation
– fp : Passband edge frequency
– fs : Stopband edge frequency

• The width of transition band


determines how sharp the filter is.
Specification of Filter Requirement
• Figure depicts the tolerance scheme for bandpass filter. Following
parameters are of interest:
– δp : Peak passband deviation (ripples)
– δs : Peak stopband deviation
– fp1 & fp2 : Passband edge frequencies
– fs1 & fs2 : Stopband edge frequencies
• The width of transition band determines how sharp the filter is

4
Example:
Solution:
Coefficient Calculation
• Select one of approximation methods to calculate
coefficient values:
– h(k) for FIR
– ak and bk for IIR

• Methods to calculate FIR coefficients:


– Window method (simple & flexible)
– Frequency Sampling (recursive realization but lacks flexibility)
– Optimal (efficient & easy to use)

• Methods to calculate IIR coefficients:


– Impulse Invariant
– Bilinear Transformation
– pole-zero placement
Filter Design
Frequency
Response
Magnitude/Phase
Analysis of
Designed Filter
Stability, Filter
Realizations
Filter
IIR (Bilinear
Method)
Designing of New
Filter
FIR (Window
Method)
Analysis of Designed Filter
Digital Filter Frequency Response:
• Using the Laplace transfer function, we can
achieve the analog filter steady-state
frequency response H( jω) by substituting s=
jω into the transfer function H(s). i.e.

• Then |H( jω)| gives the magnitude frequency


response and H( jω) the phase response of
analog filter.
• Similarly, in a DSP system, we substitute
into z-transfer function H(z) to
acquire the digital frequency response.

• Then |H(ejωT)| will gives the magnitude


frequency response and |H(ejωT)| phase
response of digital filter.
• Let us introduce normalized digital frequency
in radians in digital domain as follows

• Then the digital frequency response will be


represented as
Example 6.10: (Li Tan Pg:183)
• Given the following difference equation of Filter system with
a sampling rate of 8,000 Hz, Determine the frequency
response of the given FIR filter.
y(n)=0.5x(n) + 0.5x(n-1)

1. First convert the given filter equation into H(z)

2. Then substitute
• Then magnitude and phase response will be

• Calculate several point as follows


• Plot of frequency response
Example 6.11: (Li Tan Pg:186)
• Given the following difference equation of
Filter system with a sampling rate of 8,000
Hz, Determine the frequency response of the
given IIR filter.
y(n)=x(n) - 0.5y(n-1)
Designing of FIR Filter
window method
• We start from the ideal frequency response of the
filter i.e. HD(ω).
• Taking the Laplace inverse, we will get its ideal
impulse response i.e. hD(n) as shown
Summary of Ideal Impulse Response
for FIR Filter
• If we observe hD(n), it decreases if we move away
from n=0 and continuous to n=±ꝏ, thus resulting
filter is not FIR.
• Ideal solution is to truncate the hD(n)=0 for n>M, i.e.
multiplying it with suitable window function w(n)
having finite duration.
• Therefore final desired filter h(n) will be obtained as
follows

h(n)= hD(n) × w(n)


Summary of common window
function
Further Kaiser Window
Parameters:
Example:
Solution:
• Step1: Identify the ideal impulse response of desired Filter i.e.
Lowpass

• Step2: Based on the stopband attenuation (A) select an


appropriate window function w(n) i.e. Hamming, Blackman,
Kaiser satisfy the A > 50dB.
• Step3: Finding the value of “N” based on the normalized
transition width (∆f) i.e.
∆f =3.3/N (from widow function)
0.5KHz/8KHz =3.3/N
N= 52.8 = 53

• Step4: As the impulse response of the filter is symmetric


about the origin so the number of impulses “n” ranges
-[(N-1)/2] ≤ n ≤ +[(N-1)/2]
-26 ≤ n ≤ +26

• Step5: Defining the cutoff Frequency for h(n) i.e. fc’


fc’ = fc + ∆f/2
= 1.5KHz + (0.5KHz/2)
= 1.75 KHz / 8 KHz (normalized)
= 0.21875
• Step6: As we know that h(n) is symmetric so we need to
compute the impulse response for positive values of “n” i.e. n
= 0, 1,2, …… 26 and use symmetry property to obtain other
coefficients h(-1)=h(1), h(-2)=h(2) and so on
• Step7: As we note that indices of filter run from -26 to 26. To
make filter causal we add 26 to each index so that it starts
from zero. The resulting filter coefficient with indices adjusted
are
• Final filter equation:

h(n) = b0 x(n)+ b1 x(n-1) + b2 x(n-2) +………+ b26 x(n-26)+……..+


b51 x(n-51)+ b52 x(n-52)

H(z) = b0 z-0 + b1 z-1 + b2 z-2 +………+ b26 z-26 +……..+ b51 z-51 +
b52 z-52
Example:
Fourier Transform Method
• An ideal lowpass filter with a normalized cutoff frequency Ωc,
whose magnitude frequency response in terms of the
normalized digital frequency Ω is characterized and plotted.

• The frequency response is periodic with a period of Ω=2π


radians
• The periodic frequency response can be
approximated using a complex Fourier series
expansion in terms of the normalized digital
frequency Ω

• Fourier coefficients are given by

• The fundamental frequency


• Substituting ω0 = 1 and cn = h(n) called the desired
impulse response of the ideal filter, we obtain the
Fourier transform design as

• If we substitute ejΩ = z and ω0 = 1 into Equation of it


will yield a z-transfer function
• The desired impulse response approximation of the
ideal lowpass filter is solved as
• The FIR filter design must first be completed by
truncating the infinite-length sequence h(n) to
achieve the 2M+1 dominant coefficients using the
coefficient symmetry

• For Causal FIR filter

• Delay operation is given by


Summary of Ideal Impulse Response
for FIR Filter

You might also like