Optimization scheme for intelligent master controller with collaboratives energy system

This paper explores the use of deep learning to optimize the performance of a peer-to-peer energy system with an intelligent master controller. The goal addresses inefficiencies caused by energy seasonality by predicting hourly power consumption through a deep learning algorithm. The intelligent master controller was designed to manage the collaborative energy system


INTRODUCTION
The significance of a stable and efficient electricity system cannot be overstated, as it is the most important indication of a country's socioeconomic and technological success [1].Up until this moment, collaborative energy systems were not taken into account because of inability to provide control measures for energy planning and schedulling with peer to peer arrangements [2], [3].Most of the optimization schemes were designed for large energy operation, not considering that peer-to-peer arrangement requires effective and Int J Artif Intell ISSN: 2252-8938  Optimization scheme for intelligent master controller with collaboratives energy … (Kufre Esenowo Jack) 237 efficient power delivery [4]- [6].Power systems have grown in size and complexity in recent years, and as a result, the use of intelligent systems for planning, operation, control, and optimization is unavoidable.Previously, peer to peer energy system appears to be time consuming, computationally expensive, and incapable of solving power system problems in real time with dynamic energy controllers [7].But, with the advent of intelligent neural network approach in peer-to-peer energy system, this method provided easy approach in solving energy network problems.Artificial intelligence (AI) solutions, on the other hand, can successfully solve complicated problems in image systems as well as monitor and control power systems in real time [8]- [10].The advantages of artificial intelligence systems, are speed, resilience, and insensitivity to lacking data or information.Artificial neural networks(ANNs) were utilized in this article to examine the Trans-Amadi distribution network for efficacy and enhanced performance, due to its ability to determine consumer behavior [5].Furthermore, the technique was adopted because of its ability to synthesize complicated mappings, very responsive and reliable.ANN has increased promise in power system planning, optimization, operation, and remote control [11]- [13].
This research considers applying deep learning techniques in the optimization of peer-to-peer energy system with intelligent master controller as the energy regulatory medium.No matter how power system configuration appears to be small, medium and large, todays trends of power technology requires optimal energy usage inview of the high cost of energy harvest, as such collaborative energy system in the peer-to-peer arrangement becomes imperative [4].Peer-to-peer energy system curtails energy wastage.Deep learning as an arm of Machine learning was adopted to understudy the intelligent master controller actions in collaborative energy management, reliability and efficiency, with the view of forcasting the trends of future energy for continous usage [14].
As the globe follows a tendency to minimize greenhouse gas emissions by integrating more renewable energy sources, the assimilation of distributed generation into the electric power system has grown more appealing, resulting in high penetration scenarios [7].This high level of distributed generation penetration poses various problems to the electric power system protective concept, thereby jeopardizing its dependability, availability, and efficiency.Conventional islanding detection methods fail to detect an island in high distributed generation penetration scenarios because the grid lacks its inertia to leverage the substantial frequency and voltage discrepancy required for the islanding detection methods (IDMs) to detect an islanding event [15].Collaborative energy system has long been overdue, this was because of lack of formidable control mechanism to manage the energy resources.In view of this, several approaches by researchers on energy optimization were taken into account in the cause of developing this proposed system.
Gonzalez-Abreu et al. [1] carried out research on the industrial power sector, where monitoring of electrical power quality was given priority.Their goal was to avoid unfavorable impacts that impair the overall performance of industrial power facilities.Research on disturbance detection were carried out, and most approaches analyzed a few standardized disturbance combinations [5], [16].Their research work presented a three-stage deep learning-based diagnosis method used in diagnosing power quality: to characterize the electrical power grid, a domain fusion strategy was first examined in the feature extraction stage; using a stacked autoencoder, an adaptive pattern characterization was performed and to detect disturbances, a neural network structure was used.The suggested method depends on synthetic data for training and validation of the diagnosed system, which includes single, double, and triple disturbance combinations as well as various noise levels, in addition to available experimental measurements provided by the IEEE 1159.2Working Group.Because of its pattern recognition capacity, the proposed technique achieved nearly a 100% hit rate using deep learning, allowing for a significantly more practical use [17].The electric power industry is currently undergoing an unprecedented reform, increased use of artificial intelligence technology remains one of the most interesting and possibly profitable recent advances [18].The study provides a brief review of fault diagnosis, security assessments, adequate load forecasting, economic dispatch, and harmonic analyses based on the growth rate of neural network application in some power system themes [19]- [22].
Luitel and Venayagamoorthy [23], utilized an artificial neural network to investigate power supply in a distribution system.Twenty (21) Sigmoid hidden neurons and three (3) linear output neurons were employed in a two-layer feed-forward neural network.The network was trained with the levenberg-marquardt back propagation algorithm, the performance function was validated with mean square error, and the weights of the neurons were updated with the stochastic gradient descent method.According to the results, the best validation performance during the training process was 0.00018754 at epoch 5, indicating how much error was eliminated during training.The regression coefficient was obtained as 0.9993, and the gradient decent coefficient as 0.0011564, indicating how much variance in the error rate.At epoch 11, the threshold value Mu (1.00e-05) indicated that the network converged rapidly.
The result of [24], modeled power systems using real-time digital simulators (RTDS).The modeling and simulation of the power network, as well as control, became increasingly important as the complexity of the electric power grid and associated control grows.In the context of smart grid, this requirement was even more important.Intelligent monitoring and control approaches that employ computational intelligence techniques were projected to be a key component of smart grids as an enabling technology.As a result, a critical part of smart grid research was the integration of computational intelligence-based technologies into power system simulation tools.The majority of previous and present neural network applications in power systems have been done offline on non-real-time platforms.
A model-based long short-term memory (LSTM) using deep learning forecasting network for accurate and precise load forecast was developed by [25].The authors made a comparison with two conventional models; exponential smoothing and autoregressive integrated moving average model, where LSTM was seen to outperform other models in its efficient response in memorizing large data sets.A smart house energy monitoring system based on machine learning and embedded technology was presented to address the existing smart home energy monitoring system's inadequacy in autonomous adaptation.To acquire autonomous decision-making capabilities, the system collects sensor data and then uses a cloud computing platform with Hadoop and machine learning algorithms to learn and detect user behaviours.The solution considerably increased the humanization of the smart home system, as evidenced by the examination of cases [26], [27].
The use of artificial intelligence (AI) in ship energy management systems was also a promising trend in energy management system [28].The motivations for their study have to do with the design and implementation of an intelligent energy management system for a ship's electric power system based on an adaptive neuro-fuzzy inference system.Similarly fuzzy system could be developed to forecast energy consumption [29].Other attempts to develop forecast energy include Markov chain concept and daily twentyfour hours renewable energy optimal schedule algorithm [30], [31].Integrating with the ship's integrated power system, this technology opens up a new arena of using renewable and sustainable energy sources in marine to minimize greenhouse gas emissions and boost sailing period and system reliability.MATLAB software was used to simulate this system, and energy management system was used to test rig hardware using a computer and an interface card to simulate the ship's electric power system.For the purpose of evaluating the Energy Management System performance, the simulation results were compared to the experimental findings [32].
Due to the fact that power systems are vast, complicated, geographically dispersed, and influenced by numerous unforeseen occurrences, solving optimization problems is extremely challenging.To take full advantage of the benefits of simplifying the formulation and execution of the problem, it is required to use the most effective optimization methods.A mathematical optimization and artificial intelligence hybrid techniques used in power optimization solutions and validated in [22], [33].
State-of-the-art approaches rely on learning-enabled components in various phases of modeling, sensing, and control at both the offline and online levels, with complex dynamical systems relying on the correct deployment and operation of several components.The challenge of dynamical systems with neural network components requiring run-time safety monitoring was addressed in the research.The lower bound and upper bound of system state trajectories are constructed in run time using a run-time safety state estimator in the form of an interval observer.The created run-time safety state estimator was made up of two auxiliary neural networks derived from neural networks embedded in dynamical systems, as well as observer gains to assure positivity, or the estimator's ability to predict the future [34].
Ayalew et al. [11] carried out research on power systems and concluded that power systems are huge and complicated, and can be influenced by a variety of unforeseen occurrences, making optimization problems difficult to solve.As a result, approaches for tackling these problems should be a topic of interest, the convolutional neutral network was suggested for solar energy forecasting [22], [35]- [37].In another development, an overview of some of the most important mathematical optimization approaches were also considered for the long-term optimization process, Artificial intelligence techniques for annual and quarterly energy forecasting [22], [27], [38], [39].The development of an optimization scheme for intelligent master controller with peer-to-peer energy system using deep learning is the focus of this work.With this, the recurrent neural network is deployed to forecast power consumption from the peer-to-peer energy system.

METHODOLOGY
In other to achieve the optimization scheme for intelligent master controller with collaboratives energy system, deep learning techniques is deployed [24], [40]- [42].The set of data were obtained from Kaggle and were used.At first instance, the attributes in the dataset are time stamped showing the full dates (hourly, monthly and the yearly) power consumption in megawatt.The dataset contains 121273 observations ranging from 2004 to 2018 which was split into train and test set for the prediction.Four modelling approaches (yearly, monthly, daily and hourly) were used to train the data in other to compare their accuracy and time taken to completely train the model, this will allow us justify the best overall approach which will best fit the data and could be adopted during implementation.For the yearly prediction, the dataset obtained from 2014 to 2017 were used for training the model while the dataset for 2018 were used as the test set.Furthermore, for the monthly prediction, a data set of 167 were sampled out for the training while the data set obtained from the last Int J Artif Intell ISSN: 2252-8938  Optimization scheme for intelligent master controller with collaboratives energy … (Kufre Esenowo Jack) 239 100 months were used as the test set; the daily prediction, 5,055 data set were sampled out for the training while the data set obtained from the last 100 days were used as the test set, and lastly, for the hourly prediction the dataset obtained from 2004 to 2018 (121273) were used for the training whereas the last 100 hours were used as test set.The recurrent neural network was developed in python using the Keras TensorFlow framework for modelling and forecasting the power consumption from the collaborative energy system.

