Solar Power Prediction Modeling Based on Artiﬁcial Neural Networks under Partial Shading

: Photovoltaic systems are emerging as an important device to address the environmental pollution generated from conventional energy production. The objectives of this study are to accurately predict the power of photovoltaic systems under partial shading conditions and to model high-efﬁciency photovoltaic systems. First, the power loss under partial shading conditions was addressed using a bypass diode. In previous studies, for the power prediction, one or two parameters were trained through artiﬁcial neural networks. In this study, we employ ﬁve main parameters to improve the accuracy: the photo-current ( I ph ), diode saturation current ( I 0 ), diode idealization factor ( n ), series resistance ( R s ), and shunt resistance ( R sh ). Compared to the results of previous studies, the proposed model yielded consistent results. As a result, more accurate power predictions are possible with variations in temperature and irradiation.


Introduction
Currently, there is global recognition of the importance of sustainable development and environmental protection.Renewable energy is emerging as a viable solution that aligns with these demands [1].Among the renewable energy sources, solar photovoltaic (PV) power is gaining significant attention due to its high potential and various advantages.One of the greatest advantages of solar PV is its ability to harness unlimited solar energy without geographical limitations.This means that solar panels can be installed and utilized almost anywhere, making it a highly versatile energy solution.Additionally, solar energy is an abundant and infinite resource, unlike fossil fuels that are finite and depletable.However, it is important to acknowledge that the production of energy from solar PV systems is influenced by various environmental factors [2,3].These factors include the availability of irradiation, climate conditions, and local environmental considerations.While solar PV offers immense benefits, it is crucial to consider these variables to maximize its efficiency and effectiveness.Therefore, in the pursuit of sustainable energy development, it is essential to explore the potential of solar PV and address the environmental challenges associated with its energy production.By understanding and mitigating these factors, we can fully leverage the advantages of solar PV and contribute to a greener and more sustainable future.They are highly affected by temperature and irradiation.Based on standard-test conditions, when the temperature exceeds 298 K, the maximum voltage decreases, giving rise to the reduction in the total power production.When the irradiation decreases below 1000 W/m 2 , the maximum current decreases, thus reducing the total power production.This deteriorates the power-generation efficiency of a photovoltaic system.Partial shading in a solar power system occurs due to factors such as snow, trees, snow, sand, clouds, and so on.This study focuses on developing a model that improves the power-generation efficiency and enables accurate power prediction under partial shading conditions.When photovoltaic cells are partially shaded, the hot spot effect occurs, resulting in excessive power being dissipated as heat.This hot spot effect shortens the lifetime of both the photovoltaic cell and modules and reduces energy production efficiency.Moreover, if some cells receive nonuniform irradiation owing to environmental variables, a voltage difference is created between the cells in series, preventing the current from flowing and causing the entire cell to fail.The power loss caused by partial shading is addressed using a bypass diode [2,3].A photovoltaic system consists of multiple cells connected in series.By connecting a bypass diode, the entire cell string becomes partial substrings.The substrings are connected in parallel, and a path is formed for the current to flow normally under partial shade.For a photovoltaic system employing bypass diodes to increase the power-generation efficiency, artificial neural networks (ANN) are used to make accurate predictions on the power production [2][3][4].Recent research involves the use of perovskite as a solar cell material to enhance power production efficiency, and there is a study that utilizes artificial neural networks to predict electricity generation by training on these data [5].In previous studies, various methods such as utilizing the maximum power point, parameter learning in mathematically represented models, and other approaches have been used to predict solar power [6,7].
The five parameters are affected by temperature and irradiation in the equations, which calculate the electrical characteristics of a photovoltaic system [8].In this study, the main five parameters of solar photovoltaic systems are individually expressed in terms of temperature and irradiance.The mathematical expressions of five parameters are trained using the ANN model called the multilayer perceptron.The inputs to the model are temperature and irradiation, and the targets are the respective parameters.The accuracy of the five parameters is close to 99%, showing excellent predictions to both irradiation and temperature.
Section 2 introduces photovoltaic systems and Section 3 introduces artificial neural networks.Sections 4 and 5 present the simulation results and conclusions.

