Hydro Production Function Models
Purpose
This spec defines the hydro generation constraint models supported by Cobre, which relate turbined flow and reservoir storage to electrical output. Two models are available during training (policy construction): constant productivity and FPHA. A third model — linearized head — is available only during simulation (policy evaluation) as a higher-fidelity enhancement. The choice among training models trades off accuracy vs. computational cost, and can vary by stage per hydro.
All decision variables use rate units (MW, m³/s) — see the Variable Units Convention in system elements. For variable definitions see notation conventions; for LP integration see LP formulation; for hydro element descriptions see system elements.
1. Constant Productivity Model
The simplest model assumes a linear relationship:
where (MW per m³/s) is the hydro productivity:
with:
- = turbine efficiency (typically 0.85–0.92), from the hydro object’s
efficiencyfield - = reference net head (meters), typically at 65% storage
LP treatment: 1 equality constraint per hydro per block. The generation variable is fully determined by — no free generation variable is needed. Simple and fast, but ignores head variation with storage.
Data requirements: Only productivity_mw_per_m3s from hydros.json. No geometry or hyperplane data needed.
2. FPHA (Four-Point Head Approximation)
For accurate modeling of hydroelectric generation, FPHA (Função de Produção Hidrelétrica Aproximada) captures the nonlinear relationship between storage, flow, spillage, and generation through a piecewise-linear approximation.
2.1 Notation Mapping
This section uses consistent notation with the LP formulation. The following table maps Cobre symbols to equivalent CEPEL/Portuguese terminology for practitioners familiar with DECOMP/DESSEM:
| Cobre | CEPEL/Portuguese | Description | Units |
|---|---|---|---|
| FPH | Hydro production function | MW | |
| Reservoir storage | hm³ | ||
| Turbined flow | m³/s | ||
| Spillage | m³/s | ||
| GH | Hydro generation | MW | |
| (montante) | Forebay (upstream) level | m | |
| (jusante) | Tailrace (downstream) level | m | |
| (líquida) | Net head | m | |
| (perda hidráulica) | Hydraulic losses | m | |
| Total downstream outflow | m³/s |
Note on lateral flow: CEPEL models include (lateral tributary flow affecting tailrace level) in . Cobre currently uses in the LP formulation. Lateral flow effects may be incorporated in future versions — see Deferred Features. For FPHA fitting purposes, a reference lateral flow can be assumed when evaluating the exact production function.
2.2 Exact Production Function
The exact hydroelectric production function relates generation to the operating state:
where:
- = reservoir storage volume (hm³)
- = turbined flow (m³/s)
- = total downstream outflow affecting tailrace level (m³/s)
- = net head (m)
- = specific productivity (MW·s/m⁴)
The net head is computed as:
where:
- = forebay (upstream reservoir) level as function of storage
- = tailrace (downstream channel) level as function of total outflow
- = hydraulic head losses in penstock and turbines
Why linearization is needed: is nonlinear in due to the bilinear product , nonlinear topology functions and , and flow-dependent hydraulic losses. For LP formulation, we approximate with a set of linear hyperplanes.
2.3 Topology Functions
Cobre uses tabular data with linear interpolation for topology functions — more transparent and easier to validate against surveyed data than polynomial fits.
Forebay Level
The upstream water level is obtained from hydro_geometry.parquet (see Input Hydro Extensions §1):
| volume_hm3 | height_m | area_km2 |
|---|---|---|
| … | … | … |
Interpolation: For storage where :
Tailrace Level
The downstream water level depends on total outflow. Two representations are supported, matching the tailrace tagged union in hydros.json (see Input System Entities §3):
Polynomial model (type: "polynomial"):
Piecewise-linear model (type: "piecewise"):
| outflow_m3s | tailrace_m |
|---|---|
| … | … |
With linear interpolation between points.
Total downstream flow in LP: (turbined flow + spillage). For FPHA fitting, a reference spillage (typically 0) is used when evaluating the exact production function across the grid.
Hydraulic Losses
Two models are supported, matching the hydraulic_losses tagged union in hydros.json:
Factor model (type: "factor") — proportional to gross head:
where is typically 0.01–0.05 (1–5% losses).
Constant model (type: "constant") — fixed head loss:
where is in meters (typically 1–5m).
2.4 Productivity
The specific productivity converts hydraulic power to electrical power:
where is the turbine-generator efficiency, configured via the efficiency field in hydros.json:
- Constant efficiency (current): — from the hydro object’s
efficiency.value - Variable efficiency (future): efficiency as a function of flow — see deferred features
2.5 FPHA Hyperplanes
The FPHA approximation replaces the nonlinear production function with a set of linear hyperplanes that form a concave upper envelope of the exact surface. Each hyperplane defines an upper bound on generation:
Physical interpretation of coefficients:
| Coefficient | Sign | Meaning |
|---|---|---|
| > 0 | Intercept (MW at zero storage, flow, spillage) | |
| > 0 | Higher storage → higher forebay → more generation | |
| > 0 | More turbined flow → more generation | |
| ≤ 0 | More spillage → higher tailrace → less net head |
Source of hyperplanes: Planes are either pre-computed (read from fpha_hyperplanes.parquet — see Input Hydro Extensions §3) or computed from topology data during preprocessing. The fitting process evaluates on a discretization grid over the operating region , then constructs the concave envelope of the resulting generation surface.
Implementation note (v0.1.4): The computed-source fitting grid is three-dimensional: volume, turbined flow, and spillage. The volume axis spans using
volume_discretization_pointsuniformly spaced points (default 5). The turbined-flow axis spans usingturbine_discretization_pointspoints (default 5), where to avoid degenerate zero-flow tangent planes. The spillage axis usesspillage_discretization_pointspoints (default 5) spanning , always including as the first point. Validity range fields (valid_v_min_hm3,valid_v_max_hm3,valid_q_max_m3s) are stored asnullin computed planes — they are not populated by the current fitting pipeline and reserved for future use.
2.6 Correction Factor
The correction factor scales the hyperplane intercepts to ensure the approximation is conservative — never overestimates generation:
Notation note: We use (kappa) for the FPHA correction factor to avoid collision with , which is used for Benders cut intercepts (see cut management).
In practice, is applied by pre-scaling the intercepts: .
Worst-Case Approach (Default)
This guarantees everywhere in the operating region.
MSE Minimization Approach
Minimizes mean squared error between approximation and exact function. Less conservative but more accurate on average.
Implementation note (v0.1.4): Only the worst-case approach is implemented. The MSE minimization approach is specified here for completeness but is not available in the current release. Kappa is computed as the minimum ratio over all 3D grid points where both and ; points with zero production are skipped. Kappa must lie in ; values outside this range produce a fitting error.
Typical Values
| Reservoir Type | Typical | Notes |
|---|---|---|
| High-head storage | 0.97–0.99 | Significant head variation |
| Medium-head | 0.98–1.00 | Moderate approximation error |
| Run-of-river | 0.99–1.00 | Nearly constant head |
2.7 Spillage Effect on Generation
Spillage affects generation indirectly by raising the tailrace level, which reduces net head. The FPHA constraint incorporates this through :
Physical interpretation: Each additional m³/s of spillage raises the tailrace by meters, reducing net head and thus generation.
Sign convention: because spillage reduces generation capacity.
Implementation note (v0.1.4): After tangent-plane sampling and redundancy elimination, a greedy removal heuristic selects at most
max_planes_per_hydroplanes (default 10). The heuristic evaluates, for each candidate plane, the increase in maximum approximation error that would result from its removal, then permanently removes the plane whose removal causes the smallest increase. Removal stops early if the concave-envelope property (minimum grid error ) would be violated; in that case the result may contain more planes than the target cardinality. The validity range fields are set tonullin all computed planes.
2.8 LP Integration
Final FPHA Constraint
For each hydro using FPHA, block , and plane :
where (pre-scaled intercept).
These are hard constraints — no slack variables. Feasibility is ensured through the fpha_turbined_cost regularization mechanism (see §2.9).
Average Storage Computation
The average storage over the stage:
where is the incoming storage LP variable (fixed to via the storage fixing constraint — see LP Formulation §4a) and is end-of-stage storage. Both are LP variables, so appears in the FPHA constraint with coefficient . The LP solver automatically accounts for this when computing the dual of the storage fixing constraint.
Generation as Independent Variable
When using FPHA, the generation variable is not directly computed from turbined flow. Instead:
- Generation is a free LP variable bounded by (user-defined bounds from
hydros.json) - FPHA constraints (one per plane ) provide upper bounds relating generation to storage, flow, and spillage
- The optimizer maximizes generation subject to FPHA constraints
- At optimum, generation lies on one of the FPHA hyperplane facets
Key insight: Because minimizing cost includes maximizing hydro generation (which has zero fuel cost), the optimizer naturally pushes generation to the FPHA surface boundary. The fpha_turbined_cost regularization (§2.9) ensures the solution lies on the boundary rather than at an interior point.
2.9 FPHA Turbined Cost
For hydros using the FPHA production model, a regularization cost is applied to the turbined flow variable in the objective:
This cost must satisfy for each plant, ensuring that the optimizer prefers to reduce turbined flow rather than increase spillage when operating near the FPHA boundary. Without this regularization, the optimizer could find degenerate solutions where turbined flow and spillage are both artificially high (with net generation unchanged), because the FPHA surface has a flat region where increasing and simultaneously can maintain the same .
This penalty applies only to hydros using the FPHA model. Plants with constant_productivity do not incur this cost. Plants using linearized_head (simulation-only, see §3) are also excluded — the linearized head model uses an equality constraint, not a concave envelope.
For the full penalty taxonomy and priority ordering, see Penalty System.
2.10 Impact on Benders Cuts
The FPHA formulation affects water value computation. Because the incoming storage variable appears in the FPHA constraint (via , §2.8), the FPHA hyperplane duals contribute to the marginal value of incoming storage. However, the implementation does not require manually combining duals from the water balance and FPHA constraints. Instead, the storage fixing constraint (, see LP Formulation §4a) captures the total sensitivity automatically — the LP solver propagates the FPHA contribution through .
The cut coefficient for storage is simply the dual of the storage fixing constraint:
This dual implicitly includes the water balance contribution (), the FPHA contribution (), and any generic constraint contributions — all resolved by the LP solver without explicit dual combination.
For the complete cut coefficient computation, see cut management.
Model Transition Considerations
When a hydro transitions between production models across stages:
| Transition | Cut Interpretation | Action |
|---|---|---|
| Constant → FPHA | Cuts at stage use constant model | Cut valid but conservative |
| FPHA → Constant | Stage backward pass uses constant | May overestimate value |
| FPHA → FPHA (different params) | Parameters change | Cuts remain valid if conservative |
Recommendation: When using stage-dependent FPHA configuration, ensure the FPHA at stage is at least as conservative as stage for cut validity.
3. Linearized Head Model (Simulation-Only Enhancement)
Phase restriction: This model is available only during simulation (policy evaluation). It must NOT be used during training (policy construction). During training, only
constant_productivityandfphaare valid production models. See the rationale below.
An intermediate model between constant productivity and full FPHA that captures first-order head variation with storage:
where:
- are linearization coefficients derived from
- (normalization at reference volume)
3.1 Why Simulation-Only
The product is a bilinear term — both and are LP variables. To maintain LP linearity, the standard approach fixes from the previous SDDP iteration (or from a reference volume on the first iteration), converting the constraint to a linear equality. However, this means the LP constraint coefficients change between iterations: the effective productivity is different after each forward pass updates the storage trajectory.
This violates a foundational assumption of SDDP: each stage must have a fixed LP structure across all iterations. Benders cuts generated under one linearization point encode dual information about a specific LP. When the LP changes (because changed), previously generated cuts are not guaranteed to be valid — they may cut off the true optimal solution or produce inconsistent value function approximations. This breaks the convergence guarantees of the algorithm.
During simulation, linearized head is safe because simulation executes a single forward pass through the policy — there are no cuts being accumulated, no convergence to verify. The model provides a higher-fidelity generation estimate than constant productivity without the preprocessing cost of fitting FPHA hyperplanes.
3.2 Simulation Use Case
The linearized head model fills a practical gap in the simulation step:
- More accurate than constant productivity: Captures how reservoir level affects generation — important for plants with significant head variation that are modeled with
constant_productivityduring training for computational reasons - Cheaper than FPHA: Requires only the Volume-Height-Area curve (
hydro_geometry.parquet), no hyperplane fitting - Single constraint: One equality constraint per hydro per block, compared to inequality constraints for FPHA
Typical use: plants where full FPHA accuracy is justified for near-term training stages but far-future stages use constant_productivity during training, then linearized_head during simulation for improved analytics.
3.3 Data Requirements
productivity_mw_per_m3s from hydros.json plus hydro_geometry.parquet for the Volume-Height-Area curve. See Input System Entities §3 and Input Hydro Extensions §1.
4. Model Selection Guidelines
Training (Policy Construction)
Only constant_productivity and fpha are valid during training. The linearized head model is excluded because it changes the LP between iterations (see §3.1).
| Scenario | Recommended Model | Rationale |
|---|---|---|
| High-head storage reservoirs | FPHA | Significant head variation (>20%) |
| Large storage variation plants | FPHA | Operating across wide volume range |
| Run-of-river plants | Constant productivity | Nearly constant head |
| Initial algorithm testing | Constant productivity | Fast iteration, debug focus |
| Near-term stages | FPHA | Accuracy for operational decisions |
| Far-future stages | Constant productivity | Computational efficiency |
Simulation (Policy Evaluation)
All three models are available during simulation. The linearized head model is particularly useful as a simulation-only upgrade for plants that used constant_productivity during training:
| Scenario | Recommended Model | Rationale |
|---|---|---|
| Plants trained with FPHA | FPHA | Consistency with training model |
| Plants trained with constant, low head variation | Constant productivity | No benefit from head correction |
| Plants trained with constant, significant head variation | Linearized head | Better analytics without FPHA fitting cost |
| Post-optimization validation | Compare all models | Verify approximation quality |
The production model can vary by stage or season per hydro. See Input Hydro Extensions §2 for the stage_ranges and seasonal selection modes and their JSON configuration.
5. Data Requirements Summary
| Data Source | Required Fields | Used For |
|---|---|---|
hydros.json | generation.productivity_mw_per_m3s | Reference |
hydros.json | tailrace (polynomial or piecewise) | computation |
hydros.json | hydraulic_losses (factor or constant) | computation |
hydros.json | efficiency (constant) | Turbine efficiency |
hydro_geometry.parquet | volume_hm3, height_m | interpolation |
fpha_hyperplanes.parquet | gamma_0, gamma_v, gamma_q, gamma_s, kappa | Pre-fitted planes (optional) |
hydro_production_models.json | selection_mode, fpha_config per stage/season | Fitting configuration |
For the complete field definitions, see Input System Entities §3 and Input Hydro Extensions.
Cross-References
- Notation conventions — variable and set definitions (, , , , )
- System elements — hydro plant element description, decision variables, Variable Units Convention
- LP formulation — how production constraints integrate into the assembled LP
- Penalty system —
fpha_turbined_costregularization, penalty priority ordering - Input System Entities §3 — hydro registry with tailrace, hydraulic losses, efficiency fields
- Input Hydro Extensions — geometry data, production model selection, FPHA hyperplane schema
- Cut management — Benders cut generation affected by FPHA dual variables
- Deferred features — variable efficiency, other simulation-only enhancements
- Simulation architecture — simulation step where linearized head and other non-convex enhancements are applied