Upload
ubaydaturk
View
228
Download
0
Embed Size (px)
Citation preview
8/3/2019 Design Filter
1/27
Session 6 : Digital Filter Design
The Digital Filter Design
Ir. Dadang Gunawan, Ph.D
Electrical Engineering
University of Indonesia
8/3/2019 Design Filter
2/27
Session 6 : Digital Filter Design
The Outline
6.1 State-of-the-art
6.2 The advantages of Digital Filter
6.3 The disadvantages of Digital Filter
6.4 Types of Digital Filter
6.5 How to choose the two types ?
6.6 Example of IIR Filter6.7 Example of FIR Filter
6.8 The three filter
( contd )
8/3/2019 Design Filter
3/27
Session 6 : Digital Filter Design
The Outline
6.9 Filter Design Steps
6.9.1 Step 1 : Specification of the filter requirements
6.9.2 Step 2 : Calculation of the filter coefficients
6.9.3 Step 3 : Representation filter by suitable structure
6.9.4 Step 4 : Analysis of Finite Wordlength effects
6.9.5 Step 5 : Implementation of the filter6.10 Review
8/3/2019 Design Filter
4/27Session 6 : Digital Filter Design
State of the art
The Digital Filter is one of the key of DSP
A filter is essentially a system or network that
selectively changes the wave shape, amplitude-frequency and/or phase-frequency characteristic of asignal in a desired manner
A filter is purely mathematical algorithm implementedin hardware/software
6.1
8/3/2019 Design Filter
5/27Session 6 : Digital Filter Design
State of the art (contd)
The objectives of filter are to improve the quality of asignal (for example, to remove or reduce noise)
Digital filters often operate on digitized analog signals orjust numbers, representing some variable, stored in a
computer memory
Figure 6.1 below represent a simplified block diagram of
a real-time digital filter
6.1
8/3/2019 Design Filter
6/27Session 6 : Digital Filter Design
Block Diagram of a-real time digital filter with
analog input and output signals
6.1
Inputfilter
Digitalprocessor
B-bit ADC
with sample
and hold
B-bitDAC
Outputfilter
y(n)x(n)
Figure 6.1
8/3/2019 Design Filter
7/27Session 6 : Digital Filter Design
The advantages of digital filter Can have characteristic which are not possible with
analog filters, such as a truly linear phase response It doesnt vary with environmental changes such as
thermal variations, so that it eliminates the need to
calibrate periodically
It can be used at very low frequencies, found in manybiomedical applications
etc.
Find others by yourself
6.2
8/3/2019 Design Filter
8/27
Session 6 : Digital Filter Design
The disadvantages of digital filter
SPEED LIMITATION
LONG DESIGN and DEVELOPMENT TIMES
FINITE WORDLENGTH EFFECTS
6.3
8/3/2019 Design Filter
9/27
Session 6 : Digital Filter Design
Types of digital filters
=
=1
0
)()()(N
k
knxkhny
INFINITE IMPULSE
RESPONSE( I I R )
FINITE IMPULSE
RESPONSE( F I R )
=
=0
)()()(k
knxkhny
Find out the different !
6.4
8/3/2019 Design Filter
10/27
Session 6 : Digital Filter Design
How to choose the two types ?
Choose I I R when the only requirementsare sharp cutoff filters and high throughput.
It will give fewer coefficients than FIR
Choose F I R when the the number of filterCoefficients is not too large and when no
phase distortion is desired
WHY ?
WHY ?
6.5
8/3/2019 Design Filter
11/27
Session 6 : Digital Filter Design
Example of IIR filter
Suppose we have one transfer function like this :
For drawing its block diagram, we have to make the
corresponding difference equations :
2
2
1
1
2
2
1
10
1
)(
++=
zaza
zbzbbzH
)2()1()()(
)2()1()()(
210
21
++=
=
nwbnwbnwbny
nwanwanxnw
Watch the
mark+ and -
6.6
8/3/2019 Design Filter
12/27
Session 6 : Digital Filter Design
Example of IIR filter (contd)
The block diagram (basic lattice structure) for its IIRfilter is :
6.6
Figure 6.2
6 7
8/3/2019 Design Filter
13/27
Session 6 : Digital Filter Design
Example of FIR filter
Suppose we have a transfer function like this :
For drawing its block diagram, we have to make the
corresponding difference equations :
=
=
11
0
1)()(
k
zkhzH
=
=11
0
)()()(k
knxkhny
6.7
6 7
8/3/2019 Design Filter
14/27
Session 6 : Digital Filter Design
Example of FIR filter (contd)
The block diagram (basic lattice structure) for its FIR
filter is :
6.7
Figure 6.3
6 7
8/3/2019 Design Filter
15/27
Session 6 : Digital Filter Design
From two block diagram above, we can summarize the
computational and storage requirement for both filters :
Example of FIR filter (contd)
I I R F I R
Number of multiplications 5 12Number of additions 4 11
Storage locations (coefficients 8 24
and data )
Discuss the difference
6.7
6 8
8/3/2019 Design Filter
16/27
Session 6 : Digital Filter Design
The three filter
LOW PASSfilter : reject the high frequency
BAND PASSfilter : reject any frequency
and pass any frequency
HIGH PASSfilter : reject the low frequency
6.8
6 9
8/3/2019 Design Filter
17/27
Session 6 : Digital Filter Design
Filter Design Steps
SPECIFY THE FILTER REQUIREMENTS
CALCULATE THE FILTER COEFFICIENT
REPRESENT FILTER BY A SUITABLE STRUCTURE
ANALYSIS of FINITE WORDLENGTH EFFECTS
IMPELEMENT FILTER IN SOFT/HARDWARE
6.9
6 9 1
8/3/2019 Design Filter
18/27
Session 6 : Digital Filter Design
Step 1 : Specification of the filter
requirements
There are 6 key parameters of interest :
p passband deviation
s stopband deviation
fp passband edge frequency
fs stopband edge frequencyAs stopband attenuation = - 20.log10 sAp passband ripple = - 20.log10 (1+p)
6.9.1
6 9 1
8/3/2019 Design Filter
19/27
Session 6 : Digital Filter Design
Step 1 : Specification of the filter
requirements (contd)
Here are the position of each parameter in a lowpassfilter :
6.9.1
Figure 6.4
6 9 1
8/3/2019 Design Filter
20/27
Session 6 : Digital Filter Design
Step 1 : Specification of the filter
requirements (contd)
This an example of FIRbandpass filter that is designed
to the following requirements :
- passband : 1.8 3.3 kHz
- stopband : 0 - 1.4 kHz and 3.7 5 kHz
- stopband deviation : 0.001
- passband deviation : 0.05- stopband attenuation : - 20.log10 (0.001) = 60 dB
- passband ripple : - 20.log10
(1+0.05) = 0.42 dB
6.9.1
6 9 1
8/3/2019 Design Filter
21/27
Session 6 : Digital Filter Design
Step 1 : Specification of the filter
requirements (contd)
According to the value of those requirements, here are
the scheme :
6.9.1
Figure 6.5
6 9 2
8/3/2019 Design Filter
22/27
Session 6 : Digital Filter Design
Step 2 : Calculation of the filter coefficients
There are several method to calculate it : Impulse invariant ( IIR )
Bilinear Transformation ( IIR )
Pole-zero placement ( IIR )
Window ( FIR )
Frequency Sampling ( FIR )
Optimal ( FIR )
FREE
YOUR
MIND !
Use
TheCom-
puter
6.9.2
6 9 3
8/3/2019 Design Filter
23/27
Session 6 : Digital Filter Design
Step 3 : Representation filter by suitable
structure
There are some realization structure : Transversal (direct) (FIR)
Frequency sampling (FIR)
Fast Convolution (FIR)
Direct form (I I R)
Cascade (I I R)
Parallel (I I R)
6.9.3
6.9.4
8/3/2019 Design Filter
24/27
Session 6 : Digital Filter Design
Step 4 : Analysis of finite wordlength effects
The main sources of performance degradation indigital filters are :
Input / Output signal quantization Coefficient quantization
Arithmetic roundoff errors
Overflow
ADC noise
Deviations
in the
frequency
response
instability in
IIR filter
6.9.4
6.9.5
8/3/2019 Design Filter
25/27
Session 6 : Digital Filter Design
Step 5 : Implementation of the filter
To implement the filter at least we need : Memory (e.g. ROM) for storing filter coefficients
Memory (e.g. RAM) for storing the present and pastsinputs/outputs
Hardware and software multipliers
Adder or arithmetic logic unit
6.9.5
6.10
8/3/2019 Design Filter
26/27
Session 6 : Digital Filter Design
Preparation to Review
END of THIS SESSIONARE YOU READY TO REVIEW ?
Before the review,
you have to consider yourself.
If you feel you dont understand yet..
Please ask .
6.10
6.10
8/3/2019 Design Filter
27/27
Session 6 : Digital Filter Design
Review
1. Explain about Band-stop filter.
2. Try to explore about disadvantages of digital filter.
And why it becomes like that ?
3. Compare the advantages and disadvantages betweendigital filter and analog filter.
4. Please explain about the relationship between
Discrete Transformation and Filter Design.