Engee documentation

Tapped Delay

Delay the scalar signal for several sampling periods and output all delayed versions.

tapped delay

Description

The Tapped Delay block delays the input signal by the specified number of sample periods and provides an output for each delay. For example, if you specify 4 for the Number of delays parameter and Oldest for the Order output vector starting with, the block provides four outputs - the first delayed by four sample periods, the second delayed by three, and so on. Use this block to sample a signal in time or resample a signal at a different rate.

The block takes a single signal (scalar, vector, or matrix) as input and generates an output vector containing the data for each incremental delay. Specify the order of the delayed signals in the output vector using the Order output vector starting with parameter as follows:

  • Oldest - orders the output vector starting with the oldest version and ending with the newest.

  • Newest - orders the output vector starting with the newest version and ending with the oldest.

Set the output vector for the first sampling period using the Initial condition parameter. Careful selection of this parameter can mitigate undesirable output behaviour.

Specify the time between samples using the Sample time parameter. Specify the number of delays using the Number of delays parameter. Each delay is equivalent to a discrete time operator , which represents a block Unit Delay.

If the Number of delays parameter is -1, the output singal inherits the dimensionality of the input signal. In this case vectorisation becomes available. But the Initial condition dimension (IC) must not change the dimension of the output signal. That is, for example, if the input is a 2x2 matrix and IC is a vector of length 2, then the output dimension is equal to the input dimension - 2 by 2, and the IC value extends to the corresponding dimension. But if the input is a vector of length 2 and the IC is a 2 by 2 matrix, the block will generate an error because this configuration will require a 2 by 2 output signal, which will change the dimensionality of the input signal.

Ports

Input

Port_1 - input signal
scalar | vector | matrix

Input signal for delay.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Int128, UInt128, Bool, Fixed-point.

Support for complex numbers: Yes

Output

Port_1 - delayed input signal variants
scalar | vector | matrix

All versions of delayed input signal. Use the Order output vector starting with parameter to specify the order of delayed signals in the output vector.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Int128, UInt128, Bool, Fixed-point.

Support for complex numbers: Yes

Parameters

Initial condition - initial output
0.0 (by default) | scalar | vector | matrix

Specify the initial output of the simulation. The Initial condition parameter is converted from Float64 to the input data type offline using round-to-nearest and saturation.

Usage in program code

Block parameter

vinit

Type

character vector

Values

scalar | vector | matrix

* By default*

0.0

Sample time - time between samples
-1 (By default) | scalar.

Specify the time interval between samples. To inherit the interval between calculation steps, set this parameter to -1.

Usage in program code

Block parameter

samptime

Type

character vector

Values

scalar

* By default*

-1

Number of delays - number of discrete time operators
4 (by default) | positive scalar | -1 (for inherited)

Specify the number of discrete time operators as positive scalar or -1 for inherited.

Usage in program code

Block parameter

NumDelays

Type

character vector

Values

positive scalar |-1 (inherited)

By default

4

Order output vector starting with - order of output
Oldest (by default) | Newest

Specify whether to output the oldest or the newest version first.

Usage in program code

Block parameter

DelayOrder

Type

character vector

Values

Oldest | Newest

By default

Oldest

Include current input in output vector - include current input in output vector
Off (by default) | On

Select this checkbox to include current input in output vector.

Usage in program code

Block parameter

includeCurrent

Type

character vector

Values

enabled | enabled

By default

enabled