Modelica.Electrical.Machines.BasicMachines.Components

Machine components like AirGaps

Information


This package contains components for modeling electrical machines, specially threephase induction machines, based on space phasor theory.
These models use package SpacePhasors.

Extends from Modelica.Icons.Library (Icon for library).

Package Content

NameDescription
Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGap PartialAirGap Partial airgap model
Modelica.Electrical.Machines.BasicMachines.Components.AirGapS AirGapS Airgap in stator-fixed coordinate system
Modelica.Electrical.Machines.BasicMachines.Components.AirGapR AirGapR Airgap in rotor-fixed coordinate system
Modelica.Electrical.Machines.BasicMachines.Components.SquirrelCage SquirrelCage Squirrel Cage
Modelica.Electrical.Machines.BasicMachines.Components.DamperCage DamperCage Squirrel Cage
Modelica.Electrical.Machines.BasicMachines.Components.ElectricalExcitation ElectricalExcitation Electrical excitation
Modelica.Electrical.Machines.BasicMachines.Components.PermanentMagnet PermanentMagnet Permanent magnet excitation
Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGapDC PartialAirGapDC Partial airgap model of a DC machine
Modelica.Electrical.Machines.BasicMachines.Components.AirGapDC AirGapDC Linear airgap model of a DC machine
Modelica.Electrical.Machines.BasicMachines.Components.BasicTransformer BasicTransformer Partial model of threephase transformer
Modelica.Electrical.Machines.BasicMachines.Components.PartialCore PartialCore Partial model of transformer core with 3 windings
Modelica.Electrical.Machines.BasicMachines.Components.IdealCore IdealCore Ideal transformer with 3 windings


Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGap Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGap

Partial airgap model

Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGap

Information


Partial model of the airgap, using only equations.

Parameters

TypeNameDefaultDescription
Integerm3number of phases
Integerp number of pole pairs

Connectors

TypeNameDescription
Flange_aflange 
Flange_asupportsupport at which the reaction torque is acting
SpacePhasorspacePhasor_s 
SpacePhasorspacePhasor_r 

Modelica definition

partial model PartialAirGap "Partial airgap model"
  parameter Integer m=3 "number of phases";
  parameter Integer p(min=1) "number of pole pairs";
  output Modelica.SIunits.Torque tauElectrical;
  Modelica.SIunits.Angle gamma "Rotor displacement angle";
  Modelica.SIunits.Current i_ss[2] 
    "Stator current space phasor with respect to the stator fixed frame";
  Modelica.SIunits.Current i_sr[2] 
    "Stator current space phasor with respect to the rotor fixed frame";
  Modelica.SIunits.Current i_rs[2] 
    "Rotor current space phasor with respect to the stator fixed frame";
  Modelica.SIunits.Current i_rr[2] 
    "Rotor current space phasor with respect to the rotor fixed frame";
  Modelica.SIunits.MagneticFlux psi_ms[2] 
    "Magnetizing flux phasor with respect to the stator fixed frame";
  Modelica.SIunits.MagneticFlux psi_mr[2] 
    "Magnetizing flux phasor with respect to the rotor fixed frame";
  Real RotationMatrix[2,2] "matrix of rotation from rotor to stator";
public 
  Modelica.Mechanics.Rotational.Interfaces.Flange_a flange;
  Modelica.Mechanics.Rotational.Interfaces.Flange_a support 
    "support at which the reaction torque is acting";
  Machines.Interfaces.SpacePhasor spacePhasor_s;
  Machines.Interfaces.SpacePhasor spacePhasor_r;
