Package Modelica.​Electrical.​Machines.​Utilities
Library with auxiliary models for testing

Information

This package contains utility components for testing examples.

Extends from Modelica.​Icons.​UtilitiesPackage (Icon for utility packages).

Package Contents

NameDescription
DcBrakeSettingsSetting for DC current braking
DQCurrentControllerCurrent controller in dq coordinate system
DQToThreePhaseTransforms dq to three-phase
FromDQTransform rotor fixed space phasor to instantaneous stator quantities
MultiTerminalBoxTerminal box Y/D-connection
ParameterRecordsParameter records
RampedRheostatRheostat with linearly decreasing resistance
SinCosEvaluationEvaluation of the signals of a sin-cos-resolver
SwitchedRheostatRheostat which is shortened after a given time
SwitchYDY-D-switch
SwitchYDwithArcY-D-switch with arc
SynchronousMachineDataComputes machine parameter from usual datasheet
TerminalBoxTerminal box Y/D-connection
ToDQTransform instantaneous stator inputs to rotor fixed space phasor
TransformerDataCalculates Impedances from nominal values
VfControllerVoltage-Frequency-Controller

Block Modelica.​Electrical.​Machines.​Utilities.​VfController
Voltage-Frequency-Controller

Information

Simple Voltage-Frequency-Controller.
Amplitude of voltage is linear dependent (VNominal/fNominal) on frequency (input signal "u"), but limited by VNominal (nominal RMS voltage per phase).
m sine-waves with amplitudes as described above are provided as output signal "y".
By setting parameter EconomyMode=true, Voltage rises quadratically with frequency which means flux,torque and loss reduction for fan and pump drives.
The sine-waves are intended to feed a m-phase SignalVoltage.
Phase shifts between sine-waves may be chosen by the user; default values are (k-1)/m*pi for k in 1:m.

Extends from Modelica.​Blocks.​Interfaces.​SIMO (Single Input Multiple Output continuous control block).

Parameters

TypeNameDefaultDescription
final IntegernoutmNumber of outputs
Integerm3Number of phases
Angleorientation[m]-Modelica.Electrical.Polyphase.Functions.symmetricOrientation(m)Orientation of phases
VoltageVNominal Nominal RMS voltage per phase
FrequencyfNominal Nominal frequency
AngleBasePhase0Common phase shift
BooleanEconomyModefalseEconomy mode: voltage quadratic dependent on frequency

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputy[nout]Connector of Real output signals

Block Modelica.​Electrical.​Machines.​Utilities.​ToDQ
Transform instantaneous stator inputs to rotor fixed space phasor

Information

The polyphase input values u[m] are transformed to the corresponding space phasor which is rotated to the rotor fixed reference system, using the provided mechanical rotor angle phi. The output are the resulting d and q components of the space phasor arranged in one vector y[2].

See also

FromDQ

Extends from Modelica.​Blocks.​Interfaces.​MIMO (Multiple Input Multiple Output continuous control block).

Parameters

TypeNameDefaultDescription
final IntegerninmNumber of inputs
final Integernout2Number of outputs
Integerm3Number of phases
Integerp Number of pole pairs

Connectors

TypeNameDescription
input RealInputu[nin]Connector of Real input signals
output RealOutputy[nout]Connector of Real output signals
input RealInputphi 

Block Modelica.​Electrical.​Machines.​Utilities.​FromDQ
Transform rotor fixed space phasor to instantaneous stator quantities

Information

The d and q components of a space phasor u[2] are rotated back to the stator fixed reference system, using the provided mechanical rotor angle phi. The output are the instantaneous polyphase values y[m].

See also

ToDQ

Extends from Modelica.​Blocks.​Interfaces.​MIMO (Multiple Input Multiple Output continuous control block).

Parameters

TypeNameDefaultDescription
final Integernin2Number of inputs
final IntegernoutmNumber of outputs
Integerm3Number of phases
Integerp Number of pole pairs

Connectors

TypeNameDescription
input RealInputu[nin]Connector of Real input signals
output RealOutputy[nout]Connector of Real output signals
input RealInputphi 

Model Modelica.​Electrical.​Machines.​Utilities.​DQToThreePhase
Transforms dq to three-phase

Information

Transforms dq currents or voltages to three-phase currents or voltages.

The desired d- and q-components of the space phasor in rotor fixed coordinate system are given by inputs d and q. Using the given rotor position (input phi), the correct three-phase values (output y[3]) are calculated. They can be used to feed a current source which in turn feeds an induction machine.

