Intelligent Modeling and Optimization of Solar Plant Production Integration in the Smart Grid Using Machine Learning Models

To address the rising energy demands in industrial and public sectors, integrating zero‐carbon emission energy sources into the power grid is crucial. Smart grids, equipped with advanced sensing, computing, and communication technologies, offer an efficient way to incorporate renewable energy resources and manage power systems effectively. However, improving solar energy efficiency, which currently contributes around 3.6% to global electricity, is a challenge in smart grid infrastructures. This research tackles this issue by deploying machine learning models, specifically recurrent neural network (RNN), long short‐term memory (LSTM), and gate recurrent unit (GRU), to predict measurements that could enhance solar power generation in smart grids. The objective is to boost both performance and accuracy of solar power generation in the smart grid. The study conducts experimental analyses and performance evaluations of these models in smart grid environments, considering factors like power output, irradiance, and performance ratio. The results, presented through graphical visualizations, show notable improvements, particularly with the LSTM model, which achieves a 97% accuracy, outperforming the RNN and GRU models. This outcome highlights the LSTM model's effectiveness in accurately predicting measurements, thereby advancing solar power generation efficiency in the smart grid framework.

by 15 min measurements from the preceding 2 days, to enhance photovoltaic power forecasts for distribution system operators in smart grids. [7]According to the Electric Power Research Institute, solar power plants are at the forefront of the renewable energy sector because of their ability to remotely monitor and safeguard their linked components and to automatically improve their operations.The study suggests three solutions.First, standard statistical models, then ML and deep learning.ARMA, ARIMA, exponential smoothing, linear regression, and comparable day's procedure are common statistical techniques.These approaches are restricted to learning complicated nonlinear input-output relationships and cannot deliver adequate results for such tasks. [8]In contrast to the limits of statistical models, ML algorithms may be able to enable scalable deployments, find hidden patterns in big datasets, and mimic complex nonlinear mapping between inputs and outputs.Artificial neural network (ANN), ensemble or hybrid models, decision tree regression, random forest, regression with support vectors, and extreme learning machines (ELMs) are also common in any time series study.For the period of 2016-2017, the author of [9] examined four ML approaches for forecasting short-term and long-term power consumption in Cyprus.
Utilizing population, economy, and climate data, the model forecasted future power requirements, with support vector machine (SVM) and ANN techniques demonstrating superior performance compared to multiple linear regression. [9]In, [10] a more advanced ML framework was proposed by combining SVM and ELM.The Grid search technique was employed to determine optimal hyper parameter values in the study.Probabilistic deep learning methods, particularly with careful hyper-parameter tuning, show superior performance in smart grid energy forecasting, achieving at least 60% lower prediction errors compared to other benchmark deep learning methods.However, their execution time increases significantly, necessitating a tradeoff between computational performance and forecasting accuracy. [11]A residual multiscale recurrent neural network (RM-RNN) for short-term power load forecasting, utilizing dilated convolution and a multilayer RNN structure to extract multi-scale features.Results from comparative experiments with various deep learning models demonstrate RM-RNN's superior accuracy, showcasing the effectiveness of dilated convolution and residual structure fusion in enhancing short-term load forecasting precision. [12]Additionally, an ANN model that predicts the 10-min ahead confidence interval for photovoltaic generators' output power, leveraging deep learning, mathematical probability density functions, and meteorological parameters. [13]Another load-forecasting algorithm using AI techniques, including ANN, SVM, and ELM, is presented and compared for accurate predictions considering the challenges of intermittent renewable energy systems and complex connect loads, with results analyzed for performance evaluation. [14]For accurate electrical consumption forecasting, employing deep learning and optimization techniques, including support vector regression (SVR), firefly algorithm (FA), and adaptive neuro-fuzzy inference system (ANFIS).Emphasizing error and risk minimization, the model utilizes FA for superior optimization, leveraging historical data from smart meters to enhance forecasting precision. [15]fter comparing several ML techniques, it became clear that long short-term memory (LSTM) produced the most accurate individual and aggregate results.Different approaches, including RNN, LSTM, and gate recurrent unit (GRU), were used in comparison with the sequence-to-sequence (Seq2seq) design for the model and observed the best performance, i.e., MAE = 5.20%.LSTM performance in single-and multi-step forecasting, comparing it to two ML techniques, with particularly strong results during summer months. [16]Similarly, [17,18] demonstrate the efficacy of LSTM by showing that it can correctly predict Poland's weather one and twenty-four hours in the future.The researchers also concluded that LSTM might be helpful in forecasting, particularly for areas with less stability or irregular power demand.Convolutional neural networks (CNN) have recently received significant attention in time series forecasting research.Sequential CNNs were validated and proven to outperform SVM as a forecasting model.Furthermore, CNN demonstrated superior performance compared to LSTM networks.Conversely, the performance of regression models is often not satisfactory.The authors of [18] initially investigated two-dimensional convolutional neural networks (2D-CNN), utilizing four channels to predict future energy consumption.Therefore, the objective of this study is to identify an efficient AI model capable of evaluating and predicting the power generation capacity and performance of the plant in the future. [19]o achieve the research objective, a comprehensive dataset spanning one year of real-time data from a 100 MW solar plant has been acquired.This dataset encompasses three key parameters: power generation (MWh), irradiance or plane of array (POA), and performance ratio (PR%).Building upon the existing literature, three distinct deep learning approaches to artificial intelligence, namely GRU, LSTM, and RNN, have been carefully selected.The training, testing, and validation processes for each model utilized 80% of the dataset, while the remaining 20% was reserved for final graphical visualizations depicting errors and prediction results.Notably, the graphical visualizations derived from this subset of real-time data demonstrated that the LSTM model outperformed both the simple RNN and GRU models, delivering more accurate predictions under similar weather conditions.
Section 2 is the major contribution points.Section 3 highlights the existing works.The methodology and framework for this study are detailed in Section 4, and Section 5 is the comparative analysis of the models, followed by the case study, which is Section 6, in which the structural analysis of the solar power generation plant is discussed, as well as the examination of the collected data.Section 7 presents the results and discussion, including graphical representations and comparisons, while Section 8 concludes the study.

