This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

dsp.FIRInterpolator System object

Package: dsp

Polyphase FIR interpolator


The FIRInterpolator object upsamples an input by the integer upsampling factor, L, followed by an FIR anti-imaging filter. The filter coefficients are scaled by the interpolation factor. A polyphase interpolation structure implements the filter. The resulting discrete-time signal has a sampling rate L times the original sampling rate.

To upsample an input:

  1. Define and set up your FIR interpolator. See Construction.

  2. Call step to upsample the input according to the properties of dsp.FIRInterpolator. The behavior of step is specific to each object in the toolbox.

    Note:   Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.


H= dsp.FIRInterpolator returns an FIR interpolator, H, which upsamples an input signal by a factor of 3 and applies an FIR filter to interpolate the output.

H = dsp.FIRInterpolator('PropertyName',PropertyValue, ...) returns an FIR interpolator, H, with each property set to the specified value.

H = dsp.FIRInterpolator(INTERP, NUM,'PropertyName',PropertyValue, ...) returns an FIR interpolation object, H, with the InterpolationFactor property set to INTERP, the Numerator property set to NUM, and other properties set to the specified values.



Interpolation factor

Specify the integer factor, L, by which to increase the sampling rate of the input signal. The polyphase implementation uses L polyphase subfilters to compute convolutions at the lower sample rate. The FIR interpolator delays and interleaves these lower-rate convolutions to obtain the higher-rate output. The property value defaults to 3.


FIR filter coefficient source

Specify the source of the numerator coefficients as one of 'Property' (default) or 'Input port'. When you specify 'Input port', the filter object requires the numerator coefficients to be specified as the third argument to every step.


FIR filter coefficients

Specify the numerator coefficients of the FIR anti-imaging filter as the coefficients of a polynomial in z–1. Indexing from zero, the filter coefficients are:


To act as an effective anti-imaging filter, the coefficients must correspond to a lowpass filter with a normalized cutoff frequency no greater than the reciprocal of the InterpolationFactor. The filter coefficients are scaled by the value of the InterpolationFactor property before filtering the signal. To form the L polyphase subfilters, Numerator is appended with zeros if necessary. The default is the output of fir1(15,0.25). This property is valid only when the NumeratorSource property is 'Property'.

 Fixed-Point Properties


cloneCreate FIR interpolator object with same property values
freqzFrequency response
fvtoolOpen filter visualization tool
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs of step method
impzImpulse response
isLockedLocked status for input attributes and nontunable properties
phasezUnwrapped phase response
releaseAllow property value and input characteristics changes
resetReset FIR interpolator filter states
stepUpsample and interpolate input

More Analysis Methods for Filter System Objects.


expand all

This example shows how to double the sampling rate of an audio signal from 22.05 kHz to 44.1 kHz, and play the audio.

hmfr = dsp.AudioFileReader('OutputDataType',...
hap = audioDeviceWriter(44100);
hfirint = dsp.FIRInterpolator(2, ...
   firpm(30, [0 0.45 0.55 1], [1 1 0 0]));

while ~isDone(hmfr)
     frame = hmfr();
     y = hfirint(frame);



This object implements the algorithm, inputs, and outputs described on the FIR Interpolation block reference page. The object properties correspond to the block parameters, except:

  • The FIRInterpolator object does not have a property that corresponds to the Input processing parameter of the FIR Interpolation block.

  • The Rate options block parameter is not supported by the FIRInterpolator object.

Introduced in R2012a

Was this topic helpful?