Silicon PV module fitting equations based on experimental measurements

Solar photovoltaic (PV) characteristic curves (P‐V and I‐V) offer the information required to configure the PV system to operate as near to its optimal performance as possible. Measurement‐based modeling can provide an accurate description for this purpose. This work analyzes the PV module performance and develops a mathematical formula under particular weather conditions to accurately express these curves based on a custom neural network (CNN). The study initially presents several standard mathematical model equations, such as polynomial, exponential, and Gaussian models to fit the PV module measurements. The model selection is subjected to the minimum value of an evaluation parameter. To simplify the solution of the symbolic equations for the CNN network, two neurons in the hidden layer with nonlinear activation function and linear for the output layer were selected. The results show the effectiveness of the proposed CNN model equations over other standard fitting models according to the root mean squared error (RMSE) evaluation. This method promises further improved results with multi‐input parameter modeling.


| INTRODUCTION
As focusing on the current users of a solar photovoltaic (PV) energy, there is an unclear description and power profile for users in all PV sectors. There is a general need for all those PV users to get a better knowledge about their PV systems so as to gain the best efficient energy as compared with cost. In contrast, PV power is highly related to the weather conditions such as; temperature and sun irradiance, which complicates the measurement optimizations, therefore, a modeling for such systems is an essential need. 1 A PV cell has a nonlinear current-voltage (I-V) characteristic that can be modeled using a current source, one or more diodes, and resistors. Single-diode and doublediode models are widely used to simulate PV characteristics. The single-diode model emulates the PV characteristics fairly and accurately. 2 The manufacturer provides information for the | 133 SABRY et Al.
PV electrical characteristics by specifying certain points on its I-V characteristics called remarkable points. The relationship between the voltage and current of a PV cell or module is summarized by the main electrical characteristics produced on typical solar cell P-V and I-V curves. The irradiance, which represents the intensity of the solar insolation incident on the module, controls the current (I), while the temperature rise reduces the module voltage (V).
A solar module produces direct current (DC), and the product of current and voltage provides the power (P). Therefore, we can create P-V curves representing the power versus the voltage for a given PV module. Since the relationship between the I-V and P-V characteristics is nonlinear for a PV system, analytical methods have been considered as a simple solution to model the behavior of a PV module. 3 Mathematical modeling of a PV is described by the nonlinear relationship in the current-voltage (I-V) curve. 4 Many researchers have proposed several models to describe the behavior of a PV cell and to improve the modeling and parameters estimation, such as those using the Lambert W function and numerically using the Newton-Raphson method. 5,6 An artificial neural network (ANN) together with the Lambert W function were employed to determine the I-V and P-V curves of silicon and plastic solar cells and modules. 7 Neural network adopts the principle of the human brain as a learning method to implement the functioning conditions between input/output, whether the system is a linear or nonlinear with a property of minimal computing processes. 8 A comparative study in 9 concludes that ANN-based models dominate and achieve better results than others such as; one-diode, multiple linear regression, polynomial regression, and analytical models. The main advantages of ANN-based approaches are that it does not require more complicated calculations or parameters, unlike other models. Under various weather conditions, the accuracy of PV power prediction has been improved by using the response characteristics of the PV array, and consequently, by measurements driven model power prediction methods. 10 Efforts in 11 present seasonal meteorological features with historical data corresponding to different seasons by using optimized multi-layer back propagation neural network. The produced power profile of a Silicon-crystalline PV module has been estimated with reasonable accuracy in. 9,[12][13][14][15] The objective of the model estimation was to improve the prediction performance and evaluation using differences based on measures of accuracy to determine the root mean squared error (RMSE) or mean square error (MSE). 16 A PV module is generally rated under standard test conditions (STC) with the solar irradiance (G) of 1000 W/m 2 , cell temperature (T) of 25°C, and AM 1.5 solar spectrum by the manufacturers. The parameters required for the input of the PV modules rely on the meteorological conditions of the area. The climatic conditions are unpredictable due to the random nature of their occurrence.
The above brief review concluded that the modeling of PV cell or array that is based on artificial intelligence approaches such as; ANN, Neuro-Fuzzy, etc., was applied in different conditions. Although these techniques have verified that the ANN is the most useful than classical methods, especially in terms of accuracy and simplicity, they did not present mathematical equations describing the power output or even the P-V/I-V characteristics. From this context, it is not clear, if the current modelings are scalable for providing more information that can assist PV power engineers to identify the harvested energy. The challenge of accurate modeling for the nonlinearity I-V characteristics of a solar cell can be solved through their matching with the experimental measurements. Therefore, offering efficient technique is essential to determine the model parameters precisely.
The rest of the paper is organized as follows; Section 2, briefly presents the main objective of the proposed modeling and the work contributions. This section includes two subsections: (a) the PV module manufacturer specifications and the experimental measurements, (b) the training algorithm of the proposed mathematical modeling and the approach topology. Section 3 discusses the obtained results and contains the proposed modeling results and a comparative study, which includes a brief review and comparison for the performance of the proposed CNN models with other standard data-fitting models, such as polynomial regression, exponential, Gaussian regression, and single-diode models. Finally, Section 4 concludes the research findings.

| PROPOSED MODELING
The main objective of this article was to develop an accurate and simple custom neural network (CNN) to extract mathematical representations of the P-V/I-V relationships for a PV module. The work also presents a comparison between different models to assess the performance of the proposed models. The comparison analyses help to choose the appropriate PV module in the design considerations of stand-alone PV and grid-connected systems.
The key contributions of this work are: • Synthesizing the ANN architecture for a new topology to provide formulas for P-V and I-V relationship via a solvable set of nonlinear equations, which is achieved by acquiring experimental measurements at, appropriate sampling rate, data normalization, minimizing the hidden-layer neurons that have nonlinear activation functions (sigmoid), and output the result through a single-neuron with a linear function (pure-line). • Estimating P-V/I-V characteristics and formulating the measured data with mathematical equations. • Presenting a developed approach to analyze and model the PV module and its behavior.

| Module database
The system has a PV module, PHOTOWATT Silicon-Polycrystalline, 17 the specifications are given in Table 1, while the I-V curves are shown in Figure 1. All the analyses are performed using MATLAB software package. The experimental data measurement of P-V/I-V was conducted for a silicon solar module (polycrystalline) at an irradiance of 370 W/m 2 and a temperature of 28°C.

| Development of CNN-based mathematical model
The proposed CNN block diagram employed to estimate the P-V and I-V of the PV module is depicted in Figure. 2. The CNN has three layers, an input layer, a single hidden layer, and output layer. The input layer represented by a vector (V) of load voltage measurements in the first and second cases, while it has seven inputs; [G, T, V oc , I sc , I MP , V MP , V] T in the third case. The output layer has only single output neuron which is the current (I) in the first case or the power (P) produced by the PV module in the second and third cases.
The objective here was to find the input-output relation based on the experimental measurements. 18,19 Moreover, to find whether an equation can be helpful to predict the power generated based on the seven inputs that previously mentioned. This equation can be formulated as follows: where f est denotes the estimation/approximation function. The input-output data are subjected to the normalization process in order to get the more efficient network in terms of complexity and execution time, the general normalized data can be obtained from the following expression: where x norm denotes the normalized values of data x, where x min ≤ x ≤ x max . The same training algorithm has been implemented over the three proposed cases which are described in Figure 3.
Input-output data set is used to train the network over the training stage. After implementation of each input vector, the algorithm calculates the network output (I in case 1 or P in cases 2 and 3), that is consequently compared with the required output to create the Mean Square Error (MSE), this with a performance function is used for training the proposed CNN. The updated error is substituted in the Levenberg-Marquardt learning (learnLM) as an optimization algorithm to update the network weights and biases. Then, after sufficient iterations, MSE between the CNN and the target outputs stabilizes to a minimum quantity.
The network architecture of (1 × k for cases 1 and 2, and 7 × k for case 3) input matrix, two hidden neurons, and a single output neuron has been used to model the PV-module characteristics' curves, where k is the number of measurements. At each iteration, each input vector (1 × 1 case 1 and 2, while 7 × 1 for case 3) is multiplied by their associated weights and passes through a nonlinear activation function (sigmoidal function) at the hidden layer. Next, the outcomes of the hidden neurons are also multiplied by their associated weights and processed with a pure-line activation function this time to simplify the solution for obtaining the algebraic equations. To summarize the architecture understanding, one case network is presented which is shown in Figure 4.
In general, since the output is configured as a linear transfer function, the formula for all cases is given by Equation 5, while the formula for each hidden-layer neuron is given by Equation 6: Since the nonlinear activation function has been selected for the hidden layer, which is given by Equation 6, the outputs of these neurons (a j ) are given by Equation 7 for cases 1 and 2, and Equation 8 for case 3, as follows: where n 1 j denotes the hidden-layer summation formula, the upper subscript refers to the first layer which is the hidden one, and j = 1,2, the number of hidden neurons. IW is the 1 + e −(Voc*IW (j,1) +Isc*IW (j,2) +V MP *IW (j,3) +I MP *IW (j,4) +V*IW (j,5) +G*IW (j,6) +T * IW (j,7) +b 1) input weight matrix, while b1 and b2 are the bias vector for the hidden and output layer neurons, respectively.

