Analog.PowerSensor
Usage
TranslatedComponents.Analog.PowerSensor()
Connectors
pc- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)nc- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)pv- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)nv- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)power- This connector represents a real signal as an output from a component (RealOutput)
Behavior
Source
dyad
component PowerSensor
pc = Pin()
nc = Pin()
pv = Pin()
nv = Pin()
power = RealOutput()
voltageSensor = VoltageSensor()
currentSensor = CurrentSensor()
product = BlockComponents.Product()
relations
connect(pv, voltageSensor.p)
connect(voltageSensor.n, nv)
connect(pc, currentSensor.p)
connect(currentSensor.n, nc)
connect(currentSensor.i, product.u2)
connect(voltageSensor.v, product.u1)
connect(product.y, power)
endFlattened Source
dyad
component PowerSensor
pc = Pin()
nc = Pin()
pv = Pin()
nv = Pin()
power = RealOutput()
voltageSensor = VoltageSensor()
currentSensor = CurrentSensor()
product = BlockComponents.Product()
relations
connect(pv, voltageSensor.p)
connect(voltageSensor.n, nv)
connect(pc, currentSensor.p)
connect(currentSensor.n, nc)
connect(currentSensor.i, product.u2)
connect(voltageSensor.v, product.u1)
connect(product.y, power)
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses