Products & Services Industries Academia Support User Community Company

Learn more about Simulink   

Unit Delay - Delay 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.

Data Type Support

The Unit Delay block accepts real or complex signals of any data type supported by Simulink software, including fixed-point and enumerated 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 software, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

During simulation, the block uses the following values:

See Block State Storage and Interfacing Considerations in the Real-Time Workshop documentation for more information.

Initial conditions

Specify the output of the simulation for the first sampling period, during which the output of the Unit Delay block is otherwise undefined.

Settings

Default: 0

The Initial conditions parameter is converted from a double to the input data type offline using round-to-nearest and saturation.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Sample time (-1 for inherited)

Enter the discrete interval between sample time hits or specify another appropriate sample time such as continuous or inherited.

Settings

Default: -1

By default, the block inherits its sample time based upon the context of the block within the model. To set a different sample time, enter a valid sample time based upon the table in Types of Sample Time.

See also How to Specify the Sample Time in the online documentation for more information.

Command-Line Information

See Block-Specific Parameters for the command-line information.

State name

Use this to assign a unique name to each state.

Settings

Default: ' '

Tips

Dependencies

This parameter enables State name must resolve to Simulink signal object when you click the Apply button.

Command-Line Information

See Block-Specific Parameters for the command-line information.

State name must resolve to Simulink signal object

Require that state name resolve to Simulink signal object.

Settings

Default: Off

On

Require that state name resolve to Simulink signal object.

Off

Do not require that state name resolve to Simulink signal object.

Dependencies

State name enables this parameter.

This parameter enables Real-Time Workshop storage class.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Real-Time Workshop storage class

Select state storage class.

Settings

Default: Auto

Auto

Auto is the appropriate storage class for states that you do not need to interface to external code.

ExportedGlobal

State is stored in a global variable

ImportedExtern

model_private.h declares the state as an extern variable.

ImportedExternPointer

model_private.h declares the state as an extern pointer.

Dependencies

State name enables this parameter.

Setting this parameter to ExportedGlobal, ImportedExtern, or ImportedExternPointer enables Real-Time Workshop storage type qualifier.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Block State Storage Classes in the Real-Time Workshop User's Guide.

Real-Time Workshop storage type qualifier

Specify Real-Time storage type qualifier.

Settings

Default: ' '

If left blank, no qualifier is assigned.

Dependencies

Setting Real-Time Workshop storage class to ExportedGlobal, ImportedExtern, or ImportedExternPointer enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

Bus Support

The Unit Delay block is a bus-capable block. The input can be a virtual or nonvirtual bus signal subject to the following restrictions:

All signals in a nonvirtual bus input to a Unit Delay block must have the same sample time, even if the elements of the associated bus object specify inherited sample times. You can use a Rate Transition block to change the sample time of an individual signal, or of all signals in a bus. See Using Composite Signals and Bus-Capable Blocks for more information.

Characteristics

Bus-capable

Yes, with restrictions as noted in Bus Support

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

Multidimensionalized

Yes

Zero-Crossing Detection

No

See Also

Unit Delay Enabled, Unit Delay Enabled External IC, Unit Delay Enabled Resettable, Unit Delay Enabled Resettable External IC, Unit Delay External IC, Unit Delay Resettable, Unit Delay Resettable External IC, Unit Delay With Preview Enabled, Unit Delay With Preview Enabled Resettable, Unit Delay With Preview Enabled Resettable External RV, Unit Delay With Preview Resettable, Unit Delay With Preview Resettable External RV

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS