Skip to content

WECC Wind and Storage

The three models on this page are assembled from WECC generic blocks: WT3 and WT4 from the second-generation renewable energy system blocks, and BESS from REPC_A, REEC_C and REGC_A. WECC Model Status comes first because it applies to both wind turbine models: it lists the blocks RAMSES implements, their approval status and the newer blocks it does not implement.

The INJEC record these models are entered with, and the rules on model names, are on the Injector Models page.

WT3 and WT4 are assembled from the WECC second-generation generic renewable energy system (RES) blocks. Their specification dates from January 2014 [1, 2, 3], and WECC approved the blocks on 19 March 2014 [4]. They are not the first-generation WECC wind models (wt3g, wt3e, wt3t, wt3p, wt4g, wt4e, wt4t), which WECC retired on 22 April 2020 [4]; the EPRI user guide [8] explains how to convert data written for those.

Every block that RAMSES implements is still on the WECC approved model list (version September 2026, effective 18 September 2026) [4]. WECC has specified and approved newer blocks since, and RAMSES implements none of them. Statuses and dates below are those of the approved list [4].

Implemented in RAMSES

WECC blockRoleWECC statusWT3WT4
REGC_AGenerator/converter interface, current sourceApproved 19 March 2014YesYes
REEC_AElectrical controlApproved 19 March 2014YesYes
REPC_APlant controlApproved 19 March 2014YesYes
WTGT_ATwo-mass drivetrainApproved 19 March 2014YesYes
WTGA_A (WTGAR_A here)AerodynamicsApproved 19 March 2014YesNo
WTGP_A (WTGPT_A here)Pitch controlApproved 19 March 2014YesNo
WTGQ_A (WTGTRQ_A here)Torque controlApproved 19 March 2014YesNo

The PLL of both models (parameters vPLL to wrefPLL) is not one of the WECC blocks. RAMSES uses the block names of the 2014 reports, which are also those of PowerWorld; WECC’s own names are in the first column.

Not implemented in RAMSES

WECC blockRoleWECC statusSpecification
REGC_BGenerator/converter interface, voltage source, for weak gridsApproved 25 August 2020[5]
REGC_CVoltage source with a PLL and inner current loopsNot on the approved list[5]
REEC_DElectrical control with extended voltage-dependent current limitsApproved 25 August 2020[5]
REEC_EREEC_D with local PI control of Q, power factor and PApproved 11 September 2025[6]
REPC_CPlant control with power factor control and switched shuntsApproved 1 December 2021[5]
REPC_DREPC_C controlling several aggregated unitsApproved 24 January 2024[6]
REPC_EPlant control built on REPC_DApproved 17 September 2026[4]
WTGT_BDrivetrain for Type 4 turbinesApproved 1 December 2021[5]
WTGP_BPitch control with more flexible limitsApproved 1 December 2021[5]
WTGWGO_AWeak-grid option, auxiliary control for Type 4Approved 1 December 2021[5]
WTGIBFFR_AInertia-based fast frequency response, auxiliary controlApproved 26 January 2022[5]

REPC_B, the earlier hybrid-plant controller, was withdrawn from the approved list on 29 January 2026 and retired on 23 August 2026 [4]; RAMSES never implemented it. The storage and grid-forming blocks on the same list (REEC_C, REGFM_A1, REGFM_B1, REGFM_C1, REPCGFM_C1) are outside the scope of these two models.

Type 4 drivetrain. WECC states that a Type 4 turbine needs none of the mechanical blocks for stability studies, and recommends WTGT_B over WTGT_A when the torsional ripple in the electrical power is to be emulated, because of a problem seen with WTGT_A on Type 4 units [7]. RAMSES WT4 has WTGT_A only. Set PFlag = 0 to take the drivetrain out of the output entirely.

  1. WECC, WECC Second Generation Wind Turbine Models, 23 January 2014. PDF (BPA mirror)
  2. P. Pourbeik (EPRI), WECC Type 3 Wind Turbine Generator Model, Phase II, 23 January 2014. PDF
  3. P. Pourbeik (EPRI), WECC Type 4 Wind Turbine Generator Model, Phase II, 23 January 2013. PDF
  4. WECC, Approved Dynamic Models, version September 2026, effective 18 September 2026. PDF
  5. P. Pourbeik, Proposal for New Features for the Renewable Energy System Generic Models, memo to WECC REMWG, revision 27, 16 February 2023. PDF
  6. P. Pourbeik, Proposal for New Plant Controller and Electrical Controller, memo to WECC REMWG, 15 January 2024. PDF
  7. WECC REMWG, Brief Summary of all 2nd Generation Generic Renewable Energy System Dynamic Models, February 2021. PDF
  8. EPRI, Model User Guide for Generic Renewable Energy System Models, product 3002014083, 2018. PDF (BPA mirror)

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

A generic Type 3 (doubly-fed induction generator) wind turbine built from the WECC second-generation renewable blocks. As in the WECC model, the machine and its rotor-side converter are not represented electrically: the generator/converter block injects a controlled current into the network, and the mechanical side only shapes the active power order. The model has six WECC blocks and a PLL, laid out in the data record in this order:

BlockRoleWT3 #
SNOMRating, the per-unit base of the model1
REPC_APlant controller: voltage or reactive power regulation, frequency droop2–32
WTGTRQ_ATorque controller: speed reference from a power-speed table, PI on speed or power error33–46
WTGPT_APitch controller: limits rotor over-speed and power47–56
WTGAR_AAerodynamics: mechanical power as a function of pitch angle57–58
WTGT_ATwo-mass drivetrain59–62
REEC_AElectrical controller: Q/V loops, voltage-dip logic, current limits, power order63–111
REGC_AGenerator/converter interface: current lags, high- and low-voltage current management112–124
PLLAngle of the injected current125–128

Per-unit base. Every power, current and torque inside the model is in per unit on SNOM (MVA), not on the system base. Only the injected currents ixi_x, iyi_y seen by the network are converted to the system base.

Wind speed is not an input. The aerodynamic block takes its available power PmoP_{mo} from the initial electrical power of the power flow, so the model represents a turbine running at constant wind.

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 available power Pmo, equal to the initial electrical power, 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 the torque order Pref to the electrical controller, multiplied by the generator speed when PFlag is 1, 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 available power Pmo, equal to the initial electrical power, 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 the torque order Pref to the electrical controller, multiplied by the generator speed when PFlag is 1, the pitch controller returns a pitch angle to the rotor, and the electrical torque acts on the drivetrain.

The equations below are those coded in RAMSES. A flag ”= 1” is tested in the dynamics as flag ≥0.5\geq 0.5, but initialization tests for exactly 1, so give every flag as exactly 0 or 1.

Measurements. With vt=∣Vˉ∣v_t = |\bar V| the terminal voltage:

Pe=(vxix+vyiy)SbaseSnom,Qgen=(vyix−vxiy)SbaseSnomP_e = (v_x i_x + v_y i_y)\frac{S_{\mathrm{base}}}{S_{\mathrm{nom}}}, \qquad Q_{\mathrm{gen}} = (v_y i_x - v_x i_y)\frac{S_{\mathrm{base}}}{S_{\mathrm{nom}}}

REPC_A, plant controller: voltage or reactive power. The regulated point is the terminal, shifted by a compensation impedance: vˉcon=Vˉ−(Rc+jXc)Iˉ\bar v_{\mathrm{con}} = \bar V - (R_c + jX_c)\bar I, and PbranchP_{\mathrm{branch}}, QbranchQ_{\mathrm{branch}} are the powers through that point. The measured quantity is