RESULT DISCUSSION AND ANALYSIS
The results obtained from the developed model serve as crucial inputs for the intelligent master controller, which plays a pivotal role in monitoring and regulating the collaborative energy system efficiently.This integration is illustrated in Table 1 and Figure 1, demonstrating the practical application of the deep learning predictions.The experiment's outcomes are particularly valuable for energy forecasting, enabling optimization at different temporal scales, including yearly, monthly, daily, and hourly levels.By leveraging the predictive power of the deep learning algorithm, the energy system can make informed decisions and efficiently manage its resources to meet fluctuating energy demands.The root mean square error (RMSE) preformance metrics was used to examine the perfomance of the recurrent neural network.The RMSE was chosen over the mean squared error (MSE) because of its ease of interpretability.The RMSE indicates the euclidean distance between the predicted value and actual value which signifies the accuracy and how best the model was able to generalize on future data where a very low RMSE indicates a very high level of accuracy and vice versa.The formula for the RMSE [28] is given in (1).where n is the number of observations,   is the actual value of the power consumption and  ̂ is forcasted value of the power consumption.
Table 1 and Figure 1 show the difference between the actual hourly power use and the forecasted values over the course of a year.In order to make this forecast, the LSTM algorithm was employed.The RMSE of 0.1819 at epoch 50 demonstrates how well the LSTM model captured the trends in the data.With such a small RMSE, it is clear that the model's predictions were very near to the actual power use; this demonstrates the efficacy of the deep learning method in making long-term energy consumption forecasts.
Table 2 provides a comparison between the actual power consumption (in MW) and the predicted power consumption for various dates over a period of two years.The true values represent the real power consumption, while the predicted values are the results generated by the deep learning algorithm for the corresponding dates.The table illustrates how closely the predictions match the actual values, with some variations.The sum of the true values for the entire period is 470,394.13MW, and the sum of the predicted values is 473,230.43MW, showing that the overall predictions were quite close to the actual power consumption.This indicates the effectiveness of the deep learning algorithm in accurately forecasting energy usage over a two-year period.In Figure 2, you can see the average monthly energy consumption in megawatts (MW) over a certain period of time.The graph shows how energy usage varies from one month to another, with the energy consumption for each hour averaged over the entire month.The y-axis represents the energy consumption in MW, and the x-axis represents the different months.This figure helps us understand the patterns of energy usage throughout the year, which is useful for planning and managing energy resources effectively based on seasonal changes.
In Figure 2, the graph shows a comparison between the actual hourly power consumption and the predicted power consumption, but this time, the data is averaged over a one-month period.It's impressive to see how closely the predictions made by the LSTM model match the actual power consumption for each month, with only small differences.The RMSE of 0.2419 at epoch 50 tells us that the LSTM model's predictions are Int J Artif Intell ISSN: 2252-8938  Optimization scheme for intelligent master controller with collaboratives energy … (Kufre Esenowo Jack) 241 quite accurate.On the other hand, in Table 3, we can see the average daily power consumption in megawatt (MW) for the dataset.This gives us an overall understanding of how energy usage varies on a daily basis.
Overall, these results show that the deep learning approach is very effective in predicting energy consumption, both hourly and daily, and it has the potential to make energy management more efficient in practical situations.Figure 3 shows the average daily energy consumption in megawatts (MW) over a period of time.The graph illustrates how the energy usage varies throughout the day on an average basis.The y-axis represents the energy consumption in MW, and the x-axis represents the different hours of the day.This figure is useful for understanding the general patterns of energy consumption during the day, which can help in planning and managing energy resources more efficiently.4 complements the graph by presenting the average daily power consumption in megawatt (MW), providing a comprehensive view of energy usage patterns on a daily basis.Together, these results reinforce the effectiveness of the deep learning approach in forecasting energy consumption and underscore its potential to optimize energy management strategies in real-world applications.These findings strongly support the effectiveness of the deep learning approach in predicting energy consumption, suggesting that it could be a valuable tool in optimizing real-world energy management strategies.Although, the hourly model took a lot of time to train, however, it produces the lowest RMSE resulting in a very high accuracy.This model produces the highest accuracy compared to all other models used in the experiment.Hence, it can be deduced that the hourly model is the best approach which best fit the data and will produce the highest efficiency among other models used in this paper, therefore, the model should be favorably adopted during implementation to make the master controller work efficiently.
It was also observed from the result that other models for which the data were averaged yearly, monthly and daily before modelling saved the model training time during modelling.Although they were not as accurate as the hourly model however, shorter modelling period was achieved for each of them.The lower the time frame, the higher the accuracy and the longer the time it took to model them.This is due to the fact that the system was able to learn better when fed with more data, this implies that the more the data, the better the system learns and the higher the accuracy of the prediction.In other to minimize error, achieve greater accuracy and high efficiency, it is of best interest to use the hourly model approach as given in the dataset used for this research work which was timestamped hourly.

