Main Content

Unit Delay With Preview Enabled Resettable (Obsolete)

Output signal and signal delayed by one sample period, if external enable signal is on, with external reset

Compatibility

Note

The Unit Delay With Preview Enabled Resettable block is not recommended. This block was removed from the Discrete library in R2016b. In new models, use the Delay block (with parameters set appropriately). Existing models that contain the Unit Delay With Preview Enabled Resettable block continue to work for backward compatibility.

  • Unit Delay With Preview Enabled Resettable (Obsolete) block

Library

Additional Math & Discrete / Additional Discrete (until R2016b)

Description

The Unit Delay With Preview Enabled Resettable block supports calculations that have feedback and depend on the current input. The block can reset its state based on a reset signal R.

The block has three input ports: one for the input signal u, one for the external enable signal E, and one for the external reset signal R.

When the enable signal E is on and the reset signal R is false, the first port outputs the signal and the second port outputs the signal delayed by one sample period.

When the enable signal E is on and the reset signal R is true, the block resets the current state to the initial condition given by the Initial condition parameter. The first output signal is forced to equal the initial condition. The second output signal is not affected until one time step later.

When the enable signal is off, the block is disabled, and the state and output values do not change, except during resets.

The enable signal is on when E is not 0, and off when E is 0. The enable and reset actions are vectorized and support scalar expansion.

Having two outputs is useful for implementing recursive calculations where the result includes the most recent inputs. The second output can feed back into calculations of the block's inputs without causing an algebraic loop. Meanwhile, the first output shows the most up-to-date calculations.

You specify the time between samples with the Sample time parameter. A setting of -1 means that the block inherits the Sample time.

Data Type Support

The Unit Delay With Preview Enabled Resettable block accepts signals of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

  • Boolean

  • Enumerated

The outputs have the same data type as the input u. For enumerated signals, the Initial condition must be of the same enumerated type as the input u.

For more information, see Data Types Supported by Simulink in the Simulink® documentation.

Parameters

Initial condition

Specify the initial output of the simulation.

Sample time

Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See Specify Sample Time in the online documentation for more information.

Characteristics

Data Types

Double | Single | Boolean | Base Integer | Fixed-Point | Enumerated

Sample Time

Specified in the Sample time parameter

Direct Feedthrough

Yes, to first output port

No, to second output port

Multidimensional Signals

No

Variable-Size Signals

No

Zero-Crossing Detection

No

Code Generation

Yes

Version History

Introduced before R2006a