Y1={∣vˉcon∣vcompFlag=1vt+Kc QbranchvcompFlag=0Y_1 = \begin{cases} |\bar v_{\mathrm{con}}| & \text{vcompFlag} = 1 \\ v_t + K_c\,Q_{\mathrm{branch}} & \text{vcompFlag} = 0 \end{cases}

filtered by 1/(1+sTfltr)1/(1+sT_{\mathrm{fltr}}). The error is vref−Y2v_{\mathrm{ref}} - Y_2 when RefFlag = 1 and Qref−Qbranch/(1+sTfltr)Q_{\mathrm{ref}} - Q_{\mathrm{branch}}/(1+sT_{\mathrm{fltr}}) when RefFlag = 0. It passes a symmetric deadband ±\pmdbd, the limits [emin, emax], and a PI controller (Kp, Ki) whose integrator and output are both limited to [Qmin, Qmax]. The integrator is frozen while vt<v_t < vfrz. A lead-lag (1+sTft)/(1+sTfv)(1+sT_{ft})/(1+sT_{fv}) follows; with Tfv<0.005T_{fv} < 0.005 s it is bypassed. Its output becomes the reactive power reference QextQ_{\mathrm{ext}} of REEC_A only when QextFlag = 1; with QextFlag = 0, QextQ_{\mathrm{ext}} stays at its initial value.

REPC_A, plant controller: frequency. The bus frequency is estimated from the rotation of the voltage phasor filtered with Tm=max⁡(0.05,Tmesf)T_m = \max(0.05, T_{\mathrm{mesf}}):

f=(vy−vyf) vxf−(vx−vxf) vyf2πfnom Tm (vxf2+vyf2)+ωreff = \frac{(v_y - v_{yf})\,v_{xf} - (v_x - v_{xf})\,v_{yf}}{2\pi f_{\mathrm{nom}}\, T_m\,(v_{xf}^2 + v_{yf}^2)} + \omega_{\mathrm{ref}}

where ωref\omega_{\mathrm{ref}} is 1 or the centre-of-inertia speed, following $OMEGA_REF. The frequency error Δf=1−f\Delta f = 1 - f passes the deadband [fdbd1, fdbd2] and the droops:

eP=Pplantref−Pbranch1+sTp+min⁡(DdnΔf,0)+max⁡(DupΔf,0)e_P = P_{\mathrm{plantref}} - \frac{P_{\mathrm{branch}}}{1+sT_p} + \min(D_{dn}\Delta f, 0) + \max(D_{up}\Delta f, 0)

so Ddn acts on over-frequency and Dup on under-frequency. ePe_P is limited to [femin, femax] and fed to a PI (kpg, kig) limited to [Pmin, Pmax], then a lag 1/(1+sTlag)1/(1+sT_{\mathrm{lag}}). The result replaces the active power reference PrefoP_{\mathrm{refo}} only when FreqFlag = 1.

WTGTRQ_A, torque controller. The electrical power is filtered, x27=Pe/(1+sTp)x_{27} = P_e/(1+sT_p), and a piecewise-linear table through (p1, spd1) … (p4, spd4), flat outside its end points, gives the speed reference:

ωref=fspd(x27)1+sTwref\omega_{\mathrm{ref}} = \frac{f_{\mathrm{spd}}(x_{27})}{1 + sT_{\mathrm{wref}}}

The error is (Prefo−x27)/ωg(P_{\mathrm{refo}} - x_{27})/\omega_g when Tflag = 1 (power error) and ωg−ωref\omega_g - \omega_{\mathrm{ref}} when Tflag = 0 (speed error). A PI (Kpp, Kip), integrator and output limited to [Temin, Temax], gives the torque order PrefP_{\mathrm{ref}}. The integrator is frozen during a voltage dip.

WTGPT_A, pitch controller. Two PI controllers, each limited to [ThetaMin, ThetaMax], act on the speed error and on the power error:

eω=ωt−ωref+Kcc(Pord−Prefo),eP=Pord−Prefoe_\omega = \omega_t - \omega_{\mathrm{ref}} + K_{cc}(P_{\mathrm{ord}} - P_{\mathrm{refo}}), \qquad e_P = P_{\mathrm{ord}} - P_{\mathrm{refo}}

(Kpw, Kiw) on eωe_\omega and (Kpc, Kic) on ePe_P. Their sum drives the actuator lag 1/(1+sTθ)1/(1+sT_\theta), with the rate limited to [dThetaMin, dThetaMax] and the angle to [ThetaMin, ThetaMax].

WTGAR_A, aerodynamics.

Pm=Pmo−Ka θ (θ−θ0),Pmo=Pe0P_m = P_{mo} - K_a\,\theta\,(\theta - \theta_0), \qquad P_{mo} = P_{e0}

The pitch angle unit is whatever the data uses, conventionally degrees; Ka must be given per that unit squared.

WTGT_A, two-mass drivetrain. With Tm=Pm/ωtT_m = P_m/\omega_t and Te=Pe/ωgT_e = P_e/\omega_g:

2HtdΔωtdt=Tm−KshaftΔθ−Dshaft(Δωt−Δωg)2H_t\frac{d\Delta\omega_t}{dt} = T_m - K_{\mathrm{shaft}}\Delta\theta - D_{\mathrm{shaft}}(\Delta\omega_t - \Delta\omega_g)

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

dΔθdt=Δωt−Δωg,ωt=ωo+Δωt,ωg=ωo+Δωg\frac{d\Delta\theta}{dt} = \Delta\omega_t - \Delta\omega_g, \qquad \omega_t = \omega_o + \Delta\omega_t, \quad \omega_g = \omega_o + \Delta\omega_g

The twist equation carries no base angular frequency, so Δθ\Delta\theta is in pu·s and Kshaft in pu torque per pu·s. A stiffness quoted per electrical radian must be multiplied by 2πfnom2\pi f_{\mathrm{nom}}. The initial speed ωo\omega_o is read off the power-speed table at Pe0P_{e0}, so it is generally not 1.

REEC_A, electrical controller: voltage dip. A dip is declared when the unfiltered vt<v_t < vdip or vt>v_t > vup. During a dip the integrators of the Q, V and torque PIs, the Tiq lag and the power order lag are frozen, and the reactive current injection

Iq,inj=lim[Iql1, Iqh1](kqv db[dbd1, dbd2](vref0−vt,filt))I_{q,\mathrm{inj}} = \mathrm{lim}_{[I_{ql1},\, I_{qh1}]}\Big(k_{qv}\,\mathrm{db}_{[dbd1,\, dbd2]}\big(v_{\mathrm{ref0}} - v_{t,\mathrm{filt}}\big)\Big)

is added to the reactive current command, with vt,filt=vt/(1+sTrv)v_{t,\mathrm{filt}} = v_t/(1+sT_{rv}). After the dip ends, Thld selects what happens for ∣|Thld∣| seconds: with Thld >0> 0, Iq,injI_{q,\mathrm{inj}} is held at Iqfrz; with Thld <0< 0, the injection law above stays active; with Thld =0= 0, Iq,injI_{q,\mathrm{inj}} returns to zero at once. The active current limit Ipmax⁡I_{p\max} is frozen during the dip and for Thld2 seconds after it.

REEC_A, reactive power chain. The reactive power reference is

Qr=lim[qmin⁡, qmax⁡]{x27tan⁡(pfaref)PFFlag=1 (constant power factor)QextPFFlag=0Q_r = \mathrm{lim}_{[q_{\min},\, q_{\max}]}\begin{cases} x_{27}\tan(\mathrm{pfaref}) & \text{PFFlag} = 1 \text{ (constant power factor)} \\ Q_{\mathrm{ext}} & \text{PFFlag} = 0 \end{cases}

With QFlag = 0 the reactive current command is (Qr/vt,filt)/(1+sTiq)\big(Q_r/v_{t,\mathrm{filt}}\big)/(1+sT_{iq}). With QFlag = 1 it is the output of a voltage PI (kvp, kvi) on Vref−vt,filtV_{\mathrm{ref}} - v_{t,\mathrm{filt}}, limited to [Iqmin⁡I_{q\min}, Iqmax⁡I_{q\max}], where

Vref=lim[vmin⁡, vmax⁡]{Q PI (kqp,kqi) on Qr−QgenvFlag=1Qr+vref1vFlag=0V_{\mathrm{ref}} = \mathrm{lim}_{[v_{\min},\, v_{\max}]}\begin{cases} \text{Q PI } (k_{qp}, k_{qi}) \text{ on } Q_r - Q_{\mathrm{gen}} & \text{vFlag} = 1 \\ Q_r + v_{\mathrm{ref1}} & \text{vFlag} = 0 \end{cases}

In both cases Iqcmd=lim[Iqmin⁡, Iqmax⁡](Iq,inj+⋯ )I_{q\mathrm{cmd}} = \mathrm{lim}_{[I_{q\min},\, I_{q\max}]}(I_{q,\mathrm{inj}} + \cdots).

REEC_A, active power chain. PrefP_{\mathrm{ref}} is rate-limited to [dPmin, dPmax] (per second). With PFlag = 1 it is multiplied by ωg\omega_g, which makes PrefP_{\mathrm{ref}} a torque and lets drivetrain oscillations reach the output. Then

TporddPorddt=Pref ωg PFlag−Pord,Pord∈[pmin⁡,pmax⁡],Ipcmd=lim[0, Ipmax⁡]Pordmax⁡(vt,filt,0.01)T_{\mathrm{pord}}\frac{dP_{\mathrm{ord}}}{dt} = P_{\mathrm{ref}}\,\omega_g^{\,\mathrm{PFlag}} - P_{\mathrm{ord}}, \quad P_{\mathrm{ord}} \in [p_{\min}, p_{\max}], \qquad I_{p\mathrm{cmd}} = \mathrm{lim}_{[0,\, I_{p\max}]}\frac{P_{\mathrm{ord}}}{\max(v_{t,\mathrm{filt}}, 0.01)}

REEC_A, current limits. VDL1 (vq1…Iq4) and VDL2 (vp1…Ip4) are piecewise-linear functions of vt,filtv_{t,\mathrm{filt}}, flat beyond their end points. With Iqmin⁡=−Iqmax⁡I_{q\min} = -I_{q\max}:

PQFlagIqmax⁡I_{q\max}Ipmax⁡I_{p\max}
0 (Q priority)min⁡(VDL1,Imax⁡)\min(\mathrm{VDL1}, I_{\max})min⁡(VDL2,Imax⁡2−Iqcmd2)\min\big(\mathrm{VDL2}, \sqrt{I_{\max}^2 - I_{q\mathrm{cmd}}^2}\big)
1 (P priority)min⁡(VDL1,Imax⁡2−Ipcmd2)\min\big(\mathrm{VDL1}, \sqrt{I_{\max}^2 - I_{p\mathrm{cmd}}^2}\big)min⁡(VDL2,Imax⁡)\min(\mathrm{VDL2}, I_{\max})

REGC_A, generator/converter. Both current commands pass a lag of time constant Tg. The rate of the reactive current is limited in one direction only, chosen from the sign of the initial reactive power: by Iqrmax if Q0>0Q_0 > 0, by Iqrmin if Q0<0Q_0 < 0, not at all if Q0=0Q_0 = 0. The rise of the active current is limited to rrpwr per second at all times. High-voltage reactive current management and low-voltage active current management then give the injected currents:

Iqf=max⁡(Iqvt−max⁡(0, Khv(vt−Volim)), QMIN)vt/(1+sTfltr),Ipf=m(vt) IpI_{qf} = \frac{\max\big(I_q v_t - \max(0,\, K_{hv}(v_t - V_{olim})),\ \text{QMIN}\big)}{v_t/(1+sT_{\mathrm{fltr}})}, \qquad I_{pf} = m(v_t)\, I_p

where KhvK_{hv} is accel, VolimV_{olim} is vtmax, and mm rises linearly from 0 at lvpnt0 to 1 at lvpnt1. When Lvplsw = 1, IpI_p is also capped by the low-voltage power logic: zero below zerox, rising linearly to Lvpl1 at Brkpt, no cap above Brkpt. The voltage it uses is vt/(1+sTfltr)v_t/(1+sT_{\mathrm{fltr}}).

PLL. The voltage components are filtered with TfltrT_{\mathrm{fltr}} and

vq=−vxfsin⁡θpll+vyfcos⁡θpll,ωpll=kp,PLL vq+ki,PLL ⁣∫vq dt,dθplldt=ωpll−ωref,PLLv_q = -v_{xf}\sin\theta_{\mathrm{pll}} + v_{yf}\cos\theta_{\mathrm{pll}}, \qquad \omega_{\mathrm{pll}} = k_{p,\mathrm{PLL}}\,v_q + k_{i,\mathrm{PLL}}\!\int v_q\,dt, \qquad \frac{d\theta_{\mathrm{pll}}}{dt} = \omega_{\mathrm{pll}} - \omega_{\mathrm{ref,PLL}}

The angle is frozen while the filtered voltage is below vPLL. The angle equation carries no base angular frequency, so kpPLL and kiPLL are in rad/s per pu. wrefPLL is also the initial value of ωpll\omega_{\mathrm{pll}}, so it cancels and has no effect on the response.

Network interface. The injected current is resolved with the PLL angle and rescaled to the system base:

ix=(Ipfcos⁡θpll+Iqfsin⁡θpll)SnomSbase,iy=(Ipfsin⁡θpll−Iqfcos⁡θpll)SnomSbasei_x = \left(I_{pf}\cos\theta_{\mathrm{pll}} + I_{qf}\sin\theta_{\mathrm{pll}}\right)\frac{S_{\mathrm{nom}}}{S_{\mathrm{base}}}, \qquad i_y = \left(I_{pf}\sin\theta_{\mathrm{pll}} - I_{qf}\cos\theta_{\mathrm{pll}}\right)\frac{S_{\mathrm{nom}}}{S_{\mathrm{base}}}

A positive IqfI_{qf} injects reactive power. WT4 and BESS use the same interface.

Reactive power control modes. The flags combine as in the WECC specification:

ModePFFlagvFlagQFlagRefFlagQextFlag
Constant power factor1any0any0
Constant Q0any0any0
Local voltage control001any0
Local coordinated Q/V control011any0
Plant Q control0any001
Plant voltage control0any011
Plant voltage control + local coordinated Q/V01111
Plant Q control + local coordinated Q/V01101

RAMSES applies no default values: a WT3 record must carry exactly 128 values, and one with more or fewer is refused. The Example column is the record in the usage example below. Per-unit values are on SNOM unless stated. The REPC_A, REEC_A, REGC_A and PLL blocks are the same code in WT4 at the indices given in the WT4 # column.

Rating and REPC_A plant controller

WT3 #WT4 #NameDescriptionUnitExample
11SNOMRating, base of every per-unit quantity in the modelMVA1.667
22RcCompensation resistancepu0
33XcCompensation reactance (droop or line-drop)pu0
44vcompFlag1: regulate ∣vˉcon∣\lvert\bar v_{\mathrm{con}}\rvert (line-drop compensation); 0: regulate vt+KcQbranchv_t + K_c Q_{\mathrm{branch}} (droop)0
55KcReactive droop gain (used when vcompFlag = 0)pu/pu0
66TfltrVoltage and Q measurement filter; also the REGC_A voltage filter and the PLL input filters0.02
77RefFlag1: voltage control; 0: reactive power control1
88dbdDeadband on the V/Q error, symmetric, ≥0\geq 0pu0
99emaxUpper limit on the V/Q errorpu0.1
1010eminLower limit on the V/Q errorpu-0.1
1111KpV/Q PI proportional gainpu/pu18
1212KiV/Q PI integral gainpu/(pu·s)5
1313QmaxUpper limit of the V/Q PIpu0.44
1414QminLower limit of the V/Q PIpu-0.44
1515TftLead time constants0
1616TfvLag time constant; below 0.005 the lead-lag is bypasseds0.05
1717vfrzVoltage below which the V/Q integrator is frozenpu0.7
1818TpFilter on PbranchP_{\mathrm{branch}}; also the PeP_e filter of WTGTRQ_A (WT3) and of the power-factor references0.05
1919fdbd1Frequency deadband, lower edge, ≤0\leq 0pu-0.0006
2020fdbd2Frequency deadband, upper edge, ≥0\geq 0pu0.0006
2121DdnDroop for over-frequencypu/pu20
2222DupDroop for under-frequencypu/pu0
2323femaxUpper limit on the power errorpu999
2424feminLower limit on the power errorpu-999
2525kpgPower PI proportional gainpu/pu0.05
2626kigPower PI integral gainpu/(pu·s)0.1
2727PmaxUpper limit of the power PIpu1
2828PminLower limit of the power PIpu0
2929TlagLag on the plant power outputs0.1
3030FreqFlag1: plant power loop sets PrefoP_{\mathrm{refo}}; 0: PrefoP_{\mathrm{refo}} held at its initial value0
3131TmesfFrequency measurement time constant, raised to 0.05 if smallers0.02
3232QextFlag1: plant V/Q loop sets QextQ_{\mathrm{ext}}; 0: QextQ_{\mathrm{ext}} held at its initial value0

With FreqFlag = 0 and QextFlag = 0, as in the example, REPC_A is computed but drives nothing.

WTGTRQ_A torque controller (WT3 only)

WT3 #NameDescriptionUnitExample
33TwrefSpeed reference time constants30
34KipTorque PI integral gainpu/(pu·s)0.6
35KppTorque PI proportional gainpu/pu3
36TemaxMaximum torque orderpu1.2
37TeminMinimum torque orderpu0
38p1Power-speed table, power of point 1pu0.2
39spd1Power-speed table, speed of point 1pu0.58
40p2Point 2, powerpu0.4
41spd2Point 2, speedpu0.72
42p3Point 3, powerpu0.6
43spd3Point 3, speedpu0.86
44p4Point 4, powerpu0.8
45spd4Point 4, speedpu1.0
46Tflag1: PI on power error; 0: PI on speed error1

WTGPT_A pitch controller (WT3 only)

WT3 #NameDescriptionUnitExample
47KccGain of the power error added to the speed errorpu/pu0
48KiwPitch control integral gaindeg/(pu·s)0.6
49KpwPitch control proportional gaindeg/pu0.3
50ThetaMinMinimum pitch angle (also limits both PIs)deg0
51ThetaMaxMaximum pitch angle (also limits both PIs)deg27
52TthetaPitch actuator time constants0.3
53KicPitch compensation integral gaindeg/(pu·s)0.6
54KpcPitch compensation proportional gaindeg/pu3
55dThetaMinMinimum pitch ratedeg/s-10
56dThetaMaxMaximum pitch ratedeg/s10

WTGAR_A aerodynamics and WTGT_A drivetrain (WT3 only; WT4 has its own drivetrain block, listed under WT4)

WT3 #NameDescriptionUnitExample
57KaAerodynamic gainpu/deg²0.007
58ThetaoInitial pitch angle θ0\theta_0deg0
59HtTurbine inertias3.395
60HgGenerator inertias0.962
61DshaftShaft dampingpu/pu2.344
62KshaftShaft stiffness, per pu·s of twistpu1.387

REEC_A electrical controller

WT3 #WT4 #NameDescriptionUnitExample
6338vdipVoltage below which a dip is declaredpu0.9
6439vupVoltage above which a dip is declaredpu1.1
6540TrvTerminal voltage filters0.02
6641vref0Reference for the dip injection; used as given, so 0 is not replaced by the initial voltagepu1
6742vref1Bias added to QrQ_r when vFlag = 0pu1
6843dbd1Dip injection deadband, lower edge, ≤0\leq 0pu-0.05
6944dbd2Dip injection deadband, upper edge, ≥0\geq 0pu0.05
7045kqvDip reactive current gainpu/pu2
7146Iqh1Upper limit of the dip injectionpu1.05
7247Iql1Lower limit of the dip injectionpu-1.05
7348qmaxUpper limit of QrQ_rpu0.44
7449qminLower limit of QrQ_rpu-0.44
7550vmaxUpper limit of VrefV_{\mathrm{ref}} and of the Q PIpu1.1
7651vminLower limit of VrefV_{\mathrm{ref}} and of the Q PIpu0.9
7752kqpQ PI proportional gainpu/pu0
7853kqiQ PI integral gainpu/(pu·s)0.1
7954kvpV PI proportional gainpu/pu0
8055kviV PI integral gainpu/(pu·s)40
8156TiqReactive current lag (QFlag = 0)s0.02
8257vq1VDL1, voltage of point 1pu0.2
8358Iq1VDL1, reactive current limit at point 1pu1
8459vq2VDL1, point 2pu0.4
8560Iq2pu1
8661vq3VDL1, point 3pu0.8
8762Iq3pu1
8863vq4VDL1, point 4pu1
8964Iq4pu1
9065vp1VDL2, voltage of point 1pu0.2
9166Ip1VDL2, active current limit at point 1pu1
9267vp2VDL2, point 2pu0.4
9368Ip2pu1
9469vp3VDL2, point 3pu0.8
9570Ip3pu1
9671vp4VDL2, point 4pu1
9772Ip4pu1
9873dPmaxUpper rate limit of PrefP_{\mathrm{ref}}pu/s999
9974dPminLower rate limit of PrefP_{\mathrm{ref}}pu/s-999
10075pmaxUpper limit of PordP_{\mathrm{ord}}pu1
10176pminLower limit of PordP_{\mathrm{ord}}pu0
10277TpordPower order lags0.02
10378ImaxConverter current limitpu1.11
10479ThldPost-dip hold of the reactive injection; its sign selects the modes0
10580Thld2Post-dip hold of Ipmax⁡I_{p\max}s0
10681IqfrzReactive injection held after a dip when Thld >0> 0pu0
10782PFFlag1: constant power factor; 0: reactive power reference QextQ_{\mathrm{ext}}0
10883vFlag1: VrefV_{\mathrm{ref}} from the Q PI; 0: Vref=Qr+vref1V_{\mathrm{ref}} = Q_r + v_{\mathrm{ref1}}0
10984QFlag1: reactive current from the voltage PI; 0: from Qr/vtQ_r/v_t0
11085PQFlag1: active current priority; 0: reactive current priority0
11186PFlag1: power order is Pref ωgP_{\mathrm{ref}}\,\omega_g; 0: power order is PrefP_{\mathrm{ref}}1

REGC_A generator/converter and PLL

WT3 #WT4 #NameDescriptionUnitExample
11287IqrmaxReactive current rate limit, used when Q0>0Q_0 > 0pu/s999
11388IqrminReactive current rate limit, used when Q0<0Q_0 < 0pu/s-999
11489TgConverter current lags0.02
11590vtmaxHigh-voltage threshold (WECC Volim)pu1.2
11691accelHigh-voltage reactive current gain (WECC Khv)pu/pu0.7
11792QMINLower limit of IqvtI_q v_t less the high-voltage term (WECC Iolim)pu-1.3
11893lvpnt0Active current is zero below this voltagepu0.4
11994lvpnt1Active current is unreduced above this voltagepu0.8
12095BrkptLow-voltage power logic breakpointpu0.9
12196zeroxLow-voltage power logic zero crossingpu0.4
12297Lvpl1Low-voltage power logic limit at Brkptpu1.22
12398Lvplsw1: low-voltage power logic on; 0: off0
12499rrpwrActive current rise rate limitpu/s10
125100vPLLVoltage below which the PLL angle is frozenpu0.2
126101kpPLLPLL proportional gainrad/s/pu3
127102kiPLLPLL integral gainrad/s²/pu30
128103wrefPLLPLL frequency offset; cancels, no effect on the response1

Time constants. A zero Tfltr, Tp, Tlag, Twref or Trv turns its block into a direct pass-through. Ttheta below 0.001 does the same for the pitch actuator but also removes every pitch limit, including those of the two PIs.

Thirty-one further parameters are computed at initialization. Among them are the power-flow quantities vto, Peo, Qgeno and pfaref (the initial power factor angle, rad), the references Qextini, Prefini, vref, Qref and Plantpref held by REPC_A, and wo, the initial speed read off the power-speed table.

All quantities are in pu on SNOM.

NameDescriptionNameDescription
Pe, QgenTerminal active and reactive powerwg, wtGenerator and turbine speed
vtTerminal voltagewrefSpeed reference
FreqMeasured frequencyPrefTorque order from WTGTRQ_A
vconCompensated voltagePordPower order
Pbranch, QbranchPowers at the compensated pointThetaPitch angle (data unit, degrees by convention)
Prefo, QextActive and reactive references into WTGTRQ_A and REEC_APm, Tm, TeMechanical power, mechanical and electrical torque
Plantpref, Qref, vrefREPC_A references, constantIqinjDip reactive current injection
Ipcmd, IqcmdCurrent commandsIpmax, Iqmax, IqminCurrent limits
Ipf, IqfInjected currentsx59Low-voltage power logic limit on IpI_p; reads 10910^9 when inactive

The model initializes from the power-flow voltage and injection: the PLL angle from the bus voltage angle, the converter currents by rotation into that frame, then every block backwards to its references. The mechanical side starts with Pm=PeP_m = P_e and the speed read off the power-speed table.

RAMSES stops the simulation if the initial point violates the current limits or the dip thresholds: IqcmdI_{q\mathrm{cmd}} outside ±Iqmax⁡\pm I_{q\max}, IpcmdI_{p\mathrm{cmd}} outside [0,Ipmax⁡][0, I_{p\max}] (which also rejects a unit absorbing active power), or vtv_t outside [vdip, vup]. No other limit is checked, so a PI or a lag can start on its limit without a warning. The initial voltage must also exceed lvpnt0.

A 1.667 MVA unit taking its whole operating point from the power flow (FP = FQ = 1), with the plant controller disconnected (FreqFlag = QextFlag = 0), constant reactive power and the drivetrain coupled to the output (PFlag = 1). This is the record of the 3-bus case in stepss-test-systems. Lines starting with # inside a record are ignored.

Show the data record
INJEC WT3 DFIGB03 B03
# FP FQ P Q: share of the power-flow injection (FP, FQ) or initial power (P in MW, Q in Mvar)
1. 1. 0. 0.
# SNOM: Rating, base of every per-unit quantity in the model (MVA)
1.667
# Rc: Compensation resistance (pu)
0
# Xc: Compensation reactance (droop or line-drop) (pu)
0
# vcompFlag: 1: regulate lvertbar v_conrvert (line-drop compensation); 0: regulate v_t + K_c Q_branch (droop)
0
# Kc: Reactive droop gain (used when vcompFlag = 0) (pu/pu)
0
# Tfltr: Voltage and Q measurement filter; also the REGC_A voltage filter and the PLL input filter (s)
0.02
# RefFlag: 1: voltage control; 0: reactive power control
1
# dbd: Deadband on the V/Q error, symmetric, geq 0 (pu)
0
# emax: Upper limit on the V/Q error (pu)
0.1
# emin: Lower limit on the V/Q error (pu)
-0.1
# Kp: V/Q PI proportional gain (pu/pu)
18
# Ki: V/Q PI integral gain (pu/(pu·s))
5
# Qmax: Upper limit of the V/Q PI (pu)
0.44
# Qmin: Lower limit of the V/Q PI (pu)
-0.44
# Tft: Lead time constant (s)
0
# Tfv: Lag time constant; below 0.005 the lead-lag is bypassed (s)
0.05
# vfrz: Voltage below which the V/Q integrator is frozen (pu)
0.7
# Tp: Filter on P_branch; also the P_e filter of WTGTRQ_A (WT3) and of the power-factor reference (s)
0.05
# fdbd1: Frequency deadband, lower edge, leq 0 (pu)
-0.0006
# fdbd2: Frequency deadband, upper edge, geq 0 (pu)
0.0006
# Ddn: Droop for over-frequency (pu/pu)
20
# Dup: Droop for under-frequency (pu/pu)
0
# femax: Upper limit on the power error (pu)
999
# femin: Lower limit on the power error (pu)
-999
# kpg: Power PI proportional gain (pu/pu)
0.05
# kig: Power PI integral gain (pu/(pu·s))
0.1
# Pmax: Upper limit of the power PI (pu)
1
# Pmin: Lower limit of the power PI (pu)
0
# Tlag: Lag on the plant power output (s)
0.1
# FreqFlag: 1: plant power loop sets P_refo; 0: P_refo held at its initial value
0
# Tmesf: Frequency measurement time constant, raised to 0.05 if smaller (s)
0.02
# QextFlag: 1: plant V/Q loop sets Q_ext; 0: Q_ext held at its initial value
0
# Twref: Speed reference time constant (s)
30
# Kip: Torque PI integral gain (pu/(pu·s))
0.6
# Kpp: Torque PI proportional gain (pu/pu)
3
# Temax: Maximum torque order (pu)
1.2
# Temin: Minimum torque order (pu)
0
# p1: Power-speed table, power of point 1 (pu)
0.2
# spd1: Power-speed table, speed of point 1 (pu)
0.58
# p2: Point 2, power (pu)
0.4
# spd2: Point 2, speed (pu)
0.72
# p3: Point 3, power (pu)
0.6
# spd3: Point 3, speed (pu)
0.86
# p4: Point 4, power (pu)
0.8
# spd4: Point 4, speed (pu)
1
# Tflag: 1: PI on power error; 0: PI on speed error
1
# Kcc: Gain of the power error added to the speed error (pu/pu)
0
# Kiw: Pitch control integral gain (deg/(pu·s))
0.6
# Kpw: Pitch control proportional gain (deg/pu)
0.3
# ThetaMin: Minimum pitch angle (also limits both PIs) (deg)
0
# ThetaMax: Maximum pitch angle (also limits both PIs) (deg)
27
# Ttheta: Pitch actuator time constant (s)
0.3
# Kic: Pitch compensation integral gain (deg/(pu·s))
0.6
# Kpc: Pitch compensation proportional gain (deg/pu)
3
# dThetaMin: Minimum pitch rate (deg/s)
-10
# dThetaMax: Maximum pitch rate (deg/s)
10
# Ka: Aerodynamic gain (pu/deg²)
0.007
# Thetao: Initial pitch angle theta_0 (deg)
0
# Ht: Turbine inertia (s)
3.395
# Hg: Generator inertia (s)
0.962
# Dshaft: Shaft damping (pu/pu)
2.344
# Kshaft: Shaft stiffness, per pu·s of twist (pu)
1.387
# vdip: Voltage below which a dip is declared (pu)
0.9
# vup: Voltage above which a dip is declared (pu)
1.1
# Trv: Terminal voltage filter (s)
0.02
# vref0: Reference for the dip injection; used as given, so 0 is not replaced by the initial voltage (pu)
1
# vref1: Bias added to Q_r when vFlag = 0 (pu)
1
# dbd1: Dip injection deadband, lower edge, leq 0 (pu)
-0.05
# dbd2: Dip injection deadband, upper edge, geq 0 (pu)
0.05
# kqv: Dip reactive current gain (pu/pu)
2
# Iqh1: Upper limit of the dip injection (pu)
1.05
# Iql1: Lower limit of the dip injection (pu)
-1.05
# qmax: Upper limit of the reactive power reference (pu)
0.44
# qmin: Lower limit of the reactive power reference (pu)
-0.44
# vmax: Upper limit of V_ref and of the Q PI (pu)
1.1
# vmin: Lower limit of V_ref and of the Q PI (pu)
0.9
# kqp: Q PI proportional gain (pu/pu)
0
# kqi: Q PI integral gain (pu/(pu·s))
0.1
# kvp: V PI proportional gain (pu/pu)
0
# kvi: V PI integral gain (pu/(pu·s))
40
# Tiq: Reactive current lag (QFlag = 0) (s)
0.02
# vq1: VDL1, voltage of point 1 (pu)
0.2
# Iq1: VDL1, reactive current limit at point 1 (pu)
1
# vq2: VDL1, point 2 (pu)
0.4
# Iq2: (pu)
1
# vq3: VDL1, point 3 (pu)
0.8
# Iq3: (pu)
1
# vq4: VDL1, point 4 (pu)
1
# Iq4: (pu)
1
# vp1: VDL2, voltage of point 1 (pu)
0.2
# Ip1: VDL2, active current limit at point 1 (pu)
1
# vp2: VDL2, point 2 (pu)
0.4
# Ip2: (pu)
1
# vp3: VDL2, point 3 (pu)
0.8
# Ip3: (pu)
1
# vp4: VDL2, point 4 (pu)
1
# Ip4: (pu)
1
# dPmax: Upper rate limit of P_ref (pu/s)
999
# dPmin: Lower rate limit of P_ref (pu/s)
-999
# pmax: Upper limit of the power order Pord (pu)
1
# pmin: Lower limit of the power order Pord (pu)
0
# Tpord: Power order lag (s)
0.02
# Imax: Converter current limit (pu)
1.11
# Thld: Post-dip hold of the reactive injection; its sign selects the mode (s)
0
# Thld2: Post-dip hold of I_pmax (s)
0
# Iqfrz: Reactive injection held after a dip when Thld > 0 (pu)
0
# PFFlag: 1: constant power factor; 0: reactive power reference Q_ext
0
# vFlag: 1: V_ref from the Q PI; 0: V_ref = Q_r + v_ref1
0
# QFlag: 1: reactive current from the voltage PI; 0: from Q_r/v_t
0
# PQFlag: 1: active current priority; 0: reactive current priority
0
# PFlag: 1: power order is P_ref,omega_g; 0: power order is P_ref
1
# Iqrmax: Reactive current rate limit, used when Q_0 > 0 (pu/s)
999
# Iqrmin: Reactive current rate limit, used when Q_0 < 0 (pu/s)
-999
# Tg: Converter current lag (s)
0.02
# vtmax: High-voltage threshold (WECC Volim) (pu)
1.2
# accel: High-voltage reactive current gain (WECC Khv) (pu/pu)
0.7
# QMIN: Lower limit of the converter reactive output after the high-voltage reduction (pu)
-1.3
# lvpnt0: Active current is zero below this voltage (pu)
0.4
# lvpnt1: Active current is unreduced above this voltage (pu)
0.8
# Brkpt: Low-voltage power logic breakpoint (pu)
0.9
# zerox: Low-voltage power logic zero crossing (pu)
0.4
# Lvpl1: Low-voltage power logic limit at Brkpt (pu)
1.22
# Lvplsw: 1: low-voltage power logic on; 0: off
0
# rrpwr: Active current rise rate limit (pu/s)
10
# vPLL: Voltage below which the PLL angle is frozen (pu)
0.2
# kpPLL: PLL proportional gain (rad/s/pu)
3
# kiPLL: PLL integral gain (rad/s²/pu)
30
# wrefPLL: PLL frequency offset; cancels, no effect on the response
1
;

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 generic Type 4 (full converter) wind turbine. It is WT3 without the torque controller, the pitch controller and the aerodynamic block: the generator is decoupled from the grid by the converter, the mechanical torque is constant, and a two-mass drivetrain is kept only so that its torsional oscillations can appear in the output. Its WECC blocks, their approval status and the newer blocks RAMSES does not implement are listed under WECC Model Status.

BlockRoleWT4 #
SNOMRating, the per-unit base of the model1
REPC_APlant controller, as in WT32–32
WTGT_ATwo-mass drivetrain33–37
REEC_AElectrical controller, as in WT338–86
REGC_AGenerator/converter interface, as in WT387–99
PLLAngle of the injected current, as in WT3100–103

REPC_A, REEC_A, REGC_A, the PLL and the network interface are the same code as in WT3, and their equations are given in the WT3 description. Every power, current and torque is in per unit on SNOM.

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 constant mechanical torque Tmo drives the two-mass drivetrain WTGT_A to give the generator speed, which returns to the electrical controller when PFlag is 1, with the electrical torque acting on the drivetrain 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 constant mechanical torque Tmo drives the two-mass drivetrain WTGT_A to give the generator speed, which returns to the electrical controller when PFlag is 1, with the electrical torque acting on the drivetrain from the electrical controller. There is no pitch controller and no aerodynamic rotor.

WTGT_A, two-mass drivetrain. The mechanical torque is the constant Tmo=Pe0/ωoT_{mo} = P_{e0}/\omega_o and Te=Pe/ωgT_e = P_e/\omega_g:

2HtdΔωtdt=Tmo−KshaftΔθ−Dshaft(Δωt−Δωg)2H_t\frac{d\Delta\omega_t}{dt} = T_{mo} - K_{\mathrm{shaft}}\Delta\theta - D_{\mathrm{shaft}}(\Delta\omega_t - \Delta\omega_g)

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

dΔθdt=Δωt−Δωg,ωg=ωo+Δωg\frac{d\Delta\theta}{dt} = \Delta\omega_t - \Delta\omega_g, \qquad \omega_g = \omega_o + \Delta\omega_g

As in WT3, the twist equation carries no base angular frequency, so Kshaft is per pu·s of twist. Unlike WT3, the initial speed ωo\omega_o is a data parameter.

Coupling to the output. The drivetrain reaches the network only through PFlag. With PFlag = 1 the power order is Pref ωgP_{\mathrm{ref}}\,\omega_g, so a torsional oscillation of ωg\omega_g modulates the active current. With PFlag = 0 the drivetrain is still computed but has no effect on the injection. The active power reference PrefP_{\mathrm{ref}} is constant unless REPC_A drives it (FreqFlag = 1), and is rate-limited by dPmax and dPmin.

RAMSES applies no default values: a WT4 record must carry exactly 103 values, and one with more or fewer is refused. Parameters 1–32 and 38–103 are listed in the parameter tables of WT3 under their WT4 #. The drivetrain block is specific to WT4:

WT4 #NameDescriptionUnitExample
33HtTurbine inertias3.395
34HgGenerator inertias0.962
35woInitial generator speed, the reference of Δωg\Delta\omega_gpu1
36DshaftShaft dampingpu/pu2.344
37KshaftShaft stiffness, per pu·s of twistpu1.387

The time-constant caution under the WT3 parameters applies here too.

Twenty-eight further parameters are computed at initialization, the same as WT3 less the mechanical ones, plus Tmo, the constant mechanical torque.

All quantities are in pu on SNOM.

NameDescriptionNameDescription
Pe, QgenTerminal active and reactive powerwgGenerator speed
vtTerminal voltageTeElectrical torque
FreqMeasured frequencyTmoMechanical torque, constant
vconCompensated voltageIqinjDip reactive current injection
Pbranch, QbranchPowers at the compensated pointIpcmd, IqcmdCurrent commands
Pref, QextActive and reactive references into REEC_AIpmax, Iqmax, IqminCurrent limits
Plantpref, Qref, vrefREPC_A references, constantIp, IqConverter currents before the voltage management
pfarefInitial power factor angle (rad), constantIpf, IqfInjected currents
x59Low-voltage power logic limit on IpI_p; reads 10910^9 when inactive

The initialization and its checks are those of WT3.

The WT3 example unit as a full converter: the same REPC_A, REEC_A, REGC_A and PLL values, with the drivetrain block in place of WTGTRQ_A, WTGPT_A, WTGAR_A and WTGT_A.

Show the data record
INJEC WT4 WT4B03 B03
# FP FQ P Q: share of the power-flow injection (FP, FQ) or initial power (P in MW, Q in Mvar)
1. 1. 0. 0.
# SNOM: Rating, base of every per-unit quantity in the model (MVA)
1.667
# Rc: Compensation resistance (pu)
0
# Xc: Compensation reactance (droop or line-drop) (pu)
0
# vcompFlag: 1: regulate lvertbar v_conrvert (line-drop compensation); 0: regulate v_t + K_c Q_branch (droop)
0
# Kc: Reactive droop gain (used when vcompFlag = 0) (pu/pu)
0
# Tfltr: Voltage and Q measurement filter; also the REGC_A voltage filter and the PLL input filter (s)
0.02
# RefFlag: 1: voltage control; 0: reactive power control
1
# dbd: Deadband on the V/Q error, symmetric, geq 0 (pu)
0
# emax: Upper limit on the V/Q error (pu)
0.1
# emin: Lower limit on the V/Q error (pu)
-0.1
# Kp: V/Q PI proportional gain (pu/pu)
18
# Ki: V/Q PI integral gain (pu/(pu·s))
5
# Qmax: Upper limit of the V/Q PI (pu)
0.44
# Qmin: Lower limit of the V/Q PI (pu)
-0.44
# Tft: Lead time constant (s)
0
# Tfv: Lag time constant; below 0.005 the lead-lag is bypassed (s)
0.05
# vfrz: Voltage below which the V/Q integrator is frozen (pu)
0.7
# Tp: Filter on P_branch and on the power-factor reference (s)
0.05
# fdbd1: Frequency deadband, lower edge, leq 0 (pu)
-0.0006
# fdbd2: Frequency deadband, upper edge, geq 0 (pu)
0.0006
# Ddn: Droop for over-frequency (pu/pu)
20
# Dup: Droop for under-frequency (pu/pu)
0
# femax: Upper limit on the power error (pu)
999
# femin: Lower limit on the power error (pu)
-999
# kpg: Power PI proportional gain (pu/pu)
0.05
# kig: Power PI integral gain (pu/(pu·s))
0.1
# Pmax: Upper limit of the power PI (pu)
1
# Pmin: Lower limit of the power PI (pu)
0
# Tlag: Lag on the plant power output (s)
0.1
# FreqFlag: 1: plant power loop sets P_refo; 0: P_refo held at its initial value
0
# Tmesf: Frequency measurement time constant, raised to 0.05 if smaller (s)
0.02
# QextFlag: 1: plant V/Q loop sets Q_ext; 0: Q_ext held at its initial value
0
# Ht: Turbine inertia (s)
3.395
# Hg: Generator inertia (s)
0.962
# wo: Initial generator speed, the reference of Deltaomega_g (pu)
1
# Dshaft: Shaft damping (pu/pu)
2.344
# Kshaft: Shaft stiffness, per pu·s of twist (pu)
1.387
# vdip: Voltage below which a dip is declared (pu)
0.9
# vup: Voltage above which a dip is declared (pu)
1.1
# Trv: Terminal voltage filter (s)
0.02
# vref0: Reference for the dip injection; used as given, so 0 is not replaced by the initial voltage (pu)
1
# vref1: Bias added to Q_r when vFlag = 0 (pu)
1
# dbd1: Dip injection deadband, lower edge, leq 0 (pu)
-0.05
# dbd2: Dip injection deadband, upper edge, geq 0 (pu)
0.05
# kqv: Dip reactive current gain (pu/pu)
2
# Iqh1: Upper limit of the dip injection (pu)
1.05
# Iql1: Lower limit of the dip injection (pu)
-1.05
# qmax: Upper limit of the reactive power reference (pu)
0.44
# qmin: Lower limit of the reactive power reference (pu)
-0.44
# vmax: Upper limit of V_ref and of the Q PI (pu)
1.1
# vmin: Lower limit of V_ref and of the Q PI (pu)
0.9
# kqp: Q PI proportional gain (pu/pu)
0
# kqi: Q PI integral gain (pu/(pu·s))
0.1
# kvp: V PI proportional gain (pu/pu)
0
# kvi: V PI integral gain (pu/(pu·s))
40
# Tiq: Reactive current lag (QFlag = 0) (s)
0.02
# vq1: VDL1, voltage of point 1 (pu)
0.2
# Iq1: VDL1, reactive current limit at point 1 (pu)
1
# vq2: VDL1, point 2 (pu)
0.4
# Iq2: (pu)
1
# vq3: VDL1, point 3 (pu)
0.8
# Iq3: (pu)
1
# vq4: VDL1, point 4 (pu)
1
# Iq4: (pu)
1
# vp1: VDL2, voltage of point 1 (pu)
0.2
# Ip1: VDL2, active current limit at point 1 (pu)
1
# vp2: VDL2, point 2 (pu)
0.4
# Ip2: (pu)
1
# vp3: VDL2, point 3 (pu)
0.8
# Ip3: (pu)
1
# vp4: VDL2, point 4 (pu)
1
# Ip4: (pu)
1
# dPmax: Upper rate limit of P_ref (pu/s)
999
# dPmin: Lower rate limit of P_ref (pu/s)
-999
# pmax: Upper limit of the power order Pord (pu)
1
# pmin: Lower limit of the power order Pord (pu)
0
# Tpord: Power order lag (s)
0.02
# Imax: Converter current limit (pu)
1.11
# Thld: Post-dip hold of the reactive injection; its sign selects the mode (s)
0
# Thld2: Post-dip hold of I_pmax (s)
0
# Iqfrz: Reactive injection held after a dip when Thld > 0 (pu)
0
# PFFlag: 1: constant power factor; 0: reactive power reference Q_ext
0
# vFlag: 1: V_ref from the Q PI; 0: V_ref = Q_r + v_ref1
0
# QFlag: 1: reactive current from the voltage PI; 0: from Q_r/v_t
0
# PQFlag: 1: active current priority; 0: reactive current priority
0
# PFlag: 1: power order is P_ref,omega_g; 0: power order is P_ref
1
# Iqrmax: Reactive current rate limit, used when Q_0 > 0 (pu/s)
999
# Iqrmin: Reactive current rate limit, used when Q_0 < 0 (pu/s)
-999
# Tg: Converter current lag (s)
0.02
# vtmax: High-voltage threshold (WECC Volim) (pu)
1.2
# accel: High-voltage reactive current gain (WECC Khv) (pu/pu)
0.7
# QMIN: Lower limit of the converter reactive output after the high-voltage reduction (pu)
-1.3
# lvpnt0: Active current is zero below this voltage (pu)
0.4
# lvpnt1: Active current is unreduced above this voltage (pu)
0.8
# Brkpt: Low-voltage power logic breakpoint (pu)
0.9
# zerox: Low-voltage power logic zero crossing (pu)
0.4
# Lvpl1: Low-voltage power logic limit at Brkpt (pu)
1.22
# Lvplsw: 1: low-voltage power logic on; 0: off
0
# rrpwr: Active current rise rate limit (pu/s)
10
# vPLL: Voltage below which the PLL angle is frozen (pu)
0.2
# kpPLL: PLL proportional gain (rad/s/pu)
3
# kiPLL: PLL integral gain (rad/s²/pu)
30
# wrefPLL: PLL frequency offset; cancels, no effect on the response
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=−PbessCbat⋅Snom\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⁡={0SOC≥SOCmax⁡Pmax⁡,ratedotherwiseP_{\max} = \begin{cases} 0 & \mathrm{SOC} \ge \mathrm{SOC}_{\max}\\ P_{\max,\mathrm{rated}} & \text{otherwise}\end{cases}

Pmin⁡={0SOC≤SOCmin⁡Pmin⁡,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
Show the data record
INJEC BESS BESS1 BUS_ST
# FP FQ P Q: share of the power-flow injection (FP, FQ) or initial power (P in MW, Q in Mvar)
1. 1. 0. 0.
# SNOM: Rating, base of every per-unit quantity in the model (MVA)
100.
# Rc: Compensation resistance (pu)
0
# Xc: Compensation reactance (droop or line-drop) (pu)
0
# vcompFlag: 1: regulate lvertbar v_conrvert (line-drop compensation); 0: regulate v_t + K_c Q_branch (droop)
0
# Kc: Reactive droop gain (used when vcompFlag = 0) (pu/pu)
0
# Tfltr: Voltage and Q measurement filter; also the REGC_A voltage filter and the PLL input filter (s)
0.02
# RefFlag: 1: voltage control; 0: reactive power control
1
# dbd: Deadband on the V/Q error, symmetric, geq 0 (pu)
0
# emax: Upper limit on the V/Q error (pu)
0.1
# emin: Lower limit on the V/Q error (pu)
-0.1
# Kp: V/Q PI proportional gain (pu/pu)
18
# Ki: V/Q PI integral gain (pu/(pu·s))
5
# Qmax: Upper limit of the V/Q PI (pu)
0.44
# Qmin: Lower limit of the V/Q PI (pu)
-0.44
# Tft: Lead time constant (s)
0
# Tfv: Lag time constant; below 0.005 the lead-lag is bypassed (s)
0.05
# vfrz: Voltage below which the V/Q integrator is frozen (pu)
0.7
# Tp: Filter on P_branch and on the power-factor reference (s)
0.05
# fdbd1: Frequency deadband, lower edge, leq 0 (pu)
-0.0006
# fdbd2: Frequency deadband, upper edge, geq 0 (pu)
0.0006
# Ddn: Droop for over-frequency (pu/pu)
20
# Dup: Droop for under-frequency (pu/pu)
0
# femax: Upper limit on the power error (pu)
999
# femin: Lower limit on the power error (pu)
-999
# kpg: Power PI proportional gain (pu/pu)
0.05
# kig: Power PI integral gain (pu/(pu·s))
0.1
# Pmax: Upper limit of the power PI (pu)
1
# Pmin: Lower limit of the power PI (pu)
-1
# Tlag: Lag on the plant power output (s)
0.1
# FreqFlag: 1: plant power loop sets P_refo; 0: P_refo held at its initial value
0
# Tmesf: Frequency measurement time constant, raised to 0.05 if smaller (s)
0.02
# QextFlag: 1: plant V/Q loop sets Q_ext; 0: Q_ext held at its initial value
0
# vdip: Voltage below which a dip is declared (pu)
0.9
# vup: Voltage above which a dip is declared (pu)
1.1
# Trv: Terminal voltage filter (s)
0.02
# vref0: Reference for the dip injection; used as given, so 0 is not replaced by the initial voltage (pu)
1
# dbd1: Dip injection deadband, lower edge, leq 0 (pu)
-0.05
# dbd2: Dip injection deadband, upper edge, geq 0 (pu)
0.05
# kqv: Dip reactive current gain (pu/pu)
2
# Iqh1: Upper limit of the dip injection (pu)
1.05
# Iql1: Lower limit of the dip injection (pu)
-1.05
# qmax: Upper limit of the reactive power reference (pu)
0.44
# qmin: Lower limit of the reactive power reference (pu)
-0.44
# vmax: Upper limit of V_ref and of the Q PI (pu)
1.1
# vmin: Lower limit of V_ref and of the Q PI (pu)
0.9
# kqp: Q PI proportional gain (pu/pu)
0
# kqi: Q PI integral gain (pu/(pu·s))
0.1
# kvp: V PI proportional gain (pu/pu)
0
# kvi: V PI integral gain (pu/(pu·s))
40
# Tiq: Reactive current lag (QFlag = 0) (s)
0.02
# vq1: VDL1, voltage of point 1 (pu)
0.2
# Iq1: VDL1, reactive current limit at point 1 (pu)
1
# vq2: VDL1, point 2 (pu)
0.4
# Iq2: (pu)
1
# vq3: VDL1, point 3 (pu)
0.8
# Iq3: (pu)
1
# vq4: VDL1, point 4 (pu)
1
# Iq4: (pu)
1
# vp1: VDL2, voltage of point 1 (pu)
0.2
# Ip1: VDL2, active current limit at point 1 (pu)
1
# vp2: VDL2, point 2 (pu)
0.4
# Ip2: (pu)
1
# vp3: VDL2, point 3 (pu)
0.8
# Ip3: (pu)
1
# vp4: VDL2, point 4 (pu)
1
# Ip4: (pu)
1
# Paux: Constant added to the active current command after dividing Pord by voltage (Ipcmd = Pord/V + Paux), on SNOM base (pu)
0.
# CapBat: Battery energy capacity (MWh)
100.
# SOCini: Initial state of charge as a fraction of CapBat; must lie strictly between SOCmin and SOCmax (pu)
0.5
# SOCmax: Upper SOC limit; at it the battery is full and charging current is blocked (Ipmin = 0) (pu)
0.9
# SOCmin: Lower SOC limit; at it the battery is empty and discharging current is blocked (Ipmax = 0) (pu)
0.1
# dPmax: Upper rate limit of P_ref (pu/s)
999
# dPmin: Lower rate limit of P_ref (pu/s)
-999
# pmax: Upper limit of the power order Pord (pu)
1
# pmin: Lower limit of the power order Pord (pu)
-1
# Tpord: Active power order time constant (s)
0.02
# Imax: Converter current limit (pu)
1.11
# PFFlag: 1: constant power factor; 0: reactive power reference Q_ext
0
# vFlag: 1: V_ref from the Q PI; 0: V_ref = Q_r + v_ref1
0
# QFlag: 1: reactive current from the voltage PI; 0: from Q_r/v_t
0
# PQFlag: 1: active current priority; 0: reactive current priority
0
# Iqrmax: Reactive current rate limit, used when Q_0 > 0 (pu/s)
999
# Iqrmin: Reactive current rate limit, used when Q_0 < 0 (pu/s)
-999
# Tg: Converter current lag (s)
0.02
# vtmax: High-voltage threshold (WECC Volim) (pu)
1.2
# accel: High-voltage reactive current gain (WECC Khv) (pu/pu)
0.7
# QMIN: Lower limit of the converter reactive output after the high-voltage reduction (pu)
-1.3
# lvpnt0: Active current is zero below this voltage (pu)
0.4
# lvpnt1: Active current is unreduced above this voltage (pu)
0.8
# Brkpt: Low-voltage power logic breakpoint (pu)
0.9
# zerox: Low-voltage power logic zero crossing (pu)
0.4
# Lvpl1: Low-voltage power logic limit at Brkpt (pu)
1.22
# Lvplsw: 1: low-voltage power logic on; 0: off
0
# rrpwr: Active current rise rate limit (pu/s)
10
# vPLL: Voltage below which the PLL angle is frozen (pu)
0.2
# kpPLL: PLL proportional gain (rad/s/pu)
3
# kiPLL: PLL integral gain (rad/s²/pu)
30
# wrefPLL: PLL frequency offset; cancels, no effect on the response
1
;