Zero-order hold

signal.zero_order_hold

Samples the input every Ts seconds and holds that value until the next sample. The first sample is taken at t = Ts; before it the output is 0.

Ports

NameDomainDirection
usignalin
ysignalout

Parameters

NameUnitDefaultRangeDescription
Tss0.10 to ∞Sample period

Variables

NameUnitStartDescription
held1Last sampled input
nextsTsTime of the next sample

Equations

der(held) = 0
der(next) = 0
when time >= next then reinit(held, u), reinit(next, next + Ts)
y = held