Skip to content

Custom Exciter Models

This page documents the custom excitation system models available in RAMSES. These models range from a trivial constant-voltage source to full-featured AVR with PSS and OEL. Models without a .txt definition file are implemented directly in Fortran and are described from their source headers.


The exc_constant model provides a constant field voltage source. The field voltage VfV_f is fixed at its load-flow initialisation value and does not respond to any input:

Vf(t)=Vf0tV_f(t) = V_{f0} \quad \forall t

The single algebraic state satisfies:

f(1)=x(1)Vf0=0f(1) = x(1) - V_{f0} = 0

This model is useful for open-loop tests, for machines that are not equipped with a voltage regulator, or as a placeholder during model development.

Implementation details (from Fortran source):

  • nbxvar = 1, nbzvar = 0, nbdata = 0
  • One additional parameter: prm(1) = Vf0 (set at initialisation from the load-flow field voltage)
  • Observables: vf, if
ParameterDescription
(none)No user-supplied data parameters. The field voltage is taken from the initialisation (load-flow) value automatically.
SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC CONSTANT
TOR CONSTANT ;

The exc_1storder model is a first-order automatic voltage regulator (AVR). It represents the simplest dynamic exciter: a proportional gain KAK_A acting on the terminal voltage error, filtered through a single first-order lag TAT_A, with output limits.

The AVR computes the voltage error and drives the field voltage:

dVfdt=1TA[KA(VrefV)Vf],Vf[Vf,min,Vf,max]\frac{d V_f}{dt} = \frac{1}{T_A}\left[K_A\left(V_{ref} - V\right) - V_f\right], \quad V_f \in [V_{f,min},\, V_{f,max}]

The reference voltage VrefV_{ref} is initialised from:

Vref=V0+Vf0KAV_{ref} = V_0 + \frac{V_{f0}}{K_A}

Implementation details (from Fortran source):

  • nbxvar = 1, nbzvar = 1, nbdata = 4
  • Parameters: prm(1) = KA, prm(2) = TA, prm(3) = Vfmin, prm(4) = Vfmax
  • Additional parameter: prm(5) = V0 (voltage setpoint, computed at initialisation)
  • The ODE in the continuous mode is:
f(1)=Vf+KA(VrefV)TAf(1) = \frac{-V_f + K_A(V_{ref} - V)}{T_A}
  • With anti-windup: if the limiter is active, f(1) = Vf - Vfmin (or Vfmax).
ParameterDescription
KAAVR gain (pu/pu)
TAAVR time constant (s)
VfminMinimum field voltage (pu)
VfmaxMaximum field voltage (pu)
SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC 1storder 200.0 0.05 0.0 6.0
! KA TA Vfmin Vfmax
TOR CONSTANT ;

The exc_kundur model implements the excitation system from Kundur’s textbook (Power System Stability and Control, 1994). It includes a first-order voltage transducer, a proportional AVR with transient gain reduction (TGR), and a two-stage PSS acting on rotor speed deviation.

Voltage transducer:

dVfildt=1TR(VVfil)\frac{d V_{fil}}{dt} = \frac{1}{T_R}(V - V_{fil})

AVR with transient gain reduction (lead–lag):

Vf(s)=KA1+sTA1+sTB(VrefVfil+Vs)V_f(s) = K_A \cdot \frac{1 + s T_A}{1 + s T_B} \cdot \left(V_{ref} - V_{fil} + V_s\right)

where Vref=V+Vf/KAV_{ref} = V + V_f / K_A is computed at initialisation and VsV_s is the PSS output.

PSS (two-stage lead–lag with washout):

xwash(s)=KSTABsTW1+sTWω(s)x_{wash}(s) = \frac{K_{STAB} \cdot s T_W}{1 + s T_W} \cdot \omega(s) Vs(s)=1+sT11+sT21+sT31+sT4xwash(s)V_s(s) = \frac{1 + s T_1}{1 + s T_2} \cdot \frac{1 + s T_3}{1 + s T_4} \cdot x_{wash}(s)

This is the standard two-stage phase-compensating PSS structure. The CODEGEN blocks in the .txt file are:

BlockCODEGEN typeFunction
Voltage filtertf1p1/(1+sTR)1/(1+sT_R)
Main summing junctionalgeqVrefVfil+VsdvV_{ref} - V_{fil} + V_s - dv
AVR (TGR)tf1p1zKA(1+sTA)/(1+sTB)K_A(1+sT_A)/(1+sT_B)
PSS washouttfder1pKSTABsTW/(1+sTW)K_{STAB} \cdot sT_W/(1+sT_W)
PSS lead–lag 1tf1p1z(1+sT1)/(1+sT2)(1+sT_1)/(1+sT_2)
PSS lead–lag 2tf1p1z(1+sT3)/(1+sT4)(1+sT_3)/(1+sT_4)
ParameterDescription
TRVoltage measurement filter time constant (s)
KAAVR gain (pu/pu)
TATGR lead time constant (s)
TBTGR lag time constant (s)
KSTABPSS gain
TWPSS washout time constant (s)
T1PSS first lead–lag zero time constant (s)
T2PSS first lead–lag pole time constant (s)
T3PSS second lead–lag zero time constant (s)
T4PSS second lead–lag pole time constant (s)

Computed at initialisation: Vref = V + Vf / KA

SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC kundur 0.02 200.0 0.02 10.0 9.5 1.41 0.154 0.033 0.154 0.033
! TR KA TA TB KSTAB TW T1 T2 T3 T4
TOR CONSTANT ;

The exc_generic1 model is a generic AVR with OEL (Over-Excitation Limiter) and PSS, implemented in Fortran. It includes a proportional–integral AVR, a PSS acting on rotor speed or active power, and an inverse-time OEL.

AVR:

The excitation system uses a first-order integrating controller (washout or PI-type, set by the gain GG and time constants TAT_A, TBT_B) with output limits [L3,L4][L_3,\, L_4]:

Vf(s)=G1+sTA1+sTB(VrefV)11+sTEV_f(s) = G \cdot \frac{1 + s T_A}{1 + s T_B} \cdot \left(V_{ref} - V\right) \cdot \frac{1}{1 + s T_E}

PSS (speed or power input, selectable):

Input signal is selected by SPEEDIN: 1 = rotor speed ω\omega, 0 = electrical power PP.

VPSS(s)=KPSSsTW1+sTW1+sT11+sT21+sT31+sT4u(s)V_{PSS}(s) = K_{PSS} \cdot \frac{s T_W}{1 + s T_W} \cdot \frac{1 + s T_1}{1 + s T_2} \cdot \frac{1 + s T_3}{1 + s T_4} \cdot u(s)

Output is clamped to [DVMIN,DVMAX][DV_{MIN},\, DV_{MAX}].

OEL (inverse-time limiter):

The OEL monitors field current IfI_f. When If>IFLIMI_f > IFLIM, a timer begins accumulating via:

  • Dead zone dd and phase ff parameters control OEL activation thresholds.
  • The OEL integrates the overcurrent error and reduces VrefV_{ref} once the timer reaches threshold L1L_1, with output range [L1,L2][L_1, L_2].

Parameters from Fortran source (prm array):

IndexNameDescription
1IFLIMField current OEL threshold (pu)
2dOEL dead zone (pu)
3fOEL phase characteristic
4SAVR setpoint input (usually 0 = VV)
5K1AVR lead numerator gain
6K2AVR lag denominator gain
7L1OEL integrator lower limit (pu)
8L2OEL integrator upper limit (pu)
9GAVR overall gain
10TAAVR lead time constant (s)
11TBAVR lag time constant (s)
12TEExciter time constant (s)
13L3AVR output lower limit (pu)
14L4AVR output upper limit (pu)
15SPEEDINPSS input signal: 1 = speed, 0 = power
16KPSSPSS gain
17TwPSS washout time constant (s)
18T1PSS lead–lag 1 zero (s)
19T2PSS lead–lag 1 pole (s)
20T3PSS lead–lag 2 zero (s)
21T4PSS lead–lag 2 pole (s)
22DVMINPSS output lower limit (pu)
23DVMAXPSS output upper limit (pu)
SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC GENERIC1 1.05 -0.1 0.5 0.0 1.0 1.0 0.0 0.5 200.0 0.02 0.10 0.05 0.0 6.0
! IFLIM d f S K1 K2 L1 L2 G TA TB TE L3 L4
1 9.5 1.40 0.15 0.03 0.15 0.03 -0.10 0.10
! SPEEDIN KPSS Tw T1 T2 T3 T4 DVMIN DVMAX
TOR CONSTANT ;

