pydynamicestimator.devices.governor
Attributes
Classes
Abstract base class for turbine-governor models (pluggable strategy). |
|
TGOV1 turbine-governor model as presented in Power System Dynamics and |
|
Pure speed-droop governor with the mechanical power 'pm' declared as a |
Module Contents
- class pydynamicestimator.devices.governor.Governor[source]
Bases:
abc.ABCAbstract base class for turbine-governor models (pluggable strategy).
Every governor must expose ‘pm’ – the mechanical-power coupling variable consumed by the synchronous machine’s swing equation. ‘pm’ may be declared either as a differential
state(when the turbine has lag dynamics, e.g. TGOV1) or as a device-privatealgeb(when mechanical power is an instantaneous / algebraic function of the inputs, e.g. a pure-droop or constant-power model). The host resolves ‘pm’ wherever it lives viaSynchronous.var_sym– the swing equation is agnostic to the choice.Symmetric to
AVR: the governor does NOT own state arrays or DAE indices. It declares what states, private algebraics, parameters, noise values, etc. it needs, and the host Synchronous machine registers them on itself. It reads the machine’s absolute per-unit speed viahost.omega(1.0 at synchronism, NOT the deviation) and its setpoint viahost.Pref.- abstract states() List[str][source]
Return ordered list of differential-state names.
- Return type:
List[str]
- algebs() List[str][source]
Return ordered list of device-private algebraic variable names.
Default empty: most governors have turbine lag dynamics whose output ‘pm’ is a state. A governor whose mechanical power is an instantaneous function of its inputs returns [‘pm’] here instead of listing it in
states(), and writes its defining residual0 = -pm + <expr>intodae.ginfgcall().- Return type:
List[str]
- algebs_units() Dict[str, str][source]
Units for each private algebraic (mirrors
units()).- Return type:
Dict[str, str]
- algebs_noise() Dict[str, float][source]
Relative process-noise weight for each private algebraic.
- Return type:
Dict[str, float]
- algebs_x0() Dict[str, float][source]
Initial guess for each private algebraic (Newton guess in finit).
- Return type:
Dict[str, float]
- abstract units() List[str][source]
Return units for each state, same length as states().
- Return type:
List[str]
- abstract params() Dict[str, float][source]
Return dict of parameter names -> default values.
- Return type:
Dict[str, float]
- abstract states_noise() Dict[str, float][source]
Return noise specification for each state.
- Return type:
Dict[str, float]
- abstract states_init_error() Dict[str, float][source]
Return initial error for each state.
- Return type:
Dict[str, float]
- abstract x0() Dict[str, float][source]
Return default initial guess for each state.
- Return type:
Dict[str, float]
- abstract descriptions() Dict[str, str][source]
Return descriptions for states and params.
- Return type:
Dict[str, str]
- abstract setpoints() Dict[str, float][source]
Return setpoint names -> defaults (e.g., Pref).
- Return type:
Dict[str, float]
- abstract fgcall(host, dae: pydynamicestimator.system.Dae) None[source]
Write the governor’s differential equations into
dae.fand, if it declares private algebraics, their defining residuals intodae.g.- Parameters:
host – The Synchronous machine instance. Access state/algebraic indices via host.psv, host.pm, etc., parameters via host.Rd, host.Tch, …, the absolute per-unit speed via host.omega and the setpoint via host.Pref.
dae (pydynamicestimator.system.Dae) – The DAE system object.
- Return type:
None
- class pydynamicestimator.devices.governor.TGOV1[source]
Bases:
GovernorTGOV1 turbine-governor model as presented in Power System Dynamics and Stability by P.W. Sauer and M.A. Pai, 2006. (page 100)
States: psv (steam valve position), pm (mechanical power). ‘pm’ is the coupling output to the swing equation. This is the framework default.
The droop acts on the speed deviation
omega - omega_net(omega_net = 1 p.u.);host.omegais the ABSOLUTE per-unit speed. Equivalent dynamics to the previously hardcodedSynchronous.tgov1(which used the absoluteomegaand absorbed the constant1/Rdinto the solvedPref) – the trajectory is identical; the only difference is thatPrefis now the actual mechanical-power setpoint (psv = pm = Prefat steady state) instead ofpm + 1/Rd.- units() List[str][source]
Return units for each state, same length as states().
- Return type:
List[str]
- params() Dict[str, float][source]
Return dict of parameter names -> default values.
- Return type:
Dict[str, float]
- states_noise() Dict[str, float][source]
Return noise specification for each state.
- Return type:
Dict[str, float]
- states_init_error() Dict[str, float][source]
Return initial error for each state.
- Return type:
Dict[str, float]
- x0() Dict[str, float][source]
Return default initial guess for each state.
- Return type:
Dict[str, float]
- descriptions() Dict[str, str][source]
Return descriptions for states and params.
- Return type:
Dict[str, str]
- setpoints() Dict[str, float][source]
Return setpoint names -> defaults (e.g., Pref).
- Return type:
Dict[str, float]
- fgcall(host, dae: pydynamicestimator.system.Dae) None[source]
Write the governor’s differential equations into
dae.fand, if it declares private algebraics, their defining residuals intodae.g.- Parameters:
host – The Synchronous machine instance. Access state/algebraic indices via host.psv, host.pm, etc., parameters via host.Rd, host.Tch, …, the absolute per-unit speed via host.omega and the setpoint via host.Pref.
dae (pydynamicestimator.system.Dae) – The DAE system object.
- Return type:
None
- class pydynamicestimator.devices.governor.Droop[source]
Bases:
GovernorPure speed-droop governor with the mechanical power ‘pm’ declared as a device-private ALGEBRAIC variable.
Primary frequency response without turbine lag dynamics: the mechanical power follows the speed deviation instantaneously (omega is the ABSOLUTE per-unit speed; the droop acts on omega - omega_net with omega_net = 1 p.u.),
0 = -pm + Pref - (omega - omega_net) / Rd # pm algebraic (no states)
so at steady state pm = Pref. This is the
Tch, Tsv -> 0(quasi-steady-state) limit ofTGOV1– one verifies that atTsv -> 0the valve givespsv = Pref - (omega-omega_net)/Rdand atTch -> 0the chest givespm = psv. It is the governor-side counterpart of the algebraic-Efdlead-lag exciter: ‘pm’ rides the device-private-algebraic mechanism and the swing equation reads it throughSynchronous.var_sym('pm'), exactly as for a state-valued ‘pm’.- units() List[str][source]
Return units for each state, same length as states().
- Return type:
List[str]
- algebs() List[str][source]
Return ordered list of device-private algebraic variable names.
Default empty: most governors have turbine lag dynamics whose output ‘pm’ is a state. A governor whose mechanical power is an instantaneous function of its inputs returns [‘pm’] here instead of listing it in
states(), and writes its defining residual0 = -pm + <expr>intodae.ginfgcall().- Return type:
List[str]
- algebs_units() Dict[str, str][source]
Units for each private algebraic (mirrors
units()).- Return type:
Dict[str, str]
- algebs_noise() Dict[str, float][source]
Relative process-noise weight for each private algebraic.
- Return type:
Dict[str, float]
- algebs_x0() Dict[str, float][source]
Initial guess for each private algebraic (Newton guess in finit).
- Return type:
Dict[str, float]
- params() Dict[str, float][source]
Return dict of parameter names -> default values.
- Return type:
Dict[str, float]
- states_noise() Dict[str, float][source]
Return noise specification for each state.
- Return type:
Dict[str, float]
- states_init_error() Dict[str, float][source]
Return initial error for each state.
- Return type:
Dict[str, float]
- x0() Dict[str, float][source]
Return default initial guess for each state.
- Return type:
Dict[str, float]
- descriptions() Dict[str, str][source]
Return descriptions for states and params.
- Return type:
Dict[str, str]
- setpoints() Dict[str, float][source]
Return setpoint names -> defaults (e.g., Pref).
- Return type:
Dict[str, float]
- fgcall(host, dae: pydynamicestimator.system.Dae) None[source]
Write the governor’s differential equations into
dae.fand, if it declares private algebraics, their defining residuals intodae.g.- Parameters:
host – The Synchronous machine instance. Access state/algebraic indices via host.psv, host.pm, etc., parameters via host.Rd, host.Tch, …, the absolute per-unit speed via host.omega and the setpoint via host.Pref.
dae (pydynamicestimator.system.Dae) – The DAE system object.
- Return type:
None
- pydynamicestimator.devices.governor.GOVERNOR_REGISTRY: Dict[str, type]