MPPT Based on Adaptive Neuro-Fuzzy Inference System (ANFIS) for a Photovoltaic System Under Unstable Environmental Conditions

: Many algorithms have been used to track the MPP in a PV generator. Although these algorithms have proved their worth, the fact remains that they still have limits in terms of stability, response times and significant presence of oscillations, especially for sub-Saharan conditions where the climate variation is very sudden and has a considerable impact on the power delivered at the generator output. In this article, the objective is to develop a maximum power point tracking (MPPT) controller based on an Adaptive Neuro-Fuzzy Inference System (ANFIS) to improve the performance of the Felicity Solar photovoltaic module FL-M-160W submitted to varying environmental conditions. The specifications of the FL-M-160W module are used to analyze and model the PV generator and boost converter located between the panel and the load in Matlab / Simulink. After the experimental tests, a database was set up to develop the neurofuzzy controller. The proposed ANFIS model was tested and validated under the Matlab / Simulink environment and then inserted into the PV system. The optimum voltage Vopt provided by this model is compared to the reference voltage Vpv provided by the PV generator and the error obtained is used to adjust the duty cycle of the DC-DC boost converter. After simulations, the results obtained reveal a good performance of the ANFIS controller compared to conventional P&O, InC and HC controllers in terms of stability, convergence speed, accuracy, robustness, and response time even under unstable environmental conditions with an efficiency of about 98%.


Introduction
The sun is an inexhaustible source of renewable energy, generating little or no waste or polluting emissions. It is used to produce energy in two forms (thermal and photovoltaic). Photovoltaic solar energy is the transformation of part of the light from solar irradiation into electrical energy using a set of elements constituting a PV system whose basic phenomenon implemented is the photovoltaic effect. This form of energy has the advantage of stabilizing global warming, preserving our fossil fuel reserves and ensuring energy security for the planet. Compared to conventional energy resources, photovoltaic solar energy systems still presents a large area of competition due to its high installation cost and low power consumption due to the conversion efficiency of PV cells. In addition, during the operation of the PV generator, the P-V and I-V characteristics vary. Indeed, the maximum power point (MPP) changes position with the change of light intensity or temperature, and therefore the optimal voltage changes value. An adaptation stage is generally introduced to operate the PV generator optimally to ensure its profitability. The voltage at the panel terminals must be continuously regulated to its optimum value to work at maximum power: this is the Maximum Power Point Tracking (MPPT). In a PV system, the MPPT command can be defined as an algorithm which associated with an adaptation stage allows the system to operate in its optimal operating point and this whatever the atmospheric conditions (temperature and global sunshine) and of load value [1]. Many algorithms have been used to track the MPP in a PV generator. Although these algorithms have proved their worth, the fact remains that they still have limits in terms of stability, response times and significant presence of oscillations especially for sub-Saharan conditions where the climate variation is very sudden and has a considerable impact on the efficiency of the solar generator. Unlike standard methods where the stability of the system cannot be ensured due to the fluctuations around the MPP that they cause, higher precision of systems, especially nonlinear systems, can be ensured with artificial intelligence methods. Fuzzy logic controller (FLC) and artificial neural networks (ANN) have been used successfully to track the peak power point of PV systems [2,3]. Fuzzy controllers are fast converging and have minimal oscillations around the MPP but their effectiveness is highly dependent on the skills of the designer. On the other hand, neural networks allow to follow the MPP with precision [4,5]. Nevertheless, the complexity of implementing this technique remains. To solve this problem, many MPPT controllers combining fuzzy logic and neural networks have been developed to establish a compromise between complexity and precision in the implementation of MPPT. In this work, the ANFIS controller is used to extract the maximum power in a Felicity Solar photovoltaic module FL-M-160W. This document is divided into 5 sections. After introducing this work, section 2 presents the PV system consisting of a panel and the adaptation stage. A review on the MPPT commands used for the maximum power point research is presented in section 3 and section 4 develops and models the neuro-fuzzy MPPT controller uses. Finally, after modeling and simulation, results and discussion are presented in section 5.

Modeling of the Photovoltaic System
A photovoltaic system is a set of elements that are used to produce solar energy [6]. Figure 1 illustrates the overall block diagram of the proposed system. The proposed model is a standalone PV system that includes a PV array use as a power generation source. This PV array is connected to the DC-DC boost converter that use ANFIS algorithm as MPP tracking technique to ensure the adaptation between the panel output voltage and the load.

Electrical Modeling of the Solar Panel
A photovoltaic (PV) cell can be represented by the equivalent circuit shown in figure 2. In the case of an ideal solar cell, the equivalent electrical circuit consists of a current source Iph, generated by light in parallel with a single-diode. But in practice, no solar cell is ideal. Therefore, a shunt and series resistance are added to the model in order to take into account all the phenomena present during the conversion of light energy. In practice, the maximum current is delivered to the load when the serie resistance Rs is very small and the shunt resistance Rsh is very large. The power supplied to the output of a solar cell is generally very low. To increase the output power of solar PV systems, solar cells are connected in series and parallel configurations to form PV modules whose equivalent model is discribed in figure 3. Using the theory of semiconductors and photovoltaic, the non-linear relationship between current voltage of the PV module can be described mathematically using basic equations 1, 2, 3, 4, 5 and 6.
Saturation current: Reverse saturation current: The output current of the considered PV module is given by: where D is the series resistance of the solar cell and V is the output voltage of the cell and B A is the number of cells in parallel. Figure 4 represents the block diagram of the photovoltaic generator designed in Matlab/Simulink using previous equations.

Analysis of PV Module Characteristics
The Characteristics of the solar module FL-M-160W are shown in figures 5, 6 and 7.    As we can see in figure 6 and 7, the I (V) and P (V) characteristics change with irradiance and temperature. A decrease of irradiation G causes a decrease in the current followed by a very slight decrease in the voltage Voc and therefore a shift of the maximum power (Pmax) of the solar panel towards lower powers. When the temperature increases, the open circuit voltage Voc considerably decreases while the current is almost unchanged. This has the immediate consequence of reducing the maximum power.
To take advantage of the maximum energy conversion, it is necessary to operate the PV panel around this MPP. To work at maximum power point, it is necessary to continuously adjust the voltage across the panel to its optimum value, this is called Maximum Power Point Tracking (MPPT).

DC-DC Boost Converter
The boost regulator is strongly recommended to follow the MPP because of its advantages over the buck converter [7]. This switching power supply enables a higher value variable DC voltage source to be fabricated from a fixed input DC voltage source. The principle is to change the duty cycle of a rectangular signal to create a variable average voltage called Pulse Width Modulation (PWM). Figure 8 illustrates the boost converter model produced on Simulink, the specifications of which are contained in table 2. The output voltage Vs is expressed by equation 8: With α the duty cycle such that 0 < I < 1.

Maximum Power Point Tracking
The direct connection of a PV source to a DC load poses the problem of transferring the maximum power when the irradiance changes suddenly [8]. To maximize the power produced by the PV generator, an impedance adapter stage is very often used and controlled by one or more control laws commonly referred in the literature as "Maximum Power Point Tracking". A MPPT command is a command associated with an adaptation stage which makes it possible to monitor the maximum power point of a photovoltaic module by making the PV module operate in its optimum operating point, whatever the atmospheric conditions (temperature and sunlight) and the value of the load [9].

Perturb and Observe (P&O) MPPT Command
The MPPT P&O algorithms are widely used to track MPP in PV systems. It allows to determine the point of maximum power for a solar irradiation and a temperature or for a level of degradation of PV system characteristics given. Figure 9 gives the flowchart of this algorithm [10]. The P&O algorithm is a classical algorithm widely used for its simplicity and ease of implementation, its precision, and its speed of reaction [11]. However, in the case of sudden variations in temperature and / or illumination (clouds), the poor convergence of the algorithm is noted [12]. This algorithm also presents some problems related to the oscillations around the MPP that it generates in steady state because the MPP search procedure must be repeated periodically, forcing the system to constantly oscillate around the MPP, once the latter is reached. These oscillations can be minimized by reducing the value of the disturbance variable. However, a low increment value slows down the search for MPP, so you have to find a compromise between precision and speed when choosing this update step that makes this command difficult to optimize.

Incremental Conductance (InC) MPPT Command
It is a widely used and easy to implement method. This technique addresses the problem of the P&O divergence in the case of a rapid change in sunlight. To calculate the MPP, the algorithm compares the conductance G with the incremental conductance ∆G, and this by looking for the point of cancellation of the derivative of the power. A schematic description of this algorithm is shown in figure 10 [8,13].   [14].
The accuracy and speed with which the algorithm tracks the MPP depends on the size of the reference voltage increment or the duty cycle reference. Two main handicaps are reconciled with this method. The first is the oscillation of the operating point around the steady state MPP, the second is that the algorithm can easily lose track of the MPP if the solar radiation changes rapidly. When the irradiation varies instantly over time, the monitoring of the MPP evolves correctly. But, if the irradiation changes at a slope, the tracking will be poor. The algorithm is unable to determine whether the change in power is due to the voltage disturbance or the change in solar radiation. This principle is illustrated in Figure 9. Several authors, to verify the performance of this proposed method, choose an irradiation profile of different shapes for the simulations.

Hill Climbing (HC)MPPT Command
Hill Climbing (HC) method consists of making the operating point rise along a characteristic to reach the maximum of the power function of the GPV against the duty cycle of the converter. This is to give a disturbance on the duty cycle which results in a displacement of the operating point along the power-duty cycle characteristic of the photovoltaic generator. The Hill Climbing algorithm is developed in figure 11 diagram [14].
With an efficiency between 95.5% -99.1%, this technique is easy to implement. In addition, its main limitations are oscillations around the MPP in steady state and an occasional loss of the search for MPP during rapid change in weather conditions.
To remedy the various problems associated with the various classical algorithms, artificial intelligence techniques such as fuzzy logic and neural networks have been introduced.

Adaptive Neuro-Fuzzy Inference System (ANFIS)
ANFIS is an adaptive neuro-fuzzy inference system that uses a 5-layer MLP neural network to refine the fuzzy rules already established by human experts and readjust the overlap between the different fuzzy subsets to describe the input-output behavior of a complex system using a database for learning. It combines the advantages of two machine learning techniquesartificial intelligence techniques (Fuzzy Logic and Neural Network). In this system, fuzzy logic transforms input data into a desired output via a highly interconnected neural network, weighted to map the digital inputs to an output. As shown in figure 12, this network which integrates both the Takagi-Sugeno Kang fuzzy inference system (FIS) and an artificial neural network has a structure composed of five layers representing the network architecture artificial neural. Square nodes represent adaptive parts while circular nodes represent non-adaptive sections. The parameters of the adaptive nodes will be modified during the ANFIS learning process [15]. The learning is done by a hybrid technique based on the principle of backpropagation [16] and the least squares method. The role of learning is the adjustment of the parameters of this fuzzy inference system. This model provides very good approximation results for nonlinear functions.  [17,18].
The functions of nodes and layers are (9) and (10): Rule 1: If is J and K is L then, M ) , K 1 = O + C K + P Rule 2: If is J Q and K is L Q then, M Q ) , K 1 = O Q + C Q K + P Q Where and K are the inputs, and J , J Q , L and L Q are the fuzzy sets that represent linguistic values such as small, medium, large. These fuzzy sets would be determined during the learning process. O , C , P , O Q , C Q , P Q are design parameters also determined during the learning process.
The ANFIS structure consists of five layers: Layer 1: The first layer represents the fuzzy membership functions. Each node of this layer has a Gaussian-type Photovoltaic System Under Unstable Environmental Conditions membership function according to Jang's model (6): Sare the fuzzy membership levels used to specify the membership degree of net entries and y in terms of linguistic valuesJand L -.
Layer 2: Each neuron V of this layer is a circular fixed node with the label π which generates as output the product of its inputs (fuzzy rules) and generates the product X - (12).
S -Q = X -= T U-) 1. T W-)K1, V = 1,2 Layer 3: Each neuron makes it possible to calculate the ratio between the weight of the rule and the sum of the weights of all the rules (13).
The obtained value represents the contribution of the fuzzy rule to the result.
Layer 4: Each neuron V of this layer is connected to a corresponding normalization neuron and to the initial inputs of the network. This layer calculates the coefficients of the first order equation of a Takagi-Sugeno rule for each fuzzy rule (14).
Where X Y ZZZ is the output of layer 3, and {O -, C -, P -} is the set of output parameters of the first order rule i, which are called consequent parameters. Layer 5: Includes a single neuron that represents the output layer that provides the output of ANFIS by calculating the overall weighted output of the system (10).
Subsequently, a hybrid learning algorithm that combines the backpropagation learning algorithm and the least squares method makes is used to define the optimal values of the parameters of these membership functions and the consecutive parameters. These consecutives parameters are used to determine the ANFIS network output. An experimental database collected on a Felicity Solar PV module FL-M-160W is used to learn, test and check the neuro-fuzzy controller.

Experimental Features
In this work, ANFIS is used to track the maximum power point in a PV system under unstable environmental condition. The optimum voltage obtained at the outlet of the ANFIS network is used to build the duty cycle and allow the PV panel to deliver optimum power output. Figure 13 illustrates the data acquisition device. A database is built using a Benning Sun 2 type pyranometer and an acquisition card which serve as equipment for the acquisition of data through experimental tests which will be optimized to approximate the output which corresponds to the maximum power, depending on variation of irradiance and temperature. The experimental tests carried out for the day of November 04, 2020 made it possible to build a database including test, verification and learning data. Figure 14 illustrates the global irradiance G and the solar panel temperature TPV while figures 15 and 16 illustrate the evolution of current and voltage recorded in relation to the global irradiance.  As can be seen in figure 14, the weather conditions fluctuate sharply throughout the day. The solar irradiance fluctuates between 114 W / m² and 1072 W / m². The irradiance peak value of 1072 W / m² is obtained under an ambient temperature of 41°C and corresponded for a temperature of 37°C on the panel surface. The temperature fluctuates daily between 30°C and 41°C. Figure 15 illustrates the voltage evolution recorded in relation to solar irradiance. It appears that the measured Vpv voltage tends to follow the profile of the overall irradiance and the Ipv current. This variation is quite normal because, according to Ohm's law, the voltage across the resistive load is proportional to the current intensity.
Having our database, the ANFIS controller structure is developed as illustrated in figure 20 where irradiance (G) and temperature (0 A5 ) are the input variables. The output variable which is the PV generator voltage at which the maximum power point occurs is taken as the reference voltage. The optimum voltage produced by ANFIS is compared to the reference voltage of the PV generator and the error is given to generate operating signals. The operating signal is then given to the PWM generator. The generated PWM signals manage the DC -DC converter duty cycle to adjust the operating point of the PV module.

Modeling of ANFIS on Matlab / Simulink
To build the ANFIS structure, 509 elements are used as training data, 120 as checking data and 120 as testing data. Each data is made up of input (Irradiance, Temperature) and output (voltage) variables. Then, the number and type of input membership functions are defined to configure our fuzzy system for training. Seven membership functions are used for the two input variables and each of the membership use the 'trimf' type functions. To generate the initial membership functions, the genfis1 command is used. Figure  17 illustrates these initial membership functions.  For the learning of the structure, a hybrid learning technique combining the backpropagation algorithm for the determination of the parameters of the premises (adjustment of the parameters related to the membership functions) and the method of least squares for the estimation substantial parameters is used. For an epoch number of 1000, the result of the training is checked. The syntax evalfis calculates the output of the fuzzy system where RMSE (Root Mean Squared Error) represents the root mean square error. Figure  18 shows the ANFIS output as a function of the system training variables (@ c d ).
After training, completely unknown data parameters are presented to the model and the performance is tested. Figure 19 illustrates the new membership functions after training. The structure of ANFIS, generated by the Matlab code is a five layer network as shown in figure 20. It has two inputs (irradiance and temperature), one output and seven membership functions for each input. Fourty Nine fuzzy rules are derived from fourteen input membership functions. These rules are derived according to the input and output mapping, so as to construct maximum output power for each value of input temperature and irradiance level. Figure 22 shows output of fuzzy rule for a specific value of operating temperature and irradiance level. it is shown that the MPP voltage (@ e ) vary with the changes of PV cell temperature and solar irradiance.
According to the geographical and meteorological position, an irradiance of 735w / m² and a panel surface temperature of 40°C are required to have an output voltage of 18.2V which corresponds to the manufacturer's @ e , we must, depending on our geographical and meteorological position, have an irradiance of 735w / m² and a panel surface temperature of 40°C. Figure 21 depicts the typical behavior of the ANFIS structure. It is three-dimensional plot between temperature, irradiance and maximum voltage. It is shown that with an increase in the irradiance level and a moderate temperature, the maximum available power of the PV module increases [19].   In the following section, the results presented show that the proposed ANFIS based MPPT is more stable and faster than the conventional MPPT algorithms.

Results and Discussion
The Simulink model of the standalone PV system is shown in figure 23. It consists of PV panel, DC-DC boost converter and load. The neuro-fuzzy MPPT control algorithm is associated to the converter to operate the generator at its maximum power point.

Stable Environmental Condition
Simulations are carried out under fixed conditions of illumination G = 1000 w / m² and temperature T = 25°C. The output characteristics of the neural controller are illustrated by figures 24, 25 and 26.   As shown in Figure 24, the output power of the PV system using ANFIS MPPT controller has a significant stability with a very low response time of around 0.01s. the important oscillations present in the transient phase disappear after 0.007s. However, there are weak oscillations that remain because this power varies between 155.3 and 156.7W. The output current is relatively low while the output voltage is very high with an average value of 37.5V. Figure 27 compares neuro-fuzzy and conventional controllers. The ANFIS controller can accurately track the maximum power point of the PV generator.
Compared to conventional MPPT, the output power generated by ANFIS is more stable in both steady-state and transient conditions and closer to MPP. It converges quickly to the new MPP. Conversely, although the P&O, InC and HC controls follow the MPP perfectly, they are slower and only arrive at the MPP after a delay. The recovery time is approximately 0.018s for these techniques. The average values of the currents and voltages supplied by these 4 controllers are almost identical, ie approximately 4.15A and 37.5V. However, it should be noted that the currents and voltages supplied by conventional controllers exhibit significant oscillations. The ANFIS controller improved the transition state by reducing steady state oscillations and speeding up the tracking process.

Variable Environmental Condition
Under rapidly change conditions, there are sharp variations in irradiance and / or temperature. However, the variation in temperature has little influence on the output power compared to the variation in sunlight. simulations are realised with a constant temperature equal to 25°C for a solar irradiation which suddenly deviates from 1000 to 700 W / m² then from 700 to 1200 W / m² and this for 1s. Figure 28 illustrates the output power of the generator in unstable conditions. In order to evaluate the robustness, the rapidity, the precision and the speed of convergence of the ANFIS technique developed as well as its capacity to follow the MPP under the conditions of abrupt variation of the environmental conditions, a comparison is made with the classical methods (figures 29, 30 and 31).   During rapid changes in climatic conditions, the output characteristics (maximum power, voltage and current) provided by the PV generator varies proportionally with irradiation as shown in Figures 29, 30 and 31. When irradiation is 1000W / m², the maximum power supplied by the GPV stabilizes around 156 W for the different MPP tracking techniques. When the sun goes from 1000 to 700W / m², this maximum power is 110 W for ANFIS, 99W for P&O, 88W for InC and finally 85W for HC. Finally, when going from 700 to 1200 W / m², Pmax becomes equal to 190W for ANFIS, 170W for P&O and InC and 178W for HC. There are significant oscillations of conventional techniques compared to ANFIS first in transient and steady state as well. The sudden variation in sunlight greatly disturbs conventional controllers. In our case, for low irradiation, the HC controller is less cost effective compared to other conventional techniques, but it becomes better when the irradiation becomes greater. These results show that MPPT controllers allow adaptation of PV generator and load to MPP with optimal transfer of PV power.

Conclusion
In this work, a neurofuzzy controller is used to modelise the MPPT command for a PV generator in disturbed conditions. In order to achieve the goals, PV system elements have been modeled in Matlab / Simulink. A review on MPPT commands was developed and allowed to highlight the difficulties of classical MPPT commands in the MPP research and to give particular interest of using ANFIS as MPPT controller in PV system. From the experimental tests carried out on site, ANFIS controller has been developed and modeled using the temperature and solar irradiance as input variables and voltage as the output variable. The developed ANFIS model has been trained, tested and validated in Simulink/Matlab, then has been inserted into the system to regulate the DC-DC boost converter. Simulation of the behavior of the PV system under stable and disturbed environmental conditions has been carried out to analyze the characteristics obtained at the output of the panel. A comparative study between the ANFIS controller and conventional MPPT controllers reveals robustness, high stability and very low response time compared to conventional methods. The efficiency of the ANFIS MPPT controller is about 98%.