Key Findings and Contributions
The study makes several notable contributions 1) The research introduces and employs advanced ML models, namely the RNN, LSTM, and GRU, in the context of predicting optimal measurements for solar power generation systems within the smart grid; 2) The study addresses a significant gap in the existing approaches to enhancing the efficiency of solar power generation systems within smart grid environments; 3) By applying ML models, the research aims to contribute to the overall performance improvement and accuracy enhancement of solar power generation systems integrated into the smart grid; 4) The research conducts experimental studies and performance analyses, evaluating the efficiency of the introduced ML models.This contributes to the understanding of their effectiveness in predicting optimal measurements for solar power generation; 5) The study identifies the LSTM model as outperforming other models, showcasing a high accuracy of 97% with minimal MAE and RMSE.This finding is a crucial contribution, indicating the model's efficacy for accurate predictions in the given context; 6) The obtained graphical visualization results provide a tangible and illustrative demonstration of the significant enhancements achieved, thereby contributing to the visualization of the impact of the proposed study; and 7) The research outcomes provide valuable insights for decision-makers and stakeholders involved in the planning, implementation, and management of solar power generation systems within the smart grid.These insights can inform strategies to optimize efficiency and accuracy.

Literature Review
The global abundance of renewable energy sources and the potential for clean and cost-effective energy production have spurred researchers to meticulously analyze and explore the energy potentials of various locations.Numerous studies have been undertaken to unveil efficient sites for harnessing wind, solar, hydrothermal, biomass, and other renewable energy sources.Another pivotal area of research within the renewable energy domain involves identifying locations with a higher likelihood of energy production, focusing on a single energy source like wind or solar.
The emerging trend suggests autonomous software will shape the future of energy management, optimizing decision-making and distribution operations.State-of-the-art ML technologies play a crucial role in enhancing decision-making within energy distribution networks.This study focuses on data-driven probabilistic ML techniques, emphasizing their real-time applications in smart energy systems.Key areas of investigation include ML applications in core energy technologies and energy distribution utilities.The study identifies significant opportunities and challenges, highlighting potential savings of $237 billion to $813 billion through the use of smart ML automation in energy systems. [20]The integration of ML algorithms into manufacturing has been an evolving process, marked by the continuous development of new applications.Notable examples include image processing for material feature descriptions and the design of products like computer-aided catalysts.The impact of these methods is evident in various processes, including the forecasting of wind power and the efficient management of energy distribution.This gradual adoption showcases the transformative potential of ML in enhancing manufacturing capabilities. [21]The article explores the current and prospective role of ML in the hydropower sector, offering insights into its applications.An overview is provided of the main applications of ML in hydropower operations, highlighting common themes found in recent scientific literature.The objective is to guide future research directions by identifying areas within hydropower that warrant further investigation.The article's key contribution lies in a critical examination of ML applications in hydropower scheduling, emphasizing the state of the art.The study identifies new roles for ML, especially when coupled with cyber-physical systems (CPSs), with a focus on addressing challenges in short-term hydropower scheduling (STHS). [22]ptimal design and tuning of fuzzy logic controllers (FLCs) using methodologies like particle swarm optimization (PSO), grey wolf optimizer (GWO), Moth-flame optimization (MFO), and multi-verse optimizer (MVO).FLC scaling factors for the grid-side converter, current regulator, and rotor-side converter of a back-to-back DFIG wind turbine are optimized.Multiobjective optimization is proposed to reduce steady-state errors in controllers and enhance dynamic performance under variable wind speeds.Comparison between suggested optimized controller and PI controller, evaluating effectiveness in managing a DFIG wind energy system.Introduction of a novel control approach for wind energy conversion systems (WECS) based on DFIG.Utilization of PSO, GWO, MFO, and MVO algorithms to regulate d-q element of stator and rotor currents for managing active and reactive power, maximizing MIMO-FLC transformation matrix.Testing of the proposed controller's operation in variable wind speeds, specifically simulating a transition from low to high wind gusts.Discovery that MFO-FLC controller is identified as the best-optimized controller, exhibiting excellent behavior in variable wind speed conditions. [23]The study provides an overview of the current state-of-the-art ML methods impacting sustainable energy production in various sectors.Emphasis is placed on applications with significant long-term sustainability potential, including renewable energies (wind power, solar power, hydropower, and biomass), computer-aided catalyst design, smart grids, and energy storage devices.The work assesses the suitability of ML techniques to address specific challenges within these sectors, highlighting their applicability.An outlook is presented, identifying current and future areas of opportunity within the covered sectors, contributing to the understanding of evolving trends in energy production.The study outlines recurrent barriers in each sector, motivating future research endeavors to overcome challenges and promote the effective deployment of ML technologies for long-term sustainability. [24]The successful implementation of this system can be a model for sustainable development, particularly in regions of Asia where nearly 40% of the population lacks access to power.Introduction of PowerFlexHouse, a research center dedicated to exploring technical possibilities of active load control in a distributed power system with high renewable energy penetration.Overview of the software platform enabling the use of building controllers, followed by a description of the facility (SYSLAB) based on a distributed power system.Demonstration of creating a thermal model predictive controller for estimating power consumption in the distributed power system.The PowerFlexHouse's control facilitates studies on how the intelligent house responds to a hybrid power grid, offering insights into the interactions between the system and a diverse energy environment. [25,26]The electrical power output of a solar PV panel is significantly influenced by various weather and physical elements.Among the key meteorological factors shaping solar power generation are solar irradiance, cloud cover, humidity, and ambient temperature.To enhance the accuracy of predicting solar power output, model inputs often incorporate forecasted weather parameters.These parameters include solar irradiance, cloud cover, humidity, and ambient temperature.As the model processes these inputs, solar power forecasts are generated, providing a valuable projection of the anticipated electrical power generation.Notably, in [27] stress the critical importance of predicting both the intensity and direction of solar radiation within a specific geographical area.This prediction serves as a fundamental requirement for estimating the production capacity of photovoltaic (PV) systems and solar power plants. [28]Arriving at a parallel conclusion, it is evident that achieving accurate predictions of PV power generation is a challenging task.This difficulty arises from the intricate interactions among numerous environmental conditions and uncontrollable factors.Hence, a pivotal aspect in overcoming this challenge is the comprehensive study of weather data.Recognizing the complexity involved, understanding and analyzing various environmental elements become crucial for predicting the nuanced impact on solar power generation.In essence, the intricate web of interdependencies necessitates a focused examination of weather data to enhance the precision of PV power generation predictions. [29]In this article, the primary objective is to categorize ML methods based on various perspectives and deliver a systematic and critical overview of their applications in recent PV power output scenarios, specifically focusing on temporal and spatial prediction scales.Notably, the authors observe that ANNs and SVMs emerge as the predominant choices among the diverse ML methods.The article delves into a detailed discussion, thoroughly exploring the potential advantages associated with optimizing machine models to enhance the overall prediction performance in the context of PV power output applications. [30]The article proposes an energy optimization algorithm based on ML (EOA-ML), which plays a key role in the predictive power trading framework.This algorithm contributes to the efficiency and optimization of energy usage.The suggested approach is successfully applied for power crowdsourcing between prosumers and consumers, demonstrating increased service reliability based on trial findings.The actual and predicted cost analysis reflects a substantial improvement (95%), while the delay rate is minimized (40.3%), showcasing the practical impact of the proposed system. [31]The increasing importance of solar energy generation for economies necessitates accurate forecasting models.Recurrent deep learning approaches, particularly LSTM and BiLSTM, are commonly used for such predictions.Model effectiveness varies across test cases, requiring attention to architecture and hyperparameters.The study integrates LSTM and BiLSTM with weather information for enhanced forecasting.Introduction of hyperparameter tuning using an enhanced version of the reptile search algorithm (RSA).Comparison against state-of-the-art metaheuristic optimization approaches in the same experimental setup.The proposed approach outperforms alternatives, indicating its superiority in forecasting accuracy.Best-performing recurrent model achieves R2 of 0.604 and a normalized MSE value of 0.014.Improvement of around 13% observed compared to traditional ML models. [32]

