pydynamicestimator.tests.test_governor
Pluggable-governor test (governor-side counterpart of test_avr_algebraic).
The governor is now a pluggable strategy, symmetric to the AVR: its mechanical- power coupling ‘pm’ may be a differential state (TGOV1, turbine lag dynamics) or a device-private algebraic variable (Droop, instantaneous primary frequency response). This validates:
The Droop governor’s algebraic ‘pm’ satisfies its defining equation pm = Pref - omega/Rd along the trajectory (internal consistency).
Droop (algebraic ‘pm’) reproduces TGOV1 with small turbine time constants in the Tch,Tsv -> 0 singular-perturbation limit (Droop is that quasi-steady-state limit), proving the state-vs-algebraic ‘pm’ coupling is interchangeable.
(Byte-equivalence of the TGOV1 extraction itself is covered by the unchanged positional baselines in test_recur_sim/test_recur_est/test_run_ideal.)
See docs/algebraic_equations_design.md and CHANGELOG_algebraic_equations.md.
Functions
The Droop governor's algebraic mechanical power must satisfy its defining |
|
Droop (pm algebraic) must reproduce TGOV1 with small turbine time constants |
Module Contents
- pydynamicestimator.tests.test_governor.test_droop_constraint_holds()[source]
The Droop governor’s algebraic mechanical power must satisfy its defining equation along the whole trajectory: the recovered pm (in y_full) equals Pref - (omega - omega_net)/Rd evaluated on the state. Note omega is the ABSOLUTE per-unit speed, so the droop acts on the deviation (omega_net=1).
- pydynamicestimator.tests.test_governor.test_droop_matches_tgov1_fast_limit()[source]
Droop (pm algebraic) must reproduce TGOV1 with small turbine time constants (pm a state behind the valve+chest lags) in the Tch,Tsv -> 0 limit. The gov_tgov1_fast fixture uses Tch = Tsv = 1e-3, so the machine response must agree to O(Tch,Tsv).