An Intelligent Two-Stage Energy Dispatch Management System for Hybrid Power Plants: Impact of Machine Learning Deployment

The utilization of renewable energy sources such as PV and wind power has become imperative due to the increase of carbon dioxide emissions, which leads to the increase in global temperature and the negative consequences of climate change. As a result, renewable energy sources are constantly gaining popularity to be integrated in power systems to create hybrid power plants (HPPs). However, HPPs come with great complications due to the uncertainty in renewable energy output, which has given rise to the need for a reliable and effective energy dispatch management system for HPPs. In this paper, a two-stage machine learning (ML) based energy dispatch management system for HPPs is designed to control renewable energy sources (PV and wind power), reserve energy sources (energy storage systems) and backup energy sources (diesel, fuel cells, auxiliary loads, etc.). The system aims to minimize the power variance in the HPPs to achieve peak shaving and valley filling. The first stage aims to forecast the power output of renewable energy sources, as well as the load demand. The second stage aims to coordinate the energy output of the reserve and backup sources to achieve the required objective. Different ML techniques were compared to find the highest performing ML algorithm to achieve the required objective of the system, where long short-term memory (LSTM) provided the highest results with an average mean squared error of 0.005 and an average explained variance score of 0.9. The results of the management system verify the effectiveness of the system for the management of the energy dispatch in HPPs, through the successful flattening of the load curve of the HPP, which increases the reliability of the power system with the integration of renewable energy sources. Also, the system was shown to be robust against the uncertainty of the PV and wind power output, and the load demand.


I. INTRODUCTION
With the exponential increase in the carbon dioxide emissions and the increase in global temperatures, it has become vital to decrease our dependence on fossil fuels for energy generation. Carbon dioxide emissions have reached a staggering 34 billion tons per year, which has had significant harmful effects on the environment, including global warming, acid rain, habitat destruction, and melting of ice caps [1]. Thus, the utilization and implementation of renewable energy sources, such as wind and PV energy, has become highly popular in order to decrease the world usage of fossil fuels for environmentally friendly energy generation, as well as for reaching goal number 7 of the sustainable development goals [2]. However, the integration of such renewable energy sources in power systems comes with many challenges, including limited energy capacity, the high fluctuations in power output, and low efficiency [3]. This has given rise to HPPs, and motivated the need for the proper management of such power plants to ensure their proper operation at optimum conditions and highest efficiencies. Figure 1 displays the overview of the energy dispatch management in HPPs, including power flows. Renewable energy sources include PV and wind energy, which can inject power to the grid. ESSs such as batteries are used as a short-term reserve power source, which can inject power to the grid, as well as absorbing power for recharging. Backup sources include fuel cells that are long-term reserve power sources that can be utilized for power injection during sags in energy generation by renewable sources. Fuel cells are considered as a backup energy source in this paper. Due to the limited capacity of ESSs, auxiliary loads are used to match the generation with the load demand to ensure the stability of the power system. In the case of over-generation during light loading times, the auxiliary loads are used to increase the load demand to match the generation power, if the SoC of the ESS is full. In addition, such flexibility is required to decrease the number of charge cycles of the ESS.
In this paper, an intelligent energy dispatch management system is devised for HPPs, while considering two-way power flow. The system utilizes ML to adaptively manage energy dispatch in HPPs to increase the efficiency of integrating renewable energy sources into the power system.
Firstly, ML is utilized for forecasting energy usage and production, and the creation of an optimized operation schedule for all the components of the HPPs seen in Figure 1. The load data and power production using renewable energy sources data are forecasted using different ML regressors. After that, ML devises an optimized operation plan for the usage of renewable energy sources, as well as the possible uses of reserve and backup components, to increase the efficiency of the operation of HPPs, and increase the profits of operators.
In summary, ML is utilized for optimizing the operation of HPPs. The main research gaps for energy dispatch management systems in HPPs are the lack of a performance assessment for ML models, and the lack of a complete two-stage intelligent system for forecasting and scheduling. Thus, the main contributions of the paper are summarized as follows: 1) Utilization of ML for a two-stage energy-dispatch management system for forecasting load demand and renewable energy production through regression, followed by the development of plans for the operation of HPPs to increase the efficiency and reliability of integrating renewable energy sources into power systems. 2) Performance assessment of different ML techniques, including DT, RF, DNN, and LSTM, for an ML-based intelligent energy dispatch management system to optimize the operation of HPPs considering renewable energy sources, energy storage systems, and backup components for cleaner electricity generation and two-way power flow.
In the upcoming sections, Section II reviews the literature. Next, Section III describes the ML and HPPs model formulation. After that, Section IV presents the results and discussion. Finally, Section V and VI conclude the paper and examine the future work, respectively.

