A Fast-Tracking Hybrid MPPT Based on Surface-Based Polynomial Fitting and P&O Methods for Solar PV under Partial Shaded Conditions

: The efﬁciency of photovoltaic (PV) systems depends directly on solar irradiation, so drastic variations in solar exposure will undoubtedly move its maximum power point (MPP). Furthermore, the presence of partial shading conditions (PSCs) generates local maximum power points (LMPPs) and one global maximum power point (GMPP) in the P-V characteristic curve. Therefore, a proper maximum power point tracking (MPPT) technique is crucial to increase PV system efﬁciency. There are classical, intelligent, optimal, and hybrid MPPT techniques; this paper presents a novel hybrid MPPT technique that combines Surface-Based Polynomial Fitting (SPF) and Perturbation and Ob-servation (P&O) for solar PV generation under PSCs. The development of the experimental PV system has two stages: (i) Modeling the PV array with the DC-DC boost converter using a real-time and high-speed simulator (PLECS RT Box), (ii) and implementing the proposed GMPPT algorithm with the double-loop controller of the DC-DC boost converter in a commercial low-priced digital signal controller (DSC). According to the simulation and the experimental results, the suggested hybrid algorithm is effective at tracking the GMPP under both uniform and nonuniform irradiance conditions in six scenarios: (i) system start-up, (ii) uniform irradiance variations, (iii) sharp change of the (PSCs), (iv) multiple peaks in the P-V characteristic, (v) dark cloud passing, and (vi) light cloud passing. Finally, the experimental results—through the standard errors and the mean power tracked and tracking factor scores—proved that the proposed hybrid SPF-P&O MPPT technique reaches the convergence to GMPP faster than benchmark approaches when dealing with PSCs.


Introduction
Global energy demand has increased substantially in recent decades, and along with a greater need for electric power comes the expansion of alternative energy solutions that promote environmental protection and sustainability. For example, the solar energy industry has rapidly grown resulting in decreased manufacturing costs and the proliferation of affordable photovoltaic (PV) systems [1]. However, PV systems face significant challenges, mainly the irregular solar irradiation due to partial shading that affects their efficiency.
PV systems are prone to fluctuations in their efficiency related to the operating environment, so they need to work at their maximum power point (MPP) all the time regardless This paper introduces the SPF-P&O GMPPT hybrid approach that exploit simultaneously the benefit of the classical P&O approach and a more data-driven curve-fitting method, as its name implies. This synergistic and complementary strategy improves the P&O algorithm efficiency using a polynomial approximation for global data fitting; the algorithm outputs the polynomial coefficients that best fit the PV panel characteristic curves. Specifically, the proposed approach is a curve-based type, which is considered to be data-driven since its parameters are optimized over the structure of the data. Following from this premise, curve-based fitting approaches have been successfully applied in different application, such as: variation of cosmic ray intensity with atmospheric pressure using a straight line fitting, calibration of a prism spectrometer using a polynomial curve, variation of viscosity of water with temperature using polynomial with equally spaced observations, variation of vapour pressure of ethyl alcohol with temperature using a generalized linear function, and the counting rate of a type I counter using non-linear functions, among others [16]. Finally, as for the MPPT stage, the resulting coefficients are used as the basis aimed at achieving a more accurate estimation and simplifying digital implementations into low-cost digital signal controllers.
The experimental results that validate the GMPPT algorithm come from a simulation in six testing scenarios and different transients from the 133 different cases available in the P-V characteristic data (shown in Figure 1). The analyzed case studies are: (i) system startup, (ii) uniform irradiance variations, (iii) sharp change of the (PSCs), (iv) multiple peaks in the P-V characteristic, (v) dark cloud passing, and (vi) light cloud passing. The results for the six scenarios are evaluated using the standard errors and the mean power tracked and tracking factor scores. The main contributions of this paper are as follows:

1.
A hybrid SPF-P&O GMPPT algorithm is proposed to determine the GMPP of the PV system. This method can operate under uniform or nonuniform irradiance conditions. 2.
The proposed SPF-P&O MPPT method is compared with the GMPPT P&O [13], obtaining results that prove a fast convergence and minimum steady-state oscillations for the PV system under 133 different cases of shading patterns.

