Neural Network Approach to MPPT Control and Irradiance Estimation

: Photovoltaic (PV) modules require maximum power point tracking (MPPT) algorithms to ensure that the amount of power extracted is maximized. In this paper, we propose a low-complexity MPPT algorithm that is based on the neural network (NN) model of the photovoltaic module. Namely, the expression for the output current of the NN model is used to derive the analytical, iterative rules for determining the maximal power point (MPP) voltage and irradiance estimation. In this way, the computational complexity is reduced compared to the other NN-based MPPT methods, in which the optimal voltage is predicted directly from the measurements. The proposed algorithm cannot instantaneously determine the optimal voltage, but it contains a tunable parameter for controlling the trade-off between the tracking speed and computational complexity. Numerical results indicate that the relative error between the actual maximum power and the one obtained by the proposed algorithm is less than 0.1%, which is up to ten times smaller than in the available algorithms.


Introduction
Solar energy plays a significant role in electricity production nowadays, due to its sustainability and abundance, simple installation of photovoltaic (PV) systems, reliable non-polluting power generation, etc. Accurate modeling of the PV cell/module is extremely important for optimal design and evaluation of PV systems. Various equivalent electrical circuits for photovoltaic cell/module modeling have been presented in the literature. Among them, a five-parameter single-diode model is commonly used, due to its low complexity and satisfactory accuracy [1]. Hence, many techniques have been proposed for the extraction of those five parameters: some perform the parameter extraction based on the manufacturer datasheet information [2][3][4], while the others obtain the parameters using a set of experimental current-voltage (I-V) points [5][6][7]. Moreover, the methodologies that utilize both the datasheet and experimental data to extract the unknown parameters are also available in the literature [8]. The equivalent PV circuit is described by a set of transcendental equations, which are solved by iterative numerical procedures [9]. The closed-form solution of I-V characteristics can be obtained by utilizing the Lambert W function [9,10].
Besides the electrical equivalent, the data-driven PV cell modeling approaches have also been suggested by several authors. Those techniques perform PV model identification directly from the measured data and usually have higher accuracy [11,12]. In [13], the PV cell is modeled by using the Multilayer Neural Networks, while in [14] and [15] authors use the generalized regression and radial basis function neural networks. Recently, a one-dimensional deep residual network framework has been applied to the PV modeling problem [16]. A data-driven method based on the simple linear regression and smoothing spline has been proposed in [17], while a hybrid approach, which combines the benefits of neural networks and fuzzy logic, is given in [18].
PV cells require maximum power point tracking (MPPT) algorithms to ensure that the amount of power extracted is maximized. The maximum power point (MPP) changes with irradiance and temperature variations, and, therefore, it is important to develop the MPPT algorithms that will be fast enough to track these changes. Since, in general, the MPPT algorithms can be classified in different ways, in this paper we will divide them into two categories: model-free and model-based methods. The only prerequisites for implementing model-free algorithms are current and voltage measurements, without compulsory information of the PV model. The implementation of these algorithms is cost-effective; however, they have disadvantages such as oscillations around the MPP, slow convergence speed, and poor performance under the rapid change of the irradiance. Among these methods, the most popular are the Perturb and Observe (P&O) [19][20][21][22] and Incremental Conductance algorithm [23,24]. Recently, many algorithms that use different optimization techniques have been proposed to solve the MPPT problem under non-uniform irradiance conditions [25][26][27].
The model-based MPPT algorithms utilize the photovoltaic model to determine the MPP position. These methods exhibit fast tracking speed and high efficiency in the steady-state, but usually have greater complexity. In [28], the MPPT algorithm that uses the polynomial approximation of the equivalent circuit equations has been proposed, while the algorithm that relies on the exact closed-form solution based on Lambert W-function can be found in [29]. Many model-based MPPT algorithms that use neural networks have also been proposed in the literature [30]. The neural network (NN)-based algorithms provide the MPP voltage at the output, while their inputs can be datasheet information [31][32][33], irradiance and temperature [34][35][36], voltage and current measurements [37,38]. Among them, the most promising are algorithms that do not use irradiation measurements, because irradiance sensors are costly and difficult to calibrate. It has been shown that the usage of the irradiance sensors can be effectively avoided by using the irradiance estimators [29,[39][40][41]. However, implementation of the irradiance estimators additionally increases the computational cost.
Here we propose a simple MPPT algorithm that is based on the neural network (NN) model of the photovoltaic module. The expression for the output current of the NN model is used to develop am analytical, gradient MPPT algorithm, which can provide high prediction accuracy of the maximal power. Finally, to avoid the usage of the pyranometer, a simple irradiance estimator, which is also based on the identified NN model, has been proposed. The presented algorithm has smaller computational complexity compared to the other NN-based MPPT algorithms, in which the MPP position is predicted by one multilayer NN or by two single-layer NNs. The performance improvement of the proposed approach over the available methods is confirmed by numerical examples with simulated and experimental data.
The rest of the paper is organized as follows: The procedure of modeling the photovoltaic cell/module and MPPT problem are described in Section II. The proposed MPTT algorithm and irradiance estimator are presented in Section III. This is followed by numerical results and discussion in Sections IV and V.

Equivalent Electrical Circuit of PV Module
The photovoltaic module is commonly modeled in literature with a single-diode circuit shown in Figure 1 [1]. The relation between the module terminal current and voltage is given by: where I is the output current of the module, V is the output voltage, I pv is the photocurrent, R p is a shunt resistance, R s is a series resistance, I s is the diode saturation current, and V t is the thermal voltage. The thermal voltage is equal to V t = nkTN s /q, where q is the electron's elementary charge [= 1.602 × 10 −19 C], k is the Boltzman constant [= 1.381 × 10 −23 J/K], T is the temperature of the cell [40], and N s is the number of series solar cells in a PV module. The equivalent circuit has five unknown parameters that need to be determined. Generally, the parameters of the PV module depend on the environmental conditions, especially on the irradiance (G) and module temperature (T). The parameters I pv , I s , V t and R p for different working conditions can be expressed as [40]: where index re f denotes parameters values measured under standard test conditions (STC), defined at ambient temperature 25 • C and irradiance 1000 W/m 2 . The short-circuit current temperature coefficient is denoted by α, whereas E g is the bandgap energy of the semiconductor. Figure 2 shows the typical P-V characteristic of the PV module for different values of temperature and irradiance. It can be seen that the position of the MPP changes as a function of irradiance and temperature.

Neural Network Model of PV Module
In recent years, neural networks (NN) have been increasingly applied to various engineering problems, due to their capability to solve complex and nonlinear problems. In general, authors have proposed the usage of different NN architectures for photovoltaic modeling [11][12][13][14][15]. Here we detail the procedure of photovoltaic modeling with one-hidden-layer feedforward NN, because this network later will be used for the design of the MPPT algorithm and irradiance estimator.
The feedforward NN model with one hidden layer and three neurons is shown in Figure 3. The solar irradiance G, temperature T and voltage V represent inputs to the neural network, while the module current I is chosen as output. The output current of the NN model is given by: where u = T G V T , whereas W 1 , W 2 , b 1 and b 2 are the coefficients that need to be learned from the available input/output training sets.
In order to facilitate the learning process, each input can be normalized by using the formula: where index max/min denotes the maximal/minimal value of S, T, V in the training set. A similar operation can be performed with the output training data. The neural network coefficients are optimized by using the Levenberg-Marquardt algorithm or some other second-order algorithm. The cost function is defined as the mean square error (MSE) between the predicted and actual current: where N i is the number of available points of I-V curve for specific irradiance G i and temperature T i , while M denotes the number of different I-V curves.
T G V I

Input layer
Hidden layer Output layer Operating points making up the training set may be collected by experiments under controlled environmental conditions [17]. The environmental data need to be uniformly distributed in order to avoid overfitting/underfitting in the ranges that have more/less training data. Moreover, it is important to cover all G and T values that can occur in practical scenarios, because the NNs do no have good extrapolation properties. In case that only a small amount of experimental data or manufacturer datasheet information is available, the parameters of the equivalent circuit should be determined first. After that, the training data can be synthesized by using Equations (1)- (5). However, it has been shown that the PV models built directly from the measured data usually have greater accuracy than the equivalent circuit models [16].

Overview of MPTT Algorithms
The MPPT tracker system is usually composed of the MPPT algorithm, power converter, and control unit ( Figure 4). The MPPT algorithm aims to provide the MPP voltage (V mpp ), which is used as the reference value in the power converter control loop. Due to simplicity, it can be assumed that the power converter is perfectly controlled.  One of the simplest MPPT algorithms is the Perturb and Observe (P&O) [20]. The P&O is the model-free algorithm that iteratively changes the output voltage towards the MPP, wherein the direction of change is determined by using the voltage and current measurements. The main limitations of the model-free algorithms are slow tracking speed and steady-state oscillations about the MPP [20]. The MPPT algorithms that rely on the photovoltaic model can be used to deal with these issues [28,29]. The model-based algorithms are fast and accurate, but also more complex and require irradiance sensors for implementation. The irradiance sensors are costly and difficult to calibrate. However, it has been shown that the irradiance sensors can be effectively replaced by irradiance estimators [29].
On the other hand, as far as the model-based algorithms are concerned, not only are there MPPT algorithms based on the equivalent circuit models, but there are also many of them based on neural networks. Comprehensive review of the NN-based MPPT algorithms can be found in [30]. The NN-based algorithms provide the V mpp voltage at the output, while their inputs can be datasheet information [31][32][33], irradiance and temperature [34][35][36], voltage and current measurements [37,38]. Moreover, some authors focuses on the design of both the MPPT algorithm and control unit [42,43]. Hybrid approaches that combine the NN-based algorithm with model-free algorithms have also been proposed [44].
Among the proposed algorithms, the most precise are those that use irradiance and temperature as input information [34][35][36]. Figure 5a shows an example of the feedforward NN in which G and T measurement are used to predict V mpp . It should be noted that other types of networks, such as a radial basis function NNs, can be used in the same way. The NN from Figure 5a provides the V mpp instantaneously, which enables fast tracking speed under fast changes of the environmental conditions. However, the drawback of this algorithm is that the irradiance information needs to be known. In [38], a cascade NN-based MPPT (CNNMPPT) the technique is proposed where two NNs are utilized to estimate V mpp . The first NN estimates the irradiance from the voltage and current measurements (Figure 5b), whereas the other NN determines the MPP voltage from the temperature and estimated irradiance (Figure 5a). The proposed technique can provide accurate results, but at the cost of the increased computational complexity. The algorithm that predict the MPP voltage by using the multilayer feedforward NN is proposed in [33].

Proposed MPPT Algorithm and Irradiance Estimator
Here we propose a low-complexity MPPT algorithm and an irradiance estimator with the aim of improving the MPP voltage prediction accuracy. Unlike the available NN-based algorithms that directly determine the MPP voltage from the measurements, the proposed algorithm relies on the NN model of the PV module, described in Section 2.2. Namely, the expression for the output current of the NN model is used to derive the analytical, iterative rules for determining the MPP voltage and irradiance estimation. The proposed solution has smaller computational complexity compared to the available NN-based algorithms that use the same input information. While other solutions use one multilayer NN or two single-layer NNs, the proposed technique relies on the NN-model that can be trained accurately with 4 neurons in the hidden layer. The proposed algorithm cannot instantaneously determine the optimal voltage, but it has a tunable parameter that can be used to control the trade-off between the tracking speed and computational complexity.

NMPPT Algorithm
The relation between the photovoltaic output power, current and voltage is given by: The aim of the MPPT algorithm is to find the point (V mpp , I mpo ) at which the output power P is maximal: P mpp = P(V mpp , I mpp ) ≥ P(V, I), ∀V, I.
It is well known that, under the uniform irradiance condition, the P-V curve is strictly concave, which can be observed from Figure 2. Thus, the MPP can be found by the means of the gradient ascend rule: where k is the discrete time-instant, while µ is the positive step size that controls the convergence speed. The algorithm will converge faster for the larger step size, but it will also be more sensitive to the measurement noise. There is no exact analytical approach for determining the maximal value of µ, but it can easily be tuned experimentally. As the rule of thumb, the function that changes faster requires a smaller step size. The photovoltaic Equation (1) has a transcendental form and could not be directly used to calculate the partial derivative in (11). On the other hand, the NN model provides the direct dependence between the current and voltage. By differentiation of (6) with respect to voltage, the required partial derivative will take a form: where W 1,3 is the third column of the matrix W 1 (the column which corresponds to the input V).
The symbol denotes the point-to-point vector product, whereas tanh (x) = 1 − tanh(x) 2 is a derivative of tanh(x).
Note that the input and output processing function, if used, needs to be taken into account when calculating the partial derivative (12). For example, if the training datasets are preprocessed with (7), the second term in (12) then needs to be multiplied with [u V,max − u V,min ] −1 , where u V,max /u V,min is maximal/minimal value of V in the dataset.
The NMPPT algorithm will converge faster than model-free algorithms, in which the gradient is calculated heuristically, by using the current and voltage measurements. It is worth noting that the proposed algorithm needs only one sample of the temperature and irradiance for determining the MPP. For this reason, the update rule (11) can be applied multiple times in one time instant, which will additionally increase the convergence. However, this procedure will also increase the computational complexity and, therefore, the efficient trade-off analysis between convergence and complexity is required. It is important to emphasize that the same approach cannot be applied in model-free algorithms, because they need a new current measurement for computing the next step.

Estimation of the Irradiance
Aside from the described MPPT approach, it is of high importance to also tackle the problem of irradiance sensors, since the irradiance information must be obtained.
We hereby introduce a simple irradiance estimator that relies on the previously identified NN model of the photovoltaic, with the main advantage of only a few additional computational operations being required. Motivated by work in [41], the proposed estimator relies on the immersion and invariance principle, and, therefore, it will be referred to as the NI&I. Considering that I and T are measurable, we can define the error between the measured and predicted module current as: The immersion and invariance estimator: with γ > 0 will ensure: lim k→∞Ĝ k → G, for all initial conditions G 0 and all positive signals I k , V k , T k . The necessary condition for the convergence is that function e(k) monotonically increases with G, which is analytically proved in [41].
On the other hand, it is a known fact that the module current is increasing with increase in irradiance. The faster estimator (neural gradient estimator (NGE)) can be provided if the cost function is defined as a square of e(k), and then minimized by the gradient descend method: Since e(k) is monotonically decreasing, e 2 (k) will be strictly convex and will have one minima. By differentiation of (6) with respect to irradiance, then substituting into (15), the update rule of the NGE becomes:Ĝ where W 1,2 is the second column of the matrix W 1 , while δ is the positive parameter.

Computational Complexity
The pseudocode of the proposed NMPPT algorithm is given in Algorithm 1. If we assume that the hidden layer has M neurons, then the NMPPT method will require 5M + 2 multiplications and 5M + 2 additions. Moreover, only one multiplication and two additions are needed for implementation of the NI&I estimator, while the NGE requires M additions and M multiplications. It is also important to highlight that the computational complexity will be approximately increased P times if all algorithm's steps are iterated P times. For example, if M = 4 and P = 2, then the proposed algorithm will require only 42 additions and 44 multiplications. The model-based algorithm that is used for comparison purposes requires 32 additions and 66 multiplications [29].

Simulation Results
The performance of the NMPPT algorithm is compared with the P&O [20] and CNNMPPT algorithm [38], as well as with the recently proposed MPPT algorithm that is based on the PV equivalent circuit (EMPPT) [29]. The EMPPT algorithm uses the irradiance estimator which is referred to as the EEST [29], while the irradiance estimator in the CNNMPPT is reffered to as the CNNEST. In the first set of examples, we used the I-V curves generated by the PV equivalent circuit. The PV panel consists of two serially connected PV modules, whose parameters are: I L = 5.447 A, I 0 = 4.839 × 10 −12 A, R p = 309.047 Ω, R s = 0.566 Ω, V t = 1.807 V. On the other hand, the second subsection is related to the use of the large I-V curve repository provided by the National Renewable Energy Laboratory (NREL) [45]. We selected the I-V curve dataset of the PV module defined by the NREL identifier: HIT05662. The

Simulated Data
The neural network is trained with 200 pairs of G and T, uniformly distributed within the ranges G ∈ {50, 1100} and T ∈ {5, 50}. Each I-V curve consists of 100 operating points. Figure 6 shows the P-V curves of PV module and NN model for irradiance and temperature values which were not included in the training dataset. It can be seen that the P-V curves of the NN model coincide very well with those of the simulated model. The MSE for training data equals 2.92 × 10 −5 , while the testing MSE is 3.81 × 10 −5 . In the first MPPT example, the performance of the proposed algorithm is assessed for different values of G. Precisely, during the first 30 iterations, the irradiance has value G = 900 W/m 2 , after which it is changed to G = 600 W/m 2 . In the first scenario, the NI&I algorithm is applied for the irradiance estimation. It may be observed from Figure 7b that the NI&I estimator converges in 15 iterations for P = 1. On the other hand, the convergence speed of both the NI&I and NMPPT algorithm is increased as P reaches higher values (Figure 7a). In the second scenario, the gradient irradiance estimator is coupled with the NMPPT algorithm. It can be seen from Figure 7b that the NGE has faster convergence speed than the NI&I, which, additionally, causes the slightly faster convergence speed of the NMPPT algorithm. Considering the trade-off between the computational complexity and performance, in the remaining analysis, we used the NMPPT and NI&I estimator for P = 2.  The second MPPT example describes the comparison between the NMPPT, P&O, EMPPT and CNNMMPT algorithm. Until the 100th iteration, the irradiance and the temperature are G = 320 W/m 2 and T = 10 • C, when they change to the values G = 725 W/m 2 and T = 50 • C. Observe from Figure 8a that the CNNMMPT provides the optimal voltage instantaneously, while the NMPPT, EMPPT and P&O algorithm need 8, 20 and 75 iterations to reach the steady-state, respectively. On the other hand, the NMPPT exhibits the smallest steady-state error, without oscillations. The reason for this is that the NI&I has greater accuracy than the EEST and CNNEST irradiance estimators, as can be seen from  In the last example, the irradiance and the temperature are linearly changed within the ranges G ∈ {50, 1050}, and T ∈ {5, 55}. By observing the Figure 9a, it is possible to note that the NMPPT, EMPPT and CNNMPPT exhibit good tracking ability. The P&O has the slowest convergence speed, while the EMPPT has the largest steady-state error. It also can be seen that the NI&I estimator tracks the irradiance with the smaller error than the EEST and CNNEST (Figure 9b). The relative error between the predicted and true maximal power is shown in Table 1. Observe that, after the convergence, the proposed algorithm tracks the maximal power point with error less than 0.001%. Note also that in the EMPPT, P&O and CNNMMPT the relative error reaches the values 1.138%, 2.118% and 0.171%, respectively.

Experimental Data
The NN is trained for 500 different values of G and T, distributed in the ranges {50, 1100} and {5, 50}, respectively ( Figure 10). Each I-V curve contains 180 operating points. Figure 11 represents the P-V curves for values of irradiance and temperature which were not included in the training dataset.
The subscripts e and s denote the NN models/NMPPT algorithms trained by experimental/simulated data, respectively. It can be seen that the P-V curves of the NN e model coincide very well with the measured curves. The MSE for training data equals 0.0027, while the testing MSE is 0.0028. On the other hand, the MSE between the current generated by the NN s model and measured current equals 0.0612.  In the first example, we performed a comparison between the considered algorithms under a sudden change in irradiance and temperature. Until the 100th iteration, the irradiance and the temperature are G = 320 W/m 2 and T = 10 • C, when they change to the values G = 725 W/m 2 and T = 50 • C. It can be perceived from Figure 12a that the CNNMMPT provides the optimal voltage instantaneously, while the NMPPT e , NMPPT s , EMPPT and P&O algorithm need 20, 23, 40 and 75 iterations to reach the steady-state, respectively. Note also that the NMPPT e has the smallest steady-state error, followed by the NMPPT s , EMPPT, P&O and CNNMPPT. This behavior can be explained by the fact that EEST and NNEST have lower accuracy, which can be observed from Figure 12b.
Eventually, the last example focuses on the two time-varying irradiance and temperature profiles. Corresponding simulation results are presented in Figures 13 and 14. A similar conclusion as in the previous example can be drawn here. The NMPPT algorithm and NI&I estimator, which are based on the experimental data, provide the best steady-state performance. On the other hand, both the NMPPT s and EMPPT exhibit acceptable performance. It can also be seen that the NI&I s has greater accuracy than the EEST and NNEST. The P&O algorithm has the slowest tracking speed and exhibits oscillations in the steady-state. Finally, the CNNMPT for some irradiance levels has good accuracy, while for some irradiance levels exhibits the worst performance. The relative error between the predicted and true maximal power for different irradiance level is shown in Table 2. Observe that the NMPPT e tracks the maximal power point with error less than 0.1%. Note also that in the NMPPT s , EMPPT, P&O and CNNMMPT the relative error reaches the values 0.2259%, 0.408%, 1.856% and 2.586%, respectively.

Conclusions
In this paper, the simple and accurate gradient MPPT algorithm based on the neural network model of the photovoltaic module has been proposed. The NN model is utilized to calculate the gradient of the P-V curve with respect to the voltage, which enables fast tracking of the MPP and steady-state performance without oscillations. Additionally, the irradiance estimator, which also relies on the NN model, has been presented. It is important to emphasize that the NN model can be developed either by using the experimental data or the data generated by the equivalent circuit model. Suitable simulations have been performed for comparing our approach with the effective techniques proposed in the literature. The final results indicate that the proposed MPPT algorithm exhibits faster convergence speed compared to the other iterative algorithms. It has been also demonstrated that the experimental-data-based NN model achieves the best steady-state performance, as well as that the acceptable performance can be obtained with the simulated-data-based NN model. Furthermore, the proposed irradiance estimator exhibits greater or similar accuracy compared to the considered algorithms. This is also of great importance since the irradiance estimators can be used for other purposes such as monitoring and fault detection of PV systems. Lastly, the proposed approach does not only achieve high degrees of accuracy, but it also has low computation complexity, which makes it suitable for implementation on microprocessor platforms.