Inputs d and q can be given either as peak values (useRMS=false) or as RMS (useRMS=true). The correction by factor √2 is done automatically.

Extends from Modelica.​Blocks.​Interfaces.​MO (Multiple Output continuous control block).

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
Integerp Number of pole pairs
BooleanuseRMStrueIf true, inputs dq are multiplied by sqrt(2)
final IntegernoutmNumber of outputs

Connectors

TypeNameDescription
output RealOutputy[nout]Connector of Real output signals
input RealInputdd-component
input RealInputqq-component
input RealInputphiRotor angle

Model Modelica.​Electrical.​Machines.​Utilities.​DQCurrentController
Current controller in dq coordinate system

Information

Simple Current controller

The desired d- and q-component of the space phasor current in rotor fixed coordinate system are given by inputs id and iq. Using the given rotor position (input phi), the actual three-phase currents are measured and transformed to the d-q coordinate system. Two PI-controllers determine the necessary d- and q- voltages, which are transformed back to three-phase (output y[3]). They can be used to feed a voltage source which in turn feeds a permanent magnet synchronous machine.

Inputs d and q can be given either as peak values (useRMS=false) or as RMS (useRMS=true). The correction by factor √2 is done automatically. The measured currents iActual[m] are assumed to be instantaneous values.

Note: No care is taken for current or voltage limiting, as well as for field weakening.

Extends from Modelica.​Blocks.​Interfaces.​MO (Multiple Output continuous control block).

Parameters

TypeNameDefaultDescription
Integerp Number of pole pairs
BooleanuseRMStrueIf true, inputs dq are multiplied by sqrt(2)
FrequencyfsNominal Nominal frequency
VoltageVsOpenCircuit Open circuit RMS voltage per phase @ fsNominal
ResistanceRs Stator resistance per phase
InductanceLd Inductance in d-axis
InductanceLq Inductance in q-axis
BooleandecouplingfalseUse decoupling network
final MagneticFluxpsiMsqrt(2) * VsOpenCircuit / (2 * pi * fsNominal)Approximation of magnetic flux linkage
final IntegernoutmNumber of outputs

Connectors

TypeNameDescription
output RealOutputy[nout]Connector of Real output signals
input RealInputidReference of d-current
input RealInputiqReference of q-current
input RealInputphiRotor angle
input RealInputiActual[m]Measured three-phase currents

Block Modelica.​Electrical.​Machines.​Utilities.​SinCosEvaluation
Evaluation of the signals of a sin-cos-resolver

Information

The sin-cos-resolver provides four tracks:

All four tracks have the same amplitude and the same offset > amplitude. Offset is used to detect loss of a track. To remove offset, (minus sine) is subtracted from (sine) and (minus cosine) from (cosine), resulting in a cosine and a sine signal with doubled amplitude but without offset.

Interpreting cosine and sine as real and imaginary part of a phasor, one could calculate the angle of the phasor (i.e., transform rectangular coordinates to polar coordinates). This is not very robust if the signals are superimposed with some noise. Therefore the phasor is rotated by an angle that is obtained by a controller. The controller aims at imaginary part equal to zero. The resulting angle is continuous, i.e. differentiating the angle results in 2*π*frequency. If desired, the angle can be wrapped to the interval ]-π, +π].

If the sin-cos-resolver provides one period of the tracks during a rotation of 2π/p, the result is the angle with respect to one pole pair and can be directly used for field oriented control.

Extends from Modelica.​Blocks.​Icons.​Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputu[4]Signal from sin-cos-resolver
output RealOutputphiAngle
output RealOutputwAngular velocity

Model Modelica.​Electrical.​Machines.​Utilities.​SwitchYD
Y-D-switch

Information

Simple Star-Delta-switch.
If control is false, plug_sp and plug_sn are star connected and plug_sp connected to the supply plug.
If control is true, plug_sp and plug_sn are delta connected and they are connected to the supply plug.
Note there is a delay between opening star connection and closing delta connection, respectively opening delta connection and closing star connection.

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
ResistanceRon1e-5Closed switch resistance
ConductanceGoff1e-5Opened switch conductance
TimedelayTime0Time delay

Connectors

TypeNameDescription
PositivePlugplugSupplyTo grid
PositivePlugplug_spTo positive stator plug
NegativePlugplug_snTo negative stator plug
input BooleanInputcontrol[m] 

Model Modelica.​Electrical.​Machines.​Utilities.​SwitchYDwithArc
Y-D-switch with arc

Information