The exc_generic2 model is a more detailed generic AVR (formerly known as exc_generic3 internally), developed and validated with Hydro-Québec data. It includes a voltage compensator, a combined PI–proportional regulator, an AC exciter with saturation, a PSS, and an OEL.

Voltage measurement with line-drop compensation:

Vc=V+XcIqRcId(or simplified)V_c = V + X_c \cdot I_q - R_c \cdot I_d \quad (\text{or simplified})

PI–proportional AVR with transient gain reduction:

VAVR(s)=(KP+KIs+C1+sTC1+sTB)KA11+sTA(VrefVc)V_{AVR}(s) = \left(K_P + \frac{K_I}{s} + C \cdot \frac{1 + s T_C}{1 + s T_B}\right) \cdot K_A \cdot \frac{1}{1 + s T_A}(V_{ref} - V_c)

AC exciter with saturation:

dVEdt=1TE[VRKEVESE(VE)]\frac{d V_E}{dt} = \frac{1}{T_E}\left[V_R - K_E \cdot V_E - S_E(V_E)\right]

where SE(VE)S_E(V_E) is the piecewise-linear saturation function defined by (E1,SE1)(E_1, S_{E1}) and (E2,SE2)(E_2, S_{E2}).

PSS (type selectable by typss):

Vs(s)=KPSSsTW1+sTW1+sT11+sT21+sT31+sT4u(s)V_s(s) = K_{PSS} \cdot \frac{s T_W}{1 + s T_W} \cdot \frac{1 + s T_1}{1 + s T_2} \cdot \frac{1 + s T_3}{1 + s T_4} \cdot u(s)

OEL (inverse-time, three-segment):

The OEL uses a three-level piecewise-linear characteristic (s1,Toel1)(s_1, T_{oel1}), (s2,Toel2)(s_2, T_{oel2}), (s3,Toel3)(s_3, T_{oel3}) to compute the allowable overcurrent time.

Parameters from Fortran associate block (39 data parameters + 4 additional):

IndexNameDescription
1XcLine-drop compensation reactance (pu)
2TrVoltage measurement time constant (s)
3CTGR numerator gain
4TcTGR lead time constant (s)
5TbTGR lag time constant (s)
6KaAVR proportional gain
7TaAVR time constant (s)
8KiAVR integral gain
9KpAVR proportional path gain
10VrmaxDRegulator max (dynamic, pu)
11VrminDRegulator min (dynamic, pu)
12GExciter overall gain
13KeExciter self-excitation coefficient
14TeExciter time constant (s)
15E1Saturation breakpoint 1 (pu)
16SeE1Saturation factor at E1E_1
17E2Saturation breakpoint 2 (pu)
18SeE2Saturation factor at E2E_2
19VrmaxField voltage upper limit (pu)
20VrminField voltage lower limit (pu)
21typssPSS input type (1 = speed, 2 = power)
22WPSS input gain
23TfPSS derivative filter time constant (s)
24KpssPSS gain
25TwPSS washout time constant (s)
26T1PSS lead–lag 1 zero (s)
27T2PSS lead–lag 1 pole (s)
28T3PSS lead–lag 2 zero (s)
29T4PSS lead–lag 2 pole (s)
30LimPSS output symmetric limit (pu)
31LimSupPSS upper asymmetric limit (pu)
32s1OEL segment 1 (pu IfI_f)
33toel1OEL time at segment 1 (s)
34s2OEL segment 2 (pu IfI_f)
35toel2OEL time at segment 2 (s)
36s3OEL segment 3 (pu IfI_f)
37toel3OEL time at segment 3 (s)
38permOEL permanent current limit (pu)
39LimInfPSS lower asymmetric limit (pu)
SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC generic2 0.0 0.02 1.0 0.10 1.00 200.0 0.05 5.0 1.0 6.0 -6.0 1.0 0.0 0.50
! Xc Tr C Tc Tb Ka Ta Ki Kp VrmaxD VrminD G Ke Te
3.10 0.066 4.18 0.91 6.0 -6.0 1.0 1.0 0.05 9.5 1.40 0.154 0.033 0.154 0.033
! E1 SeE1 E2 SeE2 Vrmax Vrmin typss W Tf Kpss Tw T1 T2 T3 T4
0.10 0.10 1.1 200. 1.2 60. 1.5 10. 1.05 -0.10
! Lim LimSup s1 toel1 s2 toel2 s3 toel3 perm LimInf
TOR CONSTANT ;

