ModelingToolkitStandardLibrary: Electrical Components
Electrical Utilities
ModelingToolkitStandardLibrary.Electrical.Pin
— FunctionPin(; name)
A pin in an analog circuit.
States:
v(t)
: [V
] The voltage at this pini(t)
: [A
] The current passing through this pin
ModelingToolkitStandardLibrary.Electrical.OnePort
— FunctionOnePort(; name, v_start=0.0, i_start=0.0)
Component with two electrical pins p
and n
and current i
flows from p
to n
.
States:
v(t)
: [V
] The voltage across componentp.v - n.v
i(t)
: [A
] The current passing through positive pin
Parameters:
v_start
: [V
] Initial voltage across the componenti_start
: [A
] Initial current through the component
Connectors:
p
Positive pinn
Negative pin
ModelingToolkitStandardLibrary.Electrical.DigitalPin
— FunctionDigitalPin(; name)
A pin in a digital circuit.
States:
v(t)
: [V
] The voltage at this pini(t)
: [A
] The current passing through this pinval(t)
: The binary value of the pin at this point. A voltage from0V
to0.8V
is a binary value of0
.
A voltage in the range 2.0V
to 5.0V
is 1
. Any other value is X
.
Analog Components
ModelingToolkitStandardLibrary.Electrical.Ground
— FunctionGround(; name)
Ground node with the potential of zero and connector g
. Every circuit must have one ground node.
Connectors:
g
ModelingToolkitStandardLibrary.Electrical.Resistor
— FunctionResistor(; name, R)
Creates an ideal Resistor following Ohm's Law.
States:
See OnePort
Connectors:
p
Positive pinn
Negative pin
Parameters:
R
: [Ω
] Resistance
ModelingToolkitStandardLibrary.Electrical.Conductor
— FunctionConductor(;name, G)
Creates an ideal conductor.
States:
See OnePort
Connectors:
p
Positive pinn
Negative pin
Parameters:
G
: [S
] Conductance
ModelingToolkitStandardLibrary.Electrical.Capacitor
— FunctionCapacitor(; name, C)
Creates an ideal capacitor.
States:
v(t)
: [V
] The voltage across the capacitor, given byD(v) ~ p.i / C
Connectors:
p
Positive pinn
Negative pin
Parameters:
C
: [F
] Capacitancev_start
: [V
] Initial voltage of capacitor
ModelingToolkitStandardLibrary.Electrical.Inductor
— FunctionInductor(; name, L)
Creates an ideal Inductor.
States:
See OnePort
Connectors:
p
Positive pinn
Negative pin
Parameters:
L
: [H
] Inductancei_start
: [A
] Initial current through inductor
ModelingToolkitStandardLibrary.Electrical.IdealOpAmp
— FunctionIdealOpAmp(; name)
Ideal operational amplifier (norator-nullator pair). The ideal OpAmp is a two-port. The left port is fixed to v1 = 0
and i1 = 0
(nullator). At the right port both any voltage v2
and any current i2
are possible (norator).
States:
See TwoPort
Connectors:
p1
Positive pin (left port)p2
Positive pin (right port)n1
Negative pin (left port)n2
Negative pin (right port)
Analog Sensors
ModelingToolkitStandardLibrary.Electrical.CurrentSensor
— FunctionCurrentSensor(; name)
Creates a circuit component that measures the current flowing through it. Analogous to an ideal ammeter.
States:
i(t)
: [A
] Current through the sensor
Connectors:
p
Positive pinn
Negative pin
ModelingToolkitStandardLibrary.Electrical.PotentialSensor
— FunctionPotentialSensor(; name)
Creates a circuit component which measures the potential at a pin.
States:
phi(t)
: [V
] The measured potential at this point
Connectors:
p
Pin at which potential is to be measured
ModelingToolkitStandardLibrary.Electrical.VoltageSensor
— FunctionVoltageSensor(; name)
Creates a circuit component that measures the voltage across it. Analogous to an ideal voltmeter.
States:
v(t)
: [V
] The voltage difference form positive to negative pinp.v - n.v
Connectors:
p
Positive pinn
Negative pin
ModelingToolkitStandardLibrary.Electrical.PowerSensor
— FunctionPowerSensor(; name)
Combines a VoltageSensor
and a CurrentSensor
to measure the power being consumed by a circuit.
States:
power(t)
: [W
] The power being consumed, given by the product of voltage and current.- See VoltageSensor
- See CurrentSensor
Connectors:
pc
Corresponds to thep
pin of theCurrentSensor
nc
Corresponds to then
pin of theCurrentSensor
pv
Corresponds to thep
pin of theVoltageSensor
nv
Corresponds to then
pin of theVoltageSensor
ModelingToolkitStandardLibrary.Electrical.MultiSensor
— FunctionMultiSensor(; name)
Combines a VoltageSensor
and a CurrentSensor
.
States:
v(t)
: [V
] The voltage across theVoltageSensor
i(t)
: [A
] The current across theCurrentSensor
Connectors:
pc
Corresponds to thep
pin of theCurrentSensor
nc
Corresponds to then
pin of theCurrentSensor
pv
Corresponds to thep
pin of theVoltageSensor
nv
Corresponds to then
pin of theVoltageSensor
Analog Sources
Missing docstring for ConstantVoltage
. Check Documenter's build log for details.
Missing docstring for SineVoltage
. Check Documenter's build log for details.
Missing docstring for StepVoltage
. Check Documenter's build log for details.
Missing docstring for RampVoltage
. Check Documenter's build log for details.
Missing docstring for SquareVoltage
. Check Documenter's build log for details.
Missing docstring for TriangularVoltage
. Check Documenter's build log for details.
Missing docstring for CosineVoltage
. Check Documenter's build log for details.
Missing docstring for ExpSineVoltage
. Check Documenter's build log for details.
Missing docstring for ConstantCurrent
. Check Documenter's build log for details.
Missing docstring for SineCurrent
. Check Documenter's build log for details.
Missing docstring for StepCurrent
. Check Documenter's build log for details.
Missing docstring for RampCurrent
. Check Documenter's build log for details.
Missing docstring for SquareCurrent
. Check Documenter's build log for details.
Missing docstring for TriangularCurrent
. Check Documenter's build log for details.
Missing docstring for CosineCurrent
. Check Documenter's build log for details.
Missing docstring for ExpSineCurrent
. Check Documenter's build log for details.
Digital Gates
Missing docstring for Not
. Check Documenter's build log for details.
Missing docstring for And
. Check Documenter's build log for details.
Missing docstring for Nand
. Check Documenter's build log for details.
Missing docstring for Or
. Check Documenter's build log for details.
Missing docstring for Nor
. Check Documenter's build log for details.
Missing docstring for Xor
. Check Documenter's build log for details.
Missing docstring for Xnor
. Check Documenter's build log for details.
Digital Components
Missing docstring for HalfAdder
. Check Documenter's build log for details.
Missing docstring for FullAdder
. Check Documenter's build log for details.
Missing docstring for MUX
. Check Documenter's build log for details.
Missing docstring for DEMUX
. Check Documenter's build log for details.
Missing docstring for Encoder
. Check Documenter's build log for details.
Missing docstring for Decoder
. Check Documenter's build log for details.
Digital Sources
Missing docstring for PulseDiff
. Check Documenter's build log for details.
Missing docstring for Set
. Check Documenter's build log for details.
Missing docstring for Reset
. Check Documenter's build log for details.
Missing docstring for Pulse
. Check Documenter's build log for details.