Describe the bug
Description:
We have identified a critical mathematical regression strictly confined to the State Estimator (WLS) module when working with asymmetrical networks (is_symmetrical=False). Since the topological refactoring introduced in version 1.13.147 ("Merge links into nodes"), the WLS solver diverges drastically and outputs heavily distorted/scaled node voltages (e.g., mixing Phase-to-Neutral and Line-to-Line magnitude scalings).
Crucial Isolation of the Bug:
We have empirically proven that the underlying physical topology and components are processed correctly in 1.13.158. If we feed the exact same asymmetrical grid data but execute a standard Load Flow calculation (bypassing WLS sensors), versions 1.13.146 and 1.13.158 yield mathematically identical and correct results ($\approx 230$ V on LV nodes). The severe distortion only happens when active asymmetrical voltage measurements are ingested and processed by the WLS solver.
Input Data Validity
Data Dump
No response
To Reproduce
Steps to Reproduce:
- Configure an asymmetrical distribution grid with a standard MV/LV transformer (e.g., 10kV / 400V, wye_n / wye_n).
- Ensure the transformer neutral is explicitly grounded (using
r_grounding_from/to = 0.0), as required by recent PGM versions to avoid SparseMatrixError.
- Provide valid asymmetrical
asym_voltage_sensor measurements for the LV nodes using Phase-to-Neutral magnitudes (e.g., 230.94 V / 1.0 p.u.).
- Execute the State Estimation (WLS).
Expected behavior
Expected Behavior (PGM <= 1.13.146):
The State Estimator converges successfully, and the resulting estimated voltages in the nodes_se dataset are physically correct ($\approx 230.94$ V Phase-to-Neutral on the LV side, and $\approx 5.7$ kV on the MV side).
Actual Behavior (PGM >= 1.13.147 up to 1.13.158):
The WLS solver diverges and the raw nodes_se["u"] output array becomes heavily fragmented and corrupted:
- MV nodes spike from an expected $\approx 5.7$ kV up to $\approx 9.5$ kV (an exact deviation of $\approx \sqrt{3}$).
- Some LV nodes are returned erroneously scaled by $\sqrt{3}$ (e.g., returning $\approx 382$ V instead of $\approx 220$ V).
- Other LV nodes on the same grid remain close to $\approx 230$ V.
Mathematical Evidence:
Comparison of Max Voltages across the exact same grid topology:
- Load Flow only (No WLS sensors):
- PGM 1.13.146 Max Voltage: 5773.50 V
- PGM 1.13.158 Max Voltage: 5773.50 V (Zero Divergence. Topology is intact).
- State Estimation (With active WLS sensors):
- PGM 1.13.146 Max Voltage: 5773.56 V (Correct)
- PGM 1.13.158 Max Voltage: 9521.10 V (Diverged. Massive amount of nodes across the grid diverge significantly from the expected physical baseline).
This strongly indicates that the WLS solver backend in C++ is struggling to correctly map, scale, or de-normalize the objective function arrays (mixing $U_{LL}$ and $U_{LN}$ base expectations) during the asymmetrical state estimation process since the topological node-merging update.
Screenshots
No response
Additional context
Environment:
- OS: Linux
- Python: 3.12
- power-grid-model version: 1.13.147 through 1.13.158 (Bug is completely absent in 1.13.146)
Community Meeting
Describe the bug
Description:
We have identified a critical mathematical regression strictly confined to the State Estimator (WLS) module when working with asymmetrical networks (
is_symmetrical=False). Since the topological refactoring introduced in version 1.13.147 ("Merge links into nodes"), the WLS solver diverges drastically and outputs heavily distorted/scaled node voltages (e.g., mixing Phase-to-Neutral and Line-to-Line magnitude scalings).Crucial Isolation of the Bug:$\approx 230$ V on LV nodes). The severe distortion only happens when active asymmetrical voltage measurements are ingested and processed by the WLS solver.
We have empirically proven that the underlying physical topology and components are processed correctly in 1.13.158. If we feed the exact same asymmetrical grid data but execute a standard Load Flow calculation (bypassing WLS sensors), versions 1.13.146 and 1.13.158 yield mathematically identical and correct results (
Input Data Validity
Data Dump
No response
To Reproduce
Steps to Reproduce:
r_grounding_from/to = 0.0), as required by recent PGM versions to avoidSparseMatrixError.asym_voltage_sensormeasurements for the LV nodes using Phase-to-Neutral magnitudes (e.g., 230.94 V / 1.0 p.u.).Expected behavior
Expected Behavior (PGM <= 1.13.146):$\approx 230.94$ V Phase-to-Neutral on the LV side, and $\approx 5.7$ kV on the MV side).
The State Estimator converges successfully, and the resulting estimated voltages in the
nodes_sedataset are physically correct (Actual Behavior (PGM >= 1.13.147 up to 1.13.158):
The WLS solver diverges and the raw
nodes_se["u"]output array becomes heavily fragmented and corrupted:Mathematical Evidence:
Comparison of Max Voltages across the exact same grid topology:
This strongly indicates that the WLS solver backend in C++ is struggling to correctly map, scale, or de-normalize the objective function arrays (mixing$U_{LL}$ and $U_{LN}$ base expectations) during the asymmetrical state estimation process since the topological node-merging update.
Screenshots
No response
Additional context
Environment:
Community Meeting