Skip to content

Injector Models

RAMSES custom injector models represent loads, induction machines, inverter-based resources (IBR), and battery energy storage systems (BESS) connected to network buses.


LOAD (inj_load): Exponential Recovery Load

Section titled “LOAD (inj_load): Exponential Recovery Load”

The exponential recovery load model captures the transient and steady-state voltage and frequency dependency of aggregated loads. Immediately after a voltage disturbance, the load behaves according to a transient voltage exponent; it then recovers exponentially to a steady-state behaviour described by a different exponent. The model supports separate active (PP) and reactive (QQ) power recovery dynamics, each with individual minimum/maximum limiters on the recovery variable.

Exponential recovery load block diagram. The bus voltage and frequency drive a steady-state term (V/V0) raised to alpha-s times one plus DP times the speed deviation. From it is subtracted the recovery state xP scaled by the transient term (V/V0) raised to alpha-t. The difference feeds an integrator of time constant Tr, limited between xPmin and xPmax, whose state xP sets the injected power P0 times xP times (V/V0) squared times one plus DP times the speed deviation. The reactive side has the same structure with exponents beta-s and beta-t. Exponential recovery load block diagram. The bus voltage and frequency drive a steady-state term (V/V0) raised to alpha-s times one plus DP times the speed deviation. From it is subtracted the recovery state xP scaled by the transient term (V/V0) raised to alpha-t. The difference feeds an integrator of time constant Tr, limited between xPmin and xPmax, whose state xP sets the injected power P0 times xP times (V/V0) squared times one plus DP times the speed deviation. The reactive side has the same structure with exponents beta-s and beta-t.

The model is parameterized in terms of initial active and reactive conductance/susceptance, G0=P0/V02G_0 = P_0/V_0^2 and B0=Q0/V02B_0 = -Q_0/V_0^2. Two recovery state variables xPx_P and xQx_Q evolve according to:

x˙P=1Tr[(VV0)αs(1+DPΔω)xP(VV0)αt]\dot{x}_P = \frac{1}{T_r}\left[\left(\frac{V}{V_0}\right)^{\alpha_s} \left(1 + D_P\,\Delta\omega\right) - x_P \left(\frac{V}{V_0}\right)^{\alpha_t}\right]

x˙Q=1Tr[(VV0)βs(1+DQΔω)xQ(VV0)βt]\dot{x}_Q = \frac{1}{T_r}\left[\left(\frac{V}{V_0}\right)^{\beta_s} \left(1 + D_Q\,\Delta\omega\right) - x_Q \left(\frac{V}{V_0}\right)^{\beta_t}\right]

where Δω=ωCOI1\Delta\omega = \omega_{\mathrm{COI}} - 1 is the per-unit speed deviation, VV is the bus voltage magnitude, V0V_0 is the initial voltage, αt,βt\alpha_t, \beta_t are transient exponents, αs,βs\alpha_s, \beta_s are steady-state exponents, and TrT_r is the load recovery time constant. The injected currents are then:

ix=G0xPvx(1+DPΔω)B0xQvy(1+DQΔω)i_x = G_0\, x_P\, v_x\left(1 + D_P\,\Delta\omega\right) - B_0\, x_Q\, v_y\left(1 + D_Q\,\Delta\omega\right)

iy=G0xPvy(1+DPΔω)+B0xQvx(1+DQΔω)i_y = G_0\, x_P\, v_y\left(1 + D_P\,\Delta\omega\right) + B_0\, x_Q\, v_x\left(1 + D_Q\,\Delta\omega\right)

When the recovery variable hits its limit (due to e.g. Stalling or complete voltage collapse), the limit is held until the direction of the derivative reverses.

#NameDescriptionUnit
1DPFrequency sensitivity of active powerpu/pu
2A1Proportion of type-1 component in PP
3alpha1Transient voltage exponent for PP (type 1)
4A2Proportion of type-2 component in PP
5alpha2Transient voltage exponent for PP (type 2)
6alpha3Transient voltage exponent for PP (type 3, proportion =1A1A2= 1-A_1-A_2)
7DQFrequency sensitivity of reactive powerpu/pu
8B1Proportion of type-1 component in QQ
9beta1Transient voltage exponent for QQ (type 1)
10B2Proportion of type-2 component in QQ
11beta2Transient voltage exponent for QQ (type 2)
12beta3Transient voltage exponent for QQ (type 3)

Internal computed parameters include the steady-state exponents for each component (derived from the transient exponents), initial conductance G0G_0, susceptance B0B_0, and initial voltage V0V_0.

VariableDescription
iyyy-component of injected current (pu on system base)
ixxx-component of injected current (pu on system base)
xpActive power recovery variable (dimensionless)
xqReactive power recovery variable (dimensionless)

Observables: P, Q, xp, xq

INJEC LOAD LOAD1 BUS1 1. 1. 0. 0. 1.5 0.3 1.0 0.2 2.0 0.5 1.8 0.4 2.5 0.1 3.0 2.0 ;

Parameters: DP A1 alpha1 A2 alpha2 alpha3 DQ B1 beta1 B2 beta2 beta3


vfd_load (inj_vfd_load): Variable Frequency Drive Load

Section titled “vfd_load (inj_vfd_load): Variable Frequency Drive Load”

The VFD load model represents aggregate industrial loads driven by variable-frequency drives, where the power consumption exhibits a composite voltage-dependent characteristic with multiple exponential components and frequency sensitivity. It also includes low-voltage protection: below a configurable threshold VminV_{\min}, the load switches to a constant-admittance representation, preventing numerical difficulties during deep voltage sags.

Variable frequency drive load block diagram. The bus voltage passes a 3 ms filter and is multiplied by the frequency factor, then by a three-component exponential blend with fractions a1 and a2 and exponents alpha1, alpha2 and alpha3, normalised at the initial voltage. Below the threshold Vlow the model switches to an equivalent constant admittance Geq and Beq, whose values are set at initialisation so the two regimes meet at Vlow. The frequency deviation comes either from the local bus, measured with time constant Tmes, or from the centre-of-inertia speed. Variable frequency drive load block diagram. The bus voltage passes a 3 ms filter and is multiplied by the frequency factor, then by a three-component exponential blend with fractions a1 and a2 and exponents alpha1, alpha2 and alpha3, normalised at the initial voltage. Below the threshold Vlow the model switches to an equivalent constant admittance Geq and Beq, whose values are set at initialisation so the two regimes meet at Vlow. The frequency deviation comes either from the local bus, measured with time constant Tmes, or from the centre-of-inertia speed.

The active and reactive powers depend on bus voltage VV and frequency deviation Δf=f/f01\Delta f = f/f_0 - 1:

P=(1+DPΔf)P0a1Vα1+a2Vα2+(1a1a2)Vα3a1V0α1+a2V0α2+(1a1a2)V0α3P = \left(1 + D_P\,\Delta f\right) P_0 \cdot \frac{a_1 V^{\alpha_1} + a_2 V^{\alpha_2} + (1-a_1-a_2)\, V^{\alpha_3}}{a_1 V_0^{\alpha_1} + a_2 V_0^{\alpha_2} + (1-a_1-a_2)\, V_0^{\alpha_3}}

Q=(1+DQΔf)Q0b1Vβ1+b2Vβ2+(1b1b2)Vβ3b1V0β1+b2V0β2+(1b1b2)V0β3Q = \left(1 + D_Q\,\Delta f\right) Q_0 \cdot \frac{b_1 V^{\beta_1} + b_2 V^{\beta_2} + (1-b_1-b_2)\, V^{\beta_3}}{b_1 V_0^{\beta_1} + b_2 V_0^{\beta_2} + (1-b_1-b_2)\, V_0^{\beta_3}}

Below VminV_{\min}, an equivalent constant admittance is used:

Plow=GeqV2,Qlow=BeqV2P_{\mathrm{low}} = G_{\mathrm{eq}}\, V^2, \qquad Q_{\mathrm{low}} = -B_{\mathrm{eq}}\, V^2

where GeqG_{\mathrm{eq}} and BeqB_{\mathrm{eq}} are computed at initialization to ensure continuity at V=VminV = V_{\min}. The switch between the two regimes is governed by a piecewise-linear function of VV:

u={0V<Vmin1VVminu = \begin{cases} 0 & V < V_{\min} \\ 1 & V \geq V_{\min} \end{cases}

A small voltage filter (time constant 0.003 s) smooths the transition. The frequency deviation can optionally be computed from the local bus frequency (measured via an f_inj block with time constant TmesT_{\mathrm{mes}}) or from the system centre-of-inertia speed.

The initial voltage V0V_0 can differ from the transmission bus voltage if a distribution transformer ratio is implied (set Vinit0V_{\mathrm{init}} \ne 0 to specify the distribution-side voltage; otherwise the transmission voltage is used directly).

#NameDescriptionUnit
1DpFrequency sensitivity of active powerpu/pu
2a1Fraction of type-1 component in PP
3alpha1Voltage exponent of type-1 PP component
4a2Fraction of type-2 component in PP
5alpha2Voltage exponent of type-2 PP component
6alpha3Voltage exponent of type-3 PP component (fraction =1a1a2= 1-a_1-a_2)
7DqFrequency sensitivity of reactive powerpu/pu
8b1Fraction of type-1 component in QQ
9beta1Voltage exponent of type-1 QQ component
10b2Fraction of type-2 component in QQ
11beta2Voltage exponent of type-2 QQ component
12beta3Voltage exponent of type-3 QQ component
13VinitInitial distribution-bus voltage (0 = use transmission voltage)pu
14VlowVoltage threshold for constant-admittance regime (recommended 0.5–0.7)pu
15foption1 = use local bus frequency; 0 = use COI speedflag
16TmesFrequency measurement time constants
VariableDescription
VrealVoltage at equivalent distribution bus
VFiltered distribution-bus voltage (3 ms filter)
PActive power consumed
QReactive power consumed
fbusLocal bus frequency (used if foption=1)
dfFrequency deviation Δf\Delta f
uRegime switch (1 = above VminV_{\min}, 0 = constant admittance)

Observables: P, Q, df, u

INJEC vfd_load VFD1 BUS_IND 1. 1. 0. 0. 1.5 0.7 2.0 0.2 1.0 0.5
1.2 0.5 2.5 0.1 1.5 0.8
0.0 0.6 0 0.1 ;

The restorative load model represents loads that self-restore toward a nominal characteristic after a voltage disturbance. The load’s active and reactive powers are governed by two internal recovery variables that evolve dynamically, allowing the simulation to capture the slow restoration of thermostatically controlled loads (heating, cooling) and similar self-restoring demand.

Restorative load block diagram. The steady-state term, the voltage raised to alpha-s times one plus DP times the speed deviation, has the recovery state multiplied by the transient term subtracted from it. The difference drives an integrator of time constant Tr limited between xPmin and xPmax, whose state scales the injected currents through the initial conductance and susceptance. The reactive side has the same structure with exponents beta-s and beta-t. Restorative load block diagram. The steady-state term, the voltage raised to alpha-s times one plus DP times the speed deviation, has the recovery state multiplied by the transient term subtracted from it. The difference drives an integrator of time constant Tr limited between xPmin and xPmax, whose state scales the injected currents through the initial conductance and susceptance. The reactive side has the same structure with exponents beta-s and beta-t.

The recovery variable xPx_P for active power satisfies:

x˙P=1Tr[Vαs(1+DPΔω)xPVαt]\dot{x}_P = \frac{1}{T_r}\left[V^{\alpha_s}\left(1 + D_P\,\Delta\omega\right) - x_P\, V^{\alpha_t}\right]

with analogous equation for xQx_Q. Here αs\alpha_s and αt\alpha_t are the steady-state and transient voltage exponents respectively. Limiters [xP,min,xP,max][x_{P,\min},\, x_{P,\max}] are applied. The injected currents are expressed as:

iy=B0(1+DQΔω)xQvx+G0(1+DPΔω)xPvyi_y = -B_0\left(1 + D_Q\,\Delta\omega\right) x_Q\, v_x + G_0\left(1 + D_P\,\Delta\omega\right) x_P\, v_y

ix=B0(1+DQΔω)xQvy+G0(1+DPΔω)xPvxi_x = \phantom{-}B_0\left(1 + D_Q\,\Delta\omega\right) x_Q\, v_y + G_0\left(1 + D_P\,\Delta\omega\right) x_P\, v_x

where the ratio V/V0V/V_0 governs the voltage dependence through vrat.

#NameDescriptionUnit
1DPFrequency sensitivity of active powerpu/pu
2alphatTransient active power voltage exponent
3alphasSteady-state active power voltage exponent
4xP_minMinimum limit for xPx_P
5xP_maxMaximum limit for xPx_P
6DQFrequency sensitivity of reactive powerpu/pu
7betatTransient reactive power voltage exponent
8betasSteady-state reactive power voltage exponent
9xQ_minMinimum limit for xQx_Q
10xQ_maxMaximum limit for xQx_Q
11TrLoad recovery time constants
VariableDescription
iyyy-component of injected current
ixxx-component of injected current
xpActive power recovery variable
xqReactive power recovery variable

Observables: P, Q, xp, xq

INJEC RESTLD RESTLD1 BUS2 1. 1. 0. 0. 1.5 0.5 2.0 0.0 2.0 1.2 0.5 2.5 0.0 2.0 60.0 ;

The simplest injector model: maintains constant active and reactive power consumption regardless of bus voltage or frequency. The power is fixed at its initial operating-point value. A small first-order filter (time constant Tout) drives the injected currents smoothly to their target values, preventing algebraic loops.

Constant PQ load block diagram. The two current references are formed from the initial powers and the measured voltage components divided by the voltage squared, and each passes a first-order filter of time constant Tout to give the injected current. The initial powers are fixed, so the power drawn does not follow the voltage. Constant PQ load block diagram. The two current references are formed from the initial powers and the measured voltage components divided by the voltage squared, and each passes a first-order filter of time constant Tout to give the injected current. The initial powers are fixed, so the power drawn does not follow the voltage.

The current references are set to deliver the initial powers P0P_0 and Q0Q_0 at the measured voltage VV:

Ix,set=P0vx+Q0vyV2,Iy,set=P0vyQ0vxV2I_{x,\mathrm{set}} = \frac{P_0 v_x + Q_0 v_y}{V^2}, \qquad I_{y,\mathrm{set}} = \frac{P_0 v_y - Q_0 v_x}{V^2}

These references pass through a first-order filter with time constant ToutT_{\mathrm{out}} to produce the actual injected currents:

Touti˙x+ix=Ix,set,Touti˙y+iy=Iy,setT_{\mathrm{out}}\,\dot{i}_x + i_x = I_{x,\mathrm{set}}, \qquad T_{\mathrm{out}}\,\dot{i}_y + i_y = I_{y,\mathrm{set}}

#NameDescriptionUnit
1ToutOutput filter time constant (recommended: 0.01 s)s

Initial conditions P0P_0, Q0Q_0, V0V_0 are computed automatically at initialization.

VariableDescription
ixInjected xx-current
iyInjected yy-current
IxsetCurrent reference xx
IysetCurrent reference yy
PObserved active power
QObserved reactive power
VBus voltage magnitude

Observables: P, Q

INJEC inj_PQ LOAD_PQ BUS3 1. 1. 0. 0. 0.01 ;

Models an external network or generator cluster as a Thévenin equivalent: an ideal voltage source Eˉth\bar{E}_{\mathrm{th}} behind a pure reactance XthX_{\mathrm{th}}. The model computes the internal voltage magnitude and phase angle at initialization from the initial bus conditions and holds them constant during the simulation. It is useful for representing neighbouring system equivalents or simplified machine representations.

Thevenin equivalent block diagram. The internal voltage magnitude and phase angle are fixed at initialisation, and the injected currents follow directly from them, the terminal voltage and the Thevenin reactance. The model has no state. Thevenin equivalent block diagram. The internal voltage magnitude and phase angle are fixed at initialisation, and the injected currents follow directly from them, the terminal voltage and the Thevenin reactance. The model has no state.

The Thévenin reactance is obtained from the specified short-circuit power SscS_{\mathrm{sc}} (MVA):

Xth=SbaseSscX_{\mathrm{th}} = \frac{S_{\mathrm{base}}}{S_{\mathrm{sc}}}

The internal voltage phasor is computed at t=0t=0:

Eth,x=vxXthiy,Eth,y=vy+XthixE_{\mathrm{th},x} = v_x - X_{\mathrm{th}}\, i_y, \qquad E_{\mathrm{th},y} = v_y + X_{\mathrm{th}}\, i_x

Eth=Eth,x2+Eth,y2,ϕ=arctan ⁣(Eth,yEth,x)E_{\mathrm{th}} = \sqrt{E_{\mathrm{th},x}^2 + E_{\mathrm{th},y}^2}, \qquad \phi = \arctan\!\left(\frac{E_{\mathrm{th},y}}{E_{\mathrm{th},x}}\right)

During simulation the injected currents satisfy:

iy=EthcosϕvxXth,ix=EthsinϕvyXthi_y = -\frac{E_{\mathrm{th}}\cos\phi - v_x}{X_{\mathrm{th}}}, \qquad i_x = \frac{E_{\mathrm{th}}\sin\phi - v_y}{X_{\mathrm{th}}}

#NameDescriptionUnit
1XTHShort-circuit power of the equivalent (converted to XthX_{\mathrm{th}} at initialization)MVA

Internal parameters ETH (Thévenin voltage magnitude, pu) and phase (internal angle, rad) are computed automatically.

VariableDescription
iyInjected yy-current
ixInjected xx-current

Observables: P, Q (in MW and Mvar at system base)

INJEC THEVEQ EQUIV1 SLACK_BUS 1. 1. 0. 0. 2000.0 ;

INDMACH1 (inj_indmach1): Single-Cage Induction Machine

Section titled “INDMACH1 (inj_indmach1): Single-Cage Induction Machine”

A single-cage (single-rotor-circuit) induction machine model for motor loads. The machine is represented on its own MVA base (or inferred from load factor LF) with a shunt capacitor BshB_{\mathrm{sh}} to represent power factor correction. The mechanical torque is a quadratic function of rotor speed. At initialization, the model solves nonlinear algebraic equations to find the operating-point slip and flux linkages.

Single-cage induction machine block diagram. The terminal voltage drives the stator equations to give the machine currents, which with the rotor flux linkages give the electromagnetic torque. The load torque, a quadratic function of rotor speed, is subtracted and the difference is integrated through twice the inertia constant to give the rotor speed, which returns both to the load torque and to the rotor circuit as slip against the network frame. Single-cage induction machine block diagram. The terminal voltage drives the stator equations to give the machine currents, which with the rotor flux linkages give the electromagnetic torque. The load torque, a quadratic function of rotor speed, is subtracted and the difference is integrated through twice the inertia constant to give the rotor speed, which returns both to the load torque and to the rotor circuit as slip against the network frame.

The machine uses the standard dd-qq reference-frame formulation with Lss=Lsr+LlsL_{ss} = L_{sr} + L_{ls} and Lrr=Lsr+LlrL_{rr} = L_{sr} + L_{lr}. The rotor flux-linkage equations are:

dψdrdt=ω0(RrLrrψdr+LsrRrLrriym(ωωm)ψqr)\frac{d\psi_{dr}}{dt} = \omega_0\left(-\frac{R_r}{L_{rr}}\psi_{dr} + \frac{L_{sr} R_r}{L_{rr}} i_{ym} - (\omega - \omega_m)\psi_{qr}\right)

dψqrdt=ω0(RrLrrψqr+LsrRrLrrixm+(ωωm)ψdr)\frac{d\psi_{qr}}{dt} = \omega_0\left(-\frac{R_r}{L_{rr}}\psi_{qr} + \frac{L_{sr} R_r}{L_{rr}} i_{xm} + (\omega - \omega_m)\psi_{dr}\right)

where ω0=2πfnom\omega_0 = 2\pi f_{\mathrm{nom}} and ωm\omega_m is the rotor mechanical speed. The equations for the stator (with shunt susceptance BshB_{\mathrm{sh}}) are:

Rsiym+(LssLsr2Lrr)ωixm+LsrLrrωψqr=vyR_s i_{ym} + \left(L_{ss} - \frac{L_{sr}^2}{L_{rr}}\right)\omega\, i_{xm} + \frac{L_{sr}}{L_{rr}}\omega\,\psi_{qr} = v_y

Rsixm(LssLsr2Lrr)ωiymLsrLrrωψdr=vxR_s i_{xm} - \left(L_{ss} - \frac{L_{sr}^2}{L_{rr}}\right)\omega\, i_{ym} - \frac{L_{sr}}{L_{rr}}\omega\,\psi_{dr} = v_x

The rotor speed dynamics follow the swing equation:

dωmdt=TeTm2H\frac{d\omega_m}{dt} = \frac{T_e - T_m}{2H}

where the electromagnetic torque is:

Te=LsrLrr(ψdrixm+ψqriym)T_e = \frac{L_{sr}}{L_{rr}}\left(-\psi_{dr} i_{xm} + \psi_{qr} i_{ym}\right)

and the mechanical torque is the quadratic load curve:

Tm=Tm0(Aωm2+Bωm+1AB)T_m = T_{m0}\left(A\,\omega_m^2 + B\,\omega_m + 1 - A - B\right)

#NameDescriptionUnit
1SNOMMachine nominal apparent power (0 = infer from LF)MVA
2RSStator resistancepu
3LlsStator leakage inductancepu
4LSRMagnetizing inductancepu
5RRRotor resistancepu
6LlrRotor leakage inductancepu
7HMachine inertia constants
8AQuadratic torque-speed coefficient
9BLinear torque-speed coefficient
10LFLoad factor (for SNOM inference)
VariableDescription
iyyy-component of stator current
ixxx-component of stator current
psidrdd-axis rotor flux linkage
psiqrqq-axis rotor flux linkage
omegamRotor mechanical speed

Observables: P, Qmot+comp, Qmot, omega, Tm

INJEC INDMACH1 MTR1 BUS_MV 1. 1. 0. 0. 10.0 0.01 0.10 2.50 0.015 0.10 1.5 0.8 0.1 0.0 ;

INDMACH2 (inj_indmach2): Double-Cage Induction Machine

Section titled “INDMACH2 (inj_indmach2): Double-Cage Induction Machine”

A double-cage (double-rotor-circuit) induction machine model following the Eurostag formulation. Two parallel rotor cages allow more accurate representation of the machine’s impedance-vs-frequency characteristic, which is especially important for the starting transient. The model structure mirrors inj_indmach1 but includes a second set of rotor flux states.

Double-cage induction machine block diagram. The structure is that of INDMACH1 with the rotor doubled: the stator equations give the machine currents, two rotor cages carry their own flux linkages, and the electromagnetic torque sums a contribution from each. The load torque is subtracted and the difference integrated through twice the inertia constant to give the rotor speed, which returns to the load torque and to both cages as slip. Double-cage induction machine block diagram. The structure is that of INDMACH1 with the rotor doubled: the stator equations give the machine currents, two rotor cages carry their own flux linkages, and the electromagnetic torque sums a contribution from each. The load torque is subtracted and the difference integrated through twice the inertia constant to give the rotor speed, which returns to the load torque and to both cages as slip.

The machine has parameters: stator resistance R1R_1, stator leakage L1L_1, magnetizing inductance LmL_m, cage-1 resistance R2R_2 and leakage L2L_2, cage-2 resistance R3R_3 and leakage L3L_3. The state vector is (ψdr1,ψqr1,ψdr2,ψqr2,ωm)(\psi_{dr1},\psi_{qr1},\psi_{dr2},\psi_{qr2},\omega_m) with flux-linkage equations for each cage:

dψdr1dt=ω0(R2LAψdr1+LmR2LAiym(ωωm)ψqr1)\frac{d\psi_{dr1}}{dt} = \omega_0\left(-\frac{R_2}{L_{A}}\psi_{dr1} + \frac{L_m R_2}{L_{A}} i_{ym} - (\omega - \omega_m)\psi_{qr1}\right)

dψdr2dt=ω0(R3LBψdr2+LmR3LBiym(ωωm)ψqr2)\frac{d\psi_{dr2}}{dt} = \omega_0\left(-\frac{R_3}{L_{B}}\psi_{dr2} + \frac{L_m R_3}{L_{B}} i_{ym} - (\omega - \omega_m)\psi_{qr2}\right)

where LA=Lm+L2L_A = L_m + L_2 and LB=Lm+L3L_B = L_m + L_3. The total electromagnetic torque combines contributions from both cages:

Te=LmLA(ψdr1ixm+ψqr1iym)+LmLB(ψdr2ixm+ψqr2iym)T_e = \frac{L_m}{L_A}\left(-\psi_{dr1} i_{xm} + \psi_{qr1} i_{ym}\right) + \frac{L_m}{L_B}\left(-\psi_{dr2} i_{xm} + \psi_{qr2} i_{ym}\right)

The swing equation is identical to inj_indmach1.

#NameDescriptionUnit
1SNOMMachine MVA rating (0 = infer from LF)MVA
2R1Stator resistancepu
3L1Stator leakage inductancepu
4LmMagnetizing inductancepu
5R2First cage resistancepu
6L2First cage leakage inductancepu
7R3Second cage resistancepu
8L3Second cage leakage inductancepu
9HInertia constants
10AQuadratic torque-speed coefficient
11BLinear torque-speed coefficient
12LFLoad factor (for SNOM inference)
VariableDescription
iyyy-component of stator current
ixxx-component of stator current
psidr1dd-axis flux of first rotor cage
psiqr1qq-axis flux of first rotor cage
psidr2dd-axis flux of second rotor cage
psiqr2qq-axis flux of second rotor cage
omegamRotor mechanical speed

Observables: P, Qmot+comp, Qmot, omega

INJEC INDMACH2 MTR2 BUS_MV 1. 1. 0. 0. 10.0 0.01 0.08 2.00 0.02 0.06 0.04 0.10 1.5 0.8 0.1 0.0 ;

INDM1 (inj_INDM1): Alternative Induction Machine

Section titled “INDM1 (inj_INDM1): Alternative Induction Machine”

The data-file model name is INDM1 (or inj_INDM1).

An alternative single-cage induction machine model that uses the INI_indmach1 helper function for initialization. It is equivalent in physics to inj_indmach1 but implements the equations using RAMSES .txt-style model syntax with explicit state initialization calls. This can simplify parameterization when the helper function’s output is directly used.

The model equations match those of inj_indmach1, whose block diagram applies here unchanged. The key distinction is the use of the INI_indmach1 function at parameter-evaluation time to pre-compute BshB_{\mathrm{sh}}, Tm0T_{m0}, and the initial flux linkages and rotor speed, rather than solving the initialization system in Fortran. With Lss=Lsr+LlsL_{ss} = L_{sr} + L_{ls} and Lrr=Lsr+LlrL_{rr} = L_{sr} + L_{lr}, the rotor flux equations are:

dψdrdt=2πf0[RRLrrψdr+LSRRRLrriym(ωωm)ψqr]\frac{d\psi_{dr}}{dt} = 2\pi f_0 \left[ -\frac{R_R}{L_{rr}}\psi_{dr} + \frac{L_{SR} R_R}{L_{rr}} i_{ym} - (\omega - \omega_m)\psi_{qr} \right]

dψqrdt=2πf0[RRLrrψqr+LSRRRLrrixm+(ωωm)ψdr]\frac{d\psi_{qr}}{dt} = 2\pi f_0 \left[ -\frac{R_R}{L_{rr}}\psi_{qr} + \frac{L_{SR} R_R}{L_{rr}} i_{xm} + (\omega - \omega_m)\psi_{dr} \right]

The rotor speed integral uses:

dωmdt=12H[LSRLrr(ψdrixm+ψqriym)Tm0(Aωm2+Bωm+1AB)]\frac{d\omega_m}{dt} = \frac{1}{2H}\left[\frac{L_{SR}}{L_{rr}}(-\psi_{dr} i_{xm} + \psi_{qr} i_{ym}) - T_{m0}(A\omega_m^2 + B\omega_m + 1 - A - B)\right]

with a lower limit of ωm0\omega_m \ge 0.

#NameDescriptionUnit
1SNOMMachine MVA ratingMVA
2RSStator resistancepu
3LlsStator leakage inductancepu
4LSRMagnetizing inductancepu
5RRRotor resistancepu
6LlrRotor leakage inductancepu
7HInertia constants
8AQuadratic torque-speed coefficient
9BLinear torque-speed coefficient
10LFLoad factor

Computed internally: BSH (shunt susceptance), TM0 (initial mechanical torque), LSS, LRR.

VariableDescription
Psidrdd-axis rotor flux linkage
Psiqrqq-axis rotor flux linkage
omegamRotor mechanical speed
iym, ixmStator current components (on machine base)
dPsidr, dPsiqr, domegamTime-derivative auxiliary states

Observables: omegam

INJEC INDM1 MTR3 BUS_MV 1. 1. 0. 0. 10.0 0.01 0.10 2.50 0.015 0.10 1.5 0.8 0.1 0.0 ;

Renewable Generation / Inverter-Based Resources

Section titled “Renewable Generation / Inverter-Based Resources”

IBG (inj_IBG): Inverter-Based Generator (Generic IBR)

Section titled “IBG (inj_IBG): Inverter-Based Generator (Generic IBR)”

A generic inverter-based generation model suitable for representing aggregated distributed generation or any grid-following IBR. The model includes a Phase-Locked Loop (PLL), inner current control with active (IpI_p) and reactive (IqI_q) current commands, LVRT/HVRT logic with voltage-dependent reactive current injection, frequency-responsive active power modulation, and reconnection logic after disconnection events.

Generic inverter-based generator block diagram. The frequency deviation passes a deadband fdbd and sets the active power order Pext times one plus b times the saturated deviation, giving the active current Ip. The terminal voltage drives the LVRT and HVRT logic and a reactive boost kRCI times Vref minus Vt, giving the reactive current Iq. Both enter a current limiter of magnitude Imax that gives priority to reactive current during a voltage dip, and a Park transform resolves them into ix and iy using the PLL angle. The q-axis voltage drives a second-order PI phase-locked loop that freezes below Vmin,pll and supplies that angle. Generic inverter-based generator block diagram. The frequency deviation passes a deadband fdbd and sets the active power order Pext times one plus b times the saturated deviation, giving the active current Ip. The terminal voltage drives the LVRT and HVRT logic and a reactive boost kRCI times Vref minus Vt, giving the reactive current Iq. Both enter a current limiter of magnitude Imax that gives priority to reactive current during a voltage dip, and a Park transform resolves them into ix and iy using the PLL angle. The q-axis voltage drives a second-order PI phase-locked loop that freezes below Vmin,pll and supplies that angle.

The PLL tracks the terminal voltage angle θ\theta via a second-order PI controller with a freeze option below Vmin,pllV_{\mathrm{min,pll}}:

dθPLLdt=ΔωPLL,dΔωPLLdt=kPLLvq\frac{d\theta_{\mathrm{PLL}}}{dt} = \Delta\omega_{\mathrm{PLL}}, \qquad \frac{d\Delta\omega_{\mathrm{PLL}}}{dt} = k_{\mathrm{PLL}}\, v_q

where vqv_q is the qq-axis terminal voltage in the PLL frame. The current commands Ip,cmdI_{p,\mathrm{cmd}} and Iq,cmdI_{q,\mathrm{cmd}} are derived from outer controls:

  • Active power is modulated by frequency according to frequency deadband fdbd: P=Pext(1+bsat(Δffstart,fmin,fmax))P = P_{\mathrm{ext}}\left(1 + b\,\mathrm{sat}(\Delta f - f_{\mathrm{start}}, f_{\mathrm{min}}, f_{\mathrm{max}})\right)

  • During voltage dips (LVRT), reactive current is boosted: Iq,boost=kRCI(VrefVt)I_{q,\mathrm{boost}} = k_{\mathrm{RCI}}\,(V_{\mathrm{ref}} - V_t)

  • Current magnitude is limited to ImaxI_{\mathrm{max}} with priority to reactive current during LVRT.

The injected currents in xx-yy frame are:

ix=IpcosθPLLIqsinθPLLi_x = I_p \cos\theta_{\mathrm{PLL}} - I_q \sin\theta_{\mathrm{PLL}} iy=IpsinθPLL+IqcosθPLLi_y = I_p \sin\theta_{\mathrm{PLL}} + I_q \cos\theta_{\mathrm{PLL}}

#NameDescriptionUnit
1ImaxMaximum current magnitudepu
2INNominal currentpu
3IprateActive current ramp ratepu/s
4TgGenerator time constants
5TmMeasurement filter time constants
6tLVRT1LVRT ride-through time threshold 1s
7tLVRT2LVRT ride-through time threshold 2s
8tLVRTintLVRT integration times
9VmaxMaximum voltage for operationpu
10tauPLL response timems
11VminpllVoltage below which PLL is frozenpu
12aLVRT voltage-current curve slope
13VminMinimum LVRT voltagepu
14VintIntermediate LVRT voltagepu
15fminMinimum frequency for operationpu
16fmaxMaximum frequency for operationpu
17fstartFrequency threshold for P modulationpu
18bFrequency droop gain
19frReference frequencypu
20TrReconnection delay after trips
21ReGrid equivalent resistancepu
22XeGrid equivalent reactancepu
23CM1LVRT control mode flag
24kRCIReactive current injection gain (LVRT)
25kRCAReactive current absorption gain (HVRT)
26mActive-reactive current priority parameter
27nActive-reactive current priority parameter
28dbminFrequency deadband lower limitpu
29dbmaxFrequency deadband upper limitpu
30HVRTHVRT flag
31LVRTLVRT flag
32CM2Control mode 2 flag
33VtripTrip voltage thresholdpu
VariableDescription
vxl, vylFiltered terminal voltage components
VtTerminal voltage magnitude
PLLPhaseAnglePLL phase angle
VmVoltage magnitude measurement
Ip, IqActive and reactive current outputs
Ipcmd, IqcmdCurrent commands
Iqmax, IqminReactive current limits
Ipmax, IpminActive current limits
DeltaW, DeltaWfFrequency deviation and filtered value
Pgen, QgenGenerated active and reactive power
INJEC IBG IBG1 BUS_GEN 1. 1. 0. 0. 1.2 1.0 0.5 0.02 0.01 0.5 1.0 0.05
1.1 20.0 0.1 2.0 0.1 0.5 0.95 1.05
0.0 2.0 1.0 1.0 0.0 0.05 1 2.0 1.5
2.0 2.0 -0.02 0.02 1 1 1 0.85 ;

The data-file model name is WT3 (or inj_WT3).

A Type 3 wind turbine model implementing the WECC composite structure with four coupled sub-models:

  • REPC_A: Plant-level controller (reactive power / voltage regulation, frequency response)
  • REEC_A: Electrical controller (inner dd-qq current control, LVRT/HVRT logic)
  • WTGTRQ_A: Generator torque controller (rotor speed regulation via electrical torque command)
  • WTGPT_A: Pitch controller (aerodynamic power limitation)
  • WTGAR_A: Aerodynamic rotor model
  • WTGT_A: Two-mass mechanical drivetrain (turbine inertia HtH_t, generator inertia HgH_g, shaft stiffness KshaftK_{\mathrm{shaft}}, damping DshaftD_{\mathrm{shaft}})

The doubly-fed induction generator (DFIG) topology allows decoupled control of active and reactive power via rotor-side converter injection.

WT3 block diagram. Across the top, the plant controller REPC_A feeds the electrical controller REEC_A, which feeds the generator interface REGC_A and the injected currents ix and iy. Along the bottom, the wind speed drives the aerodynamic rotor WTGAR_A, then the two-mass drivetrain WTGT_A, whose speed drives the torque controller WTGTRQ_A and the pitch controller WTGPT_A. The torque controller returns a reference from the speed-power table to the electrical controller, the pitch controller returns a pitch angle to the rotor, and the electrical torque acts on the drivetrain. WT3 block diagram. Across the top, the plant controller REPC_A feeds the electrical controller REEC_A, which feeds the generator interface REGC_A and the injected currents ix and iy. Along the bottom, the wind speed drives the aerodynamic rotor WTGAR_A, then the two-mass drivetrain WTGT_A, whose speed drives the torque controller WTGTRQ_A and the pitch controller WTGPT_A. The torque controller returns a reference from the speed-power table to the electrical controller, the pitch controller returns a pitch angle to the rotor, and the electrical torque acts on the drivetrain.

The two-mass drivetrain model governs rotor dynamics:

2Htdωtdt=TmKshaft(θtθg)Dshaft(ωtωg)2H_t \frac{d\omega_t}{dt} = T_m - K_{\mathrm{shaft}}(\theta_t - \theta_g) - D_{\mathrm{shaft}}(\omega_t - \omega_g)

2Hgdωgdt=Kshaft(θtθg)+Dshaft(ωtωg)Te2H_g \frac{d\omega_g}{dt} = K_{\mathrm{shaft}}(\theta_t - \theta_g) + D_{\mathrm{shaft}}(\omega_t - \omega_g) - T_e

The torque controller (WTGTRQ_A) uses a piecewise power-speed characteristic:

Te,ref=interp(ωg;  [(spd1,p1),(spd2,p2),(spd3,p3),(spd4,p4)])T_{e,\mathrm{ref}} = \mathrm{interp}(\omega_g;\; [(\mathrm{spd}_1, p_1), (\mathrm{spd}_2, p_2), (\mathrm{spd}_3, p_3), (\mathrm{spd}_4, p_4)])

The electrical controller (REEC_A) provides reactive current injection during voltage dips:

Iq,vdip=kqv(Vref0Vt)when Vt<VdipI_{q,\mathrm{vdip}} = k_{qv}\left(V_{\mathrm{ref0}} - V_t\right)\quad \text{when } V_t < V_{\mathrm{dip}}

with limiter [Iql1,Iqh1][I_{ql1}, I_{qh1}].

The plant controller (REPC_A) optionally provides frequency response:

ΔPref=Ddnsat(Δf,fdbd1,0)+Dupsat(Δf,0,fdbd2)\Delta P_{\mathrm{ref}} = D_{\mathrm{dn}}\,\mathrm{sat}(\Delta f, f_{\mathrm{dbd1}}, 0) + D_{\mathrm{up}}\,\mathrm{sat}(\Delta f, 0, f_{\mathrm{dbd2}})

Network interface. REGC_A injects a current rather than a voltage behind an impedance. The filtered active and reactive current commands IpfI_{pf}, IqfI_{qf} are resolved into the network frame with the PLL angle and rescaled from the machine rating to the system base:

ix=(Ipfcosθpll+Iqfsinθpll)SnomSbasei_x = \left(I_{pf}\cos\theta_{\mathrm{pll}} + I_{qf}\sin\theta_{\mathrm{pll}}\right)\frac{S_{\mathrm{nom}}}{S_{\mathrm{base}}}

iy=(IpfsinθpllIqfcosθpll)SnomSbasei_y = \left(I_{pf}\sin\theta_{\mathrm{pll}} - I_{qf}\cos\theta_{\mathrm{pll}}\right)\frac{S_{\mathrm{nom}}}{S_{\mathrm{base}}}

The PLL angle itself tracks the qq-axis component of the filtered terminal voltage:

vq=vx,filtsinθpll+vy,filtcosθpllv_q = -v_{x,\mathrm{filt}}\sin\theta_{\mathrm{pll}} + v_{y,\mathrm{filt}}\cos\theta_{\mathrm{pll}}

WT4 and BESS use the same interface.

#NameSub-modelDescriptionUnit
1SNOMNominal powerMW
2–32REPC_APlant controllerReactive/voltage/frequency controlvarious
33–46WTGTRQ_ATorque ctrlSpeed-torque lookup table, rate limitsvarious
47–56WTGPT_APitch ctrlPitch PI gains, angle limits, rate limitsvarious
57–58WTGAR_AAeroAerodynamic gain, initial pitch angle
59–62WTGT_ADrivetrainHtH_t, HgH_g, DshaftD_{\mathrm{shaft}}, KshaftK_{\mathrm{shaft}}s, pu
63–97REEC_AElec ctrlLVRT/HVRT, current limits, inner PIvarious
98+REGC_AGeneratorGenerator electrical conversionvarious

Full parameter list has 80+ entries; refer to a working example data file for the complete ordering.

INJEC WT3 WT3_1 BUS_WIND 1. 1. 0. 0.
100.0 0.0 0.02 0 0.0 0.05 0 0.0 0.3 -0.3 2.0 0.4 0.3 -0.3 0.0 0.15 0.9 0.05
0.0 -0.06 0.06 -0.05 0.05 0.05 -0.05 2.0 1.0 1.0 -1.0 0.02 0 0 0.8
1.5 1.5 0.01 0.5 ... ;

WT4 (inj_WT4): Type 4 Wind Turbine (Full Converter)

Section titled “WT4 (inj_WT4): Type 4 Wind Turbine (Full Converter)”

The data-file model name is WT4 (or inj_WT4).

A Type 4 wind turbine with full-rated converter. Unlike Type 3, the generator is fully decoupled from the grid through a back-to-back converter. The model implements the same WECC framework as WT3 but without the doubly-fed rotor circuit: the mechanical sub-model is a single-mass (or two-mass) drive train, and all electrical power passes through the converter. Sub-models include REPC_A (plant controller), REEC_A (electrical controller), WTGT_A (drivetrain), and REGC_A (generator/converter).

WT4 block diagram. The plant controller REPC_A feeds a power order ramp limited by dPmax and dPmin, then the electrical controller REEC_A and the generator interface REGC_A, which injects ix and iy. Below, the mechanical torque drives the two-mass drivetrain WTGT_A to give the generator speed, with the electrical torque acting on it from the electrical controller. There is no pitch controller and no aerodynamic rotor. WT4 block diagram. The plant controller REPC_A feeds a power order ramp limited by dPmax and dPmin, then the electrical controller REEC_A and the generator interface REGC_A, which injects ix and iy. Below, the mechanical torque drives the two-mass drivetrain WTGT_A to give the generator speed, with the electrical torque acting on it from the electrical controller. There is no pitch controller and no aerodynamic rotor.

The two-mass drivetrain is identical to WT3:

2Htdωtdt=TmKshaftδshaftDshaft(ωtωg)2H_t \frac{d\omega_t}{dt} = T_m - K_{\mathrm{shaft}}\delta_{\mathrm{shaft}} - D_{\mathrm{shaft}}(\omega_t - \omega_g)

2Hgdωgdt=Kshaftδshaft+Dshaft(ωtωg)Te2H_g \frac{d\omega_g}{dt} = K_{\mathrm{shaft}}\delta_{\mathrm{shaft}} + D_{\mathrm{shaft}}(\omega_t - \omega_g) - T_e

dδshaftdt=ω0(ωtωg)\frac{d\delta_{\mathrm{shaft}}}{dt} = \omega_0(\omega_t - \omega_g)

There is no pitch controller or aerodynamic rotor in the basic Type 4 configuration; the active power reference is supplied directly (or from REPC_A), and rate limits dPmax/dPmin apply to the power order ramp.

The REEC_A electrical controller supplies current commands with the same LVRT/HVRT logic as WT3, with current limits through the converter lookup table (piecewise linear in voltage: (Vp1,Ip1),,(Vp4,Ip4)(V_{p1}, I_{p1}),\ldots,(V_{p4}, I_{p4}) for active current and (Vq1,Iq1),,(Vq4,Iq4)(V_{q1}, I_{q1}),\ldots,(V_{q4}, I_{q4}) for reactive).

#NameSub-modelDescriptionUnit
1SNOMNominal powerMW
2–32REPC_APlant ctrlSame as WT3various
33–37WTGT_ADrivetrainHtH_t, HgH_g, ω0\omega_0, DshaftD_{\mathrm{shaft}}, KshaftK_{\mathrm{shaft}}s, pu
38–80REEC_AElec ctrlLVRT, current limits, PI gainsvarious
81+REGC_AGeneratorConverter electrical modelvarious
INJEC WT4 WT4_1 BUS_WIND 1. 1. 0. 0.
100.0 0.0 0.02 0 0.0 0.05 0 0.0 0.3 -0.3 2.0 0.4 0.3 -0.3 0.0 0.15 0.9 0.05
0.0 -0.06 0.06 -0.05 0.05 0.05 -0.05 2.0 1.0 1.0 -1.0 0.02 0 0 5.0 1.5 1.0 1.5 20.0 ... ;

The data-file model name is PV (or inj_PV).

A photovoltaic generator model with similar WECC-derived structure to the wind turbine models. The model includes a plant controller (voltage/reactive power regulation), an electrical controller (current limits, LVRT), and generator/converter representation. Unlike wind turbines, there is no mechanical drive train; the active power set-point follows an irradiance input or a fixed reference. LVRT/HVRT logic and current limiting are identical to the Type 4 wind model.

Photovoltaic generator block diagram. The active power reference divided by the terminal voltage gives the active current command, which passes a low-voltage power-logic limit that is piecewise in Vt and a first-order filter of time constant Tg. The reactive command is a function of terminal voltage and reactive reference and passes a first-order filter of time constant Tm. Both currents enter a limiter enforcing that the sum of their squares stays below Imax squared, and a Park transform resolves them into ix and iy. Photovoltaic generator block diagram. The active power reference divided by the terminal voltage gives the active current command, which passes a low-voltage power-logic limit that is piecewise in Vt and a first-order filter of time constant Tg. The reactive command is a function of terminal voltage and reactive reference and passes a first-order filter of time constant Tm. Both currents enter a limiter enforcing that the sum of their squares stays below Imax squared, and a Park transform resolves them into ix and iy.

The PV generator delivers active and reactive power through current commands:

Ip=PrefVt,Iq=fQV(Vt,Qref)I_p = \frac{P_{\mathrm{ref}}}{V_t}, \qquad I_q = f_{\mathrm{QV}}(V_t, Q_{\mathrm{ref}})

subject to the constraint Ip2+Iq2Imax\sqrt{I_p^2 + I_q^2} \leq I_{\mathrm{max}}. The inner current loop is a first-order filter:

TgdIpdt=Ip,cmdIp,TmdIqdt=Iq,cmdIqT_g \frac{dI_p}{dt} = I_{p,\mathrm{cmd}} - I_p, \qquad T_m \frac{dI_q}{dt} = I_{q,\mathrm{cmd}} - I_q

Low-voltage power-logic (LVPL) limits active current during deep voltage sags via a piecewise-linear function of VtV_t with breakpoints lvpnt0, lvpnt1, Lvpl1. HVRT and LVRT timers control disconnection and reconnection.

#NameDescriptionUnit
1ImaxMaximum converter currentpu
2INNominal currentpu
3ratemaxReconnection ramp ratepu/s
4TgActive current filter time constants
5TmReactive current filter time constants
6–9LVRT timerstLVRT1, tLVRT2, tLVRTint, Vmaxs, pu
10kpllPLL gain
11VminpllPLL freeze voltagepu
12–14LVRT curvea, Vmin, Vint
21–22Re, XeGrid equivalent impedancepu
23–29Current controlCM1, kRCI, kRCA, m, n, dbmin, dbmax
34BMBattery module flag
INJEC PV PV1 BUS_PV 1. 1. 0. 0. 1.2 1.0 0.5 0.02 0.01 0.5 1.0 0.05 1.1
20.0 0.1 2.0 0.1 0.5 0.95 1.05 0.0 2.0 1.0
1.0 0.0 0.05 1 2.0 1.5 2.0 2.0 -0.02 0.02 1 1 1 0.85 0 ;

GFOR (inj_GFOR): Grid-Forming Converter (VSM)

Section titled “GFOR (inj_GFOR): Grid-Forming Converter (VSM)”

The data-file model name is GFOR (or inj_GFOR).

A grid-forming voltage source converter implementing Virtual Synchronous Machine (VSM) dynamics, modelled under the phasor approximation. The converter is an MMC-type VSC connected to the grid through its transformer (no LC filter); the DC side is not modelled (the DC voltage is assumed constant) so the focus is on the AC grid dynamics.

The modulated voltage magnitude is held at its setpoint Vm0V_m^0 in normal operation, while the phase angle δm\delta_m is driven by a synthetic swing equation with inertia emulation (HH) and oscillation damping (DD) against a PLL estimate of the grid frequency. Participation in primary frequency control is optional, through the droop RdroopR_{\mathrm{droop}}. Overcurrents are limited by proportionally scaling the dd-qq current vector back to the ImaxI_{\mathrm{max}} circle with a small time constant.

Reference frame. The dd axis is attached to the internal phase angle δm\delta_m of the modulated voltage. Voltages and currents at the point of common coupling are transformed as:

vd=vxcosδm+vysinδm,vq=vxsinδm+vycosδmv_d = v_x\cos\delta_m + v_y\sin\delta_m, \qquad v_q = -v_x\sin\delta_m + v_y\cos\delta_m

with the analogous transformation for the converter-side currents ixt=kixi_{xt} = k\, i_x, iyt=kiyi_{yt} = k\, i_y, where k=rSbase/Snomk = r\, S_{\mathrm{base}}/S_{\mathrm{nom}} converts to per-unit on the converter base.

Transformer. The voltage-current relationship across the connection transformer (resistance RR, inductance LL, ideal ratio rr) in the dd-qq frame is:

vmd=vdr+RidωmLiq,vmq=vqr+Riq+ωmLidv_{md} = \frac{v_d}{r} + R\, i_d - \omega_m L\, i_q, \qquad v_{mq} = \frac{v_q}{r} + R\, i_q + \omega_m L\, i_d

PLL. The PLL only serves to estimate the grid angular frequency ω~g\tilde{\omega}_g for the damping term. It is the same model as in the grid-following converter (see the PLL diagram there), with PI gains derived from the time constant TpllT_{\mathrm{pll}}:

Kpω=10ωNTpll,Kiω=25ωNTpll2,ωN=2πfNK_{p\omega} = \frac{10}{\omega_N T_{\mathrm{pll}}}, \qquad K_{i\omega} = \frac{25}{\omega_N T_{\mathrm{pll}}^2}, \qquad \omega_N = 2\pi f_N

The PLL is frozen (hysteresis) when the PCC voltage falls below 0.4 pu and reactivated when it recovers above 0.5 pu (fixed thresholds in this model).

Active power and phase angle control (VSM).

Grid-forming virtual synchronous machine block diagram. The active power setpoint, the droop contribution, the damping term and the virtual power are summed and divided by 2Hs to give the virtual speed. That speed multiplied by the nominal angular frequency, less the reference, is integrated into the internal angle. The same speed is compared with the PLL estimate of grid frequency through the damping gain D, and with unity through the droop 1 over Rdroop. Grid-forming virtual synchronous machine block diagram. The active power setpoint, the droop contribution, the damping term and the virtual power are summed and divided by 2Hs to give the virtual speed. That speed multiplied by the nominal angular frequency, less the reference, is integrated into the internal angle. The same speed is compared with the PLL estimate of grid frequency through the damping gain D, and with unity through the droop 1 over Rdroop.

2Hdωmdt=PPvirtD(ωmω~g)+1ωmRdroop2H\frac{d\omega_m}{dt} = P^* - P_{\mathrm{virt}} - D\left(\omega_m - \tilde{\omega}_g\right) + \frac{1 - \omega_m}{R_{\mathrm{droop}}}

dδmdt=ωN(ωmωref)\frac{d\delta_m}{dt} = \omega_N\left(\omega_m - \omega_{\mathrm{ref}}\right)

where PP^* is the active power setpoint and PvirtP_{\mathrm{virt}} is the virtual power computed from the unsaturated currents:

Pvirt=vdrid+vqriqP_{\mathrm{virt}} = \frac{v_d}{r}\, i_d^* + \frac{v_q}{r}\, i_q^*

PvirtP_{\mathrm{virt}} equals the actual active power PP when the current is not limited, and yields improved large-disturbance stability while the current is limited (the angle dynamics do not wind up).

Current limitation. The currents (id,iq)(i_d^*, i_q^*) that would result from normal voltage control (i.e. vmd=Vm0v_{md} = V_m^0, vmq=0v_{mq} = 0) are first determined from:

Vm0=vdr+RidωmLiq,0=vqr+Riq+ωmLidV_m^0 = \frac{v_d}{r} + R\, i_d^* - \omega_m L\, i_q^*, \qquad 0 = \frac{v_q}{r} + R\, i_q^* + \omega_m L\, i_d^*

The current overload ratio ρ=(id)2+(iq)2/Imax\rho = \sqrt{(i_d^*)^2 + (i_q^*)^2}\,/\,I_{\mathrm{max}} is passed through a first-order lag with time constant TeT_e (typically 1 ms) and a non-windup lower limit of 1, giving ρs\rho_s. Both current components are then decreased in the same proportion:

ids=idρs,iqs=iqρsi_{ds}^* = \frac{i_d^*}{\rho_s}, \qquad i_{qs}^* = \frac{i_q^*}{\rho_s}

Grid-forming current limitation. In the d-q current plane, a quarter circle marks the maximum current Imax. The unsaturated command lies outside it, and both components are divided by the same factor so the saturated command lands on the circle along the same ray, preserving the angle of the current. Grid-forming current limitation. In the d-q current plane, a quarter circle marks the maximum current Imax. The unsaturated command lies outside it, and both components are divided by the same factor so the saturated command lands on the circle along the same ray, preserving the angle of the current.

and the modulated voltage is set to the value that yields the saturated currents:

vmd=vdr+RidsωmLiqs,vmq=vqr+Riqs+ωmLidsv_{md} = \frac{v_d}{r} + R\, i_{ds}^* - \omega_m L\, i_{qs}^*, \qquad v_{mq} = \frac{v_q}{r} + R\, i_{qs}^* + \omega_m L\, i_{ds}^*

When I<ImaxI < I_{\mathrm{max}}: ρs=1\rho_s = 1, the currents are unsaturated, and vmd=Vm0v_{md} = V_m^0, vmq=0v_{mq} = 0.

Default values correspond to a 1100 MVA converter. Per-unit values refer to the nominal apparent power of the converter.

#NameDescriptionUnitDefault
1RResistance of connection transformerpu0.005
2LInductance of connection transformerpu0.15
3rRatio of ideal transformer1.02
4SnomNominal apparent powerMVA1100
5HInertia constants5.0
6DDamping constant of virtual synchronous machine300
7TpllTime constant of PLLs0.1
8RdroopDroop of primary frequency controlpu999
9ImaxMaximum current (typically 1–1.2)pu1.0
10TeTime constant of current saturations0.001

A very large Rdroop (e.g. 999) effectively disables participation in primary frequency control.

Five additional parameters are computed at initialization from the power-flow solution: k (current conversion factor), vmx0, vmy0 (components of the initial modulated voltage), Vmo (its magnitude Vm0V_m^0, i.e. the voltage setpoint) and Po (the active power setpoint PP^*, pu on Snom base). Vmo and Po can be modified during the simulation with CHGPRM disturbances to change the voltage and active power setpoints.

The model has 33 states (2 output currents + 31 internal). Key internal states:

VariableDescriptionUnit
wrefAngular speed of reference axespu
ixt, iytConverter-side currents (on Snom base)pu
Vm, deltamModulated voltage magnitude and phase anglepu, rad
VVoltage magnitude at PCCpu
mult_pllPLL freezing factor (hysteresis output)
w_pll, theta_pllPLL frequency and angle estimatespu, rad
P, PvirtActive power and virtual power (on Snom base)pu
omegamAngular frequency of modulated voltagepu
vd, vq, id, iqPCC voltage and current in dd-qq framepu
id*, iq*Unsaturated currentspu
id*s, iq*sSaturated currentspu
rho, rhosCurrent overload ratio and its saturated value
QReactive power (on Snom base)pu

Observables: P, Pvirt, Q, Vm, vmd, vmq, deltam, omegam, w_pll, I, id, id*, id*s, iq, iq*, iq*s, rho, rhos.

A 1100 MVA grid-forming converter:

# name bus FP FQ P Q R L r Snom H D Tpll Rdroop Imax Te
INJEC GFOR HVDC A 1. 1. 0. 0. 0.005 0.15 1.02 1100. 5.0 300. 0.100 999. 1.0 0.001 ;

The data-file model name is GFOL (or inj_GFOL).

A grid-following voltage source converter modelled under the phasor approximation. As for the grid-forming model, the converter is an MMC-type VSC connected through its transformer (no LC filter) and the DC side is not modelled. The model is rather detailed: it includes measurement low-pass filters, a PLL with blocking/unblocking hysteresis, outer active power and voltage/reactive power control loops, inner dd-qq current control loops, a rate-limited dd-axis current limit with priority to the reactive current, and a piecewise-linear dynamic voltage support characteristic.

Reference frame. The VSC control frame (d,q)(d, q) tracks the PCC voltage phasor through the PLL angle δ~g\tilde{\delta}_g (state theta_pll):

vd=vxcosδ~g+vysinδ~g,vq=vxsinδ~g+vycosδ~gv_d = v_x\cos\tilde{\delta}_g + v_y\sin\tilde{\delta}_g, \qquad v_q = -v_x\sin\tilde{\delta}_g + v_y\cos\tilde{\delta}_g

with the analogous transformation for the converter-side currents (ixt=kixi_{xt} = k\, i_x, k=rSbase/Snomk = r\, S_{\mathrm{base}}/S_{\mathrm{nom}}). In steady state vq=0v_q = 0 and vd=Vv_d = V.

Phase Locked Loop.

Grid-following phase-locked loop block diagram. The terminal voltage magnitude drives a blocking hysteresis that gates the loop, blocking below Vpllb and releasing above Vpllu. The q-axis voltage, formed from vx and vy with the PLL angle, is gated and drives a proportional-integral controller whose output is the grid frequency estimate. That estimate, scaled by the nominal angular frequency and less the reference, is gated again and integrated to give the PLL angle, which returns to the q-axis voltage transformation. Grid-following phase-locked loop block diagram. The terminal voltage magnitude drives a blocking hysteresis that gates the loop, blocking below Vpllb and releasing above Vpllu. The q-axis voltage, formed from vx and vy with the PLL angle, is gated and drives a proportional-integral controller whose output is the grid frequency estimate. That estimate, scaled by the nominal angular frequency and less the reference, is gated again and integrated to give the PLL angle, which returns to the q-axis voltage transformation.

The qq-axis voltage error drives a PI controller whose output is the grid frequency estimate ω~g\tilde{\omega}_g (state w_pll); integrating ωN(ω~gωref)\omega_N(\tilde{\omega}_g - \omega_{\mathrm{ref}}) gives the PLL angle. The PI gains follow from the PLL response time τ\tau:

Kpω=10ωNτ,Kiω=25ωNτ2,ωN=2πfNK_{p\omega} = \frac{10}{\omega_N \tau}, \qquad K_{i\omega} = \frac{25}{\omega_N \tau^2}, \qquad \omega_N = 2\pi f_N

The PLL is blocked once the PCC voltage VV falls below Vpllb and reactivated once VV recovers above Vpllu (hysteresis).

Inner current control.

Grid-following inner current control. Two identical loops compare the d-axis and q-axis current references with the measured currents, drive proportional-integral controllers, and add the cross-coupling terms: the d-axis output takes the transformer voltage over the ratio and subtracts the coupling term, the q-axis output adds it. Grid-following inner current control. Two identical loops compare the d-axis and q-axis current references with the measured currents, drive proportional-integral controllers, and add the cross-coupling terms: the d-axis output takes the transformer voltage over the ratio and subtracts the coupling term, the q-axis output adds it.

vmd=vdrω~gLiq+(Kp+Kis)(idrefid)v_{md} = \frac{v_d}{r} - \tilde{\omega}_g L\, i_q + \left(K_p + \frac{K_i}{s}\right)\left(i_d^{\mathrm{ref}} - i_d\right)

vmq=ω~gLid+(Kp+Kis)(iqrefiq)v_{mq} = \tilde{\omega}_g L\, i_d + \left(K_p + \frac{K_i}{s}\right)\left(i_q^{\mathrm{ref}} - i_q\right)

combined with the transformer voltage-current relationship in the dd-qq frame:

vmd=vdr+Ridω~gLiq,vmq=vqr+Riq+ω~gLidv_{md} = \frac{v_d}{r} + R\, i_d - \tilde{\omega}_g L\, i_q, \qquad v_{mq} = \frac{v_q}{r} + R\, i_q + \tilde{\omega}_g L\, i_d

Active power control.

Grid-following active power control. The measured active power is filtered, compared with the setpoint, and drives a proportional-integral controller whose output passes a limiter to give the d-axis current reference. Below, the d-axis headroom is computed as the square root of Imax squared less the reactive current squared, and tracked through a lag with rate limits and an integrator; its output sets the limits of the loop above. Grid-following active power control. The measured active power is filtered, compared with the setpoint, and drives a proportional-integral controller whose output passes a limiter to give the d-axis current reference. Below, the d-axis headroom is computed as the square root of Imax squared less the reactive current squared, and tracked through a lag with rate limits and an integrator; its output sets the limits of the loop above.

The measured active power is filtered with time constant TlpfT_{\mathrm{lpf}} and compared with the setpoint P0P^0; a PI controller (KppK_{pp}, KipK_{ip}) with non-windup limits ±Idmax\pm I_d^{\max} produces idrefi_d^{\mathrm{ref}}. The limit gives priority to the reactive current:

Idmax,stat=max(Imax2iq2,  0)I_d^{\max,\mathrm{stat}} = \sqrt{\max\left(I_{\mathrm{max}}^2 - i_q^2,\; 0\right)}

and IdmaxI_d^{\max} tracks this static value through a first-order lag (TrlimT_{\mathrm{rlim}}, typically 0.002 s) with rate limits dPdt_min/dPdt_max, limiting in particular the rate of recovery of the active current after it has been decreased by an increase of iqi_q.

Voltage / reactive power control.

Grid-following voltage and reactive power control. Either the compensated voltage or the reactive power is filtered and compared with its setpoint, selected by vqswitch. The error is gated to zero below Vs2, drives a proportional-integral controller with limits, and gives the first reactive current component. A second component implements dynamic voltage support, zero above Vs1 and ramping to minus Imax at Vs2. The two are summed and limited to give the reactive current reference. Grid-following voltage and reactive power control. Either the compensated voltage or the reactive power is filtered and compared with its setpoint, selected by vqswitch. The error is gated to zero below Vs2, drives a proportional-integral controller with limits, and gives the first reactive current component. A second component implements dynamic voltage support, zero above Vs1 and ramping to minus Imax at Vs2. The two are summed and limited to give the reactive current reference.

Depending on vqswitch, either the compensated voltage or the reactive power is controlled:

Vc=vˉr+(Rc+jXc)iˉ(vqswitch=1),Q=vqridvdriq(vqswitch=0)V_c = \left|\frac{\bar{v}}{r} + (R_c + jX_c)\,\bar{i}\right| \quad (\texttt{vqswitch}=1), \qquad Q = \frac{v_q}{r} i_d - \frac{v_d}{r} i_q \quad (\texttt{vqswitch}=0)

The controlled quantity is filtered (TlpfT_{\mathrm{lpf}}) and its deviation from setpoint drives a PI controller (KpvK_{pv}, KivK_{iv}) with non-windup limits ±iq1max\pm i_{q1}^{\max}, giving the component iq1i_{q1}. The error is zeroed (controller frozen) while V<Vs2V < V_{s2}. A second component iq2i_{q2} implements dynamic voltage support as a piecewise-linear function of VV: zero above Vs1V_{s1}, decreasing linearly to Imax-I_{\mathrm{max}} at Vs2V_{s2}, constant below. The total iq1+iq2i_{q1} + i_{q2}, limited to ±Imax\pm I_{\mathrm{max}}, is the reactive current reference iqrefi_q^{\mathrm{ref}}.

With Rc=RR_c = R, Xc=ωLX_c = \omega L and r=1r = 1, controlling VcV_c amounts to controlling the magnitude of the modulated voltage.

Default values correspond to a 1200 MVA converter. Per-unit values refer to the nominal apparent power of the converter.

#NameDescriptionUnitDefault
1RPhase reactor resistancepu0.005
2LPhase reactor inductancepu0.15
3rRatio of ideal transformer1.02
4SnomNominal apparent powerMVA1200
5RcResistance used in compensated voltagepu0.005
6XcReactance used in compensated voltagepu0.15
7KpCurrent control: proportional gain0.573
8KiCurrent control: integral gain6.0
9TlpfMeasurement time constant (low-pass filter)s0.0033
10KppActive power control: proportional gain0.0333
11KipActive power control: integral gain10.0
12TrlimTime constant of the IdmaxI_d^{\max} rate limiters0.002
13dPdt_minMin rate of change of the dd-current limitpu/s-999
14dPdt_maxMax rate of change of the dd-current limitpu/s10.0
15KpvReactive power control: proportional gain0.1667
16KivReactive power control: integral gain50.0
17tauResponse time of PLLs0.10
18VpllbVoltage below which the PLL is blockedpu0.4
19VplluVoltage above which the PLL is unblockedpu0.5
20ImaxMaximum current (typically 1–1.2)pu1.0
21Vs1Voltage below which dynamic reactive support startspu-1000
22Vs2Voltage at which reactive support is maximum (Vs2<Vs1V_{s2} < V_{s1})pu-2000
23iqmaxLimit (±) on quadrature current component iq1i_{q1}pu1.001
24vqswitch1 = voltage control, 0 = reactive power controlflag1

Setting Vs1 and Vs2 to large negative values (as in the defaults above) disables the dynamic voltage support; a more elaborate control is recommended for that function. Typical values of Kiv are 50 pu/s for voltage control and 10 pu/s for reactive power control.

Six additional parameters are computed at initialization from the power-flow solution: k (current conversion factor), P0, Q0 (active/reactive power setpoints, pu on Snom base), Vc0 (compensated voltage setpoint), Imin and iq1max (=min(iqmax,Imax)= \min(\texttt{iqmax}, I_{\mathrm{max}})). P0, Q0 and Vc0 can be modified during the simulation with CHGPRM disturbances.

The model has 52 states (2 output currents + 50 internal). Key internal states:

VariableDescriptionUnit
wrefAngular speed of reference axespu
ixt, iytConverter-side currents (on Snom base)pu
mult_pllPLL freezing factor (hysteresis output)
w_pll, theta_pllPLL frequency and angle estimatespu, rad
V, vd, vqPCC voltage magnitude and dd-qq componentspu
id, iqConverter currents in dd-qq framepu
vmd, vmqModulated voltage componentspu
Md, MqCurrent-control PI outputspu
Idmax_stat, Idmax, IdminStatic / rate-limited / minimum dd-current limitspu
P, PfilActive power and its filtered valuepu
id_pi, idrefActive-power PI output and dd-current referencepu
Vc, VcfilCompensated voltage and its filtered valuepu
Q, QfilReactive power and its filtered valuepu
mult_VVoltage/reactive controller freezing factor
iq_1, iq_2, iqrefReactive current components and referencepu

Observables: P_MW, Q_Mvar, Vc, Vm, vmd, vmq, I, w_pll, theta_pll_deg, mult_pll, Idmax, Md, idref, id, id_pi, iq_1, iq_2, iqref, iq.

A 1200 MVA grid-following converter (record spanning multiple lines):

# name bus FP FQ P Q R L r Snom Rc Xc Kp Ki Tlpf Kpp Kip Trlim dPdt_min dPdt_max Kpv Kiv
INJEC GFOL HVDC1 A 1. 1. 0. 0. 0.005 0.15 1.02 1200. 0.005 0.15 0.5730 6. 0.0033 0.0333 10. 0.002 -999. 10. 0.1667 50.
# tau Vpllb Vpllu Imax Vs1 Vs2 iq1max vqswitch
0.10 0.4 0.5 1.000 -1000 -2000 1.001 1 ;

BESS (inj_BESS): Battery Energy Storage System

Section titled “BESS (inj_BESS): Battery Energy Storage System”

The data-file model name is BESS (or inj_BESS).

A comprehensive BESS model implementing the full WECC framework (REPC_A + REEC_C + REGC_A) plus battery state of charge (SOC) tracking. The model supports both grid-following operation (bidirectional active power dispatch) and reactive power / voltage regulation. It is built on the same REPC_A plant controller as the wind turbine models, and uses the REEC_C converter electrical controller which handles a piecewise-linear IqI_q-vs-VV and IpI_p-vs-VV characteristic for fault ride-through.

The battery SOC evolves through integration of injected power:

dSOCdt=PbessCbatSnom\frac{d\mathrm{SOC}}{dt} = -\frac{P_{\mathrm{bess}}}{C_{\mathrm{bat}} \cdot S_{\mathrm{nom}}}

with hard clamps at SOCmin and SOCmax that modify the active power limits Pmax/Pmin dynamically:

Pmax={0SOCSOCmaxPmax,ratedotherwiseP_{\max} = \begin{cases} 0 & \mathrm{SOC} \ge \mathrm{SOC}_{\max}\\ P_{\max,\mathrm{rated}} & \text{otherwise}\end{cases}

Pmin={0SOCSOCminPmin,ratedotherwiseP_{\min} = \begin{cases} 0 & \mathrm{SOC} \le \mathrm{SOC}_{\min}\\ P_{\min,\mathrm{rated}} & \text{otherwise}\end{cases}

Battery energy storage block diagram. The active power and voltage references pass the REPC_A plant controller, the REEC_C converter electrical controller with its piecewise current-versus-voltage characteristics, and the REGC_A generator interface, which injects ix and iy. The injected power is integrated into the state of charge, whose clamps at SOCmin and SOCmax drive the active power limits Pmax and Pmin of the converter controller to zero. Battery energy storage block diagram. The active power and voltage references pass the REPC_A plant controller, the REEC_C converter electrical controller with its piecewise current-versus-voltage characteristics, and the REGC_A generator interface, which injects ix and iy. The injected power is integrated into the state of charge, whose clamps at SOCmin and SOCmax drive the active power limits Pmax and Pmin of the converter controller to zero.

#NameSub-modelDescriptionUnit
1SNOMNominal powerMW
2–32REPC_APlant controller (same as WT3/WT4)various
33–76REEC_CElectrical controller with piecewise Iq(V)I_q(V), Ip(V)I_p(V)various
68CapBatBESSBattery energy capacityMWh
69SOCiniBESSInitial state of chargepu
70SOCmaxBESSMaximum SOC limitpu
71SOCminBESSMinimum SOC limitpu
72–73dPmax, dPminBESSActive power ramp rate limitspu/s
74–75pmax, pminREEC_CActive current limits (pu on SNOM)pu
76TpordREEC_CActive power order time constants

Full parameter listing has approximately 125 parameters; refer to a working example data file for the complete ordering.

The BESS model uses over 40 internal states reflecting the three sub-models. Key states include:

VariableDescription
SOCState of charge
PrefActive power reference
QextReactive power reference from REPC_A
Ip, IqActive/reactive current outputs
PLLPhaseAnglePLL phase angle
Pgen, QgenGenerated powers
INJEC BESS BESS1 BUS_ST 1. 1. 0. 0.
100.0 0.0 0.02 0 0.0 0.05 0 0.0 0.3 -0.3 2.0 0.4
0.3 -0.3 0.0 0.15 0.9 0.05 0.0 -0.06 0.06 -0.05 0.05
0.05 -0.05 2.0 1.0 1.0 -1.0 0.02 0 0
0.1 0.1 0.02 1.0 0.0 -0.2 0.2 0.2 -0.2 0.6 0.4 0.6 -0.6 1.1 0.9
1.0 0.5 0.01 0.01 0.05 0.9 0.2 0.9 0.1 0.9 -0.1 0.5 -0.5 0.5 -0.5 1.0 -1.0 0.5 -0.5
50.0 0.7 0.9 0.1 5.0 -5.0 1.0 -1.0 0.05 1.1 0.0 2 0.01 ;

SVC_GENERIC1 (inj_svc_generic1): Generic Static Var Compensator

Section titled “SVC_GENERIC1 (inj_svc_generic1): Generic Static Var Compensator”

The data-file model name is SVC_GENERIC1. It takes no prefix.

A dynamic SVC injecting a purely reactive current at its bus. A PI voltage regulator with droop drives a susceptance BsvcB_{svc} between Bmin and Bmax, and two lead-lag stabiliser channels can add a supplementary signal to the voltage reference. This is the dynamic counterpart of the static SVC record used by the power flow: the static record fixes the operating point, this model governs how the device behaves during the simulation.

The voltage reference is initialised from the power flow solution, so that the model starts in equilibrium:

Vref=V0+BpBsvc,0V_{ref} = V_0 + B_p \cdot B_{svc,0}

where BpB_p is the droop and Bsvc,0B_{svc,0} the initial susceptance implied by the reactive current at the bus.

Generic static var compensator block diagram. The bus voltage is subtracted from the reference Vref, to which the stabiliser output dvpss is added. The error drives a PI regulator with gains Kp and Ki and droop Bp, whose output is the susceptance Bsvc limited between Bmin and Bmax, and the injected reactive current is Bsvc times V. Two parallel lead-lag stabiliser channels, each with its own gain, time constant, lead-lag coefficient, output gain and limit, are summed and limited together by Ltot to form dvpss. Generic static var compensator block diagram. The bus voltage is subtracted from the reference Vref, to which the stabiliser output dvpss is added. The error drives a PI regulator with gains Kp and Ki and droop Bp, whose output is the susceptance Bsvc limited between Bmin and Bmax, and the injected reactive current is Bsvc times V. Two parallel lead-lag stabiliser channels, each with its own gain, time constant, lead-lag coefficient, output gain and limit, are summed and limited together by Ltot to form dvpss.

The record carries 17 data parameters, in order:

#NameDescription
1G1Gain of the first stabiliser channel
2T1Time constant of the first stabiliser channel (s)
3aLead-lag coefficient of the first channel
4K1Output gain of the first channel
5L1Output limit of the first channel (pu)
6G2Gain of the second stabiliser channel
7T2Time constant of the second stabiliser channel (s)
8bLead-lag coefficient of the second channel
9K2Output gain of the second channel
10L2Output limit of the second channel (pu)
11LtotLimit on the summed stabiliser output (pu)
12KpProportional gain of the voltage regulator
13KiIntegral gain of the voltage regulator
14BpDroop, in pu on the SVC base
15BmaxMaximum susceptance (Mvar at 1 pu voltage)
16BminMinimum susceptance (Mvar at 1 pu voltage)
17BnomSusceptance base used for the per-unit conversion (Mvar)

One additional parameter is computed at initialisation:

#NameDescription
18VrefVoltage reference, set from the power flow solution

Q, dvpss, Bsvc, Vref, Vb


The data-file model name is PMU (or inj_PMU).

A measurement-only injector: it injects zero current at its bus and exists purely to expose bus quantities as observables. It reports a filtered local frequency estimate computed the same way as the f_inj block, together with the bus voltage magnitude and angle and the speed and angle of the moving DQ reference frame. Attach one to any bus whose frequency you want to record without perturbing the solution.

The frequency estimate is a first-order filter on the bus voltage phasor. The measurement time constant is clamped to a floor of 0.05 s, so values below that have no effect.

Phasor measurement unit block diagram. The bus voltage feeds three independent measurement chains: the voltage magnitude and angle, a first-order frequency estimate whose time constant is floored at 0.05 seconds, and the speed and angle of the moving DQ reference frame. The model injects zero current. Phasor measurement unit block diagram. The bus voltage feeds three independent measurement chains: the voltage magnitude and angle, a first-order frequency estimate whose time constant is floored at 0.05 seconds, and the speed and angle of the moving DQ reference frame. The model injects zero current.

#NameDescriptionUnit
1TfFrequency measurement time constant, recommended 0.05 to 0.10; values below 0.05 are clampeds

Three additional parameters are set at initialisation: wnom (nominal angular frequency), vm0 and va0 (the initial bus voltage magnitude and angle).

NameDescriptionUnit
fEstimated bus frequencypu of fnomf_{nom}
vmBus voltage magnitudepu
vaBus voltage phase angle in the moving DQ frame, wrapping at ±π\pm\pirad
threfAccumulated angle of the DQ reference frame with respect to the nominally rotating frame, zero at t=0t = 0rad
dwrefSpeed deviation of the DQ reference frame from nominalrad/s
INJEC PMU PMU_1041 1041 0. 0. 0. 0. 0.05 ;

All four participation and power fields are zero: the model neither consumes nor produces power.