Zero-Order Hold
Delay the signal by one calculation step.
Description
The Zero-Order Hold block stores the value on the input during the specified calculation step. If the input signal is a vector, the block holds all elements of the vector for the same sampling period.
The calculation step is specified by the Sample time parameter. The value -1
means that the block inherits the value of the calculation step.
Do not use the 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
Parameters
Sample time (-1 for inherited) - interval between calculation steps
-1.0 (by default)
| scalar
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.