Self-Supervised Representation Learning for UK Power Grid Frequency Disturbance Detection Using TC-TSS
Abstract
1. Introduction
2. Literature Review
Contribution
- We propose a Temporal Contrastive Self-Supervised Learning (TC-TSS) framework that learns discriminative and invariant temporal features directly from unlabelled frequency data, addressing the limitations of existing supervised methods that rely on large annotated datasets.
- We demonstrate that TC-TSS features outperform raw inputs, achieving higher classification accuracy and perfect ROC-AUC (1.00) with nonlinear models such as SVM and MLP.
- By applying temporal data augmentations (noise, scaling, shifting, and reordering), the framework learns robust invariances that support detection of both known and unseen disturbances.
- The approach is validated on real UK National Grid frequency data, using over 15 million measurements collected at a 1-s resolution across six months, ensuring practical relevance.
3. Materials and Methods
3.1. Data Details
3.2. Data Labelling
3.3. Feature Generation
3.4. Temporal Contrastive Self-Supervised Learning (TC-TSS)
- Data augmentation ≈ simulate stochastic perturbations of frequency behaviour.
- Encoder (CNN Encoder) ≈ nonlinear function extractor approximating temporal convolution over frequency response.
- Contrastive loss (with NT-Xent) ≈ enforces invariance to augmentation and discrimination of dynamics.
- is the cosine similarity;
- is a temperature hyperparameter;
- is an indicator function that excludes the anchor sample from the denominator.
3.5. Classification and Evaluation
4. Results
4.1. Embedding Visualisation with UMAP and t-SNE
4.2. Experimental Configuration
4.3. Model Comparison
5. Discussion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- National Energy System Operator (NESO). Operability Strategy Report; National Energy System Operator: London, UK, 2022. [Google Scholar]
- Pollitt, M.G. Lessons from the history of independent system operators in the energy sector. Energy Policy 2012, 47, 32–48. [Google Scholar] [CrossRef]
- Ford, R.; Hardy, J. Are we seeing clearly? The need for aligned vision and supporting strategies to deliver net-zero electricity systems. Energy Policy 2020, 147, 111902. [Google Scholar] [CrossRef] [PubMed]
- Shrestha, A.; Gonzalez-Longatt, F. Frequency stability issues and research opportunities in converter dominated power system. Energies 2021, 14, 4184. [Google Scholar] [CrossRef]
- Wang, Q.; Li, F.; Tang, Y.; Xu, Y. Integrating model-driven and data-driven methods for power system frequency stability assessment and control. IEEE Trans. Power Syst. 2019, 34, 4557–4568. [Google Scholar] [CrossRef]
- Dey, M.; Rana, S.P.; Simmons, C.V.; Dudley, S. Solar farm voltage anomaly detection using high-resolution μPMU data-driven unsupervised machine learning. Appl. Energy 2021, 303, 117656. [Google Scholar] [CrossRef]
- Dey, M.; Rana, S.P.; Wylie, J.; Simmons, C.V.; Dudley, S. Detecting power grid frequency events from μPMU voltage phasordata using machine learning. IET Conf. Proc. 2022, 2022, 125–129. [Google Scholar] [CrossRef]
- Jeffrey, N.; Tan, Q.; Villar, J.R. A review of anomaly detection strategies to detect threats to cyber-physical systems. Electronics 2023, 12, 3283. [Google Scholar] [CrossRef]
- Tapia, E.A.; Colomé, D.G.; Rueda Torres, J.L. Recurrent convolutional neural network-based assessment of power system transient stability and short-term voltage stability. Energies 2022, 15, 9240. [Google Scholar] [CrossRef]
- Su, L.; Zuo, X.; Li, R.; Wang, X.; Zhao, H.; Huang, B. A systematic review for transformer-based long-term series forecasting. Artif. Intell. Rev. 2025, 58, 80. [Google Scholar] [CrossRef]
- Dey, M.; Rana, S.P.; Dudley, S. Automated terminal unit performance analysis employing x-RBF neural network and associated energy optimisation—A case study based approach. Appl. Energy 2021, 298, 117103. [Google Scholar] [CrossRef]
- Jung, M.; Kim, D.Y. Pseudo-labeling and time-series data analysis model for device status diagnostics in smart agriculture. Appl. Sci. 2024, 14, 10371. [Google Scholar] [CrossRef]
- Minh, N.Q.; Khiem, N.T.; Giang, V.H. Fault classification and localization in power transmission line based on machine learning and combined CNN-LSTM models. Energy Rep. 2024, 12, 5610–5622. [Google Scholar] [CrossRef]
- Boucetta, L.N.; Amrane, Y.; Chouder, A.; Arezki, S.; Kichou, S. Enhanced forecasting accuracy of a grid-connected photovoltaic power plant: A novel approach using hybrid variational mode decomposition and a CNN-LSTM model. Energies 2024, 17, 1781. [Google Scholar] [CrossRef]
- Yu, P.; Cai, Z.; Zhang, H.; Cui, D.; Zhou, H.; Yu, R.; Zhou, Y. Prediction of Uncertainty Ramping Demand in New Power Systems Based on a CNN-LSTM Hybrid Neural Network. Processes 2025, 13, 2088. [Google Scholar] [CrossRef]
- Chollet, F. Deep Learning mit Python und Keras: Das Praxis-Handbuch vom Entwickler der Keras-Bibliothek; MITP-Verlags GmbH & Co. KG: Frechen, Germany, 2018. [Google Scholar]
- Majeed, M.A.; Phichaisawat, S.; Asghar, F.; Hussan, U. Data-Driven Optimized Load Forecasting: An LSTM Based RNN Approach for Smart Grids. IEEE Access 2025, 13, 99018–99031. [Google Scholar] [CrossRef]
- Wang, Q.; Zhang, C.; Lü, Y.; Yu, Z.; Tang, Y. Data inheritance–based updating method and its application in transient frequency prediction for a power system. Int. Trans. Electr. Energy Syst. 2019, 29, e12022. [Google Scholar] [CrossRef]
- Ericsson, L.; Gouk, H.; Loy, C.C.; Hospedales, T.M. Self-supervised representation learning: Introduction, advances, and challenges. IEEE Signal Process. Mag. 2022, 39, 42–62. [Google Scholar] [CrossRef]
- Goyal, P.; Mahajan, D.; Gupta, A.; Misra, I. Scaling and benchmarking self-supervised visual representation learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 6391–6400. [Google Scholar]
- Georgescu, M.I.; Barbalau, A.; Ionescu, R.T.; Khan, F.S.; Popescu, M.; Shah, M. Anomaly detection in video via self-supervised and multi-task learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 19–25 June 2021; pp. 12742–12752. [Google Scholar]
- Fei, K.; Li, Q.; Zhu, C.; Dong, M.; Li, Y. Electricity frauds detection in Low-voltage networks with contrastive predictive coding. Int. J. Electr. Power Energy Syst. 2022, 137, 107715. [Google Scholar] [CrossRef]
- Liu, X.; Liu, X.; Dou, J.; Zhu, Z.; Wang, J. A Virtual Measurement Method of Industrial Power Consumption Scenario Based on Self-Supervised Contrast Learning. In Proceedings of the 2025 10th Asia Conference on Power and Electrical Engineering (ACPEE), Beijing, China, 15–19 April 2025; pp. 1151–1155. [Google Scholar]
- Eldele, E.; Ragab, M.; Chen, Z.; Wu, M.; Kwoh, C.K.; Li, X.; Guan, C. Self-supervised contrastive representation learning for semi-supervised time-series classification. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 15604–15618. [Google Scholar] [CrossRef]
- Wang, X.; Jiao, S.; Chen, Q. Voltage Prediction of Lithium-Ion Battery Based on Time Contrastive Learning Model. Energy Technol. 2025, 13, 2401854. [Google Scholar] [CrossRef]
- Jeong, J.; Ku, T.Y.; Park, W.K. Denoising masked autoencoder-based missing imputation within constrained environments for electric load data. Energies 2023, 16, 7933. [Google Scholar] [CrossRef]
- Dong, Z.; Hou, K.; Liu, Z.; Yu, X.; Jia, H.; Tang, P.; Pei, W. A fast reliability assessment method for power system using self-supervised learning and feature reconstruction. Energy Rep. 2023, 9, 980–986. [Google Scholar] [CrossRef]
- Uelwer, T.; Robine, J.; Wagner, S.S.; Höftmann, M.; Upschulte, E.; Konietzny, S.; Behrendt, M.; Harmeling, S. A survey on self-supervised methods for visual representation learning. Mach. Learn. 2025, 114, 1–56. [Google Scholar] [CrossRef]
- Gong, X.; Wei, Y.; Du, W.; Gao, Y.; Guan, T. Self-supervised contrastive learning with time-frequency consistency for few-shot bearing fault diagnosis. Meas. Sci. Technol. 2025, 36, 066204. [Google Scholar] [CrossRef]
- Liu, D.; Wang, T.; Liu, S.; Wang, R.; Yao, S.; Abdelzaher, T. Contrastive self-supervised representation learning for sensing signals from the time-frequency perspective. In Proceedings of the 2021 International Conference on Computer Communications and Networks (ICCCN), Athens, Greece, 19–22 July 2021; pp. 1–10. [Google Scholar]
- Liu, Y.; Wang, K.; Liu, L.; Lan, H.; Lin, L. Tcgl: Temporal contrastive graph for self-supervised video representation learning. IEEE Trans. Image Process. 2022, 31, 1978–1993. [Google Scholar] [CrossRef]
- Ding, Y.; Zhuang, J.; Ding, P.; Jia, M. Self-supervised pretraining via contrast learning for intelligent incipient fault detection of bearings. Reliab. Eng. Syst. Saf. 2022, 218, 108126. [Google Scholar] [CrossRef]
- Maitreyee, D.; Rana, S.P. High-Resolution Electrical Measurement Data Processing. G.B. Patent Application No. GB2016025.5A, 21 December 2022. [Google Scholar]
- Ross, B.A.; Chen, Y.; Liu, Y.; Kim, J. Challenges, Industry Practice, and Research Opportunities for Protection of IBR-Rich Systems; Pacific Northwest National Laboratory (PNNL): Richland, WA, USA, 2024.
- Radhoush, S.; Whitaker, B.M.; Nehrir, H. An overview of supervised machine learning approaches for applications in active distribution networks. Energies 2023, 16, 5972. [Google Scholar] [CrossRef]
- National Grid ESO. Frequency Data Portal. 2025. Available online: https://www.nationalgrideso.com/data-portal/frequency-data (accessed on 4 June 2025).





