Electricity Consumption Anomaly Detection Using K-Means and ARIMA with Enhanced Preprocessing

Authors

  • Efa Yumna Purwono Fakultas Teknologi Indsutri, Magister Teknik Elektro, Universitas Islam Sultan Agung, Semarang, Indonesia 50112
  • Sri Arttini Dwi Prasetyowati2 Sultan Agung Islamic University

DOI:

https://doi.org/10.33795/jip.v12i1.8830

Keywords:

k-means clustering, ARIMA, Anomaly detection, electricity consumption, smart grid

Abstract

This study proposes an integrated K-Means and ARIMA framework for electricity consumption anomaly detection at PT PLN UP3 Semarang. K-Means segments customers into low, medium, and high consumption groups, with the optimal K determined using the Elbow method, Silhouette score, and Davies-Bouldin index. ARIMA models predict consumption trends for each cluster, validated using ACF, PACF, and AIC criteria. Anomaly detection employs residual analysis between actual and predicted consumption. Cluster-specific thresholds are dynamically set: μ ± 2σ for normal residual distributions (p ≥ 0.05), Q3 + 1.5 × IQR for non-normal distributions (p < 0.05), and Median ± 3 × MAD for highly skewed or small samples. The framework achieved a Precision of 0.88, Recall of 0.85, and F1-Score of 0.86, outperforming a clustering-only baseline (F1-Score: 0.72). This robust, segment-based approach, validated on real monthly data (January 2012 - February 2024), enhances anomaly sensitivity, interpretability, and operational relevance for proactive energy management. Future work will integrate engineering-based criteria such as power factor and voltage deviation to detect technical anomalies.

Downloads

Download data is not yet available.

References

Al-Wakeel, A., Wu, J., & Jenkins, N. (2017). k-means based load estimation of domestic smart meter measurements. Applied Energy, 194, 333–342. https://doi.org/10.1016/J.APENERGY.2016.06.046

Arvio, Y., Sangadji, I. B. M., Kusuma, D. T., & Heribertus, Z. (2024). K-Means Clustering Analysis to Identify Electrical Load Consumption Patterns Based on Primary Energy Consumption. International Conference on Electrical Engineering, Computer Science and Informatics (EECSI), 645–650. https://doi.org/10.1109/EECSI63442.2024.10776271

Hamdhani, M., Purwitasari, D., & Raharjo, A. B. (2022). Identifikasi Profil Konsumsi Enegri Listrik untuk Meningkatkan Pendapatan dengan Klustering. Journal of Information System,Graphics, Hospitality and Technology, 4(2), 62–70. https://doi.org/10.37823/INSIGHT.V4I2.232

Jasmine Christina Magdalene, J., & Heber, B. (n.d.). Prediction of Energy Consumption in a Smart Home Using Deepened K-Means Clustering ARIMA Model. Ilkogretim Online-Elementary Education Online, Year, 20(4), 1171–1178. https://doi.org/10.17051/ilkonline.2021.04.131

Kardi, M., AlSkaif, T., Tekinerdogan, B., & Catalão, J. P. S. (2021). Anomaly Detection in Electricity Consumption Data using Deep Learning. 21st IEEE International Conference on Environment and Electrical Engineering and 2021 5th IEEE Industrial and Commercial Power System Europe, EEEIC / I and CPS Europe 2021 - Proceedings. https://doi.org/10.1109/EEEIC/ICPSEUROPE51590.2021.9584650

Maori, N. A., & Evanita, E. (2023). Metode Elbow dalam Optimasi Jumlah Cluster pada K-Means Clustering. Simetris: Jurnal Teknik Mesin, Elektro Dan Ilmu Komputer, 14(2), 277–288. https://doi.org/10.24176/SIMET.V14I2.9630

Maya Sari Wahyuni, Zaki, A., Hidayat, S., & Pratama, M. I. (2024). Penerapan Metode ARIMA dalam Meramalkan Kebutuhan Energi Listrik di Kota Makassar. Journal of Mathematics, Computations and Statistics, 7(2), 323–331. https://doi.org/10.35580/JMATHCOS.V7I2.4388

Miraftabzadeh, S. M., Colombo, C. G., Longo, M., & Foiadelli, F. (2023). K-Means and Alternative Clustering Methods in Modern Power Systems. IEEE Access, 11, 119596–119633. https://doi.org/10.1109/ACCESS.2023.3327640

Mutiah, S., Hasnataeni, Y., Fitrianto, A., Risman Dwi Jumansyah, L., & dan Sains, S. (2024). Perbandingan Metode Klastering K-Means dan DBSCAN dalam Identifikasi Kelompok Rumah Tangga Berdasarkan Fasilitas Sosial Ekonomi di Jawa Barat. Teorema: Teori Dan Riset Matematika, 9(2), 247–260. https://doi.org/10.25157/TEOREMA.V9I2.16290

Rajabi, A., Eskandari, M., Ghadi, M. J., Li, L., Zhang, J., & Siano, P. (2020). A comparative study of clustering techniques for electrical load pattern segmentation. Renewable and Sustainable Energy Reviews, 120, 109628. https://doi.org/10.1016/J.RSER.2019.109628

Yilmaz, S., Chambers, J., & Patel, M. K. (2019). Comparison of clustering approaches for domestic electricity load profile characterisation - Implications for demand side management. Energy, 180, 665–677. https://doi.org/10.1016/J.ENERGY.2019.05.124

Zhang, J., Zhang, H., Ding, S., & Zhang, X. (2021). Power Consumption Predicting and Anomaly Detection Based on Transformer and K-Means. Frontiers in Energy Research, 9, 779587. https://doi.org/10.3389/FENRG.2021.779587/BIBTEX

Downloads

Published

2025-11-30

How to Cite

Purwono, E. Y., & Sri Arttini Dwi Prasetyowati2. (2025). Electricity Consumption Anomaly Detection Using K-Means and ARIMA with Enhanced Preprocessing . Jurnal Informatika Polinema, 12(1), 19–28. https://doi.org/10.33795/jip.v12i1.8830