# IEEE 9-Bus Validation Report

Physics-Informed Neural Network for DC Power Flow, validated against
the exact analytical solution of the standard WSCC IEEE 9-bus system.

## Method

- System: IEEE 9-bus, 9 lines, slack at bus 1
- Ground truth: exact solve of `P = B' theta` (DC power flow)
- Model: feed-forward PINN, physics-residual loss, 4000 epochs

## Ground-Truth Verification

Analytical solution power-balance residual: **1.11e-16** (exact to machine precision).

## PINN Accuracy vs Analytical Truth

| Bus | PINN angle (deg) | Analytical (deg) | Abs error (deg) |
|-----|------------------|------------------|-----------------|
| 2 | +10.6393 | +10.6581 | 0.0188 |
| 3 | +5.0846 | +5.0954 | 0.0108 |
| 4 | -2.2024 | -2.2112 | 0.0088 |
| 5 | -4.9359 | -4.9230 | 0.0130 |
| 6 | +2.2269 | +2.2415 | 0.0146 |
| 7 | +1.5669 | +1.5805 | 0.0135 |
| 8 | +4.8160 | +4.8211 | 0.0051 |
| 9 | -2.9857 | -2.9687 | 0.0170 |

- **RMSE vs analytical: 0.0124 deg**
- **Max bus error: 0.0188 deg**
- **Final physics residual: 1.084e-05**

## Convergence

![Convergence](convergence.png)

## N-1 Contingency Security

Single-line outage analysis (NERC N-1): **6/9** single-line outages leave the system solvable.

| Outaged line | Solvable | Max flow (p.u.) |
|--------------|----------|-----------------|
| 1->4 | NO (island) | - |
| 4->5 | yes | 1.6300 |
| 5->6 | yes | 1.6300 |
| 3->6 | NO (island) | - |
| 6->7 | yes | 1.6300 |
| 7->8 | yes | 1.6300 |
| 8->2 | NO (island) | - |
| 8->9 | yes | 1.6300 |
| 9->4 | yes | 1.6300 |

Islanding contingencies are the radial generator tie-lines — a real, actionable reliability finding for an operator.

## AC Power Flow (Nonlinear) — PINN vs Newton-Raphson

The nonlinear AC case, where the physics-informed approach has real value. Validated against a Newton-Raphson ground-truth solution.

- **Angle RMSE vs Newton-Raphson: 0.0035 deg**
- **Voltage RMSE: 3.43e-05 p.u.**
- **Final physics residual: 9.642e-05**

| Bus | |V| PINN | |V| true | angle PINN (deg) | angle true (deg) |
|-----|---------|----------|------------------|------------------|
| 1 | 1.0400 | 1.0400 | +0.0000 | +0.0000 |
| 2 | 1.0250 | 1.0250 | +10.0145 | +10.0100 |
| 3 | 1.0250 | 1.0250 | +4.6843 | +4.6797 |
| 4 | 1.0236 | 1.0237 | -2.2420 | -2.2431 |
| 5 | 0.9921 | 0.9920 | -4.8115 | -4.8086 |
| 6 | 1.0298 | 1.0298 | +1.9713 | +1.9750 |
| 7 | 1.0193 | 1.0194 | +1.3939 | +1.3940 |
| 8 | 1.0290 | 1.0290 | +4.4648 | +4.4670 |
| 9 | 1.0064 | 1.0064 | -2.9980 | -2.9930 |

## PINN vs Black-Box Baseline (Controlled Ablation)

Identical architecture, same 8 noisy training samples. The only difference is the physics-residual loss term.

| Model | RMSE vs truth (deg) | Physics violation |
|-------|---------------------|-------------------|
| Black-box (data only) | 0.4507 | 1.469e-02 |
| PINN (data + physics) | 0.0022 | 5.080e-09 |

- **PINN reduces physics violation by 2892625x**
- **PINN reduces angle RMSE by 204x** under limited noisy data

## Reproducibility

```
python -m physics_informed_grid.validate_ieee9
```

Every figure above is regenerated by the command. Seed-fixed; results are deterministic.