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.

**MathWorks Machine Translation**

The automated translation of this page is provided by a general purpose third party translator tool.

MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.

Delay input by time-varying fractional number of sample periods

**Library:**DSP System Toolbox / Signal Operations

The Variable Fractional Delay block delays the input signal by a specified number of fractional samples along each channel of the input. The block can also concurrently compute multiple delayed versions (taps) of the same signal. For an example, see Delay Signal Using Multitap Fractional Delay.

When the delay has a fractional value, the block interpolates the input signal to
obtain new samples at noninteger sampling intervals. You can set **Interpolation
mode** parameter to one of `Linear`

,
`FIR`

, or `Farrow`

. The block
supports time-varying delay values. That is, the delay value can vary within a frame
from sample to sample.

The block assumes that the input values at the **Delay** port are
between *D _{min}* and

```
Valid
delay range
```

section on the You must consider additional factors when selecting valid
`Delay`

values for the `FIR`

and
`Farrow`

interpolation modes. For details, see Algorithms.

`In`

— Data inputvector | matrix

Specify the data input as a vector or matrix. The data input must have the same data type as the delay input.

This block supports variable-size input signal. That is, you can change the number of input rows during the simulation. However, the number of channels must remain constant.

**Example: **[1 2 3 4;5 1 4 2;2 6 2 3;1 2 3 2;3 4 5 6;1 2 3
1]

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

| `fixed point`

**Complex Number Support: **Yes

`Delay`

— Delay inputscalar | vector | matrix |

Specify the delay input as a scalar, vector, matrix, or
*N*-D array. The delay can be an integer or a
fractional value. The block interpolates the signal to obtain new
samples at noninteger sampling intervals. The delay input must have the
same data type as the data input.

This block supports variable-size delay signal. That is, you can change one or both of the dimensions of the delay signal during simulation. However, the block must make sure that the resulting number of output channels remains constant throughout the simulation.

When the **Input processing** parameter is set to
`Columns as channels (frame based)`

, the
table below shows the effect of the dimension of the delay input on the
data input. For an example, see Delay Signal Using Multitap Fractional Delay.

Data Input | Delay Input | Output | Effect of Delay Input on Data Input |
---|---|---|---|

N (unoriented, one
channel) | scalar | Unoriented (N) | One delay value applied to the input channel |

N (unoriented, one
channel) | Unoriented (N) | Unoriented (N) | Delay value varies within the frame from sample to sample |

N (unoriented, one
channel) | 1-by-P | N-by-P | P taps. Each column in the
output is a delayed version of the input. The delay
value is specified by the corresponding element in
the delay input vector. |

N (unoriented, one
channel) | N-by-P | N-by-P | P taps. In addition, delay
varies within each frame from sample to
sample. |

N-by-1 (one channel with frame
size equal to N) | scalar | N-by-1 | One delay value applied to the input channel |

N-by-1 (one channel with frame
size equal to N) | Unoriented (N) | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | N-by-1 | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | 1-by-P | N-by-P | P taps. Each column in the
output is a delayed version of the input. The delay
value is specified by the corresponding element in
the delay input vector. |

N-by-1 (one channel with frame
size equal to N) | N-by-P | N-by-P | P taps. In addition, delay
varies within each frame from sample to
sample. |

N-by-L
(L channels with frame size
equal to N) | scalar | N-by-L | One delay value applied to all input channels |

N-by-L
(L channels with frame size
equal to N) | 1-by-L | N-by-L | Unique delay value for each input channel |

N-by-L
(L channels with frame size
equal to N) | N-by-1 | N-by-L | Delay value varies within the frame from sample to sample. Same set of delay values for all channels. |

N-by-L
(L channels with frame size
equal to N) | N-by-L | N-by-L | Delay value varies within the frame from sample to sample. Different delay values for each input channel. |

N-by-L
(L channels with frame size
equal to N) | 1-by-1-by-P | N-by-L-by-P | L channels.
P taps per channel. Same delay
for all channels. |

N-by-L
(L channels with frame size
equal to N) | 1-by-L-by-P | N-by-L-by-P | L channels.
P taps per channel. Taps vary
across channels. |

N-by-L
(L channels with frame size
equal to N) | N-by-1-by-P | N-by-L-by-P | L channels.
P taps per channel. Delay
varies within the frame from sample to sample. Same
set of delay values for each channel. |

N-by-L
(L channels with frame size
equal to N) | N-by-L-by-P | N-by-L-by-P | L channels.
P taps per channel. Delay
varies within the frame from sample to sample.
Different set of delay values for each
channel. |

When the **Input processing** parameter is set to
`Elements as channels (sample based)`

, the
table below shows the effect of the dimension of the delay input on the
data input.

Data Input | Delay Input | Output | Effect of Delay Input on Data Input |
---|---|---|---|

N (unoriented, one
channel) | scalar | Unoriented (N) | One delay value applied to the input channel |

N (unoriented, one
channel) | Unoriented (N) | Unoriented (N) | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | scalar | N-by-1 | One delay value applied to the input channel |

N-by-1 (one channel with frame
size equal to N) | Unoriented (N) | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | N-by-1 | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-L
(L channels with
N samples in each
channel) | scalar | N-by-L | One delay value applied to all input channels |

N-by-L
(L channels with
N samples in each
channel) | 1-by-L | N-by-L | Unique delay value for each input channel |

N-by-L
(L channels with
N samples in each
channel) | N-by-1 | N-by-L | Delay value varies within the frame from sample to sample. Same set of delay values for all channels. |

N-by-L
(L channels with
N samples in each
channel) | N-by-L | N-by-L | Delay value varies within the frame from sample to sample. Different delay values for each input channel. |

**Example: **[2 3 4 5]

**Example: **[2.5]

**Example: **[5.6]

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

| `fixed point`

`Port_1`

— Delayed outputvector | matrix

Delayed output, returned as a vector or matrix. The data type and complexity of the output match the data type and complexity of the data input.

When the **Input processing** parameter is set to
`Columns as channels (frame based)`

, the
table below shows the effect of the dimension of the delay input on the
data input.

Data Input | Delay Input | Output | Effect of Delay Input on Data Input |
---|---|---|---|

N (unoriented, one
channel) | scalar | Unoriented (N) | One delay value applied to the input channel |

N (unoriented, one
channel) | Unoriented (N) | Unoriented (N) | Delay value varies within the frame from sample to sample |

N (unoriented, one
channel) | 1-by-P | N-by-P | P taps. Each column in the
output is a delayed version of the input. The delay
value is specified by the corresponding element in
the delay input vector. |

N (unoriented, one
channel) | N-by-P | N-by-P | P taps. In addition, delay
varies within each frame from sample to
sample. |

N-by-1 (one channel with frame
size equal to N) | scalar | N-by-1 | One delay value applied to the input channel |

N-by-1 (one channel with frame
size equal to N) | Unoriented (N) | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | N-by-1 | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | 1-by-P | N-by-P | P taps. Each column in the
output is a delayed version of the input. The delay
value is specified by the corresponding element in
the delay input vector. |

N-by-1 (one channel with frame
size equal to N) | N-by-P | N-by-P | P taps. In addition, delay
varies within each frame from sample to
sample. |

N-by-L
(L channels with frame size
equal to N) | scalar | N-by-L | One delay value applied to all input channels |

N-by-L
(L channels with frame size
equal to N) | 1-by-L | N-by-L | Unique delay value for each input channel |

N-by-L
(L channels with frame size
equal to N) | N-by-1 | N-by-L | Delay value varies within the frame from sample to sample. Same set of delay values for all channels. |

N-by-L
(L channels with frame size
equal to N) | N-by-L | N-by-L | Delay value varies within the frame from sample to sample. Different delay values for each input channel. |

N-by-L
(L channels with frame size
equal to N) | 1-by-1-by-P | N-by-L-by-P | L channels.
P taps per channel. Same delay
for all channels. |

N-by-L
(L channels with frame size
equal to N) | 1-by-L-by-P | N-by-L-by-P | L channels.
P taps per channel. Taps vary
across channels. |

