ModelingToolkitStandardLibrary: Electrical Components
Index
ModelingToolkitStandardLibrary.Electrical.CapacitorModelingToolkitStandardLibrary.Electrical.ConductorModelingToolkitStandardLibrary.Electrical.CurrentModelingToolkitStandardLibrary.Electrical.CurrentSensorModelingToolkitStandardLibrary.Electrical.GroundModelingToolkitStandardLibrary.Electrical.IdealOpAmpModelingToolkitStandardLibrary.Electrical.InductorModelingToolkitStandardLibrary.Electrical.MultiSensorModelingToolkitStandardLibrary.Electrical.OnePortModelingToolkitStandardLibrary.Electrical.PinModelingToolkitStandardLibrary.Electrical.PotentialSensorModelingToolkitStandardLibrary.Electrical.PowerSensorModelingToolkitStandardLibrary.Electrical.ResistorModelingToolkitStandardLibrary.Electrical.VoltageModelingToolkitStandardLibrary.Electrical.VoltageSensorModelingToolkitStandardLibrary.Electrical.DigitalPin
Electrical Utilities
ModelingToolkitStandardLibrary.Electrical.Pin — ConstantPin(; 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 — ConstantOnePort(; name, v = 0.0, i = 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.vi(t): [A] The current passing through positive pin
Connectors:
pPositive pinnNegative 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 from0Vto0.8Vis 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 — ConstantGround(; name)Ground node with the potential of zero and connector g. Every circuit must have one ground node.
Connectors:
g
ModelingToolkitStandardLibrary.Electrical.Resistor — ConstantResistor(; name, R)Creates an ideal Resistor following Ohm's Law.
States:
See OnePort
Connectors:
pPositive pinnNegative pin
Parameters:
R: [Ohm] Resistance
ModelingToolkitStandardLibrary.Electrical.Conductor — ConstantConductor(; name, G)Creates an ideal conductor.
States:
See OnePort
Connectors:
pPositive pinnNegative pin
Parameters:
G: [S] Conductance
ModelingToolkitStandardLibrary.Electrical.Capacitor — ConstantCapacitor(; name, C, v)Creates an ideal capacitor. Initial voltage of capacitor can be set with v ([V])
States:
See OnePort
Connectors:
pPositive pinnNegative pin
Parameters:
C: [F] Capacitance
ModelingToolkitStandardLibrary.Electrical.Inductor — ConstantInductor(; name, L, i)Creates an ideal Inductor. Initial current through inductor can be set with i ([A]).
States:
See OnePort
Connectors:
pPositive pinnNegative pin
Parameters:
L: [H] Inductance
ModelingToolkitStandardLibrary.Electrical.IdealOpAmp — ConstantIdealOpAmp(; 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:
p1Positive pin (left port)p2Positive pin (right port)n1Negative pin (left port)n2Negative pin (right port)
Analog Sensors
ModelingToolkitStandardLibrary.Electrical.CurrentSensor — ConstantCurrentSensor(; 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:
pPositive pinnNegative pin
ModelingToolkitStandardLibrary.Electrical.PotentialSensor — ConstantPotentialSensor(; name)
Creates a circuit component which measures the potential at a pin.
States:
phi(t): [V] The measured potential at this point
Connectors:
pPin at which potential is to be measured
ModelingToolkitStandardLibrary.Electrical.VoltageSensor — ConstantVoltageSensor(; name)
Creates a circuit component that measures the voltage across it. Analogous to an ideal voltmeter.
States:
v(t): [V] The voltage difference from positive to negative pinp.v - n.v
Connectors:
pPositive pinnNegative pin
ModelingToolkitStandardLibrary.Electrical.PowerSensor — ConstantPowerSensor(; 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:
pcCorresponds to theppin of theCurrentSensorncCorresponds to thenpin of theCurrentSensorpvCorresponds to theppin of theVoltageSensornvCorresponds to thenpin of theVoltageSensor
ModelingToolkitStandardLibrary.Electrical.MultiSensor — ConstantMultiSensor(; name)
Combines a VoltageSensor and a CurrentSensor.
States:
v(t): [V] The voltage across theVoltageSensor. Defaults to 1.0.i(t): [A] The current across theCurrentSensor. Defaults to 1.0.
Connectors:
pcCorresponds to theppin of theCurrentSensorncCorresponds to thenpin of theCurrentSensorpvCorresponds to theppin of theVoltageSensornvCorresponds to thenpin of theVoltageSensor
Analog Sources
ModelingToolkitStandardLibrary.Electrical.Voltage — ConstantVoltage(; name)Acts as an ideal voltage source with no internal resistance.
States:
See OnePort
Connectors:
pPositive pinnNegative pinVRealInput Input for the voltage control signal, i.e.V ~ p.v - n.v
ModelingToolkitStandardLibrary.Electrical.Current — ConstantCurrent(; name)Acts as an ideal current source with no internal resistance.
States:
See OnePort
Connectors:
pPositive pinnNegative pinIRealInput Input for the current control signal, i.e. `I ~ p.i
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.