Data-Driven Attack Detection Mechanism Against False Data Injection Attacks in DC Microgrids Using CNN-LSTM-Attention
Abstract
1. Introduction
- Novel Spatial-Temporal Detection Framework: This paper proposes a hybrid deep learning model integrating CNN, LSTM, and attention mechanisms to simultaneously capture spatial correlations and temporal dependencies in DC microgrid data. Unlike existing methods that focus solely on temporal or spatial features, our approach provides a more comprehensive detection mechanism against FDI attacks.
- Enhanced Feature Extraction via Attention Mechanism: By incorporating an attention mechanism, the proposed model dynamically weights the importance of different spatial and temporal features, improving detection accuracy and robustness.
- Simulation results validate the superior detection capability of our CNN-LSTM-Attention framework, demonstrating statistically significant improvements over conventional CNN-SVM [29] and MLP [30] approaches across all evaluation metrics. Namely, the accuracy, precision, F1-score, and recall could be at least improved 7.17%, 6.59%, 2.72% and 6.55%.
2. Covert Characteristics of FDI Attacks in Cyber–Physical Symmetry DC Microgrids
2.1. Physical Dynamic DC Microgrids Model
2.2. Covert Characteristics of FDI Attacks
3. Methods
3.1. Spatial Feature Extraction Using CNN
3.2. Temporal Feature Extraction Using LSTM
3.3. Enhancing the Detection Performance Using Attention
3.4. Detection Framework Based on CNN-LSTM-Attention
Algorithm 1: Data-driven FDI attack detection using CNN-LSTM-Attention |
Input: Data set including train and test set Output: Output label of test data 1. Divide the dataset into train and test data 2. Construct the CNN-LSTM-Attention Detection Model 3. Train the LSTM-Attention Detection Model 4. for i ∈ [1, Total Epochs ] 5. for j ∈ [1, Number of Training Data] 6. Compute the predicted attack probability in Equation (13); 7. end for 8. Compute the loss function in Equation (14); 9. If the loss function is not minimized 10. Update training model parameters; 11. else 12. End training 13. end for 14. Detect the FDI attacks using the pre-trained CNN-LSTM-Attention Detection Model 15. if Predict Attacked Probability > 1 − Predict Attacked Probability 16. Output − Test = Abnormal; 17. else 18. Output − Test = normal; 19. end if 20. return |
3.5. Discussion on the Application of CNN-LSTM-Attention in Practical DC Microgrid Systems
4. Results
4.1. Simulation and Data Setup
4.2. Evaluation Indicators
4.3. Ablation Analysis
4.4. Detection Performance with Evaluation Indicators Under Different Detection Models
4.5. Detection Performance with Variable Attack Intensity and ROC Under Different Detection Models
5. Conclusions and Discussions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Bharothu, J.N.; Sridhar, M.; Rao, R.S. Modified adaptive differential evolution based optimal operation and security of AC-DC microgrid systems. Int. J. Electr. Power Energy Syst. 2018, 103, 185–202. [Google Scholar] [CrossRef]
- Kanakadhurga, D.; Prabaharan, N. Demand side management in microgrid: A critical review of key issues and recent trends. Renew. Sustain. Energy Rev. 2022, 156, 111915. [Google Scholar] [CrossRef]
- Alam, M.S.; Hossain, M.A.; Shafiullah, M.; Islam, A.; Choudhury, M.S.H.; Faruque, M.O.; Abido, M.A. Renewable energy integration with DC microgrids: Challenges and opportunities. Electr. Power Syst. Res. 2024, 234, 110548. [Google Scholar] [CrossRef]
- Leal, A.G.; Lazzaretti, A.E.; López-Salamanca, H.L. Enhanced estimation of wind turbine grounding resistance using clamp-on metering, computational simulation, and machine learning techniques. Electr. Power Syst. Res. 2024, 236, 110942. [Google Scholar] [CrossRef]
- Dey, B.; Misra, S.; Marquez, F.P.G. Microgrid system energy management with demand response program for clean and economical operation. Appl. Energy 2023, 334, 120717. [Google Scholar] [CrossRef]
- Shimomachi, K.; Hara, R.; Kita, H. Comparison between DC and AC microgrid systems considering ratio of DC load. In Proceedings of the IEEE PES Asia-Pacific Power and Energy Engineering Conference, Brisbane, Australia, 15–18 November 2015; IEEE: New York, NY, USA; pp. 1–4. [Google Scholar]
- Li, T.; Wen, X.; Zhou, J.; Du, S.; Chen, B. Voltage control for DC microgrid under DoS attacks: A security predictive control approach. ISA Trans. 2025, 162, 179–186. [Google Scholar] [CrossRef]
- Sarangi, R.R.; Ray, P.K. Asit Mohanty, Shafi Khadem, Sandipan Patra, Enhancing DC microgrid security: A comprehensive review of protection challenges and solutions. Int. J. Electr. Power Energy Syst. 2025, 168, 110687. [Google Scholar] [CrossRef]
- Zhang, Z.; Turnbull, B.; Kermanshahi, S.K.; Pota, H.; Damiani, E.; Yeun, C.Y.; Hu, J. A survey on resilient microgrid system from cybersecurity perspective. Appl. Soft Comput. 2025, 175, 113088. [Google Scholar] [CrossRef]
- Koduru, S.S.; Machina, V.S.P.; Madichetty, S. Cyber attacks in cyber-physical microgrid systems: A comprehensive review. Energies 2023, 16, 4573. [Google Scholar] [CrossRef]
- Aghmadi, A.; Hussein, H.; Polara, K.H.; Mohammed, O. A comprehensive review of architecture, communication, and cybersecurity in networked microgrid systems. Inventions 2023, 8, 84. [Google Scholar] [CrossRef]
- Hou, Y.; Liu, M.; Shen, N. A Simulation Research Method for Data Injection Attacks on DC Microgrids. In Proceedings of the 2024 China Automation Congress (CAC), Qingdao, China, 1–3 November 2024; pp. 2460–2465. [Google Scholar]
- Habibi, M.R.; Sahoo, S.; Rivera, S.; Dragičević, T.; Blaabjerg, F. Decentralized coordinated cyber-attack detection and mitigation strategy in DC microgrids based on artificial neural networks. IEEE Trans. Emerg. Sel. Top. Power Electron. 2021, 9, 4629–4638. [Google Scholar] [CrossRef]
- Tan, S.; Xie, P.; Guerrero, J.M.; Vasquez, J.C. False Data Injection Cyber-Attacks Detection for Multiple DC Microgrid Clusters. Appl. Energy 2022, 310, 118425. [Google Scholar] [CrossRef]
- Gallo, A.J.; Turan, M.S.; Boem, F.; Parisini, T.; Ferrari-Trecate, G. A Distributed Cyber-Attack Detection Scheme With Application to DC Microgrids. IEEE Trans. Autom. Control 2020, 65, 3800–3815. [Google Scholar] [CrossRef]
- Habibi, M.R.; Baghaee, H.R.; Blaabjerg, F.; Dragičević, T. Secure MPC/ANN-Based False Data Injection Cyber-Attack Detection and Mitigation in DC Microgrids. IEEE Syst. J. 2022, 16, 1487–1498. [Google Scholar] [CrossRef]
- Wu, Z.; Peng, C.; Tian, E.; Zhang, Y. Plug and Play Detector Design for DC Microgrids With Unknown-Inputs-Based FDI Attack. IEEE Trans. Smart Grid 2025, 16, 2052–2064. [Google Scholar] [CrossRef]
- Liu, M.; Zhao, C.; Deng, R.; Cheng, P.; Chen, J. False data injection attacks and the distributed countermeasure in DC microgrids. IEEE Trans. Control Netw. Syst. 2022, 9, 1962–1974. [Google Scholar] [CrossRef]
- Xiahou, K.; Liu, Y.; Wu, Q.H. Decentralized Detection and Mitigation of Multiple False Data Injection Attacks in Multiarea Power Systems. IEEE J. Emerg. Sel. Top. Ind. Electron. 2022, 3, 101–112. [Google Scholar] [CrossRef]
- Cui, H.; Dong, X.; Deng, H.; Dehghani, M.; Alsubhi, K.; Aljahdali, H.M.A. Cyber Attack Detection Process in Sensor of DC Micro-Grids Under Electric Vehicle Based on Hilbert–Huang Transform and Deep Learning. IEEE Sens. J. 2021, 21, 15885–15894. [Google Scholar] [CrossRef]
- Zhao, X.; Ma, Z.; Shi, X.; Zou, S. Attack Detection and Mitigation Scheme of Load Frequency Control Systems Against False Data Injection Attacks. IEEE Trans. Ind. Inform. 2024, 20, 9952–9962. [Google Scholar] [CrossRef]
- Han, S.; Zhong, Q.; Shi, K.; Kwon, O.-M.; Cai, X.; Zhong, S. Nonfragile power and frequency control in islanded microgrids under abnormal asynchronous stochastic cyber attacks. ISA Trans. 2023, 143, 409–419. [Google Scholar] [CrossRef]
- Alankrita; Pati, A.; Adhikary, N. Detection and mitigation against false data injection attacks using SHT and ANN in distributed control of DC microgrid. Electr. Power Syst. Res. 2025, 241, 111356. [Google Scholar] [CrossRef]
- Habibi, M.R.; Baghaee, H.R.; Blaabjerg, F.; Dragičević, T. Secure Control of DC Microgrids for Instant Detection and Mitigation of Cyber-Attacks Based on Artificial Intelligence. IEEE Syst. J. 2022, 16, 2580–2591. [Google Scholar] [CrossRef]
- Habibi, M.R.; Baghaee, H.R.; Dragicevic, T.; Blaabjerg, F. Detection of false data injection cyber-attacks in DC microgrids based on recurrent neural networks. IEEE J. Emerg. Sel. Top. Power Electron. 2021, 9, 5294–5310. [Google Scholar] [CrossRef]
- Souri, N.; Mehrizi-Sani, A. Hybrid Machine Learning Approach for Cyberattack Mitigation of Parallel Converters in a DC Microgrid. In Proceedings of the IECON 2024—50th Annual Conference of the IEEE Industrial Electronics Society, Chicago, IL, USA, 3–6 November 2024; pp. 1–6. [Google Scholar]
- Taher, M.A.; Iqbal, H.; Tariq, M.; Sarwat, A.I. Recurrent Neural Network-Based Sensor Data Attacks Identification in Distributed Renewable Energy-Based DC Microgrid. In Proceedings of the 2024 IEEE Texas Power and Energy Conference (TPEC), College Station, TX, USA, 13–14 February 2024; pp. 1–6. [Google Scholar]
- Birthriya, S.K.; Ahlawat, P.; Jain, A.K. Intelligent Phishing Website Detection: A CNN-SVM Approach with Nature-Inspired Hyperparameter Tuning. Cyber Secur. Appl. 2025, 100100. [Google Scholar] [CrossRef]
- Rendón-Segador, F.J.; Álvarez-García, J.A.; Varela-Vaca, A.J. Paying attention to cyber-attacks: A multi-layer perceptron with self-attention mechanism. Comput. Secur. 2023, 132, 103318. [Google Scholar] [CrossRef]
- Lin, Y.; Abur, A. A highly efficient bad data identification approach for very large scale power systems. IEEE Trans. Power Syst. 2018, 33, 5979–5989. [Google Scholar] [CrossRef]
- Asghari, M.; Ameli, A.; Ghafouri, M.; Kirakosyan, A. An optimal cyber–physical attack strategy on DC microgrids. Int. J. Electr. Power Energy Syst. 2024, 157, 109900. [Google Scholar] [CrossRef]
ith filter current; | parameter variations of the capacitor; | ||
ith filter voltage; | parameter variations of the inductance; | ||
sample time; | resistances of the power lines; | ||
ith filter capacitor; | neighbor of ith MG; | ||
ith filter inductance; | equivalent current load; | ||
ith filter resistance; | equivalent impedance load; | ||
external disturbance; | voltage command of the converter; | ||
measurement output; | measurement output under attack; | ||
precomputed threshold; | estimation output under attack; | ||
state change caused by attack; | estimation state under attack; | ||
Jacobian matrix; | false attack vector |
Model | A | P | RDR | FS |
---|---|---|---|---|
CNN-LSTM-Attention | 98.59% | 97.81% | 99.50% | 98.65% |
CNN-LSTM | 94.11% | 90.13% | 99.50% | 94.58% |
CNN | 80.28% | 72.48% | 99.75% | 83.95% |
LSTM | 87.32% | 80.93% | 98.76% | 88.96% |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, C.; Wang, X.; Chen, X.; Han, A.; Zhang, X. Data-Driven Attack Detection Mechanism Against False Data Injection Attacks in DC Microgrids Using CNN-LSTM-Attention. Symmetry 2025, 17, 1140. https://doi.org/10.3390/sym17071140
Li C, Wang X, Chen X, Han A, Zhang X. Data-Driven Attack Detection Mechanism Against False Data Injection Attacks in DC Microgrids Using CNN-LSTM-Attention. Symmetry. 2025; 17(7):1140. https://doi.org/10.3390/sym17071140
Chicago/Turabian StyleLi, Chunxiu, Xinyu Wang, Xiaotao Chen, Aiming Han, and Xingye Zhang. 2025. "Data-Driven Attack Detection Mechanism Against False Data Injection Attacks in DC Microgrids Using CNN-LSTM-Attention" Symmetry 17, no. 7: 1140. https://doi.org/10.3390/sym17071140
APA StyleLi, C., Wang, X., Chen, X., Han, A., & Zhang, X. (2025). Data-Driven Attack Detection Mechanism Against False Data Injection Attacks in DC Microgrids Using CNN-LSTM-Attention. Symmetry, 17(7), 1140. https://doi.org/10.3390/sym17071140