N-by-L
(L channels with frame size
equal to N) | N-by-1-by-P | N-by-L-by-P | L channels.
P taps per channel. Delay
varies within the frame from sample to sample. Same
set of delay values for each channel. |

N-by-L
(L channels with frame size
equal to N) | N-by-L-by-P | N-by-L-by-P | L channels.
P taps per channel. Delay
varies within the frame from sample to sample.
Different set of delay values for each
channel. |

When the **Input processing** parameter is set to
`Elements as channels (sample based)`

, the
table below shows the effect of the dimension of the delay input on the
data input.

Data Input | Delay Input | Output | Effect of Delay Input on Data Input |
---|---|---|---|

N (unoriented, one
channel) | scalar | Unoriented (N) | One delay value applied to the input channel |

N (unoriented, one
channel) | Unoriented (N) | Unoriented (N) | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | scalar | N-by-1 | One delay value applied to the input channel |

N-by-1 (one channel with frame
size equal to N) | Unoriented (N) | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-1 (one channel with frame
size equal to N) | N-by-1 | N-by-1 | Delay value varies within the frame from sample to sample |

N-by-L
(L channels with
N samples in each
channel) | scalar | N-by-L | One delay value applied to all input channels |

N-by-L
(L channels with
N samples in each
channel) | 1-by-L | N-by-L | Unique delay value for each input channel |

N-by-L
(L channels with
N samples in each
channel) | N-by-1 | N-by-L | |

N-by-L
(L channels with
N samples in each
channel) | N-by-L | N-by-L |

**Example: **[0 0 0 0;0 0 0 0;1 0 0 0;5 2 0 0;2 1 3 0;1 6 4
4]

**Example: **[0 0 0 0;0 0 0 0;0.5 1.0 1.5 2.0;3 1.5 3.5 3.0;3.5 3.5 3.0
2.5;1.5 4.0 2.5 2.5]

**Example: **[0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0.4 0.8 1.2
1.6]

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

| `fixed point`

**Complex Number Support: **Yes

`Interpolation mode`

— Method of interpolation`Linear`

(default) | `FIR`

| `Farrow`

Specify the method of interpolation. Using this method, the block interpolates the signal to obtain new samples at noninteger sampling intervals.

`Linear`

–– Linear interpolation. In this mode, the block stores the**D**+1 most recent samples the_{max}**In**port receives for each channel.**D**is the value you specify in the_{max}**Maximum delay (Dmax) in samples**parameter.`FIR`

–– Polyphase FIR interpolation. In this mode, the block stores the**D**+_{max}**P**+1 most recent samples the**In**port receives for each channel.**P**is the value you specify in the**Interpolation filter half-length (P)**parameter.`Farrow`

–– LaGrange method. In this mode, the block stores the**D**+$$\frac{N}{2}$$+1 most recent samples the_{max}**In**port receives for each channel.**N**is the value you specify in the**Farrow filter length (N)**parameter.

For more details on these methods, see Algorithms.

`Interpolation filter half-length (P)`

— Half length of interpolation filter`4`

(default) | positive integer in the range [1 65535]Half-length of the FIR interpolation filter. For periodic signals, a larger value of this property, which indicates a higher order filter, yields a better estimate of the delayed output sample. A property value of 4 to 6, which corresponds to a 7th-order to 11th-order filter, is usually adequate.

**Example: **`6`

**Example: **`10`

This parameter applies only when you set **Interpolation
mode** to `FIR`

.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

| `Boolean`

| `fixed point`

`Interpolation points per input sample`

— Number of interpolation points per input sample`10`

(default) | positive integer in the range [2, 65,535]Number of interpolation points per input sample at which a unique FIR interpolation filter is computed.

**Example: **`20`

**Example: **`5`

This parameter applies only when you set **Interpolation
mode** to `FIR`

.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `int64`

| `uint8`

| `uint16`

| `uint32`

| `uint64`

`Normalized input bandwidth (0 to 1)`

— Normalized input bandwidth`1`

(default) | real scalar in the range (0, 1]Normalized input bandwidth at which to constrain the interpolated output
samples. A value of `1`

equals the Nyquist frequency, or
half the sampling frequency, *Fs*. Use this property to
take advantage of the bandlimited frequency content of the input. For
example, if the input signal does not have frequency content above
*Fs*/4, you can specify a value of
`0.5`

.

**Example: **`0.5`

**Example: **`0.8`

This parameter applies only when you set **Interpolation
mode** to `FIR`

.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

| `Boolean`

| `fixed point`

`Farrow filter length (N)`

— Length of Farrow filter`4`

(default) | integer greater than or equal to 2Length of the FIR filter implemented using the Farrow structure. If the length equals 2, the filter performs linear interpolation.

**Example: **`4`

**Example: **`10`

This parameter applies only when you set **Interpolation
mode** to `Farrow`

.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

`Maximum delay (Dmax) in samples`

— Maximum delay`100`

(default) | integer in the range [0 65535]Maximum delay the block can produce,
**D _{max}**. Input delay values
exceeding this maximum are clipped to

**Example: **200

**Example: **500

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

`Input processing`

— Method to process the input```
Columns as channels (frame
based)
```

(default) | `Elements as channels (sample based)`

Specify how the block should process the input. You can set this parameter to one of the following options:

`Columns as channels (frame based)`

(default) — When you select this option, the block treats each column of the input as a separate channel. The block treats each of the*R*input columns as independent channels containing*M*sequential time samples._{i}The input to the

**Delay**port,*v*, contains floating-point values that specify the number of sample intervals to delay the current input.The input to the

**Delay**port can be a scalar value to uniformly delay every sample in every channel. It can also be a length-*M*column vector, containing one delay for each sample in the input frame. The block applies the set of delays contained in the vector identically to every channel of a multichannel input. The**Delay**port entry can also be a length-*R*row vector, containing one delay for each channel. Finally, the**Delay**port entry can be an*M*-by-*R*matrix, containing a different delay for each corresponding element of the input.For example, if

*v*is the*M*-by-1 matrix_{i}`[v(1) v(2) ... v(Mi)]'`

, the earliest sample in the current frame is delayed by`v(1)`

fractional sample intervals, the following sample in the frame is delayed by`v(2)`

fractional sample intervals, and so on. The block applies the set of fractional delays contained in*v*identically to every channel of a multichannel input.`Elements as channels (sample based)`

–– When you select this option, the block treats each element of the input as a separate channel. The block treats each element of the N-D input array,*u*, as an independent channel. The input to the**Delay**port,*v*, must either be an N-D array of the same size and dimension as the input*u*, or be a scalar value, such that*D*≤_{min}*v*≤*D*._{max}For example, consider an

*M*-by-*R*input matrix. The block treats each of the*M***R*matrix elements as independent channels. The input to the**Delay**port can be an*M*-by-*R*matrix of floating-point values in the range*D*≤_{min}*v*≤*D*that specifies the number of sample intervals to delay each channel of the input, or it can be a scalar floating-point value,_{max}*D*≤_{min}*v*≤*D*, by which to equally delay all channels._{max}In sample-based processing mode, the block treats an unoriented vector input as an

*M*-by-1 matrix. In this mode, the output is also an unoriented vector.

`InitialConditions`

— Initial values in the memory`0`

(default) | scalar | 1-by-Specify the values with in the block's memory at the start of the
simulation. The dimensions of this parameter can vary depending on whether
you want fixed or time-varying initial conditions. The block treats each of
the *R* input columns as a frame containing
*M* sequential time samples from an independent
channel.

For an *M*-by-*R* input matrix,
*u*, you can set this parameter as follows:

To specify fixed initial conditions, set this parameter to a scalar value. The block initializes every sample of every channel in memory using the value you specify.

The dimensions you specify for time-varying initial conditions depend on the interpolation method. To specify different time-varying initial conditions for each channel, set this parameter as follows:

If you set the

**Interpolation mode**to`Linear`

, set the**Initial conditions**to an array of size`1`

-by-*R*-by-*D*, where*D*is the value in**Maximum delay (Dmax) in samples**parameter.If you set the