equation 
  // mechanical angle of the rotor of an equivalent 2-pole machine
  gamma=p*(flange.phi-support.phi);
  RotationMatrix={{+cos(gamma),-sin(gamma)},{+sin(gamma),+cos(gamma)}};
  i_ss = spacePhasor_s.i_;
  i_ss = RotationMatrix*i_sr;
  i_rr = spacePhasor_r.i_;
  i_rs = RotationMatrix*i_rr;
  // Stator voltage induction
  spacePhasor_s.v_ = der(psi_ms);
  // Rotor voltage induction
  spacePhasor_r.v_ = der(psi_mr);
  // Electromechanical torque (cross product of current and flux space phasor)
  tauElectrical = m/2*p*(spacePhasor_s.i_[2]*psi_ms[1] - spacePhasor_s.i_[1]*psi_ms[2]);
  flange.tau = -tauElectrical;
  support.tau = tauElectrical;
end PartialAirGap;

Modelica.Electrical.Machines.BasicMachines.Components.AirGapS Modelica.Electrical.Machines.BasicMachines.Components.AirGapS

Airgap in stator-fixed coordinate system

Modelica.Electrical.Machines.BasicMachines.Components.AirGapS

Information


Model of the airgap in stator-fixed coordinate system, using only equations.

Extends from PartialAirGap (Partial airgap model).

Parameters

TypeNameDefaultDescription
InductanceLm main field inductance [H]
Integerm3number of phases
Integerp number of pole pairs

Connectors

TypeNameDescription
Flange_aflange 
Flange_asupportsupport at which the reaction torque is acting
SpacePhasorspacePhasor_s 
SpacePhasorspacePhasor_r 

Modelica definition

model AirGapS "Airgap in stator-fixed coordinate system"
  parameter Modelica.SIunits.Inductance Lm "main field inductance";
  extends PartialAirGap;
  Modelica.SIunits.Current i_ms[2] 
    "Magnetizing current space phasor with respect to the stator fixed frame";
protected 
  parameter Modelica.SIunits.Inductance L[2,2]={{Lm,0},{0,Lm}} 
    "inductance matrix";
equation 
  // Magnetizing current with respect to the stator reference frame
  i_ms = i_ss + i_rs;
  // Magnetizing flux linkage with respect to the stator reference frame
  psi_ms = L*i_ms;
  // Magnetizing flux linkage with respect to the rotor reference frame
  psi_mr = transpose(RotationMatrix)*psi_ms;
end AirGapS;

Modelica.Electrical.Machines.BasicMachines.Components.AirGapR Modelica.Electrical.Machines.BasicMachines.Components.AirGapR

Airgap in rotor-fixed coordinate system

Modelica.Electrical.Machines.BasicMachines.Components.AirGapR

Information


Model of the airgap in rotor-fixed coordinate system, using only equations.

Extends from PartialAirGap (Partial airgap model).

Parameters

TypeNameDefaultDescription
InductanceLmd main field inductance d-axis [H]
InductanceLmq main field inductance q-axis [H]
Integerm3number of phases
Integerp number of pole pairs

Connectors

TypeNameDescription
Flange_aflange 
Flange_asupportsupport at which the reaction torque is acting
SpacePhasorspacePhasor_s 
SpacePhasorspacePhasor_r 

Modelica definition

model AirGapR "Airgap in rotor-fixed coordinate system"
  parameter Modelica.SIunits.Inductance Lmd "main field inductance d-axis";
  parameter Modelica.SIunits.Inductance Lmq "main field inductance q-axis";
  extends PartialAirGap;
  Modelica.SIunits.Current i_mr[2] 
    "Magnetizing current space phasor with respect to the rotor fixed frame";
protected 
  parameter Modelica.SIunits.Inductance L[2,2]={{Lmd,0},{0,Lmq}} 
    "inductance matrix";
equation 
  // Magnetizing current with respect to the rotor reference frame
  i_mr = i_sr + i_rr;
  // Main flux linkage with respect to the stator reference frame
  psi_mr = L*i_mr;
  // Main flux linkage with respect to the stator reference frame
  psi_ms = RotationMatrix*psi_mr;
  // Stator voltage induction
end AirGapR;

Modelica.Electrical.Machines.BasicMachines.Components.SquirrelCage Modelica.Electrical.Machines.BasicMachines.Components.SquirrelCage

Squirrel Cage