II. RELATED WORK
The integration of renewable energy sources has been extensively researched, in order to effectively manage their power output to increase their efficiency and reliability in power systems. Zhu et al. [4] proposed a switched model predictive control strategy for managing HPPs considering diesel, PV, and battery power. The system parameters are considered to be constant, and the work focuses on optimization based on a predefined switching schedule.
Additionally, Karami et al. [5] proposed an energy management system for residential applications. Reference [5] developed a day ahead scheduling algorithm that works as a lookup table for determining the optimum operation of the hybrid energy resources, which might not be reliable in environments with changing load profiles, especially between seasons. The main drawbacks of the system are that it might not perform well when scaled up for the management of large HPPs, and that it only considers PV generation.
Li et al. [6] examined the use of abandoned wind power plants by increasing its reliability through the coordination of the use of battery energy storage and regenerative electric boiler. It was seen that the regenerative electric boiler has a better effect on the utilization of wind energy. However, when battery energy storage and regenerative electric boiler are coordinated to be used together, the peak-valley difference is decreased and increased peak shaving is obtained.
Additionally, Roy et al. [7] utilized particle swarm optimization for minimizing the cost of energy storage for HPPs considering wind, solar, and battery and supercapacitor power. The system is used to schedule energy dispatching for one hour time periods for a whole day. It was seen that the operation of the HPPs is improved through the use of multiple energy storage systems, instead of battery only or supercapacitor only operation. Nevertheless, the system aims to improve the use of energy storage systems as the main power source. However, the utilization of energy storage systems as a power source is not reliable due to the constant charging and discharging, which leads to the degradation of the energy storage systems.
Furthermore, Xiao et al. [8] presented an energy management system for a dc microgrid with multiple slack terminals, considering multiple renewable energy sources, such as PV and wind power. Primary control is done using system distributed control, followed by secondary control, which works on power sharing compensation and bus voltage restoration. Finally, economic dispatch is used to minimize operation costs as tertiary control. The system was tested successfully on a lab-scale dc microgrid. Nevertheless, the model was not tested or used in real-life, scaled renewable energy data.
A bi-level two stage optimal scheduling algorithm was proposed by Qiu et al. [9] for the management of multiple hybrid AC/DC microgrids. The column-and-constraint generation algorithm is utilized to generate a two-stage MILP problem with the objective of minimizing daily operation costs of both systems. However, in order to decrease computation time, some non-linear functions were substituted with linear approximations, which might decrease the performance of the model in real-life applications.
Particle swarm optimization and firefly algorithm were compared by Liaquat et al. [10] for short-term scheduling of HPPs. It was seen that particle swarm optimization provides smaller generation costs, while firefly algorithm requires less computation time. The main drawback of the proposed system is that only PV generation is considered in the HPPs.
Liu et al. [11] examined the use of neural networks for estimating hourly energy dispatch for managing renewable energy sources. Reference [11] utilized neural networks for one day wind energy forecasts. The system was made up of two energy storage systems, where one was used for wind energy storage, while the other was used for addressing forecast errors. However, such a system might not be reliable in the case of large forecasting errors. However, the system does not consider the degradation in energy storage systems, which can have significant impact on the operation of HPPs.
Nguyen et al. [12] researched the short-term power dispatch for a wind farm, through a cost-optimized battery capacity. A min-max dispatch method was utilized, which defines a battery energy storage system cost function. The proposed model was successfully tested with a 3 MW wind turbine generator model; however, the system cannot be used for long-term scheduling.
The usage of rolling horizon forecasts for the optimization of HPPs involving PV and battery power considering residential application was studied by Hafiz et al. [13]. Stochastic dual dynamic programming algorithm is utilized in the receding horizon, as well as long short-term memory algorithm is utilized in the rolling horizon to estimate load and solar generation profiles. The model aims to minimize the electricity purchase costs. Results show that the system is able to provide similar results to other control methods such as heuristic methods, decreasing electricity purchase cost and increase solar energy usage.
Similar to Karami et al. [5], Hafiz et al. [14] proposed an energy management system for residential applications. Reference [14] focused on the management of energy storage systems in residential PV applications using long short-term memory forecasts. After that, dynamic programming is utilized for the optimization of the set point of for the energy dispatch of the energy storage systems. However, similar to [10], the system only considers PV generation. Also, the main disadvantage of the system is that it might not perform well when scaled up for the management of large HPPs.
A stochastic optimization problem is formulated by Mirzaei et al. [15] to integrate wind energy with existing natural gas power plants. The model takes into consideration VOLUME 11, 2023 the uncertainties in electrical load demand, wind energy generation and gas load demand. However, the model did not consider the use of different renewable energy sources.
Gu et al. [16] studied the use of dynamic programming for economic dispatch, considering variable generation resources, for near real-time power system operation. The system operator is provided with a gauge to utilize a stochastic or deterministic approach. The stochastic approach is based on the progressive hedging algorithm and the L-shaped method. Despite the model providing useful results, the computational power and complexity of the stochastic approach are significantly high.
Similar to Liu et al. [11], Mohandes et al. [17] researched the utilization of neural networks for estimating hourly energy dispatch for managing renewable energy sources. Reference [17] proposed the use of deep neural networks for forecasting renewable energy generation, followed by hourly energy dispatch considering renewable energy sources and battery energy storage systems. Moreover, the system proposed by [17] does not take into consideration the degradation in energy storage systems, which can have a high impact on the operation of HPPs.
A day ahead solar power forecasting using a simplified long short-term memory algorithm was proposed by Liu et al. [18]. It was seen that long short-term memory provides more accurate results compared to multi-layer perceptron, with an average root mean square error of 0.512. However, the forecasting related to multiple renewable energy sources has not been studied.
Reddy et al. [19] explored the usage of a genetic algorithm and probabilistic methods for a day-ahead scheduling for HPPs. Simulation results have proved the effectiveness of the proposed system. However, the system assumes a constant wind velocity, as well as a constant voltage output by the PV cells, which is hard to achieve in real-life renewable energy systems.
Moreover, López-Salgado et al. [20] studied the weekly scheduling of HPPs including wind, hydro and thermal power, through a model based on Outer Approximation and Benders decomposition algorithm. As a result, the model can successfully be used for long-term scheduling for HPPs. However, the system was made based on a dc power flow model; thus, it might not have the same performance for conventional ac power systems.
Garcia-Torres et al. [21] utilized model-predictive control techniques for optimal load sharing considering a hybrid energy storage system, including hydrogen, batteries and ultracapacitors. The system is modelled as a mixed logic dynamic framework to include the logic variable of the fuel cell and energy storage systems, which include continuous and discrete dynamics. The system successfully improves the lifetime of the energy storage system through sharing the load between the three methods of energy storage.
Ju et al. [22] proposed a two-layer energy management system for microgrids using a hierarchical dispatch model. The upper layer minimizes the operation costs, while the lower layer minimizes the fluctuations caused by forecast errors. In addition, the model considers the degradation costs of energy storage systems. Nonetheless, the system does not contemplate the stochasticity in renewable energy output.
Another optimization scheme for HPPs was suggested by Taha et al. [23] where an MILP method was utilized to minimize operation costs and pollutant gas emissions. The system considers the daily number of cycles of the battery and minimum SoC as part of the operation costs; however, it does not optimize the usage of the battery independently.
Similar to [9] and [23], Xia et al. [24] utilized MILP for short-term scheduling for HPPs consisting of wind, hydro and thermal power, as well as hydro energy storage. The disadvantage of such a system is the linear approximation used in order to be able to utilize MILP, as well as its inability to be used for long-term scheduling.
Overall, previous literature has examined a range of optimization methods for the management of HPPs, including ML techniques, dynamic programming, MILP, etc. The main research gaps can be summarized as follows: • Assessing the performance of different ML models for energy dispatch management in hybrid power plants considering renewable energy sources, reserve, and backup components for cleaner electricity generation, and two-way power flow.
• Development of an intelligent system that considers both the forecasting and scheduling stages, i.e., an intelligent two-stage energy-dispatch management system.
• Uncertainty analysis to examine the reliability of the ML model against the stochastic nature of ML models, as well as against the apparent uncertainty in the power output of renewable energy sources and the load demand • Providing a scalable solution through the decrease in the system's complexity without the use of approximations or assumptions that lead to a decrease in the performance of the model. In this paper, a range of ML techniques are utilized to manage HPPs, considering PV and wind as renewable energy sources, energy storage systems, and backups such as diesel, gas, fuel cells and auxiliary loads. In addition, the presented system achieves a high performance with a minimally complex solution to manage HPPs.
It is noteworthy to mention that previous ML models were not tested for the stochastic nature of ML, due to the possibility of achieving different accuracy values on different runs. In addition, previous ML models considered the degradation cost of the ESS based on minimizing the change of the SoC of the ESS in a day. However, the drawback of such an objective function is that the ESS can undergo many discharge and charge cycles between close minimum and maximum SoC values, which can decrease the lifetime of the ESS.
The proposed system in this paper offers an intelligent two-stage energy dispatch management system for HPPs for the optimization of the operation of the HPPs. This will help in increasing the efficiency of integrating renewable energy into the conventional power grid and decreasing the dependency on fossil fuels for a cleaner energy output. For the first stage, ML will be utilized for the accurate short-term and long-term forecasting of energy output from renewable energy sources. The combination of short-term and longterm forecasting improves the reliability of the system since it will have a better outlook on renewable power output, which improves the scheduling as the system can predict possible renewable power output shortages. Therefore, the forecasts will be utilized to provide short-term and long-term scheduling plans for the energy dispatch in HPPs, considering the degradation costs of the charging and discharging of energy storage systems. Table 1 provides a comparative summary between previous literature models and the presented model.

III. PROBLEM FORMULATION
The HPPs energy dispatch problem can be formulated as an optimization problem, with an objective function to minimize power variance. Renewable energy sources are assumed to be positive loads, which inject power into the system. Energy storage systems can be utilized as positive or negative loads. For the mathematical formulation of the system, a day is broken down into discrete T time intervals, which are denoted as dt.

A. SYSTEM MODEL
The utilized dataset is a highly varying renewable energy penetration system that is designed to be a benchmark for the simulation and testing of HPPs, as presented by Zhou [25]. In this paper, the load data, the PV output data, and the wind power output data are utilized for the testing of the presented two-stage ML-based energy dispatch system.

B. MATHEMATICAL FORMULATION
The minimization of the power variance and ESS degradation can be described as objective functions as shown in (1) and (2), respectively, to form a multi-step optimization problem. Eq. (2) represents ESS degradation since the minimization of the change in the total stored energy of the ESS will ensure the increase in its lifetime. It is noteworthy to mention that the average power parameter in (1) is difficult to predict due to the highly varying renewable power output, as well as that renewable power sources are non-dispatchable. This means that conventional optimization methods such as dynamic programming might not provide high performance, since the average power in the optimization function is unknown. However, the utilization of the two-stage ML model will allow the short-term and long-term forecasting of renewable energy output, which will help in the creation of a reliable power dispatch schedule that takes into consideration the highly varying renewable power output.
The objective functions cause the flattening of the load curve through peak shaving and valley filling, which increases power quality and decreases voltage fluctuations, as well as avoiding power overloads in the system. In addition, they avoid the overuse of the ESS, which can cause significant costs in terms of the degradation of the ESS. It is noteworthy to mention that d|Q t | is not determined directly by the ML model. The ML model aims to minimize the degradation in the state of health of the ESS, which implicitly minimizes d|Q t |.
The objective functions are subject to the power balance, charge balance and inequality constraints, as shown in (3) to (8). VOLUME 11, 2023 Power balance constraint: Charge balance constraint: It is noteworthy to mention that P ch t and P disch t are the magnitude of P ESS t . Thus, P ESS t can take positive or negative values depending on the mode of the ESS, while P ch t and P disch t are always positive. Eq. (5) ensures that power overloads do not occur. Eqs. (6) and (7) warrant that the power output of renewable energy sources is sufficient for the charging of the ESS, and that the generation is always sufficient for the load demand, respectively. Finally, (8) is a natural constraint that ensures that the power must be positive.
Inequality constraints: Additionally, the upper and lower bound constraints of the mathematical formulation of the HPPs are displayed in (9) to (14). Eqs. (9) to (14) guarantee that the values of the variables are always within their minimum and maximum limits.
Upper and lower bound constraints: The average power of the HPPs, which is utilized in (1), can be calculated as seen in (15).
C. ML MODEL ML is utilized for optimizing the operation of HPPs, through forecasting renewable energy production and load demand, followed by the coordination of the ESS and backups to increase the reliability and efficiency of integrating renewable energy sources into the power system. As a result, ML is utilized to minimize the power variance of the power system, considering positive and negative loads as previously mentioned. Thus, ML is used to regress renewable energy output and load demand, depending on the day and time. The utilization of ML is preferred over regular fitting techniques due to the low accuracy results of fitting techniques, in the presence of uncertainties and highly fluctuating data [26]. After that, using the energy output and load data, ML coordinates the use of backup sources, such as diesel and auxiliary loads, and finds the most appropriate power of each component to optimize the performance of the HPPs. Figure 2 illustrates the two-layer scheduling approach using the ML models. As seen in the figure, the first layer involves the prediction of the PV power, the wind power, and the load demand using the day, month, and hour inputs. After that, scheduling is done to manage the utilization of the ESS and backup power sources.
It is known that the main limitation associated with using ML is the stochastic nature of ML algorithms, which can be mitigated through the running of the ML algorithm multiple times to ensure that the ML algorithm provides high accuracy results that have a small standard deviation. In addition, the performance of the ML model is dependent on the accuracy of the dataset used for training the model. As a result, the dataset should be precise and representative of renewable energy sources and load demand to ensure the creation of a highly performing ML model, and its size should be large to reliably train the ML model.
The PV power output, wind power output, and the load demand datasets that are used to train the ML regression model for the forecasting consist of 8760 data entries, and are derived from the dataset provided by Zhuo [25]. Every data entry consists of four attributes, which are the day, month, hour, and power. The day, month, and hour are the inputs of the ML regression model, and the load demand, and the PV and wind power are the outputs of the ML regression model.
In order to evaluate the predictive accuracy of the ML models, the mean squared error (MSE) and the explained variance score (EVS) are used, which are calculated as shown in (16) and (17), respectively. The optimum score for the MSE is 0, and it can have values ranging from 0 to infinity. The optimum score for the EVS is 1, and it can have values ranging from 0 to 1.
Eq. (18) defines the autocorrelation function for the power output data, where r k is the autocorrelation coefficient between y t and y t+k , T is the length of the time series, and y is the mean of y. The autocorrelation function is used to find the most appropriate lagged values for the forecasting of the power output of PV and wind, as well as the load demand.

IV. RESULTS AND DISCUSSION
The HPPs ML-based management system is made up of two stages, as previously mentioned. The first stage is to forecast the power output of renewable energy sources (PV and wind), as well as the load demand. After that, plans are made for the coordination of the use of backups and ESS to increase the reliability and power quality of the HPPs through minimizing the power variance, which is done through peak shaving and valley filling.

A. FORECASTING RESULTS
A range of ML techniques were compared to find the most appropriate ML algorithm that provides the highest accuracy. Decision tree (DT), random forest (RF), multi-layer perceptron deep neural networks (DNN) and long short-term memory (LSTM) provided the highest performance amongst the different ML techniques. As previously mentioned, the ML algorithms will be utilized for forecasting the load demand, as well as the power output of the PV and wind power. Table 2 displays the accuracy results of the highest performing ML techniques for load demand forecasting. Minimal mean squared errors of 0.03, 0.02, 0.01 and 0.003 were achieved by DT, RF, DNN and LSTM, respectively. In addition, high explained variance scores of 0.8, 0.9, 0.6, and 0.9 were achieved by DT, RF, DNN and LSTM, respectively. As a result, it is seen that LSTM provided the highest performance for forecasting load demand. Additionally, Figure 3 shows the real and predicted load demand curves for a number of data samples using LSTM.   As seen from the figure, the real and predicted curves are highly compatible with each other and are nearly on top of each other, further proving the high predictive accuracy of the LSTM algorithm.
Similarly, Table 3 displays the accuracy results of the highest performing ML techniques for wind power output forecasting. The mean squared errors were 0.09, 0.05, 0.03 and 0.004 for DT, RF, DNN and LSTM, respectively. The high explained variance scores were 0.9, 1.0, 0.3, and 0.9 for DT, RF, DNN and LSTM, respectively. Thus, similar to load demand forecasting, LSTM provided the highest results for wind power output forecasting. Figure 4 shows the real and predicted wind power output curves for a number of data samples using LSTM. The predicted wind power curve is nearly the same as the real wind power output curve. Thus, it can be concluded that LSTM can be utilized reliably in predicting the wind power output.
Finally, Table 4 portrays the accuracy results of the highest performing ML techniques for PV power output forecasting. DT, RF, DNN and LSTM achieved mean squared errors of 0.3, 0.2, 0.01 and 0.007, respectively. Also, DT, RF, DNN and LSTM had explained variance scores of 0.9, 0.9, VOLUME 11, 2023   0.8, and 0.9, respectively. Compared to load demand and wind power output forecasting, the predictive accuracies of the ML models have slightly decreased. Nevertheless, the predictive accuracy of LSTM is still significantly higher. Figure 5 presents the real and predicted PV power output curves for a number of data samples using LSTM. As seen from the curve, the overall pattern of the PV power output is predicted accurately. However, some peaks in the PV power output are underestimated by the LSTM model. Nevertheless, as the predictive errors are underestimates, the overall performance of the system might not be affected due to the surplus of power by the PV cells.

B. HPPs MANAGEMENT RESULTS
Followed by the successful forecasting of load demand, and PV and wind power output, the ML model can start coordinating the use of reserve and backup energy sources to minimize the power variance and the use of the ESS, which improves the operation of the HPPs.
LSTM is utilized to regress the required power from reserve and backup energy sources. Priority is given to the ESS to avoid the use of unclean energy. However, to avoid the degradation of the ESS, the usage cost of the ESS is minimized as well. Figure 6a and b portray the power curves of the HPPs using ML and MILP, and the SoC of the ESS using ML and MILP, respectively.
As seen from Figure 6a, the net unmanaged power is highly varying, with times of under-generation by renewable sources, and other times where there is an over-generation. This can cause power outages and high power losses, which decreases the power quality of the HPPs. Thus, the management of the ESS and reserve power sources present the effectiveness in minimizing the power variance, with the net power after scheduling being close to zero, which achieves the first objective function. As seen from the curves, at times of over-generation, the ESS starts charging to ensure that the net power is zero. In addition, at times of undergeneration, the ESS and backup power sources start to generate enough power to ensure that the net power is zero.
It is noteworthy to mention that the utilization of backup power sources is minimal, as seen in Figure 6a, where the backup power generation is usually under 1 pu. This helps in achieving the aim of reducing the dependency on unclean energy sources, such as diesel and fossil fuels. Also, the ESS power is kept at a near constant level to avoid their fast degradation, as well as providing the required power throughout the whole day. This is accomplished through the proper management of the ESS and backup energy sources to provide power at times that renewable energy sources do not meet the demand, and to absorb power at off-peak times.
Furthermore, Figure 6a portrays the results of the ESS power and backup generation power obtained from the MILP technique to provide a basis for comparison between the presented ML model and conventional optimization techniques. As seen from Figure 6a, similar results are obtained by the MILP model, while the MILP model is less reliant on the ESS compared to the ML model. However, ML provides a more adaptive solution compared to conventional optimization approaches. Also, towards the end of the day, the MILP model causes the SoC of the ESS to oscillate going through a number of charging and discharging actions, as shown by Figure 6b. This can have harmful consequences on the state of health of the ESS.
Additionally, Figure 6b portrays the SoC of the ESS during the day. As seen from the figure, the ESS does not go through lots of charging and discharging cycles during the day, which helps in decreasing their degradation. Thus, the operation and  maintenance costs of using such ESS in HPPs is reduced, and the system successfully achieves the second objective function.
Moreover, Figures 7, 8, and 9 illustrate the power curves after the introduction of 5%, 10%, and 20% uncertainties in the load demand, PV power output, and wind power output. As seen from the figures, the uncertainties do not have a significant effect on the performance of the system. The use of unclean energy sources is slightly increased, however, the overall operation of the HPPs is still improved. As seen from the figures, the use of the ESS and backup energy sources depends on renewable energy generation.
In addition, a similar SoC profile is seen after the introduction of all the uncertainty levels compared to the original SoC profile in Figure 6b. This shows that the system is robust in maintaining the ESS and reducing its degradation despite the introduction of different uncertainty levels to the load demand, PV power generation, and wind power generation.
Despite the increased use of backup energy sources and the slight decrease in the performance of the ML model, the operation of the HPPs is still significantly improved. The high performance can be attributed to the robustness of the predictive ability of the LSTM model. Thus, despite   the introduction of the uncertainty, the HPPs energy dispatch management system is still able to successfully coordinate the reserve and backup energy sources, to improve the integration of renewable energy sources into the distribution system, and the operation of the HPPs.
Finally, it should be noted that the results from the ML model shown in Figures 6a, 7, 8, and 9 are close to results obtained by other techniques shown in other studies. This includes the results obtained through the MILP model by [23] and [24], and the hierarchical dispatch model by [22]. However, the presented system is more robust to uncertainties, due to the adaptive nature of ML, as well as being less computationally intensive. Also, the presented system takes into consideration ESS degradation costs, which provides a more realistic usage of ESS in real-life.

