Skip to content

Synchronous Machine Model

This page documents the mathematical model of the synchronous machine implemented in RAMSES. The model is a detailed sixth-order model, including four rotor windings with saturation effects. It uses the Equal-Mutual-Flux-Linkage (EMFL) per unit system and supports detailed (round rotor, salient-pole) and simplified (field winding only) configurations through model switches.


To accommodate different rotor configurations within a single model, integer “model switches” are defined:

SwitchMeaning
Sd1S_{d1}1 if there is a damper winding d1d1, 0 otherwise
Sq1S_{q1}1 if there is a damper winding q1q1, 0 otherwise
Sq2S_{q2}1 if there is an equivalent winding q2q2, 0 otherwise
ModelSwitches
Detailed, round rotorSd1=1,  Sq1=1,  Sq2=1S_{d1} = 1,\; S_{q1} = 1,\; S_{q2} = 1
Detailed, salient-pole rotorSd1=1,  Sq1=1,  Sq2=0S_{d1} = 1,\; S_{q1} = 1,\; S_{q2} = 0
Detailed, salient-pole rotorSd1=1,  Sq1=0,  Sq2=1S_{d1} = 1,\; S_{q1} = 0,\; S_{q2} = 1
Simplified, field winding onlySd1=0,  Sq1=0,  Sq2=0S_{d1} = 0,\; S_{q1} = 0,\; S_{q2} = 0

The second and third combinations yield the same results. Models with fewer rotor windings are specified by skipping the corresponding data in the SYNC_MACH record (see below).


The well-known Park transformation is used to replace time-varying inductances and oscillatory stator currents and voltages with constant values. The machine is represented by equivalent windings along the direct (dd) and quadrature (qq) axes — a field winding ff and damper winding d1d1 on the dd axis, and windings q1q1, q2q2 on the qq axis:

Synchronous machine windings Equivalent windings of the Park transformation


Using the EMFL per unit system, the relationship between magnetic flux linkages and currents is:

(ψdψfψd1)=(L+MdMdSd1MdMdLf+MdSd1MdSd1MdSd1MdLd1+Sd1Md)(idifid1)\begin{pmatrix} \psi_d \\ \psi_f \\ \psi_{d1} \end{pmatrix} = \begin{pmatrix} L_\ell + M_d & M_d & S_{d1} M_d \\ M_d & L_{\ell f} + M_d & S_{d1} M_d \\ S_{d1} M_d & S_{d1} M_d & L_{\ell d1} + S_{d1} M_d \end{pmatrix} \begin{pmatrix} i_d \\ i_f \\ i_{d1} \end{pmatrix} (ψqψq1ψq2)=(L+MqSq1MqSq2MqSq1MqLq1+Sq1MqSq2MqSq2MqSq2MqLq2+Sq2Mq)(iqiq1iq2)\begin{pmatrix} \psi_q \\ \psi_{q1} \\ \psi_{q2} \end{pmatrix} = \begin{pmatrix} L_\ell + M_q & S_{q1} M_q & S_{q2} M_q \\ S_{q1} M_q & L_{\ell q1} + S_{q1} M_q & S_{q2} M_q \\ S_{q2} M_q & S_{q2} M_q & L_{\ell q2} + S_{q2} M_q \end{pmatrix} \begin{pmatrix} i_q \\ i_{q1} \\ i_{q2} \end{pmatrix}

The dd and qq components of the air-gap flux are:

ψad=Md(id+if+Sd1id1)\psi_{ad} = M_d(i_d + i_f + S_{d1} i_{d1}) ψaq=Mq(iq+Sq1iq1+Sq2iq2)\psi_{aq} = M_q(i_q + S_{q1} i_{q1} + S_{q2} i_{q2})

Individual flux linkages in terms of air-gap flux:

ψd=Lid+ψad\psi_d = L_\ell i_d + \psi_{ad} ψf=Lfif+ψad\psi_f = L_{\ell f} i_f + \psi_{ad} ψd1=Ld1id1+Sd1ψad\psi_{d1} = L_{\ell d1} i_{d1} + S_{d1} \psi_{ad} ψq=Liq+ψaq\psi_q = L_\ell i_q + \psi_{aq} ψq1=Lq1iq1+Sq1ψaq\psi_{q1} = L_{\ell q1} i_{q1} + S_{q1} \psi_{aq} ψq2=Lq2iq2+Sq2ψaq\psi_{q2} = L_{\ell q2} i_{q2} + S_{q2} \psi_{aq}

