Variable FIR Interpolation
Libraries:
DSP System Toolbox /
Filtering /
Multirate Filters
Description
The Variable FIR Interpolation block performs an efficient polyphase FIR interpolation with a tunable interpolation factor. You can update the interpolation factor and the filter coefficients in the block dialog box or through an input port while the simulation is running.
Conceptually, the FIR interpolator (as shown in the schematic) consists of an upsampler
followed by an FIR anti-imaging filter, which is usually an approximation of an ideal
band-limited interpolation filter. To design an FIR anti-imaging filter, use the designMultirateFIR
function. The upsampler upsamples each channel of the input
to a higher rate by inserting L–1 zeros between samples. The FIR filter
that follows filters each channel of the upsampled data. The resulting discrete-time signal
has a sample rate that is L times the original sample rate.
However, the actual block algorithm implements a direct-form FIR polyphase structure, an efficient equivalent of the combined system depicted in the diagram. For more details, see Algorithms.
The block supports C and C++ code generation.
Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Algorithms
The FIR interpolation filter is implemented efficiently using a polyphase structure.
To derive the polyphase structure, start with the transfer function of the FIR filter:
N+1 is the length of the FIR filter.
You can rearrange this equation as follows:
Lmax is the number of polyphase components, and its value equals the maximum interpolation factor.
You can write H(z) as:
E0(zLmax), E1(zLmax), ..., ELmax-1(zLmax) are polyphase components of the FIR filter H(z).
During simulation, the algorithm reconstructs the filter H(z) based on the current interpolation factor L.
Rewriting H(z) in terms of the interpolation factor L.
where, r = Lmax/L.
Conceptually, the FIR interpolation filter contains an upsampler followed by an FIR lowpass filter H(z).
Replace H(z) with its polyphase representation.
Here is the multirate noble identity for interpolation.
Applying the noble identity for interpolation moves the upsampling operation to after the filtering operation. This move enables you to filter the signal at a lower rate.
You can replace the upsampling operator, delay block, and adder with a commutator switch. The switch starts on the first branch 0 and moves in the counterclockwise direction, each time receiving one sample from each branch. The interpolator effectively outputs L samples for every one input sample it receives. Hence the sample rate at the output of the FIR interpolation filter is Lfs.
References
[1] Orfanidis, Sophocles J. Introduction to Signal Processing. Upper Saddle River, NJ: Prentice-Hall, 1996.