Polynomial samplerate converter with arbitrary conversion factor
Signal Operations
dspsigops
The Farrow Rate Converter block converts the sample rate of an input signal using polynomial fit samplerate conversion. Polynomialbased filters are efficient at implementing fractional sample rate conversion. Farrow structures are implementations of polynomialbased filters. This block uses a Farrow structure to implement arbitrary ratechange factors efficiently. The ratechange factors can be irrational.
The input frame size must be a multiple of the decimation factor of the rate converter. The decimation factor depends on the parameter settings of the block. To determine the decimation factor, in the block dialog box click View Info .
Each column of the input signal is treated as a separate channel. If the input is a twodimensional signal, the first dimension represents the channel length (or frame size) and the second dimension represents the number of channels. If the input is a onedimensional signal, then it is interpreted as a single channel. The inputs to the block can be single, double, or fixedpoint data type.
The diagram shows the data types that the Farrow Rate Converter
block uses for fixedpoint signals and floatingpoint signals. You can specify these
data types using the block parameters, see If the input is floating point, all data
types in filter are the same as the input data type, single
or
double
.
If the input is fixed point, the FIR filter defines internal data types using the Rounding mode, Saturate on integer overflow, and Coefficients data type parameters. The accumulators and products within the FIR filter use full precision data types. The block casts the output of the FIR filter to the Multiplicand data type.
Sample rate of the input signal, specified as a positive scalar in Hz.
The input sample rate must be greater than the bandwidth of interest.
The default is 48e3
.
Sample rate of the output signal, specified as a positive scalar in
Hz. The output sample rate must be higher or lower than the input sample
rate. The default is 98e3
.
Maximum allowed tolerance for the output sample rate, specified as a
positive scalar in the range [0
to0.5
]. The default is
0
.
The actual output sample rate varies but is within the specified range. For example, suppose that you set the Tolerance for output sample rate to 0.01. Then the actual output sample rate is in the range given by sample rate of output signal ± 1%. This flexibility allows for a simpler filter design.
Method used to specify the polynomial interpolator coefficients, specified as one of the following:
Polynomial order
—
Specify the order of the Lagrange interpolation filter
polynomial through the Polynomial order
parameter.
Coefficients
— Specify
the polynomial coefficients directly through the
Coefficients parameter.
Order of filter polynomial, specified as a 1
,
2
, 3
, or 4
.
The default is 3
. This parameter applies only when
you set Specification method to
Polynomial order
.
Filter polynomial coefficients, specified as a realvalued square
matrix. The default is [1 1; 1 0]
. This property
applies only when you set Specification method to
Coefficients
.
Opens the fvtool and displays the magnitude/phase response of the Farrow Rate Converter. The response is based on the block dialog box parameters. Changes made to these parameters update FVTool.
To update the magnitude response while fvtool is running, modify the dialog box parameters and click Apply.
Display the following information about the Farrow filter system:
Filter Structure
Interpolation Factor
Decimation Factor
Filter Length
Stable
Linear Phase
This button brings the functionality of the info
method into the
Simulink^{®} environment.
Type of simulation to run. You can set this parameter to:
Code generation
(default)
Simulate model using generated C code. The first time you
run a simulation, Simulink generates C code for the block. The C code is
reused for subsequent simulations, as long as the model does
not change. This option requires additional startup time but
provides faster simulation speed
than Interpreted
execution
.
Interpreted execution
Simulate model using the MATLAB^{®} interpreter. This option shortens
startup time but has slower simulation speed
than Code
generation
.
Rounding mode for fixedpoint operations, specified as one of
Ceiling
 Convergent

Floor
 Nearest

Round
 Zero
. The default is
Floor
. For more information on the rounding
modes, see Precision and Range.
This property is not tunable.
Overflow action for fixedpoint operations, specified as
Wrap
 Saturate
. The default
is Wrap
. For more details on the overflow action to
select, see the 'Overflow Handling' section of Precision and Range.
This property is not tunable.
Data type of the filter coefficients, specified as a signed
fixedpoint object. The default, fixdt(1,16)
,
corresponds to a signed fixedpoint type object with 16bit
coefficients. To give the best possible precision, fraction length is
determined based on the coefficient values.
This property is not tunable.
Data type of the fractional delay, specified as an unsigned
fixedpoint object. The default, fixdt(0,8)
,
corresponds to an unsigned fixedpoint data type object with 8bit word
length. To give the best possible precision, fractional length computed
based on the fractional delay values.
This property is not tunable.
Data type of the multiplicand, specified as a signed fixedpoint
object. The default, fixdt(1,16,13)
, corresponds to a
signed fixedpoint multiplicand data type with 16bit word length and
13bit fraction length.
This property is not tunable.
Word length and fraction length of the output data type, specified as one of the following:
Inherit: Same word length as
input
(default) — Output word
length and fraction lengths are the same as the
input.
Inherit: Same as accumulator
— Output word length and fraction lengths are the
same as the accumulator.
fixdt(1,16)
— Signed
fixedpoint data type with 16bit word length. To give the
best possible precision, fraction length is computed based
on the input range. The dynamic range of the input is
preserved.
fixdt(1,16,0)
— Signed
fixedpoint data type with 16bit word length and zero
fraction length.
This property is not tunable.
Specify the minimum value that the block should output. The default
value is []
(unspecified). Simulink uses this value to perform automatic scaling of
fixedpoint data types.
Specify the maximum value that the block should output. The default
value is []
(unspecified). Simulink uses this value to perform automatic scaling of
fixedpoint data types.
Select this parameter to prevent the fixedpoint tools from overriding the data types you specify on the block mask.
Port  Supported Data Types 

Input 

Output 

dsp.FarrowRateConverter  DSP System Toolbox 
SampleRate Converter  DSP System Toolbox 
This block brings the capabilities of the dsp.FarrowRateConverter
System
object™ to the Simulink environment.
For information on the algorithms used by this block, see the Algorithms section of
dsp.FarrowRateConverter
.