Skip to content

Custom Governor Models

This page documents the custom turbine-governor (tor_) models in RAMSES. These models are implemented in Fortran using the legacy multi-subroutine API and cover a wide range of prime-mover types: thermal (steam), gas turbine, hydraulic, nuclear, and simplified equivalents.


The tor_constant model provides a constant mechanical torque source. The mechanical torque is fixed at its initialisation value and does not respond to speed deviations or load changes:

Tm(t)=Tm0tT_m(t) = T_{m0} \quad \forall t

The single algebraic state satisfies:

f(1)=x(1)Tm0=0f(1) = x(1) - T_{m0} = 0

The observable output is mechanical power:

Pm=TmωP_m = T_m \cdot \omega

Implementation details:

  • nbxvar = 1, nbzvar = 0, nbdata = 0
  • One additional parameter: prm(1) = Tm0 (set at initialisation from load-flow)
  • Observable: Pm = x(1) * omega
ParameterDescription
(none)No user-supplied parameters. Tm0T_{m0} is taken from the load-flow initialisation.
SYNC_MACH g6 g6 1. 1. 0. 0. 400. 360. 6. 0. 2.05
XT 0.15 2.2 0.3 0.2 2. 0.4 0.2 0.1 6.0257 0. 7.00 0.05 1.5 0.05
EXC GENERIC1 3.0618 -0.1 1. 0. 100. -1. -20.0 10. 120. 5. 12.5 0.1 0. 5.
1 75. 15. 0.22 0.012 0.22 0.012 -0.1 0.1
TOR CONSTANT ;

The tor_1storder model is a first-order speed governor with droop and a two-mass (HP/LP) turbine representation. It captures the primary frequency response through a proportional-droop speed controller with a first-order lag.

Speed controller with droop RR:

The mechanical torque setpoint is:

Tset=Tm0ω1RT_{set} = T_{m0} - \frac{\omega - 1}{R}

The HP torque tracks TsetT_{set} through a first-order lag with time constant T2T_2:

dx1dt=1T2(Tsetx1)\frac{d x_1}{dt} = \frac{1}{T_2}\left(T_{set} - x_1\right)

The LP (shaft) torque is a weighted combination:

x2=(1FHP)x1+FHPTsetx_2 = (1 - F_{HP}) \cdot x_1 + F_{HP} \cdot T_{set}

where FHPF_{HP} is the fraction of power generated in the HP stage.

From the Fortran equations:

f(1) = (-x(1) + (prm(4) - (omega-1.d0)/prm(3))) / prm(2)
f(2) = (1.d0-prm(1))*x(1) + prm(1)*(prm(4)-(omega-1.d0)/prm(3)) - x(2)

i.e.:

  • prm(1) = FHP (HP fraction), prm(2) = T2 (time constant), prm(3) = R (droop)
  • prm(4) = Tm0 (setpoint, set at init)

Implementation details:

  • nbxvar = 2, nbzvar = 0, nbdata = 3
  • State 1 = HP torque x(1), State 2 = LP torque x(2)
  • Observables: HP torque, LP torque
ParameterDescription
FHPFraction of torque produced by the HP turbine stage (0–1)
T2Governor/HP turbine time constant (s)
RSpeed droop (pu/pu)
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR 1STORDER 0.30 0.50 0.05 ; ! FHP T2 R

The tor_thermal_generic1 model is a generic multi-stage steam turbine governor, suitable for both single-shaft and cross-compound units. It includes a speed controller with rate-limiting, a three-section steam chest/reheater, and separate HP, MP, and LP turbine stages.

Speed governor:

A speed measurement with time constant TmesT_{mes} feeds a droop-based error:

egov=P0Pmeasσ+(1ω)e_{gov} = P_0 - P_{meas} \cdot \sigma + (1 - \omega)

where σ\sigma is the droop coefficient.

The gate/valve demand is computed by an integrator with rate limits [zdotmin,zdotmax][zdot_{min},\, zdot_{max}] and position limits [zmin,zmax][z_{min},\, z_{max}], filtered through a servo time constant TsmT_{sm}.

Turbine power stages:

The steam chest dynamics drive three stages with power fractions FhpF_{hp}, FmpF_{mp}, (1FhpFmp)(1-F_{hp}-F_{mp}):