Photovoltaic System
Photovoltaic systems refer to the technology of directly converting solar energy into electricity using solar cells.Solar cells are essentially two-terminal devices composed of a pn junction.They are made from various types of semiconductors, such as mono-crystalline silicon and multi-crystalline silicon.Although other materials can achieve higher efficiency, they are commercially challenging to use.Solar systems operate through the following sequence: (1) the absorption of photons generates electron-hole pairs.(2) Ideally, minority carriers cross the junction, leading to majority carriers.(3) Electrons and holes recombine after passing through the load.Photons with lower energy than the energy bandgap of the solar cell cannot generate voltage or current.Photons with energy greater than the bandgap only generate electricity corresponding to the bandgap energy, while the remaining energy is emitted as heat.Using a semiconductor with a lower energy bandgap allows for utilizing a broader spectrum of radiation but comes with the trade-off of lower generated voltage.To represent a photovoltaic system in a formula, five parameters are usually required for a photovoltaic-system-equivalent model: photocurrent (I ph ), diode saturation current (I 0 ), diode ideality factor (n), series resistance (R s ), and shunt resistance (R sh ).A typical photovoltaic-system-equivalent model is shown in Figure 1 [9].
Appl.Sci.2023, 13, x FOR PEER REVIEW 2 of 13 effect occurs, resulting in excessive power being dissipated as heat.This hot spot effect shortens the lifetime of both the photovoltaic cell and modules and reduces energy production efficiency.Moreover, if some cells receive nonuniform irradiation owing to environmental variables, a voltage difference is created between the cells in series, preventing the current from flowing and causing the entire cell to fail.The power loss caused by partial shading is addressed using a bypass diode [2,3].A photovoltaic system consists of multiple cells connected in series.By connecting a bypass diode, the entire cell string becomes partial substrings.The substrings are connected in parallel, and a path is formed for the current to flow normally under partial shade.For a photovoltaic system employing bypass diodes to increase the power-generation efficiency, artificial neural networks (ANN) are used to make accurate predictions on the power production [2][3][4].Recent research involves the use of perovskite as a solar cell material to enhance power production efficiency, and there is a study that utilizes artificial neural networks to predict electricity generation by training on these data [5].In previous studies, various methods such as utilizing the maximum power point, parameter learning in mathematically represented models, and other approaches have been used to predict solar power [6,7].
The five parameters are affected by temperature and irradiation in the equations, which calculate the electrical characteristics of a photovoltaic system [8].In this study, the main five parameters of solar photovoltaic systems are individually expressed in terms of temperature and irradiance.The mathematical expressions of five parameters are trained using the ANN model called the multilayer perceptron.The inputs to the model are temperature and irradiation, and the targets are the respective parameters.The accuracy of the five parameters is close to 99%, showing excellent predictions to both irradiation and temperature.
Section 2 introduces photovoltaic systems and Section 3 introduces artificial neural networks.Sections 4 and 5 present the simulation results and conclusions.