Star-Delta-switch with arc when switch opens.
If control is false, plug_sp and plug_sn are star connected and plug_sp connected to the supply plug.
If control is true, plug_sp and plug_sn are delta connected and they are connected to the supply plug.
Note there is a delay between opening star connection and closing delta connection, respectively opening delta connection and closing star connection.

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
ResistanceRon1e-5Closed switch resistance
ConductanceGoff1e-5Opened switch conductance
TimedelayTime0Time delay
VoltageV0 Initial arc voltage
VoltageSlopedVdt Arc voltage slope
VoltageVmax Max. arc voltage

Connectors

TypeNameDescription
PositivePlugplugSupplyTo grid
PositivePlugplug_spTo positive stator plug
NegativePlugplug_snTo negative stator plug
input BooleanInputcontrol[m] 

Model Modelica.​Electrical.​Machines.​Utilities.​TerminalBox
Terminal box Y/D-connection

Information

This model represents the internal connections of the terminal box of an electric machine. The parameter terminalConnection is used to switch between star (terminalConnection = "Y") and delta (terminalConnection = "D") connection. The (single-phase) connector starPoint is only available if star connection is selected.

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
StringterminalConnection Choose "Y" for star or "D" for delta connection

Connectors

TypeNameDescription
PositivePlugplug_spTo be connected with positive stator plug
NegativePlugplug_snTo be connected with negative stator plug
PositivePlugplugSupplyTo be connected with grid
NegativePinstarpointStar point

Model Modelica.​Electrical.​Machines.​Utilities.​MultiTerminalBox
Terminal box Y/D-connection

Information

This model represents the internal connections of the terminal box of an electric machine. The parameter terminalConnection is used to switch between star (terminalConnection = "Y") and delta (terminalConnection = "D") connection. The star point is a plug with mSystem = Electrical.Polyphase.Functions.numberOfSymmetricBaseSystems(m) phases, representing the star points of each base system; see Modelica.Magnetic.FundamentalWave.UsersGuide.Polyphase.

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
final IntegermSystemsModelica.Electrical.Polyphase.Functions.numberOfSymmetricBaseSystems(m)Number of symmetric base systems
final IntegermBasicinteger(m / mSystems)Number of phases of basic system
StringterminalConnection Choose "Y" for star or "D" for delta connection

Connectors

TypeNameDescription
PositivePlugplug_spTo be connected with positive stator plug
NegativePlugplug_snTo be connected with negative stator plug
PositivePlugplugSupplyTo be connected with grid
NegativePlugstarpointStar point

Model Modelica.​Electrical.​Machines.​Utilities.​SwitchedRheostat
Rheostat which is shortened after a given time

Information

Switched rheostat, used for starting induction motors with slipring rotor:

The external rotor resistance RStart is shortened at time tStart.

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
ResistanceRStart Starting resistance
TimetStart Duration of switching on the starting resistor

Connectors

TypeNameDescription
PositivePlugplug_pTo positive rotor plug
NegativePlugplug_nTo negative rotor plug

Model Modelica.​Electrical.​Machines.​Utilities.​RampedRheostat
Rheostat with linearly decreasing resistance

Information

Ramped rheostat, used for starting induction motors with slipring rotor:

The external rotor resistance RStart is reduced to zero, starting at time tStart with a linear ramp tRamp.

Parameters

TypeNameDefaultDescription
Integerm3Number of phases
ResistanceRStart Starting resistance
TimetStart Time instance of reducing the rheostat
TimetRamp Duration of ramp

Connectors

TypeNameDescription
PositivePlugplug_pTo positive rotor plug
NegativePlugplug_nTo negative rotor plug

Record Modelica.​Electrical.​Machines.​Utilities.​DcBrakeSettings
Setting for DC current braking

Information

Lets the user choose the layout, and determines the necessary DC current for DC current braking of an induction machine.

The icon shows the four layout variants. Phases with half the current are depicted with half the line thickness, phases with zero current are depicted with dashed line.

Fields

TypeNameDescription
parameter CurrentINominalNominal RMS current per phase
parameter StringlayoutBraking connection layout
parameter StringterminalConnectionTerminal connection
parameter Booleanconnect3Connect 3rd terminal
parameter CurrentIdcDC braking current
parameter Currentis[3]Phase currents

Record Modelica.​Electrical.​Machines.​Utilities.​SynchronousMachineData
Computes machine parameter from usual datasheet

Information

