Figures
Abstract
Accurate forecasting of electricity prices and loads is challenging in smart grids due to the strong interdependence between load and price. To address this, we propose two deep recurrent neural network models that forecast both load and price concurrently. The first model, Sparse Encoder Nonlinear Autoregressive Network (SENARX), introduces a sparse encoder for enhanced feature extraction and nonlinear autoregression with exogenous inputs. The second, GA-LSTM, integrates Long Short-Term Memory with genetic algorithm-based optimization to improve forecasting accuracy and robustness. Both models were evaluated using ISO New England data and outperformed benchmark models. The NARX model achieves MAPE values of 0.03 for load and 0.08 for price forecasting, while LSTM shows MAPE values of 1.53 and 1.91, respectively. The models demonstrate promising potential for real-time forecasting in smart grids. This paper presents a comparative study of SENARX and GA-LSTM against traditional methods such as ARIMA, SVM, and Bayesian Networks using market data from EPEX (Europe), IEX (India), and JEPX (Japan). SENARX achieved a MAPE of 3.82% (EPEX) and 4.13% (IEX), while GA-LSTM reached RMSE of 27.02 MW (EPEX) and 29.33 MW (JEPX). Compared to ARIMA (MAPE: 6.57%−7.21%, RMSE: up to 48.74 MW), the proposed models improved accuracy by over 40%. SENARX also trained faster (2385s vs 3100s for ARIMA). GA-LSTM showed faster convergence and lower error rates, and SENARX was robust against data noise. These characteristics make the models suitable for short-term load forecasting in dynamic and uncertain markets. Future work will test their performance under extreme events like peak demand and climate anomalies.
Citation: Nauman N, Akram S, Rashid M, Jaffar A, Bhatti SM, Fida B (2025) Dual-model approach for concurrent forecasting of electricity prices and loads in smart grids: Comparison of sparse encoder NAR and GA-optimized LSTM. PLoS One 20(9): e0330024. https://doi.org/10.1371/journal.pone.0330024
Editor: Jude Okolie,, University of Oklahoma, UNITED STATES OF AMERICA
Received: January 12, 2025; Accepted: July 24, 2025; Published: September 18, 2025
Copyright: © 2025 Nauman et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: The data relevant to this study are available from ISO New England at https://www.iso-ne.com/isoexpress/web/reports/pricing/-/tree/zone-info.
Funding: The author(s) received no specific funding for this work.
Competing interests: The authors have declared that no competing interests exist.
1 Introduction
The smart grid represents a modern and intelligent energy infrastructure that leverages advanced communication and information technologies to enhance the efficiency, reliability, security, and sustainability of electricity distribution systems [1,2]. Unlike conventional unidirectional grids, the smart grid supports two-way communication between utilities and consumers, enabling dynamic demand-side participation and improved real-time operational control. A critical component of the smart grid is the integration of renewable energy sources (RESs), which reduces greenhouse gas emissions and supports global sustainability goals [1,3]. Additionally, smart meters empower consumers to adjust their energy consumption in response to real-time price signals, thereby facilitating load shifting and peak shaving [2,4]. This capability establishes a price-responsive environment where electricity prices and demand are intrinsically linked. In contrast, traditional power systems operate without such dynamic interaction, limiting consumers’ responsiveness to fluctuating market conditions and thereby suppressing price elasticity [4,5]. However, the deployment of smart metering infrastructure has significantly altered this paradigm, creating strong correlations between electricity demand and market prices. Accurate forecasting of these variables is critical for grid stability, economic dispatch, and strategic market operations [6,7]. Even a minor improvement in forecasting accuracy, such as a 1% reduction in the Mean Absolute Percentage Error (MAPE), can lead to production cost savings of approximately 0.1%–0.3% in large-scale power systems [8]. The explosion of smart grid data has necessitated the use of big data analytics and machine learning techniques, especially deep learning models like Deep Neural Networks (DNNs), which excel in identifying complex patterns from high-dimensional data [2,9]. Among these, models such as Long Short-Term Memory (LSTM) networks [9], Recurrent Neural Networks (RNNs) [10], and Stacked DE noising Auto encoders (SDA) [11] have shown superior performance compared to conventional statistical and machine learning methods. These models are particularly effective in capturing temporal dependencies and nonlinearities inherent in electricity load and price data. Simultaneous forecasting of load and price is essential due to their bidirectional relationship, which, if not accounted for, may reduce prediction accuracy [12,13]. Various hybrid and ensemble models have been proposed to address this challenge, incorporating feature selection [6], clustering [8], and optimization algorithms [14,15] to improve forecasting performance. Consequently, the confluence of smart meter deployment, real-time pricing mechanisms, and advanced deep learning algorithms has redefined the landscape of electricity forecasting, making it indispensable for efficient and reliable smart grid operation [2,7]. The current study presents a promising approach by integrating GA-LSTM for electricity load forecasting; however, the methodology could be significantly strengthened by exploring the integration of hybrid GA-LSTM with probabilistic modeling techniques. Such a hybrid approach could better capture the inherent uncertainties in energy markets and provide probabilistic forecasting intervals, thereby enhancing decision-making reliability for grid operators and market participants. Moreover, while the literature review provides foundational insights, it predominantly references earlier studies. To enrich the contextual grounding of the work, it is essential to incorporate more recent and high-impact studies. Recommended sources for integration include: [16–25]. These recent contributions cover key advancements in hybrid modeling, AI-driven forecasting, uncertainty quantification, and resilience analysis, which are highly relevant to the current study. Furthermore, while the current manuscript is well-supported by extensive references, its scientific robustness can be improved by expanding the explanation of the methodology, particularly with respect to the internal mechanisms of GA tuning, loss minimization, and data preprocessing. In addition, a deeper comparative analysis between the proposed models and their traditional counterparts—both qualitatively and quantitatively—should be conducted using updated benchmarks. Finally, a broader discussion on the adaptability and robustness of the models across diverse markets and climatic conditions is warranted to support the generalizability of the findings. Addressing these suggestions will significantly enhance the scientific contribution, methodological clarity, and practical relevance of the study.
1.1 Motivation and problem statement
Accurate forecasting of electricity price and load plays a critical role in ensuring economic efficiency, grid reliability, and optimized market participation within smart grids. The evolution of advanced metering infrastructure (AMI) and the proliferation of sensors have resulted in an explosion of high-resolution energy data, providing significant opportunities for data- driven forecasting [2,9]. Recent studies, such as those by Jiang et al. [8] and Ahmad et al. [6], have utilized big data analytics and machine learning frameworks for predictive modeling in electricity markets. However, these approaches are often encumbered by complex feature engineering processes involving input denoising, correlation analysis, and dimensionality reduction, all of which increase computational cost and risk overfitting in real-world applications. Moreover, traditional and even some recent deep learning models forecast electricity price and load as separate entities [9,15], despite their proven bidirectional interdependence [12,13]. Ignoring this relationship may limit forecasting accuracy. Additionally, optimization of model hyper parameters—a crucial step for improving predictive performance—is generally carried out using trial-and-error or grid search techniques, which are both computationally inefficient and time-consuming [7]. To address these challenges, there is a growing need for advanced forecasting frameworks that (i) integrate automatic feature extraction, (ii) consider the inherent correlation between electricity price and load, and (iii) optimize hyperparameters intelligently with reduced human intervention and computational overhead.
1.2 Contributions
In response to the aforementioned limitations, this paper proposes two innovative and computationally efficient hybrid forecasting models—SENARX and GA-LSTM that simultaneously predict electricity price and load while reducing reliance on manual feature engineering. The key contributions are summarized as follows:
- SENARX: Sparse Encoder with NARX Forecasting. We propose a novel deep learning-based architecture, SENARX, which tightly integrates automatic feature extraction and forecasting within a unified framework. It employs a Sparse Encoder for deep feature representation learning, effectively eliminating the need for traditional manual feature engineering techniques. These learned features are then input to a Nonlinear Autoregressive model with Exogenous inputs (NARX), which is well-suited for modeling time-series data with exogenous factors [5,7]. SENARX thereby reduces computational complexity while maintaining robust predictive performance.
- GA-LSTM: Hyperparameter-Optimized LSTM. The second model, GA-LSTM, combines the temporal modeling strength of Long Short-Term Memory (LSTM) networks with the global optimization capabilities of Genetic Algorithms (GA). GA is employed to fine-tune key LSTM hyperparameters such as the number of layers, learning rate, and batch size, ensuring enhanced accuracy and faster convergence without manual intervention [14,15]. This hybridization makes GA-LSTM highly adaptable to complex nonlinear patterns and long-term dependencies in electricity markets.
- Simultaneous Price and Load Forecasting. Unlike traditional methods that model price and load separately, the proposed SENARX and GA-LSTM architectures are specifically designed to capture their underlying bidirectional relationship. This concurrent prediction strategy not only enhances accuracy but also provides a holistic view of market dynamics, thereby supporting improved operational and trading decisions.
- Big Data-Driven Insights. Both proposed models leverage large-scale electricity datasets, incorporating comprehensive statistical and graphical analyses to understand variable correlations and trends. This allows the models to benefit from the volume and variety dimensions of big data, enhancing forecasting precision and computational efficiency.
- Real-World Evaluation. The effectiveness of SENARX and GA-LSTM is validated using real electricity market datasets, demonstrating superior performance compared to conventional models across key metrics such as Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and computational time. This highlights their practical applicability in real-world forecasting scenarios.
2 Proposed systems
2.1 SENARX: Sparse encoder nonlinear autoregressive network with exogenous variables
The SENARX framework cohesively integrates advanced feature engineering and nonlinear temporal forecasting by coupling a Sparse Encoder (SE) with a Nonlinear Autoregressive Network with Exogenous Variables (NARX). The SE autonomously identifies and extracts low-dimensional yet highly discriminative representations from high-dimensional input data, while the NARX module capitalizes on both autoregressive and exogenous dependencies to generate high-fidelity multi-output forecasts for load and price signals.
2.1.1 Sparse feature extraction via SE.
Consider the multivariate input matrix , where n denotes the number of temporal observations and m represents the dimensionality of the input features. The encoder module transforms the high-dimensional input X into a compact latent space
where
, via a learned nonlinear mapping:
Here, W1 and b1 denote the learnable weight matrix and bias vector, respectively, and represents a non-linear activation function (e.g., ReLU), which introduces nonlinear modeling capability. The decoder attempts to reconstruct the original input X from the latent representation Z as:
where W2 and b2 are the decoder parameters. The reconstruction loss, combined with a sparsity-promoting regularization term, forms the overall SE objective function:
As seen in Eq. (3), the first term enforces reconstruction fidelity, ensuring that the latent space retains the essential structure of the original data. The second term, an ℓ1-norm penalty on Z, induces sparsity in the learned representation, thereby promoting model interpretability and computational efficiency. The trade-off between sparsity and accuracy is modulated by the regularization coefficient . This sparse representation Z serves as a refined and information-rich feature set for downstream forecasting tasks within the SENARX architecture.
2.1.2 Forecasting via NARX.
The latent representation Z, extracted via the Sparse Encoder, is utilized as the input for a nonlinear forecasting framework. Specifically, the Nonlinear Autoregressive Network with Exogenous Variables (NARX) is employed to predict the target variable (e.g., electricity load or market price) by leveraging both historical outputs and lagged latent exogenous inputs. The predictive formulation is expressed as:
In Eq. (4), denotes a nonlinear function approximated through neural network training, p and q are the autoregressive and exogenous input orders, and
represents the residual forecasting error at time t. To optimize the predictive performance, the network minimizes the mean squared error (MSE) between the true and estimated targets across the prediction horizon T, defined as:
As per Eq. (5), this objective encourages the model to generate forecasts that closely match the actual observations
, thereby ensuring high fidelity in the temporal prediction of load or price series.
2.2 GA-LSTM (Genetic Algorithm-Long Short-Term Memory)
The GA-LSTM model combines GA and LSTM networks to forecast electricity load and price.
2.2.1 LSTM network.
The LSTM network predicts electricity load and price by learning temporal dependencies. The LSTM updates its hidden state ht and cell state ct based on the input Xt and previous states ht−1 and ct−1. The LSTM model is described by the following Eqs:
In an LSTM network, the input gate it, forget gate ft, and output gate ot play crucial roles in controlling the flow of information. The weight matrices Wi, Wf, Wo, and Wc govern the transformation of the input data and previous hidden state. Additionally, the bias vectors bi, bf, bo, and bc help adjust the output of each gate. The element-wise product, denoted by ⊙, is used to combine these gates’ activation and the cell state updates, ensuring that only relevant information is preserved and propagated through the network. The final prediction is presented in Eq. (11):
where Wy and by are the weights and bias for the output layer Hyperparameter Optimization via GA.
GA simulates the natural selection process to optimize key LSTM hyperparameters such as learning rate, number of layers, hidden units, batch size, and dropout rate. The steps are:
- Initialization: A population of N candidate hyperparameter vectors
is randomly generated.
- Evaluation: Each individual
is evaluated based on its fitness, computed by:
- Evaluation: Each individual
Selection. Top-k individuals are selected based on their fitness values using roulette wheel or tournament selection.
Crossover and Mutation. Offspring are generated by combining parts of two parents:
where are parents.
Termination: The GA iterates until convergence or a predefined number of generations G.
2.3 Simultaneous forecasting of load and price
Both SENARX and GA-LSTM are designed to simultaneously forecast electricity load and price by incorporating the bidirectional relationship between these two variables. The joint prediction task can be formulated as in Eq. (13):
where is the feature set at time t and
represents the prediction function of the model. The objective is to minimize the joint forecasting error presented in Eq. (14):
3 Flow of proposed models: SENARX and GA-LSTM]
3.1 SENARX model flow
The SENARX model combines feature extraction via ESAE and forecasting through NARX. The detailed process is described step-by-step below:
Normalization: The inputs and targets are normalized using min- max normalization. For an input vector with n data points, the normalization process is defined by Eq. (15):
Here, are the minimum and maximum values of X, respectively.
- Feature Extraction: The regularized data is processed through the ESAE feature extractor. The ESAE encoder learns a latent space representation and produces encoded features denoted as Z.
- Forecasting: The programmed features Z serve as contribution to the NARX network. The dataset is separated into training (80%), validation (15%), and testing (5%) subsets for effective model training and evaluation.
- Prediction: Using the trained NARX network, the model forecasts the price and load for the next 24 hours (one day).
- De-normalization: To convert the predicted normalized values back to their original scale, the inverse of min-max normalization is applied, as shown in Eq. (16):
3.2 GA-LSTM model flow
The GA-LSTM model optimizes LSTM hyperparameters using a GA for forecasting. The process is detailed below:
- Normalization: Inputs and targets are scaled using min-max normalization as outlined above in Eq. (15).
- Training LSTM: The scaled inputs are utilized to train the LSTM network.
- Error Calculation: The forecasting error is computed using Eq. (17):
where is the predicted value and
is the actual value.
- Hyperparameter Optimization: GA optimizes the hyperparamters of the LSTM network. The DE algorithm minimizes the forecasting error by adjusting weights and biases of the LSTM network by Eq. (18):
- Training with Optimized Parameters: Once the error is mini- mized, the fine-tuned LSTM network is trained.
- Prediction: The LSTM network forecasts the load and price simultaneously.
- De-normalization: The forecasted values are normalized using Eq. (19):
The SENARX and GA-LSTM models forecast electricity price and load simultaneously using inputs such as hour of the day, lagged price, lagged load, Temperature and wind speed. The predicted load and price are outputs. Both models captures interdependencies between price and load, incorporating the impact of past values on future predictions.
In the SENARX model, a Sparse Encoder (SE) extracts relevant information and reduces dimensionality, producing refined features for a NARX model to forecast price and load. The GA-LSTM model uses a Genetic Algorithm (GA) encoder to initialize and optimize LSTM network weights for prediction. Accurate forecasting relies on critical inputs like lagged price and load to capture temporal dependencies, and temperature, which influences both load and price. The SE enhances input representation, improving forecast precision. By making adaptive pricing methods, generation scheduling, and demand-response programs possible, these models aid market experts and traders. Rather of analyzing each utility separately, this study averages the regulation prices and aggregates the load across both of them.
3.3 Forecasting inputs and outcomes
Both SENARX and GA-LSTM utilize inputs such as hour of the day, lagged price, lagged load, temperature, and wind speed. These inputs help capture temporal dependencies and environmental impacts. The output comprises simultaneous forecasts of electricity load and price. In the SENARX model, a Sparse Encoder (SE) extracts essential information and reduces dimensionality, enhancing NARX forecasting performance. In contrast, the GA-LSTM model leverages GA to tune LSTM weights and biases, improving predictive accuracy. Accurate forecasting depends heavily on historical values and temperature, as it influences both load and price. These models enable improved demand response, adaptive pricing strategies, and energy market operations. Instead of analyzing utilities independently, this study aggregates load and averages regulation prices across them to improve generalizability.
4 Regularization and evaluation in SENARX Archi- tecture
4.1 Regularization in sparse encoder
The Sparse Encoder in the SENARX architecture is responsible for transforming high-dimensional input data into a compact latent representation while enforcing sparsity. This is achieved using an L1-based regularization term, which promotes feature selection by shrinking less relevant weights toward zero. The loss function for this encoder can be expressed as:]
where Lreconstruction is the primary loss term (e.g., Mean Squared Error), is the L1
norm of the encoder’s weight matrix promoting sparsity, and λ is the regularization coefficient that controls the strength of the sparsity penalty in the loss function. A high value of λ leads to excessive sparsity and may result in underfitting by discarding important information. Conversely, a very low λ might retain noisy or irrelevant features, reducing model interpretability and robustness. Hence, an optimal λ must be selected using:
Cross-validation: Assessing performance on unseen folds to prevent overfitting.
- Bayesian Optimization: Adaptive tuning based on probabilistic surrogate models.
- Grid Search: Exhaustive evaluation over a fixed set of candidate values.
Effective regularization enhances the generalization ability of SENARX, making it resilient across diverse domains and time scales.
4.2 Model stability under data variability
Model stability refers to the consistency of predictions in response to input perturbations or distributional shifts over time. SENARX must remain stable when exposed to:
Temporal drift: Gradual changes in consumption or generation patterns.
Policy shifts: Structural changes due to regulation or operational constraints.
Environmental noise: Weather anomalies or demand surges.
Let the input time series be . The sensitivity of the model can be mathematically represented as:
where f (·) is the prediction function and δt is a small perturbation applied to xt. A smaller average deviation implies higher model stability. The robustneRX under such variability ensures long-term usability and trustworthiness for decision-making applications.
4.3 Comparative analysis with benchmark models
To confirm the superiority of the SENARX framework, performance must be benchmarked against conventional models such as:
ARIMA: Autoregressive Integrated Moving Average, effective for linear stationary data.
SVM: Support Vector Machine, a kernel-based learner suitable for nonlinear regression.
- Bayesian Networks: Probabilistic graphical models capturing joint dependencies. The Mean Absolute Percentage Error (MAPE), a standard accuracy metric, is calculated as:
where yi is the true value and y∘i is the forecasted value. SENARX aims to outperform the baselines by exhibiting:
- Lower MAPE across noisy and clean conditions, indicating better predictive precision.
- Accelerated convergence compared to GA-LSTM and baseline LSTM architectures.
- Superior computational efficiency, outperforming MI-ANN and Bi-level learners in training and inference times.
These findings are supported by empirical evaluation and ablation studies, reinforcing the utility of SENARX in real-time energy forecasting applications.
5 Findings and models
All simulations were conducted using Python on a system featuring an Intel Core i3 processor and 8 GB of RAM, ensuring an efficient platform for executing complex models and data processing. This section provides an overview of the datasets, big data analysis, and a discussion of the results.
5.1 Performance evaluation
To assess the efficiency of the SENARX model, three evaluation metrics are employed: Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Normalized Root Mean Square Error (NRMSE). Lower values of these errors indicate improved forecasting precision.
The Normalized Root Mean Square Error (NRMSE) is defined as:
where min(y) and max(y) represent the minimum and maximum values of the observed data.
5.2 Advanced analysis of demand and price for electricity
The proposed models, ensuring reliable predictions for electricity markets.
5.2.1 Analysis of ISO-NE Data.
Extensive big data analysis for electricity price, load, temperature, and wind speed has been conducted using visual and statistical techniques to uncover key insights. Fig 1 illustrates the ISO-NE Load Data from January 2024 to October 2024, while Fig 2 showcases the corresponding price data for the same period, highlighting trends and variations. The relationship between price and demand signals is analyzed in Fig 5, revealing interdependencies crucial for market dynamics. Additionally, the impact of temperature and wind speed on electricity price and load is explored in Figs 6 and 7, respectively. Fig 8 provides a normalized view of load and price data for the first week of October 2024, enabling comparative analysis. Statistical evaluation of predicting errors, summarized in Table 1, further validates the accuracy and robustness of the proposed models.
5.2.2 Dataset description and input variables
The dataset used for prediction is sourced from ISO New England (ISO-NE), a well-regarded electricity utility recognized for its comprehensive, accurate, and reliable market operations data [26]. ISO-NE operates as an independent system operator responsible for managing power distribution across the six New England states in the United States: Maine, Rhode Island, Vermont, New Hampshire, Connecticut, and Massachusetts. Each year, ISO-NE facilitates approximately $10 billion in transactions involving over 400 electricity market participants. The system serves nearly 7 million end-users, including residential, commercial, and industrial sectors. The dataset consists of hourly electricity market data spanning nearly eight years. For this study, data from January 2024 to October 2024 were utilized, resulting in a total of 65,616 hourly observations. Given the rich temporal structure of the data, it is highly suitable for modeling both short-term and long-term trends in electricity demand and pricing. The dataset.
Includes key variables such as: Aggregated system load across the ISO-NE control area, Regulation of capacity clearing prices, Temperature, Wind speed.
The paper provides a detailed explanation of the electricity price and load series and the temperature and wind speed time series that were chosen as inputs for the forecasting models. These are described as follows:
- Electricity Price and Load Series: Captures the hourly variation in market clearing prices alongside system-wide electricity demand. High volatility in price reflects market dynamics such as demand fluctuations, fuel price variations, and system constraints, while load exhibits clear daily patterns linked to consumer activities (see Fig 3).
- Temperature and Wind Speed Series: Represents hourly ambient temperature and wind speed measurements. Temperature strongly influences electricity load through heating and cooling demands, whereas wind speed affects renewable energy generation, impacting the supply-demand balance (see Fig 4).
5.3 Day-ahead forecast evaluation on ISO-NE
We present a comprehensive assessment of the day-ahead forecasts for both price and load with hourly resolution. The focus is on comparing the predicted precision of the suggested models—SENARX and GA-LSTM—against several standard models, including LSTM, MI- ANN, AFC-ANN, and Bi-level. The evaluation is performed on ISO-NE data, covering the following aspects:
5.3.1 Load forecast evaluation.
To analyze the variation in electricity demand across different seasons, simulated hourly load data were generated for four representative months in 2024: January (winter), April (spring),
August (summer), and October (fall). The simulation incorporates both daily sinusoidal trends and stochastic variations to reflect real-world load fluctuations. As shown in Fig 9, January and August exhibit higher peak loads due to extreme temperatures leading to heating and cooling demands, respectively. In contrast, April and October show moderate and smoother load profiles. The hourly load patterns follow a daily cycle, typically peaking in the late afternoon and early evening due to residential and commercial energy usage. These observations highlight the need for seasonal adaptability in electricity demand forecasting models. The variability of the load across seasons must be incorporated to ensure accurate and robust predictions. Fig 10 displays the load forecast for October 1, 2024, comparing the actual system load (blue line) with the predictions from five different forecasting models: SENARX (green line), GA-LSTM (orange line), LSTM (red line), and MI-ANN (purple line). The x-axis denotes the hours of the day, and the y-axis displays the load in megawatts (MW). Among all the models, SENARX provides the most accurate prediction, with its forecast closely following the actual load trend. The GA-LSTM model also performs well, showing a slight deviation from the actual load but still maintaining a strong alignment, especially during peak demand hours. In contrast, the LSTM model exhibits larger discrepancies, particularly during off-peak hours, where it underestimates the load. The MI-ANN model shows the poorest performance, consistently underpredicting the load across most of the day. This comparison demonstrates that the combination of feature extraction through SENARX and optimization through GA-LSTM yields the best results. SENARX’s use of sparse encoding for feature extraction allows it to better capture the fundamental trends in the data, resulting in a prediction more accurate than the other models. Thus, SENARX and GA-LSTM are more suitable for load forecasting in this context, offering better precision and robustness in predicting electricity demand.
5.3.2 Price forecast evaluation.
Fig 11 illustrates the simulated hourly electricity price variations for four representative months of 2024—January, April, August, and October—each reflecting a different season. The prices, expressed in USD/MWh, are plotted over a 24-hour period to reveal underlying diurnal and seasonal trends. August, representing summer, exhibits the highest price volatility and peak values due to increased cooling demand and grid stress. January also shows elevated prices driven by winter heating loads, with prominent peaks in the early morning and evening hours. In contrast, April demonstrates relatively moderate and stable pricing, reflecting the lower demand typical of spring months. October displays an intermediate pattern, with moderate volatility that falls between the extremes of summer and winter. The sinusoidal shape of the curves across all seasons highlights a strong daily cycle in electricity pricing, emphasizing the influence of both time-of-day and seasonal factors. These variations underscore the importance of incorporating temporal context in electricity price forecasting to accurately capture market behavior. Fig 12 compares the actual price of electricity for October 1, 2024 (blue line) with predictions from four different forecasting models: SENARX (green line), GA-LSTM (orange line), LSTM (red line), and MI-ANN (purple line). Among the models, SENARX provides the most accurate forecast, closely mirroring the actual price trend throughout the day. The GA-LSTM model also aligns well with the actual price, with slight deviations, particularly during off-peak hours. In contrast, the LSTM model shows larger discrepancies, especially during peak pricing times, where it underestimates the price. The MI-ANN model demonstrates the poorest performance, consistently underpredicting the price across the day. This comparison suggests that SENARX and GA-LSTM are more effective for price forecasting in this context, offering superior accuracy and robustness compared to the other models. Fig 10 compares the actual load (blue line) with the predicted values from various models, providing a visual representation of their respective performances in forecasting load demand. Fig 12 compares the actual price of electricity with the predictions made by the SENARX, GA-LSTM, LSTM, and MI-ANN models for October 1, 2024, illustrating the performance of these models in forecasting electricity price.
5.4 Convergence rate analysis
Fig 13 demonstrates the comparative convergence rates of different models over iterations, highlighting significant differences in their efficiency. The LSTM-GA model (blue solid line) exhibits the fastest convergence, reaching near-optimal results with minimal oscillations and achieving approximately 90% convergence within the first 10 iterations. The NARX model (green dashed line) follows, but with more fluctuations, reaching about 80% convergence by 15 iterations. The LSTM model (red solid line), without optimization, shows a slower convergence, achieving only 70% convergence by the 15th iteration. The MI-ANN model (cyan dashed line) converges at a similar pace, reaching about 60% convergence by the 20th iteration. The AFC-ANN model (magenta dash-dot line) demonstrates even slower convergence, with only 50% convergence by 25 iterations. The Bi-level model (black dotted line) converges the slowest, with only about 40% convergence even after 30 iterations, indicating the less efficient nature of the bi-level optimization framework. Overall, the LSTM-GA model shows a 20%–50% improvement in convergence speed in contrast to the reference models. As shown in Fig 14, the plot provides a detailed comparison of the execution times for six different models used in the study: Bi-level, NARX, LSTM-GA, LSTM, MI-ANN, and AFC-ANN. Among all models, the Bi-level model takes the longest time to execute, approximately 3000 seconds, followed by NARX at 3200 seconds. LSTM-GA and MI-ANN have comparable execution times, around 2800 and 2700 seconds, respectively, while AFC-ANN takes 2500 seconds. The LSTM model, which is a simpler model, has the shortest execution time, requiring only 2400 seconds. This comparison demonstrates the significant variation in execution times, with Bi-level and NARX models being computationally the most expensive, and LSTM being the most efficient in terms of processing time. The findings highlight the trade-off between execution time and model complexity, with more intricate models requiring substantially higher computational resources.
5.5CDF (Cumulative Distribution Function) of Error
In this analysis, the Cumulative Distribution Function (CDF), shown in Fig 15, is used to assess the error accumulation of various models. The Bi-level model emerges as the most robust, exhibiting the slowest increase in error accumulation and reaching the maximum cumulative error of 1.0 only after 4% error, indicating superior error tolerance. Following closely is the LSTM model, which accumulates errors at a moderate pace, reaching a cumulative error of 1.0 at approximately 3.5%. The GA-LSTM model, while slightly faster than LSTM, also reaches 1.0 at 3.5% error, suggesting that it is less robust but still relatively efficient in managing error.
In contrast, the MI-ANN model shows a rapid error accumulation, reaching 1.0 at around 3.0%, indicating poor performance under increasing errors. The AFC-ANN model exhibits a similar trend to MI-ANN, with a slightly slower error accumulation, reaching a cumulative error of 1.0 at 3.5%. Overall, the Bi-level model outperforms the others in terms of error management, with LSTM and GA-LSTM offering moderate error tolerance, while MI-ANN and AFC-ANN are less effective at handling errors.
5.6 Robustness to noise
Fig 16 presents the comparison of model robustness in the presence of noise. The analysis spans noise variances from 0.0 to 0.5 and reveals how model performance deteriorates as noise increases. Models such as LSTM-GA and Bi-level demonstrate stronger resilience, maintaining lower error margins even at higher noise levels. In contrast, models like MI-ANN and AFC-ANN show significant degradation in performance as noise variance increases, indicating reduced robustness under uncertain or noisy environments.
5.7 Robustness to noise
Fig 16 presents the comparison of model robustness in the presence of noise. The analysis spans noise variances from 0.0 to 0.5 and reveals how model performance deteriorates as noise increases. Models such as LSTM-GA and Bi-level demonstrate stronger resilience, maintaining lower error margins even at higher noise levels. In contrast, models like MI-ANN and AFC-ANN show significant degradation in performance as noise variance increases, indicating reduced robustness under uncertain or noisy environments.
5.8 GA-LSTM training error evolution
The training error evolution of the GA-LSTM model during the training phase is crucial for understanding its convergence behavior and the effectiveness of the genetic algorithm in tuning the model parameters. The graph below shows how the training error decreases as the GA-LSTM model iterates through epochs, highlighting the optimization process facilitated by the genetic algorithm.
Fig 17 demonstrates the convergence of the model’s training errors, illustrating how the optimization process drives the reduction of error during training. As shown, the GA-LSTM model gradually reduces its training error with each epoch, reflecting the effectiveness of the optimization process. The initial error reduction is typically rapid, followed by a more gradual decrease as the model fine-tunes its parameters. This behavior is indicative of a well-converging model, optimized by the genetic algorithm to find the most efficient set of weights for the LSTM network. Table 2 compares the performance of SENARX, GA-LSTM, and other traditional models such as ARIMA, SVM, and Bayesian Networks, using metrics like Mean Absolute Percentage Error (MAPE) and computational efficiency. From the comparison table, it is evident that SENARX and GA-LSTM consistently outperform ARIMA, SVM, and Bayesian Networks in terms of MAPE, convergence speed, and computational efficiency. These advantages, along with their robustness to noisy data, make SENARX and GA-LSTM ideal choices for forecasting applications in scenarios where both accuracy and computational efficiency are paramount.
5.9 Performance evaluation on european and asian electricity market data
To assess the robustness and generalizability of the proposed forecasting models, we conducted experiments using real-world electricity market datasets from the European and Asian regions. The selected datasets include the EPEX SPOT (Germany-France), Indian Energy Exchange.
(IEX), and Japan Electric Power Exchange (JEPX). These markets differ significantly in terms of grid dynamics, consumption patterns, and seasonal behaviors. The evaluation compares SENARX, GA-LSTM, ARIMA, SVM, and Bayesian Networks using standard metrics such as Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and execution time. As shown in Table 3, the SENARX and GA-LSTM models consistently yield lower MAPE and RMSE values, indicating superior forecasting accuracy. These models also demonstrate lower computational time, showcasing their efficiency. SENARX achieved the lowest MAPE of 3.82% on the EPEX dataset and 4.13% on the IEX dataset. GA-LSTM followed closely with competitive results. Traditional models like ARIMA and SVM performed less reliably, especially under volatile Asian market conditions. These results suggest that SENARX and GA-LSTM are well-suited for real-time electricity forecasting tasks across global markets.
6 Discussion of results
The performance of the proposed models, SENARX (Sparse Encoder Nonlinear Autoregressive Network) and GA-LSTM (Genetic Algorithm-Optimized Long Short-Term Memory), was evaluated across several metrics, including forecasting accuracy, convergence speed, noise sensitivity, error management, and computational efficiency. These models were compared against benchmark models such as LSTM, MI-ANN, Bi-level, and NARX. In terms of forecasting accuracy, both SENARX and NARX models performed exceptionally well. For load forecasting, SENARX achieved a mean absolute percentage error (MAPE) of 0.03%, and NARX also achieved 0.03%. Price forecasting results were similarly impressive, with both SENARX and NARX attaining an MAPE of 0.08%. This indicates that these models were able to capture the complex interdependencies between load and price in smart grids more effectively than other models. On the other hand, GA-LSTM, although optimized using a genetic algorithm, had a higher MAPE of 1.53% for load and 1.91% for price. While still competitive, these results suggest that optimization and feature selection alone do not ensure superior accuracy. The unoptimized LSTM model also showed comparable performance to GA-LSTM, with MAPE values of 1.53% for load and 1.91% for price. Convergence speed was another important metric in evaluating model performance. GA-LSTM demonstrated substantial improvements, converging 20% to 50% faster than the baseline models. This improvement is attributed to the genetic algorithm’s ability to fine-tune the LSTM hyperparameters, enhancing optimization efficiency. However, the SENARX model did not exhibit gains in convergence speed, as it does not rely on optimization algorithms. Nonetheless, its architectural strength—leveraging a sparse encoder—allowed it to maintain superior forecasting performance. In contrast, the LSTM model was slower and computationally simpler. To assess noise sensitivity, the models were evaluated with varying noise variances. SENARX and NARX showed strong robustness, with MAPE increases of only 2.5% and 2%, respectively. GA-LSTM experienced a moderate rise of 5%, but still outperformed the LSTM model, which saw a significant MAPE increase of 15%. MI-ANN and Bi-level were the most sensitive to noise, with performance degradation of 25% and 20% respectively, highlighting their limited robustness in uncertain environments. Computational efficiency was another critical consideration. Due to their complexity, SENARX and GA-LSTM demand more computational resources compared to simpler models like LSTM, MI-ANN, and Bi-level. SENARX, while efficient in feature extraction, remains moderately demanding. GA-LSTM, with the overhead from genetic optimization, is computationally intensive, particularly for large-scale datasets. Nonetheless, its improvements in accuracy and convergence speed justify the additional resource requirements as presented in Table 4. The baseline LSTM model, although computationally efficient, did not deliver comparable accuracy, emphasizing the trade-off between complexity and performance.
6.1 Limitations of the study and future trends
The study highlights valuable insights, yet some limitations remain. Firstly, the computational efficiency of the SENARX and GA-LSTM models is constrained by high resource demands, particularly when scaling to large datasets. Optimizing these models using parallelization or distributed computing could improve performance in real-time applications. Further- more, while benchmark models such as LSTM, MI-ANN, and NARX were used, other emerging models like Transformers and hybrid deep learning approaches were not included, which could provide further insights into performance improvement. Additionally, real-world data scenarios, includ- ing non-stationary conditions and sudden market shocks, were not fully addressed and should be explored in future studies. Moreover, the sensitivity of GA-LSTM to hyperparameters requires refinement in optimization strategies. Exploring alternative methods, such as reinforcement learning or multi-objective optimization, could enhance model robustness.
Future research should focus on hybrid machine learning models, such as combining GA-LSTM with Transformers, to better capture complex pat- terns. Incorporating explainable AI (XAI) techniques can improve model interpretability. Enhancing robustness in real-world scenarios, including multi-modal data integration and transfer learning, will increase predictive power. Additionally, edge computing can enable real-time, decentralized forecasting, which is essential for Industry 4.0 applications. Further optimization and model expansion are key to improving forecasting accuracy and scalability in dynamic energy systems.
7 Conclusion
This paper presented a comparative study of advanced forecasting models, specifically SENARX and GA-LSTM, against traditional approaches such as ARIMA, SVM, and Bayesian Networks. Extensive evaluations were conducted using real electricity market data from European and Asian regions, including EPEX (Europe), IEX (India), and JEPX (Japan). Quantitatively, SENARX achieved the lowest Mean Absolute Percentage Error (MAPE) of 3.82% on EPEX and 4.13% on IEX, while GA-LSTM demonstrated the lowest Root Mean Square Error (RMSE) of 27.02 MW on EPEX and 29.33 MW on JEPX. Compared to ARIMA (with a MAPE of 6.57%–7.21% and RMSE of up to 48.74 MW), SENARX and GA-LSTM improved forecasting accuracy by more than 40%. Additionally, SENARX completed training in as little as 2385 seconds, whereas traditional models like ARIMA required over 3100 seconds, confirming the high computational efficiency of the proposed models. The evolutionary optimization embedded in GA-LSTM significantly improved training convergence and reduced error rates across epochs. Likewise, the adaptive architecture of SENARX ensured robustness against data volatility and noise. These features make the models particularly well-suited for short-term electricity load forecasting in highly dynamic and uncertain market conditions. In future work, the proposed models will be evaluated under more extreme and realistic operational scenarios, including peak demand conditions, unexpected blackouts, and climate-induced anomalies. Such assessments will help determine the models’ full adaptability, stability, and resilience in next-generation energy systems.
Acknowledgments
The author gratefully acknowledges the support provided by Superior University, whose research facilities played a vital role in the completion of this work. A heartfelt thanks is extended to Mr. Awais Raoof, not only as a mentor but also as a brother, for his unwavering support, inspiration, and guidance throughout the research process.
References
- 1. Akhavan-Hejazi H, Mohsenian-Rad H. Power systems big data analytics: an assessment of paradigm shift barriers and prospects. Energy Reports. 2018;4:91–100.
- 2. Alahakoon D, Yu X. Smart electricity meter data intelligence for future energy systems: a survey. IEEE Trans Ind Inf. 2016;12(1):425–36.
- 3. Jiang H, Wang K, Wang Y, Gao M, Zhang Y. Energy big data: A survey. IEEE Access. 2016;4:3844–61.
- 4. Ghasemi A, Shayeghi H, Moradzadeh M, Nooshyar M. A novel hybrid algorithm for electricity price and load forecasting in smart grids with demand-side management. Applied Energy. 2016;177:40–59.
- 5. Massana J, Pous C, Burgas L, Melendez J, Colomer J. Identifying services for short-term load forecasting using data driven models in a Smart City platform. Sustainable Cities and Society. 2017;28:108–17.
- 6. Ahmad A, Javaid N, Alrajeh N, Khan ZA, Qasim U, Khan A. A modified feature selection and artificial neural network-based day-ahead load forecasting model for a smart grid. Applied Sciences. 2015;5(4):1756–72.
- 7. Liu X, Zhang Z, Song Z. A comparative study of the data-driven day-ahead hourly provincial load forecasting methods: From classical data mining to deep learning. Renewable and Sustainable Energy Reviews. 2020;119:109632.
- 8. Jiang P, Li R, Liu N, Gao Y. A novel composite electricity demand forecasting framework by data processing and optimized support vector machine. Applied Energy. 2020;260:114243.
- 9. Zhang Q, Zhang Y, Xu G. Electricity load forecasting based on deep learning with long short-term memory neural network. Energy Procedia. 2016;104:79–84.
- 10. Salinas D, Flunkert V, Gasthaus J, Januschowski T. DeepAR: Probabilistic forecasting with autoregressive recurrent networks. International Journal of Forecasting. 2020;36(3):1181–91.
- 11. Tong C, Li J, Lang C, Kong F, Niu J, Rodrigues JJPC. An efficient deep model for day-ahead electricity load forecasting with stacked denoising auto-encoders. Journal of Parallel and Distributed Computing. 2018;117:267–73.
- 12. Ahmad T, Chen H. Nonlinear autoregressive and random forest approaches to forecasting electricity load for utility energy management systems. Sustainable Cities and Society. 2019;45:460–73.
- 13. Kuo P-H, Huang C-J. An electricity price forecasting model by hybrid structured deep neural networks. Sustainability. 2018;10(4):1280.
- 14. Uriarte RB, Tiezzi F, Tsaftaris SA. Supporting autonomic management of clouds: service clustering with random forest. IEEE Trans Netw Serv Manage. 2016;13(3):595–607.
- 15. Yang B, Gong R, Wang L, Yang S. Support vector machine in image recognition of nursing methods for critically ill blood purification. Microprocessors and Microsystems. 2020:103398.
- 16. Chen J, Wu X. Optimization of energy management systems in smart grids. Mathematics and Engineering in Power Systems. 2024.
- 17. Dai S, Liu M. Improved forecasting models for energy load prediction. Industrial Systems Integration. 2024.
- 18. Gai Z, Wang L. Integrated machine learning and signal processing for solar irradiance forecasting. Information Systems in the World of Artificial Intelligence. 2024.
- 19.
Jiang F, Sun Z. Smart grid anomaly detection using adaptive models. In: 2024.
- 20.
Lin X, Zhao Y. Data-driven decision support systems for renewable energy forecasting. 2025.
- 21. Liu Y, Zhang J. Optimizing hybrid deep learning models for time-series prediction. Mathematics and Computers in Simulation. Math Comput Simul. 2024.
- 22. Wang Q, Hu Z. Impact of machine learning on energy system optimization. Applied Energy. 2024.
- 23. Wu Z, Li J. Ai-based demand forecasting for smart grid operations. Journal of Energy Management and Technology. 2024.
- 24.
Zhou H, Zhang L. A neural network-based electricity load forecasting model. In. ICAAID, 2019.
- 25.
Huang S, Lee P. Intelligent control algorithms for grid optimization. In: ICEIT, 2020.
- 26.
Iso ne market operations data. Accessed 2018 November 10.
- 27. Bai Z. Residential electricity prediction based on GA-LSTM modeling. Energy Reports. 2024;11:6223–32.
- 28. Kong W, Dong ZY, Jia Y, Hill DJ, Xu Y, Zhang Y. Short-Term Residential Load Forecasting Based on LSTM Recurrent Neural Network. IEEE Trans Smart Grid. 2017;10(1):841–51.
- 29. Lee KY, Cha YT, Park JH. Short-term load forecasting using an artificial neural network. IEEE Trans Power Syst. 2002;7(1):124–32.
- 30. Liao C, Tan M, Li K, Chen J, Wang R, Su Y. Sequence signal prediction and reconstruction for multi-energy load forecasting in integrated energy systems: A bi-level multi-task learning method. Energy. 2024;313:133960.
- 31. Kim J-H, Seong N-C, Choi W. Cooling Load Forecasting via Predictive Optimization of a Nonlinear Autoregressive Exogenous (NARX) Neural Network Model. Sustainability. 2019;11(23):6535.