3.
For the validation of the proposed GMPPT algorithm, six scenarios with different transient of shading patterns are presented: (i) system start-up, (ii) uniform irradiance variations, (iii) sharp change of the (PSCs), (iv) multiple peaks in the P-V characteristic, (v) dark cloud passing, and vi) light cloud passing.

4.
A two-stage strategy for the experimental PV system is proposed: (i) Modeling the PV array with the DC-DC boost converter using a real-time and high-speed simulator (PLECS RT Box), (ii) Implementing the proposed GMPPT algorithm and the doubleloop controller of the DC-DC boost converter in a commercial low-priced digital signal controller (DSC).

5.
The simulated and hardware-in-the-loop results of the six scenarios are evaluated using the standard errors, and the mean power tracked and tracking factor scores. 6.
A nested control loop design is proposed to regulate-along with the SPF-P&O MPPT algorithm-the output voltage of the PV system under challenging environmental conditions. The double-loop control scheme consists of a current (inner-loop) controller and a voltage (outer loop) controller. Low steady-state error under demanding tests including irradiance variations, dynamic partial shading changes and system start-up, and the fast-tracking of control set points, are ensured by each proposed controller. In addition, the implementation of these loops guarantees an independent and fast dynamic response from the system.
The rest of this paper is structured as follows. First, Section 2 shows the PV system and its controllers. Then, the proposed SPF-P&O GMPPT algorithm is explained in Section 3. Next, the numerical simulations and Real-Time HIL Results are detailed in Section 4. Lastly, conclusions and future work are presented in Section 5.

PV Modeling
Through a setup of four PV modules, with its respective parallel bypass diodes and all connected in series, the essence of PV string characteristics is studied as shown in Figure 1. This PV string employs a DC-DC boost switching converter to charge a battery while a nested control loop tracks the MPP of the PV system. Figure 1 depicts the MPPT algorithm and the double-loop controls. Using PLECS, the PV units are modeled as an array of four series-connected KC200GT solar modules whose electrical characteristics are presented in Table 1. Likewise, Figure 1 details the nonlinear P-V characteristic for 133 different cases of shading patterns. There are 24 possible permutations for each of the 133 cases, totaling 3192 possible PSCs. Thus, the PV system can be studied under uniform irradiance levels (cases 1 to 10) with a unique peak in the P-V characteristic corresponding to the GMPP. On the other hand, different combinations of PSCs generate multiple peaks in the P-V characteristic, from two to three. Figure 1 shows the nonuniform irradiance levels on the PV modules that produce these PSCs. The GMPP moves with respect to the LMPPs at the multiple P-V characteristic peaks to test different situations with the MPPT algorithms.
The following are the differential equations for the boost converter [17][18][19]: where v o is the output voltage, u represents the control variable ∈ {0, 1} and i L is the inductor current. For the boost converter, the duty cycle is [17][18][19]:

Discrete-Time Sliding-Mode Current Control
Designing the inner-loop control for the DC-DC boost converter is complex due to the inherent non-linearity of the converter. Thus, a robust sliding-mode controller is used in this study. This section outlines the discrete-time sliding-mode current control (DSMCC) strategy with a fixed frequency. In order to ensure that the control surface (4) is reached in the next sampling period ( f samp = f s ), this approach computes the variable control u[n] in the n-th time sample period. This control has been implemented for switching systems in [20][21][22].
Equation (2) is used to calculate the inductor current slopes of the boost converter, presented in Table 2. Assuming the averaged model of the inductor current slope of T , the Euler approximation heads to the next discrete-time inductor current expression: being T the sampling or switching period. Consequently, the resulting duty cycle expression is: where Figure 1). Using the expressions for m 1 and −m 2 for the output current slopes from Table 2 in (6), the boost converter's control law is given by: Converter The input voltage of the boost converter v g is regulated for the external loop using a proportional-integrator controller. The forward Euler method is used to express the controller transfer function in the z domain as follows: and with C in representing the input capacitor. For the voltage loop ( f c ), the crossover frequency (CF) value should be lower than the current loop CF. Furthermore, the PI zero should be below f c (1/(2πT i ) < f c ).

Maximum Power Point Tracking (MPPT) Algorithm
The Maximum Power Point Tracking (MPPT) control keeps the power transfer at the highest efficiency, optimizing the PV system performance in any radiation and temperature conditions that the solar panels undergo. The MPPT approach allows the PV module to function at its maximum power point by controlling the switching converter [23]. This section briefly explains the "Perturb and Observe" benchmark method before introducing the offered MPPT method.

Conventional "Perturb and Observe" Method
The so-called "Perturb and Observe" (P&O) method is widely used due to its simplicity and low cost [24][25][26]. This algorithm provokes perturbations by either decreasing or increasing the reference voltage according to the output power PV module. If the current measured power P[n] is higher than its previous sampled value P[n − 1], the voltage change continues in the same direction. Otherwise, it is reversed. Next, the PV module voltage is compared to the maximum voltage, to predict the MPP. Finally, a power step of the PV module [24] is produced through a small step of reference voltage. The P&O-based MPPT is abbreviated as MPPT-P&O.

Proposed MPPT Method
This work proposes a polynomial curve-fitting approach in favor of a more accurate MPP estimation. This approach, known as Surface-based Polynomial Fitting (MPPT-SPF), works as explained below:

Curve-Based Fitting
The fundamentals of a polynomial model (y = f (x)) for any curve can be expressed in mathematical terms as follows: where x is the input times series, y{ρ N } is the output time series, n is the degree of the polynomial, such that 1 ≤ N ≤ 9, and N + 1 is the order of the polynomial. In this case, the order is the number of coefficients to be adjusted, while the degree represents the highest power of the predictor variable. Below, and based on their degree, polynomials are presented. For example, a fourdegree polynomial is given by: Polynomials are helpful when a simple empirical model is needed. Hence, a polynomial model is suitable for interpolation and extrapolation processes or characterizing data using a global fit.
Polynomial fitting is reasonably flexible when dealing with simple data structures. However, fitting can become unstable for high-degree polynomials. Moreover, although all polynomials fit correctly within a predefined data range, they diverge significantly outside of it.
Curve-fitting with high-degree polynomials can result in scale affectations because it uses predictor values as the basis for a matrix with high values. This problem can be addressed by preprocessing input data using z-score normalization, i.e., centering to zero mean and scaling to unit standard deviation [16].

Surface-Based Fitting
The output time series is represented as z = f (x, y) when the fitting f (·) involves two input time series. For MPPT purposes, the variables are defined as follows: • z: maximum power estimation for PV module current and voltage measurements (P max ), • x: current i L [n], • y: power measurement from the PV module P pv [n].
The following notation is used for polynomial surfaces: ρ ij is the fitting type, where j represents the degree of y and, on the other hand, i the degree of x. Additionally, the maximum value for i and for j [27] is 5. The maximum between i and j is the overall degree of the polynomial. The degree of x is going to be less than or equal to i in each term. Likewise, in each term, the degree of y is going to be less than or equal to j. Accordingly, a surface with i and j degrees is denoted as z{ρ ij } = f (x, y). Some examples are mentioned in Table 3. Table 3. Examples of polynomial models for surfaces.

