Chapter5 Design of Nonrecursive
Digital filters
5.1 Introduction
• FIR filter : finite impulse response non-recursive filter = Moving average (MA) filter, All-zero filter
• IIR filter : infinite impulse response recursive filter = Auto-regressive (AR) filter, All-pole filter
Ideal filter frequency response
• General equation for filter
M
k k N
k
k y n k b x n k
a
0 0
] [
] [
• Non-recursive filter (causal case)
0
0
0
0
[ ] [ ]
( ) ( )
( )
( ) exp( )
M k k
M
k k k M
k k k M
k k
y n b x n k
Y z X z b z
H z b z
H b jk
• As few coefficients b
kas possible : 10~150 coefficients
• Disadvantage : slower in operation than most recursive designs
• Advantage - inherently stable : only zeros
- ideal linear-phase characteristic (no phase distortion)
Time delay phase effect linear phase
Zero phase
Linear phase
5.2 Simple moving-average filters
Moving average filter Low pass filter ( chapter 1)
1
( ) 1 1 2 cos 2 cos 2 ... 2 cos (2 1)
1 1 2 cos( )
(2 1)
sin ( 1/ 2)
1 sin
(2 1) sin( / 2)
M
k
H M
M M k
M similar to c function M
sin ( )c x sin( ) /x x
( ) 0 2
2 1
H at m
M
The degree of smoothing increase with M
( )
M k k k M
H z b z
뒤에서 설명
5 term filter M = 2 , 21 term filter M = 10
The degree of smoothing increase with M
the width of main lobe smaller narrow lowpass filter
= 0 peak value = 1
unwanted side lobe first side lobe 22% of main lobe
5 terms 4 zeros missing zero at z = 1, passband at = 0
21 terms 20 zeros
Zeros lie actually on the unit circle
nulls in the corresponding frequency response
ex)
4 2 3
4
4 3
2 1
1 5
) 1 (
1 ) 5 (
) 1 (
) 4 (
) 3 (
) 2 (
) 1 (
) 5 (
) 1 (
z
z z
z z z
H
z z
z z
z X z
Y
n x n
x n
x n
x n
x n
y
2
0
( )
M
k k k M M l
l M l
H z b z
b z z
2M zeros
Simple bandpass filter
- Impulse response cos(n0) (0 : desired center frequency of the new filter) - Time domain multiplication = Frequency-domain convolution
elsewhere n n n M
h
, 0
10 10
3 , )cos
1 2
( ] 1 [
High pass or band pass filter design from low pass prototype
Ex) M=10
scaling factor of 2 may be applied
because amplitude of cosine spectral impulse= 0.5
1
1 1 1
[ ] 1 2 cos( )
(2 1) 2 3 2 3
M
k
H k
M
Highpass filter
original impulse response cos(n)
( )1 2 1 2
cos 1
2
( )
[ ] [ ] ( ) ( )
c c
c c c
jn jn
c
jn j n j n jn
c
n n
n e e
F e e e e
x n x n X X
5.3 The fourier transform method
Basis of the method
2 2
) exp (
) 2 (
] 1 [
) exp (
) 2 (
] 1 [
) exp (
] [ )
(
d n j H
n h
Transform Fourier
Inverse d
n j X
n x
Transform Fourier
n j n
x X
n
If H() is complicated, it is hard to solve so, concentrate on the ideal filter approach
The number of coefficients
Large number uneconomic filter so, limit the number of coefficients
exp ( ) exp ( )
2 1
) exp (
2 ) 1
exp ( .
2 1 1
) exp (
) 2 (
] 1 [
1 1
1
1 1
n j n
jn j
jn n d j
n j
d n j H
n h
1 1 1
1 1
1
1 sin( )
[ ] sin( ) n sinc( )
h n n n
n n
Ideal low-pass filter method
) (
sinc )
1 sin(
]
[ 1 1 1
n n
n n
h
H() : Infinitively sharp cut-off
time domain response continuous forever truncate or limit
The more samples of h[n]
The closer to the designed form of H() - less economic
- greater its time delay
bandwidth center frequency
n n n
n
h 1 sin( )cos( ) 2 : , :
]
[ 1 0 1 0
1
1 2 [ ]cos( )
) (
k
k k
h
H
180 0
: High - pass filter
Truncate 2M+1 points 1
1
| ( ) | 2 [ ]cos( )
M
k
H h k k
Modulation
B A
D
C
,
Original signal
Added signal
Filtered signal
5.3.2 Truncation and windowing
( ) ( ) * ( ) ( ) ( ) ( )
A D A D
H H W h n h n w n
■
■ distortion of passband, appearance of unwanted side lobes.
■ Increase the length of rectangular window
→ W (Ω) spectrum becomes narrower like impulse.
→ HA(Ω) transition sharper
Ripple (sidelobe) magnitude not reduced, because W (Ω) is still sinc function
■ M = 10
→ 21 term window.
■ M = 25
→ 51 term window.
■ First sidelobe → -13.5 dB (4.5%)
■ Many sidelobes greater than -30dB. (3%)
Rectangular window
sin ( 1/ 2)
( ) sin
sin( / 2)
H M similar to c function
( ) 0 2
2 1
H at m
M
Triangular Bartlett window
elsewhere M n
M M
n M
n w
, 0
) , 1 (
|
| ) 1 (
]
[ 2
Window’s spectrum
)}
cos(
) 2 cos(
) 1 (
) cos(
) { 1 (
2 )
1 (
) 1
( 2
M M M
M
W M
Disadvantage : Wide mainlobe
Advantage : smaller sidelobe (- 27dB=2%)
* Narrow main lobe Large sidelobe
(Sharp transition) (Big ripples in
HA(Ω))
* desirable filter -- Sharp transition, low ripple levels
* Rectangular widow : Sharpest transition
Ripple performance is not a major consideration.
* Hann, Hamming smaller sidelobe
Von Hann and Hamming windows
* Hamming window is best of all
* Disadvantage : Wide mainlobe
sidelobe a Rectangular -20dB
b Hann -40dB
c Hamming -46dB
Bandpass filter response
sidelobe a Rectangular -20dB
b Hann -40dB
c Hamming -46dB
Kaiser window
elsewhere M n I M
M I n
n w
, 0
) , ( 1 ( ]
[
0
2
0
I0 : Modified Bessel Function
: degree of tapering (=0 Rectangular, =5.44 Hamming)
, M Design Method
Hanning, Hamming, Kaiser
Disadvantage : Mainlobes are a lot wider Advantage : smaller sidelobes
. 0
, cos ]
[
elsewhere M n C M
B n A n w
. 0
1 , cos
5 . 0 5 . 0 ] [
elsewhere M n M M
n n w
Hanning window
elsewhere M n M M
n n w
0
, cos 46 . 0 54 . 0 ] [
Hamming window
Kaiser window
M n I M
M I n
n
w ,
) ( 1 ]
[
0
2
0
Io : Modified bessel function of the first kind and of Zero order if = 0, rectangular window
if = 5.44, Hamming window(similar)
Equiripple Filters (briefly)
Largest ripple and sidelobes generally occur near the transition from passband to stopband
As we move away from the transition region
the error between desired and actual responses become smaller
if error can be distributed more equally over the range 0 , we may achieve a better overall compromise between ripple levels,
transition bandwidth and filter order
) (cos ) sin
)' ( (
) (cos
) cos(
] [ 2
] 0 [
) cos(
2 )
exp(
) (
1
1 0
1
1 0
M
k
k k
M
k
k k
M
k
M
k k M
M k
k
k d kC
H dH
k C
k k
h h
k b
b jk
b H
Digital Differentiator (skip)
1 1
( ) ( ) ( 1)
( ) ( ) (1 )
( ) 1 1 exp( ) 1 cos sin
( ) 2 sin 2
2 2
y n x n x n first order difference
Y z X z z
H z Z j j
H for small values of
Digital differentiator