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 21
ICT3105: DSP• Digital Filters
Design Procedure
•
To fully design and implement a filter five steps are required:
(1)
Filter specification.
(2)
Coefficient calculation.
(3)
Structure selection.
(4)
Simulation (optional).
Lecture 21
ICT3105: DSPLecture 21
ICT3105: DSP• Digital Filters
• The finite word-length effect is the deviation of FIR filter characteristic. If such
characteristic still meets the filter specifications, the finite word-length effects are
negligible. As a result of greater error in coefficients representation, the finite word-length
effects are more prominent in fixed-point arithmetic.
• These effects are more prominent for IIR filters for their feedback property than for FIR
filters. In addition, coefficient representation can cause IIR filters to become instable,
whereas it cannot affect FIR filters that way.
• FIR filters keep their linear phase characteristic after quantization. Because the coefficients
of a FIR filter with linear phase characteristic are symmetric, which means that the
corresponding pairs of coefficients will be quantized to the same value. It results in the
impulse response symmetry remaining unchanged.
• Finite word length causes some problems such as: Coefficient quantization errors; Sample
quantization errors (quantization noise); and Overflow errors.
Lecture 21
ICT3105: DSP• Digital Filters
5 main stages of IIR filter design:
Stage 1: Filter Specification
Designer gives the function of the filter (e.g. lowpass) and the desired performance.
Stage 2: Approximation or Coefficient Calculation
The selection method to calculate the coefficients such that the specs in stage 1 are
satisfied.
Stage 3: Realisation
Converting of the transfer function into a suitable filter structure
Stage 4: Finite Wordlength Effects
Analysis of errors that will occur due to working with finite number of bits
Stage 5: Implementation
Lecture 21
ICT3105: DSP• Digital Filters
As with most other engineering problems, the design of the digital IIR filter starts with an
explicit specification of the performance requirements. This includes:
1. Signal characteristics
Types of signal source and sink I/O interface, data rates and wordlengths
2. Frequency response characteristics
Desired amplitude, phase and tolerances Speed of operation
3. Manner of implementation
High level language routine in a computer, or DSP-based system
Choice of signal processor, Modes of filtering (real-time or batch)
4. Other design constraints
Cost
Permissible signal degradation through the filter
Lecture 21
ICT3105: DSP• Digital Filters
• For frequency selective filters, such as low-pass and band-pass filters, the frequency
Lecture 21
ICT3105: DSP• Design of IIR Filter
Notes for the tolerance scheme of
a filter:
• IIR filter: passband ripple is the
difference btw. the minimum and
maximum deviation in the
passband.
• FIR filter: passband ripple is the
difference btw. the ideal response
and the maximum (or minimum)
deviation in the passband.
• Thus, for IIR, when we say
passband ripple, what is meant is
Lecture 21
ICT3105: DSP• Design of IIR Filter
• There are two different methods available for calculating the coefficients:
- Direct placement of poles and zeros
- Matched z-transform
- Using analogue filter design
Impulse invariant, Bilinear z-transform
Coefficient Calculation - Step 2
• This is one of the simplest method.
• There is a rich collection of prototype analogue filters with well-established analysis
methods.
• The method involves designing an analogue filter and then transforming it to a digital
filter.
Lecture 21
ICT3105: DSP• Design of IIR Filter
• Placing a zero near or on the unit circle in the z-plane will minimize the transfer function at
this point.
• Because when a zero is placed at a given point on the z-plane, the frequency response will
be zero at the corresponding point.
• Placing a pole near or on the unit circle in the z-plane will maximize the transfer function at
this point.
• Because when a pole is placed at a given point on the z-plane, the frequency response will
be a peak at the corresponding point.
• To obtain real coefficients the poles and zeros must either be real or occur in complex
conjugate pairs.
Lecture 21
ICT3105: DSP• Design of IIR Filter
• Zeros that are close to or on the circle produce troughs or minima.
• Poles that are close to the unit circle give rise to large peaks.
• Thus, by strategically placing poles and zeros on the z-plane, we can obtain simple lowpass,
Realization Structures - Step 3
• Direct Form I:
•
Difference equation:
•
This leads to the following structure…
Lecture 21
ICT3105: DSPRealization Structures - Step 3
•
Direct Form I:
Lecture 21
ICT3105: DSPRealization Structures - Step 3
•
Direct Form II canonic realization:
Lecture 21
ICT3105: DSPLecture 21
ICT3105: DSP• Design of IIR Filter
Example:
A bandpass digital filter is required to meet the following specifications:
• Complete signal rejection at DC and 250 Hz
• A narrow passband centered at 125 Hz
• A 3 dB bandwidth of 10 Hz
• Assuming a Sampling Frequency of 500 Hz
Now, obtain:
• Pole-zero diagram, by suitably placing z-plane poles and zeros
• Transfer Function of the filter
• Coefficients
Lecture 21
ICT3105: DSP• Design of IIR Filter
• First: Location of the poles and zeros on the z-plane?
• Since a complete rejection is required at 0 and 250 Hz, we need to place zeros at the
corresponding points on the z-plane.
• Angles of the zeros on the unit circle are:
[ θ = 2πf / F
s]
• To have a passband at 125 Hz requires us to place poles. Now locations of poles on the unit
circle are:
• NB. Since this falls on the imaginary axis, to ensure that the coefficients are real, it is
Lecture 21
ICT3105: DSPLecture 21
ICT3105: DSP• Design of IIR Filter
-Lecture 21
ICT3105: DSPLecture 21
ICT3105: DSP• Design of IIR Filter
• Practical example of the bilinear transform method:
– The design of a digital filter to approximate a second order low-pass
analogue filter is required.
– The transfer function that describes the analogue filter is (This is an analog
BUTTERWORTH filter):
– The digital filter is required to have:
• Cut-off frequency =100 Hz
• Sampling frequency of 1 kHz.
Lecture 21
ICT3105: DSP• Design of IIR Filter
Design a digital equivalent of a 2
ndorder Butterworth LP filter with a cut-off freq
fc=100 Hz, Sampling frequency fs=1000 Hz.
The normalized cut off frequency of the digital filter
ω=2πf
c/f
s=2πf
c100/1000=0.628
Now equivalent analog filter cut-off freq
Ω=ktan(ω/2)= 1.tan(0.628/2)=0.325 rads/sec
Example: Design of a LP filter design using Bilinear Transformation
• H(s) for a Butterworth filter
Lecture 21
ICT3105: DSP• Design of IIR Filter
• Now convert the analog filter H(s) into equivalent digital filter H(z) by applying the bilinear