[Supplementary Data] PowerModel-AI: A First On-the-fly Machine-Learning Predictor for AC Power Flow Solutions.
Authors/Creators
Description
Abstract
The real-time creation of machine-learning models via active or on-the-fly learning has attracted considerable interest across various scientific and engineering disciplines. These algorithms enable machines to autonomously build models while remaining operational. Through a series of query strategies, the machine can evaluate whether newly encountered data fall outside the scope of the existing training set. In this study, we introduce PowerModel-AI, an end-to-end machine learning software designed to accurately predict AC power flow solutions. We present detailed justifications for our model design choices and demonstrate that selecting the right input features effectively captures the load flow decoupling inherent in power flow equations. Our approach incorporates on-the-fly learning, where power flow calculations are initiated only when the machine detects a need to improve the dataset in regions where the model's performance is sub-optimal, based on specific criteria. Otherwise, the existing model is used for power flow predictions. This study includes analyses of five Texas A&M synthetic power grid cases, encompassing the 14-, 30-, 37-, 200-, and 500-bus systems. The training and test datasets were generated using PowerModel.jl, an open-source power flow solver/optimizer developed at Los Alamos National Laboratory, NM, USA.
Overview
This dataset, provided as supplementary material for the above-referenced study, includes a comprehensive collection of images (plots) from the study’s analyses, along with Jupyter notebooks containing Python scripts used for the training, validation, and testing phases of PowerModel-AI. Additionally, it includes all training and external test data used in this work, generated via LANL-based open-source power flow solver, PowerModels.jl.
The primary objective of this dataset is to ensure full reproducibility of the study’s analyses and facilitate critical examination by the scientific community, thereby maximizing the overall impact of the work.
Directory Structure
The hierarchy of folders and file organization of the dataset is illustrated in the chart below. The directory contains a README.md file which contains the information provided here and a requirements.txt that contains all libraries necessary to run the python scripts or Jupyter notebooks in this directory. A brief description of the folders and what they contain are provided below:
Files Description
1. Models/
_PM_AI_Models/ contains the ML models discussed in the manuscript. Type1, Type2, and Type3 refers to the C and M models with numbers "1", "2," and "3". Each Type folder contains individual subfolders for the synthetic grids discussed.
_PM_AI_Module/ contains a python script that has all the functions used in model training and analysis. It is imported in the Jupyter notebooks in the C and M subfolders in this directory.
_PM_JL_Data/ contains the following subfolders:
a) _GeneratePowerModelData/ has a python script (get_PowerModelJLData.py) that is used to parse PowerModels.jl to compute AC power flow solutions for different power demand configurations. It also contains a subfolder, BusData_MATLAB/, that has all the synthetic grids used in the study and in MATLAB format.
b) It also contains other subfolders (not shown in the chart above) that contains AC power flow solutions generated using LANL’s PowerModels.jl, for each synthetic grids and other grid-related data.
The folders starting with C and M are the control and candidate models (more details in manuscript). Each folder contains Jupyter notebooks (for each power grid) that has python algorithms used in model training and testing, as well as functions to analyze and plot the prediction performance of the models. It accesses (if already trained) or stores (if newly trained) the models in the _PM_AI_Models/ directory. Additionally, they contain 2 subfolders (not shown in the chart above): AbsoluteErrorPlots/ and PredictionPlots/ were the results (plots) from the analyses are stored. Some of these results are shown in the manuscript (Figures 4, 5, 6, and 7).
2. NodeSensitivityAnalysis/
This folder contains the tools used for the node dependency analysis in Section 3.1.1 of the manuscript.
It contains a python script called get_sensitivity_PMJL_data.py, which has similar operation like the get_PowerModelJLData.py script but only compute changes for one bus at a time (see details in manuscript). There is also a Jupyter notebook called NodeSensitivityAnalysis.ipynb that analyzes the bus node dependencies and produces the plots that are shown in Figure 3 in the manuscript. It contains 2 additional sub-folders:
a) Sensitivity_PM_JL_Data/ where PowerModels.jl generated AC power flow solution data are stored, and
b) Sensitivity_Plots/ where the results from NodeSensitivityAnalysis.ipynb are stored.
3. PlotsForOnTheFlyAnalysis/
This directory contains only the results for the discussion in Section 3.2 in the manuscript, which is the on-the-fly implementation of PowerModel-AI. The on-the-fly algorithm will be provided and distributed separately in the PowerModel-AI package, which will be publicly available through LANL’s The Advanced Network Science Initiative (Github). It contains 3 subfolders with similar names but ends with "A", "B," and "C" which correspond to the designations shown and discussed in Figure 8 of the manuscript.
Summary
Models/
1. _PM_AI_Models/:
Contains the machine learning models discussed in the manuscript. The Type1, Type2, and Type3 folders refer to C and M models labeled "1", "2," and "3". Each type folder includes subfolders for the corresponding synthetic grids analyzed.
NodeSensitivityAnalysis/
PlotsForOnTheFlyAnalysis/
Additional Files
Notes:
Files
PowerModel-AI Showcase.webm
Additional details
Identifiers
- Other
- RASSTI (Review & Approval System for Scientific and Technical Information) Number: LA-UR-24-30279
- DOI
- 10.3390/en18081968
Related works
- Is supplement to
- Preprint: 10.31224/4052 (DOI)
- Journal article: 10.3390/en18081968 (DOI)
Funding
- Los Alamos National Laboratory
- Directed Research and Development (LDRD) project: Artificial Intelligence for Mission: Design, Discovery, and Control 89233218CNA000001