Photovoltaic System
Photovoltaic systems refer to the technology of directly converting solar energy into electricity using solar cells.Solar cells are essentially two-terminal devices composed of a p-n junction.They are made from various types of semiconductors, such as mono-crystalline silicon and multi-crystalline silicon.Although other materials can achieve higher efficiency, they are commercially challenging to use.Solar systems operate through the following sequence: (1) the absorption of photons generates electron-hole pairs.(2) Ideally, minority carriers cross the junction, leading to majority carriers.(3) Electrons and holes recombine after passing through the load.Photons with lower energy than the energy bandgap of the solar cell cannot generate voltage or current.Photons with energy greater than the bandgap only generate electricity corresponding to the bandgap energy, while the remaining energy is emitted as heat.Using a semiconductor with a lower energy bandgap allows for utilizing a broader spectrum of radiation but comes with the trade-off of lower generated voltage.To represent a photovoltaic system in a formula, five parameters are usually required for a photovoltaic-system-equivalent model: photocurrent ( ℎ ), diode saturation current ( 0 ), diode ideality factor (), series resistance (  ), and shunt resistance ( ℎ ).A typical photovoltaic-system-equivalent model is shown in Figure 1 [9].With the five parameters shown in the equivalent model, the formula for the current in the system can be expressed as follows [9].
where N s represents the number of cells in series and V t (kT/q) represents the thermal voltage.Equation (1) involves all five parameters.The formula for I ph is as follows [9]: where I sc is the short-circuit current, K i is the short-circuit current temperature coefficient, T is the input temperature (K), T STC is the standard-test condition temperature (298 K), I r is the input light intensity (W/m 2 ), and I rSTC is the irradiation condition (1000 W/m 2 ) for a standard test.The short circuit current is the current that flows through a solar cell when the voltage across the terminals is zero, i.e., when the solar cell is short-circuited.The short-circuit current is generated by photo-carriers, and in an ideal solar cell, it represents the maximum current that can be generated in a photovoltaic system.The diode current (I 0 ) is expressed as the product of the diode saturation current and diode reverse-saturation current.Its formula is as follows [9]: where k is the Boltzmann constant 1.38 × 10 −23 J/K , q is the charge 1.6 × 10 −19 C , E g0 is the energy band gap of the semiconductor (Si), and I rs is the diode reverse-saturation current.I rs is given as [9] where V oc is the open-circuit voltage, which can be represented by the photocurrent and diode current, as follows [10].
The open circuit voltage is the voltage available from a solar cell when there is no current flowing through it.The open circuit voltage increases linearly with temperature.In Equation ( 5), the open circuit voltage is influenced by the saturation current and photocurrent of the solar cell.While there may be slight variations in the short circuit current, it is primarily affected by the saturation current.The series resistance (R s ), shunt resistance ( R sh ), and diode idealization factor (n) can be expressed in reference to the maximum power point (P max ), which is the product of the maximum current point (I mpp ) and maximum voltage point (V mpp ).I mpp and V mpp can be found as follows [11]: V mpp = βV oc (7) where α is approximately 0.9 and β is 0.8.Based on P max , R s , R sh , and n are calculated as follows [9,12,13]:

Neural Network
Artificial neural networks are used for tasks such as nonlinear modeling, pattern recognition and classification, and processing large volumes of data.The types of artificial neural networks include perceptron neural networks, multilayer perceptron (MLP), convolutional neural networks (CNN), and reinforcement learning neural networks.In this study, the MLP artificial neural network is utilized to process and analyze large volumes of data for predictive purposes.MLPs have a structure with one or more hidden layers between the input and output layers.The hidden layers use a nonlinear activation function to transform the input data and output the final prediction in the output layer.This study uses sigmoidal and linear transfer functions as activation functions.First, the sigmoid function is as follows.
The sigmoid function is one of the commonly used activation functions in artificial neural networks.Also known as the logistic function, it is a type of nonlinear function.It compresses the input values to an output range between 0 and 1.As the input to the sigmoid function increases, the output approaches 1, while for smaller input, the output approaches 0. This nonlinear activation function is crucial in enabling neural networks to handle complex patterns and to solve intricate problems.The sigmoid function's distinctive characteristic is that it has the steepest slope around the input value of 0. This property proves beneficial during the learning process as it aids in adjusting the network's weights rapidly.A large slope implies quick adjustments to the weights, leading to faster learning progress.However, the sigmoid function encounters an issue known as the vanishing gradient when the output values become large.In such cases, the slope of the function approaches zero, causing slower learning rates.This phenomenon can hinder deep neural networks' ability to learn effectively.Another drawback of the sigmoid function is the saturation problem.When the output values approach 0 or 1, the slope becomes almost zero, resulting in minimal weight updates during training.This issue poses challenges in deep neural networks, making learning more difficult as the network depth increases.Using nonlinear functions in artificial neural networks is crucial because linear functions alone are inadequate for solving complex problems.By employing nonlinear activation functions like the sigmoid function, neural networks can efficiently learn and represent intricate patterns, enabling them to tackle a wide range of challenging tasks.Next, the linear transfer function is discussed.
The linear function is a function where the output varies by a constant multiple of the input.Since it performs a linear transformation on the input, it can still be expressed as a single linear function, even if we connect multiple layers with linear transfer functions.Therefore, using multiple linear functions in succession would not enhance the expressive power of the neural network or enable it to learn complex patterns effectively.As a result, employing linear transfer functions in the hidden layers of neural networks like multilayer perceptron does not add much value.However, in cases where the predicted values are real numbers, such as regression problems, using the linear transfer function as the activation function can lead to improved performance.The Levenberg-Marquardt algorithm is used as the learning algorithm for training artificial neural networks.It is an algorithm used for nonlinear least-squares-optimization problems.The Levenberg-Marquardt algorithm is a neural network training function that updates weights and bias values based on an optimization algorithm.It is a hybrid of the Gauss-Newton method and the vanilla-gradient descent method and can be represented as follows [14][15][16].
where y i is ith the output layer, φ is the nonlinear activation function, w (k) ij is the weight for the ith neuron and the jth input in the kth hidden layer, x j is the jth input to the neuron, and b (k) i is the bias for the neuron in the kth hidden layer.The MLP network consists of an input layer, two hidden layers, and an output layer.The output h (k) i of the ith neuron in the kth hidden layer is computed as follows [17].
i represents the output of the jth neuron in the kth hidden layer.Each hidden layer has a sigmoid activation function.The network's output can be written as where φ (3) (•) is a linear activation function.An MLP has the structure of feeding the output of a hidden layer into the input vector of the next hidden layer or the output layer.Therefore, each layer has its own bias value because it is related to all the variables in the previous layer, and there are weights for variables in two consecutive layers.The structure of the artificial neural network used in the simulation is shown in Figure 2. values are real numbers, such as regression problems, using the linear transfer function as the activation function can lead to improved performance.The Levenberg-Marquardt algorithm is used as the learning algorithm for training artificial neural networks.It is an algorithm used for nonlinear least-squares-optimization problems.The Levenberg-Marquardt algorithm is a neural network training function that updates weights and bias values based on an optimization algorithm.It is a hybrid of the Gauss-Newton method and the vanilla-gradient descent method and can be represented as follows [14][15][16].
where   is  th the output layer,  is the nonlinear activation function,   () is the weight for the th neuron and the th input in the th hidden layer,   is the th input to the neuron, and   () is the bias for the neuron in the th hidden layer.The MLP network consists of an input layer, two hidden layers, and an output layer.The output ℎ  () of the th neuron in the th hidden layer is computed as follows [17].
ℎ  (1) =  (1) (∑ +   (1) ) where ℎ  () represents the output of the th neuron in the th hidden layer.Each hidden layer has a sigmoid activation function.The network's output can be written as where  (3) (•) is a linear activation function.An MLP has the structure of feeding the output of a hidden layer into the input vector of the next hidden layer or the output layer.Therefore, each layer has its own bias value because it is related to all the variables in the previous layer, and there are weights for variables in two consecutive layers.The structure of the artificial neural network used in the simulation is shown in Figure 2.

Learning Parameter and Simulation
The simulation proceeds in the following sequence: (1) the existing experimental data of the five parameters are implemented in a three-dimensional graph.(2) The five parameters are trained using an artificial neural network.(3) The consistency between the existing experimental data and the trained data is verified.(4) The trained data are generated

