Ideal switch

electrical.ideal_switch

Switch that is closed while the signal input u is above 0.5. Closed it has resistance Ron, open a leak conductance Goff.

Ports

NameDomainDirection
pelectrical
nelectrical
usignalin

Parameters

NameUnitDefaultRangeDescription
RonOhm0.000011e-12 to ∞Resistance when closed
GoffS0.000010 to ∞Conductance when open

Variables

NameUnit
vV
iA

Equations

v = p.v - n.v
0 = p.i + n.i
i = p.i
i = if u > 0.5 then v / Ron else Goff * v