Modelica.Electrical.Machines.BasicMachines.Components.SquirrelCage

Information


Model of a squirrel cage / damper cage in two axis.

Parameters

TypeNameDefaultDescription
InductanceLrsigma rotor stray inductance per phase translated to stator [H]
ResistanceRr warm rotor resistance per phase translated to stator [Ohm]

Connectors

TypeNameDescription
SpacePhasorspacePhasor_r 

Modelica definition

model SquirrelCage "Squirrel Cage"
  parameter Modelica.SIunits.Inductance Lrsigma 
    "rotor stray inductance per phase translated to stator";
  parameter Modelica.SIunits.Resistance Rr 
    "warm rotor resistance per phase translated to stator";
  Machines.Interfaces.SpacePhasor spacePhasor_r;
equation 
  spacePhasor_r.v_ = Rr * spacePhasor_r.i_ + Lrsigma * der(spacePhasor_r.i_);
end SquirrelCage;

Modelica.Electrical.Machines.BasicMachines.Components.DamperCage Modelica.Electrical.Machines.BasicMachines.Components.DamperCage

Squirrel Cage

Modelica.Electrical.Machines.BasicMachines.Components.DamperCage

Information


Model of an unsymmetrical damper cage cage in two axis.

Parameters

TypeNameDefaultDescription
InductanceLrsigmad stray inductance in d-axis per phase translated to stator [H]
InductanceLrsigmaq stray inductance in q-axis per phase translated to stator [H]
ResistanceRrd warm resistance in d-axis per phase translated to stator [Ohm]
ResistanceRrq warm resistance in q-axis per phase translated to stator [Ohm]

Connectors

TypeNameDescription
SpacePhasorspacePhasor_r 

Modelica definition

model DamperCage "Squirrel Cage"
  parameter Modelica.SIunits.Inductance Lrsigmad 
    "stray inductance in d-axis per phase translated to stator";
  parameter Modelica.SIunits.Inductance Lrsigmaq 
    "stray inductance in q-axis per phase translated to stator";
  parameter Modelica.SIunits.Resistance Rrd 
    "warm resistance in d-axis per phase translated to stator";
  parameter Modelica.SIunits.Resistance Rrq 
    "warm resistance in q-axis per phase translated to stator";
  Machines.Interfaces.SpacePhasor spacePhasor_r;

equation 
  spacePhasor_r.v_[1] = Rrd * spacePhasor_r.i_[1] + Lrsigmad * der(spacePhasor_r.i_[1]);
  spacePhasor_r.v_[2] = Rrq * spacePhasor_r.i_[2] + Lrsigmaq * der(spacePhasor_r.i_[2]);
end DamperCage;

Modelica.Electrical.Machines.BasicMachines.Components.ElectricalExcitation Modelica.Electrical.Machines.BasicMachines.Components.ElectricalExcitation

Electrical excitation

Modelica.Electrical.Machines.BasicMachines.Components.ElectricalExcitation

Information


Model of an electrical excitation, converting excitation to space phasor.

Parameters

TypeNameDefaultDescription
RealturnsRatio stator current / excitation current

Connectors

TypeNameDescription
SpacePhasorspacePhasor_r 
PositivePinpin_ep 
NegativePinpin_en 

Modelica definition

model ElectricalExcitation "Electrical excitation"
  parameter Real turnsRatio(start=1) "stator current / excitation current";
  Modelica.SIunits.Current ie "excitation current";
  Modelica.SIunits.Voltage ve "excitation voltage";
  Machines.Interfaces.SpacePhasor spacePhasor_r;
  Modelica.Electrical.Analog.Interfaces.PositivePin pin_ep;
  Modelica.Electrical.Analog.Interfaces.NegativePin pin_en;
equation 
  pin_ep.i + pin_en.i = 0;
  ie = +pin_ep.i;
  ve = pin_ep.v - pin_en.v;
  spacePhasor_r.i_ = {-ie*turnsRatio,0};
  ve = spacePhasor_r.v_[1]*turnsRatio*3/2;
