Skip to content
 
 

Repository files navigation

FlowMVGrid

An ML-Ready Synthetic Medium-Voltage Grid Dataset

FlowMVGrid provides machine-learning-ready power system data that combines real Dutch medium-voltage distribution network topologies with realistic synthetic load profiles. It is designed for supervised learning tasks at the MV distribution level: power flow approximation, state estimation, load forecasting, and connection identification.

Dataset: IEEE DataPort (DOI forthcoming)
Paper: Lin & Mamudi, IEEE Open Journal of the Power and Energy Society (submitted)
<<<<<<< HEAD Code: github.com/TU-Delft-IEPG/FlowMVGrid

Code: github.com/TU-Delft-IEPG/FlowMVGrid

afbb5f4 (add toolkit)

Why FlowMVGrid?

Most public power system benchmarks are limited to small IEEE test feeders with static snapshots, or provide time-series data without the underlying network structure. GNN-tailored benchmarks like PowerGraph and PF-Delta target transmission-level power flow but do not include temporal load diversity or distribution-level grids.

FlowMVGrid fills this gap by combining properties that are individually common but rarely found together:

  • Real grid topology — Four Dutch MV distribution networks (57--878 nodes) with operational switch states and impedance parameters, not synthetic IEEE test cases.
  • Realistic load profiles — Multi-customer aggregation from the GLASS generative model at 15-minute resolution, not scaled snapshots.
  • Full AC power flow labels — Voltages, line flows, loading, and losses from Newton--Raphson solutions via power-grid-model, not DC approximations.
  • Graph-native format — COO edge index and node/edge feature arrays directly loadable by PyTorch Geometric.
  • Built-in diversity — Six independent axes (topology variants, customer-assignment seeds, PV penetration, load multipliers, temporal breadth, measurement noise) to stress-test generalization.
  • Reproducible benchmarking — Four PyTorch Dataset classes, four splitting strategies, validation checks, and baseline results from analytical, linear, and neural models.

PES Domain Challenges Addressed

The energy transition is pushing operational challenges to the distribution level. FlowMVGrid targets four PES domain problems:

Task Challenge Dataset support
Power flow calculation Fast surrogate models for real-time congestion management Full AC PF ground-truth labels for voltage and line flow prediction
State estimation Recovering system state from sparse, noisy measurements On-the-fly noise injection with configurable SNR and measurement dropout
Load forecasting Short-term load prediction to schedule flexibility assets High-resolution (15-min) time-series with seasonal and diurnal patterns
Connection identification Identifying customer-to-node mappings from voltage correlations Multiple customer-assignment seeds with time-series voltage and load data

AI/ML Challenges Addressed

Challenge How FlowMVGrid helps
Scarce labeled data Up to 141,696 per-timestep samples with full AC power flow labels, generated from realistic synthetic profiles
Graph-structured data Native COO adjacency, node features, and edge features — no conversion needed for GNNs
Generalization across topologies Four grids of different sizes, switch reconfigurations, and N-1 contingencies for topology-based splits
Cross-grid transfer learning Grid-based splits enable training on one topology and testing on unseen networks
Reproducible benchmarking Standardized splits (random, time-based, topology-based, grid-based), metrics, and baselines

Quick Start

Download the Dataset

Download from IEEE DataPort (DOI forthcoming). Two self-contained datasets are provided:

Dataset Grids Samples Size Use case
dataset_v1.zip Arnhem (2 topology variants) 141,696 2.7 GB Single-grid benchmarking
multigrid_v1.zip All 4 grids 35,712 10 MB Cross-grid transfer learning

Each zip contains compressed NPZ sample files, topology files, a CSV manifest, and scenario configs. No additional source data is needed to load and use the dataset.

Install the Code

Requires Python 3.13+. Uses uv as the package manager.

uv sync                    # core dependencies
uv sync --extra ml         # ML dependencies (torch, torch-geometric, scikit-learn)

Load Data in PyTorch

from synthetic_grid_dataset.ml import PowerFlowDataset, SplitStrategy
import polars as pl

manifest = pl.read_csv("dataset/manifest.csv")
split = SplitStrategy.random(manifest)

train_ds = PowerFlowDataset(
    root="dataset",
    manifest_csv="dataset/manifest.csv",
    sample_ids=split.train_ids,
)

features, labels = train_ds[0]
# features: {node_features, edge_features, edge_index, load_p, load_q}
# labels: {u_pu, u_angle, line_loading, line_p_from, ...}

Load as PyG Graph Objects

from synthetic_grid_dataset.ml import PowerGridPyGDataset

pyg_ds = PowerGridPyGDataset(
    root="dataset/pyg",
    manifest_csv="dataset/manifest.csv",
    samples_root="dataset",
)
data = pyg_ds[0]  # Data(x, edge_index, edge_attr, y, edge_y)

Other Dataset Classes

from synthetic_grid_dataset.ml import (
    StateEstimationDataset,  # adds Gaussian noise + dropout on-the-fly
    ForecastingDataset,      # sliding-window input-target pairs
    ConnectionIDDataset,     # non-overlapping voltage/load sequences
)

Dataset Format

Each dataset is a self-contained directory:

dataset/
  manifest.csv              # sample index
  scenario_configs.json     # generation parameters
  topology/
    arnhem_v0.npz           # shared graph topology per variant
  samples/
    000000.npz              # per-timestep sample
    000001.npz  ...

Topology NPZ (shared per grid variant):

Array Shape Description
node_features (N, 3) [u_rated, is_source, is_load]
edge_features (E, 5) [r1, x1, i_n, from_status, to_status]
edge_index (2, E) COO adjacency

Sample NPZ (one per 15-min timestep):

Array Shape Description
load_p, load_q (N,) Active/reactive load (W)
u_pu, u_angle (N,) Voltage magnitude (p.u.) and angle (rad)
line_p_from/to, line_q_from/to (E,) Line active/reactive power flows (W)
line_loading (E,) Current / rated current
line_loss_p (E,) Resistive loss (W)
source_p, source_q scalar Source injection (W)

See docs/DATASET_CARD.md for the complete format specification.

Dataset Statistics

Property Value
Grids 4 (arnhem, ap, aalbuhn, tmdl)
Nodes 57 -- 878 per grid
Edges 64 -- 1,001 per grid
Rated voltage 10.5 kV
Temporal resolution 15-min (96 timesteps/day)
Primary dataset samples 141,696
Primary dataset size 2.7 GB

Baseline Results

Reference performance on the Arnhem grid (random 70/15/15 split, 2,000 training samples):

Power flow approximation (voltage prediction):

Model MAE (p.u.) RMSE (p.u.)
DC Power Flow 0.0102 0.0122
Linear Regression 4.6e-4 8.1e-4
MLP (2-layer) 0.024 0.032
GNN (NNConv) 0.0021 0.0029

The GNN outperforms the topology-unaware MLP by >10x on MAE, confirming that graph structure provides a meaningful inductive bias. Linear regression achieves the best accuracy, reflecting the near-linear load-to-voltage relationship in stiff MV grids — neural models must exceed this strong baseline.

State estimation and forecasting:

Task Model MAE
SE (30 dB) Linear Regression 5e-6 p.u.
SE (20 dB, 20% dropout) Linear Regression 6.9e-5 p.u.
Forecasting Persistence 7,039 W
Forecasting Linear AR (4 lags) 2,288 W

Load forecasting shows the largest gap between simple baselines and what deep temporal models could achieve.

Splitting Strategies

Strategy Use case Method
Random General baseline 70/15/15 random split
Time-based Temporal generalization Train on early months, test on later
Topology-based Structural generalization Hold out switch variants
Grid-based Transfer learning Leave one grid out

Testing

uv run pytest                    # all tests
uv run pytest tests/test_X.py   # single file

Citation

If you use FlowMVGrid in your research, please cite:

@article{flowmvgrid2026,
  author  = {Lin, Nan and Mamudi, Bet{\"u}l},
  title   = {An {ML}-Ready Synthetic Medium-Voltage Grid Dataset ({FlowMVGrid})},
  year    = {2026},
}

For the GLASS synthetic load profiles:

@misc{glass2026,
  author       = {Lin, Nan and Wang, Yanbo and Heres, Jacco and Palensky, Peter and Vergara, Pedro P.},
  title        = {{GLASS}: Generating large-scale accurate smart-meter synthetic dataset},
  year         = {2026},
  howpublished = {4TU.ResearchData},
  note         = {doi: 10.4121/b18de4df-0f67-4a6f-aa84-6634cdd63991},
}

License

MIT. See LICENSE.

The GLASS dataset is licensed under CC BY 4.0.

About

Data accessing tools for FlowMVGrid dataset.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages