Skip to content

Converter Models

Injector models for converter-interfaced units other than the WECC ones: a generic inverter-based generator, a photovoltaic unit, and grid-forming and grid-following converters. The WECC wind turbine and storage models are on WECC Wind and Storage.

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

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=kPLL vq\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+b sat(Δf−fstart,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 (Vref−Vt)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⁡θPLL−Iqsin⁡θ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
Show the data record
INJEC IBG IBG1 BUS_GEN
# FP FQ P Q: share of the power-flow injection (FP, FQ) or initial power (P in MW, Q in Mvar)
1. 0. 0. 0.
# Imax: Maximum current magnitude (pu)
1.1
# IN: Nominal current (pu)
1.0
# Iprate: Maximum rate of rise of the active current, in multiples of IN (pu/s)
0.5
# Tg: Generator time constant (s)
0.02
# Tm: Measurement filter time constant (s)
0.01
# tLVRT1: LVRT trip delay for Vmin <= Vm < Vint (s)
0.15
# tLVRT2: LVRT trip delay at Vm = a, upper end of the linear ramp (s)
1.5
# tLVRTint: LVRT trip delay at Vm = Vint, lower end of the linear ramp (s)
0.3
# Vmax: Maximum voltage for operation (pu)
1.2
# tau: PLL response time (ms)
20.0
# Vminpll: Voltage below which PLL is frozen (pu)
0.1
# a: Voltage below which the LVRT timer runs; upper end of the LVRT curve (pu)
0.9
# Vmin: Minimum LVRT voltage (pu)
0.1
# Vint: Intermediate LVRT voltage (pu)
0.3
# fmin: Underfrequency trip threshold on the filtered frequency, 50 Hz system (Hz)
47.5
# fmax: Overfrequency trip threshold on the filtered frequency, 50 Hz system (Hz)
51.5
# fstart: Frequency above which active power is reduced (Hz)
50.2
# b: Overfrequency power reduction gain: fraction of initial P per pu frequency above fstart (pu/pu)
20.0
# fr: While the frequency stays at or above fr the power reduction is held at its maximum (Hz)
50.05
# Tr: Reconnection delay after trip (s)
1.0
# Re: Resistance between the terminal bus and the controlled converter-side voltage (pu)
0.0
# Xe: Reactance between the terminal bus and the controlled converter-side voltage (pu)
0.05
# CM1: 1 enables the m and kRCI injection below dbmin with reactive current limit IN; 0 disables
1
# kRCI: Reactive current injection gain below dbmin, in IN per pu voltage (pu/pu)
2.0
# kRCA: Reactive current absorption gain above dbmax, in IN per pu voltage (pu/pu)
1.5
# m: Step of reactive current injected below dbmin, in multiples of IN; needs CM1 or CM2 = 1 (pu)
0.0
# n: Step of reactive current absorbed above dbmax, in multiples of IN (pu)
0.0
# dbmin: Lower edge of the voltage dead-band; reactive injection and Q priority below it (pu)
0.9
# dbmax: Upper edge of the voltage dead-band; reactive absorption above it (pu)
1.1
# HVRT: 1 enables the kRCA absorption term above dbmax; 0 disables it
1
# LVRT: 1 uses Vmin and Vint as the LVRT curve breakpoints; 0 replaces both with Vtrip
1
# CM2: 1 enables the m and kRCI injection below dbmin with reactive current limit 0.707 Imax; 0 disables
0
# Vtrip: Undervoltage trip threshold, used only when LVRT = 0 (pu)
0.85
;

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+Iq2≤Imax\sqrt{I_p^2 + I_q^2} \leq I_{\mathrm{max}}. The inner current loop is a first-order filter:

TgdIpdt=Ip,cmd−Ip,TmdIqdt=Iq,cmd−IqT_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
Show the data record
INJEC PV PV1 BUS_PV
# 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.
# Imax: Maximum converter current; total current limit while Vm < 0.9 pu, and lower reactive current limit in normal operation (pu)
1.1
# IN: Nominal current; active and reactive current limit when Vm >= 0.9 pu, reactive absorption limit during a dip, and base of m and n (pu)
1.0
# ratemax: Maximum rate of rise of the active current Ip (decrease is not rate limited) (pu/s)
0.5
# Tg: Time constant of the active and reactive current lags (Ip and Iq) (s)
0.02
# Tm: Voltage measurement time constant (Vm and the voltage components used by the PLL) (s)
0.01
# tLVRT1: LVRT trip delay for Vmin <= Vm < Vint (s)
0.15
# tLVRT2: LVRT trip delay at Vm = a (upper end of the linear ramp) (s)
1.5
# tLVRTint: LVRT trip delay at Vm = Vint (lower end of the linear ramp up to tLVRT2 at Vm = a) (s)
0.3
# Vmax: Overvoltage threshold on the unfiltered voltage behind Re + jXe; reaching it trips the unit permanently (pu)
1.2
# kpll: PLL proportional gain from q-axis voltage to angle rate (integral gain fixed at zero) (rad/s/pu)
20.0
# Vminpll: Voltage below which the PLL angle is frozen (pu)
0.1
# a: Voltage below which the LVRT timer runs; upper end of the LVRT curve (pu)
0.9
# Vmin: LVRT curve: below this voltage the unit trips at once (used when LVRT = 1) (pu)
0.1
# Vint: LVRT curve intermediate voltage between the tLVRT1 plateau and the ramp (used when LVRT = 1) (pu)
0.3
# fmin: Underfrequency threshold on the filtered frequency; below it the unit trips permanently (Hz)
47.5
# fmax: Overfrequency threshold on the filtered frequency; above it the unit trips permanently (Hz)
51.5
# fstart: Frequency above which active power is reduced (Hz)
50.2
# b: Overfrequency active power reduction gain: fraction of initial P per pu frequency above fstart (50 Hz base) (pu/pu)
20.0
# fr: While filtered frequency >= fr the power reduction is held at its maximum; below fr it follows frequency again (Hz)
50.05
# Tr: Time the current output stays at zero after an LVRT trip before it is restored (at most 5 s takes effect) (s)
1.0
# Re: Resistance between the terminal bus and the controlled (converter side) voltage (pu)
0.0
# Xe: Reactance between the terminal bus and the controlled (converter side) voltage (pu)
0.05
# CM1: Reactive current injection mode 1: 1 enables the m and kRCI injection below dbmin, dip Iq limit Imax; 0 disables
1
# kRCI: Reactive current injection gain per pu voltage below dbmin (active if CM1, CM2 or CM3 is 1) (pu/pu)
2.0
# kRCA: Reactive current absorption gain per pu voltage above dbmax (active only if HVRT = 1) (pu/pu)
1.5
# m: Step reactive current injected below dbmin, as a multiple of IN (active if CM1, CM2 or CM3 is 1) (pu)
0.0
# n: Step reactive current absorbed above dbmax, as a multiple of IN (always active, independent of HVRT) (pu)
0.0
# dbmin: Lower edge of the voltage deadband on Vm; reactive injection below it (pu)
0.9
# dbmax: Upper edge of the voltage deadband on Vm; reactive absorption above it (pu)
1.1
# HVRT: 1 enables the kRCA absorption term above dbmax; 0 disables it (does not affect the Vmax trip)
1
# LVRT: 1 uses Vmin and Vint as LVRT curve breakpoints; 0 replaces both with 0.8 pu
1
# CM2: Reactive current injection mode 2: 1 enables m and kRCI injection and caps dip Iq at 0.707 Imax; 0 disables
0
# CM3: Reactive current injection mode 3: 1 enables m and kRCI injection, dip Iq limit sqrt(Imax^2 - Ipcmd^2) and a PI voltage term; 0 disables
0
# BM: Blocking mode: 1 zeroes the active current and drops the initial reactive current while Vm < 0.9 pu; 0 keeps both
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=k ixi_{xt} = k\, i_x, iyt=k iyi_{yt} = k\, i_y, where k=r Sbase/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+R id−ωmL iq,vmq=vqr+R iq+ωmL idv_{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=P∗−Pvirt−D(ω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 P∗P^* is the active power setpoint and PvirtP_{\mathrm{virt}} is the virtual power computed from the unsaturated currents:

Pvirt=vdr id∗+vqr iq∗P_{\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+R id∗−ωmL iq∗,0=vqr+R iq∗+ωmL id∗V_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+R ids∗−ωmL iqs∗,vmq=vqr+R iqs∗+ωmL ids∗v_{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 P∗P^*, 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:

Show the data record
INJEC GFOR HVDC A
# 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.
# R: Resistance of connection transformer (pu)
0.005
# L: Inductance of connection transformer (pu)
0.15
# r: Ratio of the ideal connection transformer (pu/pu)
1.02
# Snom: Nominal apparent power (MVA)
1100.
# H: Inertia constant (s)
5.0
# D: Damping constant of virtual synchronous machine
300.
# Tpll: Time constant of PLL (s)
0.100
# Rdroop: Droop of primary frequency control (pu)
999.
# Imax: Maximum current (typically 1–1.2) (pu)
1.0
# Te: Time constant of current saturation (s)
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=k ixi_{xt} = k\, i_x, k=r Sbase/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−ω~gL iq+(Kp+Kis)(idref−id)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=ω~gL id+(Kp+Kis)(iqref−iq)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+R id−ω~gL iq,vmq=vqr+R iq+ω~gL idv_{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⁡(Imax2−iq2,  0)I_d^{\max,\mathrm{stat}} = \sqrt{\max\left(I_{\mathrm{max}}^2 - i_q^2,\; 0\right)}

and Idmax⁡I_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=vqrid−vdriq(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 Idmax⁡I_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):

Show the data record
INJEC GFOL HVDC1 A
# 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.
# R: Phase reactor resistance (pu)
0.005
# L: Phase reactor inductance (pu)
0.15
# r: Ratio of the ideal connection transformer (pu/pu)
1.02
# Snom: Nominal apparent power (MVA)
1200.
# Rc: Resistance used in compensated voltage (pu)
0.005
# Xc: Reactance used in compensated voltage (pu)
0.15
# Kp: Current control: proportional gain
0.5730
# Ki: Current control: integral gain
6.
# Tlpf: Measurement time constant (low-pass filter) (s)
0.0033
# Kpp: Active power control: proportional gain
0.0333
# Kip: Active power control: integral gain
10.
# Trlim: Time constant of the I_d^max rate limiter (s)
0.002
# dPdt_min: Min rate of change of the d-current limit (pu/s)
-999.
# dPdt_max: Max rate of change of the d-current limit (pu/s)
10.
# Kpv: Reactive power control: proportional gain
0.1667
# Kiv: Reactive power control: integral gain
50.
# tau: Response time of PLL (s)
0.10
# Vpllb: Voltage below which the PLL is blocked (pu)
0.4
# Vpllu: Voltage above which the PLL is unblocked (pu)
0.5
# Imax: Maximum current (typically 1–1.2) (pu)
1.000
# Vs1: Voltage below which dynamic reactive support starts (pu)
-1000
# Vs2: Voltage below which reactive support is maximum and the V/Q PI is frozen (pu)
-2000
# iqmax: Limit (±) on quadrature current component i_q1 (pu)
1.001
# vqswitch: 1 = voltage control, 0 = reactive power control (flag)
1
;