Network-Aware Control Barrier Functions for Resilient Microgrids Under Stealthy Drift Attacks
Abstract
1. Introduction
1.1. Literature Review and Related Work
1.1.1. Evolution of Control Barrier Functions (CBFs)
1.1.2. The Challenge of Time Delays and Input Constraints
1.1.3. Research Gaps and Core Contributions
- CBFs in the current literature assume perfect, delay-free feedback. They do not incorporate heterogeneous, non-minimum phase communication latencies into their safety guarantees, causing the barrier filters to become closed-loop unstable under practical latencies.
- Existing advanced sensing and machine learning frameworks excel at isolating attacks or sub-threshold drift but operate strictly as passive detection systems, lacking the ability to translate detection parameters into real-time corrective control inputs.
- Conventional delay-aware methods rely heavily on predictive states or assume linear, perturbation-free plants. No unified framework seamlessly balances dynamic load variance, stealthy cyber-drift, and latency metrics within a single parameter-dependent, active supervisor layer.
1.2. Proposed Work and Key Contributions
- We develop a framework that captures the structural asymmetries between physical power-flow couplings and directional cyber-communication links, enabling a representation of cyber–physical interactions under attack.
- We construct a class of CBFs that embed algebraic network invariants derived from and explicitly incorporate heterogeneous, time-varying communication delays into the safety constraints, directly counteracting the RHP zeros introduced by transport latency.
- We introduce a dynamic modulation loop that couples the CBF safety margin with spatio-temporal residuals. This mechanism tightens or relaxes safety boundaries based on real-time threat levels, enabling minimally invasive operation under nominal conditions and aggressive intervention under attack.
- Using a Lyapunov–Krasovskii functional, we prove that the tracking error is Input-to-State Stable (ISS) with respect to both bounded drift perturbations and worst-case network delays, ensuring robust stability and formal safety guarantees of the closed-loop system.
2. Cyber–Physical System (CPS) Modeling and Threat Framework
2.1. Dual-Graph Cyber–Physical Architecture
Physical Layer
2.2. Network Physics Invariants
2.3. Networked Communication Layer and Delay Model
2.4. Stealthy Drift Threat Model
Sub-Threshold Evasion
3. Resilient Safety Supervisor Design
3.1. Delay-Aware Physics-Informed CBF
3.2. Dynamic Threat-Adaptive Modulation Loop
3.3. QP Optimization Formulation
3.4. Algorithmic Workflow of the Resilient Safety Supervisor
| Algorithm 1 Delay-Aware Resilient Safety Supervisor |
|
Step-by-Step Execution Sequence
- Step 1: Data Acquisition Layer
- Step 2: Anomaly Assessment Layer
- Step 3: Boundary Adaptation Layer
- Step 4: Convex Optimization Layer
- Step 5: Physical Execution Layer
4. Mathematical Stability and Tracking Analysis
4.1. Stability Under Delays and Drift Attacks
- 1.
- Increasing : Maximizing the baseline controller’s nominal convergence rate narrows the core residual set.
- 2.
- Tuning the Adaptation Gains (): Lowering the upper bound of the threat modulation term by scaling down κ or optimizing the residual sensitivity β directly tightens the physical safe set boundary during an anomaly.
- 3.
- Adjusting the Penalty Weight γ: In the barrier function definition, increasing γ heavily penalizes structural electrical departures from , effectively creating an operational buffer zone that prevents the state from approaching physical thresholds even as the tracking error expands.
4.2. Maximum Delay Tolerable Bound
4.3. Numerical Stability and Delay-Margin Verification via Parametric Root Locus
- The numerator and denominator polynomials in (34) are Hurwitz twins, ensuring that (0 dB) across all frequencies . This accurately mirrors the physical reality of a communication buffer, which delays signal transmission without attenuating its physical amplitude.
- By matching the Maclaurin series expansion of up to the fourth derivative (), (34) provides excellent approximation fidelity of the true phase lag () up to a phase shift approaching 180°.
4.3.1. Baseline System Degradation
4.3.2. Active CBF Supervisor Modification
4.3.3. Quantitative Delay Margin and Instability Boundaries
4.4. Dynamic Stability and Resilience Under Transient Disturbances
5. Experimental Simulation Environment
5.1. OPSD Load Data and Preprocessing
- Total Load (MW): Daily mean, minimum, and maximum electrical demand across the German transmission system.
- Solar Generation (MW): Daily aggregated photovoltaic output, capturing diurnal and seasonal variability.
- Wind Generation (MW): Daily aggregated onshore and offshore wind production.
- Temperature (°C): Daily mean ambient temperature, which correlates with heating and cooling loads.
- Timestamp Metadata: A continuous daily time index, enabling direct temporal alignment with simulation horizons.
5.2. Performance
- Baseline: Under nominal conditions, the communication network introduces only stochastic jitter. The CBF supervisor remains inactive, allowing the baseline controller to operate freely. Tracking errors remain small and the barrier function stays near zero, confirming that the supervisor does not interfere with normal operation or introduce unnecessary conservatism.
- Networked Attack Without Supervisor: A stealthy drift attack is initiated at , injecting a low-frequency bias that mimics natural load variations. Because the attack is slow and coordinated, the distributed observer fails to detect the corruption in real time. The communication delay prevents timely correction of the corrupted setpoints, causing the baseline controller to drive Bus 4 into a voltage collapse at . This scenario highlights the vulnerability of conventional distributed controllers to masked drift and coordinated multi-link cyber intrusions.
- Networked Attack With Supervisor: When the same drift attack is applied, the spatio-temporal residual generated begins to deviate from its nominal signature. The proposed supervisor immediately activates the delay-compensated QP, filtering malicious components from the corrupted packets. As the barrier function coefficient contracts, the supervisor enforces the safety constraint and stabilizes the voltage profile at a safe operating floor. This demonstrates the architecture’s ability to maintain forward invariance and prevent voltage collapse even under coordinated cyber–physical disturbances.
6. Results and Discussion
6.1. Voltage Regulation Under Heterogeneous Disturbances
6.2. Barrier Function Behavior and Safety Margin Preservation
6.3. Quantifying Safety Improvements Through Integrated Violations
6.4. Implications for Smart Sensing and Optimal Distribution Operation
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| CBFs | Control Barrier Functions |
| ISS | Input-to-State Stable |
| DERs | Distributed Energy Resources |
| IBRs | Inverter-Based Resources |
| IDSs | Intrusion Detection Systems |
| IT | Information Technology |
| QP | Quadratic Program |
| CPS | Cyber–Physical System |
| FDI | False Data Injection |
| MHSA-LSTM | Multi-Head Self-Attention Long Short-Term Memory |
| ROMs | Reduced-Order Models |
| CLFs | Control Lyapunov Functions |
| CLBF | Control Lyapunov–Barrier Function |
| aCBFs | Adaptive Control Barrier Functions |
| DAEs | Differential-Algebraic Equations |
| OPSD | Open Power System Data |
| RHP | Right-Half Plane |
| LHP | Left-Half Plane |
| PnP | Plug-and-Play |
| PV | Photovoltaic |
References
- de Lima, T.D.; Lezama, F.; Soares, J.; Franco, J.F.; Vale, Z. Modern distribution system expansion planning considering new market designs: Review and future directions. Renew. Sustain. Energy Rev. 2024, 202, 114709. [Google Scholar] [CrossRef]
- Al Khafaf, N.; Song, H.; Kamoona, A.; Sabar, N.; McGrath, B.; Yu, X.; Jalili, M. Smart meter data intelligence for sustainable distribution network operations: State-of-the-Art applications and pathways toward net-zero. Renew. Sustain. Energy Rev. 2026, 231, 116723. [Google Scholar] [CrossRef]
- Chatzivasileiadis, S.; Aristidou, P.; Dassios, I.; Dragicevic, T.; Gebbran, D.; Milano, F.; Rahmann, C.; Ramasubramanian, D. Micro-flexibility: Challenges for power system modeling and control. Electr. Power Syst. Res. 2023, 216, 109002. [Google Scholar] [CrossRef]
- Khalghani, M.R.; Verma, V.; Solanki, S.K.; Solanki, J.M. Resilient networked control of inverter-based microgrids against false data injections. Electronics 2022, 11, 780. [Google Scholar] [CrossRef]
- Ohemeng, M.O.; Sheldon, F.T. Physics-Constrained Optimization Framework for Detecting Stealthy Drift Perturbations. Mathematics 2026, 14, 1113. [Google Scholar] [CrossRef]
- Chlela, M. Cyber Security Enhancement Against Cyber-Attacks on Microgrid Controllers; McGill University: Montréal, QC, Canada, 2017. [Google Scholar]
- Ohemeng, M.O.; Sheldon, F.T. A Blockchain-Augmented CPS Framework to Mitigate FDI Attacks and Improve Resiliency. Digital 2026, 6, 22. [Google Scholar] [CrossRef]
- Alqahtani, A.; Ohemeng, M.O.; Sheldon, F.T. An Intelligent Sensing Framework for Early Ransomware Detection Using MHSA-LSTM Machine Learning. Sensors 2026, 26, 952. [Google Scholar] [CrossRef] [PubMed]
- Zargarzadeh-Esfahani, F.; Fani, B.; Keyvani-Boroujeni, B.; Sadeghkhani, I.; Sajadieh, M. Resilient oscillator-based cyberattack detection for distributed secondary control of inverter-interfaced Islanded microgrids. Sci. Rep. 2025, 15, 20685. [Google Scholar] [CrossRef] [PubMed]
- Jin, B.; Dou, C.; Zhang, B. Cyber–physical collaborative control for DC microgrid clusters under joint cyber-attacks. Electr. Power Syst. Res. 2024, 234, 110833. [Google Scholar] [CrossRef]
- Krause, T.; Ernst, R.; Klaer, B.; Hacker, I.; Henze, M. Cybersecurity in power grids: Challenges and opportunities. Sensors 2021, 21, 6225. [Google Scholar] [CrossRef] [PubMed]
- Ames, A.D.; Coogan, S.; Egerstedt, M.; Notomista, G.; Sreenath, K.; Tabuada, P. Control barrier functions: Theory and applications. In Proceedings of the 2019 18th European Control Conference (ECC); IEEE: Naples, Italy, 2019; pp. 3420–3431. [Google Scholar] [CrossRef]
- Michos, G.; Konstantopoulos, G.C. Decentralized Voltage Control of AC Microgrids with Constant Power Loads using Control Barrier Functions. IEEE Trans. Control Netw. Syst. 2026, 13, 1134–1145. [Google Scholar] [CrossRef]
- Garg, K.; Usevitch, J.; Breeden, J.; Black, M.; Agrawal, D.; Parwana, H.; Panagou, D. Advances in the theory of control barrier functions: Addressing practical challenges in safe control synthesis for autonomous and robotic systems. Annu. Rev. Control 2024, 57, 100945. [Google Scholar] [CrossRef]
- Wang, W.; Yu, N.; Gao, Y.; Shi, J. Safe off-policy deep reinforcement learning algorithm for volt-var control in power distribution systems. IEEE Trans. Smart Grid 2019, 11, 3008–3018. [Google Scholar] [CrossRef]
- Cohen, M.H.; Molnar, T.G.; Ames, A.D. Safety-critical control for autonomous systems: Control barrier functions via reduced-order models. Annu. Rev. Control 2024, 57, 100947. [Google Scholar] [CrossRef]
- Li, S.; Yuan, Z.; Chen, Y.; Luo, F.; Yang, Z.; Ye, Q.; Fu, W.; Fu, Y. Optimizable Control Barrier Functions to Improve Feasibility and Add Behavior Diversity while Ensuring Safety. Electronics 2022, 11, 3657. [Google Scholar] [CrossRef]
- Clark, A. Control barrier functions for stochastic systems. Automatica 2021, 130, 109688. [Google Scholar] [CrossRef]
- Romdlony, M.Z.; Jayawardhana, B. Stabilization with guaranteed safety using control Lyapunov–barrier function. Automatica 2016, 66, 39–47. [Google Scholar] [CrossRef]
- Jankovic, M. Control barrier functions for constrained control of linear systems with input delay. In Proceedings of the 2018 Annual American Control Conference (ACC); IEEE: Milwaukee, WI, USA, 2018; pp. 3316–3321. [Google Scholar] [CrossRef]
- Xiao, W.; Belta, C.; Cassandras, C.G. Adaptive control barrier functions. IEEE Trans. Autom. Control 2021, 67, 2267–2281. [Google Scholar] [CrossRef]
- Khalil, H.K.; Grizzle, J.W. Nonlinear Systems; Prentice Hall: Upper Saddle River, NJ, USA, 2002; Volume 3, p. 126. [Google Scholar]
- Karafyllis, I.; Jiang, Z.P. Stability and Stabilization of Nonlinear Systems; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
- Fridman, E. Introduction to Time-Delay Systems: Analysis and Control; Birkhäuser: Basel, Switzerland, 2014; Volume 75, p. 102. [Google Scholar] [CrossRef]
- Gu, K.; Chen, J.; Kharitonov, V.L. Stability of Time-Delay Systems; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2003. [Google Scholar]
- Open Power System Data, Time Series: Germany (Daily). 2020. Available online: https://data.open-power-system-data.org/time_series/ (accessed on 3 May 2026).
- University of Washington. Power System Test Case Archive: 14 Bus Power Flow Test Case, 1993, Department of Electrical and Computer Engineering. Available online: https://labs.ece.uw.edu/pstca/pf14/pg_tca14bus.htm (accessed on 25 June 2026).
- Zimmerman, R.D.; Murillo-Sánchez, C.E.; Thomas, R.J. MATPOWER: Steady-state operations, planning, and analysis tools for power systems research and education. IEEE Trans. Power Syst. 2010, 26, 12–19. [Google Scholar] [CrossRef]
- Baran, M.E.; Wu, F.F. Optimal capacitor placement on radial distribution systems. IEEE Trans. Power Deliv. 1989, 4, 725–734. [Google Scholar] [CrossRef]
- Guerrero, J.M.; Vasquez, J.C.; Matas, J.; De Vicuña, L.G.; Castilla, M. Hierarchical control of droop-controlled AC and DC microgrids—A general approach toward standardization. IEEE Trans. Ind. Electron. 2010, 58, 158–172. [Google Scholar] [CrossRef]
- Kundur, P. Power system stability. In Power System Stability and Control; CRC Press: Boca Raton, FL, USA, 2012; Available online: https://www.taylorfrancis.com/chapters/edit/10.4324/b12113-10/power-system-stability-prabha-kundur (accessed on 20 June 2026).
- Glover, J.D.; Sarma, M.S.; Overbye, T.J.; Padhy, N.P. Power System Analysis and Design; Cengage Learning: Stamford, CT, USA, 2012; Volume 2008. [Google Scholar]
- Pasqualetti, F.; Dörfler, F.; Bullo, F. Attack detection and identification in cyber-physical systems. IEEE Trans. Autom. Control 2013, 58, 2715–2729. [Google Scholar] [CrossRef]