Learning Parameter and Simulation
The simulation proceeds in the following sequence: (1) the existing experimental data of the five parameters are implemented in a three-dimensional graph.(2) The five parameters are trained using an artificial neural network.(3) The consistency between the existing experimental data and the trained data is verified.(4) The trained data are generated as a Simulink block to construct a solar cell.A Simulink block generates results learned through the MATLAB code for an artificial neural network [7,10].(5) The constructed solar cells are connected in parallel with bypass diodes to create a photovoltaic module.The five parameters and the artificial neural network are simulated using MATLAB/Simulink v.R2023a.Each of the five parameters is defined as a function of the temperature and irradiation.Therefore, the inputs of the neural network are set to the temperature and irradiation, while the outputs are set to each of the five parameters.The settings for training the neural network for each parameter are the same and are as follows: the maximum number of training epochs is 1000; the performance goal is 1 × 10 −9 ; and the learning rate is 0.05.The hidden layer has two layers, and each of them has three nodes.For the activation functions, the sigmoid function is used in the hidden layers, while the linear function is used in the output layer.Finally, the Levenberg-Marquardt (LM) algorithm was used as the learning algorithm.The LM iteration approach is a numerical optimization algorithm to solve nonlinear fitting problems using the method of least squares.The number of iterations is set to 1000, but the process terminates when the loss reaches the performance goal.
Regression analysis is used to model the relationship between a dependent variable and one or more independent variables.In this study, regression analysis is employed to analyze the data obtained from a neural network.In regression, the dependent variable represents the variable to be predicted, while the independent variable are the variables that influence the dependent variable.In this research, when constructing the training data for regression analysis, temperature and irradiation are used as independent variables, and the five major parameters corresponding to them are used as the dependent variable.The regression model is trained using the training data, and then this model is utilized to predict the values of the five parameters based on new temperature and irradiation inputs.Regression analysis results can be interpreted using methods such as scatter plot analysis, error analysis, etc. Scatter plot analysis represents the relationship between actual values and predicted values of a graph in the form of a scatter plot.By analyzing the scatter plot, it can be determined if the data points cluster around the regression line.If the data points are concentrated around the regression line, it indicates that the model accurately predicts the relationship between the actual values and predicted values.Regression line analysis represents the relationship between the actual values and predicted values as depicted by the regression line on the graph.The slope of the regression line can be used to evaluate the predictive accuracy of the model through correlation.Generally, a slope close to 1 indicates an accurate model where actual values and predicted values match.Additionally, it is desirable for the data points around the regression line to be clustered.Error analysis allows us to examine the predicted values and actual values through the graph.If the data points are not concentrated around the regression line or show significant deviations, it may indicate that the predictive model is inaccurately predicting some of the data.The analysis of errors allows us to assess the predictive accuracy and bias of the model.The results of the regression analysis with five parameters are presented in Figure 3a-e.
The regression analysis results in Figure 3a-e are explained as follows.In the graph, the data represent the actual value, while the fitting represents the predicted values.First, from a scatter plot analysis perspective, it can be observed that scatter points are distributed around the regression line.Secondly, from a regression line analysis perspective, it can be observed that the slope of the regression line in the graph is close to 1, indicating a high level of accuracy in the predictions.Lastly, from an error analysis perspective, the difference between the data and the fitting remains relatively constant.The important aspect to consider when training with five parameters is the diode saturation current.The diode saturation current is typically very small, on the order of 1 × 10 −10 , which can cause difficulties in the artificial neural network training process.To address this issue, the calculated diode saturation current is transformed by taking the logarithm before proceeding with the training.After the training is completed, the trained results can be visualized in a three-dimensional graph by reversing the logarithmic transformation.This can be achieved by applying the exponential function to the transformed values.The results of performing steps 1 to 3 in the simulation sequence are represented by Figures 4-8.
values as depicted by the regression line on the graph.The slope of the regression line can be used to evaluate the predictive accuracy of the model through correlation.Generally, a slope close to 1 indicates an accurate model where actual values and predicted values match.Additionally, it is desirable for the data points around the regression line to be clustered.Error analysis allows us to examine the predicted values and actual values through the graph.If the data points are not concentrated around the regression line or show significant deviations, it may indicate that the predictive model is inaccurately predicting some of the data.The analysis of errors allows us to assess the predictive accuracy and bias of the model.The results of the regression analysis with five parameters are presented in Figure 3a-e The regression analysis results in Figure 3a-e are explained as follows.In the graph, the data represent the actual value, while the fitting represents the predicted values.First, from a scatter plot analysis perspective, it can be observed that scatter points are distributed around the regression line.Secondly, from a regression line analysis perspective, it can be observed that the slope of the regression line in the graph is close to 1, indicating a high level of accuracy in the predictions.Lastly, from an error analysis perspective, the difference between the data and the fitting remains relatively constant.The important aspect to consider when training with five parameters is the diode saturation current.The diode saturation current is typically very small, on the order of 1 × 10 −10 , which can cause difficulties in the artificial neural network training process.To address this issue, the calculated diode saturation current is transformed by taking the logarithm before proceeding with the training.After the training is completed, the trained results can be visualized in a three-dimensional graph by reversing the logarithmic transformation.This can be achieved by applying the exponential function to the transformed values.The results of performing steps 1 to 3 in the simulation sequence are represented by Figures 4-8.For Figure 9, the values provided in the KC200GT data sheet are used.Given the parameters and some errors in the graph-extraction process, the measurement and training data are consistent.Even if the temperature is varied as input in the artificial neural network, the same results as the data sheet KC200GT are obtained.Figure 10 represents the SPICE model of an ANN model using MATLAB/Simulink.Typically, when implementing a SPICE model for a photovoltaic module, it consists of a DC current source, diode, shunt resistor and series resistor.However, in the SPICE model depicted in Figure 10, the conventional SPICE model is incorporated including the DC current source, diode, shunt resistor, series resistor, into the simulation block highlighted in red.These trained components are calculated within the ANN block to produce the outputs.As a result, the circuit is constructed using only the controlled current source and voltage measurement.For Figure 9, the values provided in the KC200GT data sheet are used.Given the parameters and some errors in the graph-extraction process, the measurement and training data are consistent.Even if the temperature is varied as input in the artificial neural network, the same results as the data sheet KC200GT are obtained.Figure 10 represents the SPICE model of an ANN model using MATLAB/Simulink.Typically, when implementing a SPICE model for a photovoltaic module, it consists of a DC current source, diode, shunt resistor and series resistor.However, in the SPICE model depicted in Figure 10, the conventional SPICE model is incorporated including the DC current source, diode, shunt resistor, series resistor, into the simulation block highlighted in red.These trained components are calculated within the ANN block to produce the outputs.As a result, the circuit is constructed using only the controlled current source and voltage measurement.A photovoltaic system under partial shade conditions can be designed using an ANN model that has high accuracies under standard conditions, as shown in Figure 11.The KC200GT model has 54 cells per module.To design a solar photovoltaic system under partial shading conditions and compare it with existing experimental data, a model with two bypass diodes is configured with 27 cells per module, while a model with three bypass diodes is configured with 18 cells per module [18,20].With the help of the ANN model in Figure 10, the partial shading condition solar system module with a bypass diode connected can be represented as Figure 11.A photovoltaic system under partial shade conditions can be designed using an ANN model that has high accuracies under standard conditions, as shown in Figure 11.The KC200GT model has 54 cells per module.To design a solar photovoltaic system under partial shading conditions and compare it with existing experimental data, a model with two bypass diodes is configured with 27 cells per module, while a model with three bypass diodes is configured with 18 cells per module [18,20].With the help of the ANN model in Figure 10, the partial shading condition solar system module with a bypass diode connected can be represented as Figure 11.
model that has high accuracies under standard conditions, as shown in Figure 11.The KC200GT model has 54 cells per module.To design a solar photovoltaic system under partial shading conditions and compare it with existing experimental data, a model with two bypass diodes is configured with 27 cells per module, while a model with three bypass diodes is configured with 18 cells per module [18,20].With the help of the ANN model in Figure 10, the partial shading condition solar system module with a bypass diode connected can be represented as Figure 11.When the photovoltaic system operates under partial shading conditions, as shown in Figure 11, the I-V characteristics curves vary depending on the number of bypass diodes connected.The number of bypass diodes directly affects the number of maximum power points (MPP).The I-V characteristics curves under partial shading conditions, according to the number of bypass diodes, are shown in Figure 12a,b [21].When the photovoltaic system operates under partial shading conditions, as shown in Figure 11, the I-V characteristics curves vary depending on the number of bypass diodes connected.The number of bypass diodes directly affects the number of maximum power points (MPP).The I-V characteristics curves under partial shading conditions, according to the number of bypass diodes, are shown in Figure 12a,b [21].

MSE (Mean Squared Error
) is used to calculate the error between measured data and predicted data, and it is calculated as follows: where  is the number of the data point,   is the measurement value of the th data point and   ̃ is the ANN value of the th data point.Figure 14a shows the differences between the measured current and the predicted current of the model with two connected bypass diodes for an input of 1000-800 W/m 2 and 1000-500 W/m 2 .The differences between the measured current and the predicted current are shown in Figure 14b, when the model with three connected bypass diodes is utilized for an input of 1000-800-300 W/m 2 and 1000-500-300 W/m 2 .MSE (Mean Squared Error) is used to calculate the error between measured data and predicted data, and it is calculated as follows: where n is the number of the data point, y i is the measurement value of the ith data point and ∼ y i is the ANN value of the ith data point.Figure 14a shows the differences between the measured current and the predicted current of the model with two connected bypass diodes for an input of 1000-800 W/m 2 and 1000-500 W/m 2 .The differences between the measured current and the predicted current are shown in Figure 14b, when the model with three connected bypass diodes is utilized for an input of 1000-800-300 W/m 2 and 1000-500-300 W/m 2 .The results in Figure 14a,b are based on the same training data, with only differences in the number of connected bypass diodes and the number of cells per module.As a result, the errors are similar.The proposed model in this study exhibits even better performance with a maximum MSE of 0.15, while the smallest MSE achieved in the previous works was 0.32 [22].

