Sample rate converter
The FIRRateConverter
performs sampling rate
conversion by a rational factor on a vector or matrix input. The FIR
rate convertor cascades an interpolator with a decimator. The interpolator
upsamples the input by the upsampling factor, L,
followed by a lowpass FIR filter. The FIR filter acts both as an antiimaging
filter and an antialiasing filter prior to decimation. The decimator
downsamples the output of upsampling and FIR filtering by the downsampling
factor M. You must use upsampling and downsampling
factors that are relatively prime, or coprime. The resulting discretetime
signal has a sampling rate L/M times the original
sampling rate.
To perform sampling rate conversion:
Define and set up your FIR sample rate converter. See Construction.
Call step
to perform sampling rate
conversion according to the properties of dsp.FIRRateConverter
.
The behavior of step
is specific to each object in
the toolbox.
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.
firrc = dsp.FIRRateConverter
returns
a FIR sample rate converter, firrc
, that resamples
an input signal at a rate 3/2 times the original sampling rate.
firrc = dsp.FIRRateConverter('
returns an FIR sample rate converter, PropertyName
',PropertyValue
,
...)firrc
,
with each property set to the specified value.
firrc = dsp.FIRRateConverter(L,M,NUM,'
returns an FIR sample rate converter, PropertyName
', PropertyValue
,
...)firrc
,
with the InterpolationFactor
property set to L
,
the DecimationFactor
property set to M
,
the Numerator
property set to NUM
,
and other specified properties set to the specified values.

Interpolation factor Specify the integer upsampling factor. The default is 

Decimation factor Specify the integer downsampling factor. The default is 

FIR filter coefficients Specify the FIR filter coefficients in powers of z^{1}.
The length of filter coefficients must exceed the interpolation factor.
Use a lowpass with normalized cutoff frequency no greater than 
reset  Reset states of FIR sample rate converter 
step  Resample input with FIR rate converter 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
This object implements the algorithm, inputs, and outputs described on the FIR Rate Conversion block reference page. The object properties correspond to the block parameters.