CONCLUSION
The optimization scheme for intelligent master controller with collaboratives energy system was developed using deep learning (recurrent neural network algorithm) technique.The scheme was deployed to provide the intelligent master controller with adequate energy data to decide on the effective power supply required at any interval of time, to ensure the efficient use of the energy generated.The system performed favourable on the real time basis and was able to decide on the adequate amount of energy needed at any time of the day.The result obtained from the experiment verifies that the system was well trained and could be sufficient enough to predict the efficient energy required by the intelligent master controller.Further work could consider developing an algorithm capable of deciding the range of energy that could be supplied within certain threshold in order to avoid overshoot and also the system should be able to accommodate special demand for high energy on occasional event.

Figure 1 .
Figure 1.Average yearly energy consumption in megawatt

Figure 2 .
Figure 2. Hourly energy consumption averaged monthly in megawatt

Figure 3 .
Figure 3. Hourly energy consumption averaged daily in megawatt

Figure 4 .
Figure 4. Average hourly energy consumption in megawatt

Table 4 .
Average hourly power consumption/prediction (MW) model's predictions were really close to the actual values, with an impressive RMSE of just 0.0217 at epoch 35.This low error means the model is very accurate in capturing the patterns in the energy consumption data.The data in the table was directly taken from the visualization created using the matplotlib library, which makes the results even more trustworthy.
ISSN: 2252-8938  Optimization scheme for intelligent master controller with collaboratives energy … (Kufre Esenowo Jack) 243 showed that the