Digital Signal Processing Reference
In-Depth Information
imposition of the Gibbs phenomenon onto the filter result. In some instances these
may be unacceptable, in which case the first and last L samples are discarded.
It is worthwhile pointing out that Matlab
uses the function decimate to
implement downsampling rate changes with a range of input variables. As
mentioned above, the functions given here are used for illustrative purposes, but
would be useful to non-Matlab implementations, since they are relatively easy to
convert to other languages. Figure 2.26 shows the results when compac and decx2
are used to decimate an input signal. The original half-band filter is of length 55.
The length of
ˆ
turns out to be 15; that is, L /4 is not an integer.
2.8.2 Half-Band Band-Pass Filter
The band-pass (and band-stop) half-band filter characteristics are slightly different
to those of the corresponding low-pass filter. In particular, the -6 dB bandwidth
could take any reasonable size but the filter must be symmetric about 0.5 f N .
Moreover, alternate coefficients are zero-valued throughout the length of the filter.
This is in contrast to low-pass filters that exhibit alternate zero-valued coefficients
throughout the filter with the exception of the three coefficients at the center of the
filter. For example, the central portion of a 55-point 0.2-width band-pass half-
band filter has coefficients
… ,-36.3066, 0, 66.252, -92.116, 0, 102.4 , 0, -92.116, 0, 66.252, 0, -36.3066, ….
In this case, as in the low-pass half-band filter, there are two situations
corresponding to whether L /4 is an integer or not. These lead to the following
conditions for even filter order, L
L
L
h
=
int,
k
=
1
2
,
+
1
ˆ
2
k
1
4
4
h
=
(2.32)
k
L
L
h
int,
k
=
1
2
,
[
]
+
1
2
k
4
4
where [ a / b ] means the integer part of a divided by b . It turns out that apart from
(2.32), the implementation procedure for band-pass decimation by 2 is identical to
its low-pass counterpart except for the statements, y(1:floor(N/2))=
s(2*L+3:2:2*floor(N/2)+2*L+1 ) and P = 4*L+1 in decx2 . In fact, to be able to use (2.31)
for band-pass decimation, P must be replaced by 4 L h - 3. By implication, (2.32)
discards every other filtered data point in the time series. Refer to Figure 2.25 for
details. However, as a cautionary note, the user should ensure that no extraneous
signals can alias into the pass band when using the half-band, band-pass
downsampling by 2 filter.
This process can be useful for filtering without decimation since only one
quarter of the original filter coefficients is used. In this case, the function decx2
provides two other input options for ordinary time domain low- and band pass
filtering. Refer to listing in Figure 2.25 for details.
 
Search WWH ::




Custom Search