This project implements a Data-Driven Digital Twin for a Dual-Bus DC Microgrid. It uses a Physics-Aware Graph Neural Network (GNN) to predict power losses and optimize grid topology in real-time, bypassing slow traditional physics solvers. This approach allows for rapid grid reconfiguration and optimization, enhancing stability and efficiency.
-
Physics-Aware AI: Uses
GINEConvlayers that explicitly incorporate electrical conductance ($1/R$ ) into message passing. - Heterogeneous Modeling: Distinctly models Main Buses, Local Stations, EV Chargers, PV Units, and Battery Storage.
- Topology Optimization: Automatically identifies the optimal switch configuration to minimize losses during load spikes.
- Installation
- Usage Pipeline
- Documentation
- File Structure
- Configuration
- License
- Prerequisites: Python 3.8+, CUDA (optional for GPU support).
- Install Dependencies:
cd ds-pah-gnn pip install -r requirements.txt
The core workflow involves simulating a microgrid environment, training a GNN to predict system states, and then using the trained model to optimize grid topology in real-time.
Simulates 600,000 grid snapshots with stochastic EV loads and solar generation.
python generate.pyTrains the GNN to predict power loss from graph topology. Generates training_loss.png.
python train.pyCalculates inference_plot.png.
python inference.pyFinds the optimal topology for a stressed grid scenario (e.g., Station Overload).
python optimize.pyResearch Use Only.