Professional Documents
Culture Documents
1 1
– c 0 c – c 0 c
HBS (e j )
HBP (e j )
–1 1
– c2 – c1 c1 c2 – c2 – c1 c1 c2
Professor A G Constantinides
1
AGC
DSP Digital Filter Specifications
These filters are unealisable because (one of
the following is sufficient)
their impulse responses infinitely long non-
causal
Their amplitude responses cannot be equal
– c 0 c
– c
0 c
Professor A G Constantinides
3
AGC
DSP Digital Filter Specifications
The realisable squared amplitude response
transfer function (and its differential) is
continuous in
Such functions
if IIR can be infinite at point but around
Professor A G Constantinides
5
AGC
DSP Digital Filter Specifications
For example the magnitude response
of a digital lowpass filter may be given as
indicated below
Professor A G Constantinides
6
AGC
DSP Digital Filter Specifications
In the passband 0 p we require
that G ( e j ) 1 with a deviation p
j
1 p G (e ) 1 p , p
In the stopband s we require
j
that G (e ) 0 with a deviation s
j
G (e ) s , s
Professor A G Constantinides
7
AGC
DSP Digital Filter Specifications
Filter specification parameters
p - passband edge frequency
- stopband edge frequency
s
p - peak ripple value in the
passband
s - peak ripple value in the
stopband
Professor A G Constantinides
8
AGC
DSP Digital Filter Specifications
Practical specifications are often given in
terms of loss function (in dB)
G ( ) 20 log10 G (e j )
Peak passband ripple
p 20 log10 (1 p )
dB
Minimum stopband attenuation
s 20 log10dB
( s )
Professor A G Constantinides
9
Digital Filter Specifications
AGC
DSP
Professor A G Constantinides
15
Finite Impulse Response
AGC
DSP Filters
The transfer function is given by
N 1
n
H ( z ) h(n).z
n 0
Professor A G Constantinides
17
AGC
DSP FIR: Linear phase
To develop expression for phase
response set transfer function (order n)
H ( z ) h0 h1 z 1 h2 z 2 ... hn z n
In factored form
n1 n2
1 1
H ( z ) K (1 i z ). (1 i z )
i 1 i 1
Where i 1, i 1 K , is
real & zeros occur in conjugates
Professor A G Constantinides
18
AGC
DSP FIR: Linear phase
Let H ( z ) KN1 ( z ) N 2 ( z )
where
n1 n2
1
N1 ( z ) (1 i z ) N 2 ( z ) (1 i z 1 )
i 1 i 1
Thus n1 n2
1 1
ln( H ( z )) ln( K ) ln(1 i z ) ln(1 i z )
i 1 i 1
Professor A G Constantinides
19
AGC
DSP FIR: Linear phase
Expand in a Laurent Series
convergent within the unit circle
To do so modify the second sum as
n2
1
n2
1
n2 1
ln(1 i z ) ln( i z ) ln(1 z )
i 1 i 1 i 1 i
Professor A G Constantinides
20
AGC
DSP FIR: Linear phase
So that
n1
1 1 n2
ln( H ( z )) ln( K ) n2 ln( z ) ln(1 i z ) ln(1 z )
i 1 i 1
Thus i
N1 N2
sm m s m m
ln(H ( z )) ln(K ) n2 ln( z ) z z
m 1 m m
where n1 n1
smN1 i m
sNm2 im
i 1 i 1
Professor A G Constantinides
21
AGC
DSP FIR: Linear phase
smN1 are the root moments of the
minimum phase component
N2
s m are the inverse root moments of
the maximum phase component
Now on the unit circle we have z e j
and H (e j ) A( )e j ( )
Professor A G Constantinides
22
AGC
DSP Fundamental Relationships
N1 N2
s s
ln( H (e j )) ln( K ) jn2 m e jm m e jm
m 1 m m
ln(H (e j )) ln( A( )e j ( ) ) ln( A( )) j ( )
Professor A G Constantinides
25
AGC
DSP FIR: Linear phase
For Linear Phase t.f. (order N-1)
h( n) h( N 1 n)
so that
N
for N even:
1 N 1
2 n
H ( z ) h(n).z h(n).z n
n 0 n N
2
N 1 N 1
2 2
h(n).z n h( N 1 n).z ( N 1 n )
n 0 n 0
N 1
2
h( n) z n z m
n 0
m NProfessor
1AGnConstantinides
26
AGC
DSP FIR: Linear phase
for N odd:
N 1 N 1
1
2
H ( z ) h(n). z
n 0
n
z m
h
N 1
2
z 2
Professor A G Constantinides
30
AGC
DSP Design of FIR filters: Windows
(i) Start with ideal infinite duration h(n)
(ii) Truncate to finite length. (This
produces unwanted ripples increasing in
height near discontinuity.)
~
(iii) Modify to h (n) h(n).w(n)
Weight w(n) is the window
Professor A G Constantinides
31
AGC
DSP Windows
Commonly used windows
Rectangular 1 2 n n
N 1
N
Bartlett 2n 2
1 cos
N
Hann 2n
Hamming 0.54 0.46 cos N
0 . 42 0 . 5 cos 2n 0.08 cos 4n
Blackman
N N
2 n
2
J 0 1
J 0 ( )
Kaiser
N 1
Professor A G Constantinides
32
AGC
DSP Kaiser window
Kaiser window
β Transition Min. stop
width (Hz) 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
Professor A G Constantinides
33
AGC
DSP Example
• Lowpass filter of length 51 and c / 2
Lowpass Filter Designed Using Hann window Lowpass Filter Designed Using Hamming window
0 0
G ain, dB
G ain, dB
-50 -50
-100 -100
-50
-100
1, for Type 1
where
cos(/2), for Type 2
Q( )
sin( ), for Type 3
sin( / 2), for Type 4
Professor A G Constantinides
36
Linear-Phase FIR Filter
AGC
DSP Design by Optimisation
Modified form of weighted error function
E ( ) W ( )[Q( ) A( ) D( )]
W ( )Q( )[ A( ) QD(( )) ]
~ ~
W ( )[ A( ) D( )]
where
~
W ( ) W ( )Q( )
~
D( ) D( ) / Q( )
Professor A G Constantinides
37
Linear-Phase FIR Filter
AGC
DSP Design by Optimisation
Optimisation Problem - Determine a~[k ]
which minimise the peak absolute
value of ~ L
~ ~
E ( ) W ( )[ a [k ] cos( k) D( )]
k 0
Professor A G Constantinides
40
FIR Digital Filter Order
AGC
DSP Estimation
Hermann-Rabiner-Chan’s Formula:
D ( p , s ) F ( p , s )[( s p ) / 2 ]2
N
( s p ) / 2
where
D ( p , s ) [a1 (log10 p ) 2 a2 (log10 p ) a3 ] log10 s
[a4 (log10 p ) 2 a5 (log10 p ) a6 ]
F ( p , s ) b1 b2 [log10 p log10 s ]
with a1 0.005309, a2 0.07114, a3 0.4761
a4 0.00266, a5 0.5941, a6 0.4278
b1 11.01217, b2 0.51244 Professor A G Constantinides
41
FIR Digital Filter Order
AGC
DSP Estimation
Formula valid for p s
For p s , formula to be used is
obtained by interchanging p and s
Both formulae provide only an estimate
of the required filter order N
If specifications are not met, increase
filter order until they are met
Professor A G Constantinides
42
FIR Digital Filter Order
AGC
DSP Estimation
Fred Harris’ guide:
A
N
20(s p ) / 2
Professor A G Constantinides
43