end ElectricalExcitation;

Modelica.Electrical.Machines.BasicMachines.Components.PermanentMagnet Modelica.Electrical.Machines.BasicMachines.Components.PermanentMagnet

Permanent magnet excitation

Modelica.Electrical.Machines.BasicMachines.Components.PermanentMagnet

Information


Model of a permanent magnet excitation, characterized by an equivalent excitation current.

Parameters

TypeNameDefaultDescription
CurrentIe equivalent excitation current [A]

Connectors

TypeNameDescription
SpacePhasorspacePhasor_r 

Modelica definition

model PermanentMagnet "Permanent magnet excitation"
  parameter Modelica.SIunits.Current Ie "equivalent excitation current";
  Machines.Interfaces.SpacePhasor spacePhasor_r;
equation 
  spacePhasor_r.i_ = {-Ie,0};
end PermanentMagnet;

Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGapDC Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGapDC

Partial airgap model of a DC machine

Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGapDC

Information


Linear model of the airgap (without saturation effects) of a DC machine, using only equations.
Induced excitation voltage is calculated from der(flux), where flux is defined by excitation inductance times excitation current.
Induced armature voltage is calculated from flux times angular velocity.

Parameters

TypeNameDefaultDescription
RealturnsRatio ratio of armature turns over number of turns of the excitation winding

Connectors

TypeNameDescription
Flange_aflange 
Flange_asupportsupport at which the reaction torque is acting
PositivePinpin_ap 
PositivePinpin_ep 
NegativePinpin_an 
NegativePinpin_en 

Modelica definition

partial model PartialAirGapDC "Partial airgap model of a DC machine"
  parameter Real turnsRatio 
    "ratio of armature turns over number of turns of the excitation winding";
  Modelica.SIunits.AngularVelocity w "Angluar velocity";
  Modelica.SIunits.Voltage vei 
    "Voltage drop across field excitation inductance";
  Modelica.SIunits.Current ie "Excitation current";
  Modelica.SIunits.MagneticFlux psi_e "Excitation flux";
  Modelica.SIunits.Voltage vai "Induced armature voltage";
  Modelica.SIunits.Current ia "Armature current";
  output Modelica.SIunits.Torque tauElectrical;
  Modelica.Mechanics.Rotational.Interfaces.Flange_a flange;
  Modelica.Mechanics.Rotational.Interfaces.Flange_a support 
    "support at which the reaction torque is acting";
  Modelica.Electrical.Analog.Interfaces.PositivePin pin_ap;
  Modelica.Electrical.Analog.Interfaces.PositivePin pin_ep;
  Modelica.Electrical.Analog.Interfaces.NegativePin pin_an;
  Modelica.Electrical.Analog.Interfaces.NegativePin pin_en;
equation 
  // armature pins
  vai = pin_ap.v - pin_an.v;
  ia = + pin_ap.i;
  ia = - pin_an.i;
  // excitation pins
  vei = pin_ep.v - pin_en.v;
  ie = + pin_ep.i;
  ie = - pin_en.i;
  // induced voltage across field excitation inductance
  vei = der(psi_e);
  // mechanical speed
  w = der(flange.phi)-der(support.phi);
  // induced armature voltage
  vai = turnsRatio * psi_e * w;
  // electrical torque (ia is perpendicular to flux)
  tauElectrical = turnsRatio * psi_e * ia;
  flange.tau = -tauElectrical;
  support.tau = tauElectrical;
end PartialAirGapDC;

Modelica.Electrical.Machines.BasicMachines.Components.AirGapDC Modelica.Electrical.Machines.BasicMachines.Components.AirGapDC

Linear airgap model of a DC machine

Modelica.Electrical.Machines.BasicMachines.Components.AirGapDC

Information


Linear model of the airgap (without saturation effects) of a DC machine, using only equations.
Induced excitation voltage is calculated from der(flux), where flux is defined by excitation inductance times excitation current.
Induced armature voltage is calculated from flux times angular velocity.