dTmHPdt=1Thp(FhpzTmHP)\frac{d T_{mHP}}{dt} = \frac{1}{T_{hp}}(F_{hp} \cdot z - T_{mHP}) dTmMPdt=1Tr(FmpTmHP/FhpTmMP)\frac{d T_{mMP}}{dt} = \frac{1}{T_r}(F_{mp} \cdot T_{mHP}/F_{hp} - T_{mMP}) dTmLPdt=1Tlp((1FhpFmp)TmMP/FmpTmLP)\frac{d T_{mLP}}{dt} = \frac{1}{T_{lp}}((1-F_{hp}-F_{mp}) \cdot T_{mMP}/F_{mp} - T_{mLP})

Total mechanical power:

Pm=TmHP+TmMP+TmLPP_m = T_{mHP} + T_{mMP} + T_{mLP}

Parameters from Fortran associate block:

ParameterIndexDescription
sigma1Speed droop (pu/pu)
Tmes2Speed measurement time constant (s)
Tsm3Servo/gate time constant (s)
zdotmin4Minimum gate rate (pu/s) — also additional parameter
zdotmax5Maximum gate rate (pu/s)
zmin6Minimum gate opening (pu)
zmax7Maximum gate opening (pu)
Thp8HP turbine time constant (s)
Fhp9HP power fraction
Tr10Reheater / MP time constant (s)
Fmp11MP power fraction
Tlp12LP turbine time constant (s)

Implementation details:

  • nbxvar = 10, nbzvar = 2, nbdata = 12, nbaddpar = 2
  • Additional: prm(13) = P0 (initial power), prm(14) = ivo (initial valve opening)
  • Observables: z, PmHP, PmMP, PmLP, Pm
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR THERMAL_GENERIC1 0.05 0.02 0.20 -0.10 0.10 0.0 1.05 0.30 0.30 7.0 0.40 0.50 ;
! sigma Tmes Tsm zdotmin zdotmax zmin zmax Thp Fhp Tr Fmp Tlp

The tor_hydro_generic1 model is a generic hydraulic turbine governor with a penstock (water column) and PI controller. It implements the standard hydraulic governor structure following IEEE Std 1110 conventions.

PI speed governor:

The speed error with droop σ\sigma:

e=(P0Pmeas)σ+(1ω)e = (P_0 - P_{meas}) \cdot \sigma + (1 - \omega)

A PI controller with gains KPK_P and KIK_I drives the gate demand:

x˙I=KIe\dot{x}_{I} = K_I \cdot e zdemand=KPe+xIz_{demand} = K_P \cdot e + x_I

The gate is rate-limited by LIMz˙LIM_{\dot{z}} and position-limited by [0,1][0, 1], with a servo time constant TsmT_{sm}.

Water column (penstock):

The flow QQ and head HH are related by the water-starting time TWT_W:

TWdQdt=H1T_W \cdot \frac{dQ}{dt} = H - 1

The head is:

H=(Qv+Tm(1Qv)z)2H = \left(\frac{Q_{v} + T_m (1 - Q_v)}{z}\right)^2

where QvQ_v is the no-load flow fraction.

Turbine mechanical torque:

Tm=H(QQvH)T_m = \sqrt{H} \cdot (Q - Q_v \cdot \sqrt{H}) Pm=TmωP_m = T_m \cdot \omega

Parameters from Fortran associate block:

ParameterIndexDescription
SIGMA1Speed droop (pu/pu)
Tmes2Speed measurement time constant (s)
Qv3No-load water flow fraction (pu)
KP4PI proportional gain
KI5PI integral gain
TSM6Gate servo time constant (s)
LIMZDOT7Gate velocity limit (pu/s)
TW8Water starting time (s)

Implementation details:

  • nbxvar = 6, nbzvar = 2, nbdata = 8, nbaddpar = 1
  • Additional: prm(9) = P0 (initial electrical power)
  • Observables: z, Q, H, Pm
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR HYDRO_GENERIC1 0.04 2.0 0. 2.00 0.40 0.2 0.1 1.0 ;
! SIGMA TP Qv KP KI TSM LIMZDOT TW

The tor_gasturbm model is a gas turbine governor following a multi-stage combustion model. It captures the compressor, fuel system, combustion chamber delay, and turbine torque characteristic. The name suffix m indicates a modified version.

Speed governor:

The governor error drives a PI controller producing a fuel demand signal. The speed governor uses:

egov=(ωrefω)/TDSPSTATPelece_{gov} = (\omega_{ref} - \omega) / TDSP - STAT \cdot P_{elec}

with saturation limits [MIN,MAX][MIN,\, MAX].

Fuel system and combustion:

The fuel valve position g1 is driven through:

  • A speed governor with gain ZZZZ and lead–lag time constants determined by XXXX, YYYY
  • A fuel flow path through first-order lag TVALVETVALVE
  • Combustion chamber lag TGAZTGAZ

Turbine output:

The turbine mechanical power follows:

Pm=BF2gcomb+AF2P_m = BF2 \cdot g_{comb} + AF2

where gcombg_{comb} is the combustion output through lag TCDTCD.

Additional thermodynamic correction terms involve TFTF (flame lag) and ECRECR (exhaust correction ratio).

Parameters from Fortran source (prm array):

IndexNameDescription
1TDSPSpeed droop time constant (s)
2STATSteady-state gain
3ZZGovernor proportional gain
4XXLead numerator factor
5YYLag denominator factor
6SACCAcceleration constant
7MINMinimum fuel valve position (pu)
8MAXMaximum fuel valve position (pu)
9TVALVEFuel valve time constant (s)
10TGAZCombustion chamber time constant (s)
11TFFlame lag time constant (s)
12ECRExhaust correction ratio
13TCDCompressor discharge time constant (s)
14BF2Turbine power output slope
15AF2Turbine power output intercept (pu)

Implementation details:

  • nbxvar = 10, nbzvar = 4, nbdata = 15, nbaddpar = 1
  • Additional: prm(16) = SETPOINT (initialised from load-flow power)
  • Observables: g2, x4, g1
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR GASTURBM 0.05 1.0 25.0 0.50 1.0 1.0 0.0 1.0 0.05 0.40 0.01 0.0 0.20 1.0 0.0 ;
! TDSP STAT ZZ XX YY SACC MIN MAX TVALVE TGAZ TF ECR TCD BF2 AF2

The tor_govclasm model is a classical thermal governor with a composite control law including deadband, droop, integral control, and combustion dynamics. The name stands for “governor classical model”.

Speed governor with deadband and droop:

The speed error passes through a deadband [DBON,DEADB][DBON, DEADB] before entering a proportional–integral controller. The integral path has saturation at MAXINTMAXINT and gain ALPHAALPHA. The reset time TRESTRES determines the integration rate.

Valve and combustion dynamics:

The valve demand passes through:

  1. A governor with static gain V0V0 and fuel-flow limit VFNVFN
  2. A first-order lag TFVTFV (valve actuator)
  3. A rate limiter [PVARMIN,PVARMAX][PVARMIN,\, PVARMAX] (with gain GPVARGPVAR) representing fuel response
  4. A combustion/steam chest lag KCRKCR, TCRTCR producing fuel flow
  5. Lower bound: MINFUELMINFUEL
  6. Transport delay TDELAYTDELAY (approximated)
  7. Turbine output through lag TCHTCH with limits [PMIN,PMAX][PMIN,\, PMAX]

Parameters from Fortran source (prm array):

IndexNameDescription
1STATGovernor static characteristic selector
2DEADBDeadband half-width (pu)
3DBONDeadband onset (pu)
4TSMSpeed measurement / filter time constant (s)
5V0Governor voltage reference (pu)
6VFNFuel-flow nominal (pu)
7TFVValve actuator time constant (s)
8VFRFuel flow rate limit (pu/s)
9MAXINTMaximum integral output (pu)
10ALPHAIntegral controller gain
11TRESIntegral reset time (s)
12GOMPGovernor proportional gain
13PVARMAXMaximum power variation rate (pu)
14PVARMINMinimum power variation rate (pu)
15GPVARPower variation gain
16KCRCombustion gain
17TCRCombustion time constant (s)
18MINFUELMinimum fuel flow (pu)
19TDELAYCombustion transport delay (s)
20PMAXMaximum turbine output (pu)
21TCHSteam chest / turbine lag (s)
22PMINMinimum turbine output (pu)

Implementation details:

  • nbxvar = 6, nbzvar = 10, nbdata = 22, nbaddpar = 1
  • Additional: prm(23) = P0 (initialised from load-flow power)
  • Observables: x2, b3, b4
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR GOVCLASM 1.0 0.003 0.001 0.10 1.0 1.0 0.30 0.5 1.0 1.0 5.0 25.0 0.10 -0.10 0.05 1.0 0.20 0.05 0.30 1.05 0.30 0.05 ;
! STAT DEADB DBON TSM V0 VFN TFV VFR MAXINT ALPHA TRES GOMP PVARMAX PVARMIN GPVAR KCR TCR MINFUEL TDELAY PMAX TCH PMIN

The tor_govhydr model is a simplified hydraulic governor with PI control and a non-linear penstock. It differs from tor_hydro_generic1 in its simplified turbine characteristic and simpler water-column formulation.

PI governor:

x˙2=KIe,x2[0,1]\dot{x}_2 = K_I \cdot e, \quad x_2 \in [0, 1] zdemand=KPe+x2z_{demand} = K_P \cdot e + x_2

where the speed error e=P0/ωTmωSTAT+e = P_0/\omega - T_m - \omega \cdot STAT + \ldots accounts for the droop and steady-state bias.

Penstock (two-lag water column):

TCE1dx3dt=Px3(1+TCE2/TCE1)T_{CE1} \cdot \frac{dx_3}{dt} = P - x_3(1 + T_{CE2}/T_{CE1})

The turbine mechanical power is computed via an empirical quadratic:

Pm=1.35z0.7z2P_m = 1.35 \cdot z - 0.7 z^2

derived from the non-linear head-flow curve approximated at initialisation.

Parameters from Fortran source:

IndexNameDescription
1STATSteady-state gain selector
2KPProportional gain
3KIIntegral gain
4TCGovernor/servo time constant (s)
5V0Reference voltage (pu)
6VFFlow gain
7TCE2Second penstock time constant (s)
8TCE1First penstock time constant (s)

Implementation details:

  • nbxvar = 4, nbzvar = 4, nbdata = 8, nbaddpar = 1
  • Additional: prm(9) = P0 (initialised from load-flow power)
  • No observables defined (nbobs = 0)
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR GOVHYDR 1.0 2.0 0.5 0.10 1.0 1.0 1.0 5.0 ;
! STAT KP KI TC V0 VF TCE2 TCE1

The tor_govnuc model is a nuclear plant governor with deadband, droop, integral control, and a non-linear turbine characteristic via GOMP (the gain of the output multiplier). It is structurally similar to tor_govclasm but tailored for the slower, tightly-regulated dynamics of nuclear steam supply systems.

Speed governor:

The speed error passes through a deadband [DBON,DEADB][DBON, DEADB]:

e=deadband(ωrefω)STAT(PP0)e = \text{deadband}(\omega_{ref} - \omega) - STAT \cdot (P - P_0)

The error enters an integrator with rate limits [GRADMIN,GRADMAX][GRADMIN, GRADMAX] (pu/s) filtered through a ramp time TGRADTGRAD. The integrator output xIx_I passes through a servo TSMTSM.

Turbine characteristic with GOMP:

The turbine output is non-linearly mapped through a gain GOMPGOMP:

Pm=min ⁣(xIGOMP,1)f(xI)P_m = \min\!\left(\frac{x_I}{GOMP},\, 1\right) \cdot f(x_I)

where the limiter prevents over-power and ff is a piecewise-linear characteristic.

The fuel valve dynamics use time constants TFVTFV (valve), V0V0 (reference), and VFRVFR (flow rate), then go through lag TRESTRES (reset) and GOMPGOMP to produce the final torque.

Parameters from Fortran source:

IndexNameDescription
1STATGovernor static characteristic selector
2DEADBDeadband half-width (pu)
3DBONDeadband onset (pu)
4GRADMAXMaximum load gradient (pu/s)
5GRADMINMinimum load gradient / unloading rate (pu/s)
6TGRADRamp filter time constant (s)
7TSMServo time constant (s)
8V0Governor reference (pu)
9VFNNominal valve position (pu)
10TFVValve actuator time constant (s)
11VFRValve rate limit (pu/s)
12ALPHAIntegral gain
13TRESReset time constant (s)
14GOMPOutput power gain

Implementation details:

  • nbxvar = 4, nbzvar = 8, nbdata = 14, nbaddpar = 1
  • Additional: prm(15) = P0 (initialised from load-flow power)
  • Observable: TM
SYNC_MACH g1 g1 1. 1. 0. 0. 800. 760. 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.8991 -0.1 0. 1. 100. -1. -11 10. 70. 10. 20. 0.1 0. 4.
1 75. 15. 0.2 0.01 0.2 0.01 -0.1 0.1
TOR GOVNUC 1.0 0.005 0.002 0.02 -0.02 10.0 5.0 1.0 1.0 0.50 0.10 1.0 20.0 1.0 ;
! STAT DEADB DBON GRADMAX GRADMIN TGRAD TSM V0 VFN TFV VFR ALPHA TRES GOMP