Maximum Power Point Tracking Using ANFIS for a Reconfigurable PV-Based Battery Charger Under Non-Uniform Operating Conditions

This paper investigates an adaptive neuro-fuzzy inference system (ANFIS)-based maximum power point tracking (MPPT) technique applied to a reconfigurable photovoltaic (PV)-based battery charger. The proposed method uses training data collected from a dynamic model of the PV module to train the ANFIS to locate the maximum power point (MPP) under different environmental conditions. Based on the estimated MPP, the proposed method can select the optimal configuration of a PV array and the corresponding global MPP under the non-uniform distribution of the temperature and irradiance. In this way, the proposed method can guarantee the highest possible power harvesting to charge a lithium-ion battery under either partial shading conditions or characteristics mismatch, achieving a high system efficiency. The proposed method is compared with the conventional MPPT scheme to verify its feasibility and effectiveness. The verification results show that the proposed method provides higher accuracy, faster response and better tracking efficiency.


I. INTRODUCTION
Photovoltaic (PV) systems have become an essential power source for many applications in recent decades [1]. They are the best solutions in many small electrical energy demand applications in remote areas that are difficult to be supplied from the utility grid or small generators such as solar vehicles, water pumping, street lighting, and communication systems [2]. On the other hand, due to the equipment required, the electricity from the photovoltaic system is more expensive compared to electricity from the utility grid [3].
For that reason, it is necessary to carefully study the efficiency of the entire parts to design an efficient photovoltaic system to cover the load demands at a lower cost. Improving the efficiency of the PV panels and the power converter depends on the technology available; it may require better components, which can increase the installation cost [3]. Instead, improving the maximum power point tracking (MPPT) technique with a new control method is easy, not The associate editor coordinating the review of this manuscript and approving it for publication was Giambattista Gruosso . expensive, and can be done even in systems that are already in use by updating their control methods, which would lead to an immediate increase in PV power generation and consequently a reduction in its price [4].
Several MPPT techniques have been proposed in the literature. These techniques utilize different search strategies to be suitable for a wide variety of PV system applications. The main directions of these MPPT methods can be classified under three categories; hill-climbing, computational, and artificial intelligence methods [5].
Both the perturb and observe (P&O) and the incremental conductance techniques [6]- [9] depend on the hill-climbing principle, which looking for the direction in which power increases and forces the operating point of the PV panel to continuously follow that direction. These techniques cause continuous oscillation around the maximum power point (MPP), resulting in a loss of PV power, especially under slow variations in the environmental conditions [10]. Consequently, computational methods such as the fractional open-circuit voltage and the temperature measurement-based techniques are proposed [11], [12]. In these techniques, VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ the MPP parameters (e.g., voltage, current, and power) are obtained based on constant relations between measured and known variables of the PV panel output. Because of the non-linear behavior of the PV panel, these methods suffer from low accuracy and cannot ensure sufficient tracking for the MPP under partial shading conditions [13]. Alternatively, artificial intelligence (AI) methods, such as fuzzy logic control (FLC) and adaptive neuro-fuzzy inference system (ANFIS) based techniques, are presented in [14]- [16] to overcome these issues. The AI-based methods are used to map highly non-linear relationships between inputs and outputs of the system, and it can transform heuristic and linguistic terms into numerical values using fuzzy logic [17]. In [18], a single input fuzzy logic controller (SIFLC) is proposed based on the constant voltage algorithm. The reference voltage is calculated using a curve fitting-based approach that provides the voltage at the MPP for any power value at a given temperature, achieving higher efficiency than the conventional P&O technique. However, FLC is heavily dependent on prior experience of the system behavior to obtain correct fuzzy rules and membership functions. These issues have been overcome by a hybrid FLC and particle swarm optimizer (PSO)-based MPPT technique proposed in [19] for a grid-tied PV system, where the duty cycle of a zeta buck-boost converter is controlled under fluctuating irradiance levels. This method eliminated the steadystate error and oscillations around the MPP with reduced switching losses. Other authors have applied the ANFIS for MPPT of PV systems in recent years, as it integrates fuzzy logic and neural networks, providing a powerful artificial intelligence technique. In [14] and [20], an ANFIS-based MPP estimator is proposed to determine the optimal operating voltage. Then, a closed-loop PI regulator is employed to adjust the duty cycle of the converter switch. Although these methods improved the dynamic-and steady-state performances, they did not consider the presence of shading.
Authors of [21] presented an ANFIS-based controller combined with a PSO as a training unit to guarantee MPPT of a set of two PV modules connected to an interleaved soft switched boost converter. Although this controller can detect the global MPP under partial shading conditions, training the ANFIS controller by the PSO complicates the system implementation and causes slower dynamic response [22]. Alternatively, an artificial bee colony (ABC) method was employed in [23] to optimally adjust the ANFIS membership functions, which demands fewer control parameters than the PSO-based methods [24], simplifying the implementation. Also, it guaranteed fast convergence and robustness against operating conditions variations. Aiming for further reduction of the complexity, the flower pollination algorithm (FPA) has been proposed in [25] for MPPT application. Also, this algorithm has been implemented with an ANFIS for MPPT of a PV pumping system [26]. To avoid the procedural complexity of the hybridized ANFIS-based techniques, [27] has proposed utilizing the salp swarm algorithm (SSA) to enhance the PV system efficiency by using the duty cycle boundary concept that directly searches for the global MPP. Despite the high MPP-tracking efficiency and fast dynamic response achieved by the prescribed methods, the benefits that can be achieved by reconfiguring the PV system with the varying and non-uniform weather conditions are not considered.
The main objective of this paper is to design an ANFIS-based MPPT control method to ensure the maximum power harvesting for a PV-battery charging system based on two main aspects: 1) Selection of the best configuration that provides the highest output power from the PV panels included in the system under non-uniform operating conditions (i.e., irradiance and temperature); 2) Detection of the global MPP of the interconnected PV modules and force the system to work at that operating point according to the battery output voltage. Therefore, the proposed scheme can provide higher accuracy, faster response, and better tracking and operating efficiency compared with the conventional MPPT methods. The rest of this paper is organized as follows: Section II introduces the mathematical model of the PV module and the lithium-ion battery. Section III explains the operation principle of the proposed MPPT system under non-uniform operating conditions. In Section IV, the feasibility and effectiveness of the proposed ANFIS-based MPPT techniques are verified by comparative evaluation with the P&O MPPT scheme. Finally, the conclusion is drawn in Section VI.

II. MODELLING OF THE PV-BATTERY SYSTEM
The PV-battery system studied in this work includes a lithium-ion battery fed from a boost converter supplied by a PV generator. Thus, in this Section, a mathematical model for each component will be presented.

A. PV GENERATOR MODEL
The single-diode model and the double-diode model are the most widely used models for the PV cell in the literature [28]. The precision of the single-diode model (shown in Fig. 1) is considered sufficient for modeling interconnected PV modules in the literature to test maximum power point tracking techniques or predicting the effect of the partial shading on different modules because of its simplicity and the smaller number of parameters that need to be determined to build the model of the PV module. The behavior of the PV module can 114458 VOLUME 9, 2021 be described as follows: where I pv is the PV module current, I ph is the photo-generated current, I o is the reverse saturation current, V pv is the PV module voltage, n is the ideality factor, which varies from 1 to 2 depending on the fabrication process and semiconductor material, k is the Boltzmann's constant (1.38 × 10 −23 J/K), T is the cell temperature in Kelvin, q is the charge of an electron (1.6 × 10 −19 column) and N s is the number of PV cells connected in series. The five unknown parameters I o , I ph , n, R s , and R p can be determined using the electrical information of the PV module, which is provided by the manufacturer, as introduced by many authors, e.g. [29] and [30]. Typically, this electrical information is provided at standard test conditions (STC) of solar irradiation (G stc ) of 1000 W/m 2 and cell temperature (T stc ) of 298 Kelvin.
According to the short circuit and open circuit conditions, (1) can be expressed as: At the maximum power operating condition under STC, the output voltage and current (V pv , I pv ) in (1) can be replaced by the maximum power point voltage and current (V mpp , I mpp ) to obtain the following expression: Furthermore, the derivative of the output power (P pv = V pv × I pv ) with respect to voltage at the maximum power operating condition is equal to zero and it can be expressed as follows: At the short circuit condition, the derivative of the PV current with respect to voltage can be determined by the parallel resistance as follows [31]:  It is possible now to evaluate all the five parameters at STC by solving the five equations (2), (3), (4), (5), and (6) using the non-linear equation solver (fsolve) in Matlab [30]. For the purpose of this work, Siemens's SM55 PV module, which contains 36 mono-crystalline cells, was selected with the electrical parameter given in Table 1. Using this electrical information, the five parameters of the PV model were calculated at STC as shown in Table 2.
The effect of the unavoidable changes in cell temperature and irradiance must be taken into consideration. The photo-generated current is directly proportional to the solar irradiance level and the diode reverse saturation current is directly proportional to the cubic of the cell temperature, which can be expressed as [31]: where k i is the temperature coefficient of I sc , and E g is the band gap energy of semiconductor material, which exhibits negligible temperature dependence and represented by 1.121 eV for mono-crystalline silicon cells. The parallel resistance is approximately inversely proportional to the solar irradiance as presented in [32]. Therefore, it can be given by: The diode ideality factor and the series resistance are assumed to be independent of the cell temperature and solar irradiance in this work. Fig. 2 shows the I-V and P-V characteristics of the PV module under different conditions.

B. LITHIUM-ION BATTERY MODEL
Two methods can be used to model the battery behavior, namely, physics-and electrical-circuit-based models. Physics-based models suffer from high complexity VOLUME 9, 2021  and require extensive computational efforts to solve the time-varying partial differential equations and cannot directly be connected to the rest of the system. On the other hand, the electrical-circuit model (ECM) is much simpler and easier to be combined with other system components [33]. Therefore, the ECM is adopted in this work to model the battery cells. As shown in Fig. 3, it includes three items: 1) the open-circuit voltage (OCV); 2) the internal resistance (R 0 ); and 3) the diffusion voltages represented by parallel resistor-capacitor (R 1 and C 1 ) sub-circuit. For model-fidelity enhancement, these items are often expressed as functions of the cell's state of charge (SoC) and the internal temperature. However, for the sake of simplicity, only the SoC will be considered in this work. Thus, the discrete-time model of the terminal voltage is written as [34]: and where T s is the sampling period. Matlab/Simulink can be used to estimate the parameters of the Li-ion battery cell (27.625 Ah capacity) [35].  Experimental data of the input current and output voltage are defined in the parameter-estimation tool in Matlab. An initial guess is first given for each parameter, which is then modified by the estimation tool, resulting in the final parameters presented in Table 3. Fig. 4 shows the output voltage before and after the parameter estimation process. It can be noticed that the output voltage of the model after estimation coincides with the experimental waveform, confirming the estimation accuracy.

C. DC-DC CONVERTER
The DC-DC converter is used for matching between the load voltage (V pv ) seen by the PV panel and the maximum power point voltages (V mpp ) at any environmental conditions by controlling the converter's duty cycle (D). The boost converter is used in this work because it is more sensitive to changes of D than the buck and buck-boost converters [36]. The equivalent circuit of the boost converter is  shown in Fig. 5, and the relation between the output and input voltages is as follows [5]: where D must be in the range of 0 ≤ D < 1.

III. PROPOSED ANFIS-BASED MPPT METHOD
Non-uniform operating conditions or modules mismatch have a significant impact on the performance of a PV array [13]. Considering a PV array consists of N number of modules connected in series or parallel, even if one module receives different irradiance, for example, due to shades, the output power of the whole array significantly decreases. This power loss and its issues are typically reduced using bypass and blocking diodes in the cases of the series and parallel connected modules, respectively [37]. Under such a condition, the modules need to be rearranged first to maximize the output extracted from this array. Then, the MPPT is employed to detect the global MPP. Fig. 6 shows the control diagram of the proposed method. The proposed method utilizes an ANFIS-based controller to determine the MPP voltage for each module. Then, based on these voltages, it estimates the MPP current of the PV modules using (1). After that, the maximum power is calculated for each possible system configuration depending on the estimated values and the operating conditions to choose the optimal arrangement ( ) and detect the optimal operating voltage (V opt ). The optimal voltage is then used as the reference signal for the DC-DC converter controller to decide the duty cycle of the switching device according to the battery output voltage.

B. MPP VOLTAGE AND CURRENT ESTIMATION USING ANFIS
The ANFIS function (Genfis1) in Matlab toolbox is used to generate a Sugeno-type fuzzy inference system that initializes the membership function parameters [38]. The ANFIS function uses actual data of G, T , and V mpp to learn the ANFIS model by adapting the membership functions parameters and the output parameters of Sugeno output equations by applying a hybrid learning rule algorithm [14]. A set of 143 training data is obtained using the dynamic model of the PV module discussed in Section II-A. Also, this data is used as test data to indicate the individual error between the learning data and the predicted data. During the training process of the ANFIS model, the membership functions parameters are modified till the root mean square error (RMSE) is reduced to a minimum value according to the selected number of epochs. Fig. 7 shows 4 × 1 Gaussian MFs as an example of input data fuzzification before and after these MFs are adapted by the ANFIS function. For different groups of input-Gaussian MFs, Fig. 8 shows how the RMSE between the actual V mpp and the predicted outputs is improved after 150 epochs for the predetermined learning data. When the input G is fuzzified in more than two MFs, the RMSE decreases rapidly after a few numbers of epochs, as shown in Fig. 8. In addition, the RMSE is improved due to increasing the number of MFs that increase the number of VOLUME 9, 2021 FIGURE 9. %Error between the testing data and the predicted outputs of ANFIS. rules as it equals the number of MFs of input G times MFs of input T . However, minimizing the number of rules is very important to avoid complexity in system design.
The predicted outputs of the different ANFIS models have been compared with the actual data, as seen in Fig. 9. The percentage errors between the actual and the predicted output from the ANFIS models with 4 × 1 MFs and 2 × 2 MFs are less than 0.5%. These small errors confirm a high precision in the predicted V mpp . Also, with the lowest number of MFs in the 2 × 1 model (minimum number of rules), the percentage error between the actual data and ANFIS output is near 1% for many data sets. The error in these points is reduced when the input G and T data is fuzzified into three MFs (3 × 3 ANFIS model). This model attains error less than 0.1%. However, 3 × 3 model increases the number of rules to 9, increasing the system complexity.
Once the MPP voltage is obtained for each module installed in the PV system, the MPP currents can be easily determined using (1). These estimated voltages and currents are then used to select the optimal configuration and obtain the optimal operating voltage, as will be described in the following subsections.

C. OPTIMAL CONFIGURATION SELECTION (OCS)
For series-connected PV panels working under different operating conditions, bypass diodes are vital to bypass those that fail to supply the demanded current to the load. Similarly, for parallel-connected PV modules, blocking diodes are needed to block the current flow through the modules that fail to generate the demanded voltage of the load.
The maximum power of any system configuration (i.e., series, parallel, or series-parallel) can be calculated using the MPP's voltage and current of each module. As an illustration, a PV array that consists of four modules (M1, M2, M3, and M4) is studied. These modules operate under different operating conditions, giving the I-V curves shown in Fig. 10. Let us first consider that they are connected in series. If the system works with the current of M4 (i.e., I m4 ), the other modules will be bypassed, and the output power will be (V m4 I m4 ), neglecting the forward voltage of the diodes. On the other hand, if the system draws the current of M3 (i.e., I m3 ), only M1 will be bypassed, and the output power will be (I m3 × [V m4 + V m3 + V m2 ]). Thus, to get the maximum output power for the series connection of N number of PV modules, the currents will be arranged in descending order in an array (X = [x 1 , x 2 , x 3 , x 4 , . . . , x N ]) and the corresponding voltages in another Y = [y 1 , y 2 , y 3 , y 4 , . . . , y N ]. After that, the voltage and power will be calculated N times using: Based on the maximum calculated power, the optimal voltage of the series configuration can be determined. Now, let us consider that the modules are connected in parallel. If the system works with the voltage of M1 (i.e., V m1 ), the other modules will be blocked, and the output power will be (V m1 I m1 ). On the other hand, if the system operates at the voltage of M2 (i.e., V m2 ), only M3 will be blocked, and the output power will be (V m2 × [I m4 + I m2 + I m1 ]). Therefore, for parallel connection, the voltages will be arranged in descending order in array Y and the corresponding currents in X . Then, the voltage and power are calculated as follows: As for the series-parallel connection, the determination of the maximum output power is divided into two steps. First, each group of series-connected modules is arranged separately, and V n is determined using (13). Then, all the new voltages are arranged again in a new array (Z = [z 1 , z 2 , z 3 , z 4 , . . . , z N ]) in descending order, and the corresponding currents are stored in an array (W = [w 1 , w 2 , w 3 , w 4 , . . . , w N ]). Finally, the power and voltage are determined as: The maximum power obtained for each configuration using (13), (14), and (15) are used to decide the optimal arrangement for the PV modules. Also, according to the selected configuration, the optimal operating voltage can be detected, which is used to determine the duty cycle of the converter's switching device, as will be discussed later. Since this proposed algorithm is used to select the optimal configuration, the high accuracy of the calculated MPP is not necessary. Thus, the assumptions discussed here are feasible, as will be verified in Section IV.

D. CONVERTER CONTROLLER
The duty ratio of the converter switch can be obtained using the load voltage (V load ) and the optimal voltage (V opt ) corresponding to selected optimal configuration determined in the previous section. In the proposed method, the battery voltage is measured using a voltage sensor and the duty ratio of the DC-DC boost converter, adopted in this work, can be controlled via a PI regulator or directly calculated using (12) as follows: The proposed MPPT control algorithm is summarized in the flowchart shown in Fig. 11.

IV. VERIFICATION AND DISCUSSION
In this work, simulations are carried out in Matlab/Simulink to verify the feasibility and effectiveness of the proposed MPPT approach. The ANFIS is validated by comparing its MPP-voltage predictions with those obtained by the dynamic PV model. Then, the OCS strategy is verified using an array of four PV modules under different and fluctuating irradiance and temperature. Finally, the proposed MPPT algorithm is comparatively evaluated with the P&O method.

A. ANFIS-MODEL VERIFICATION
The accuracy of the MPP voltage prediction using the ANFIS model is tested under different operating conditions (i.e., irradiance and temperature) shown in Fig. 12(a). The irradiance level varies between 0.4 kW/m 2 and 1 kW/m 2 , while the temperature changes between 25 • C and 50 • C. As shown in Fig. 12(b), the output voltage of the ANFIS model coincides with that of the dynamic model of the PV module, confirming that the ANFIS model provide high accuracy for MPP estimation.

B. VERIFICATION OF THE OPTIMAL CONFIGURATION SELECTION
To verify the optimal configuration selector (OCS), a set of four PV modules working under different operating conditions are used. Five arrangements (A, B, C, D, and E) are considered for the PV array, as illustrated by Fig. 13. For the series-connected modules, one bypass diode is installed for each module (presented in red in Fig. 13), while a blocking diode (blue) is used with each branch in the paralleled groups. Two different cases are tested as follows:  Table 4 gives the obtained results for both cases, using the algorithm in Fig. 11, including the maximum power and the optimal voltage for each system configuration (i.e., A, B, C, D, and E). Base on the determined maximum power, the optimal configuration can be decided. The obtained results are compared with the actual global MPP and its corresponding voltage to validate the optimal configuration selection algorithm. Fig. 14 gives the P-V characteristics of the PV array for each case, showing the global MPP with different system configurations. When these characteristics are compared with the results in Table 4, it can be seen that the proposed OCS can effectively detect the Global MPP and the optimal voltage that match those determined using the PV array model.

C. COMPARATIVE EVALUATION
The proposed MPPT method is compared with the P&O approach to verify its feasibility and effectiveness. The adopted PV battery system includes ten series-connected lithium-ion battery cells fed from four PV panels (M1, M2, M3, and M4) through a boost converter. The initial configuration of the PV array is assumed as (E) (see Fig. 13), and the initial SoC of the battery is set to 10%. The implementation of the system in Matlab/ Simulink is shown in Fig. 15. The two MPPT techniques are compared under three different operating conditions (i.e., Case (I), Case (II), and Case (III)). Fig. 16(a) illustrates the operating irradiance and temperature for the four PV modules under test. The resulting PV waveforms of voltage (V pv ), power (P pv ), system configuration, and converter's duty cycle (D), and battery SoC using both MPPT techniques are compared in Fig. 16(b). In Fig. 16(b), it can be noticed that the proposed MPPT method allows the PV system to harvest higher power than the P&O technique. The proposed method increased the output power of the system by 22%, 21%, and 19% compared with the P&O in Case (I), (II), and (III), respectively. The impact of this increased power can be observed in the battery SoC that rises faster with the proposed scheme. These are because the OCS adopted in the proposed MPPT scheme can change the initial configuration of the PV system (E) to the optimal arrangements, i.e., (D) in Case (I), and (C) in Case (II) and (III), as shown in Fig. 16(b). Additionally, the proposed MPPT can reach the MPP faster than the P&O algorithm because the former adopts computational means to find the global MPP depending on the ANFIS model with   high accuracy. Although the step size of the P&O can be increased to improve the MPP tracking dynamics, steadystate oscillations around the MPP will result, reducing the tracking efficiency.   17 gives a closer observation of the MPP tracking locus to illustrate another reason for the higher power harvesting of the proposed MPPT controller compared with the P&O. As shown in Fig. 17(a), the P&O technique failed to detect the global MPP in the Case (II). Instead, it makes the system stuck at the local MPP because its corresponding voltage is closer to that of the operating point in Case (I). This issue called ''MPPT failure'' has been discussed in detail in [39].
On the other hand, the proposed algorithm can easily detect the global MPP and avoid the MPPT failure issue. As shown in Fig. 17(b), although the voltage corresponding to the local MPP in Case (II) is closer to the previous operating point in Case (I), the proposed method effectively forces the system to work at the global MPP. This is because the proposed algorithm employs the OCS that accurately computes the optimal operating voltage according to the selected optimal configuration, as verified in the previous Subsection. The aforementioned results confirm the feasibility and effectiveness of the proposed MPPT method.

V. CONCLUSION
In this article, a maximum power point tracking technique is proposed for a reconfigurable PV battery system that works under non-uniform operating conditions using an adaptive neuro-fuzzy inference system. Detailed mathematical models are presented for the different system components, including the PV panel, converter, and battery, which are employed to verify the feasibility and effectiveness of the proposed algorithm. Unlike the traditional MPPT schemes, such as the P&O, the proposed approach exploits the high accuracy of ANFIS-based modeling to obtain the MPP voltage of each module of the PV array. Then, an OCS is adopted to decide the optimal configuration and detect the corresponding operating voltage, ensuring maximum power harvesting. According to the simulation results, the proposed method allows the system to collect higher power compared to the P&O technique by an average of 21%. Moreover, it provides faster and more accurate tracking of the Global MPP, even if a potential local MPP is close to the previous operating point. The practical implementation of the proposed method will be presented in a future work.