The parameters of the synchronous machine model with electrical excitation (and damper) are calculated from parameters normally given in a technical description, according to the standard EN 60034-4:2008 Appendix C.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
parameter ApparentPowerSNominalNominal apparent power
parameter VoltageVsNominalNominal stator voltage per phase
parameter CurrentIsNominalNominal stator current per phase
parameter ImpedanceZReferenceReference impedance
parameter FrequencyfsNominalNominal stator frequency
parameter AngularVelocityomegaNominal angular frequency
parameter CurrentIeOpenCircuitOpen circuit excitation current @ nominal voltage and frequency
parameter RealeffectiveStatorTurnsEffective number of stator turns
parameter RealturnsRatioStator current / excitation current
parameter Realx0Stator stray inductance per phase (approximately zero impedance) [pu]
parameter RealxdSynchronous reactance per phase, d-axis [pu]
parameter RealxqSynchronous reactance per phase, q-axis [pu]
parameter RealxdTransientTransient reactance per phase, d-axis [pu]
parameter RealxdSubtransientSubtransient reactance per phase, d-axis [pu]
parameter RealxqSubtransientSubtransient reactance per phase, q-axis [pu]
parameter TimeTaArmature time constant
parameter TimeTd0TransientOpen circuit field time constant Td0'
parameter TimeTd0SubtransientOpen circuit subtransient time constant Td0'', d-axis
parameter TimeTq0SubtransientOpen circuit subtransient time constant Tq0'', q-axis
parameter TemperatureTsSpecificationSpecification temperature of stator resistance
parameter TemperatureTsRefReference temperature of stator resistance
parameter LinearTemperatureCoefficient20alpha20sTemperature coefficient of stator resistance at 20 degC
parameter TemperatureTrSpecificationSpecification temperature of (optional) damper cage
parameter TemperatureTrRefReference temperature of damper resistances in d- and q-axis
parameter LinearTemperatureCoefficient20alpha20rTemperature coefficient of damper resistances in d- and q-axis
parameter TemperatureTeSpecificationSpecification excitation temperature
parameter TemperatureTeRefReference temperature of excitation resistance
parameter LinearTemperatureCoefficient20alpha20eTemperature coefficient of excitation resistance
parameter RealxmdMain field reactance per phase, d-axis [pu]
parameter RealxmqMain field reactance per phase, q-axis [pu]
parameter RealxeExcitation reactance [pu]
parameter RealxrdDamper reactance per phase, d-axis [pu]
parameter RealxrqDamper reactance per phase, d-axis [pu]
parameter RealrsStator resistance per phase at specification temperature [pu]
parameter RealrrdDamper resistance per phase at specification temperature, d-axis [pu]
parameter RealrrqDamper resistance per phase at specification temperature, q-axis [pu]
parameter RealreExcitation resistance per phase at specification temperature [pu]
parameter ResistanceRsStator resistance per phase at TRef
parameter InductanceLssigmaStator stray inductance per phase
parameter InductanceLmdMain field inductance per phase in d-axis
parameter InductanceLmqMain field inductance per phase in q-axis
parameter InductanceLrsigmadDamper stray inductance in d-axis
parameter InductanceLrsigmaqDamper stray inductance in q-axis
parameter ResistanceRrdDamper resistance in d-axis at TRef
parameter ResistanceRrqDamper resistance in q-axis at TRef
parameter ResistanceReExcitation resistance at TRef
parameter RealsigmaeStray fraction of total excitation inductance

Record Modelica.​Electrical.​Machines.​Utilities.​TransformerData
Calculates Impedances from nominal values

Information

The parameters of the transformer models are calculated from parameters normally given in a technical description.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
parameter FrequencyfNominal frequency
parameter VoltageV1Primary nominal line-to-line voltage (RMS)
parameter StringC1Choose primary connection
parameter VoltageV2Secondary open circuit line-to-line voltage (RMS) @ primary nominal voltage
parameter StringC2Choose secondary connection
parameter ApparentPowerSNominalNominal apparent power
parameter Realv_scImpedance voltage drop pu
parameter PowerP_scShort-circuit (copper) losses
parameter RealnRatio primary voltage (line-to-line) / secondary voltage (line-to-line)
parameter VoltageV1phPrimary phase voltage (RMS)
parameter CurrentI1phPrimary phase current (RMS)
parameter VoltageV2phSecondary phase voltage (RMS)
parameter CurrentI2phSecondary phase current (RMS)
parameter ImpedanceZ1phPrimary impedance per phase
parameter ResistanceR1Warm primary resistance per phase
parameter InductanceL1sigmaPrimary stray inductance per phase
parameter ImpedanceZ2phSecondary impedance per phase
parameter ResistanceR2Warm secondary resistance per phase
parameter InductanceL2sigmaSecondary stray inductance per phase