Methodology
A methodology is developed to identify a suitable technique for predicting and forecasting the power generation and performance of the plant, as illustrated in Figure 1.In this study, ML models are implemented on three different parameters of a solar plant, such as power generation (Mwh), performance ratio (PR%), and irradiance or POA, after modifications, to evaluate the prediction results using real-time data from the solar power plant.80% of this purified real-time series data is kept under training, testing, and validating conditions for the proposed models, and the results are acquired in terms of graphical visualization.The remaining 20% of the data is used for prediction through these models.There is neither under-fitting nor overfitting of training and testing data values in these prediction models.Lastly, the projected errors and the predicted output results are acquired for evaluation in terms of graphical visualization as shown in Figure 1.
As discussed previously, data from a solar power plant is collected, consisting of three parameters: power generation/production (MWh), POA, and PR%.To analyze and predict this data, three ML models are proposed: RNN, LSTM, and GRU.Prior to selecting these three models, extensive experimentation was conducted with various statistical and conventional models including SVM, ELM, CNN, and 2D-CNN in an attempt to enhance the results.However, none of them yielded accurate outcomes.Similarly, multiple ML models were applied to the dataset, but their performance fell short of expectations.In contrast, the results obtained from these three models were remarkable and surpassed the performance of all other models.In the initial phase, the imported data is validated to ensure its accuracy and reliability for time series analysis.Figure 2 depicts the validation process, where the data is checked for numerical format and filtered if necessary to maintain the integrity of the analysis.
The data is divided into two parts: 80% is allocated for training, testing, and validation of the ML models individually, while the remaining 20% (equivalent to 2 months) is reserved for generating graphical visualizations that showcase the prediction results and associated errors based on the trained models.These visualizations present a comprehensive overview of the predicted outcomes, RMSE, and MAE.In comparative evaluation, the LSTM model exhibits lower RMSE and MAE values for real-time data compared to the other two models.The next Section 4.1, provides a concise overview of the developed models, including their descriptions and mathematical expressions.

Recurrent Neural Network (RNN)
In Figure 3, the RNN cell is in its most basic form.The RNN cell suffers from the standard problems of declining gradient and ballooning gradient over very lengthy sequences.As fundamental RNN cells, they are insufficient because of their inability to preserve long-term dependence.When the sequences are particularly long, the back-propagated gradients tend to diminish, limiting a proper updating of the weights.Extremely strong gradients, however, may cause explosions spanning long sequences, making weight matrices unreliable.Both of these issues may be traced back to the unsolvable gradients that hinder RNN cells' ability to recognize and take into consideration long-term connections.
The mathematical expressions for RNN basic unit is given below: in Equation ( 1) and ( 2), H tÀ1 and H t denotes the pre-hidden and hidden state of the RNN, respectively.This is the sole method for remembering things in the RNN cell.At time step t, input and output are denoted by the symbols X t and Y t , respectively.P h , P x , and P o denote the weight matrices, whereas B a and B o denote the bias vector for the hidden state, respectively.The current hidden state H t , is determined not only by the hidden state at the previous time step H tÀ1 but also by the hidden state of the current input X t .This is reinforced by the feedback loops that are present in the RNN cell, which relate the state of the cell at the current state to its future state.These connections are of significant relevance because they allow information from the past to be taken into consideration while simultaneously bringing the current state of the cell up to date.In the experiments, the sigmoid function is employed, which is represented by σ, as the activation of the hidden state, and the hyperbolic tangent function, which is indicated by tanh, as the activation of the output.Both of these functions are denoted by their respective symbols.Both operations are designated by the symbols that correspond to their respective roles.

Gated Recurrent Unit (GRU)
It's important to note that GRUs fall within the category of RNNs. Figure 4 depicts the fundamental cellular organization of GRU.
As can be seen in Figure 8, the main distinction between the GRU and the LSTM is that the former consists of a logic circuit having an update and reset gate, i.e., Z t and R t as shown in Figure 4. GRU simplifies training as compared to others as it represents LSTM more accurately.However, it has a hidden state H t that is periodically updated by a gate mechanism.Both the current input X t and the previous hidden state H tÀ1 are necessary for the GRU to function (tÀ1).Two gates evaluate if this data may be used to change the hidden state H t .The quantity of data that may be held continuously decreases since the reset gate determines what fraction of the previous state in concealment must be saved.The first step is to produce the value through a sigmoid function ðσÞ, ranged between 0 and 1 is applied to the present input state H t and the last entry H tÀ1 as described below in Equation (3).
The second one is called the update gate, and while it is operating, both the input X t and the pre-hidden state H tÀ1 have their respective weights, W RH and W RX , which are multiplied by them.This happens throughout the operation of the update gate.After that, these two products are combined, and after that comes an application of a sigmoid activation function.This function fixes the output values between 0 and 1 as described in Equation (4).
In Equation ( 3) and ( 4), the reset gate output is denoted by Z t , W RH and W RX are the weights of reset gate, W ZX and W ZH are weights of the update gate of previous hidden state H tÀ1 and X t is the input respectively.
For H 0 t , first calculate the product of X t and W H 0 X .Secondly, the product of R t and ðH tÀ1 Ã W H 0 H Þ is calculated, which will determine what value should be remembered or removed, and then apply the non-linear function "tanh" by adding these two steps as shown in Equation ( 5).
First, we need to get the weighted product of the input X t and H 0 t , which is represented by the notation W H 0 X .The second step is to determine whether a given value should be remembered or forgotten by computing the product of the reset gate R t , and the previous value, ðH tÀ1 Ã W H 0 H Þ, as shown in Equation (5).
In Equation ( 5), W H 0 H and W H 0 X are the weight matrix, H tÀ1 is the pre-hidden state, R t is the output of reset gate, X t and tanh represents the input state and output activation function respectively.
Lastly, an update gate is required to determine which type of data is needed to be gathered from the existing and previous hidden states H 0 t and H 0 tÀ1 respectively.Initially, the product of Z T and H 0 t and the product of H tÀ1 and ð1 À Z t Þ is required for the update gate.So, by adding these two products, the value of H 0 t and H t is found as in Equation ( 6) and ( 7).
where H t is the current output, H tÀ1 represents the pre-hidden state and R t is the output of reset gate in Equation ( 7), respectively.

Long Short-Term Memory (LSTM)
The more complex type of RNN, LSTM, was designed to handle problems associated with explosive and declining gradients.To some extent, LSTM is structurally similar to RNN in that it is made up of repeating modules, but in a different way.As can be seen in Figure 5, an LSTM network has four layers instead of a single tanh layer, all of which are connected and communicate with one another.LSTM may benefit from this structure, which consists of three gates or four layers and can be used to a wide range of sequential problems.
The LSTM cell is a trifurcation with three gates.Figure 5 shows that the input at each time step is added to the input coming from the previous time step i.e.,H tÀ1 , and the result is fed into a series of gates.The sigmoid, also known as a forget gate, is used to process the values of H tÀ1 and ðX t Þ.The sigmoid function (σ) is employed for gates because it always generates a positive result and can be depended upon to provide a conclusive answer as to whether or not a certain property should be kept.The sigmoid function takes on values between zero and one, and it is used to decide whether values should be remembered by multiplying them by one (indicating open gates) or forgotten and ignored (mean gates are blocked).The output of a forget gate is represented mathematically in Equation (8).
in a similar vein, the input gate is what's employed to decide whether parts of the current cell state ðC t Þ really belong there.
An input gate layer with a sigmoid is one of two elements that make up this gate.The system determines which value needs to be modified.The one with the tanh layer generates additional potential state values ðC 0 t Þ.The input gate's parameters are shown in Equation ( 9) and (10).
to update the current cell state C t , the product of the previous cell state C tÀ1 and the output of the forget gate F t and the product of the cell state candidate input C 0 t with the value of input gate I t are added as shown below in Equation (11).
At the final stage, to upgrade the hidden cell state, input from the current cell state C t is passed through the activation function "tanh" and the it is multiplied by the values coming from output gate O t as shown in Equation (12).At the end, C t and H t moves back to recurrent unit to start the process at time step t þ 1 until it's over, as shown in Figure 5.
In the above Equation ( 9)-( 13), σ denotes the sigmoid function, C t is the current cell state, I t is for the input gate, F t is for the output gate, O t is for the output gate, X t and Y t are the input and output at current time step t þ 1, respectively, H t and H tÀ1 are the hidden states at current and previous time step, respectively.C 0 t and C 0 tÀ1 are the candidate states at current and previous time steps, respectively.
Lastly, the research included qualitative and quantitative measures to assess the efficiency of various models.QASP data includes a historical record of time series and actual MWh, POA, and PR values.Therefore, the accuracy of a neural network's predictions may be evaluated by comparing the predicted and actual values.To quantify the decline in precision regarding MWh, POA, and PR predictions, MAE and RMSEscores are selected.Both Equation ( 14) and ( 15) display the mathematical expressions of MAE and RMSE, respectively.
where N is the number of non-missing data points, Y i is the actual observed values, Y 0 i is estimated or predicted observed values for Equation ( 14) and (15).

