Documentation

Unit Delay

延迟信号一个样本周期

  • 库:
  • Simulink / Discrete

    HDL Coder / Discrete

描述

TheUnit Delayblock holds and delays its input by the sample period you specify. When placed in an iterator subsystem, it holds and delays its input by one iteration. This block is equivalent to the z-1离散时间操作员。该块接受一个输入并生成一个输出。每个信号可以是标量或向量。如果输入是向量,则块将块保存并延迟矢量的所有元素缩短相同的示例周期。

您可以在第一个采样期内指定块输出初始条件范围。Careful selection of this parameter can minimize unwanted output behavior. You specify the time between samples with the采样时间范围。设置-1指块继承采样时间

不te

TheUnit Delay如果您使用它来以不同的样本速率运行的块之间创建过渡,则块错误。使用费率转换取而代之的是。

与类似块的比较

The内存,Unit Delay,零订单保持blocks provide similar functionality but have different capabilities. Also, the purpose of each block is different.

This table shows recommended usage for each block.

块的目的 参考示例
Unit Delay 使用您指定的离散示例时间实施延迟。该块以离散的示例时间接受并输出信号。
内存 通过一个主要集成时间步骤实施延迟。理想情况下,该块接受连续(或在次要时间步中固定)信号,并输出一个固定在次要时间步长的信号。
零订单保持 Convert an input signal with a continuous sample time to an output signal with a discrete sample time.

每个块具有以下功能。

Capability 内存 Unit Delay 零订单保持
Specification of initial condition 是的 是的 不, because the block output at time t = 0 must match the input value.
Specification of sample time 不,因为该块只能从驾驶块或用于整个模型的求解器继承样品时间。 是的 是的
金宝app支持基于框架的信号 是的 是的
金宝app支持状态记录 是的

端口

输入

展开全部

输入signal that the block delays by one sample period.

数据类型:单身的|双倍的|int8|INT16|INT32|UINT8|UINT16|UINT32|布尔|固定点|枚举|公共汽车

Output

展开全部

Output signal that is the input delayed by one sample period.

数据类型:单身的|双倍的|int8|INT16|INT32|UINT8|UINT16|UINT32|布尔|固定点|枚举|公共汽车

Parameters

展开全部

主要的

在第一个采样期内指定模拟的输出,在此期间Unit Delay块是不确定的。

Programmatic Use

块参数:InitialCondition
类型:角色向量
Value: scalar | vector
Default:'0'

Specify whether the block performs sample- or frame-based processing:

  • 列作为通道(基于帧)— Treat each column of the input as a separate channel (frame-based processing).

    不te

    Frame-based processing requires a DSP System Toolbox™ license.

    有关更多信息,请参阅Sample- and Frame-Based Concepts(DSP系统工具箱)。

  • Elements as channels (sample based)- 将输入的每个元素视为单独的通道(基于样本的处理)。

Use输入processing来specify whether the block performs sample- or frame-based processing. The block accepts frame-based signals for the inputu。All other input signals must be sample-based.

输入标志al u 输入Processing Mode 块Works?
Sample based Sample based 是的
Frame based 不, produces an error
Sample based Frame based 是的
Frame based 是的

有关这两种处理模式的更多信息,请参见Sample- and Frame-Based Concepts(DSP系统工具箱)。

Programmatic Use

块参数:输入过程
类型:角色向量
Values:'Columns as channels (frame based)'|'Elements as channels (sample based)'
Default:'Elements as channels (sample based)'

Enter the discrete interval between sample time hits or specify-1继承样品时间。

也可以看看指定样本时间

Programmatic Use

块参数:SampleTime
类型:角色向量
Value:真正的标量
Default:'-1'

状态属性

Use this parameter to assign a unique name to the block state. The default is''。当此字段为空白时,未分配名称。使用此参数时,请记住以下注意事项:

  • A valid identifier starts with an alphabetic or underscore character, followed by alphanumeric or underscore characters.

  • 状态名称仅适用于所选块。

此参数启用State name must resolve to Simulink signal objectwhen you clickApply

有关更多信息,请参阅Apply Storage Classes to Individual Signal, State, and Parameter Data Elements(金宝appSimulink编码器)。

Programmatic Use

块参数:StateName
类型:角色向量
值:唯一名称
Default:''

指定是否要求该状态名称解析以模拟信号对象。金宝app如果选择,则该软件在运行时会生成错误,如果指定与Simulink信号对象的名称不匹配的状态名称。金宝app

依赖性

Enabled when you give the parameterState namea value and set the model configuration parameter标志al resolution来a value other than没有任何

选择此复选框禁用代码生成存储类

Programmatic Use

块参数:StateMustResolveToSignalObject
类型:角色向量
Values:'离开'|'on'
Default:'离开'

Choose a custom storage class package by selecting a signal object class that the target package defines. For example, to apply custom storage classes from the built-in packageMPT, 选择MPT。标志al。Unless you use an ERT-based code generation target with Embedded Coder®,自定义存储类不影响生成的代码。

If the class that you want does not appear in the list, selectCustomize class lists。有关说明,请参阅Target Class Does Not Appear in List of Signal Object Classes(嵌入式编码器)。

有关存储课的信息,请参阅Apply Storage Classes to Individual Signal, State, and Parameter Data Elements(金宝appSimulink编码器)。有关自定义存储类的信息,请参阅Apply Built-In and Customized Storage Classes to Data Elements(嵌入式编码器)。

Programmatic Use

块参数:statesIgnAlobject
类型:角色向量
值:的金宝app仿真软件。标志al' | ''
Default:的金宝app仿真软件。标志al'

Select state storage class for code generation. If you do not need to interface to external code, select汽车

有关更多信息,请参阅Apply Storage Classes to Individual Signal, State, and Parameter Data Elements(Simulink Coder) andApply Built-In and Customized Storage Classes to Data Elements(嵌入式编码器)。

Programmatic Use

块参数:StateStorageClass
类型:角色向量
值:'汽车'|'Model default'|'ExportedGlobal''|“进口”|'ImportedExternPointer'|'Custom'
Default:'汽车'

块Characteristics

数据类型

布尔|公共汽车|双倍的|枚举|固定点|integer|单身的

Direct Feedthrough

是的

多维信号

是的

可变大小信号

是的

Zero-Crossing Detection

no

扩展功能

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Introduced before R2006a