Table of Contents
Fetching ...

Real-Time Surrogate Modeling for Fast Transient Prediction in Inverter-Based Microgrids Using CNN and LightGBM

Osasumwen Cedric Ogiesoba-Eguakun, Kaveh Ashenayi, Suman Rath

Abstract

Real-time monitoring of inverter-based microgrids is essential for stability, fault response, and operational decision-making. However, electromagnetic transient (EMT) simulations, required to capture fast inverter dynamics, are computationally intensive and unsuitable for real-time applications. This paper presents a data-driven surrogate modeling framework for fast prediction of microgrid behavior using convolutional neural networks (CNN) and Light Gradient Boosting Machine (LightGBM). The models are trained on a high-fidelity EMT digital twin dataset of a microgrid with ten distributed generators under eleven operating and disturbance scenarios, including faults, noise, and communication delays. A sliding-window method is applied to predict important system variables, including voltage magnitude, frequency, total active power, and voltage dip. The results show that model performance changes depending on the type of variable being predicted. The CNN demonstrates high accuracy for time-dependent signals such as voltage, with an $R^2$ value of 0.84, whereas LightGBM shows better performance for structured and disturbance-related variables, achieving an $R^2$ of 0.999 for frequency and 0.75 for voltage dip. A combined CNN+LightGBM model delivers stable performance across all variables. Beyond accuracy, the surrogate models also provide major improvements in computational efficiency. LightGBM achieves more than $1000\times$ speedup and runs faster than real time, while the hybrid model achieves over $500\times$ speedup with near real-time performance. These findings show that data-driven surrogate models can effectively represent microgrid dynamics. They also support real-time and faster-than-real-time predictions. As a result, they are well-suited for applications such as monitoring, fault analysis, and control in inverter-based power systems.

Real-Time Surrogate Modeling for Fast Transient Prediction in Inverter-Based Microgrids Using CNN and LightGBM

Abstract

Real-time monitoring of inverter-based microgrids is essential for stability, fault response, and operational decision-making. However, electromagnetic transient (EMT) simulations, required to capture fast inverter dynamics, are computationally intensive and unsuitable for real-time applications. This paper presents a data-driven surrogate modeling framework for fast prediction of microgrid behavior using convolutional neural networks (CNN) and Light Gradient Boosting Machine (LightGBM). The models are trained on a high-fidelity EMT digital twin dataset of a microgrid with ten distributed generators under eleven operating and disturbance scenarios, including faults, noise, and communication delays. A sliding-window method is applied to predict important system variables, including voltage magnitude, frequency, total active power, and voltage dip. The results show that model performance changes depending on the type of variable being predicted. The CNN demonstrates high accuracy for time-dependent signals such as voltage, with an value of 0.84, whereas LightGBM shows better performance for structured and disturbance-related variables, achieving an of 0.999 for frequency and 0.75 for voltage dip. A combined CNN+LightGBM model delivers stable performance across all variables. Beyond accuracy, the surrogate models also provide major improvements in computational efficiency. LightGBM achieves more than speedup and runs faster than real time, while the hybrid model achieves over speedup with near real-time performance. These findings show that data-driven surrogate models can effectively represent microgrid dynamics. They also support real-time and faster-than-real-time predictions. As a result, they are well-suited for applications such as monitoring, fault analysis, and control in inverter-based power systems.

Paper Structure

This paper contains 23 sections, 11 equations, 7 figures, 4 tables, 1 algorithm.

Figures (7)

  • Figure 1: Internal structure of a representative distributed generation (DG) unit in the inverter-based microgrid. Each DG unit consists of a distributed energy source, a DC-link capacitor, and a voltage source inverter (VSI) that operates using PWM switching. The inverter output is filtered by an LCL filter and connected to the AC bus via a coupling transformer. A local controller regulates voltage, frequency, and power using control signals $(V^*, f^*, P^*, Q^*)$, based on measurement feedback $(V_{DG}, I_{DG}, P_{DG}, Q_{DG}, f_{DG})$. The same structure is assumed for all DG units.
  • Figure 2: EMT digital twin microgrid and dataset generation framework. A grid-connected inverter-based microgrid is simulated under multiple disturbance scenarios. Synchronized measurements are collected and processed to extract key electrical variables $(V_1,V_2,V_3, I_1,I_2,I_3, P_{DG_k}, Q_{DG_k}, f_{DG_k})$. Derived features $(V_{mag}, P_{total}, Q_{total})$ are computed and segmented using a sliding-window approach with window length $W$ and stride $S$. The resulting dataset is organized into training, validation, and OOD test sets for surrogate modeling.
  • Figure 3: Real-time surrogate modeling workflow using CNN and LightGBM. Multivariate time-series windows $X_t \in \mathbb{R}^{W \times d}$ are processed in parallel: CNN captures temporal waveform patterns, while LightGBM learns structured nonlinear relationships from statistical features. The models predict key variables $(V_{mag}, f_{DG1}, P_{total}, V_{dip})$, followed by OOD evaluation under noise and communication delay, and runtime benchmarking against EMT simulation to assess real-time capability.
  • Figure 4: Training and evaluation of CNN and LightGBM models under OOD conditions, such as noise and communication delay scenarios. The digital twin simulation is used to generate the training and validation data for both models. CNN converges steadily across all targets, while LightGBM converges faster and stabilizes early. Both models are tested on noise and communication delay scenarios.
  • Figure 5: Comparison of model predictions and ground truth under unseen conditions for key microgrid variables: voltage magnitude ($V_{\mathrm{mag}}$), frequency ($f_{\mathrm{DG1}}$), total active power ($P_{\mathrm{total}}$), and voltage dip ($V_{\mathrm{dip}}$). Results from CNN, LightGBM, and the hybrid model are shown. Insets show small local differences between the models. Smooth variables ($V_{\mathrm{mag}}$, $P_{\mathrm{total}}$) and frequency are predicted accurately, while $V_{\mathrm{dip}}$ shows highly variable behavior with more visible deviations. The hybrid model provides consistent performance across both smooth and dynamic signals.
  • ...and 2 more figures