Power sensor

electrical.power_sensor

Outputs the power in W: the current from p to n times the voltage of pv over nv. The current path has no drop and the voltage pins draw no current.

Ports

NameDomainDirection
pelectrical
nelectrical
pvelectrical
nvelectrical
ysignalout

Equations

p.v = n.v
0 = p.i + n.i
pv.i = 0
nv.i = 0
y = p.i * (pv.v - nv.v)