The exc_GENERIC3 model (note capital letters) is a generic AVR with integrated PSS and OEL, defined via the CODEGEN .txt description. It provides a clean, modular three-block structure: AVR, PSS, and OEL.

AVR (transient gain reduction + exciter):

ΔV=V0V+VPSSVOEL\Delta V = V_0 - V + V_{PSS} - V_{OEL} V1(s)=G1+sTa1+sTbΔV(s)V_1(s) = G \cdot \frac{1 + s T_a}{1 + s T_b} \cdot \Delta V(s) Vf(s)=11+sTeV1(s),Vf[Vf,min,Vf,max]V_f(s) = \frac{1}{1 + s T_e} \cdot V_1(s), \quad V_f \in [V_{f,min},\, V_{f,max}]

where V0=V+Vf/GV_0 = V + V_f/G is computed at initialisation.

PSS (washout + two lead–lag stages):

VPSS(s)=KPSSsTW1+sTW1+sT11+sT21+sT31+sT4ω(s)V_{PSS}(s) = \frac{K_{PSS} \cdot s T_W}{1 + s T_W} \cdot \frac{1 + s T_1}{1 + s T_2} \cdot \frac{1 + s T_3}{1 + s T_4} \cdot \omega(s)

Output is limited to [C,+C][-C,\, +C].

OEL (inverse-time integrator):

xoel1=Ifif1limx_{oel1} = I_f - if_{1lim} dxoel2dt=1Toelmin(xoel1,if2lim),xoel2[L1,L2]\frac{d x_{oel2}}{dt} = \frac{1}{T_{oel}} \cdot \min(x_{oel1},\, if_{2lim}), \quad x_{oel2} \in [L_1,\, L_2] VOEL=clip(Koelxoel2,0,L3)V_{OEL} = \text{clip}(K_{oel} \cdot x_{oel2},\, 0,\, L_3)

The CODEGEN block structure from the .txt file:

BlockCODEGEN typeSignal
AVR summing junctionalgeqV0V+dvPSSdvOELΔVV_0 - V + dv_{PSS} - dv_{OEL} - \Delta V
Transient gain reductiontf1p1zG(1+sTa)/(1+sTb)G(1+sT_a)/(1+sT_b)
Excitertf1plim1/(1+sTe)1/(1+sT_e) with [Vf,min,Vf,max][V_{f,min}, V_{f,max}]
PSS washouttfder1pKPSSsTW/(1+sTW)K_{PSS} \cdot sT_W / (1+sT_W)
PSS lead–lag 1tf1p1z(1+sT1)/(1+sT2)(1+sT_1)/(1+sT_2)
PSS lead–lag 2tf1p1z(1+sT3)/(1+sT4)(1+sT_3)/(1+sT_4)
PSS limiterlim[C,+C][-C, +C]
OEL erroralgeqIfif1limI_f - if_{1lim}
OEL upper boundmin1v1cmin(,if2lim)\min(\cdot,\, if_{2lim})
OEL integratorinlim1/Toel1/T_{oel} with [L1,L2][L_1, L_2]
OEL multiplieralgeqKoelxoel2K_{oel} \cdot x_{oel2}
OEL output limiterlim[0,L3][0, L_3]
ParameterDescription
GAVR gain (pu/pu)
TaAVR lead time constant / TGR zero (s)
TbAVR lag time constant / TGR pole (s)
TeExciter time constant (s)
vfminMinimum field voltage (pu)
vfmaxMaximum field voltage (pu)
KpssPSS gain
TwPSS washout time constant (s)
T1PSS first lead–lag zero (s)
T2PSS first lead–lag pole (s)
T3PSS second lead–lag zero (s)
T4PSS second lead–lag pole (s)
CPSS output symmetric limit (pu)
if1limOEL field current threshold (pu)
if2limOEL maximum overcurrent error (pu)
ToelOEL integrator time constant (s)
KoelOEL output gain
L1OEL integrator lower limit
L2OEL integrator upper limit
L3OEL output upper limit (pu)

