DOI: 10.58559/ijes.1919288 ISSN: 2717-7513

Machine learning-based energy demand forecasting with dynamic pricing and security risk scoring: A big data analytics approach

Rabia Sultan Yıldırım Varlı
Accurate short-term energy demand forecasting is critical for effective grid management, dynamic pricing, and risk assessment in modern smart energy systems. This study proposes an integrated data-driven framework that combines Long Short-Term Memory (LSTM) neural network-based demand forecasting, rule-based dynamic pricing, and deviation-based security risk scoring. The LSTM model is trained using a sliding window approach, leveraging the previous 24 hours of consumption data to predict the next hour’s demand, and optimized with the Adam algorithm to capture nonlinear and temporal dependencies. Forecast performance is evaluated using RMSE, MAE, and MAPE metrics, demonstrating significant improvements over the persistence baseline, particularly during peak demand hours.In addition, the proposed LSTM model is benchmarked against traditional machine learning algorithms, namely Random Forest and Gradient Boosting, to provide a comprehensive comparative evaluation of forecasting performance. The predicted demand values feed into a dynamic pricing module, where price adjustments are applied according to demand percentiles, effectively balancing grid load and increasing revenue. Additionally, a normalized risk score is calculated based on forecast deviations, enabling early detection of anomalous consumption behaviors. Simulation results indicate that the proposed approach reduces peak-hour demand, enhances revenue, and provides reliable early warning for potential system anomalies. Comparative results show that while benchmark models may achieve competitive absolute error values, the LSTM model provides superior performance in relative error (MAPE), demonstrating higher robustness for energy management applications. Overall, the integrated framework demonstrates the effectiveness of combining advanced forecasting techniques with decision-support modules, offering a scalable and practical solution for short-term energy management in smart grids.

More from our Archive