Note: This page has been translated by MathWorks. Please click here

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

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

Polynomial sample rate converter with arbitrary conversion factor

The `FarrowRateConverter`

System
object™ implements
an efficient polynomial-fit sample rate conversion filter using a
Farrow structure. You can use this object to convert the sample rate
of a signal up or down by an arbitrary factor. This object supports
fixed-point operations.

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

. 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 polynomial filter-based sample rate converter System
object, `src`

= dsp.FarrowRateConverter`src`

.
For each channel of an input signal, `src`

converts
the input sample rate to the output sampling rate.

uses
additional rate and filter properties, specified by one or more `src`

= dsp.FarrowRateConverter(`Name,Value`

)`Name,Value`

pair
arguments.

returns
a sample rate converter object, `src`

= dsp.FarrowRateConverter(`FSIN`

,`FSOUT`

,`TOL`

,`NP`

)`src`

, with `InputSampleRate`

property
set to `FSIN`

, `OutputSampleRate`

property
set to `FSOUT`

, `OutputRateTolerance`

property
set to `TOL`

, and `PolynomialOrder`

property
set to `NP`

.

cost | Implementation cost |

freqz | Frequency response |

getActualOutputRate | Actual output rate, accounting for tolerance |

getPolynomialCoefficients | Polynomial filter coefficients |

getRateChangeFactors | Overall interpolation and decimation factors |

info | Filter implementation details |

reset | Reset internal states of polynomial sample rate converter |

step | Convert sample rate of signal |

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 |

Hentschel, T., and G. Fettweis. “Continuous-Time Digital
Filters for Sample-Rate Conversion in Reconfigurable Radio Terminals.” *Frequenz*.
Volume 55, Issue 5-6, 2001, pp. 185–188.

Farrow filters implement piecewise polynomial interpolation using Horner’s rule to compute samples from the polynomial. The polynomial coefficients used to fit the input samples correspond to the Lagrange interpolation coefficients.

Once a polynomial is fitted to the input data, the value of the polynomial can be calculated at any point. Therefore, a polynomial filter allows for interpolation at arbitrary locations between input samples.

You can use a polynomial of any order to fit to the existing samples. However, since large order polynomials oscillate a lot, polynomials of order 1, 2, 3, or 4 are used in practice.

The block computes interpolated values at the desired locations
by varying only the fractional interval, *µ*.
This interval is the distance between the previous input sample and
the current output sample. All filter coefficients remain constant.

The input samples,

*x*, are filtered using*M*+ 1 FIR filters, where*M*is the polynomial order.The outputs of these filters are multiplied by the fractional delay,

*µ*.The output,

*y*, is the sum of the multiplication results.

Was this topic helpful?