Skip to content
Analog.IdealTransformer.md

Analog.IdealTransformer

This component extends from TwoPort

Usage

TranslatedComponents.Analog.IdealTransformer(n=1, Lm1=1)

Parameters:

NameDescriptionUnitsDefault value
considerMagnetizationChoice of considering magnetizationfalse
nTurns ratio primary:secondary voltage1
Lm1Magnetization inductance w.r.t. primary sideH1

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

NameDescriptionUnits
v1Voltage drop of port 1 (= p1.v - n1.v)V
v2Voltage drop of port 2 (= p2.v - n2.v)V
i1Current flowing from pos. to neg. pin of port 1A
i2Current flowing from pos. to neg. pin of port 2A
im1Magnetization current w.r.t. primary sideA
psim1Magnetic flux w.r.t. primary sideWb

Behavior

v1(t)=n1.v(t)+p1.v(t)v2(t)=p2.v(t)n2.v(t)i1(t)=p1.i(t)i2(t)=p2.i(t)0=p1.i(t)+n1.i(t)0=p2.i(t)+n2.i(t)im1(t)=i1(t)+i2(t)nv1(t)=nv2(t)psim1(t)=0im1(t)=0

Source

dyad
component IdealTransformer
  extends TwoPort
  # Turns ratio primary:secondary voltage
  parameter n::Real = 1
  # Choice of considering magnetization
  structural parameter considerMagnetization::Boolean = false
  # Magnetization inductance w.r.t. primary side
  parameter Lm1::Dyad.Inductance = 1
  # Magnetization current w.r.t. primary side
  variable im1::Dyad.Current
  # Magnetic flux w.r.t. primary side
  variable psim1::Dyad.MagneticFlux
relations
  im1 = i1 + i2 / n
  if considerMagnetization
    psim1 = Lm1 * im1
    v1 = der(psim1)
  else
    psim1 = 0
    im1 = 0
  end
  v1 = n * v2
end
Flattened Source
dyad
component IdealTransformer
  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
  # Turns ratio primary:secondary voltage
  parameter n::Real = 1
  # Choice of considering magnetization
  structural parameter considerMagnetization::Boolean = false
  # Magnetization inductance w.r.t. primary side
  parameter Lm1::Dyad.Inductance = 1
  # Magnetization current w.r.t. primary side
  variable im1::Dyad.Current
  # Magnetic flux w.r.t. primary side
  variable psim1::Dyad.MagneticFlux
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
  im1 = i1 + i2 / n
  if considerMagnetization
    psim1 = Lm1 * im1
    v1 = der(psim1)
  else
    psim1 = 0
    im1 = 0
  end
  v1 = n * v2
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses