pySimBlocks.blocks.operators.zero_order_hold¶
- class pySimBlocks.blocks.operators.zero_order_hold.ZeroOrderHold(name: str, sample_time: float)[source]¶
Bases:
BlockZero-Order Hold (ZOH) block.
Samples the input at discrete instants separated by
sample_timeand holds the sampled value constant between sampling instants. The input shape is frozen after the first resolution.- sample_time¶
Sampling period in seconds.
- direct_feedthrough = True¶
True if outputs depend directly on inputs.
- initialize(t0: float) None[source]¶
Sample the initial input and set up the hold state.
- Parameters:
t0 – Initial simulation time in seconds.
- Raises:
RuntimeError – If input
'in'is None at initialization.ValueError – If input is not 2D.