Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Multistage sample rate converter

The `SampleRateConverter`

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

To convert the sample rate of a signal:

Define and set up your sample rate converter. See Construction.

Call

`step`

to convert the sample rate according to the properties of`dsp.SampleRateConverter`

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

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.

cost | Compute implementation cost |

freqz | Frequency response |

getActualOutputRate | Get actual output rate |

getFilters | Obtain single-stage filters |

getRateChangeFactors | Overall interpolation and decimation factors |

info | Display information about sample rate converter |

reset | Reset internal states of multistage sample rate converter |

step | Convert sample rate of signal |

visualizeFilterStages | Visualize filter stages |

Common to All System Objects | |
---|---|

`release` | Allow System object property value changes |

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.