Extends from PartialAirGapDC (Partial airgap model of a DC machine).

Parameters

TypeNameDefaultDescription
RealturnsRatio ratio of armature turns over number of turns of the excitation winding
InductanceLe excitation inductance [H]

Connectors

TypeNameDescription
Flange_aflange 
Flange_asupportsupport at which the reaction torque is acting
PositivePinpin_ap 
PositivePinpin_ep 
NegativePinpin_an 
NegativePinpin_en 

Modelica definition

model AirGapDC "Linear airgap model of a DC machine"
  extends PartialAirGapDC;
  parameter Modelica.SIunits.Inductance Le "excitation inductance";
equation 
  // excitation flux: linearly dependent on excitation current
  psi_e = Le * ie;
end AirGapDC;

Modelica.Electrical.Machines.BasicMachines.Components.BasicTransformer Modelica.Electrical.Machines.BasicMachines.Components.BasicTransformer

Partial model of threephase transformer

Modelica.Electrical.Machines.BasicMachines.Components.BasicTransformer

Information


Partialmodel of a threephase transformer, containing primary and secondary resistances and stray inductances, as well as the iron core.
Circuit layout (vector group) of primary and secondary windings have to be defined.

Parameters

TypeNameDefaultDescription
Realn primary voltage (line-to-line) / secondary voltage (line-to-line)
ResistanceR1 warm primary resistance per phase [Ohm]
InductanceL1sigma primary stray inductance per phase [H]
ResistanceR2 warm secondary resistance per phase [Ohm]
InductanceL2sigma secondary stray inductance per phase [H]

Connectors

TypeNameDescription
PositivePlugplug1 
NegativePlugplug2 

Modelica definition

partial model BasicTransformer 
  "Partial model of threephase transformer"
  constant Integer m(min=1) = 3 "Number of phases";
  constant String VectorGroup="Yy00";
  parameter Real n(start=1) 
    "primary voltage (line-to-line) / secondary voltage (line-to-line)";
  parameter Modelica.SIunits.Resistance R1(start=5E-3/(if C1=="D" then 1 else 3)) 
    "warm primary resistance per phase";
  parameter Modelica.SIunits.Inductance L1sigma(start=78E-6/(if C1=="D" then 1 else 3)) 
    "primary stray inductance per phase";
  parameter Modelica.SIunits.Resistance R2(start=5E-3/(if C2=="d" then 1 else 3)) 
    "warm secondary resistance per phase";
  parameter Modelica.SIunits.Inductance L2sigma(start=78E-6/(if C2=="d" then 1 else 3)) 
    "secondary stray inductance per phase";
  output Modelica.SIunits.Voltage v1[m]=plug1.pin.v "Primary voltage";
  output Modelica.SIunits.Current i1[m]=plug1.pin.i "Primary current";
  output Modelica.SIunits.Voltage v2[m]=plug2.pin.v "Secondary voltage";
  output Modelica.SIunits.Current i2[m]=plug2.pin.i "Secondary current";
protected 
  constant String C1 = Modelica.Utilities.Strings.substring(VectorGroup,1,1);
  constant String C2 = Modelica.Utilities.Strings.substring(VectorGroup,2,2);
  parameter Real ni=n*(if C2=="z" then sqrt(3) else 2)*(if C2=="d" then 1 else sqrt(3))/(if C1=="D" then 1 else sqrt(3));
public 
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug1(final m=m);
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug2(final m=m);
  Modelica.Electrical.MultiPhase.Basic.Resistor r1(
    final m=m,
    final R=fill(R1,m),
    final T_ref=fill(293.15,m),
    final alpha=zeros(m),
    final useHeatPort=false,
    final T=r1.T_ref);
  Modelica.Electrical.MultiPhase.Basic.Inductor l1sigma(final m=m, final L=fill(L1sigma, m));
  Modelica.Electrical.MultiPhase.Basic.Resistor r2(
    final m=m,
    final R=fill(R2,m),
    final T_ref=fill(293.15,m),
    final alpha=zeros(m),
    final T=r2.T_ref);
  Modelica.Electrical.MultiPhase.Basic.Inductor l2sigma(final m=m, final L=fill(L2sigma, m));
  IdealCore core(
    final m=m,
    final n12=ni,
    final n13=ni);
