Pulse current

electrical.pulse_current

Ideal square wave current source: offset + I for the first duty fraction of each period T, offset for the rest. Positive current flows through the source from p to n.

Ports

NameDomain
pelectrical
nelectrical

Parameters

NameUnitDefaultRangeDescription
IA1Pulse amplitude
Ts10 to ∞Period
duty10.50 to 1Fraction of the period at the high level
offsetA0Current between pulses

Variables

NameUnit
vV
iA

Equations

v = p.v - n.v
0 = p.i + n.i
i = p.i
i = offset + (if time - T * floor(time / T) < duty * T then I else 0)