Polynomial Models Equations
z[ρ 13 ] = C 00 + C 10 x + C 01 y + C 11 xy + C 02 y 2 + C 12 xy 2 + C 03 y 3 ρ 55 z[ρ 55 ] = C 00 + C 10 x + C 01 y + ... + C 14 xy 4 + C 05 y 5 Table 4 shows the degrees that make up the model terms. For example, for an x degree of 1 and a y degree of 3, the name of the model will be ρ 13 . The mathematical foundation of the numerical curve-fitting methods is further detailed in [16]. x xy xy 2 xy 3 xy 4 2 x A function is obtained from the ρ ij approach that precisely fits the behavior and general trend of the analyzed data. Next, the most accurate fitting is found, considering both the criteria to quantify the adjusting procedure suitability and the polynomial to be tuned to represent the input data. The relationship between the obtained polynomial degree, the curve adjustment, and the values to interpolate is obtained from this adjustment. Finally, a five-degree polynomial is generated from a given data sequence in the form (x[n], y[n]), as shown below: The afore-developed analysis allows assessing how well the curve fits the data. Goodness-of-fit is measured by determining the accuracy of the coefficients based on the 95% confidence limits. The polynomial coefficients determined from the robust fitting of the data are:  3.158e − 07), C 32 = −5.768e − 08(−5.93e − 08, −5.607e − 08), C 23 = 5.3e − 09(5.014e − 09, 5.586e − 09), and C 14 = −2.523e − 10(−2.799e − 10, −2.248e − 10). generating the following polynomial: As a result, the obtained fitting reaches a remarkable 0.9507 R-square, indicating a significant data trend and a good model fitting. Moreover, a 38.74 root mean square error (RMSE) and a 9.477e + 07 sum of square error (SSE) estimation are reached. Figure 2 depicts the previous adjustment as a MPP surface in terms of P pv and v g . Validation and implementation of the MPPT-SPF aim to maximize the available energy of the connected solar modules at any given moment during operation. Hence, MPPT continually samples the output of the PV cells and adjusts the voltage and current so that the PV system generates maximum power regardless of environmental conditions. Additionally, by following the approach described in [28], uncertainty values for all the coefficients can be calculated. To do so, consider the vector C holding the estimates of the coefficients given by: where Φ = [1 m , x, y, x 2 , xy, y 2 , x 3 , x 2 y, xy 2 , y 3 , x 4 , x 3 y, x 2 y 2 , xy 3 , y 4 , x 5 x 4 y, x 3 y 2 , x 2 y 3 , xy 4 ], (16) and with m denoting the number of samples, varepsilon i being the error of approximation and i ∈ {1, . . . , m}. Then, the uncertainty u(C j ) for the coefficient j can be estimated as: where θ jj is the entry jj of matrix Θ and j ∈ {1, . . . , 20}. In this case, all the uncertainty values are admissible as can be noted in the following:

SPF-P&O Algorithm
The SPF-P&O GMPPT algorithm is detailed in Algorithm 1, which works as follows: Its objective is to obtain the input voltage reference (v gre f ) for the boost converter from the measurement of the output voltage and output current of the PV module array. In this way, the maximum power characteristic (P max ) associated with the measured of current and voltage is obtaining from the expression (14). Once P max is estimated, the voltage reference for the P&O is selected by searching from a register of possible solutions for power point maximum power (P mpp ).
When power changes, greater than or equal to reference ∆P pv [%] occur, the MPPT-SPF algorithm is executed, so: where P pvnew is the actual power measurement and P pvlast is the previous power measurement.
The GMPP search will again execute if the condition (20) is satisfied. This condition ensures that the expression (14) is evaluated to detect the optimal voltage solution for the GMPP even if there is any change in solar irradiance. Algorithm 1: SPF-P&O GMPPT algorithm running at the microcontroller (see Figure 1).
if Inequation (20) = true then Calculate P max for the solution v gre f by Equation (14) g op = ∞ while s <number of solutions do g(s) = abs(P mpp (s) − P max ); if (g(s) < g op ) then g op = g(s); s op = s;

Simulation and Real-Time HIL Results
In this section, the SPF-P&O MPPT algorithm is validated using a DC-DC boost converter through hardware in the loop (HIL). PLECS RT Box 1 implements the stage power converter and the PV array, and 6.6 µs is the sampled time to model the converter. And the values of the boost converter components are: C in = 200 µF, L = 1 mH, V o = 160 V and f s = 25 kHz. Through the TI 28069M LaunchPad, which is a low-cost Texas Instrument microcontroller, different controls that integrate the PV global system control scheme are implemented as presented Figure 1.  The proposed SPF-P&O MPPT method is compared with a GMPPT P&O algorithm studied in [13], which realizes a voltage swept in partial shading conditions across the entire voltage range (from 0 to the open voltage value) for the PV system. The voltage reference that produces the maximum power is used to initialize after the voltage swept the P&O algorithm. Figure 4 illustrates the transient responses for the inductor current of the boost converter in reaction to variations of the current reference. Where v g , v o and i L are the signals sampled for the control, and 500 µs is the sampling time. The current reference is changed from 4 A to 8 A and back to 4 A, as can be observed in Figure 4a,b. to ensure a boost operation, the output voltage is V o = 160 V and the input voltage is set in 100 V. Smooth transitions during reference changes are found, settling times near 250 µs and no overshoot. As shown, the inductor current is well regulated. The inductor currents followed the change in the current reference perfectly. During the current step reference change, the current control performance is validated.

