Analog.Basic.VariableInductor
Ideal linear electrical inductor with variable inductance.
The inductance value L is provided as an external input signal. A lower bound Lmin prevents the effective inductance from reaching zero, which would cause a variable index change:
The branch voltage follows from the time derivative of flux linkage:
This flux-based formulation correctly accounts for time-varying inductance, producing v = L \dot{i} + \dot{L} i.
Corresponds to Modelica.Electrical.Analog.Basic.VariableInductor.
This component extends from ElectricalComponents.Analog.Interfaces.OnePort
Usage
ElectricalComponents.Analog.Basic.VariableInductor(Lmin=1e-16)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
Lmin | Lower bound for variable inductance | H | 1e-16 |
Connectors
p- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)n- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)L- This connector represents a real signal as an input to a component (RealInput)
Variables
| Name | Description | Units |
|---|---|---|
v | Voltage across the component (between pin p and pin n). | V |
i | Current flowing through the component (from pin p to pin n). | A |
Psi | Magnetic flux linkage | Wb |
Behavior
Source
"""
Ideal linear electrical inductor with variable inductance.
The inductance value `L` is provided as an external input signal.
A lower bound `Lmin` prevents the effective inductance from reaching
zero, which would cause a variable index change:math \Psi = \max(L, L_{min}) \cdot i
The branch voltage follows from the time derivative of flux linkage:math v = \frac{d\Psi}
This flux-based formulation correctly accounts for time-varying
inductance, producing `v = L \dot{i} + \dot{L} i`.
Corresponds to `Modelica.Electrical.Analog.Basic.VariableInductor`.
"""
component VariableInductor
extends ElectricalComponents.Analog.Interfaces.OnePort
"Inductance input signal"
L = RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
},
"tags": []
}
}
"Lower bound for variable inductance"
parameter Lmin::Inductance = 1e-16
"Magnetic flux linkage"
variable Psi::MagneticFlux
relations
assert(L >= 0, "Inductance L has to be >= 0!")
Psi = max(L, Lmin) * i
v = der(Psi)
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://ElectricalComponents/Inductor.svg"}
}
}
endFlattened Source
"""
Ideal linear electrical inductor with variable inductance.
The inductance value `L` is provided as an external input signal.
A lower bound `Lmin` prevents the effective inductance from reaching
zero, which would cause a variable index change:math \Psi = \max(L, L_{min}) \cdot i
The branch voltage follows from the time derivative of flux linkage:math v = \frac{d\Psi}
This flux-based formulation correctly accounts for time-varying
inductance, producing `v = L \dot{i} + \dot{L} i`.
Corresponds to `Modelica.Electrical.Analog.Basic.VariableInductor`.
"""
component VariableInductor
"Positive electrical pin."
p = Pin() {
"Dyad": {
"placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
}
}
"Negative electrical pin."
n = Pin() {
"Dyad": {
"placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
}
}
"Voltage across the component (between pin p and pin n)."
variable v::Voltage
"Current flowing through the component (from pin p to pin n)."
variable i::Current
"Inductance input signal"
L = RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
},
"tags": []
}
}
"Lower bound for variable inductance"
parameter Lmin::Inductance = 1e-16
"Magnetic flux linkage"
variable Psi::MagneticFlux
relations
v = p.v - n.v
i = p.i
p.i + n.i = 0
assert(L >= 0, "Inductance L has to be >= 0!")
Psi = max(L, Lmin) * i
v = der(Psi)
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://ElectricalComponents/Inductor.svg"}
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses
Tests