Analog.Transformer
This component extends from TwoPort
Usage
TranslatedComponents.Analog.Transformer(L1=1, L2=1, M=1)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
L1 | Primary inductance | H | 1 |
L2 | Secondary inductance | H | 1 |
M | Coupling inductance | H | 1 |
Connectors
p1- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)n1- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)p2- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)n2- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)
Variables
| Name | Description | Units |
|---|---|---|
v1 | Voltage drop of port 1 (= p1.v - n1.v) | V |
v2 | Voltage drop of port 2 (= p2.v - n2.v) | V |
i1 | Current flowing from pos. to neg. pin of port 1 | A |
i2 | Current flowing from pos. to neg. pin of port 2 | A |
dv | Difference between voltage drop over primary inductor and voltage drop over secondary inductor | – |
Behavior
Source
dyad
component Transformer
extends TwoPort
# Primary inductance
parameter L1::Dyad.Inductance = 1
# Secondary inductance
parameter L2::Dyad.Inductance = 1
# Coupling inductance
parameter M::Dyad.Inductance = 1
# Difference between voltage drop over primary inductor and voltage drop over secondary inductor
variable dv::Real
relations
v1 = L1 * der(i1) + M * der(i2)
dv = (L1 - M) * der(i1) + (M - L2) * der(i2)
v2 = v1 - dv
endFlattened Source
dyad
component Transformer
p1 = Pin()
n1 = Pin()
p2 = Pin()
n2 = Pin()
# Voltage drop of port 1 (= p1.v - n1.v)
variable v1::Dyad.Voltage
# Voltage drop of port 2 (= p2.v - n2.v)
variable v2::Dyad.Voltage
# Current flowing from pos. to neg. pin of port 1
variable i1::Dyad.Current
# Current flowing from pos. to neg. pin of port 2
variable i2::Dyad.Current
# Primary inductance
parameter L1::Dyad.Inductance = 1
# Secondary inductance
parameter L2::Dyad.Inductance = 1
# Coupling inductance
parameter M::Dyad.Inductance = 1
# Difference between voltage drop over primary inductor and voltage drop over secondary inductor
variable dv::Real
relations
v1 = p1.v - n1.v
v2 = p2.v - n2.v
i1 = p1.i
i2 = p2.i
0 = p1.i + n1.i
0 = p2.i + n2.i
v1 = L1 * der(i1) + M * der(i2)
dv = (L1 - M) * der(i1) + (M - L2) * der(i2)
v2 = v1 - dv
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses