Simulink Reference Previous page   Next Page
Unit Delay

Delay a signal one sample period

Library

Discrete

Description

The Unit Delay block delays its input by the specified sample period. This block is equivalent to the z-1 discrete-time operator. The block accepts one input and generates one output, which can be either both scalar or both vector. If the input is a vector, all elements of the vector are delayed by the same sample period.

You specify the block output for the first sampling period with the Initial conditions parameter. Careful selection of this parameter can minimize unwanted output behavior. The time between samples is specified with the Sample time parameter. A setting of -1 means the sample time is inherited.

The Unit Delay block provides a mechanism for discretizing one or more signals in time, or for resampling the signal at a different rate. If your model contains multirate transitions, then you must add Unit Delay blocks between the slow-to-fast transitions. The sample rate of the Unit Delay block must be set to that of the slower block. For fast-to-slow transitions, use the Zero Order Hold block. For more information about multirate transitions, refer to the Simulink or the Real-Time Workshop documentation.

Data Type Support

The Unit Delay block accepts real or complex signals of any data type supported by Simulink, including fixed-point data types. If the data type of the input signal is user-defined, the initial condition must be zero.

For a discussion on the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.

Parameters and Dialog Box

Initial conditions
The output of the simulation for the first sampling period, during which the output of the Unit Delay block is otherwise undefined. The Initial conditions parameter is converted from a double to the input data type offline using round-to-nearest and saturation.
Sample time (-1 for inherited)
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See Specifying Sample Time in the online documentation for more information.

The State properties pane of this block pertains to code generation and has no effect on model simulation. See "Block States: Storing and Interfacing" in the Real-Time Workshop documentation for more information.

Characteristics

Direct Feedthrough
No
Sample Time
Specified in the Sample time parameter
Scalar Expansion
Yes, of input or initial conditions
States
Yes--inherited from driving block for nonfixed-point data types.
Dimensionalized
Yes
Zero Crossing
No


Previous page  Uniform Random Number Unit Delay Enabled Next page

© 1994-2005 The MathWorks, Inc.