Advantages of RNN, GRU, and LSTM Models for Sequential Data Analysis: a Comparative Analysis with SVM, ELM, CNN, and 2D-CNN"
This research study demonstrates the superior performance of specific RNN, GRU, and LSTM models compared to SVM, ELM, CNN, and 2D-CNN models across various key aspects.These models exhibit remarkable suitability for time series forecasting, sequential data processing, capturing long-term dependencies, and handling variable-length inputs.The inherent characteristics of RNN, GRU, and LSTM models make them highly effective in time series analysis, as they excel at capturing intricate patterns and dependencies in sequences.Their ability to learn from past patterns enables them to generate accurate predictions, while their adaptability to varying sequence lengths enhances their flexibility.Furthermore, the modified versions of these models showcased parameter efficiency by requiring fewer parameters than SVM, ELM, CNN, and 2D-CNN models, thereby enhancing computational feasibility and mitigating the risk of over fitting.It is important to note that while SVM, ELM, CNN, and 2D-CNN models may be suitable for certain types of data or specific problem domains, they are not wellsuited to the data and requirements of this research study.

Case Study 6.1. Structure and Capacity of Solar Power Plant
Because of changes in the past, solar energy industries in both developed and developing countries now make more power than ever before.The goal is to use coal and oil as little as possible because these fossil fuels are becoming less available and may not be around at all in the future. [6]Because there is demand on the grid, more rural areas in the developing world may be able to get electricity.The Japan International Cooperation Agency (JICA) funded a project called "Introduction of Clean Energy through Solar Power Generation Systems."The capacity of the plant is 100 MW, and daily solar radiation is over 19.2 MJ m À2 , yet only 5.3 kWh m À2 of solar power is produced. [33]According to the World Bank, just 0.071% of the total geographical area where this solar power plant is situated may be used to provide enough energy for the present demands.This region is great for making solar power because it is well insulated and gets a lot of sunlight (an average of eight to nine hours per day).Installation of PV panels and the internal power plant's allied equipment are shown in Figure 6a,b, respectively.The performance of PV panels is drastically altered by environmental factors. [34]These solar power plants would also do best in other provinces of this region because of the same weather and environmental conditions.
Electricity use and production must be balanced by energy providers to save power from renewable sources and prevent losses.Additionally, consumers need reliable and affordable access to electricity.Consequently, the renewable energy industry is making progress toward the grid connection of solar power facilities.Due to this, networks become unstable, which is the industry's biggest problem right now. [35]Predicting the quantity of energy generated by renewable energy resources under smart grids, usually, and by solar power plants, especially in such areas, is essential for long-term planning. [36,37]Thus, it is necessary to anticipate the number of PV installations to be done in the next few years.The location of this solar power plant satisfies all of the required conditions as it is situated near the largest desert and most of its land is barren or uncultivated.Therefore, all this justifies the installation of a solar plant as part of the Renewable Energy Policy 2006. [38]Initially, the project was supposed to be built in three stages, totaling 1000 MW.As part of the first phase of the project, 100 MW were placed over 500 acres.Details of the equipment are given in Table 1.There are 392 158 solar modules, each with a 255 watt output; nearly 10 000 solar arrays, each with 40 modules; 1400 combiner boxes; 100 centrally located inverters, each with a 1 megawatt output; 100 transformers, each with a 1 million voltage ampere rating; and a network of thousands of kilometres of cables.Over a hundred thousand screw piles are used to secure the arrays to the ground.A solid basis cannot be established.132 kV substation with two 100 MVA (megavolt-ampere) transformers.In addition to cutting-edge DCS and SCADA control systems, the substation area has 100 MVA switchgear and VAR protection.The power plant's 132 kV output is transmitted by a 132 kV line via the Solar Park and onto the national grid, from where it is distributed to customers.Dc-to-dc converters smooth out and correct the output of the solar panels.The power is then turned into alternating current (AC) and sent to the 33 and 132 KV transformers at the right stages of the step-up, as shown in Figure 7.

