Associate Professor
Dept. of Electrical and Electronic Engineering
University of Dhaka
Dr. Mohammad Junaebur Rashid (JR)
ICT3105
:
Digital Signal Processing
(3.0 Cr)
Course Teacher
Bangladesh University of Professionals
Lecture 23
ICT3105: DSPDesign of FIR Filter
• "FIR" means "Finite Impulse Response".
• Why is the impulse response "finite" ?
- Because there is no feedback in the FIR.
- A lack of feedback guarantees that the impulse response will be finite.
Advantages of FIR (compared to IIR) Filters
• Easily be designed to be "linear phase"
– Put simply, linear-phase filters delay the input signal but don’t distort its phase. • Simple to implement.
– On most DSP microprocessors, the FIR calculation can be done by looping a single
instruction.
Lecture 23
ICT3105: DSPDesign of FIR Filter
h(k), k = 0, 1, … , N - 1 are the Impulse Response (coefficients), H(z) is the Transfer Function,
N is the Filter Length (No. of Filter Coefficients) of the filter.
FIR equations
Difference Equation
System function (Transfer function) equation
Linear Phase Response
• "Linear Phase" refers to the condition where the phase response of the filter is a linear
(straight-line) function of frequency (excluding phase wraps at +/- 180 degrees).
• This results in the delay through the filter being the same at all frequencies.
• Therefore, the filter does not cause "phase distortion" or "delay distortion".
• The lack of phase/delay distortion is an advantage of FIR filters over IIR and analogue
Lecture 23
ICT3105: DSPDesign of FIR Filter
Phase Delay and Group delay
• The Phase Delay (Tp) or Group Delay (Tg) of the filter is a measure of how a filter
modifies the phase characteristics of the signal.
• Consider a signal consisting of several frequency components, like: Speech
waveform, or a Modulated signal
• Phase Delay (Tp) =
is the amount of time delay of each frequency component of the signal suffers in
going through the filter.
• Group Delay (Tg) = is the average time delay of all
Lecture 23
ICT3105: DSPDesign of FIR Filter
Problem of non-linear phase filter
• A non-linear phase filter will cause phase distortion in the signal that passes through it.
• This is due to the fact that the frequency components in the signal will each be delayed
by an amount NOT proportional to frequency, hence altering their harmonic
relationship.
• This distortion is extremely undesirable in applications involving: Music, Data
transmission, Video, and Bio-medical applications
• This distortion can be avoided by using filters with linear phase characteristics.
• Non-linear phase filters will distort the audio of AM broadcast signals, blur the edges of
television video images, blunt the sharp edges of received radar pulses, and increase
data errors in digital communication signals.
• None-linear phase filters are also called “minimum phase (*)” * least amount of group
Lecture 23
ICT3105: DSPDesign of FIR Filter
Types of linear phase FIR filters
4 types of linear phase FIR filters
• Type 1 –most versatile
• Type 2 – frequency response is always 0 at ω=π. (not suitable as a high-pass filter)
• Type 3 and 4 – Introduce a π/2 phase shift, frequency response is always 0 at ω=π.
Lecture 23
ICT3105: DSPDesign of FIR Filter
Type 1 and 2 FIR coefficients
• Type-1: Positive symmetry, Odd length of Coefficients
• Example impulse response -
• Type-2: Positive symmetry, Even length of Coefficients
Lecture 23
ICT3105: DSPDesign of FIR Filter
Type 3 and 4 FIR coefficients
Type 3 [Negative Symmetry, Odd Length (Coefficients)]: 90° phase shift
Always zero at f = 0, hence unsuitable as a Low-pass filter.
In addition, always zero at f = 0.5, hence unsuitable as a High-pass filter.
The sample impulse response is given by:
Lecture 23
ICT3105: DSPDesign of FIR Filter
Steps for designing FIR filter
5 Steps:
1. Determine the filter specifications
2. Choose a suitable filter structure
3. Calculate the filter coefficient values
4. Analysis the finite wordlength effect
Lecture 23
ICT3105: DSPDesign of FIR Filter
Lecture 23
ICT3105: DSPDesign of FIR Filter
Tolerance scheme with normalized filter parameters
• passband= 0.18 – 0.33
• transition band= 0.14 – 0.18
and 0.33 – 0.37
• stopband= 0 – 0.14 and 0.37
– 0.5
• stopband deviation, δs= 0.001
• passband deviation, δp= 1.05,
1, 0.95
• 1 + δp= 1.05
Lecture 23
ICT3105: DSPDesign of FIR Filter
Normalized filter parameters
•
passband= 0.18 – 0.33
•
transition band= 0.14 – 0.18 and
0.33 – 0.37
•
stopband= 0 – 0.14 and 0.37 –
0.5
•
stopband deviation, δ
s= 0.001
•
passband deviation, δ
s= 1.05, 1,
0.95
•
1 + δ
p= 1.05
•
1 – δ
p= 0.95
Un-normalized filter parameters
With sampling frequency of 10 kHz:
•
Passband=1.8 - 3.3 kHz
•
Stopband(s)=0 - 1.4 kHz and 3.7 -
5 kHz
•
Stopband Attenuation
(A
s)=-20 log
10δ
s=-20 log
10(0.001)
=60 dB
•
Passband Ripple (A
p)=20 log
10δ
p=20 log
10(1 + 0.05)
Lecture 23
ICT3105: DSPDesign of FIR Filter
Window Method:
• Offers a very simple and flexible way of computing FIR filter coefficients.
• However, does not allow the over the filter parameters. designer adequate control
The Optimal Method
• With efficient and easy-to-use programs it is now widely used in industry.
• For most applications, this method will yield the desired FIR filter.
• Should be the first choice, unless a particular application dictates otherwise, or a CAD
facility is unavailable.
The Frequency Sampling Method
• The main attraction is that it allows for a recursive realization of FIR filters, which can
be computationally very efficient.
Lecture 23
ICT3105: DSPDesign of FIR Filter
Steps of Window method
Step 1: Specify the “ideal” or desired frequency response of the filter, HD(ω).
Step 2: Obtain the IDEAL impulse response, hD(n), of the desired filter by evaluating the
IDFT.
Step 3: Select a window function w(n) that satisfies the passband and stopband
attenuation specifications. Determine the filter length N.
Step 4: Multiply the ideal coefficients by the selected window function to get the filter
Lecture 23
ICT3105: DSPDesign of FIR Filter
Ideal Impulse response for LP Filter
Ideal frequency response for LP
Ideal (infinite)Impulse response for LP
• Note that hD(n) is symmetrical about n = 0 (i.e. hD(n) = hD(-n)), so the filter will have linear
phase response.
• Although hD(n) decreases as we move away from n = 0, the impulse response is infinite in
length (as n = ±∞).