Farrow Rate Converter
Polynomial samplerate converter with arbitrary conversion factor
Library
Signal Operations
dspsigops
Description
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.
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.
Parameters
Main
 Sample rate of input signal (Hz)
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 output signal (Hz)
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
. Tolerance for output sample rate
Maximum allowed tolerance for the output sample rate, specified as a positive scalar in the range [
0
0.5
]. The default is0
.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.
 Specification method
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.
 Polynomial order
Order of filter polynomial, specified as a
1
,2
,3
, or4
. The default is3
. This parameter applies only when you set Specification method toPolynomial order
. Coefficients
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 toCoefficients
. Force fixed size input and output frames
Specify whether the input and output must be fixedsize signals or can be variablesize signals.
If you select the Force fixed size input and output frames parameter, then:
The size of the input signal cannot change during simulation.
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, click View Info in the block dialog box.
When you clear the Force fixed size input and output frames parameter, then:
The input signal can be a variablesize signal. That is, the frame size of the signal can change during simulation but the number of channels must remain constant.
The frame size of the signal does not have to be a multiple of the decimation factor. Note that if the input is not a multiple of the decimation factor, then the output is generally a variablesize signal. Therefore, to allow arbitrary input size, the block must also allow variable size operations, which can be done by clearing the Force fixed size input and output frames parameter.
 View Filter Response
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.
 View Info
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. Simulate using
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
.
Data Types
 Rounding mode
Rounding mode for fixedpoint operations, specified as one of
Ceiling
Convergent
Floor
Nearest
Round
Zero
. The default isFloor
. For more information on the rounding modes, see Precision and Range.This property is not tunable.
 Saturate on integer overflow
Overflow action for fixedpoint operations, specified as
Wrap
Saturate
. The default isWrap
. For more details on the overflow action to select, see the 'Overflow Handling' section of Precision and Range.This property is not tunable.
 Coefficients
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.
 Fractional Delay
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.
 Multiplicand
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.
 Output
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.
 Output Minimum
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. Output Maximum
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. Lock data type settings against changes by the fixedpoint tools
Select this parameter to prevent the fixedpoint tools from overriding the data types you specify on the block mask.
Supported Data Types
Port  Supported Data Types 

Input 

Output 

See Also
dsp.FarrowRateConverter  DSP System Toolbox 
SampleRate Converter  DSP System Toolbox 
Algorithms
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
.