Conclusions
In previous research, various models have been devised to predict the power output of basic modules.Additionally, several methods have been proposed to enhance energy production efficiency.This study proposes a model that enables accurate power prediction under partial shading conditions using an artificial neural network and improves the The results in Figure 14a,b are based on the same training data, with only differences in the number of connected bypass diodes and the number of cells per module.As a result, the errors are similar.The proposed model in this study exhibits even better performance with a maximum MSE of 0.15, while the smallest MSE achieved in the previous works was 0.32 [22].

Conclusions
In previous research, various models have been devised to predict the power output of basic modules.Additionally, several methods have been proposed to enhance energy production efficiency.This study proposes a model that enables accurate power prediction under partial shading conditions using an artificial neural network and improves the power-generation efficiency using bypass diodes.For photovoltaic systems, which are sensitive to temperature and irradiation, five parameters are defined as the functions of temperature and irradiation and are employed to train an artificial neural network to enable accurate power predictions.The proposed model allows for accurate predictions while increasing the power-generation efficiency under partial shade conditions.Using the proposed model, it is possible to adjust the values of various parameters used in the process of manufacturing solar panels and make more efficient solar panels.Additionally, it is possible to predict power production by applying various environmental variables related to the environment where the solar panels will be installed, allowing the determination of an optimal installation location.In this study, the artificial neural network was trained to learn five key parameters observed in SPICE.However, since various variables, including temperature and irradiation, also affect the system, future research can enable more accurate power predictions by incorporating a wider range of variables into the training process.

Figure 1 .
Figure 1.Common equivalent circuit of photovoltaic cell.Figure 1. Common equivalent circuit of photovoltaic cell.

Figure 1 .
Figure 1.Common equivalent circuit of photovoltaic cell.Figure 1. Common equivalent circuit of photovoltaic cell.

Figure 2 .
Figure 2. Artificial neural network structure for the simulation.

Figure 2 .
Figure 2. Artificial neural network structure for the simulation.

Figure 3 .
Figure 3. (a) The regression analysis results of  ℎ .(b) The regression analysis results of  0 .(c) The regression analysis results of .(d) The regression analysis results of  ℎ .(e) The regression analysis results of   .

Figure 4 .
Figure 4. Comparison between measurement and ANN data of photocurrent  ℎ .

Figure 3 .
Figure 3. (a) The regression analysis results of I ph .(b) The regression analysis results of I 0 .(c) The regression analysis results of n.(d) The regression analysis results of R sh .(e) The regression analysis results of R s .

Figure 4 . 13 Figure 5 .
Figure 4. Comparison between measurement and ANN data of photocurrent I ph .Appl.Sci.2023, 13, x FOR PEER REVIEW 8 of 13

Figure 5 .
Figure 5.Comparison between measurement and ANN data of photocurrent  0 .Figure 5. Comparison between measurement and ANN data of photocurrent I 0 .

Figure 5 .
Figure 5.Comparison between measurement and ANN data of photocurrent  0 .

Figure 6 .
Figure 6.Comparison between measurement and ANN data of photocurrent   .

Figure 7 .
Figure 7.Comparison between measurement and ANN data of photocurrent  ℎ .

Figure 8 .
Figure 8.Comparison between measurement and ANN data of photocurrent .

Figure 6 .
Figure 6.Comparison between measurement and ANN data of photocurrent R s .

Figure 5 .
Figure 5.Comparison between measurement and ANN data of photocurrent  0 .

Figure 6 .
Figure 6.Comparison between measurement and ANN data of photocurrent   .

Figure 7 .
Figure 7.Comparison between measurement and ANN data of photocurrent  ℎ .

Figure 8 .
Figure 8.Comparison between measurement and ANN data of photocurrent .

Figure 7 .
Figure 7.Comparison between measurement and ANN data of photocurrent R sh .

Figure 5 .
Figure 5.Comparison between measurement and ANN data of photocurrent .

Figure 6 .
Figure 6.Comparison between measurement and ANN data of photocurrent   .

Figure 7 .
Figure 7.Comparison between measurement and ANN data of photocurrent  ℎ .

Figure 8 .
Figure 8.Comparison between measurement and ANN data of photocurrent .Figure 8. Comparison between measurement and ANN data of photocurrent n.

Figure 8 .
Figure 8.Comparison between measurement and ANN data of photocurrent .Figure 8. Comparison between measurement and ANN data of photocurrent n.

Figures 4 -
Figures 4-8 show the mesh plots for the data used to train the artificial neural network; the data represented by the blue dots are the data from the KC200GT model [18].The training data are generated by simulating various combinations of temperature and irradiation to create input data.In the previous research, each function composed of temperature and irradiance was separately presented in graphs representing temperature and irradiance.When combining both temperature and irradiance into a single graph, a three-dimensional graph like Figures 4-8 is plotted, showing the relationship between the two variables.It can be seen in Figures 4-8 that two sets of data match in the three-dimensional graphs, implying successful training for each parameter.The KC200GT model is a multi-crystalline solar module.The detailed parameters of the KC200GT module under normal operating conditions are I ph = 8.214 A, I o = 9.825 × 10 −8 A, n = 1.3, R sh = 415.405Ω and R s = 0.221 Ω [9,19].The training data were compared with the I-V characteristics curve of the KC200GT model under standard conditions, as shown in Figure 9 [7].

Figure 9 .
Figure 9. I-V characteristics curve under standard conditions for the KC200GT model.

Figure 9 .
Figure 9. I-V characteristics curve under standard conditions for the KC200GT model.

Figure 11 .
Figure 11.MATLAB/Simulink model for a photovoltaic system connected with a bypass diode.

Figure 11 .
Figure 11.MATLAB/Simulink model for a photovoltaic system connected with a bypass diode.

Figure 12 .
Figure 12.I-V characteristics curve of a photovoltaic system under partial shading conditions (a) with two bypass diodes connected and (b) with three bypass diodes connected.

Figure 12a corresponds to
Figure 12a corresponds to a model with two bypass diodes connected, whereas Figure 12b corresponds to a model with three bypass diodes connected.The data represented by the lines are the ANN data.Taking into account some errors generated in the parameters and the graph-extraction process, the measurement and ANN data are consistent.This study focuses on irradiation, and Figure 12a,b illustrate the results of varying the irradiation inputs of for each artificial neural network model in Figure 11.By using Figure 12a,b, it is possible to plot the P-V characteristic curves of Figure 13a,b.It can be observed that the number of cells divided by the bypass diode corresponds to the occurrence of MPPs.

Figure 12 .
Figure 12.I-V characteristics curve of a photovoltaic system under partial shading conditions (a) with two bypass diodes connected and (b) with three bypass diodes connected.

Figure
Figure 12a corresponds to a model with two bypass diodes connected, whereas Figure 12b corresponds to a model with three bypass diodes connected.The data represented by the lines are the ANN data.Taking into account some errors generated in the parameters and the graph-extraction process, the measurement and ANN data are consistent.This study focuses on irradiation, and Figure 12a,b illustrate the results of varying the irradiation inputs of for each artificial neural network model in Figure 11.By using Figure 12a,b, it is possible to plot the P-V characteristic curves of Figure 13a,b.It can be observed that the number of cells divided by the bypass diode corresponds to the occurrence of MPPs.

Figure 13 .
Figure 13.P-V characteristics curve of a photovoltaic system under partial shading conditions (a) with two bypass diodes connected and (b) with three bypass diodes connected.

Figure 13 .
Figure 13.P-V characteristics curve of a photovoltaic system under partial shading conditions (a) with two bypass diodes connected and (b) with three bypass diodes connected.

Figure 14 .
Figure 14.(a) The error between the measured current and the predicted current for the model with two connected bypass diodes.(b) The error between the measured current and the predicted current for the model with three connected bypass diodes.

Figure 14 .
Figure 14.(a) The error between the measured current and the predicted current for the model with two connected bypass diodes.(b) The error between the measured current and the predicted current for the model with three connected bypass diodes.