Computed at initialisation: Vo = V + Vf / G

SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC GENERIC3 200.0 0.05 10.0 0.04 0.0 5.0
! G Ta Tb Te vfmin vfmax
9.5 1.40 0.154 0.033 0.154 0.033 0.10
! Kpss Tw T1 T2 T3 T4 C
1.05 0.30 30.0 1.0 0.0 1.0 2.0
! if1lim if2lim Toel Koel L1 L2 L3
TOR CONSTANT ;

The exc_GENERIC4 model is a compiled version of exc_GENERIC3, implemented directly in Fortran using the new-style RAMSES API (single subroutine with mode selector). The mathematical structure is identical to exc_GENERIC3:

Vf(s)=11+sTeG1+sTa1+sTb(V0V+VPSSVOEL)V_f(s) = \frac{1}{1 + s T_e} \cdot G \cdot \frac{1 + s T_a}{1 + s T_b} \cdot \left(V_0 - V + V_{PSS} - V_{OEL}\right) VPSS(s)=KPSSsTW1+sTW1+sT11+sT21+sT31+sT4ω(s)V_{PSS}(s) = K_{PSS} \cdot \frac{s T_W}{1 + s T_W} \cdot \frac{1 + s T_1}{1 + s T_2} \cdot \frac{1 + s T_3}{1 + s T_4} \cdot \omega(s)

The OEL integrates the overcurrent error (Ifif1lim)(I_f - if_{1lim}), capped at if2limif_{2lim}, then multiplies by KoelK_{oel} to produce VOELV_{OEL}.

Implementation details (from Fortran source):

  • nbdata = 20, nbaddpar = 1 (Vo computed at init), nbxvar = 16, nbzvar = 5
  • The advantage over exc_GENERIC3 is performance: all equations are compiled, not interpreted.
ParameterDescription
GAVR gain
TaLead time constant (s)
TbLag time constant (s)
TeExciter time constant (s)
vfminField voltage lower limit (pu)
vfmaxField voltage upper limit (pu)
KpssPSS gain
TwPSS washout time constant (s)
T1PSS lead–lag 1 zero (s)
T2PSS lead–lag 1 pole (s)
T3PSS lead–lag 2 zero (s)
T4PSS lead–lag 2 pole (s)
CPSS output symmetric limit (pu)
if1limOEL threshold (pu)
if2limOEL max overcurrent (pu)
ToelOEL time constant (s)
KoelOEL gain
L1OEL lower limit
L2OEL upper limit
L3OEL output limit (pu)
SYNC_MACH GEN1 BUS1 1. 1. 0. 0. 600. 570. 3. 0. 0.95
XT 0.15 1.1 0.25 0.2 0.7 * 0.2 0.1 6.0257 0. 5.00 0.05 * 0.1
EXC GENERIC4 200.0 0.05 10.0 0.04 0.0 5.0
! G Ta Tb Te vfmin vfmax
9.5 1.40 0.154 0.033 0.154 0.033 0.10
! Kpss Tw T1 T2 T3 T4 C
1.05 0.30 30.0 1.0 0.0 1.0 2.0
! if1lim if2lim Toel Koel L1 L2 L3
TOR CONSTANT ;