Signals and Systems - Electrical Engineering

(avery) #1
11.5 FIR Filter Design 679

%%%%%%%%%%%%%%%
% band-stop Butterworth
%%%%%%%%%%%%%%%
figure(1)
[b1,a1] = buttercheby1(15,[0.4 0.6],0,4)
%%%%%%%%%%%%%%%
% band-stop Chebyshev
%%%%%%%%%%%%%%%
figure(2)
[b2,a2] = buttercheby1(15,[0.4 0.6],1,4)

There are other filters that can be designed with MATLAB, following a procedure similar to the previ-
ous cases. For instance, to design a band-pass elliptic filter with cut-off frequencies [0.45π, 0.55π] of
order 20 and with loss specifications of 0.1 and 40 dB in the passband and the stopband, we use the
command shown below. Likewise, to design a high-pass filter using thecheby2function we specify
the order 10, the loss in the stopband, and the cut-off frequency 0.55πand indicate it is a high-pass
filter. The results are shown in Figure 11.20.


%%%%%%%%%%%%%%%
% Elliptic and Cheby2
%%%%%%%%%%%%%%%
[b1,a1] = ellip(10,0.1,40,[0.45 0.55]);
[b2,a2] = cheby2(10,40, 0.55,‘high’);

11.5 FIR Filter Design


The design of FIR filters is typically discrete. The specification of FIR filters is usually given in the time
domain rather than in the frequency domain. FIR filters have three definite advantages: (1) stability,
(2) possible linear phase, and (3) efficient implementation. Indeed, the poles of an FIR filter are
at the origin of thez-plane; thus FIR filters are stable. An FIR filter can be designed to have linear
phase, and since the input–output equation of an FIR filter is equivalent to a convolution sum, FIR
filters are implemented using the Fast Fourier Transform (FFT). A minor disadvantage is the storage
required—typically FIR filters have a large number of coefficients.


nExample 11.11


A moving-average filter has an impulse response

h[n]=

1

M

0 ≤n≤M− 1

and zero otherwise. The transfer function of this filter is

H(z)=

M∑− 1

n= 0

1

M

z−n=

1

M

zM− 1
zM−^1 (z− 1 )
Free download pdf