**Interpolation mode**to`FIR`

or`Farrow`

, set the**Initial conditions**to an array of size 1-by-*R*-by-(*D*+*L*), where*D*is the value of the maximum delay. For FIR interpolation,`L`

is the value of the interpolation filter half length. For Farrow interpolation,`L`

equals`floor`

of half the value of the farrow filter length (`floor( farrow filter length/2)`

).

**Example: **`1`

**Example: **randn(1,3,104)

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `uint8`

| `uint16`

| `uint32`

`Disable direct feedthrough by increasing minimum possible delay by one`

— Disable direct feedthrough`off`

(default) | `on`

Select this box to disable direct feedthrough by increasing the minimum
possible delay value. When you set the **Input processing**
parameter to `Columns as channels (frame based)`

,
the block increases the minimum possible delay value by * frame
size* – 1. Similarly, when you set the

```
Elements
as channels (sample based)
```

, the block increases the
minimum possible delay value by one sample. Checking this box allows you to use the Variable Fractional Delay block in feedback loops.

`For small input delay values`

— Action to take for small input delay values```
Clip to the minimum value necessary for
centered kernel
```

(default) | `Use off-centered kernel`

| ```
Switch to linear interpolation if kernel cannot be
centered
```

Specify the block's behavior when the input delay values are too small to center the kernel.

You can specify how the block handles input delay values that are too small for the kernel to be centered using one of the following choices:

In both

`FIR`

and`Farrow`

interpolation modes, you can select`Clip to the minimum value necessary for centered kernel`

. This option forces the block to increase*D*to the smallest value necessary to keep the kernel centered._{min}In

`FIR`

interpolation mode, you can select`Switch to linear interpolation if kernel cannot be centered`

. This option forces the block to preserve the value of*D*and compute all interpolated values using_{min}`Linear`

interpolation.In

`Farrow`

interpolation mode, you can select`Use off-centered kernel`

. This option forces the block to preserve the value of*D*and compute the interpolated values using a farrow filter with an off-centered kernel._{min}

This parameter applies only when **Interpolation
mode** is set to `FIR`

or
`Farrow`

.

`Valid delay range (in samples)`