V. CONCLUSION
In conclusion, the performance of different ML techniques was examined to create an intelligent two-stage energy dispatch management system for HPPs, which successfully increased the reliability of operating such power systems through load curve flattening. The HPPs is made up of renewable energy sources (PV and wind power), reserve energy sources (ESS) and backup energy sources (diesel, fuel cells, auxiliary loads, etc.). The first stage of the system is responsible for forecasting load demand, PV power output and wind power output. The second stage is responsible for coordinating the use of reserve and backup energy sources to achieve the objective of minimizing the power variance, and minimizing the degradation of the ESS.
The predictive accuracies of a range of ML algorithms were compared to find the most appropriate ML algorithm for minimizing the power variance in the HPPs. It was seen that DT, RF, DNN and LSTM provide the highest accuracy results. From the four highest performing ML techniques, LSTM provided the most accurate results, with a mean squared error of 0.003, 0.007 and 0.004 for load demand, PV power output and wind power output, respectively. Also, LSTM provided an explained variance score of 0.9 for all forecasted data.
As a result, LSTM was utilized for forecasting the required data, as well as the coordination of the use of reserve and backup energy sources. The ML-based system successfully flattens the load curve, which increases the reliability of the HPPs and the integration of renewable energy sources into the power system, despite their highly variable power output. Thus, it is seen that the presented system provides an effective solution to energy dispatch management in HPPs.
Additionally, the presented system was tested with uncertainties of up to 20% to simulate the partial stochastic nature of load demand, PV power generation, and wind power generation throughout the day. The performance of the system was deteriorated slightly, with the predictive accuracy of LSTM decreasing. The operation of the HPPs was still significantly improved. However, the performance level was slightly less compared to the case with no uncertainty. Thus, the presented system was seen to be robust against uncertainty in the load demand, and PV and wind power output.

VI. FUTURE WORK
Prospective future work can encompass the utilization of other artificial intelligence techniques such as reinforcement learning for the management of HPPs to compare the reliability of such techniques when compared to the machine learning techniques utilized in this paper. In addition, the system can be expanded to include other renewable energy sources such as thermal and hydroelectric power, which can increase the uncertainty in the system and affect the performance of the ML model. In addition, a feasibility study can be done to examine the reliability, efficiency, and cost of using fuel cells as backup power sources. Ph.D. students at Qatar University. He published more than 130 journal articles in the fields of power electronics, energy conversion, and power quality. He holds 12 U.S. patents. His research interests include power electronics, energy conversion, renewable energy, and power quality. He has been awarded several research grants addressing research areas, such as energy storage systems, renewable energy sources, HVDC systems, electric vehicles, pulsed power applications, and power electronics for aerospace applications.