1. 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
, 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.
2. 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 (
), 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
represents the number of cells in series and
represents the thermal voltage. Equation (1) involves all five parameters. The formula for
is as follows [
9]:
where
is the short-circuit current,
is the short–circuit current temperature coefficient,
is the input temperature (K),
is the standard-test condition temperature (298 K),
is the input light intensity (W/m
2), and
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 (
) is expressed as the product of the diode saturation current and diode reverse-saturation current. Its formula is as follows [
9]:
where
is the Boltzmann constant
,
is the charge
,
is the energy band gap of the semiconductor (Si), and
is the diode reverse-saturation current.
is given as [
9]
where
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 (
), shunt resistance (
, and diode idealization factor (
) can be expressed in reference to the maximum power point (
), which is the product of the maximum current point (
) and maximum voltage point (
).
and
can be found as follows [
11]:
where
is approximately 0.9 and
is 0.8. Based on
,
,
, and
are calculated as follows [
9,
12,
13]:
3. 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
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].
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
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.
4. 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
; 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
, 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
Figure 4,
Figure 5,
Figure 6,
Figure 7 and
Figure 8.
Figure 4,
Figure 5,
Figure 6,
Figure 7 and
Figure 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
Figure 4,
Figure 5,
Figure 6,
Figure 7 and
Figure 8 is plotted, showing the relationship between the two variables. It can be seen in
Figure 4,
Figure 5,
Figure 6,
Figure 7 and
Figure 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
,
,
,
and
[
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].
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.
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].
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.
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
and 1000–500
. 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
and 1000–500–300
.
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].