Projects

Frequency Restoration in Islanded Microgrids Using Oracle-QP, a DNN, and a Fast Analytical Safety Filter

This project presents a hybrid control framework for frequency restoration in an islanded low-inertia microgrid comprising two photovoltaic units, two diesel generators, and a battery energy storage system. An Oracle Quadratic Program (Oracle-QP) generates reference dispatch actions while accounting for power limits, actuator ramp-rate constraints, battery state-of-charge limits, power balance, and a soft one-step frequency-protection condition. A deep neural network is trained through supervised imitation learning on data generated from 30 randomized Oracle episodes, totaling 30,030 state-action samples. Before application to the microgrid, each DNN action is processed by a fast analytical safety filter that clips commands to admissible bounds, redistributes power mismatch within the available operating margins, and applies a conservative one-step frequency guard. The controller was evaluated on 100 separately seeded disturbance episodes. It closely reproduced Oracle-QP behaviour while reducing the mean computation time from 1.085 ms to 0.218 ms per control step, corresponding to an approximately five-fold speedup. The reported results are simulation-based and do not represent field deployment.

Completed Mar 2026 - Jul 2026 Independent Research Project Remote
Frequency Restoration in Islanded Microgrids Using Oracle-QP, a DNN, and a Fast Analytical Safety Filter
Project Overview

Project Overview

Research Innovation

Summary
This project presents a hybrid control framework for frequency restoration in an islanded low-inertia microgrid comprising two photovoltaic units, two diesel generators, and a battery energy storage system. An Oracle Quadratic Program (Oracle-QP) generates reference dispatch actions while accounting for power limits, actuator ramp-rate constraints, battery state-of-charge limits, power balance, and a soft one-step frequency-protection condition. A deep neural network is trained through supervised imitation learning on data generated from 30 randomized Oracle episodes, totaling 30,030 state-action samples. Before application to the microgrid, each DNN action is processed by a fast analytical safety filter that clips commands to admissible bounds, redistributes power mismatch within the available operating margins, and applies a conservative one-step frequency guard. The controller was evaluated on 100 separately seeded disturbance episodes. It closely reproduced Oracle-QP behaviour while reducing the mean computation time from 1.085 ms to 0.218 ms per control step, corresponding to an approximately five-fold speedup. The reported results are simulation-based and do not represent field deployment.


This project presents an integrated research framework for frequency restoration in an islanded low-inertia multi-source microgrid. The system combines renewable generation, conventional generation, battery energy storage, optimization-based reference control, deep-neural-network policy imitation, and explicit online constraint handling.

Research Problem


Load disturbances and renewable-generation variations can produce rapid frequency deviations in islanded microgrids, particularly when the system has low equivalent inertia. Control actions must therefore restore frequency while respecting generation limits, actuator ramp rates, battery state-of-charge constraints, power balance, and frequency-protection conditions.

Proposed Architecture


     

  •    Microgrid model:
       Two photovoltaic units, two diesel generators, and one battery energy storage system implemented in a MATLAB-based simulation environment.
     
  •  


  •    Oracle-QP:
       A quadratic-programming reference controller that accounts for power limits, actuator ramp-rate constraints, battery state-of-charge limits, power balance, and a soft one-step frequency-protection condition.
     
  •  


  •    DNN policy imitation:
       A deep neural network is trained through supervised imitation learning to approximate the Oracle dispatch policy with low-cost online inference.
     
  •  


  •    Fast analytical safety filter:
       Each nominal DNN action is clipped to admissible actuator bounds, residual power mismatch is redistributed within the available operating margins, and a conservative one-step frequency guard is applied.
     
  •  


  •    Optional Safety-QP projection:
       A QP-based safety projection is also implemented as an alternative experimental mode. The numerical results reported in the current preprint use the fast analytical safety filter.
     

Training and Evaluation


     
  • 30 randomized Oracle training episodes.

  •  
  • 1001 samples per episode.

  •  
  • 30,030 state-action samples in total.

  •  
  • 100 separately seeded evaluation episodes not used during training.

  •  
  • Evaluation metrics include frequency nadir, RMS frequency deviation, maximum rate of change of frequency, power-mismatch RMSE, final battery state of charge, and controller runtime.

Main Results


The learned policy with the fast analytical safety filter closely reproduced the Oracle-QP behaviour across the evaluated disturbance scenarios. The mean computation time per control step decreased from 1.085 ms for Oracle-QP to 0.218 ms for the learned controller, corresponding to an approximately five-fold speedup.


The results demonstrate the feasibility of combining mathematical optimization, imitation learning, and lightweight analytical constraint enforcement to develop computationally efficient frequency control for islanded microgrids.

Limitations


The reported results are simulation-based and do not represent field deployment or experimental hardware validation. The analytical safety filter redistributes mismatch only within the available operating margins, and residual mismatch may remain when sufficient actuator headroom is unavailable. Future work includes real-time testing and Hardware-in-the-Loop validation.

Research Output


The project results are available as an independent research preprint, Version 1.0, on Zenodo:



10.5281/zenodo.21500640

Gallery

Project gallery

View All

Frequency Restoration in Islanded Microgrids Using Oracle-QP, a DNN, and a Fast Analytical Safety Filter
Frequency Restoration in Islanded Microgrids Using Oracle-QP, a DNN, and a Fast Analytical Safety Filter
Frequency Restoration in Islanded Microgrids Using Oracle-QP, a DNN, and a Fast Analytical Safety Filter
Participated Team Members

Participated Team Members

Team Members