Zero-Order Hold
Performs a zero-order hold during a calculation step.
blockType: ZeroOrderHold
Path in the library:
|
Description
Block Zero-Order Hold stores the value on the input during the specified calculation step. If the input signal is a vector, the block stores all elements of the vector for the same sampling period.
The calculation step is set by the parameters Sample time. The value -1 means that the block inherits the value of the calculation step.
|
Do not use a block Zero-Order Hold block to create a transition between blocks operating at different sampling rates (from fast to slow). Instead, use the block Rate Transition. |
Comparison with similar units
The Memory, Unit Delay and Zero-Order Hold blocks provide similar functionality but have different features. In addition, the purpose of each block is different.
The table shows the recommended usage for each block.
| Block | Block Purpose |
|---|---|
Realises the delay using the specified calculation step. The block receives and outputs signals with a discrete calculation step. |
|
Realises the delay using one basic calculation step. Ideally, the block accepts continuous (or fixed with a small time step) signals and outputs a signal that is fixed with a small time step. |
|
Zero-Order Hold |
Converts a continuous input signal to a discrete signal. |
Each unit has the following capabilities.
| Capability | Memory | Unit Delay | Zero-Order Hold |
|---|---|---|---|
Initial condition setting |
Yes |
Yes |
No, because the block output at time |
Setting the calculation step |
No, because the block can only inherit the calculation step from the control block or solver used for the whole model. |
Yes |
Yes |
Support for frame-based signals |
No |
Yes |
Yes |
Support for status logging |
No |
Yes |
No |
Ports
Input
#
IN_1
—
input signal
scalar | vector
Details
The input signal that the unit holds for one calculation step.
| Data types |
|
| Complex numbers support |
No |
Output
#
OUT_1
—
output signal
scalar | vector
Details
The output signal, i.e. the input signal held for one calculation step.
| Data types |
|
| Complex numbers support |
No |
Parameters
Main
#
Sample time —
interval between calculation steps
SampleTime (real number / vector of two real numbers)
Details
Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameter to -1.
Do not specify a continuous calculation step (0). This block supports only discrete calculation step. When this parameter is -1, the inherited calculation step must be discrete, not continuous.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |