Digital Signal Processing Reference
In-Depth Information
[b,a]=butter(N,Wn,'stop');
[h,w]=freqz(b,a,256);
H=abs(h);
plot(w/pi,H);grid
title('Magnitude response of a Butterworth Bandstop filter')
ylabel('Magnitude')
xlabel('Normalized frequency')
%end
The order of this filter is 8, and its magnitude response, shown in Figure 4.26,
acts like a notch filter. It can be used to filter out a single frequency at which
the attenuation is more than 65 dB. Since this frequency is ω
= 0 . 2, it is 20%
of the Nyquist frequency or 10% of the sampling frequency. So if the sampling
frequency is chosen as 600 Hz, we can use this filter to filter out the undesirable
hum at 60 Hz due to power supply in an audio equipment.
The coefficients of the digital filter are copied below from the output of the
MATLAB script shown above:
b
= numerator coefficients ( columns1-9 ) :
0 . 9168
5 . 9000
17 . 9049
32 . 9698
40 . 1175
32 . 9698
17 . 9049
5 . 9000
0 . 9168
Magnitude response of a Butterworth bandstop filter
1.4
1.2
1
0.8
0.6
0.4
0.2
0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Normalized frequency
Figure 4.26 Magnitude response of a Butterworth bandstop filter.
Search WWH ::




Custom Search