Delay
Page in progress. |
Delay the input signal for a fixed or variable number of calculation steps.
|
|
|
|
|
|
|
Description
Block Delay delays the input signal without changing it. The unit determines the delay time based on either the value of the parameter d (constant delay value) or the input signal d (variable delay value). Delay length (constant delay value) or the input signal d (variable delay value).
The value of the block output at the initial moment of time depends on several factors, namely on the value of the parameters Initial condition and the time of simulation start.
The external reset parameter determines whether the block output is reset to the initial state when triggered. Parameters Show enable port parameter defines whether the block execution at each time step is controlled by an external enable signal.
The value of the block output at the initial time step
The value of the output during the first few time steps of the simulation depends on the block’s calculation step, lag length, and simulation start time. The block supports specifying or inheriting discrete calculation steps to determine the time interval between samples.
The table below shows the block output values Delay for the first few calculation steps with these settings. The block inherits a discrete calculation step as [Tsampling, Toffset]
, where:
-
Tsampling
- sampling period; -
Toffset
- initial time offset; -
n
- value of the parameters Delay length; -
Tstart
- simulation start time for the model.
Simulation time range | Block Output |
---|---|
from |
Zero |
from |
Parameters Initial condition |
after |
Input signal |
Behaviour with external enable signal
Checking the checkbox Show enable port enables the Enable port. When the Enable port is enabled, the unit operates in this order:
-
Checks whether the enable condition is met.
-
If the reset port is enabled, checks the reset condition.
-
Performs block functionality Delay.
The block performs the following operations on the Enable port:
-
When enabled, the block output is the initial value of the condition ( ).
-
For successive enable signals, the block accepts the last state of the input signal u.
-
If the port is not enabled at the beginning of the simulation, the block Delay outputs
0
. -
During the simulation, if the port becomes disabled after being enabled, the block is not executed and stores its last value.
Ports
Output
#
OUT_1
—
output signal
scalar
| vector
| matrix
| array
Details
An output signal that represents the input signal delayed by a given time.
Data types |
|
Complex numbers support |
Yes |
Input
#
Enable
—
external signal authorising execution of the block
scalar
Details
Enable the signal that enables or disables the execution of the block.
Dependencies
To use this port, select the check box for the parameters Show enable port
Data types |
|
Complex numbers support |
Yes |
#
Reset
—
external block reset signal
scalar
Details
An external signal that resets block execution to the initial state.
Dependencies
To use this port, set parameters External reset any value other than None
Data types |
|
Complex numbers support |
Yes |
#
x0
—
initial condition
scalar
| vector
Details
The initial condition is set as inherited from the input port.
Dependencies
To use this port, set the parameters to Initial condition source value Input port
.
Data types |
|
Complex numbers support |
Yes |
#
d
—
lag length
scalar
| vector
| matrix
| array
Details
The lag length given by an external signal.
Dependencies
To use this parameter, set the parameters to Delay length source value Input port
.
Data types |
|
Complex numbers support |
Yes |
#
u
—
input signal
scalar
| vector
| matrix
| array
Details
The input signal that the unit delays according to the unit’s settings.
Data types |
|
Complex numbers support |
Yes |
Parameters
Data
#
Delay length source —
lag value source
Dialog
| Input port
Details
Specifies the source of the input signal lag value:
-
Dialog
- delay value is set by the parameters Delay length. -
Input port
- delay value is determined by the signal value on the d port, in this case it is also possible to specify the maximum delay value with the parameters Delay length upper limit.
An out-of-range, non-integer or negative value in the dialogue box (fixed delay) returns an error. An out-of-range value obtained from the input port (variable lag) is assumed to be equal to the range limit. A non-numeric value obtained from the input port (variable delay) is rounded to a whole number.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Delay length —
lag length
Int64 integer
Details
The amount of lag of the signal.
Dependencies
To use this parameter, set the parameters to Delay length source value Dialog
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Delay length upper limit —
upper limit of lag length
Int64 integer
Details
The maximum allowable lag value for usage of the input signal to determine the lag value.
Dependencies
To use this parameter, set the parameters to Delay length source value Input port
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Initial condition source —
initial value source
Dialog
| Input port
Details
Specifies the source of the input signal’s initial value:
-
Dialog
- the initial value is set by the parameters Initial condition. -
Input port
- The initial value is set by the value of the signal on the x0 port.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Initial condition —
block output at the first calculation steps
Scalar / array of real and/or complex numbers
Details
Block output at the first calculation steps.
Dependencies
To use this parameter, set parameter Initial condition source value Dialog
.
Default value |
|
Program usage name |
|
Tunable |
Yes |
Evaluatable |
Yes |
Algorithm
#
Input processing —
specifying processing on the basis of a sample or frame
Elements as channels (sample based)
| Columns as channels (frame based)
Details
Specify whether the block performs sample-based or frame-based processing:
-
Columns as channels (frame based)
- each column of the input signal is treated as an independent channel (frame based processing). -
Elements as channels (sample based)
- each element of the input signal is treated as an independent channel (sample based processing).
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Prevent direct feedthrough —
prevent a direct through connection
Logical
Details
Checking this box prevents a direct connection from the input port u to the output port. However, this check box cannot prevent a direct pass-through value from the initial state port x0 to the output port.
Dependencies
To use this parameter, set parameter Delay length source value Input port
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Diagnostic for delay length —
response when checking the lag length
None
| Error
Details
Determines whether an error is generated when the input d is less than the lower limit or greater than the parameter value Delay length upper limit. The lower limit depends on the setting Prevent direct feedthrough:
-
If unchecked, the lower limit is zero.
-
If the check box is checked, the lower limit is
1
for sample-based signals and the frame length for frame-based signals.
Diagnostic options include:
-
None
- `no action.
-
Error
- Engee terminates the simulation and displays the error.
Dependencies
To use this parameter, set the parameters to Delay length source value Input port
.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
Control
#
Show enable port —
show power-on port
Logical
Details
Select the checkbox to control the display of the enable port. The block is considered enabled when the input to this port is different from zero, and disabled when the input is 0
. The value of the input is checked at the same time step as the block execution.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
External reset —
external status reset
None
| Rising
| Falling
| Either
| Level
| Level hold
Details
Specify the trigger event to be used to reset states back to initial conditions. Options to select:
-
None
- no reset. -
Rising
- rising edge reset. -
Falling
- Resetting on a falling edge. -
Either
- Reset on rising or falling edge. -
Level
- reset in either case:-
When the reset signal is different from zero at the current time step.
-
When the reset signal value changes from non-zero in the previous time step to zero in the current time step.
-
-
Level hold
- reset when the reset signal is different from zero at the current time step.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
Parameters
#
Sample time —
interval between calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameters to -1
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |