Maximum Power Point Tracking of PV System Based on Machine Learning

: This project studies the conditions at which the maximum power point of a photovoltaic (PV) panel is obtained. It shows that the maximum power point is very sensitive to external disturbances such as temperature and irradiation. It introduces a novel method for maximizing the output power of a PV panel when connected to a DC / DC boost converter under variable load conditions. The main contribution of this work is to predict the optimum reference voltage of the PV panel at all-weather conditions using machine learning strategies and to use it as a reference for a Proportional-Integral-Derivative controller that ensures that the DC / DC boost converter provides a stable output voltage and maximum power under di ﬀ erent weather conditions and loads. Evaluations of the proposed system, which uses an experimental photovoltaic dataset gathered from Spain, prove that it is robust against internal and external disturbances. They also show that the system performs better when using support vector machines as the machine learning strategy compared to the case when using general regression neural networks.


Introduction
Electric energy is essential to our daily lives. Traditionally, the generation of electric energy involved the combustion of fossil fuels which led to major problems to human beings and planet Earth's environment. Accordingly, efforts have recently been focused on finding alternative ways to generate electricity from clean and sustainable energy resources such as sunlight [1].
Using photovoltaic (PV) systems, sunlight can be converted into electrical energy that can be instantly used, stored or connected to the grid [2]. Unfortunately, the initial implementation costs of PV systems are relatively high. In addition, the efficiency of the energy conversion process in PV systems is relatively low [3].
The energy output is sensitive to the variations in weather conditions [4]. Variations in cloud cover, fog, and heat affect the PV system conversion efficiency. Dust and other particles floating in the air or covering the panel can drastically decrease the efficiency of the power conversion process as well [5]. Consequently, many research efforts are focused on finding ways to drive the PV panels to their maximum output power at all weather conditions, thus ensuring their profitability [3].
Studying the nonlinear characteristics of the PV system, scientists noticed that for a given pair of solar insolation and ambient temperature values, there exists a unique operating point (output voltage) at which the PV output power is at its maximum. Any change in the output voltage because of the change of load or other reasons will cause the PV panel to produce less power than the maximum [6]. The output power is also dependent on solar radiation and temperature [7]. All of the above make the continuous system operation at the maximum output power point an extremely difficult task. The challenge here is to obtain an equilibrium operating point such that the PV panel maximum power point matches the load demands [8].
Several efforts have been made to control the operation of PV systems at maximum power. Perturb and Observe (PaO) [3] and Incremental Conductance (IC) were among the earliest methods to address the problem. Both methods are widely used because of the ease of their implementation. Yet, they have their own drawbacks, which include uncertainty due to sensitivity to abrupt variations in the weather conditions [3,9] and oscillations around the operating point [10,11].
Different approaches reported in literature addressed the same problem, i.e., aiming to enhance the results achieved by the PaO. In addition to fuzzy logic-based methods [12][13][14][15], computational optimization methods such as swarm optimization [16] and ant colony optimization [17] were used to improve the speed and stability against the variability of irradiance.
Artificial neural networks (ANNs) [9,[18][19][20][21] focused methods were among the approaches followed to solve the problem. Being well-known machine learning algorithms, ANNs ability to model nonlinear functions enabled the accurate estimation of PV panel reference voltage corresponding to the maximum output power. Besides accuracy in estimating the maximum power point, ANN-centered methods showed a fast response in the testing phase.
Another machine learning algorithm that has been used in relation to renewable energy is support vector regression (SVR) [4,[22][23][24][25]. In [6], it was successfully used to predict the PV reference voltage corresponding to maximum output power. Unlike ANNs, which converge at local minima, SVR converges at global minima [26] marking it as a favorable candidate for modeling functions and for prediction purposes [6].
This project studies the conditions at which the maximum power point of a PV panel is obtained. It shows that the maximum power point is very sensitive to external disturbances such as temperature and irradiation. It introduces a novel method for maximizing the output power of a PV panel when connected to a DC/DC boost converter under variable load conditions. The main contribution of the work is to predict the optimum reference voltage of the PV panel at all-weather conditions using machine learning strategies and to use it as a reference for a Proportional-Integral-Derivative (PID) controller that ensures that the DC/DC boost converter provides a stable output voltage and maximum power under different weather conditions and loads. The system performance is verified over an experimental photovoltaic dataset gathered from Spain. It includes temperature, solar irradiance, output current, voltage, and power for a period of one year. Evaluations of the proposed system prove its robustness against internal and external disturbances. It also shows that the system performs better when using support vector machines as the machine learning strategy as opposed to the case when using artificial neural networks.

Proposed System
The proposed maximum power point tracking (MPPT) system block diagram is shown in Figure 1. It consists of a solar panel, a DC-DC boost converter, a machine learning-based reference voltage estimator, a PID controller, and a Pulse Width Modulation (PWM) signal generator. The system components are explained below:

PV Panel
The PV panel utilized in this research is a Mitsubishi TD185MF5 panel. It is characterized by 50 polycrystalline cells connected in a series configuration. A list of the PV panel specifications is given in Table 1.

Machine Learning-Based Reference Voltage Estimator
As described in [6], machine learning algorithms can be employed to predict the reference voltage accurately after being trained on historical data. In this work, we use two machine learning algorithms, namely, generalized regression neural network (GRNN) and SVR and compare the performance of the system when employing each algorithm. Both algorithms are well-known for their ability of regression, function modeling, and prediction. More details about GRNN and SVR can be found in [27][28][29] and [30], respectively.
Referring to Figure 1, the V re f generator block estimates the reference voltage accurately after being previously trained on historical data. For a given temperature-irradiation pair, it predicts V re f that coincides with the maximum output power point of the panel. In order for the machine learning block to be fully functional, it has to pass through two stages, the learning stage (also referred to as the training stage) and the running stage (also referred to as the testing stage). The objective of the learning stage is to build and validate a function that models the relationship of temperature and irradiation with the reference voltage V re f using historical (training) data. The model obtained in the learning stage is then used in the running stage to predict the reference voltage value V re f using as input testing data that the model has not seen in the learning phase. The learning and running stages are explained in Figure 2. The accuracy of the machine learning model prediction ability is measured using the root mean square error (RMSE): where n denotes the number of testing data points, V re f and V re f denote the measured reference voltage and the machine learning predicted reference voltage, respectively. The predicted voltage V re f will be used as a reference to the PID controller to push the system to work at its optimal point at the characteristic curve. As a result, the efficiency will be improved.

DC-DC Boost Converter
In this work, we employ a boost converter to step-up the DC voltage at its input to the DC voltage level required by the load. In addition to an inductor and a capacitor that serve as energy storing elements, it includes a diode and a transistor for switching purposes. The input of the boost converter is connected to the solar panel and its output is connected to the load. Figure 3 shows the circuit of the DC/DC boost converter used in this research. The principle that the boost converter operates on is the inductor's behavior in opposing changes in the current [31]. The boost converter is mainly operating in two modes as follows: Mode 1: Initially, the switch is closed for a duration of D seconds during which the inductor stores magnetic energy as a result of the current supplied by the source. During that time, the closed switch that acts as a short-circuit together with the reverse-biased diode, isolates the inductor side of the circuit from the capacitor side. Thus, no current will be supplied to the capacitor by the source and the load current will be supplied by discharging the capacitor. The duration D is controlled by the transistor which is triggered by the PID controller as shown in Figure 1.
Mode 2: The switch opens for a duration of (1 − D) seconds. At this point, the diode becomes forward-biased allowing the inductor to release the stored magnetic energy in the form of a current. Together with the source, the inductor charges the capacitor and meets the load demands. If properly designed, the load current remains, in the two modes, almost constant as is the case for the capacitor voltage. Since the average voltage across inductor V Lavg is zero: Thus, the relation between the input voltage V s and the output voltage V o becomes: Leading to the conclusion that V o is dependent on D is the duty ratio.

PID controller
The predicted voltage V re f will be used as a reference to the PID controller whose objective is to drive the system to work in its optimal power point, thus maximizing the solar panel output power for given temperature and irradiation values and maintaining high efficiency.

Methodology
The aim of this work is to increase the PV efficiency by estimating an accurate optimal reference voltage V re f via a machine learning method. The reference voltage is used as a reference for the PID controller which will work towards pushing the whole system to operate with the estimated voltage leading to maximum power harvesting and stable DC-DC boost converter output voltage as shown in Figure 1. The key for improving the system efficiency is the voltage reference generator which is supposed to estimate accurately the value of V re f that corresponds to the specific existing weather conditions (temperature and irradiation). The V re f generators that we have chosen to use in this work are SVR and GRNN. Both SVR and GRNN are effective regression machine learning methods. The estimation performance of machine learning methods, in general, depends also on the quantity and quality of the gathered data. Therefore, an accurate data accusation system is used in this work to find the PV model (I,V) under different weather conditions, thus allowing us to find the optimum operating voltage of the PV. The data accusation system is shown in Figure 4. Besides the Mitsubishi TD185MF5 panel (Mitsubishi Electric, USA), it includes an irradiance and temperature sensor (Si-420TC-T-K) (Ingenieurbüro Mencke & Tegtmeyer GmbH, Hameln, Germany), a clamp current Chauvin Arnoux PAC 12 (Chauvin Arnoux, Toulouse, France) for direct current measurements, a programmable amplifier with insulation SINEAX TV809 (Camille Bauer, Wohlen, Switzerland) to isolate electrically the input/output signals and SINEAX CAM data logger (Camille Bauer, Wohlen, Switzerland) to record the measurements of current, voltage, temperature, and irradiance. The power values are calculated from the voltage and current readings. The experiment was conducted in Vitoria-Gasteiz northeast of Spain where the weather is typically cloudy or partly cloudy all year. A more detailed discussion of the components of the data acquisition system can be found in [19]. The gathered one-year-long dataset was cleaned from anomalies and divided into a training set and a testing set. For training and validation, 70% of the data points were used. The rest was used for testing. Referring back to Figure 2, which describes the learning and running stages, it is obvious that we are implementing a supervised learning machine learning strategy where irradiation (G) and temperature (T ) serve as inputs and V re f as a target. As a result of the learning stage, a function V re f = f (G, T) is obtained. It models the relationship of G, T with V re f . The function V re f = f (G, T) is utilized in the running stage to predict the reference voltage V re f for new inputs G and T. The SVR setup of our work uses a radial basis function (RBF) kernel. Similarly, GRNN has a radial basis layer.
The overall maximum power tracking system, shown in Figure 1, was implemented using MATLAB Simulink environment. The first step of the system implementation involved training, validating, and testing the machine learning block offline without being connected to any other system components. Once it became capable of estimating V re f accurately, the trained SVM was then implemented in Simulink using the MATLAB function block. The PV panel and the DC-DC converter were also modeled in the Simulink environment using their characteristic equations. All the above-mentioned components were connected to a PID block and a variable load. The performance of the proposed system was observed against variations in temperature, irradiance, and load. The simulation results are discussed in the following Section 4.

Results and Discussion
In this section, we evaluate the ability of the PID controller to push the system to operate at the reference voltage predicted by the trained machine learning algorithm.
First, we show in Figures 5 and 6 the PV characteristics obtained from the measured data for different irradiances and two temperatures values, namely, 5 • C and 10 • C. The red curves shown are the V re f curves corresponding to the maximum power point (V MPP = f(P max )).  The results demonstrate the ability of the machine learning algorithm to correctly predict V re f , and the maximum power as a function of temperature and irradiation for both SVR and GRNN are given in Figures 8-11. It can be visually seen from Figures 8-11 that both algorithms result in accurate predictions as the estimated data coincide with the measured data. A quantitative comparison in terms of RMSE between the two algorithms is given in Table 2. It can be seen from Table 2 that SVR outperforms GRNN as it results in less RMSE between the measured and predicted values. A similar conclusion was made in [32] where it was shown that SVR resulted in better rainfall forecasting than GRNN did. Since SVR in our experiment has provided a more accurate estimation of the measured values of V re f , we adopt in our proposed MPPT system SVR as the machine learning-based reference voltage estimator block.      The proposed system's ability to push the PV panel to work at V re f (V MPP ) and produce P max at different values of temperatures, irradiance, and different loads is demonstrated in Figures 12-16. Figure 12 shows that the PID regulator pushes the output voltage of the PV system to work with the needed V MPP .
For example, at G = 500 W/m 2 and T = 290 Kelvin, V MPP = V PV = 18.77 V and P = 70 W. A zoomed version of Figure 12 is shown in Figure 13. It shows that by using our MPPT algorithm and PID regulator, the system works at desired V MPP . The error between the estimated V MPP and the output voltage of the PV system is minimal. Figure 14 shows that the percentage error between estimated V MPP and the output voltage of the PV system is very low, which means that the efficiency of the system has improved with the use of the PID regulator. At t = 3 h the temperature T changed from 290 to 310 K. Thus, the V MPP changed from 18 to 21 V. An overshoot fluctuation occurs at this point and then it stabilizes.     The effect of changing the load on the system with and without regulation is shown in Figures 15  and 16. Figures 15 and 16 show the system response when there is no regulation for R = 10 Ω and 100 Ω, respectively. It can be seen that the output power is dependent on the load. Thus, the system is not robust without using the PID regulator.
Referring back to Figure 12 where the system is controlled by a PID controller (with V re f predicted by the machine learning block), it can be clearly seen that the output power is not affected by the load. It is only dependent on T and G. Comparing to Figures 15 and 16, the output power is improved from 0.2 W when there is no regulation, to 200 W with regulation. As a result, it can be seen that the PID controller with reference voltage obtained from the machine learning block is able to provide a stable output voltage and maximized power.

Conclusions
This paper has studied the conditions at which the maximum power point of a PV panel is obtained. It showed that the maximum power point is very sensitive to external disturbances such as temperature and irradiation. It introduced a novel method for maximizing the output power of a PV panel when connected to a DC/DC boost converter under variable load conditions. Machine learning strategies were used to predict the optimum reference voltage of the PV panel at all-weather conditions to serve as a reference for a PID controller that ensured that the DC/DC boost converter provided a stable output voltage and maximum power under different weather conditions and loads. The proposed system was tested on an experimental photovoltaic dataset gathered from Spain. It showed robustness against internal and external disturbances. The paper also showed that the SVM based reference voltage generator performed better than that based on GRNN.
In the future, other aspects that disturb the PV systems power generation efficiency such as humidity, dust, and fog among others will be considered in the machine learning model which will probably increase prediction accuracy. Moreover, the experiment will be conducted in areas other than northeast Spain that are characterized by warmer or cooler climates to check how the proposed system works under different climatic conditions.