— Range of valid delay values[0 100] (default) | [

This property is read-only.

The delay range values [*D _{min}*

When the **Interpolation mode** is set to one of the following:

`Linear`

––*D*equal 0._{min}*D*equals the value you specify in the_{max}**Maximum delay (Dmax) in samples**parameter.`FIR`

––*D*equals_{min}*P*– 1, where*P*is the value you specify in**Interpolation filter half-length (P)**.*D*equals the value you specify in the_{max}**Maximum delay (Dmax) in samples**parameter.`Farrow`

––*D*equals_{min}*N/2*– 1, where*N*is the value you specify in**Farrow filter length (N)**.*D*equals the value you specify in the_{max}**Maximum delay (Dmax) in samples**parameter.

**Example: **[1 100]

**Example: **[2 100]

**Example: **[3 100]

<argumentlist>

#### Dependencies

#### Dependencies

#### Dependencies

off (default) | on

</argumentlist>

`Rounding mode`

— Rounding method for fixed-point operations`Zero`

(default) | `Ceiling`

| `Convergent`

| `Floor`

| `Nearest`

| `Round`

| `Simplest`

Specify the rounding mode for fixed-point operations as one of the following:

`Zero`

`Ceiling`

`Convergent`

`Floor`

`Nearest`

`Round`

`Simplest`

For more details, see rounding mode.

`Overflow mode`

— Overflow action for fixed-point operations`Wrap`

(default) | `Saturate`

Specify the overflow action for fixed-point operations as one of the following:

`Wrap`

–– The block wraps the result of its fixed-point operations.`Saturate`

–– The block saturates the result of its fixed-point operations.

For more details on overflow actions, see overflow mode for fixed-point operations.

`Coefficients`

— Data type of the coefficients```
Same word length as
input
```

(default) | `Specify word length`

Specify the data type of the filter coefficients as one of the following:

`Same word length as input`

–– The word length of the filter coefficients matches that of the input to the block. The fraction length of the coefficients is automatically set to the binary-point only scaling that provides you with the best precision possible given the value and word length of the coefficients.`Specify word length`

–– Specify the word length of the coefficients, in bits. In this mode, the fraction length of the coefficients is automatically set to the binary-point only scaling that provides you with the best precision possible given the value and word length of the coefficients.

For more information on the coefficients data type this block uses, see the Fixed Point section.

`Product output`

— Data type of the product output`Same as first input`

(default) | `Binary point scaling`

| `Slope and bias scaling`

Specify the data type of the product output as one of the following:

`Same as first input`

–– The block specifies the product output data type to be the same as that of the data input.`Binary point scaling`

–– Specify the word length and the fraction length of the product output, in bits.`Slope and bias scaling`

–– Specify the word length, in bits, and the slope of the product output. This block requires power-of-two slope and a bias of zero.

For more information on the product output data type, see Multiplication Data Types and the Fixed Point section.

`Accumulator`

— Data type of accumulation operation```
Same as product
output
```

(default) | `Same as first input`

| `Binary point scaling`

| `Slope and bias scaling`

Specify the data type of an accumulation operation as one of the following:

`Same as product output`

–– The block specifies the accumulator data type to be the same as that of the product output data type.`Same as first input`

–– The block specifies the accumulator data type to be the same as that of the data input.`Binary point scaling`

–– Specify the word length and the fraction length of the accumulator output, in bits.`Slope and bias scaling`

–– Specify the word length, in bits, and the slope of the accumulator output. This block requires power-of-two slope and a bias of zero.

For more information on the accumulator data type this block uses, see the Fixed Point.

`Product output polyval`

— Data type of the product polynomial value`Same as first input`

(default) | `Binary point scaling`

| `Slope and bias scaling`

Specify the data type of the product polynomial value as one of the following:

`Same as first input`

–– The block specifies the product polynomial value data type to be the same as that of the data input.`Binary point scaling`

–– Specify the word length and the fraction length of the product output polynomial, in bits.`Slope and bias scaling`

–– Specify the word length, in bits, and the slope of the product output polynomial. This block requires power-of-two slope and a bias of zero.

For more information on the product polynomial value data type this block uses, see the Fixed Point section.

This property applies when you set **Interpolation
mode** to `Farrow`

.

`Accumulator polyval`

— Data type of the accumulator polynomial value`Same as first input`

(default) | `Binary point scaling`

| `Slope and bias scaling`

Specify the data type of the accumulator polynomial value as one of the following:

`Same as first input`

–– The block specifies the accumulator polynomial value data type to be the same as that of the data input.`Binary point scaling`

–– Specify the word length and the fraction length of the accumulator polynomial value, in bits.`Slope and bias scaling`

–– Specify the word length, in bits, and the slope of the accumulator polynomial value. This block requires power-of-two slope and a bias of zero.

For more information on the accumulator polynomial value data type that this block uses, see the Fixed Point section.

This property applies when you set **Interpolation
mode** to `Farrow`

.

`Multiplicand polyval`

— Data type of multiplicand polynomial value`Same as first input`

(default) | `Binary point scaling`

| `Slope and bias scaling`

Specify the data type of the multiplicand polynomial value as one of the following:

`Same as first input`

–– The block specifies the multiplicand polynomial value data type to be the same as that of the data input.`Binary point scaling`

–– Specify the word length and the fraction length of the multiplicand polynomial value, in bits.`Slope and bias scaling`

–– Specify the word length, in bits, and the slope of the multiplicand polynomial value. This block requires power-of-two slope and a bias of zero.

For more information on the multiplicand polynomial value data type this block uses, see the Fixed Point section.

This property applies when you set **Interpolation
mode** to `Farrow`

.

`Output`

— Data type of block output`Same as accumulator`

(default) | `Same as first input`

| `Binary point scaling`

| `Slope and bias scaling`

Specify the data type of the block output as one of the following:

`Same as accumulator`

–– The block specifies the output data type to be the same as that of the accumulator output data type.`Same as first input`

–– The block specifies the output data type to be the same as that of the data input.`Binary point scaling`

–– Specify the word length and the fraction length of the block output, in bits.`Slope and bias scaling`

–– Specify the word length, in bits, and the slope of the block output. This block requires power-of-two slope and a bias of zero.

For more information on the output data type this block uses, see the Fixed Point section.

`Lock data type settings against changes by the fixed-point tools`

— Prevent fixed-point tools from overriding data typesoff (default) | on

Select this parameter to prevent the fixed-point tools from overriding the data types you specify on the block dialog box.

The delay value specified at the **Delay** port serves as an index
into the block's memory, U, which stores, at a minimum, the
**D _{max}**+1 most recent samples received
at the

For noninteger delays, at each sample time, the linear interpolation method uses the two samples in memory nearest to the specified delay to compute a value for the sample at that time.

For a vector data input, the output vector, *y*, is computed
using the following relation:

vi = floor(v) vf = v-vi y(i) = U(i-vi-1)*vf + U(i-vi)*(1-vf)

where,

*i*–– Index of the current sample*v*–– Fractional delay*vi*–– Integer part of the delay*vf*–– Fractional part of the delay*U*–– Input data vector*y*–– Output data vector*U(i-vi)*,*U(i-vi-1)*–– Two samples in memory nearest to the specified delay*i-vi*–– Distance, in samples, between the current index and the nearest point in the interpolation line.

The variable fractional delay stores the *Dmax*+1 most recent
samples received at the input for each channel, where *Dmax* is the
maximum delay specified. *U* represents the stored samples.

In the FIR interpolation mode, the block stores the
*Dmax*+*P*+1 most recent samples received at
the input for each channel, where *P* is the specified
interpolation filter half-length.

In this mode, the block provides a discrete set of fractional delays:

$$v+\frac{i}{L}\text{,}v\ge P-1,\text{}i=0,1,\mathrm{...},L-1$$

If *v* is less than *P* – 1, the behavior
depends on the **For small input delay values** parameter. You can
specify the block's behavior when the input delay value is too small to center the
kernel (less than *P*-1), by setting the **For small input delay values** parameter:

`Clip to the minimum value necessary for centered kernel`

–– The FIR interpolation method remains in use. The small input delay values are clipped to the smallest value necessary to center the kernel.`Switch to linear interpolation if kernel cannot be centered`

–– Fractional delays are computed using linear interpolation when the input delay value is less than*P*-1.

In the FIR interpolation mode, the algorithm implements a polyphase structure to
compute a value for each sample at the specified delay. Each arm of the structure
corresponds to a different delay value. The output computed for each sample
corresponds to the output of the arm with a delay value nearest to the specified
input delay. Therefore, only a discrete set of delays is actually possible. The
number of coefficients in each of the *L* filter arms of the
polyphase structure is 2*P*. In most cases, using values of
*P* between 4 and 6 provides you with reasonably accurate
interpolation values.

The `designMultirateFIR`

function designs the FIR interpolation
filter.

For example, when you set the following values:

Interpolation filter half-length (P) to 4

Interpolation points per input sample to 10

Normalized input bandwidth to 1

Stopband attenuation to 80 dB

The filter coefficients are given by:

b = designMultirateFIR(10,1,4,80);

Increasing the filter half length (*P*) increases the accuracy of
the interpolation, but also increases the number of computations performed per input
sample. The amount of memory needed to store the filter coefficients increases too.
Increasing the interpolation points per sample (*L*) increases the
number of representable discrete delay points, but also increases the simulation's
memory requirements. The computational load per sample is not affected.

The normalized input bandwidth from 0 to 1 allows you to take advantage of the
bandlimited frequency content of the input. For example, if you know that the input
signal does not have frequency content above F_{s}/4, you can
specify `0.5`

normalized bandwidth to constrain the frequency
content of the output to that range.

You can consider each of the *L* interpolation filters to
correspond to one output phase of an upsample-by-*L* FIR
filter. Therefore, the normalized input value improves the stopband in critical
regions and relaxes the stopband requirements in frequency regions without
signal energy.

In the farrow interpolation mode, the block stores the
*Dmax*+*N/2*+1 most recent samples received at
the input for each channel, where *N* is the specified farrow
filter length.

The algorithm uses the LaGrange method to interpolate values.

To increase the minimum possible delay value, select the **Disable direct
feedthrough by increasing minimum possible delay by one** check box.
Checking this box prevents algebraic loops from occurring when you use the block
inside a feedback loop.

To specify the behavior when the input delay value is too small to center the kernel (less than – 1), use the Farrow small delay action setting.

`Clip to the minimum value necessary for centered kernel`

–– The block clips small input delay values to the smallest value necessary to keep the kernel centered. This increases*D*but yields more accurate interpolation values._{min}`Use off-centered kernel`

–– The fractional delays are computed using a Farrow filter with an off-centered kernel. This mode does not increase*D*, but the results for input delay values less than – 1 are less accurate than the results achieved by keeping the kernel centered._{min}

Generate C and C++ code using Simulink® Coder™.

Design and simulate fixed-point algorithms using Fixed-Point Designer™.

The diagrams in the following sections show the data types used within the Variable Fractional Delay for fixed-point signals.

Although you can specify most of these data types, the following data types are computed internally by the block and cannot be directly specified on the block dialog box.

Data Type | Word Length | Fraction Length |
---|---|---|

vf data type | Same word length as the coefficients | Same as the word length |

HoldInteger data type | Same word length as the input delay value | `0` bits |

Integer data type | `32` bits | `0` bits |

When the input is fixed point, all internal data types are signed fixed point.

To compute the integer (*v _{i}*) and
fractional (

$$\begin{array}{l}{D}_{min}<v<{D}_{max}\Rightarrow \{\begin{array}{l}{v}_{i}\text{=}\mathrm{floor}\text{(}v\text{)}\\ {v}_{f}\text{=}v-vi\end{array}\\ \\ v\text{}\le \text{}{D}_{min}\Rightarrow \{\begin{array}{l}{v}_{i}={D}_{min}\\ {v}_{f}=0\end{array}\\ \\ \text{}v\text{}\ge \text{}{D}_{max}\Rightarrow \{\begin{array}{l}{v}_{i}\text{=}{D}_{max}\\ {v}_{f}\text{=0}\end{array}\end{array}$$

The following diagram shows the fixed-point data types used by the Linear interpolation mode of the Variable Fractional Delay block.

The following diagram illustrates how the Variable Fractional
Delay block selects the arm of the polyphase filter structure that
most closely matches the fractional delay value
(*v _{f}*).

The following diagram shows the fixed-point data types used by the variable fractional delay algorithm in the FIR interpolation mode.

You can set the coefficient, product output, accumulator, and output data types in the block. This diagram shows that input data is stored in the input buffer with the same data type and scaling as the input. The block stores filtered data and any initial conditions in the output buffer using the output data type and scaling that you set.

When at least one of the inputs to the multiplier is real, the output of the multiplier is in the product output data type. When both inputs to the multiplier are complex, the result of the multiplication is in the accumulator data type. For details on the complex multiplication, see Multiplication Data Types.

The following diagram shows the fixed-point data types used by the Farrow interpolation mode when:

Farrow filter length is set to

`4`

Farrow small delay action is set to

`Clip to the minimum value necessary for centered kernel`

The following diagram shows the fixed-point data types used by the Farrow interpolation mode when:

Farrow filter length is set to

`4`

.Farrow small delay action is set to

`Use off-centered kernel`

.

`Diff`

is computed from the integer part of the delay value
(*v _{i}*) and the farrow filter
length (

$$\begin{array}{l}Diff={v}_{i}-\left(\frac{N-1}{2}\right)\\ Diff\ge 0\Rightarrow Diff=0\\ Diff<0\Rightarrow Diff=-Diff\end{array}$$

The following diagram shows the fixed-point data types used by the Digital Filter's FIR direct form filter.

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Was this topic helpful?

You can also select a location from the following list:

- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)