Digital Filter Specifications
description
Transcript of Digital Filter Specifications
![Page 1: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/1.jpg)
1 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications• We discuss in this course only the magnitude
approximation problem• There are four basic types of ideal filters with
magnitude responses as shown below
1
0 c –c
HLP(e j)
0 c –c
1
HHP (e j)
11–
–c1 c1 –c2 c2
HBP (e j)
1
–c1 c1 –c2 c2
HBS(e j)
![Page 2: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/2.jpg)
2 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications• These filters are unealizable because their
impulse responses infinitely long non-causal
• In practice the magnitude response specifications of a digital filter in the passband and in the stopband are given with some acceptable tolerances
• In addition, a transition band is specified between the passband and stopband
![Page 3: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/3.jpg)
3 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications• For example the magnitude response
of a digital lowpass filter may be given as indicated below
)( jeG
![Page 4: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/4.jpg)
4 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications• In the passband we require
that with a deviation
• In the stopband we require that with a deviation
1)( jeG
0)( jeG s
pp 0
s
ppj
p eG ,1)(1
ssjeG ,)(
![Page 5: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/5.jpg)
5 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter SpecificationsFilter specification parameters
• - passband edge frequency
• - stopband edge frequency
• - peak ripple value in the passband
• - peak ripple value in the stopband
p
s
sp
![Page 6: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/6.jpg)
6 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications
• Practical specifications are often given in terms of loss function (in dB)
•
• Peak passband ripple
dB
• Minimum stopband attenuation
dB
)(log20)( 10 jeGG
)1(log20 10 pp
)(log20 10 ss
![Page 7: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/7.jpg)
7 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications• In practice, passband edge frequency
and stopband edge frequency are specified in Hz
• For digital filter design, normalized bandedge frequencies need to be computed from specifications in Hz using
TFF
F
F pT
p
T
pp
2
2
TFFF
F sT
s
T
ss 2
2
sFpF
![Page 8: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/8.jpg)
8 Professor A G Constantinides
Digital Filter SpecificationsDigital Filter Specifications
• Example - Let kHz, kHz, and kHz
• Then
7pF 3sF25TF
56.01025
)107(23
3
p
24.01025
)103(23
3
s
![Page 9: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/9.jpg)
9 Professor A G Constantinides
• The transfer function H(z) meeting the specifications must be a causal transfer function
• For IIR real digital filter the transfer function is a real rational function of
• H(z) must be stable and of lowest order N for reduced computational complexity
Selection of Filter TypeSelection of Filter Type
1z
NN
MM
zdzdzddzpzpzpp
zH
22
110
22
110)(
![Page 10: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/10.jpg)
10 Professor A G Constantinides
Selection of Filter TypeSelection of Filter Type• For FIR real digital filter the transfer
function is a polynomial in with real coefficients
• For reduced computational complexity, degree N of H(z) must be as small as possible
• If a linear phase is desired, the filter coefficients must satisfy the constraint:
N
n
nznhzH0
][)(
][][ nNhnh
1z
![Page 11: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/11.jpg)
11 Professor A G Constantinides
Selection of Filter TypeSelection of Filter Type• Advantages in using an FIR filter -
(1) Can be designed with exact linear phase,
(2) Filter structure always stable with quantised coefficients
• Disadvantages in using an FIR filter - Order of an FIR filter, in most cases, is considerably higher than the order of an equivalent IIR filter meeting the same specifications, and FIR filter has thus higher computational complexity
![Page 12: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/12.jpg)
12 Professor A G Constantinides
FIR DesignFIR Design
FIR Digital Filter DesignFIR Digital Filter Design
Three commonly used approaches to FIR filter design -
(1) Windowed Fourier series approach
(2) Frequency sampling approach
(3) Computer-based optimization methods
![Page 13: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/13.jpg)
13 Professor A G Constantinides
Finite Impulse Response Finite Impulse Response FiltersFilters
• The transfer function is given by
• The length of Impulse Response is N
• All poles are at .
• Zeros can be placed anywhere on the z-plane
1
0).()(
N
n
nznhzH
0z
![Page 14: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/14.jpg)
14 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• Linear Phase: The impulse response is required to be
• so that for N even:
)1()( nNhnh
1
2
12
0).().()(
N
Nn
nN
n
n znhznhzH
12
0
)1(12
0).1().(
N
n
nNN
n
n znNhznh
12
0)(
N
n
mn zznh nNm 1
![Page 15: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/15.jpg)
15 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• for N odd:
• I) On we have for N even, and +ve sign
1
21
0
21
21
).()(
N
n
Nmn z
NhzznhzH
1: zC
12
0
21
21
cos).(2.)(N
n
NTj
Tj NnTnheeH
![Page 16: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/16.jpg)
16 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• II) While for –ve sign
• [Note: antisymmetric case adds rads to phase, with discontinuity at ]
• III) For N odd with +ve sign
12
0
21
21
sin).(2.)(N
n
NTj
Tj NnTnhjeeH
2/0
21
)( 21
NheeH
NTj
Tj
23
0 21
cos).(2
N
n
NnTnh
![Page 17: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/17.jpg)
17 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• IV) While with a –ve sign
• [Notice that for the antisymmetric case to have linear phase we require
The phase discontinuity is as for N even]
2
3
0
21
21
sin).(.2)(
N
n
NTj
Tj NnTnhjeeH
.02
1
Nh
![Page 18: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/18.jpg)
18 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• The cases most commonly used in filter design are (I) and (III), for which the amplitude characteristic can be written as a polynomial in
2cos
T
![Page 19: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/19.jpg)
19 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
For phase linearity the FIR transfer function must have zeros outside the
unit circle
![Page 20: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/20.jpg)
20 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• To develop expression for phase response set transfer function
• In factored form
• Where , is real & zeros occur in conjugates
nnzhzhzhhzH ...)( 2
21
10
)1().1()( 12
1
11
1
zzKzH i
n
ii
n
i
1,1 ii K
![Page 21: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/21.jpg)
21 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• Let
where
• Thus
)()()( 21 zNzKNzH
)1ln()1ln()ln())(ln(2
1
11
1
1
n
ii
n
ii zzKzH
)1()( 11
11
zzN i
n
i )1()( 12
12
zzN i
n
i
![Page 22: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/22.jpg)
22 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• Expand in a Laurent Series convergent within the unit circle
• To do so modify the second sum as
)1
1ln()ln()1ln(2
1
12
1
12
1zzzi
n
ii
n
ii
n
i
![Page 23: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/23.jpg)
23 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• So that
• Thus
• where
)1
1ln()1ln()ln()ln())(ln(2
1
1
1
12
n
i i
n
ii zzznKzH
mNm
m
mNm z
ms
zms
znKzH2
1
1
2 )ln()ln())(ln(
1
1
1n
i
mi
Nms
1
1
2n
i
mi
Nms
![Page 24: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/24.jpg)
24 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• are the root moments of the minimum phase component
• are the inverse root moments of the maximum phase component
• Now on the unit circle we have
and
jez
)()()( jj eAeH
1Nms
2Nms
![Page 25: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/25.jpg)
25 Professor A G Constantinides
Fundamental RelationshipsFundamental Relationships
• hence (note Fourier form)
jmNm
m
jmNmj e
ms
ems
jnKeH2
1
1
2)ln())(ln(
)())(ln())(ln())(ln( )( jAeAeH jj
mms
ms
KANm
m
Nm cos)()ln())(ln(
2
1
1
mms
ms
nNm
m
Nm sin)()(
2
1
1
2
![Page 26: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/26.jpg)
26 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• Thus for linear phase the second term in the fundamental phase relationship must be identically zero for all index values.
• Hence • 1) the maximum phase factor has zeros which are
the inverses of the those of the minimum phase factor
• 2) the phase response is linear with group delay equal to the number of zeros outside the unit circle
![Page 27: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/27.jpg)
27 Professor A G Constantinides
FIR: Linear phaseFIR: Linear phase
• It follows that zeros of linear phase FIR trasfer functions not on the circumference of the unit circle occur in the form
1 ijie
![Page 28: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/28.jpg)
28 Professor A G Constantinides
Design of FIR filters: WindowsDesign of FIR filters: Windows
(i) Start with ideal infinite duration
(ii) Truncate to finite length. (This produces unwanted ripples increasing in height near discontinuity.)
(iii) Modify to
Weight w(n) is the window
)(nh
)().()(~
nwnhnh
![Page 29: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/29.jpg)
29 Professor A G Constantinides
WindowsWindows
Commonly used windows • Rectangular 1
• Bartlett• Hann• Hamming• • Blackman•• Kaiser
21 NnN
n21
Nn2
cos1
Nn2
cos46.054.0
Nn
Nn 4
cos08.02
cos5.042.0
)(1
21 0
2
0 JNn
J
![Page 30: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/30.jpg)
30 Professor A G Constantinides
Kaiser windowKaiser window
• Kaiser window
β Transition width (Hz)
Min. stop attn dB
2.12 1.5/N 30
4.54 2.9/N 50
6.76 4.3/N 70
8.96 5.7/N 90
![Page 31: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/31.jpg)
31 Professor A G Constantinides
ExampleExample• Lowpass filter of length 51 and 2/ c
0 0.2 0.4 0.6 0.8 1
-100
-50
0
/
Gai
n, d
B
Lowpass Filter Designed Using Hann window
0 0.2 0.4 0.6 0.8 1
-100
-50
0
/G
ain,
dB
Lowpass Filter Designed Using Hamming window
0 0.2 0.4 0.6 0.8 1
-100
-50
0
/
Gai
n, d
B
Lowpass Filter Designed Using Blackman window
![Page 32: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/32.jpg)
32 Professor A G Constantinides
Frequency Sampling MethodFrequency Sampling Method
• In this approach we are given and need to find
• This is an interpolation problem and the solution is given in the DFT part of the course
• It has similar problems to the windowing approach
2/ c
1
0 12
.1
1).(
1)(
N
k kNj
N
ze
zkH
NzH
)(kH)(zH
![Page 33: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/33.jpg)
33 Professor A G Constantinides
Linear-Phase FIR Filter Linear-Phase FIR Filter Design by OptimisationDesign by Optimisation
• Amplitude response for all 4 types of linear-phase FIR filters can be expressed as
where
)()()( AQH
4Typefor),2/sin(
3Typefor),sin(
2Typefor/2),cos(
1Typefor,1
)(
Q
![Page 34: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/34.jpg)
34 Professor A G Constantinides
Linear-Phase FIR Filter Linear-Phase FIR Filter Design by OptimisationDesign by Optimisation
• Modified form of weighted error function
where
)]()()()[()( DAQW E
])()[()()()(
QDAQW
)](~)()[(~ DAW
)()()(~ QWW
)(/)()(~ QDD
![Page 35: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/35.jpg)
35 Professor A G Constantinides
Linear-Phase FIR Filter Linear-Phase FIR Filter Design by OptimisationDesign by Optimisation
• Optimisation Problem - Determine which minimise the peak absolute value of
over the specified frequency bands
• After has been determined, construct the original and hence h[n]
)](~)cos(][~)[(~)(0
DkkaWL
k
E
][~ ka
R
)( jeA][~ ka
![Page 36: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/36.jpg)
36 Professor A G Constantinides
Linear-Phase FIR Filter Linear-Phase FIR Filter Design by OptimisationDesign by Optimisation
Solution is obtained via the Alternation Theorem
The optimal solution has equiripple behaviour consistent with the total number of available parameters.
Parks and McClellan used the Remez algorithm to develop a procedure for designing linear FIR digital filters.
![Page 37: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/37.jpg)
37 Professor A G Constantinides
FIR Digital Filter Order FIR Digital Filter Order EstimationEstimation
Kaiser’s Formula:
• ie N is inversely proportional to transition band width and not on transition band location
2/)(6.14
)(log20 10
ps
spN
![Page 38: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/38.jpg)
38 Professor A G Constantinides
FIR Digital Filter Order FIR Digital Filter Order EstimationEstimation
• Hermann-Rabiner-Chan’s Formula:
where
with
2/)(
]2/))[(,(),( 2
ps
psspsp FDN
sppsp aaaD 1031022
101 log])(log)(log[),(
])(log)(log[ 61052
104 aaa pp ]log[log),( 101021 spsp bbF
4761.0,07114.0,005309.0 321 aaa
4278.0,5941.0,00266.0 654 aaa
51244.0,01217.11 21 bb
![Page 39: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/39.jpg)
39 Professor A G Constantinides
FIR Digital Filter Order FIR Digital Filter Order EstimationEstimation
• Fred Harris’ guide:
where A is the attenuation in dB
• Then add about 10% to it
2/)(20 ps
AN
![Page 40: Digital Filter Specifications](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813c28550346895da5a3fc/html5/thumbnails/40.jpg)
40 Professor A G Constantinides
FIR Digital Filter Order FIR Digital Filter Order EstimationEstimation
• Formula valid for
• For , formula to be used is obtained by interchanging and
• Both formulae provide only an estimate of the required filter order N
• If specifications are not met, increase filter order until they are met
sp
sp p s