Main Content

Polyphase FIR interpolator

The `dsp.FIRInterpolator`

System object™ upsamples an input by the integer upsampling factor *L* along
the first dimension. The FIR interpolator (as shown in the schematic) conceptually 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 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 direct-form 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.

Note that the actual object algorithm implements a polyphase structure, an efficient equivalent of the combined system depicted in the diagram. For more details, see Algorithms.

To upsample an input:

Create the

`dsp.FIRInterpolator`

object and set its properties.Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?.

Under specific conditions, this System object also supports SIMD code generation. For details, see Code Generation.

returns an
FIR interpolator, `firinterp`

= dsp.FIRInterpolator`firinterp`

, which upsamples an input signal by a factor
of 3 and applies an FIR filter to interpolate the output.

returns an FIR interpolator with the integer-valued
`firinterp`

= dsp.FIRInterpolator(`interpFactor`

,`num`

)`InterpolationFactor`

property set to
`interpFactor`

and the `Numerator`

property set to
`num`

.

returns an FIR interpolator object with each specified property set to the specified
value. Enclose each property name in quotes. You can use this syntax with any previous
input argument combinations.`firinterp`

= dsp.FIRInterpolator(___,`Name,Value`

)

To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named `obj`

, use
this syntax:

release(obj)

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:

$$H(z)={b}_{0}+{b}_{1}{z}^{-1}+\mathrm{...}+{b}_{N}{z}^{-N}$$

*N*+1 is the length of the FIR filter.

You can rearrange this equation as follows:

$$H(z)=\begin{array}{c}\left({b}_{0}+{b}_{L}{z}^{-L}+{b}_{2L}{z}^{-2L}+\mathrm{..}+{b}_{N-L+1}{z}^{-(N-L+1)}\right)+\\ {z}^{-1}\left({b}_{1}+{b}_{L+1}{z}^{-L}+{b}_{2L+1}{z}^{-2L}+\mathrm{..}+{b}_{N-L+2}{z}^{-(N-L+1)}\right)+\\ \begin{array}{c}\vdots \\ {z}^{-(L-1)}\left({b}_{L-1}+{b}_{2L-1}{z}^{-L}+{b}_{3L-1}{z}^{-2L}+\mathrm{..}+{b}_{N}{z}^{-(N-L+1)}\right)\end{array}\end{array}$$

*L* is the number of polyphase components, and its value
equals the interpolation factor that you specify.

You can write this equation as:

$$H(z)={E}_{0}({z}^{L})+{z}^{-1}{E}_{1}({z}^{L})+\mathrm{...}+{z}^{-(L-1)}{E}_{L-1}({z}^{L})$$

*E _{0}(z^{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 counter clockwise 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*.