-
Notifications
You must be signed in to change notification settings - Fork 0
Powerflow Solvers en
中文 | English
Maintained version: v0.51.2 | Last updated: 2026-07-06
Powerflow calculation is the cornerstone of power system analysis. EnerOS provides 4 algorithms in crates/eneros-powerflow, validated against the MATPOWER IEEE 14 benchmark system. This page summarizes algorithm selection and accuracy validation; for full implementation see the main repo crates/eneros-powerflow/ and ADR-0019.
| Algorithm | crate module | Convergence | Use case | Complexity |
|---|---|---|---|---|
| Newton-Raphson (NR) | solvers::newton |
Quadratic | Transmission / wide load variation | O(n³) per iter |
| Fast-Decoupled (FD / XB-YB) | solvers::fast_decoupled |
Linear | Transmission / real-time fast computation | O(n²) per iter |
| Backward-Forward Sweep (BFSW) | solvers::forward_backward |
Robust | Distribution / radial topology | O(n) per iter |
| DC Powerflow | solvers::dc |
Direct solve | Heuristics / trend analysis / real-time dispatch | O(n³) once |
crates/eneros-powerflow/tests/ and crates/eneros-test-utils/ provide the IEEE 14-bus benchmark fixture:
#[test]
fn newton_matches_matpower_ieee14() {
let fixture = Ieee14Fixture::load();
let result = PowerflowSolver::newton()
.tolerance(1e-8)
.max_iterations(50)
.solve(&fixture.network)
.unwrap();
let matpower_ref = fixture.matpower_solution();
assert!(result.voltage.all_close(&matpower_ref.voltage, 1e-6));
assert!(result.power.all_close(&matpower_ref.power, 1e-6));
}v0.51.0 completed alignment validation of NR + FD against MATPOWER reference solutions (voltage magnitude/angle / active/reactive power all consistent within 1e-6 tolerance).
FD solver adds input validation, rejecting non-positive / non-finite initial values:
pub fn solve(&self, network: &Network, v_initial: &[f64]) -> Result<PowerflowResult> {
for (i, &v) in v_initial.iter().enumerate() {
if !v.is_finite() {
return Err(PowerflowError::InvalidInitialValue(i, "non-finite"));
}
if v <= 0.0 {
return Err(PowerflowError::InvalidInitialValue(i, "non-positive"));
}
}
// ... solve ...
}| Capability | crate | Standard |
|---|---|---|
| Harmonic analysis | eneros-analysis | GB/T 14549 |
| Electromagnetic transient EMT | eneros-emtp (v0.51.0+) | — |
| State estimation | eneros-analysis | WLS weighted least squares |
| N-1 check | eneros-constraint | Transmission grid planning standard |
| Short circuit calculation | eneros-analysis | IEC 60909 |
| Transient stability | eneros-analysis | Time-domain simulation |
- AC-OPF (IEEE 30 / 118) not yet implemented; only DC-OPF available, pending v0.52.0+
- KKT solver upgrade pending v0.52.0
- IEEE 39-bus CCT (Critical Clearing Time) API missing 3 interfaces, pending v0.52.0
- EMT solver is initial version; does not cover all fault types
- ADR-0019 Powerflow Solver Selection
- Power System Primer — Powerflow math background
- Main repo docs/developer-guide.md §v0.51.0 — Algorithm validation details
- Main repo crates/eneros-powerflow/ — source code
EnerOS Wiki | v0.51.2