Signal Processing Toolbox |
Other Functions for Filtering
In addition to filter
, several other functions in the Signal Processing Toolbox perform the basic filtering operation. These functions include upfirdn
, which performs FIR filtering with resampling, filtfilt
, which eliminates phase distortion in the filtering process, fftfilt
, which performs the FIR filtering operation in the frequency domain, and latcfilt
, which filters using a lattice implementation.
Multirate Filter Bank Implementation
The function upfirdn
alters the sampling rate of a signal by an integer ratio
P/Q. It computes the result of a cascade of three systems that performs the following tasks:
p
h
q
For example, to change the sample rate of a signal from 44.1 kHz to 48 kHz, we first find the smallest integer conversion ratio p/q
. Set
In this example, p
= 160
and q
= 147
. Sample rate conversion is then accomplished by typing
This cascade of operations is implemented in an efficient manner using polyphase filtering techniques, and it is a central concept of multirate filtering (see reference [1] for details on multirate filter theory). Note that the quality of the resampling result relies on the quality of the FIR filter h
.
Filter banks may be implemented using upfirdn
by allowing the filter h
to be a matrix, with one FIR filter per column. A signal vector is passed independently through each FIR filter, resulting in a matrix of output signals.
Other functions that perform multirate filtering (with fixed filter) include resample
, interp
, and decimate
.
The filter Function | Anti-Causal, Zero-Phase Filter Implementation |
© 1994-2005 The MathWorks, Inc.