Dire Dawa University
Dire Dawa Institute Of Technology
School Of Electrical & Computer Engineering
Digital filters
Introduction
• A filter is a device or process that removes some unwanted components or
features from a signal.
• Digital filters are a very important part of Digital signal processing (DSP).
• In fact, their extraordinary performance is one of the key reasons that DSP
has become so popular. Filters have two uses:
• Signal separation and
• Signal restoration
2
Signal separation
• Signal separation is needed when a signal has been contaminated with
interference, noise, or other signals.
• For example
• Imagine a device for measuring the electrical activity of a baby's heart while
still in the womb.
• The raw signal will likely be corrupted by the breathing and heartbeat of the
mother.
• A filter might be used to separate these signals so that they can be individually
analyzed.
3
Signal restoration
• Is used when a signal has been distorted in some way.
• For example
• An audio recording made with poor equipment may be filtered to better
represent the sound as it actually occurred.
• Deblurring of an image acquired with an improperly focused lens, or a
shaky camera.
• These problems can be attacked with either analog or digital filters.
Which one is better?
4
Cont.…
• Analog (electronic) filters can be used for these same tasks; however, digital
filters can achieve far superior results.
Digital vs. Analog Filtering
Digital Filters Analog Filters
High Accuracy Less Accuracy
Linear Phase (FIR Filters) Non‐Linear Phase
Flexible Less flexibility
Easy to Simulate and Design Difficult to Simulate and Design
Operates at low frequency Analog Filters required at High Frequencies
Requires High Performance ADC, No ADC, DAC, or DSP required
DAC & DSP Analog filters are cheap, fast, and have a large
Digital filters are superior in the level dynamic range in both amplitude and
of performance that can be achieved. frequency.
The entire transition occurs within only
1 hertz. 5
Digital filters can achieve thousands of times better performance than analog filters.
Digital Filters
Cont.…
7
Cont.…
8
Implementation of Digital filters
• The most straightforward way to implement a digital filter is by convolving
the input signal with the digital filter's impulse response.
• All possible linear filters can be made in this manner. When the impulse
response is used in this way, the filter is called kernel.
• There is also another way to make digital filters, called recursion.
• When a filter is implemented by convolution, each sample in the output is
calculated by weighting the samples in the input, and adding them together.
9
Cont.…
• Digital filters can be implemented in two ways,
• Convolution (also called finite impulse response or FIR) and
• Recursion (also called infinite impulse response or IIR).
• Filters carried out by convolution can have far better performance than filters
using recursion, but execute much more slowly.
• The most commonly used FIR filters are moving average (which is used in the
time domain), windowed-sinc (which is used in the frequency domain) and FIR
custom (which is used when something special is needed).
• The most common IIR filters are single pole recursive filter (is used in the time
domain), Chebyshev (is used in the frequency domain).
10
11
12
13
Example
Determine whether FIR or IIR
Answer: 1: IIR 2:FIR 14
15
16
17
18
19
QUIZ
1. Define filter.
2. What is signal separation and signal restoration.
3. Compare and contrast digital filter and analog filters.
20