| Category/Reference | Methodology | Limitations | Proposed Solution |
|---|---|---|---|
| Anomalies and Learning [5,6,7,8,15] | Physics optimization, Deep Reinforcement Learning (RL), Machine Learning (ML), and Blockchain verification. | Open-loop and passive; isolates anomalies but cannot execute real-time control adjustments. | Integrates real-time parameter tracking into an active control barrier layer. |
| Advanced CBF Theory [14,16,17,18] | Reduced-order models, optimizable limits, stochastic bounds. | Strictly delay-oblivious (). Phase margin collapses under practical network transport lags. | Employs a parameter-dependent damping factor to preserve stability. |
| Delay/Input Damping [19,20,21] | Predictor equations, CLBF loops, parameter adaptation. | Assumes perfectly linear dynamics or requires exact state predictors; vulnerable to compound cyber-drift. | Achieves structural forward safety invariance under compound, continuous cyber-drift. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Ohemeng, M.O.; Sheldon, F.T. Network-Aware Control Barrier Functions for Resilient Microgrids Under Stealthy Drift Attacks. Sensors 2026, 26, 4329. https://doi.org/10.3390/s26144329
Ohemeng MO, Sheldon FT. Network-Aware Control Barrier Functions for Resilient Microgrids Under Stealthy Drift Attacks. Sensors. 2026; 26(14):4329. https://doi.org/10.3390/s26144329
Chicago/Turabian StyleOhemeng, Mordecai Opoku, and Frederick T. Sheldon. 2026. "Network-Aware Control Barrier Functions for Resilient Microgrids Under Stealthy Drift Attacks" Sensors 26, no. 14: 4329. https://doi.org/10.3390/s26144329
APA StyleOhemeng, M. O., & Sheldon, F. T. (2026). Network-Aware Control Barrier Functions for Resilient Microgrids Under Stealthy Drift Attacks. Sensors, 26(14), 4329. https://doi.org/10.3390/s26144329