Double-Loop Results
To demonstrate the effectiveness of the external loop control, voltage reference variations from 100 V to 110 V with a step between variations of 5 V for external loop validation, are presented in Figure 4c. The crossover frequency (CF) corresponds to f c = 500 Hz, allowing the proportional gain calculation according to (9). Since the location of the PI zero in Equation (10) is lower than f c (1/(2πT i ) < f c ), T i = 3.18e−3 s was chosen.

GMPPT P&O and Proposed SPF-P&O Method Comparison
The proposed method is compared with the GMPPT P&O studied in [13], every 100 ms the GMPPT algorithms are executed to provide a new voltage reference for the voltage loop control, as shown in Figure 1 for the GMPPT algorithm block. For the SPF-P&O, ∆P pv [%] from expression (20) is set to 8%. The inner current loop is updating at 25 kHz, the outer voltage loop is calculating at 2.5 kHz, and the MPPT strategy is computing at 10 Hz, these strategies are implemented in the DSC.
These scale time differences between the systems are challenging but at the same time advantageous to implement an MPPT based on a finite-state machine.
For the validation of the proposed algorithm, six scenarios with different transient of the cases presented in Figure 1 are described below.

Scenario 1: System Start-Up
This scenario presents the start-up with the panels' irradiance levels corresponding to case 56 of Figure 1. Figure 5 shows, corresponding to the maximum power, the transient behavior from zero current until an equilibrium point, where three modules have an irradiance of 1000 W/m 2 and a module of 400 W/m 2 .
In Figure 5, both GMPPT algorithms reach the steady-state close to 1.3 s, with the proposed MPPT a uniform step voltage reference to tracking the MPP (599.9 W at 79.1 V) while the system starts up.
The proposed SPF-P&O algorithm works at the optimum point, without oscillation, as is shown in the input voltage signal after it has been tracked. Due to the GMPPT P&O realized a swept of voltage, the reference voltage is increased until 120 V to find the GMPPT at 79.1 V.
In Figure 6, a quantitative analysis can be observed of the proposed GMPPT method and GMPPT P&O method, and the results can be seen in Figure 5. These results confirm a similar performance for both methods through the start-up, where the GMPPT P&O algorithm has a higher tracking factor because the mean power tracked value is closer to the global power maximum.        The proposed algorithm outputs the optimal voltage reference for the case and tracks the MPP faster while the GMPPT P&O has a slow convergence.

Experimental
The proposed model facilitates the calculation and estimation of the variable of interest with high levels of accuracy; however, its proper evaluation through the results obtained to ensure its accuracy is crucial. Certainly, this evaluation can be performed by analyzing the errors, such as the mean absolute error (MAE), the relative error (RE) and the root mean square error (RMSE) and evaluate the performance of the results obtained [29,30], whose equations can be written as follows: where P pvi represents the measured power of the PV module, P mpp is the available MPP power of the solar module, and m the total number of sampling data. Figure 8 shows the sensitivity of the MPPT algorithms through MAE, RE, and RMSE for the results shown in Figure 7.  Standard error values indicate that the performance of the proposed MPPT algorithm has higher effectiveness in tracking the maximum power point. This statistical analysis shows that the SPF-P&O method reaches the lowest value for the error compared to the GMPPT P&O algorithm. The proposed SPF-P&O algorithm has a tracking factor of 98.07%, while for the GMPPT P&O method, the tracking factor is 80.39%.

Scenario 3: Sharp Change of the PSCs
Scenario 3 presents a sharp change between case 103 and case 68, producing high PV power variations from 588 W to 355 W. Figure 9 shows simulated and HIL results of the GMPP tracking performance. The MPPT tracking efficiency for the GMPPT P&O method is 75.65%, while the 90.48% is achieved by the SPF-P&O proposed method. Figure 10 show the measure of the standard error for each GMPPT method, where the SPF-P&O GMPPT method has minimum error. As can be seen in the input voltage of the converter in Figure 9 and by the inductor current, the PV array always operates in an oscillating mode for the GMPPT P&O method.    Therefore, the proposed GMPPT method achieves a superior performance during abrupt irradiation variations than the GMPPT P&O method. Please note that during the change from case 68 to 103, the experimental result of the SPF-P&O algorithm did not estimate an optimal reference voltage. Nonetheless, when P&O operates, GMPPT is achieved, demonstrating the robustness of the SPF-P&O method.

Scenario 4: Multiple Peaks in the P-V Characteristic
Scenario 4 has the sequence of case 3 with only one peak (GMPP), case 52 with two peaks (One GMPP and one LMPP), and case 85 with three peaks (One GMPP and two LMPP) in the P-V characteristic. The results for each MPPT algorithms are shown in Figure 11.   For case 3, the irradiance is uniform with a unique MPP at 104.28 V, which is tracked faster by the proposed algorithm. When the irradiance changes in case 52, there are two peaks, the proposed algorithm misidentifies the optimum voltage but archived the maximum power.
Finally, when the irradiation is changed in case 85, there are three peaks, where the algorithm has quickly identified and tracked the second peak (55.3 V, 81.3 W) as the GMPP. The SPF-P&O presents an overall GMPPT tracking efficiency of 90.86%, while the GMPPT P&O method presents a tracking efficiency of 79.85%.
The results for the cases' sequence are evaluated through standard errors (21)- (23), and the scores of mean power tracked and tracking factor as shown in Figure 12.  From this figure it can inferred that the proposed GMPPT method has high MPP tracking capability regarding to GMPPT P&O method under multiple peaks in the P-V characteristic due to different PSCs.

Scenario 5: Dark Cloud Passing
A dark cloud passes in this scenario, obscuring each one of the PV modules. The sequence of the cases included in this scenario correspond to the cases 7, 17, 26, and 35 as presented in Figure 13.    Cases 17, 26 and 35 correspond to (PSCs), which has two peaks, and the proposed GMPPT correctly identifies the optimal voltage for the maximum power point for the transition between cases 7, 17, and 26. Nevertheless, the reference voltage value for case 35 is incorrectly identified by the SPF-P&O algorithm.
This error is because the power between the GMPP (77.1 W at 26.1 V) and the LMPP located in the second peak (72.26 W at 100 V) are similar. The proposed MPPT tracked the GMPP much faster than the GMPPT P&O algorithm. Figure 14 shows the standard error and comparison indicators for the results presented in Figure 13.
The SPF-P&O algorithm exhibits smaller error values in comparison to the GMMP P&O method. The SPF-P&O algorithm presents a tracking factor of 93.53% while the GMPPT P&O method a tracking factor of 72.29%.  In this scenario a light cloud passes, partially obscuring one by one the PV modules. The results of scenario 6 has the sequence of cases: 8, 63, 95, and 127, and the results are presented in in Figure 15. Figure 16 illustrates that the proposed method provides the lowest value error for the results seen in Figure 15.

RE
When the irradiance level is reduced by the transition of the cloud, the SPF-P&O algorithm identifies the new GMPPT power for the different cases without oscillations while the GMPPT P&O method has a big oscillation around the GMPPT, and this is reflected in the current and voltage waveforms.
The SPF-P&O algorithm presents a tracking factor of 97.1% while for the GMPPT P&O method a value of 76.27%.

Conclusions
A fast-tracking hybrid MPPT technique based on Surface-Based Polynomial Fitting and P&O has been presented for solar PV under PSCs. The SPF-P&O MPPT uses a polynomial model from the characterization of the PV module data, which is evaluated during irradiance variations. Meanwhile, the conventional P&O tracks the MPPT under uniform irradiance. The power circuit model was implemented using an RT BOX 1 tool.
A low-cost commercial DSC was used to implement the proposed MPPT algorithm and the double-loop strategies in a C programming software.
As experimentally demonstrated in this work, the introduced SPF-P&O GMPPT approach can tie together the estimation capability of the conventional P&O with a curvefitting-based approach (namely surface-based polynomial fitting). Thus, it can be said that the hybrid approach represents a synergistic and complementary strategy to leverage the effectiveness of a P&O-type method with global data fitting using a polynomial approach. Different profile tests proved that the proposed hybrid method is robust and performs a faster and more effective MPP tracking with no steady-state oscillations for partial shading conditions.
In the future, a more extensive comparison between different MPPT techniques under PSCs using a low-cost commercial microcontroller will be conducted to accomplish deeper insights about the efficiency of PV systems, furthering the growth of photovoltaics as an affordable and sustainable energy source.