内存
从前时间步骤的输出输入
- 库:
金宝appSimulink /离散
HDL编码器 /离散
描述
这内存block holds and delays its input by one major integration time step. When placed in an iterator subsystem, it holds and delays its input by one iteration. This block accepts continuous and discrete signals. The block accepts one input and generates one output. Each signal can be a scalar, vector, matrix, or N-D array. If the input is non-scalar, the block holds and delays all elements of the input by the same time step.
您使用初始条件范围。仔细选择此参数可以最大程度地减少不需要的输出行为。但是,您无法指定示例时间。该块的示例时间取决于所使用的求解器的类型,或者您可以指定继承它。这继承样本时间参数确定样品时间是继承还是基于求解器。
Tip
当这两个条件都是正确时,请避免使用内存块:
您的模型使用可变步骤求解器
ode15s
或者ODE113
。模拟过程中块的输入变化。
当内存块继承离散的示例时间时,该块类似于单位延迟堵塞。However, the Memory block does not support state logging. If logging the final state is necessary, use a单位延迟取而代之的是。
与类似块的比较
这内存,单位延迟, 和Zero-Order Holdblocks provide similar functionality but have different capabilities. Also, the purpose of each block is different.
该表显示了每个块的建议使用。
堵塞 | 块的目的 | Reference Examples |
---|---|---|
单位延迟 | 使用您指定的离散示例时间实施延迟。该块以离散的示例时间接受并输出信号。 |
|
内存 | 通过一个主要集成时间步骤实施延迟。理想情况下,该块接受连续(或在次要时间步中固定)信号,并输出一个固定在次要时间步长的信号。 |
|
Zero-Order Hold | Convert an input signal with a continuous sample time to an output signal with a discrete sample time. |
每个块具有以下功能。
能力 | 内存 | 单位延迟 | Zero-Order Hold |
---|---|---|---|
Specification of initial condition | 是的 | 是的 | 不, because the block output at time t = 0 must match the input value. |
样品时间的规格 | 不,因为该块只能从驾驶块或用于整个模型的求解器继承样品时间。 | 是的 | 是的 |
金宝app支持基于框架的信号 | 不 | 是的 | 是的 |
金宝app支持状态记录 | 不 | 是的 | 不 |
巴士支持金宝app
这内存block is a bus-capable block. The input can be a virtual or nonvirtual bus signal subject to the following restrictions:
初始条件must be zero, a nonzero scalar, or a finite numeric structure.
如果初始条件is zero or a structure, and you specify a状态名称,输入不能是虚拟总线。
如果初始条件is a nonzero scalar, you cannot specify a状态名称。
For information about specifying an initial condition structure, seeSpecify Initial Conditions for Bus Elements。
All signals in a nonvirtual bus input to a内存block must have the same sample time, even if the elements of the associated bus object specify inherited sample times. You can use a费率转换封锁以更改单个信号的样本时间或总线中的所有信号的屏蔽时间。看Modify Sample Times for Nonvirtual Buses和具有公共汽车的块了解更多信息。
You can use an array of buses as an input signal to a内存堵塞。您可以指定初始条件parameter with:
价值
0
。In this case, all the individual signals in the array of buses use the initial value0
。一系列结构,指定总线数组中每个单个信号的初始条件。
单个标量结构为总线类型定义的每个元素指定初始条件。使用此技术为阵列中的每个总线指定相同的初始条件。
有关定义和使用一系列公共汽车的详细信息,请参阅在公共汽车阵列中的集体非虚拟巴士。
端口
输入
Output
Parameters
Model Examples
块特征
Data Types |
|
直接进料 |
|
多维信号 |
|
可变大小信号 |
|
零交叉检测 |
|
扩展功能
Version History
看Also
话题
- C Code Generation Configuration for Model Interface Elements(Simulink Coder)
- Organize Parameter Data into a Structure by Using Struct Storage Class(Embedded Coder)
- 数据对象