Documente Academic
Documente Profesional
Documente Cultură
8 (ro)=-1:(1J (4.2)
of dela Hence,
(4.3)
1: (ro)=_d8(ro)
g dro
"'-- .
1:g(ro) is usually called the envelope delay or the gouP del~ of the filter. We interpret
1:g(ro) as the time delay that a signal component 01 ~quency ro undergoes as it
passes from the input to the output of the system.
When, 8 (ro) is linear, then 1:g(ro)= 1:= constant. In this case, all frequency
components of the input signal undergo the same time delay.
In conclusion, ideal filters have a constant magnitude characteristic and a linear
phase characteristic within their passband. In all cases, such filters are not physically
realizable but serve as a mathematical idealization of practical filter. For examples,
the ideal lowpass filter with frequency response characteristic,
oi""
HIe' )-
I; I ro I :s;roc
, - { 0 ; elsewhere
. has the impulse response,
roc
7t ; n=O
h n = . (4.4)
() ro SIDro n
...£. ~ ; n;t 0
! 7t rocn
A plot of h (n) is illustrated in Fig 4.1.
h(n)
-. ro/1C
0 n
It is clear that the ideal lowpass filter's impulse response h (n) is not causal
and it is not absolutely summable and therefore it is also unstable. Consequently,
this filter is physically unrealizable.
One possible solution is to introduce a large delay no in h (n) and arbitrarily to
set h (n) = 0 for n < no. However, the resulting system no longer has an ideal frequency
response characteris~. Indeed, if we set h (n)..=O,~ no, the Fourier series
expansion of H (eiOJ)results in the Gibb's pheE?~n~Jn2 ~s will be described in Section
4.2.2.
Causality implies that the frequency response characteristic H (ei"') of the filter
cannot be zero, except at a finite set of points in the frequency range. In addition,
H (ei"') cannot have an infmitely sharp cutoff from passband to stop band, that is,
H (eiOJ)cannot drop from unity to zero abruptly. Alt!tough the freque!lcy response
charr..ctcristics p~s~ed by ideaL filters m~' be desi1:apl~ th~~n~t. absolutely
necessary in mosty~co.tic;;al applicatiQ!l:;;..If we relax these conditions, it is possible
to reahze caU:sarfilters that approximate the ~ as closely as we desire. In
;u.ticular, it is~;;'ot ;ss;';Y to ~rstthat the m~de I
H (;;161) 1 be constant in
the entire passband of the filter. A small amount of ripple in the passband, as
illustrated in Fig 4.2 is usually tolerable.
IH (e"")I
.J_------ 0, - Passband ripple
Passband
ripple -
02 Stopband ripple
.~
We - Passband
1 - 0, r-----y-----\ edge frequency
Transition band
I
y ells- Stopband
I
I
I edge frequency
I
Passband I Stopband
02
W
Wp OJ,; 1t
also tolerable. Based on these specifications viz, O},02, Wpand ws' we can select the
i i
parameter 1 aj ! and bj in the frequency response characteristic, given by Eqn (4.1),
which best approximates the desired specification. .
Design Issues:
The general processes of designing a digital filter involves the following four
steps:
110 FINITE IMPULSE RESPONSE FILTERS
2. Choose a specific structure in which the filter will be realized, and quantize
the resulting filter coefficients to a fixed word length.
3. Quantize the digital filter variables, that is, input, output and intermediate
variable word lengths.
4. Verify by simulation that the resulting design meets given performance
specifications.
The results of step 4 generally lead to revisions in steps 2 and 3 in order to
meet the given specifications.
In particular, we shall consider finite impulse response (FIR) filters, whose
input-output difference equation is,
N-I
Y (n) = L
j=O
bj x (n - i) (4.5)
'I;he main objective of this ,£hapter is to introduce simple but effective methods for
designing FIR filters, that is, procedures for obtaining the coefJicients j bi!' so that
the resulting transfer function,
H (z) =b 0+ b I z- I + b 2 z- 2 + ...+ b N I Z eN- - - 1)
approximates the desired response.
4.1.2. Fill filters: Merits and Demerits
The system of causal FIR filter is of the form,
N-I
H (z) = L h (n) z- n (4.6)
n..O
That is, H (z) is a pol/nomiLil in z-I of degree' N -1. Thus, H (z) has (N -1) zeros
that can be located any where in the z.plane h1Jd iN -11 pflles, .1\11of which lie
at z=O.
There are many advantages with FIR filterll. They arl!:
L t ,,~
II" t '''.
~ '.
1. FIR filters with exactly linear phase CII" 1>(\easily do!!ilmed. Linear phase
filters are important for applicationa whu.,; frequf;fic;;' dispersion due to
nonlinear phase is harmful. (e.g) speech procei!sing and data transmission.
2. Efficient realization. of FIR filters exist!! Illi both recur~ive and non-recursive
structures.
3. FIR f1lters realized non-recursively, that is, by direct convolution are always
d~. -
= I H (~O)) I ei9(0))
e{oo)=tan-1Im H(ei~f
. Re H (J~ ~
respe<:tively.
112 FINITE IMPULSE RESPONSE FILTERS
For linear (constant) phase delay as well as group delay the phase response
must be linear, that is,
e(oo)=-'too; -1t<00<1t.
where 't is a constant phase delay in samples. Thus, ~ter for which 'tn and 't" a~
constant, that is, independent of frequency are referred to as constant time-delay Q[
Ifmear phase filters'.
Therefore,
N-1
- L h (n) sin om
n=O
e (oo)=-'t 00= tan-1 N-1 (~~
L h (n) cos oon
n=O
consequently,
N-1
L h (n) sin oon
n=O
tan ('t (0) = N- 1
L h (n) cos oon
n=O
and accordingly,
N-1
L h (n) (cas oon . sin 00't - sin oon . cos 00't) =0
n=O
N -1
or L h (n) sin (00 't - oon)= O.
n=O
N 1
(4.8)
~ :n) ~ : (N - 1 - n) for 0::; n ::;N - 1 j
Therefore, FIR filters can have constant phase and group delays if the Eqn (4.8) is
satisfied. That is, it is only necessary for the impulse response to be symmetrical
about the midpoint between samples, N; 2 and ¥ for even N or about sample
DIGITAL SIGNAL PROCESSING 113
N;..!. for odd N. The required symmetry is illustrated in Fig 4.3 for
N = 10 and N = 11.
h(n)
Centre of symmetry
0 9 n
I
,
h(n) I
:Centre of symmetry
I
,
I
I
I
I
0 2 ,5 10 n
I
I
I
I
I ~
I J
(b)N:11 and t:5 "'- ~
Fig. 4.3. Impulse response for constant phase and group delay l' yv"
(a) even N (b) odd N. ~
In many applications only the group delay need be constC'hich case the
phase response of H (ei"') is a piece-wise linear funct~, that is,
0(00)= ~-1: 00
non recursive filters can be obtained with ~= :!:~, the solution is,
N -1
1:=-
2
and h (n) = - h (N - 1- n) ; O$n$N-1 14.9)
Filters that satisfy Eqn (4.9) again have a delay of N; 1 samples but their impulse
--responses are anti-symmetric about the centre of the sequence, as illustrated in
Fig. 4.4.
114 . FINITE IMPULSE RESPONSE FILTERS
i
h(n) :I -- Centreofsymmetry
I
I
I
r
I
r
I
r
I 5
t-rI
9
I
I
I
I
I
(a) N z 10 and . ~ 4.5
I
I
h(n)
: -- Centre of symmetry
I
I
I
I
I
I
I
I
10 n
By using Eqn (4.8) and then letting N - 1 - n = m, m = n, the last summation in the
above equation can be expressed as,
N-l N-l
L h (n) e-jron = L h (N - 1- n) e-jom
N+ 1 N+t
n;~ n;~
. , -, J
r ,
! N-1
(N - 3)/2 -
N -1
=e-.1ro(N-LI2'lhl~) + n~o 2h(n)Cos( (O( z- )-n) ]
N -1
and hence" with ~ - n = k, we have,
(N - 1)/2
H (ei"')= e- jro(N-1)/2'-r aKcos(OK (4,2)
k=O
IV';
where, f'/--' ., ~ l'
h
N-1 / -2 'I
ao=
(
~ ) .
(N-1 /' r
...., . ~: ~ ':io0
aK=2hl Z--K )
.
I
... - ,..,
Similarly, the frequency response for the case of symmetrical impulse response
with N even and for the two cases of anti-symmetrical response, can be simplified
to the expression summarised in Table 4,l.
h (n) N H (eiro)
odd (N - 1)/2
e-j",(N -1)/2 L aK cos (OK
Symmetrical k=O
even N/2
Anti-symmetrical (N - 1)
[
-j ro--1r/2 "
1 N/2 1
[
'
Similarly. for odd-N and anti symmetrical h(n). case, at 00=0 and
J
00= 1t, H (ei(l!>J=0, independent of h (n). Furthermore, the factor ei 2t/2 = j, shows the
1'rEfquency responSe to bEnmaglnary to within a linear phase factor. Thus, this case
of fHters is most suitable for f;uch filters as Hilbert transformers and differentiators.
For the last case, that Is, even-N and anti symmetry also, at 00= 0, I H (ei(l!) = 0 and I
there is th;-phase factor ~1!72. Thus, this class of fIlters is also most suitable for
approximating such filters as differentiators and Hilbert transformers.
Consequently, we would not use the anti symmetry condition in the design of
-
a lowpass linear-phase FIR filter. On the other hand, the symmetry condition yields
a linear phase FIR filter with a non-zero response at 00= 0
- --
4.2. Design Techniques
--
.4.2.1. Fourier Series Method
This is a straight forward method which utilizes the fact that the steady-state
transfe.r function (or frequency response) of a discrete-time filter is a periodic function
'wm1period oo~ \\~h~is the angular sampling frequency. From the Fourier series
an~.1X~!~we know that any periodic function'can be expressed as a linear combination
of complex ~xpcnentials. Therefore, the desired frequency response of a discrete time'
filter can be represented by.the Fourier series as,
where T is the sampling period. The Fourier series coefficients or impulse response
-
samples ot therilter can be -obtained using the formula,
~r2 -
h (n) = ~ J' H (ei~ ei(l!nTdoo (4.14)
l
4.
S -(I! /2
clearly if we wish to re lize this ;er wi~ -:-~Uls: response h (n), then, it must
Eqn
~
truncation
-
have-a-nIDte number of coefficients. To this end, we use a finite number of h (n) in
(4.14), which equivalent to truncating the
leads to an approximation
. infiiilte e>..-p'ansionof Eqn .(4.13). This
of H (eI~ which we denote by Ha (eI(I!).That is,
M
1""-- - -- - -
, where M is a finite positive integer, and we choose M = N; 1 in order to keep 'N'
number of samples with the impulse response sequence. As we have already seen
-
h (n) is a 'sinc' function ancf"Sowe h'7:1ve,
h (n) = h ( - n)
Now the transfer function
, - - - of au FIR filter can be written
--_. as,
M