Data Collection and Analysis
Quantitative, real-time information on solar power plants is being gathered in 2018 and 2019.Daily calculations will provide precise and up-to-the-moment numbers like power output, plane of the array, and performance ratio.When determining where to install the solar PV system, a number of factors must be taken into account.According to, [39] the plant's location satisfies many requirements for power generation by using this PV technology, including a sufficiently sunny environment, a sufficient unoccupied area, and excellent insulation.[42][43][44] The pair plot and heat map of the solar power plant data are shown in Figure Figure 8a,b, respectively.In the pair plot, it can be seen that data is normally scattered with respect to the data of POA, whereas it is highly scattered if compared with the data of PR.Similarly, in the heat map, it can be seen clearly that a symmetry is present between the MWh and POA data, whereas PR data is much different from MWh and POA.
A standardized method to observe the data is box plot as shown in Figure 8c.This box plot is divided into four equal parts which express not only the values of data's outlier but also elaborates whether it is symmetrical or not.So, the acquired data from the plant represents that it is almost symmetrical and having accurate positive values.Range of the collected data for MWh is 360 MWh whereas the data set is more concentrated from  475 to 520 MWh having the low variability.Similarly the data range for POA is 6.8 kWh m À2 and data is little bit scattered in Q1 as compared to Q3.The range of PR data is 14%% and 50% of PR% of the plant's data lies between 75% and 80% having low variability as in Figure 8c.

Results and Discussion
The research employs deep learning methods to generate predictions for real-time data parameters of the solar power plant, calculating MAE and RMSE performance indicators for each training and test model, and selects RNNs, LSTMs, and GRUs as benchmarks for comparison based on their demonstrated utility in prior prediction and forecasting studies.In this research, the LSTM neural network is optimized using hyper parameters and techniques from future engineering.Table 2-4 provide a summary for each model individually and the parameters of the data forecasting framework that can and cannot be trained.This is done after the ideal fine-tuned parameters have been selected and datasets have been separated into trained, validated, and tested sets.Table 2-4 highlight the outcomes of updating the values of various trainable parameters using gradient, for example, error, loss, or cost relevant to chosen hyper parameters, in neural networks.This overall summary depicts that the trainable parameters for GRU are 334 k, for LSTM are 442 k, and for RNN are 110 k, as in Table 2-4.The accuracy of a model may be enhanced by extending the number of trainable parameters; however, it might result in over fitting.To avoid the problems of over fitting and under fitting that afflict neural networks, dropout layers were included in the model. [44]In Tensor Flow and Keras, under fitting and over fitting of the model because of trainable parameters may be shown by displaying the number of epochs to be used in comparison to training and validation losses.If a model is unable to improve its performance during the training set or the validation set, then it is considered to be underfit.If, after extensive training, a model is found to perform poorly on the validation set, it is said to be over fit.A model is considered a good-fitting model if it gives outstanding performance not only during the training set but also during the validation set, demonstrating    Table 5 shows the RMSE values and MAE values for these three proposed models.The suggested LSTM model is superior to others in terms of prediction accuracy, as shown by its low MAE and RMSE scores in both the training and testing phases.As for accuracy, the LSTM model has a MAE loss of 41.0046 for production (MWh), 0.54435 for POA, and 1.60119 for PR%.The RMSE loss values of 65.8929 for production (MWh), 0.92544 for POA, and 2.11141 for PR% are all much lower than those of the corresponding RNN and GRU models.Second, the MAE loss of the GRU model is 47.3585 for production (MWh), 0.62564 for POA, and 1.63034 for PR%.The GRU model's RMSE is 70.5523 for production (MWh), 0.95023 for POA, and 2.31037 for PR%, as shown in Table 5.Finally, the RNN model's MAE loss for production (MWh) is 41.5508, for POA is 0.56349, and for PR% is 1.92141.Similarly, the RNN model's RMSE loss is 67.4694 for production (MWh), 1.01092 for POA, and 2.68163 for PR%, as in Table 5.It is common for data form or erratic fine-tuned parameters to be at the root of neural networks' underand over-fitting issues.Since the MAE and RMSE scores were employed as a loss function of hyper parameters, it is not possible to assess the reliability and viability of the neural networks of the suggested approaches using simply these metrics.Over the course of 500 iterations, the study displayed the prediction errors of the training and testing models when stopping early."Early stopping" represents the optimization technique utilized in neural networks for preventing the model from becoming over fit, as shown in Table 2-  Figure 9a is the graphical comparison of the mean absolute error (MAE) loss of MWh through GRU, LSTM, and RNN models.Actual training and validation loss is shown on the y-axis, ranging from 0 to 1.2, and on the x-axis is the number of epochs, that is, from 0 to 500.Losses on both functions (training loss and validation loss) begin at the initial epoch and subsequently reduce after the following iteration, as shown in Figure 9a.The black line shows the MAE loss in production through the GRU model during iteration.The red line is the MAE loss for production through LSTM, and the blue line is the MAE loss for production through the RNN model.Although it can be clearly noticed that the LSTM is showing the best results as compared to the RNN and GRU, due to the overlapping of these three graphs, visualization results are not very clear.So, to make it clearer and more visible, a small portion (represented by a dotted red rectangle) of the whole graphical visualization, that is, about 100 to 400 epochs, is taken to examine the results more clearly, as shown in Figure 9.It can be observed that through RNN, the MAE loss rate of MWh is higher as compared to GRU and LSTM.Results through GRU are somehow better, but the lowest error rate is from LSTM, as can be clearly seen in the sub graph of Figure 9a.
Similarly, Figure 9b shows the graphical comparison of MAE loss of POA through GRU, LSTM, and RNN models.The y-axis represents the training and validation MAE loss of POA, ranging from 0 to 1.6, and the x-axis is the number of epochs, i.e., from 0 to 500.Training and validation losses on function begin at the initial epoch and subsequently reduce after the following iteration, as shown in Figure 9b.The black line shows the MAE loss in POA through the GRU model during iteration.The red line shows the MAE loss for POA via LSTM, and the blue one indicates the MAE loss for POA via RNN.Although it can be clearly observed that the LSTM is giving the best results as compared to the RNN and GRU, Overlapping of these three graphs makes these visualization results difficult to observe.So, to make it clearer and more visible, a smaller portion (represented by a dotted red rectangle) of the whole graphical visualization, that is, about 200 to 340 epochs, is taken under examination, as shown  in Figure 9b.According to sub-graphical visualization, GRU here, is showing poor performance as compared to LSTM and RNN, as can also be seen in Table 5. LSTM, in contrast, produces outcomes that are mostly satisfactory but somewhat different from those produced by RNN.
In the same way, Figure 9c is the graphical comparison of the MAE loss of PR% through GRU, LSTM, and RNN models.Here also, the y-axis depicts the actual training and validation MAE loss of PR% ranging from 0 to 1.2, and the x-axis is the number of epochs, that is, from 0 to 500.Training and validation losses on function begin at the initial epoch and subsequently reduce after the following iteration, as shown in Figure 9c line is the MAE loss for PR via RNN.In these visualization results, RNN is showing poor performance, and its MAE loss for PR is higher than LSTM and GRU.So, to make it more clear and visible, a small portion (represented by a dotted red rectangle) of the whole graphical visualization, that is, about 100 to 200 epochs, is taken under examination for more clear results, as in Figure 9c.According to sub graphical visualization, the MAE loss in PR through RNN is higher than the loss through GRU and LSTM.Whereas a very slight difference is present between the MAE loss through GRU and LSTM, but the overall results of LSTM are better than the other two models.
Figure 10a is the graphical comparison of the RMSE loss of MWh through the GRU, LSTM, and RNN models.The y-axis represents the real training and validation RMS error loss of production (MWh), ranging from 0 to 3, and the x-axis shows the number of epochs, ranging from 0 to 500.As shown in Figure 10a, both training and validation losses on function begin at the first epoch and diminish with each succeeding repetition.The black line depicts the root-mean-square (RMS) error loss in production (MWh) using the GRU model at each iteration.The red line shows the RMS error loss in production (MWh) using LSTM, while the blue line shows the same statistic with RNN.These findings reveal that GRU has inferior performance compared to LSTM and RNN.In Figure 10a, in order to make the findings more legible, just a portion (shown by the red, dotted rectangle) of the whole graphical depiction is examined.This subset represents around 100 to 200 epochs.The sub-graph reveals that the GRU and RNN both have higher error losses compared to the LSTM.Finally, the performance of LSTM is much better.Figure 10b is the graphical comparison of the RMSE loss of POA through GRU, LSTM, and RNN models.The y-axis depicts the real training and validation RMS error loss of POA, ranging from À0.5 to 4, and the x-axis displays the number of epochs, ranging from 0 to 500.As can be seen in Figure 10b, the loss of function during training and validation begins at the first epoch and decreases with each succeeding repetition.The black line depicts the mean squared error (MSE) decline in the POA, while the GRU model is iterated.The red line shows the RMS loss for LSTM on the POA, while the blue line shows the RMS loss for a RNN on the POA.The RMS error loss for the POA in RNN is greater than in LSTM and GRU, as shown in these visualization findings.While LSTM and GRU both result in about the same RMS error loss.Figure 10b shows that a subset (shown by the red, dotted rectangle) of the whole graphical depiction, including around 0 to 100 epochs, is examined in more depth in order to provide more legible findings.The MAE error loss of RNN is greater than that of GRU and LSTM, as shown by the sub graphical results.
In Figure 10c, a graphical comparison of the RMSE loss of POA through GRU, LSTM, and RNN models is shown.In the same way, again, the y-axis shows training and validation RMS error loss of PR% ranging from 0 to 2.5, and the x-axis indicates the number of epochs, which ranges from 0 to 500.As can be seen in Figure 10c, training and validation loss on function begin at the first epoch and diminish with each succeeding repetition.Through the GRU model's iterations, the black line represents the RMS decline in PR%.The red line shows the RMS error loss in PR% using LSTM, while the blue line shows the same statistic for RNN.Once again, RNN does poorly in these visualization findings, with a greater RMS error loss for PR% than LSTM and GRU.Nonetheless, there is a marginal dissimilarity between LSTM and GRU outcomes.Again, in Figure 10c, a sub graph (shown by the red, dotted rectangle) of the whole graphical display is examined in order to provide clearer findings.This time, the subset includes just the first hundred epochs.Moreover, the MAE error loss of RNN is more severe than that of LSTM and GRU, as shown by the sub graph.This time around, LSTM is responsible for delivering the overall performance.Overall, the graphical comparison of these models with the test data shows that LSTM is a better technique for prediction.Figure 11b shows a comparison of the real-time 20% (or 2 months) remaining test data graph of the POA of the solar power plant to the selected models GRU, LSTM, and RNN.The y-axis represents the POA of plane of array, and the x-axis represents the number of days.The black line represents the test data graph.On May 15, 2019, the POA value started at 5.5 kWh/m2 and peaked at 6.7 kWh/m2 in the test data graph.A decrease occurred on 05/17/2019, and after that, the value of POA remained between 5 kWh/m2 and 7.5 kWh/m2 from 05/25/2019 to 06/23/2019.After the sudden decrease on 6/24/2019, the POA attains its previous value, which was between 5.5 kWh/m2 and 6.7 kWh/m2.It can clearly be seen that the graphical results of the models GRU and LSTM are very similar to each other.The results through the RNN model are slightly different but the overall average value of POA is greater than GRU and LSTM as in Table 5.
Figure 11c shows a comparison of the real-time 20% (or 2 months) remaining test data graph of the PR% of the solar power plant to the selected models GRU, LSTM, and RNN.The y-axis represents the PR%, and the x-axis represents the number of days.The black line represents the test data graph.It can be seen that at the start of the month, the performance of the plant was about above 80%, and then a gradual decrease occurred up to 70.5% after the end of the second week.Improvement in the PR% can be seen after 6/24/2019 but it does not sustain and again decreases to 71%.During the last week, PR value has remained between 71% and 75%.Whereas the comparison graph shows that the PR% of LSTM is better than the other two, GRU and RNN.It started at 82%, and the maximum decrease occurred up to 73.5%.Here, the RNN shows poor performance as compared to the test data and the other two models.
The study introduces a novel application of modified RNN, GRU, and LSTM models for predicting solar plant parameters, showcasing their potential in the renewable energy domain.By developing accurate and customized models that account for uncertainties and long-term forecasting, this study offers valuable insights into the performance and suitability of these models, contributing to the advancement of solar energy forecasting.

Conclusion
The concluding evaluation distinctly showcased LSTM's superiority over GRU and RNN.Graphical representations vividly demonstrated LSTM's reliability in forecasting power output (MWh) and performance (PR%) with consistent efficacy, whether applied to real-time data or engaged in time series analysis amid analogous weather conditions and environmental parameters.So the conclusive findings underscore the LSTM model as the optimal predictive approach, surpassing both RNN and GRU.The LSTM outcomes revealed compelling metrics, including a RMSE of 67.5 for MWh, 0.93 for POA, and 2.31% for PR, alongside absolute error values of 41.5 for MWh, 0.56 for POA, and 1.92% for PR.This research indicated that in the future, hybrid and ensemble models of such artificial intelligent ML models may be implemented in other smart grid power generation plants like wind, biogas, tidal, etc. to evaluate and predict the precise and accurate production and performance rather than other conventional models, which may help to increase the generation capacity and efficiency of the plant.

Figure 1 .
Figure 1.Framework for best perdition model of solar plant.

Figure 2 .
Figure 2. Procedural flow chart to find predicted values and errors visualizations.

Figure 5 .
Figure 5. Internal structure of long short term memory (LSTM) cell.

Figure 6 .
Figure 6.a) Installed external grid equipment at solar power plant.b) Installed internal grid equipment at solar power plant.

Figure 7 .
Figure 7. Structure of solar power plant.

Figure 8 .
Figure 8. a) Pair plot of data acquired from solar power plant.b) Heat map of data acquired from solar power plant.c) Box plot of data acquired from solar power plant.
significant transfer learning.Examining the parameters of the proposed neural network model using epoch curves showing training and validation losses allows one to examine whether they are truly trainable.
4. A model becomes over fit over a particular time period.In other words, the early stopping technique stops training before the model over fits beyond a given epoch.The outcomes from the suggested optimal neural network models RNN, LSTM, and GRU are shown in Figure 9, respectively.These results demonstrate the real-train and validation MAE loss in production MWh, POA, and PR%.The training and validation MAE loss at a given epoch is shown against time along the y-axis.
Figure 9 shows the progression of training and validation loss on function from the beginning of the first epoch until the end of the last iteration.

Figure 9 .
Figure 9. a) Graphical evaluation of MAE loss of MWh through GRU, LSTM and RNN models.b) Graphical evaluation of MAE loss of POA through GRU, LSTM, and RNN models.c) Graphical evaluation of MAE loss of PR through GRU, LSTM, and RNN models.

Figure 10 .
Figure 10.a) Graphical evaluation of root mean square error (RMSE) loss of MWh through GRU, LSTM, and RNN models.b) Graphical evaluation of RMSE loss of POA through GRU, LSTM, and RNN models.c) Graphical evaluation of RMSE loss of PR through GRU, LSTM, and RNN models.

FigureFigure 10 .
Figure 11a shows a comparison of the real-time 20% (or 2 months) remaining test data graph to the selected models GRU, LSTM, and RNN.The y-axis represents MWh of production, and the x-axis represents the number of days.The black line represents the test data graph.On May 15, 2019, production started at 450 MWh and peaked at 550 MWh.A sudden decrease can be seen during the first two weeks when the production drops below 400 MWh.From 05/25/2019 to 06/21/2019, production MWh remained between 450 and 550 MWh, with a sharp decrease to 200 MWh on 06/21/2019.During the last week of

Figure 11 .
Figure 11.a) Graphical evaluation of real time test data results of MWh versus GRU, LSTM and RNN models results.b) Graphical evaluation of real time test data results of POA versus GRU, LSTM, and RNN models results.c) Graphical evaluation of real time test data results of PR% vs GRU, LSTM, and RNN models results.
www.advancedsciencenews.com www.advenergysustres.com the 2nd month, it decreases below 500 MWh, but the overall production remains between 450 and 550 MWh.Similarly, the models GRU and RNN are showing the same pattern, but the maximum decrease for both is up to 325 MWh.Only the LSTM is showing the smooth and constant values of production, that is, a maximum of 545 MWh and a minimum of 340 MWh.

Table 1 .
Equipment details of solar power plant.

Table 2 .
Model summary of trainable parameters based on an optimal fine-tuned GRU neural network.

Table 3 .
Model summary of trainable parameters based on an optimal fine-tuned LSTM neural network.

Table 4 .
Model summary of trainable parameters based on an optimal fine-tuned RNN neural network.

Table 5 .
Performance evaluation of different neural network models for both train and test sets using MAE and RMSE as loss functions.