Rotor currents from flux linkages:

if=ψfψadLf,id1=ψd1Sd1ψadLd1,iq1=ψq1Sq1ψaqLq1,iq2=ψq2Sq2ψaqLq2i_f = \frac{\psi_f - \psi_{ad}}{L_{\ell f}}, \qquad i_{d1} = \frac{\psi_{d1} - S_{d1} \psi_{ad}}{L_{\ell d1}}, \qquad i_{q1} = \frac{\psi_{q1} - S_{q1} \psi_{aq}}{L_{\ell q1}}, \qquad i_{q2} = \frac{\psi_{q2} - S_{q2} \psi_{aq}}{L_{\ell q2}}

Let MduM_d^u and MquM_q^u be the unsaturated direct- and quadrature-axis mutual inductances. The saturated values MdM_d and MqM_q are:

Md=Mdu1+m(ψad2+ψaq2)nM_d = \frac{M_d^u}{1 + m \left(\sqrt{\psi_{ad}^2 + \psi_{aq}^2}\right)^n} Mq=Mqu1+m(ψad2+ψaq2)nM_q = \frac{M_q^u}{1 + m \left(\sqrt{\psi_{ad}^2 + \psi_{aq}^2}\right)^n}

where mm and nn are the saturation exponents specified in the SYNC_MACH record.

Substituting into the air-gap flux expressions yields the algebraic equations:

ψad(1+m(ψad2+ψaq2)nMdu+1Lf+Sd1Ld1)id1LfψfSd1Ld1ψd1=0\psi_{ad} \left( \frac{1 + m(\sqrt{\psi_{ad}^2 + \psi_{aq}^2})^n}{M_d^u} + \frac{1}{L_{\ell f}} + \frac{S_{d1}}{L_{\ell d1}} \right) - i_d - \frac{1}{L_{\ell f}} \psi_f - \frac{S_{d1}}{L_{\ell d1}} \psi_{d1} = 0 ψaq(1+m(ψad2+ψaq2)nMqu+Sq1Lq1+Sq2Lq2)iqSq1Lq1ψq1Sq2Lq2ψq2=0\psi_{aq} \left( \frac{1 + m(\sqrt{\psi_{ad}^2 + \psi_{aq}^2})^n}{M_q^u} + \frac{S_{q1}}{L_{\ell q1}} + \frac{S_{q2}}{L_{\ell q2}} \right) - i_q - \frac{S_{q1}}{L_{\ell q1}} \psi_{q1} - \frac{S_{q2}}{L_{\ell q2}} \psi_{q2} = 0

All synchronous machines have their rotor positions referred to the xx axis of the network reference frame (see Reference Frames & Initialization). The rotor angle δ\delta of a machine is the angle difference between its qq axis and the xx reference axis. In steady state, the machine internal emf (proportional to field current) is aligned along the qq axis; δ\delta is thus the phase angle of that emf with respect to the xx axis.

Definition of the rotor angle delta

The dd and qq components of the stator voltage and current relate to the network (x,y)(x, y) components through the rotor angle δ\delta:

(vdvq)=(sinδcosδcosδsinδ)(vxvy)\begin{pmatrix} v_d \\ v_q \end{pmatrix} = \begin{pmatrix} -\sin\delta & \cos\delta \\ \cos\delta & \sin\delta \end{pmatrix} \begin{pmatrix} v_x \\ v_y \end{pmatrix} (idiq)=(sinδcosδcosδsinδ)(ixiy)\begin{pmatrix} i_d \\ i_q \end{pmatrix} = \begin{pmatrix} -\sin\delta & \cos\delta \\ \cos\delta & \sin\delta \end{pmatrix} \begin{pmatrix} i_x \\ i_y \end{pmatrix}

After transformation, the air-gap flux algebraic equations in (x,y)(x, y) coordinates become:

ψad(1+m(ψad2+ψaq2)nMdu+1Lf+Sd1Ld1)+sinδixcosδiy1LfψfSd1Ld1ψd1=0\psi_{ad} \left( \frac{1 + m(\sqrt{\psi_{ad}^2 + \psi_{aq}^2})^n}{M_d^u} + \frac{1}{L_{\ell f}} + \frac{S_{d1}}{L_{\ell d1}} \right) + \sin\delta\, i_x - \cos\delta\, i_y - \frac{1}{L_{\ell f}} \psi_f - \frac{S_{d1}}{L_{\ell d1}} \psi_{d1} = 0 ψaq(1+m(ψad2+ψaq2)nMqu+Sq1Lq1+Sq2Lq2)cosδixsinδiySq1Lq1ψq1Sq2Lq2ψq2=0\psi_{aq} \left( \frac{1 + m(\sqrt{\psi_{ad}^2 + \psi_{aq}^2})^n}{M_q^u} + \frac{S_{q1}}{L_{\ell q1}} + \frac{S_{q2}}{L_{\ell q2}} \right) - \cos\delta\, i_x - \sin\delta\, i_y - \frac{S_{q1}}{L_{\ell q1}} \psi_{q1} - \frac{S_{q2}}{L_{\ell q2}} \psi_{q2} = 0
vd=Raidωψqvq=Raiq+ωψdv_d = -R_a i_d - \omega \psi_q \qquad\qquad v_q = -R_a i_q + \omega \psi_d dψfdt=ωN(KfvfRfif)dψd1dt=ωNRd1id1dψq1dt=ωNRq1iq1dψq2dt=ωNRq2iq2\frac{d\psi_f}{dt} = \omega_N (K_f v_f - R_f i_f) \qquad \frac{d\psi_{d1}}{dt} = -\omega_N R_{d1} i_{d1} \qquad \frac{d\psi_{q1}}{dt} = -\omega_N R_{q1} i_{q1} \qquad \frac{d\psi_{q2}}{dt} = -\omega_N R_{q2} i_{q2}

where RaR_a is the stator (armature) resistance, RfR_f the field winding resistance, Rd1R_{d1}, Rq1R_{q1}, Rq2R_{q2} the rotor winding resistances, ω\omega the rotor speed (pu), ωN=2πfnom\omega_N = 2\pi f_{nom} the nominal angular frequency (rad/s), vfv_f the field voltage, and KfK_f a coefficient to pass from per unit values of the excitation system to per unit values of the machine.

The stator equations are transformed to the (x,y)(x, y) frame using the rotation matrices above, and the rotor currents are eliminated using the flux-current relationships, yielding the equations actually solved by RAMSES:

Stator equations (algebraic, in xx-yy frame)

Section titled “Stator equations (algebraic, in xxx-yyy frame)”
0=sinδvxcosδvy+(RasinδωLcosδ)ix(Racosδ+ωLsinδ)iyωψaq0 = \sin\delta\, v_x - \cos\delta\, v_y + (R_a \sin\delta - \omega L_\ell \cos\delta)\, i_x - (R_a \cos\delta + \omega L_\ell \sin\delta)\, i_y - \omega \psi_{aq} 0=cosδvxsinδvy(Racosδ+ωNLsinδ)ix(RasinδωLcosδ)iy+ωψad0 = -\cos\delta\, v_x - \sin\delta\, v_y - (R_a \cos\delta + \omega_N L_\ell \sin\delta)\, i_x - (R_a \sin\delta - \omega L_\ell \cos\delta)\, i_y + \omega \psi_{ad} dψfdt=ωN(KfvfRfψfψadLf)\frac{d\psi_f}{dt} = \omega_N \left( K_f v_f - R_f \frac{\psi_f - \psi_{ad}}{L_{\ell f}} \right) dψd1dt=ωNRd1ψd1Sd1ψadLd1\frac{d\psi_{d1}}{dt} = -\omega_N R_{d1} \frac{\psi_{d1} - S_{d1} \psi_{ad}}{L_{\ell d1}} dψq1dt=ωNRq1ψq1Sq1ψaqLq1\frac{d\psi_{q1}}{dt} = -\omega_N R_{q1} \frac{\psi_{q1} - S_{q1} \psi_{aq}}{L_{\ell q1}} dψq2dt=ωNRq2ψq2Sq2ψaqLq2\frac{d\psi_{q2}}{dt} = -\omega_N R_{q2} \frac{\psi_{q2} - S_{q2} \psi_{aq}}{L_{\ell q2}}
1ωNdδdt=ωωref\frac{1}{\omega_N} \frac{d\delta}{dt} = \omega - \omega_{ref} 2Hdωdt=KmTmTeD(ωωref)2H \frac{d\omega}{dt} = K_m T_m - T_e - D(\omega - \omega_{ref})

where HH is the inertia constant (in s), TmT_m the mechanical torque produced by the turbine, KmK_m a coefficient to pass from per unit values of the turbine to per unit values of the machine, and ωref\omega_{ref} the angular speed of the reference axes — ωcoi\omega_{coi} in the COI reference frame, or 1 pu in the synchronous frame (selected by the $OMEGA_REF solver setting).

The electromagnetic torque TeT_e is:

Te=ψadiqψaqid=ψad(cosδix+sinδiy)ψaq(sinδix+cosδiy)T_e = \psi_{ad} i_q - \psi_{aq} i_d = \psi_{ad}(\cos\delta\, i_x + \sin\delta\, i_y) - \psi_{aq}(-\sin\delta\, i_x + \cos\delta\, i_y)

The model has 10 state variables: ixi_x, iyi_y, ψad\psi_{ad}, ψaq\psi_{aq}, ψf\psi_f, ψd1\psi_{d1}, ψq1\psi_{q1}, ψq2\psi_{q2}, δ\delta, ω\omega.

These are balanced by:

  • 4 algebraic equations: air-gap flux (d and q), stator voltage (d and q)
  • 6 differential equations: field flux, d1 damper flux, q1 damper flux, q2 damper flux, rotor angle, rotor speed

The synchronous machine model uses the EMFL per unit system, while the excitation system typically uses its own per unit system. The parameter IBRATIO bridges these two bases:

IBRATIO=IfBmacIfBexcIBRATIO = \frac{I_{fB}^{mac}}{I_{fB}^{exc}}

where IfBmacI_{fB}^{mac} is the field winding base current in the machine model and IfBexcI_{fB}^{exc} is the base current in the excitation system model. The relationship between per-unit field currents in the two systems is:

IBRATIO=if,puexcif,pumacIBRATIO = \frac{i_{f,pu}^{exc}}{i_{f,pu}^{mac}}

Open-circuit unsaturated machine (most common): IfBexcI_{fB}^{exc} is the field current that produces nominal stator voltage (V=1V = 1 pu) at nominal speed (ω=1\omega = 1 pu) with the stator open, neglecting saturation:

IBRATIO=Mdu=XduXIBRATIO = M_d^u = X_d^u - X_\ell

Open-circuit saturated machine: Same conditions but with saturation:

IBRATIO=Mdu1+m=XduX1+mIBRATIO = \frac{M_d^u}{1 + m} = \frac{X_d^u - X_\ell}{1 + m}

Saturated machine at nominal operating conditions: IfBexcI_{fB}^{exc} is the field current when the machine produces nominal active and reactive powers (P=cosϕNP = \cos\phi_N, Q=sinϕNQ = \sin\phi_N) at nominal voltage and speed, with saturation.


The machine model requires the nominal system frequency, given by the mandatory FNOM record (see Solver Settings):

FNOM F ;

where F is the nominal frequency in Hz.

The synchronous machine itself is declared with the SYNC_MACH record:

SYNC_MACH name bus FP FQ P Q SNOM Pnom H D IBRATIO
TYPE_MOD <14 machine parameters, see below>
EXC exc_type param1 param2 ...
TOR tor_type param1 param2 ... ;

TYPE_MOD is a keyword selecting which of two equivalent parameter formats the 14 machine parameters that follow are given in:

  • RL — the inductances and resistances of the Park model are supplied directly:

    RL Ll Mdu Llf Lld1 Mqu Llq1 Llq2 m n Ra Rf Rd1 Rq1 Rq2
  • XT — characteristic reactances and open-circuit time constants are supplied; RAMSES converts them internally to the Park parameters (see Parameter Conversion):

    XT Xl Xd X'd X"d Xq X'q X"q m n Ra T'do T"do T'qo T"qo
ParameterDescriptionUnit
nameMachine name (max 20 characters)
busConnection bus name (max 8 characters)
FPActive power participation fraction (0–1)
FQReactive power participation fraction (0–1)
PInitial active power (used when FP = 0)MW
QInitial reactive power (used when FQ = 0)Mvar
SNOMNominal apparent power, used as base power in the machine modelMVA
PnomNominal active power of the turbine, used as base power for the turbine modelMW
HInertia constants
DDamping coefficient (usually set to zero when the damper windings are modelled)pu
IBRATIOField current base ratio IfBmac/IfBexcI_{fB}^{mac}/I_{fB}^{exc} (see above)pu
TYPE_MODParameter format keyword: RL or XT (case-insensitive)
ParameterDescriptionUnit
XlLeakage reactance LL_\ellpu
Xdd-axis synchronous reactance (Mdu=XdXM_d^u = X_d - X_\ell)pu
X'dd-axis transient reactance (must be smaller than Xd)pu
X"dd-axis subtransient reactance (* if no d1d1 damper winding)pu
Xqq-axis synchronous reactance (Mqu=XqXM_q^u = X_q - X_\ell)pu
X'qq-axis transient reactance (* if no q1q1 winding; must be smaller than Xq)pu
X"qq-axis subtransient reactance (* if no q2q2 winding)pu
mSaturation coefficient (set to 0 to neglect saturation)
nSaturation exponent (ignored when m = 0)
RaArmature resistancepu
T'dod-axis open-circuit transient time constants
T"dod-axis open-circuit subtransient time constant (* if no d1d1 damper winding)s
T'qoq-axis open-circuit transient time constant (* if no q1q1 winding)s
T"qoq-axis open-circuit subtransient time constant (* if no q2q2 winding)s
ParameterDescriptionUnit
LlStator leakage inductance LL_\ellpu
MduUnsaturated d-axis mutual inductance MduM_d^upu
LlfField winding leakage inductance LfL_{\ell f}pu
Lld1d1d1 damper leakage inductance Ld1L_{\ell d1} (* if no d1d1 winding)pu
MquUnsaturated q-axis mutual inductance MquM_q^upu
Llq1q1q1 winding leakage inductance Lq1L_{\ell q1} (* if no q1q1 winding)pu
Llq2q2q2 winding leakage inductance Lq2L_{\ell q2} (* if no q2q2 winding)pu
mSaturation coefficient (set to 0 to neglect saturation)
nSaturation exponent (ignored when m = 0)
RaArmature resistancepu
RfField winding resistance RfR_fpu
Rd1d1d1 damper resistance Rd1R_{d1} (* if no d1d1 winding)pu
Rq1q1q1 winding resistance Rq1R_{q1} (* if no q1q1 winding)pu
Rq2q2q2 winding resistance Rq2R_{q2} (* if no q2q2 winding)pu

A rotor circuit the machine does not have is skipped by putting * in both of its fields — the inductance/reactance and the matching resistance/time-constant field (specifying only one is an error):

CircuitRL fieldsXT fieldsModel switch set to 0
d1d1 damperLld1, Rd1X"d, T"doSd1S_{d1}
q1q1 windingLlq1, Rq1X'q, T'qoSq1S_{q1}
q2q2 windingLlq2, Rq2X"q, T"qoSq2S_{q2}

The combination Sd1=0S_{d1} = 0 with Sq1=Sq2=1S_{q1} = S_{q2} = 1 (field winding plus both q-axis windings but no d-axis damper) is rejected. In the XT format, if the fitted Park parameters come out negative, RAMSES logs an “unrealistic Park inductances or resistances” warning — the supplied reactances and time constants are physically inconsistent.

All reactances, inductances and resistances are in per unit on the machine base (SnomS_{nom}, nominal voltage), using the EMFL per unit system for the rotor quantities. Time constants are entered in seconds and normalised internally by tb=1/(2πfnom)t_b = 1/(2\pi f_{nom}).

The EXC and TOR sub-records specify the excitation system and turbine-governor models. See the Model Reference for available models.


At initialization RAMSES prints one block per synchronous machine. Example:

NUMBER OF SYNCHRONOUS MACHINES : 1
machine at bus V P Q delta sat island br
excit model vf(pu) torque model Tm(pu)
G5 5 1.0000 450.00186 68.49769 70.99 1.0000 1 1
exc_GENERIC3 2.3680 THERMAL_GENERIC1 0.97826

Here the machine G5, connected to bus 5, is in service (br = 1) and injects about 450 MW and 68 Mvar into the grid under a bus voltage of 1 pu.

  • delta is the initial value of the rotor angle δ\delta, in degrees.
  • sat is the saturation factor sat=1+m(ψad2+ψaq2)n1sat = 1 + m \left( \sqrt{\psi_{ad}^2 + \psi_{aq}^2} \right)^n \geq 1 the ratio between the field current in the saturated machine and the corresponding field current when saturation is neglected, for the same operating conditions. It characterizes the extra excitation current needed in the presence of saturated material (sat=1sat = 1 when m is set to zero).
  • vf is the initial field voltage on the exciter base, which is indirectly defined by the IBRATIO parameter of the machine.
  • Tm is the initial mechanical torque on the turbine base, which is defined by the Pnom parameter of the machine.

For a detailed derivation of how STEPSS converts the XT standard parameters (reactances and open-circuit time constants) to the RL Park parameters (inductances and resistances) — including the exact algorithm from the source, known conversion pitfalls when cross-checking against EMT simulators, and a reference Python implementation — see:

Synchronous Machine — Parameter Conversion (XT ↔ RL)