| RESULTS AND DISCUSSION
Experimental measurements have been implemented to find a set of data points that represent the current-voltage dataset (I k , V k ) and the pairs of power-voltage data (P k , V k ), where the index k represents the number of sampling data. In addition, to inspect the ability of the proposed CNN for modeling the profile of the PV-generated power precisely, the measurements along for about 8 days, cloudy and sunny, have also been conducted. In order to present the conditions that affected the PVmodule performance, multimeters are used to measure V oc , I sc , I MP , and V MP generated by the PV module. A variable resistor (0-120)Ω was considered as a load which implies the variation of the current and voltage. A temperature sensor to follow the temperature variation of the PV surface is also employed. Besides, a luxmeter (ISM 410) is used to follow the illumination. Figure 5 illustrates the PV schematic connections and experimental setup used to measure the characteristics I = f (V).

| CNN model results
For case 1, which is similar to case 2, the correlation coefficient between the network and the target data is shown in Figure 6 (A), while (B) shows the comparison between the proposed CNN model and the measured I-V profile. The relationship between the output and the target is evaluated by R-value. If there was an exact linear relationship between outputs and targets, R would be 1. Thus, if R is close to zero, this indicates that there is a nonlinear relationship between the outputs and the targets. 20 We have selected two related research articles that may benefit from the achievements of this work 21,22 because they considered the solar PV array as the only power supply to feed electricity to a high-efficiency home system within a DC environment. This indicates that the training data have a great fitting result, and the proposed CNN fitting procedure for the current-voltage measurements is effective for this application.
In order to inspect the ability of the proposed CNN to model the pattern of the PV generated power precisely, about 8 days, cloudy and sunny, have been addressed, that is not been implemented during the training process of the proposed CNN. MSE has a great performance for the CNN model as shown in Figure 6. It is observed that the MSE over the training process approaches to 10 −4 . This result indicates that the CNN weights are well updated and the approach could create output data of a reasonable accuracy for both sunny and cloudy days. According to Figure 7A, the best validation performance is 0.000133 at epoch 31, and the performance of the network was measured with R-square = 0.99972, as seen in Figure 7B. The results obtained a better goodness-of-fit than other relative models, which would be discussed later.

F I G U R E 1 PHOTOWATT PV panel manufacturer I-V curves
A superposition of curves is clear between the measurements and modeled/estimated patterns for the produced power of the PV module as shown in Figure 8. It is obvious that the measured values of the produced power are very close to the modeled/estimated one. A relatively matching of curves is clear between the measurements and modeled/estimated patterns for the produced power of the PV module.
By substituting the network weights, the equation of the output solar power (P) can be calculated as:

| Comparative analysis
In this section, a brief review and comparison of the performance for the proposed CNN models with other various models such as polynomial regression, exponential, Gaussian regression, and single-diode models are discussed.

| Modeling with fitting equations
Modeling and analysis using the I-V and P-V curve fitting method were performed in Specific LabVIEW and MATLAB software applications. 23 Data-driven modeling techniques can create models that are used when there is no sufficient information about a system. Therefore, these techniques can provide a model with a reasonable accuracy by choosing a suitable modeling technique. Curve fitting is a tool used to explore the relationships between data sets. This work investigates several models, such as polynomial, exponential, and Gaussian, to obtain the equivalent function approximation for each of the current (I) as a function of a voltage (V), I = f (V), and the module power (P) as a function of its voltage P = f (V).  Table 2 provides a list of the common fitting equations used in MATLAB's built-in functions. 24 Some of the listed equations may fit one data set but not the others, and the fitting accuracy depends on the selection of the equation order. There is no dominant fitting approach for the types of observations in this paper, even for physical applications. Therefore, it is essential to consider the performance of several statistical methods to fit particular I-V and P-V curves to select the best one for a given measured data set.
Where β 1 , β 2 … β 9 denote the coefficients of the polynomial model, while ɑ, , ρ, b, d, γ denote the coefficients of the exponential and Gaussian models. In this research, all the experimental measurements of the data sets are marked with red circles in each graph.
As a case 1, the (I k , V k ) experimental data points have been compared with the polynomial regression of degree 2-8, as shown in Figure 9A, the exponential of degree 1-2, and Gaussian of degree 2 models as depicted in Figure 9B.
As a case 2, the modeling of the (P k , V k ) experimental data points with the polynomials of degrees 2-8 is shown in Figure 10A, exponential of degrees 1 and 2, and Gaussian of degree 2 models, as shown in Figure 10B.
To determine whether those models have a good approximation for the measured data, the goodness-of-fit statistics, such as the root mean square error (RMSE), the sum of squares due to error (SSE), a total sum of squares (SST), and R-square were used. The above all are calculated as follows: The index v indicates the number of independent portions of information involving the n data points required to calculate the sum of squares, f (x k ) is a function of the input measured data (x k , y k ) of the fitted model, k represents the number of sampling data measurements, and Y k is an element of the data set (x k , y k ). Similar to the SSE, values of the MSE closer to zero indicate a better fit. The best fitting is obtained for the (I k , V k ), case 1 data and the power-voltage (P k , V k ) case 2 data were based on the values of the RMSE. Therefore, for the experimental (I k , V k ) data, case 1, the best fit curves are represented by the polynomial 8th degree regression and the exponential 2nd degree regression, as shown in Figure 11A and B, respectively.
For the (P k , V k ) experimental data, case 2, the polynomial model of degree 6 and the Gaussian model of degree 2 were satisfied the minimum RMSE and the comparison can be shown in Figure 12.
The above evaluation for the addressed models or fitting equations shows that their application is effective and feasible to provide P-V and I-V mathematical models. Therefore, the satisfied fitting equations are the polynomial regression, exponential, and Gaussian regression models. Therefore, we can briefly describe the models that satisfy reasonable fitting evaluation as follows: • Case 1, I-V curve, I = f (V): 8th degree of Polynomial model Equation 11, or the 2nd order Exponential model, Equation 12, as follows: T A B L E 2 List of models for general mathematical equations

Model names Degree Equations
Polynomial model 1 where β, ɑ, γ, , ρ, b, d denote the fitting coefficients. The fitting evaluation parameters for the approximate of I-V and P-V characteristic curves are listed in Table 3.
The fitted curves show some matches to the experimental data. The accurate fitting of (V, I, P) is highly influenced by the higher degree for each case.

