Pulse

signal.pulse

Square wave that starts at time t0: each period T begins with a high part of length duty T at offset + k, then returns to offset.

Ports

NameDomainDirection
ysignalout

Parameters

NameUnitDefaultRangeDescription
k11Amplitude
Ts10 to ∞Period
duty10.50 to 1Fraction of the period spent high
offset10Value when low
t0s0Start time

Variables

NameUnitStartDescription
fallst0 + duty * TTime of the next falling edge
risest0 + TTime of the next rising edge

Equations

der(fall) = 0
der(rise) = 0
when time >= rise then reinit(fall, rise + duty * T), reinit(rise, rise + T)
y = offset + (if time < t0 then 0 else if time < fall then k else 0)