Main Content

Multistage sample rate converter

The `SampleRateConverter`

System object™ converts the sample rate of an incoming signal.

To convert the sample rate of a signal:

Create the

`dsp.SampleRateConverter`

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?.

creates a
multistage FIR sample rate converter System object, `src`

= dsp.SampleRateConverter`src`

, that converts the sample rate of each channel of
an input signal.

returns a multistage FIR sample rate converter System object, `src`

= dsp.SampleRateConverter(`Name,Value`

)`src`

, with properties and options specified by one or
more `Name,Value`

pair arguments.

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 general multistage sample rate converter performs a multistage decimation, a single-stage sample rate conversion, and a multistage interpolation, in that order. Actual designs include at most two of those steps.

The procedure determines automatically the optimal number of decimation or interpolation stages. In special cases, the decimation or the interpolation can be performed in a single stage.

The algorithm always attempts to start by reducing the sample rate. This decreases the amount of computation required. The decimation step is designed so that no intermediate sample rate goes below the bandwidth of interest. This ensures that no information is filtered out.

Each individual stage uses halfband or Nyquist filters to minimize the number of nonzero coefficients.

Transition-band aliasing is allowed because it decreases the implementation cost. The signal within the bandwidth of interest is kept alias free up to the value specified by the

`StopbandAttenuation`

property.

`cost`

|`freqz`

|`getActualOutputRate`

|`getFilters`

|`getRateChangeFactors`

|`info`

|`visualizeFilterStages`