| Single-diode model
The modeling process assists in knowing the characteristics and physical components of the solar cell. An accurate performance prediction reflects the modeling but requires the design of a model with sufficiently balanced complexity and accuracy. 25 The most commonly used model is the traditional single-diode model in parallel with a light generated current source I PH , a series resistor R S , and a shunt (13) Figure 13A, also known as the five-parameters model. 26,27 A general equivalent equation of a single-diode model of the current-voltage output characteristics can be expressed mathematically as in Equation 15: where I PH is the photocurrent, I s is the saturation current, q = 1.6×10 −19 C is an electron charge, K = 1.38 × 10 −23 J/K is Boltzmann's constant, T c is the working temperature (Kelvin), A is an ideal factor, R Sh is the shunt resistance, and R S is the series resistance, while I d and I Sh denote the diode and shunt resistance currents. Thus, an equivalent circuit is used together with the equivalent equation to express a model for the currentvoltage characteristic (I-V) curve of a PV cell or module. The most useful terms are the open circuit voltage V oc , the short circuit current I SC, and the current and voltage at the maximum power point (I MP and V MP ), respectively, as shown Figure 13B.
The (I-V) characteristic curves of the measured data are verified through a MATLAB simulation. The simulation has been designed for the same solar module that we have tested experimentally according to the data listed in Table 1. The developed Simulink MATLAB design is shown in Figure 14.
The results of the simulation are obtained as a P-V and I-V curves, that are used as a reference to compare them with each of the experimental and the proposed model. To verify the measured and modeled I-V curves, a Simulink MATLAB program was used, and the results are shown in Figure 15.
After repeating the I-V measurements in three timeconsecutive under the same weather conditions, it is noted that three nonidentical curves of I-V have created, as well as the simulation and the CNN-model curves. It is worth mentioning that the CNN model has used the last test data for training its network (measurements3). It is obvious that the maximum value of I sc in the simulation is almost the same as in measurements1, which is the first testing attempt in terms of time. The I sc provided by the manufacturer is 3.4 Amp under STC (see Table 1), but since our weather conditions were at 370 W/m 2 and 28°C, then the measured I sc = 1.26 Amp is an acceptable value, and the difference between the simulation and real measurements is about 0.002 Amp (see Table 4). It is also noted that the experimental measurements are not the same but are closer to the simulation results in measurements1 where the ambient temperature was 28°C for the cells and the irradiance fixed at 370 W/m 2 , the difference in V oc is below 0.7 V (20.1 V simulated and 19.43 V in measurements1).
After three consecutive testing attempts over time, the difference in measurements is significant, which in turn indicates that there is a power loss of about 1.7W (17.1W simulated (15)  . This difference or the loss is mainly due to the rise in PV-module surface temperature which reflects a decrease in the voltage V oc from 20.1V simulated to 17.9V in measurements3, and consequently a decrease in the generated power. Additionally, in MATLAB-based simulation, the mathematical model that is used to model a PV module and cell neglects the effects of parasitic resistances and it is considered that Iph ≈ Isc and all the PV cells are same and subjected to same applied conditions. For instance, the series resistance of the solar cell Rs increases over time. 28 The above figure (Figure 15) shows a good coincidence between the measurements and the modeled data for the I-V curve. However, this model is only valid under particular constant weather conditions at which the measurements have been taken. The RMSE between the experimental data and the CNN model is 0.011547, while that for the simulation data is 0.028111. Comparing the values of the RMSE for the CNN model and the simulation model shows that the error measures for the CNN model are closer to the measurements data under the same conditions. The proposed model was validated using the measured I-V characteristics, the results are compared and illustrated in Table 4. It is obvious that the CNN model is capable of accurately simulating the characteristics of the module with a good agreement between the two curves. Figure 16 displays a comparison of the I-V curve by each of the experimental measurements, the eighth order polynomial fitting equation, and the proposed CNN model. CNN-model results were also verified by comparing the experimental results with the manufacturer datasheet, which proves the effectiveness of the proposed modeling method.

| CONCLUSIONS
Modeling process assists in knowing the characteristics of physical components of the solar cell. The paper covered basically several models (Polynomial, Exponential, Gaussian, and single-diode Models), to approximate the experimental measurements of I(V) and P(V), and P(G, T, V oc , I sc , I m , V m , V). The work compares those models with the CNN-based mathematical model. The results show various fitting accuracy and depend on different factors for each individual method. The addressed approaches of PV models can facilitate the design and characteristic analysis for different types of solar PV module/cell.
The proposed model (CNN) is a simple architecture which is developed to model and estimate the profile of the generated power of a 55 W polycrystalline PV module. The ability of the CNN to estimate the PV generation has been satisfied with reasonable accuracy. This work demonstrates that the CNN models perform better than that by the polynomial, exponential, Gaussian, and the traditional single-diode models. CNN allows determination of electrical parameters for a PV module and the assessment of the power generated for any conditions at a constant temperature and solar irradiance.
The stepwise process for modeling the PV module helps to persuade more scholars into PV study and will give an idea of perceptive of I-V and P-V attribute of a PV panel. Except for it, such a representation would offer a systematic tool to envisage the behavior of future solar module under climate and physical parameter changes.
As a future work it is possible to design an equivalent circuit which can reflect the behavior of the solar cell/module, and even the PV array after the training is accomplished. This is done by using the analogue computer schemes, where each But, for neurons of nonlinear activation functions, another one or two op-amp circuit can be employed to present the nonlinearity action on the output of the summer amplifier. As consequently, a network of passive and active electronic components can achieve this modeling.