| Model | Mean AUC | Std AUC |
|---|---|---|
| Logistic Regression (balance) | 0.5756 | 0.0457 |
| SVM (RBF, balance) | 0.9781 | 0.0180 |
| MLP (balance) | 0.9729 | 0.0422 |
| Random Forest | 0.9621 | 0.0409 |
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
Dey, M.; Rana, S.P. Self-Supervised Representation Learning for UK Power Grid Frequency Disturbance Detection Using TC-TSS. Energies 2025, 18, 5611. https://doi.org/10.3390/en18215611
Dey M, Rana SP. Self-Supervised Representation Learning for UK Power Grid Frequency Disturbance Detection Using TC-TSS. Energies. 2025; 18(21):5611. https://doi.org/10.3390/en18215611
Chicago/Turabian StyleDey, Maitreyee, and Soumya Prakash Rana. 2025. "Self-Supervised Representation Learning for UK Power Grid Frequency Disturbance Detection Using TC-TSS" Energies 18, no. 21: 5611. https://doi.org/10.3390/en18215611
APA StyleDey, M., & Rana, S. P. (2025). Self-Supervised Representation Learning for UK Power Grid Frequency Disturbance Detection Using TC-TSS. Energies, 18(21), 5611. https://doi.org/10.3390/en18215611