equation 
  connect(r1.plug_n,l1sigma. plug_p);
  connect(l2sigma.plug_n,r2. plug_p);
  connect(plug1, r1.plug_p);
  connect(r2.plug_n, plug2);
end BasicTransformer;

Modelica.Electrical.Machines.BasicMachines.Components.PartialCore Modelica.Electrical.Machines.BasicMachines.Components.PartialCore

Partial model of transformer core with 3 windings

Modelica.Electrical.Machines.BasicMachines.Components.PartialCore

Information


Partial model of transformer core with 3 windings; saturation function flux versus magentizing current has to be defined.

Parameters

TypeNameDefaultDescription
Integerm3number of phases
Realn12 turns ratio 1:2
Realn13 turns ratio 1:3

Connectors

TypeNameDescription
PositivePlugplug_p1 
NegativePlugplug_n1 
PositivePlugplug_p2 
NegativePlugplug_n2 
PositivePlugplug_p3 
NegativePlugplug_n3 

Modelica definition

partial model PartialCore 
  "Partial model of transformer core with 3 windings"
  parameter Integer m(final min=1) = 3 "number of phases";
  parameter Real n12(start=1) "turns ratio 1:2";
  parameter Real n13(start=1) "turns ratio 1:3";
  Modelica.SIunits.Voltage v1[m] = plug_p1.pin.v  - plug_n1.pin.v;
  Modelica.SIunits.Current i1[m] = plug_p1.pin.i;
  Modelica.SIunits.Voltage v2[m] = plug_p2.pin.v  - plug_n2.pin.v;
  Modelica.SIunits.Current i2[m] = plug_p2.pin.i;
  Modelica.SIunits.Voltage v3[m] = plug_p3.pin.v  - plug_n3.pin.v;
  Modelica.SIunits.Current i3[m] = plug_p3.pin.i;
  Modelica.SIunits.Current im[m] = i1 + i2/n12 + i3/n13 "Magnetizing current";
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p1(final m=
        m);
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug_n1(final m=
        m);
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p2(final m=
        m);
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug_n2(final m=
        m);
  Modelica.Electrical.MultiPhase.Interfaces.PositivePlug plug_p3(final m=
        m);
  Modelica.Electrical.MultiPhase.Interfaces.NegativePlug plug_n3(final m=
        m);
equation 
  plug_p1.pin.i + plug_n1.pin.i = zeros(m);
  plug_p2.pin.i + plug_n2.pin.i = zeros(m);
  plug_p3.pin.i + plug_n3.pin.i = zeros(m);
end PartialCore;

Modelica.Electrical.Machines.BasicMachines.Components.IdealCore Modelica.Electrical.Machines.BasicMachines.Components.IdealCore

Ideal transformer with 3 windings

Modelica.Electrical.Machines.BasicMachines.Components.IdealCore

Information


Ideal transformer with 3 windings: no magnetizing current.

Extends from PartialCore (Partial model of transformer core with 3 windings).

Parameters

TypeNameDefaultDescription
Integerm3number of phases
Realn12 turns ratio 1:2
Realn13 turns ratio 1:3

Connectors

TypeNameDescription
PositivePlugplug_p1 
NegativePlugplug_n1 
PositivePlugplug_p2 
NegativePlugplug_n2 
PositivePlugplug_p3 
NegativePlugplug_n3 

Modelica definition

model IdealCore "Ideal transformer with 3 windings"

  extends PartialCore;
equation 
  im = zeros(m);
  v1 = n12*v2;
  v1 = n13*v3;
end IdealCore;

HTML-documentation generated by Dymola Sun Jan 17 21:10:53 2010.