Chronological Evaluation of LSTM Forecasting and XGBoost Anomaly Detection in Three-Phase Power Monitoring
Abstract
Three-phase electrical monitoring produces multivariate streams that support both short-term power forecasting and early anomaly detection. This study evaluates a joint LSTM-XGBoost workflow on 30,240 semi-synthetic one-minute records containing 35 attributes and seven anomaly types. The labels were generated by rule-based anomaly injections over a real normal measurement base, and the prediction task is binary anomaly detection. The data were divided chronologically into 14 training days, three validation days, and four test days. An LSTM generated one-step active-power forecasts; its residuals were then combined with raw sensor, first-difference, temporal, and 15-sample history features for XGBoost classification. The LSTM achieved an MAE of 1.4596 W, outperforming persistence (1.5748 W) and the rolling mean (1.9437 W), with Wilcoxon p-values below 10⁻²³. Across ten seeds, the Proposed LSTM-XGB obtained F1 = 0.7008 ± 0.0101, ROC-AUC = 0.9530 ± 0.0074, and PR-AUC = 0.7913 ± 0.0094. However, Sensor+Difference XGBoost achieved the best threshold-dependent performance, with F1 = 0.7163 ± 0.0081 and PR-AUC = 0.8180 ± 0.0051. These results show that LSTM improves forecasting, whereas residual features provide limited incremental value for anomaly classification beyond direct sensor and first-difference features.