Revolutionizing Solar Power Production with Artiﬁcial Intelligence: A Sustainable Predictive Model

: Photovoltaic (PV) power production systems throughout the world struggle with inconsistency in the distribution of PV generation. Accurate PV power forecasting is essential for grid-connected PV systems in case the surrounding environmental conditions experience unfavourable shifts. PV power production forecasting requires the consideration of critical elements, such as grid energy management, grid operation and scheduling. In the present investigation, multilayer perceptron and adaptive network-based fuzzy inference system models were used to forecast PV power production. The developed forecasting model was educated using historical data from October 2011 to February 2022. The outputs of the proposed model were checked for accuracy and compared by considering the dataset from a PV power-producing station. Three different error measurements were used—mean square error, root-mean-square error, and Pearson’s correlation coefﬁcient—to determine the robustness of the suggested method. The suggested method was found to provide better results than the most recent and cutting-edge models. The MLP and ANFIS models achieved the highest performance (R = 100%), with less prediction errors (MSE = 1.1116 × 10 − 8 ) and (MSE = 1.3521 × 10 − 8 ) with respect to MLP and ANFIS models. The study also predicts future PV power generation values using previously collected PV power production data. The ultimate goal of this work is to produce a model predictive control technique to achieve a balance between the supply and demand of energy.


Introduction
Continuous environmental challenges, such as rising pollution and diminishing fossil fuel reservoirs, have elevated renewable energy to the forefront of debate and research.As a result, various parties, including researchers, have made many attempts to achieve an environment with low pollution by suggesting low-carbon technologies in many industries, such as garments, home appliances and automobiles.Renewable energy is considered an option for sustainable and clean energy [1].Renewable energy includes different sources, such as biomass, solar, wind, geothermal and tidal power [2,3].It is regarded as a nonconventional energy source poised to play a significant role in the future [4].It is also essential if the smart cities that rely on solar energy are to be energy efficient and sustainable.Such smart cities produce power using renewable energy sources, such as solar panels, thereby reducing environmental damage.Renewable energy, particularly solar energy, has numerous applications, including light sources and public transportation.Solar cells are simple to use and install.They can be mounted on the roofs or sides of buildings to generate electricity for lighting, heating and cooling systems.In addition, solar-powered charging stations for electric vehicles can be set up throughout the city to encourage the use of clean energy transportation.By utilizing solar energy, smart cities can reduce their carbon footprints and become more self-sufficient in terms of energy production.Figure 1 shows examples of the various benefits that might be achieved from applying solar energy.
Sustainability 2023, 15, x FOR PEER REVIEW 2 of 22 sustainable.Such smart cities produce power using renewable energy sources, such as solar panels, thereby reducing environmental damage.Renewable energy, particularly solar energy, has numerous applications, including light sources and public transportation.Solar cells are simple to use and install.They can be mounted on the roofs or sides of buildings to generate electricity for lighting, heating and cooling systems.In addition, solar-powered charging stations for electric vehicles can be set up throughout the city to encourage the use of clean energy transportation.By utilizing solar energy, smart cities can reduce their carbon footprints and become more self-sufficient in terms of energy production.Figure 1 shows examples of the various benefits that might be achieved from applying solar energy.In this research, we focus on solar power, which is regarded as one of the fastestgrowing industries, as a source of power [1].The introduction of solar power has revolutionised how we generate and use energy.Solar energy is a renewable and clean energy source that can power homes, businesses and even entire cities.Nevertheless, despite the benefits of solar energy, it has some disadvantages when integrated into the power grid.In particular, the challenge lies in predicting the availability of solar power to maximise its potential; variations in solar power outputs and low technical support result in more pressure on the system, hindering carbon emission reduction [5].Environmental factors, such as climate, temperature, environment and sustainable intensity, can also pose problems, influencing power generation.These environmental factors impact the efficiency of the power output of the cells [6][7][8].Other factors, such as dust, snow, dirt, wind speed, atmospheric particles, cloudiness and solar irradiation can also influence the output and generation of solar power [5,[9][10][11].
As a result, gathering data that can be used for predicting and increasing solarpower-plant power generation is critical.Continuous tracking of solar power data can assist in determining the rate of performance loss in their systems.It can also aid in the upkeep of solar energy systems.That is to say, the benefits of power plants' bulk sales will rise if we can promptly and precisely identify the root cause of interfering signals and make critical decisions in abnormal situations [5].The various and numerous complicated and unknown influential environmental factors mentioned earlier make it challenging to ensure long-term daily predictions of solar radiation with high accuracy [12] and lead to more costs [13].Accordingly, many attempts have been made, using different prediction models, to predict the performance of solar energy.Artificial intelligence (AI), an effective and powerful tool, can be used to predict the availability of solar power; AI-based models In this research, we focus on solar power, which is regarded as one of the fastestgrowing industries, as a source of power [1].The introduction of solar power has revolutionised how we generate and use energy.Solar energy is a renewable and clean energy source that can power homes, businesses and even entire cities.Nevertheless, despite the benefits of solar energy, it has some disadvantages when integrated into the power grid.In particular, the challenge lies in predicting the availability of solar power to maximise its potential; variations in solar power outputs and low technical support result in more pressure on the system, hindering carbon emission reduction [5].Environmental factors, such as climate, temperature, environment and sustainable intensity, can also pose problems, influencing power generation.These environmental factors impact the efficiency of the power output of the cells [6][7][8].Other factors, such as dust, snow, dirt, wind speed, atmospheric particles, cloudiness and solar irradiation can also influence the output and generation of solar power [5,[9][10][11].
As a result, gathering data that can be used for predicting and increasing solar-powerplant power generation is critical.Continuous tracking of solar power data can assist in determining the rate of performance loss in their systems.It can also aid in the upkeep of solar energy systems.That is to say, the benefits of power plants' bulk sales will rise if we can promptly and precisely identify the root cause of interfering signals and make critical decisions in abnormal situations [5].The various and numerous complicated and unknown influential environmental factors mentioned earlier make it challenging to ensure long-term daily predictions of solar radiation with high accuracy [12] and lead to more costs [13].Accordingly, many attempts have been made, using different prediction models, to predict the performance of solar energy.Artificial intelligence (AI), an effective and powerful tool, can be used to predict the availability of solar power; AI-based models can accurately predict solar power output by considering weather conditions, geographical location and time of day.This research will explore how AI can predict solar power availability and how this technology can optimise solar energy utilisation.Our aim in this research is to examine effective prediction models of solar power generation so that power generation and consumption can be planned, given that solar power prediction is essential for grid integration in the solar management system [14].
The development of a prediction model for solar power generation is considered important because it contributes to comprehensive and balanced operations [15].A solar power prediction model would also contribute to reducing the future prediction errors of solar power [16].Furthermore, the exploration of solar power and other renewable energies has become a commonly agreed goal due to the rising pressure on power generation and the growing pressure from environmental conservation [12].Artificial neural networks (ANNs) are one of the most common methods for predicting solar radiation and have been successfully used for solar radiation prediction and solar system design [2].Our key contribution in this research includes a focus on ANNs in solar energy systems, as well as daily and monthly solar radiation prediction, because they are capable of data sorting, pattern detection and solving non-linear function estimations [12].Finally, research should be dedicated to ANNs and their applications in the area of solar energy.To increase their processing speed, ANNs use graphics cards [17].Because of their large cardinality, these systems are particularly well suited for prediction in high-dimensional spaces, where it is more probable that non-linear functions would exist between quantities of varying sizes.Nevertheless, ANNs' flexibility in accommodating changes in the distribution function raises the risk of "overfitting" [18], that is, of significantly overfitting the training data.This causes the ANN to become "memorised" in the information it has been given, rendering it incapable of making predictions.This can give the model a misleading impression of precision.To circumvent this, data must be divided between training and test models (often 80/20 or 90/10 for distinct samples), so that the accuracy of the model learned with fully unknown samples may be estimated.
As a multifunctional tool, ANNs have found widespread use in the solar energy industry.Solar panel construction [19], solar energy modelling in Nigeria [20], stand-alone installations [21], daily local energy radiation forecasting [22], residential self-sufficiency [23], solar power forecasting [24], 24 h-ahead energy production prediction [25] and global energy prediction in Spain [26] are just a few of the many areas where models have been presented.
Neural networks [27], support vector regression [28], an adaptive fuzzy approach [29] and empirical likelihood maximisation [30] are only a few of the AI-based approaches described in the literature for solar power production.Most of these AI-based methods are used to control non-linear interactions between input and output, in contrast to STbased methods.As it became apparent that weather classification played a significant role in developing an accurate model, a number of novel AI-based models have been developed, including models based on convolutional neural networks (CNNs) and generative adversarial networks (GANs) for power generation prediction [31].For solar power production, researchers have created several AI-based techniques, using recurrent neural network (RNN) [32], long short-term memory networks (LSTM) [33], convolutional neural networks (CNNs) [34] and a gated recurrent unit (GRU) [35], among others, for solar power production; these are discussed at length in a recent review [36].Hybrid models are useful for predicting solar power, according to one study [37], since they strike a good balance between stability and accuracy in terms of the parameters used.These AI-based approaches are built with shallow architecture, necessitating labour-intensive feature engineering and offering only modest generalisation [38].Both convolutional neural networks (CNNs) and recurrent neural networks (RNNs) are powerful AI tools, but although a CNN can recover information in many spatial dimensions [39,40], an RNN can only learn in one, and solar power generation requires the knowledge of both.
Therefore, for a precise solar power forecasting, a method that can extract spatial and temporal features is necessary.In order to permit a greater degree of integration of renewable energy into the controls of the current electrical grid, it is of the highest urgency to generate solar energy predictions that are correct.There is now a chance to apply datadriven algorithms to enhance the forecasting of solar power as a result of the availability of data at granularities previously unimaginable.The following is a list of the primary contributions that the research paper makes: 1.
In the grand scheme of things, this work aids in accomplishing a couple of the United Nations' Sustainable Development Goals.It is immediately related to Goal No. 13, "Climate action," and it is indirectly helping with other goals as well.2.
To be more precise, our research has developed a powerful AI model specifically for solar production forecasting.

3.
The contribution of enhanced ANFIS and MLP models for predicting solar production is significant because they enable the accurate forecasting of energy generation from renewable sources, such as solar power.

4.
When comparing the present model's performance to that of other models, the first was shown to be better in forecasting solar output than the latter.5.
These models can help energy companies optimise their operations by adjusting their output according to predicted demand.This can reduce the costs associated with overproduction or underproduction of electricity.Accurate predictions also help policymakers plan the integration of renewable energy sources into the grid system.

Materials and Methods
In this section, the suggested technique is broken down, and an in-depth description of the creation of the proposed system model is provided.After the construction of the suggested model, validation of the proposed model using actual PV systems was carried out.In addition, performance measures were used to evaluate performance.The solar production framework is presented in Figure 2. The subsequent steps of the proposed framework are described in the subsections.
Therefore, for a precise solar power forecasting, a method that can extract spatial and temporal features is necessary.In order to permit a greater degree of integration of renewable energy into the controls of the current electrical grid, it is of the highest urgency to generate solar energy predictions that are correct.There is now a chance to apply datadriven algorithms to enhance the forecasting of solar power as a result of the availability of data at granularities previously unimaginable.The following is a list of the primary contributions that the research paper makes: 1.In the grand scheme of things, this work aids in accomplishing a couple of the United Nations' Sustainable Development Goals.It is immediately related to Goal No. 13, "Climate action," and it is indirectly helping with other goals as well.2. To be more precise, our research has developed a powerful AI model specifically for solar production forecasting.3. The contribution of enhanced ANFIS and MLP models for predicting solar production is significant because they enable the accurate forecasting of energy generation from renewable sources, such as solar power.4. When comparing the present model's performance to that of other models, the first was shown to be better in forecasting solar output than the latter.5.These models can help energy companies optimise their operations by adjusting their output according to predicted demand.This can reduce the costs associated with overproduction or underproduction of electricity.Accurate predictions also help policymakers plan the integration of renewable energy sources into the grid system.

Materials and Methods
In this section, the suggested technique is broken down, and an in-depth description of the creation of the proposed system model is provided.After the construction of the suggested model, validation of the proposed model using actual PV systems was carried out.In addition, performance measures were used to evaluate performance.The solar production framework is presented in Figure 2. The subsequent steps of the proposed framework are described in the subsections.

Dataset
The dataset was obtained from the Kaggle repository.In October 2011, solar panels, also known as photovoltaic modules, were placed on the roof.The modules had a combined power output of 5 kWp.Since the dataset kept daily records of energy use, it was natural to also keep a record of the amount of power that was produced by the solar panels.There are four characteristics in the dataset.The data were gathered between 26 October 2011 and 27 February 2022.The data categories were date, cumulative solar power in kWh of electricity used and gas/days per m 2 used.Figure 3 shows the cumulative solar power for each year; the y-axis represents the number of samples and the x-axis is represents the time interval of collecting the data.
The dataset was obtained from the Kaggle repository.In October 2011, solar panels, also known as photovoltaic modules, were placed on the roof.The modules had a combined power output of 5 kWp.Since the dataset kept daily records of energy use, it was natural to also keep a record of the amount of power that was produced by the solar panels.There are four characteristics in the dataset.The data were gathered between 26 October 2011 and 27 February 2022.The data categories were date, cumulative solar power in kWh of electricity used and gas/days per m 2 used.Figure 3 shows the cumulative solar power for each year; the y-axis represents the number of samples and the x-axis is represents the time interval of collecting the data.

Preprocessing
In AI modelling, a "data preprocessing" phase is an essential component to extract the greatest amount of distinctive information from a dataset.The data that were obtained underwent preprocessing in order to complete tasks, such as filling in missing values, identifying and removing outliers and scaling the features to the same range.To achieve rapid convergence during the gradient-learning process of the ANN models, a min-max scaler was used for the process of scaling the dataset into a range between 0 and 1.By mitigating the impact of outliers, the min-max scaler's restricted range helps produce a standard deviation that is lower than it would otherwise be.Calculation of the min-max scaler was as follows: where fmin and fmax denote the fmin and fmax values, respectively, in this expression [39].

A Multilayer Perceptron (MLP)
A feed-forward neural network is a kind of closed, complex network that mimics the neural structure of the human brain by using a collection of basic nodes to model the network.In most cases, it is composed of three distinct but interconnected components or

Preprocessing
In AI modelling, a "data preprocessing" phase is an essential component to extract the greatest amount of distinctive information from a dataset.The data that were obtained underwent preprocessing in order to complete tasks, such as filling in missing values, identifying and removing outliers and scaling the features to the same range.To achieve rapid convergence during the gradient-learning process of the ANN models, a min-max scaler was used for the process of scaling the dataset into a range between 0 and 1.By mitigating the impact of outliers, the min-max scaler's restricted range helps produce a standard deviation that is lower than it would otherwise be.Calculation of the min-max scaler was as follows: where f min and f max denote the fmin and fmax values, respectively, in this expression [39].

Prediction Models 2.3.1. A Multilayer Perceptron (MLP)
A feed-forward neural network is a kind of closed, complex network that mimics the neural structure of the human brain by using a collection of basic nodes to model the network.In most cases, it is composed of three distinct but interconnected components or layers, as illustrated in Figure 4: the input layer; the hidden layer, which is the part of the network that contains the neurons; and the output layer.The importance of the connections between neurons is represented by their weights w i , which are multiplied by the inputs in the first layer of a neural network.Inside a neuron, a summation of these multiplications is performed, and a bias for the node is then applied.The activation function is a non-linear function that determines how each neuron's inputs, or nodes, contribute to the final output.This function determines the amount of activity experienced by neurons.As Figure 4 illustrates, the sigmoidal function, also known as the tan-sigmoid function, is the transfer function that is used the most.
inputs in the first layer of a neural network.Inside a neuron, a summation of these multiplications is performed, and a bias for the node is then applied.The activation function is a non-linear function that determines how each neuron's inputs, or nodes, contribute to the final output.This function determines the amount of activity experienced by neurons.As Figure 4 illustrates, the sigmoidal function, also known as the tan-sigmoid function, is the transfer function that is used the most.5. Feedforward the input through the network to obtain predicted output.6. Calculate the error between predicted output and actual output using a loss function.7. Backpropagate the error through the network to update weights and biases using gradient descent algorithm.8.After training, use the trained model to make predictions on new data.9. Feedforward the input through the network to obtain predicted output.10.Return predicted output as result of prediction process.Training a neural network entails comparing the model's inputs and outputs in order to make adjustments to the weight of the connections and the neuron bias.A training approach (of the backpropagation sort) for supervised training models aims to decrease the output error via weight adjustment iterations or epochs [41][42][43][44].Box 1 shows pseudocode of the MLP mode. Figure 5 shows flowchart of MLP model.

1.
Define the MLP model architecture with input layer, hidden layers and output layer.

2.
Initialise the weights and biases for each layer randomly.

3.
Set the learning rate and number of epochs for training.4.
For each epoch, iterate through the training data.

5.
Feedforward the input through the network to obtain predicted output.6.
Calculate the error between predicted output and actual output using a loss function.7.
Backpropagate the error through the network to update weights and biases using gradient descent algorithm.8.
After training, use the trained model to make predictions on new data.9.
Feedforward the input through the network to obtain predicted output.10.Return predicted output as result of prediction process.

Adaptive Neuro-fuzzy Inference System
ANFIS stands for adaptive neuro-fuzzy inference system.It is a type of artificial neural network that combines the strengths of fuzzy logic and neural networks to create a powerful modelling tool.ANFIS models are used in various applications, such as prediction, classification and control.An ANFIS model consists of five layers: the input layer, fuzzification layer, rule layer, defuzzification layer and output layer.The input layer receives the input data and passes them to the fuzzification layer, where the inputs are converted into fuzzy sets [45].The rule layer uses these fuzzy sets to generate rules that describe the relationship between inputs and outputs.The defuzzification layer converts the fuzzy outputs into crisp values, which are then passed to the output layer.For the sake of clarity, let us say that ANFIS is a two-input (x, y) model with a single output (z, fuzzy Sugeno architecture).If-then rules in fuzzy logic can be found elsewhere.Figure 6 depicts a typical ANFIS architecture.Let us assume that the fuzzy inference system under consideration takes in x and y and spits out f .The following outlines the typical rule set for the first-order Sugeno fuzzy y-inference model, which consists of two fuzzy if-then rules: In this equation, x and y represent the input variables; p 1 , p 2 , q 1 , q 2 , r 1 and r 2 represent the linear polynomial parameters; A 1 , A 2 , B 1 and B 2 represent the output fuzzy sets of the ANFIS model and f represents the final result.tion, classification and control.An ANFIS model consists of five layers: the input layer, fuzzification layer, rule layer, defuzzification layer and output layer.The input layer receives the input data and passes them to the fuzzification layer, where the inputs are converted into fuzzy sets [45].The rule layer uses these fuzzy sets to generate rules that describe the relationship between inputs and outputs.The defuzzification layer converts the fuzzy outputs into crisp values, which are then passed to the output layer.For the sake of clarity, let us say that ANFIS is a two-input (x, y) model with a single output (z, fuzzy Sugeno architecture).If-then rules in fuzzy logic can be found elsewhere.Figure 6 depicts a typical ANFIS architecture.Let us assume that the fuzzy inference system under consideration takes in x and y and spits out .The following outlines the typical rule set for the first-order Sugeno fuzzy y-inference model, which consists of two fuzzy if-then rules:   The first layer is the "fuzzification" layer.The input parameters are transformed into a fuzzy set via the fuzzy inference system's membership function at this layer.In this study, we used a Gaussian-shaped membership function to map the training data to the interval Sustainability 2023, 15, 7999 where the output of the layer is represented in O 1,i ; µ(x) and µ(y) are the membership functions of a Gaussian distribution; A i stands for the language parameter and the Gaussian function has three constants, σ i , b i and c i [45] • Implication Layer 2: The second layer consists of predetermined nodes.The goal of this layer is to produce an output, which is accomplished by multiplying all the signals received from the layer below it.The output may be denoted by the symbol w i .
• Normalizing Layer 3: In the third layer, all of the nodes are permanently connected and are denoted by the letter N. The outputs of this layer are derived by applying the rules of the firing strength inference system.
where the output of layer 3 is indicated by O 3,I and the rule-based inference system firing strength is represented by (w).
• Defuzzifying Layer 4: Adaptive nodes may be found in layer 4. The adaptive nodes may be fine-tuned using its three parameters.The weighted consequent value is computed for each node w i in this layer as [46]: where O 4,i is the output of layer 4. The inference system's parameters are denoted as p i , q i , and r i .
• Combining Layer 5: Inference occurs in layer 5, which is utilised to derive the final result from the preceding levels [47,48].
A flowchart of the ANFIS model to predict solar production is presented in Figure 7. Box 2 shows pseudocode of the ANFIS model.

1.
Initialise the ANFIS model with appropriate parameters and membership functions for each input variable.

2.
Split the available data into training and testing sets.

3.
Train the ANFIS model using the training data by adjusting the membership function parameters and weights of each rule using a gradient-descent algorithm.

4.
Evaluate the performance of the trained ANFIS model on the testing data by calculating various metrics, for example, MSE.

5.
Use the trained ANFIS model to make predictions on new input data by passing it through the forward pass of the network and obtaining an output value.6.
Compare the predicted output with actual output values to evaluate the accuracy of predictions.7.
If necessary, retrain or adjust the ANFIS model based on new data or changes in input variables or membership functions.

Performance Measurement
In this study, several measures from the realm of statistical analysis were used to assess the quality of the created model.The ANFIS model was evaluated using the mean square error (MSE), root-mean-square error (RMSE) and Pearson's correlation coefficient (R%).The corresponding equations for these variables were as follows: Mean squared error (MSE) quantifies the typical size of the squared errors across a collection of forecasts.Since the error is squared, the result is always positive, regardless of the direction of the error.The symbolic representation is as follows: The root-mean-squared error (RMSE) quantifies the typical disparity between the anticipated and observed values.Accordingly, the root-mean-squared error (RMSE) is the average vertical distance between the actual value and the corresponding predicted value on the fit line.MSE is merely the square root of that number.
The experimental value of data point I denoted by y (y i,eobser ) and the predicted value of data point I is denoted by y (y i,pred ), where n is the total number of input data points.

Correlation Analysis
The degree to which two variables are connected is measured by a statistical measure called correlation.The Pearson product-moment correlation is the most popular method because it provides a clear picture of the linear relationship between any given pair of variables.Several studies have demonstrated that when the Pearson value is zero, this does not mean that there is no relationship at all between the variables.Therefore, we need to build a correlation matrix to determine what kind of relationships exists among our most critical variables.Figure 8 shows the correlation coefficients between dataset variables.It can be seen that there is a strong connection (72%) between kWh electricity and gas/days.

Experiment
An effective ANFIS and MLP model was constructed on the basis of a database that was collected from a standard dataset, as described above.This model, which was developed using MATLAB 2020, served as the computational platform for the modelling work that was performed.The variables that were employed as inputs for the modelling were the starting concentration, the date, cumulative solar power, kWh electricity used and gas m 2 used.The data were log normalised, and the MSE, RMSE, R% and R 2 were used in the

Experiment
An effective ANFIS and MLP model was constructed on the basis of a database that was collected from a standard dataset, as described above.This model, which was developed using MATLAB 2020, served as the computational platform for the modelling work that was performed.The variables that were employed as inputs for the modelling were the starting concentration, the date, cumulative solar power, kWh electricity used and gas m 2 used.The data were log normalised, and the MSE, RMSE, R% and R 2 were used in the evaluation of the constructed model's capacity to make accurate predictions.

Development of the MLP and ANFIS Models
In this section, the development of the MLP and ANFIS models is presented.Input data contained information about past solar production.Model validation in the MLP model consisted of 20% of randomly selected data from the training dataset.If the network's performance does not increase on the validation vectors during training, the training is terminated using the validation set.We experimented with three different learning algorithms, 200 epochs and the sigmoid activation function, as well as a variety of internal connection densities, layer densities (3, 5 and 10) and epoch sizes.The MLP model's predictions were checked against every piece of datum in the testing set.The dataset was split in half, with one half used for training and the other used for evaluating intermediate-term projections.Then, for a three-year prediction window, the MSE and RMSE were calculated.
Table 1 shows the MLP's significant parameters, with 100 iterations of the training model with different starting weights.After training, it was found that the starting weights had a modest correlation with the ultimate outcomes.The MSE, however, was shown to be quite insensitive to the choice of starting weights, with an error standard deviation of less than 0.1%.Figure 9 shows the development of the MLP model to predict solar production whereas blue circle is hidden layer 1, red circle is hidden layer 2 and yellow circle is hidden layer 3.In this study, we present an ANFIS model that uses fuzzy set theory's guiding principles and procedures to evaluate CPU usage by factoring in the effects of cache, memory (RAM), storage and bus throughput.It is necessary to specify language variables and membership functions before beginning the fuzzification module of an adaptive neuro-fuzzy inference system.The input numeric values for RAM, cache, storage and bus usage are all fuzzified into inputs in the fuzzification module.Here, we used a membership function of the Gaussian distribution.As the last component of the ANFIS model, the defuzzification module refines the fuzzy outputs, providing linguistic values in the case of the Mamdani type, and crisp values in the case of the Sugeno type.Fuzzing the input numerical values, implementing rule strengths, training the inference engine and constructing rule strengths, all happen at this stage.In this case, rule strengths are used to convert fuzzy output data into numbers.As shown in Figure 10, we used the default centroid defuzzification approach for Mamdani ANFIS and the weighted average method for Sugeno-type ANFIS.In this study, we present an ANFIS model that uses fuzzy set theory's guiding principles and procedures to evaluate CPU usage by factoring in the effects of cache, memory (RAM), storage and bus throughput.It is necessary to specify language variables and membership functions before beginning the fuzzification module of an adaptive neurofuzzy inference system.The input numeric values for RAM, cache, storage and bus usage are all fuzzified into inputs in the fuzzification module.Here, we used a membership function of the Gaussian distribution.As the last component of the ANFIS model, the defuzzification module refines the fuzzy outputs, providing linguistic values in the case of the Mamdani type, and crisp values in the case of the Sugeno type.Fuzzing the input numerical values, implementing rule strengths, training the inference engine and constructing rule strengths, all happen at this stage.In this case, rule strengths are used to convert fuzzy output data into numbers.As shown in Figure 10, we used the default centroid defuzzification approach for Mamdani ANFIS and the weighted average method for Sugeno-type ANFIS.
Using the MATLAB fuzzy library, the ANFIS team developed a subtractive clustering algorithm with an acceptance radius of 0.55 and a maximum of 100 training and validation rounds.The model made use of identical inputs from the neural networks.Nevertheless, owing to the longer period of training, the total number of days of delay was capped at four.Because of its uniqueness in the ANFIS algorithm, the Gaussian transfer function was chosen for this subtractive clustering method.Figure 10 depicts the framework of the ANFIS model with two rules, and Table 2 lists the values of the model's parameters.Using the MATLAB fuzzy library, the ANFIS team developed a subtractive clustering algorithm with an acceptance radius of 0.55 and a maximum of 100 training and validation rounds.The model made use of identical inputs from the neural networks.Nevertheless, owing to the longer period of training, the total number of days of delay was capped at four.Because of its uniqueness in the ANFIS algorithm, the Gaussian transfer function was chosen for this subtractive clustering method.Figure 10 depicts the framework of the ANFIS model with two rules, and Table 2 lists the values of the model's parameters.

Results and Performance of the MLP Model
This subsection describes the accurate results that the MLP model obtained while trying to forecast the amount of solar energy produced.The dataset was segmented into 80% training, which is a necessary step in the process of developing a highly effective model utilizing certain experimental data, and 20% testing, making use of data that have not been seen before in order to validate the model.The predicted values of the solar production (y-axis) and the experimental values (x-axis) are completely in agreement across all datasets, as shown in Figure 11 and Table 3, respectively.The constructed MLP is ready to be tested if it has high values of R% (100%) at training and testing, as well as extremely low values of MSE and RMSE.These values indicate that the system is ready to meet the specified goals.The histogram inaccuracy that occurred for the model's projected values when it was in the training and testing phases is shown in Figure 12.Analysing the error histogram metrics allowed for the computation of the degree of discordance that occurred between the expected values and the actual values.In addition, the metrics demonstrated the degree to which the desired values and the expected values diverged from one another.The histogram errors that occurred during the training process were very small; however, the outcomes from the MLP model during the testing phase had a value of 0.000972.The histogram inaccuracy that occurred for the model's projected values when it was in the training and testing phases is shown in Figure 12.Analysing the error histogram metrics allowed for the computation of the degree of discordance that occurred between the expected values and the actual values.In addition, the metrics demonstrated the degree to which the desired values and the expected values diverged from one another.The histogram errors that occurred during the training process were very small; however, the outcomes from the MLP model during the testing phase had a value of 0.000972.The histogram inaccuracy that occurred for the model's projected values when it was in the training and testing phases is shown in Figure 12.Analysing the error histogram metrics allowed for the computation of the degree of discordance that occurred between the expected values and the actual values.In addition, the metrics demonstrated the degree to which the desired values and the expected values diverged from one another.The histogram errors that occurred during the training process were very small; however, the outcomes from the MLP model during the testing phase had a value of 0.000972.In order to calculate the MSE of the network and make accurate predictions about solar output, a performance plot was used since it was considered useful to put the idea to the test.Figure 13  In order to calculate the MSE of the network and make accurate predictions about solar output, a performance plot was used since it was considered useful to put the idea to the test.Figure 13               Figure 15 displays the error histogram of the trained model's predicted values.The error histogram measurements were analysed to ascertain the degree of discrepancy between the forecasted and desired outcomes.Such error numbers can be negative, since they quantify the degree to which actual results fall short of expectations.The highest histogram error during validation was reported to be 0.001497.As a result, we were able to complete the stages of defuzzification, determining the inference technique and building the rule foundation for our ANFIS models.The input parameters of a Mamdani-type ANFIS model and a Sugeno-type ANFIS model are shown by the rule viewer in Figure 16.The Sugeno ANFIS model assigned a value of 79% to the As a result, we were able to complete the stages of defuzzification, determining the inference technique and building the rule foundation for our ANFIS models.The input parameters of a Mamdani-type ANFIS model and a Sugeno-type ANFIS model are shown by the rule viewer in Figure 16.The Sugeno ANFIS model assigned a value of 79% to the CPU's utility.In accordance with the predetermined rule basis, the Mamdani ANFIS model determined the value to be 1.113.Whereas the yellow colour indicate to fuzzy rules setup.

Validation and Discussion
Renewable energy sources are an essential part of sustainable development because of their ability to reduce the reliance on fossil fuels for the production of electricity, reduce the emission of greenhouse gases and strengthen energy stability over the long term.Wind-based generation and solar energy-based generation are two of the renewable energy sources that are expanding at a fast rate.
As can be observed from the findings, the suggested ANFIS and MLP models overpower other current machine learning models throughout the anticipated period in terms of all performance measures used to assess forecasting accuracy for predictions of solar generation.This was the case for all the metrics.The suggested model was evaluated on three real-world PV systems using four years' worth of weather data to offer an all-encompassing assessment.The MLP and ANFIS models achieved low prediction errors according to the MSE metrics 5.177 × 10 −6 and 7.3615 × 10 −6 at the testing phase.
In order to validate the ANFIS and MLP models, we made a projection of the future values of solar output for a period of 30 days, beginning on 28 February 2022 and ending on 28 March 2022.Figure 17 provides a graphical depiction of the thirty-day prediction.
PV solar energy prediction has become an increasingly significant tool for dealing with the volatility and unpredictability associated with solar power in contemporary grids

Validation and Discussion
Renewable energy sources are an essential part of sustainable development because of their ability to reduce the reliance on fossil fuels for the production of electricity, reduce the emission of greenhouse gases and strengthen energy stability over the long term.Windbased generation and solar energy-based generation are two of the renewable energy sources that are expanding at a fast rate.
As can be observed from the findings, the suggested ANFIS and MLP models overpower other current machine learning models throughout the anticipated period in terms of all performance measures used to assess forecasting accuracy for predictions of solar generation.This was the case for all the metrics.The suggested model was evaluated on three real-world PV systems using four years' worth of weather data to offer an allencompassing assessment.The MLP and ANFIS models achieved low prediction errors according to the MSE metrics 5.177 × 10 −6 and 7.3615 × 10 −6 at the testing phase.
In order to validate the ANFIS and MLP models, we made a projection of the future values of solar output for a period of 30 days, beginning on 28 February 2022 and ending on 28 March 2022.Figure 17 provides a graphical depiction of the thirty-day prediction.
Sustainability 2023, 15, x FOR PEER REVIEW 19 of 22 by power system operators, which will help to ensure a more efficient management and secure operation of the grid as well as an increase in the cost-effectiveness of the PV system.Table 5 shows a comparison between the existing solar-production models and developed models.

Conclusions
The primary objective of this study was to investigate and analyse different approaches to the prediction and assessment of solar power production.We conducted extensive tests using models based on AI to correctly forecast the amount of power generated on the basis of the outcomes of our studies.It was shown via the predictions of earlier experiments that constructing an appropriate prediction model by relying only on the data collected by monitoring equipment physically placed in the solar power plant is not possible.The real applications, together with the associated feature data, indicate the possibility that solar-power forecast models will steadily develop to the point where forecasts can be optimised via various model tests.The conclusions of the proposed research are as follows: PV solar energy prediction has become an increasingly significant tool for dealing with the volatility and unpredictability associated with solar power in contemporary grids because of the increased deployment of solar energy in these systems.For this reason, we are working to find a model that is capable of producing continuous real-time forecasts using meteorological data.This is essential for providing support for important decisions by power system operators, which will help to ensure a more efficient management and secure operation of the grid as well as an increase in the cost-effectiveness of the PV system.Table 5 shows a comparison between the existing solar-production models and developed models.

Conclusions
The primary objective of this study was to investigate and analyse different approaches to the prediction and assessment of solar power production.We conducted extensive tests using models based on AI to correctly forecast the amount of power generated on the basis of the outcomes of our studies.It was shown via the predictions of earlier experiments that constructing an appropriate prediction model by relying only on the data collected by monitoring equipment physically placed in the solar power plant is not possible.The real applications, together with the associated feature data, indicate the possibility that solar-power forecast models will steadily develop to the point where forecasts can be optimised via various model tests.The conclusions of the proposed research are as follows: 1.
In this research, we offered a model that offers a solution for users and authorities interested in sustainable energy power forecasts based on solar power.The model was developed by us and published as part of this study.2.
Our method involves the presentation of an MLP structure and an ANFIS structure, both of which have been evaluated using a variety of topologies.In addition, our method offers solar energy forecasts using data that have been gathered from open data sources.It has a number of benefits over other methods now in use, as described below.

3.
It provides accurate, reliable findings.Compared to other methods that we have discovered in the research literature, the technique that is described produces results that are comparable on the MSE and RMSE metrics.4.
RMSE and MSE were used as measures to compare the performance of the proposed model with that of existing ensemble models.The ANFIS and MLP models that were suggested were superior to the other models and lowered the MSE by 5.177 × 10 −6 and 7.3615 × 10 −6 . 5.
On the basis of the R-correlation measurements, both the MLP and the ANFIS models achieved a score of 100% when it came to predicting the future values of solar output.6.
The results that were collected provide evidence that the algorithms that were used to solve the related forecasting problem based on the daily datasets were successful.This is shown by the fact that the problem was successfully solved.In addition, it has been shown that the performance of both models was better than that of the other approaches used.The findings of this research may be considered by policymakers at the national and local energy levels when making decisions on the viability of solar power to replace conventional fossil fuel sources and to make a positive contribution to the preservation of the natural environment.The findings of this research were compiled over the course of many years in order to ensure that they were as precise as possible.Accurate predictions are desired for solar energy projects.7.
Future work could focus on developing more accurate and comprehensive weather models that can be integrated into ANN models to improve solar production predictions.Furthermore, developing models that can accurately predict solar production for larger-scale systems, such as utility-scale solar farms, is highly warranted.

Figure 1 .
Figure 1.Examples of smart-city use of solar energy.

Figure 1 .
Figure 1.Examples of smart-city use of solar energy.

Figure 2 .
Figure 2. Scheme of the proposed system.Figure 2. Scheme of the proposed system.

Figure 2 .
Figure 2. Scheme of the proposed system.Figure 2. Scheme of the proposed system.

Figure 3 .
Figure 3. Cumulative solar power for each year in the dataset.

Figure 3 .
Figure 3. Cumulative solar power for each year in the dataset.

Figure 4 .
Figure 4. Generic structure of an MLP model.Training a neural network entails comparing the model's inputs and outputs in order to make adjustments to the weight of the connections and the neuron bias.A training approach (of the backpropagation sort) for supervised training models aims to decrease the output error via weight adjustment iterations or epochs[41][42][43][44].Box 1 shows pseudocode of the MLP mode.Figure5shows flowchart of MLP model.

Box 1 .
Figure 5 shows flowchart of MLP model.Pseudocode of the MLP model.1. Define the MLP model architecture with input layer, hidden layers and output layer.2. Initialise the weights and biases for each layer randomly.3. Set the learning rate and number of epochs for training.4. For each epoch, iterate through the training data.

Figure 4 .
Figure 4. Generic structure of an MLP model.

Box 1 .
Pseudocode of the MLP model.

Figure 5 .
Figure 5. Flowchart of the MLP model.Figure 5. Flowchart of the MLP model.

Figure 5 .
Figure 5. Flowchart of the MLP model.Figure 5. Flowchart of the MLP model.

• Fuzzifying Layer 1 :
The name "fuzzification layer" describes the first layer.The input parameters are transformed into a fuzzy set via the fuzzy inference system's membership function at this layer.In this study, we used a Gaussian-shaped membership function, one of many possible membership functions, to map the training data to the interval [0, 1].

𝑅𝑢𝑙𝑒 1 : 2 )𝑅𝑢𝑙𝑒 2 : 3 )• Fuzzifying Layer 1 :
, ℎ  =   +   +  (        , ℎ  =   +   +  (In this equation,  and  represent the input variables;  ,  ,  ,  ,  and  represent the linear polynomial parameters;  ,  ,  and  represent the output fuzzy sets of the ANFIS model and f represents the final result.The name "fuzzification layer" describes the first layer.The input parameters are transformed into a fuzzy set via the fuzzy inference system's membership function at this layer.In this study, we used a Gaussian-shaped membership function, one of many possible membership functions, to map the training data to the interval [0, 1].

Box 2 .
Pseudocode of the ANFIS model.

Figure 7 .Box 2 .
Figure 7. Flowchart of the ANFIS model.Box 2. Pseudocode of the ANFIS model.1. Initialise the ANFIS model with appropriate parameters and membership functions for each input variable.2. Split the available data into training and testing sets.3. Train the ANFIS model using the training data by adjusting the membership function parameters and weights of each rule using a gradient-descent algorithm.4. Evaluate the performance of the trained ANFIS model on the testing data by calculating various metrics, for example, MSE. 5. Use the trained ANFIS model to make predictions on new input data by passing it through the forward pass of the network and obtaining an output value.

9 Figure 9 .
Figure 9. Development structure of the MLP model.

Figure 9 .
Figure 9. Development structure of the MLP model.

Sustainability 2023 ,
15, x FOR PEER REVIEW 15 of 22 to be tested if it has high values of R% (100%) at training and testing, as well as extremely low values of MSE and RMSE.These values indicate that the system is ready to meet the specified goals.

Figure 11 .
Figure 11.MLP model regression plot for predicting solar production (a) training (b) testing.

Figure 11 .
Figure 11.MLP model regression plot for predicting solar production (a) training (b) testing.
provides a visual representation of how well the MLP model performed.During epoch 200, the value 1.1116 × 10 −8 proved to be the most accurate validation of the ANN model.Sustainability 2023, 15, x FOR PEER REVIEW 16 of 22 provides a visual representation of how well the MLP model performed.During epoch 200, the value 1.1116 × 10 −8 proved to be the most accurate validation of the ANN model.

Figure 13 .
Figure 13.Prediction performance of the MLP model.

Figure 14 and
Figure 14 and Table 4 illustrate the performance of the ANFIS model in the training and testing stages.Figure 14 shows that the prediction values correlated quite well with the desired (experimental) values.In addition, high average values of R% (100%) in the training and testing of the dataset and very low values of MSE (7.3615 × 10 −6 ) and RMSE (0.002713) were reported in the validation phase.These values indicate the robustness of the developed ANFIS model to predict solar production.
Figure 14 and Table 4 illustrate the performance of the ANFIS model in the training and testing stages.Figure 14 shows that the prediction values correlated quite well with the desired (experimental) values.In addition, high average values of R% (100%) in the training and testing of the dataset and very low values of MSE (7.3615 × 10 −6 ) and RMSE (0.002713) were reported in the validation phase.These values indicate the robustness of the developed ANFIS model to predict solar production.

Figure 13 .
Figure 13.Prediction performance of the MLP model.

Figure 14 and
Figure 14 and Table 4 illustrate the performance of the ANFIS model in the training and testing stages.Figure 14 shows that the prediction values correlated quite well with the desired (experimental) values.In addition, high average values of R% (100%) in the training and testing of the dataset and very low values of MSE (7.3615 × 10 −6 ) and RMSE Figure 14 and Table 4 illustrate the performance of the ANFIS model in the training and testing stages.Figure 14 shows that the prediction values correlated quite well with the desired (experimental) values.In addition, high average values of R% (100%) in the training and testing of the dataset and very low values of MSE (7.3615 × 10 −6 ) and RMSE

Figure 13 .
Figure 13.Prediction performance of the MLP model.

Figure 14 and
Figure 14 and Table 4 illustrate the performance of the ANFIS model in the training and testing stages.Figure 14 shows that the prediction values correlated quite well with the desired (experimental) values.In addition, high average values of R% (100%) in the training and testing of the dataset and very low values of MSE (7.3615 × 10 −6 ) and RMSE (0.002713) were reported in the validation phase.These values indicate the robustness of the developed ANFIS model to predict solar production.
Figure 14 and Table 4 illustrate the performance of the ANFIS model in the training and testing stages.Figure 14 shows that the prediction values correlated quite well with the desired (experimental) values.In addition, high average values of R% (100%) in the training and testing of the dataset and very low values of MSE (7.3615 × 10 −6 ) and RMSE (0.002713) were reported in the validation phase.These values indicate the robustness of the developed ANFIS model to predict solar production.

Figure 14 .
Figure 14.ANFIS model regression plot for predicting solar production (a) training (b) testing.Figure 14.ANFIS model regression plot for predicting solar production (a) training (b) testing.

Figure 14 .
Figure 14.ANFIS model regression plot for predicting solar production (a) training (b) testing.Figure 14.ANFIS model regression plot for predicting solar production (a) training (b) testing.

Table 4 .Figure 15
Figure15displays the error histogram of the trained model's predicted values.The error histogram measurements were analysed to ascertain the degree of discrepancy between the forecasted and desired outcomes.Such error numbers can be negative, since they quantify the degree to which actual results fall short of expectations.The highest histogram error during validation was reported to be 0.001497.

Sustainability 2023 , 22 Figure 16 .
Figure 16.The rules of the output parameters.

Figure 16 .
Figure 16.The rules of the output parameters.

Figure 17 .
Figure 17.Forecast of future values over a period of 30 days: (a) MLP (b) ANFIS models.

Figure 17 .
Figure 17.Forecast of future values over a period of 30 days: (a) MLP (b) ANFIS models.

Table 3 .
Results of the MLP model for predicting solar production.

Table 3 .
Results of the MLP model for predicting solar production.

Table 4 .
Results of ANFIS model for predicting solar production.

Table 5 .
Comparison between existing systems for the prediction of solar production and developed models.

Table 5 .
Comparison between existing systems for the prediction of solar production and developed models.