Design Procedure to Convert a Maximum Power Point Tracking Algorithm into a Loop Control System

: This paper presents a novel complete design procedure to convert a maximum power point tracking (MPPT) algorithm into a control system. The MPPT algorithm can be tuned by employing any control system design. In this paper, we adopted Bode diagrams using the criteria of module and phase as the power electronics specialists are habituated with such concepts. The MPPT control transfer functions were derived using the average state equations and small-signal analysis. The control loops were derived for power and voltage control loops. The design procedure was applied to the well-known perturb and observe (P&O) and incremental conductance (IC) algorithms, returning the P&O based on PI and IC based on PI algorithms. Such algorithms were evaluated through simulation and experimental results. Additionally, we showed that the proposed design methodology can optimize energy harvesting, allowing algorithms to have outstanding tracking factors (above 99%) and adaptability characteristics.


Introduction
Presently, one focus in electricity generation is sustainability. For example, conventional primary sources such as coal and oil are limited by capacity. They also emit unsafe elements into the atmosphere during their usage, generating hazardous direct and indirect impacts on the environment and various life forms [1]. In this context, the usage of alternative and renewable energy sources is encouraged since most can be quickly restored. They are also inexhaustible on a human scale. Moreover, another advantage of renewable energy sources is their low pollutant emissions [2].
Among the vast number of alternative and renewable energy sources, solar photovoltaics (PVs) have expanded due to their enormous availability. Therefore, the cost of maintaining PV systems is reasonably low and in continuous decline. The power generated via photovoltaic energy grew approximately 100% between 2010 and 2018. This is equivalent on average, per year, in the reduction of 53 million tons of carbon dioxide. Additionally, international agencies predict that photovoltaic energy is predicted to jump from 2% of the world energy matrix in 2018 to 25% in 2050 [3].
A problem in PV usage is the reduced quantity of energy converted, i.e., the real efficiency of the photovoltaic energy conversion. Some of the best commercial solar modules have an average yield of around 17-20%, a fact that could delay this technology dissemination [4]. In a laboratory environment, it is already possible to observe yields of up to 47%, particularly in the case of multi-junction cells. However, it is not easy for such technology to reach consumers [5].
On the other hand, the amount of energy converted by the module can be optimized through a power electronics converter controlled by a maximum power point tracking algorithm -MPPT [6,7]. These converters act dynamically by varying the load impedance "seen" by the module through current, voltage, and finally duty cycle variation to promote maximum power transfer.
All aforementioned algorithms are mainly based on flowcharts with fixed or variable step sizes and varying complexity. Traditional ones are somewhat easy to implement, while others are based on their own modeling and are sometimes challenging to reproduce. In [7], the authors introduced the idea of inserting compensators into MPPTs. Among such approaches, the P&O and IC based on the PI demand distinct attention had outstanding and high-speed performance during initialization procedures [7]. However, no design procedure could project such algorithms, i.e., as control systems. Additionally, some authors [9,39] adopted PI controllers in the overall converter control system, yet these compensators focused on controlling the power converter, i.e., controlling the DC bus voltage, the output grid current, and the input voltage not inside the MPPT algorithm.
Based on these facts, this paper proposed a complete design procedure to convert a maximum power point tracking algorithm into a loop control system. In such a way, the MPPT was tuned by utilizing any control system design. In this paper, we adopted Bode diagrams using the criteria of module and phase-i.e., crossing-over frequency and phase margin-once the power electronics engineers were similar to such concepts. The design procedure was applied to the well-known P&O and IC algorithms, returning the P&O based on PI and IC based on PI algorithms. The MPPT control transfer functions were derived and the algorithms were evaluated through simulation and experimental results. It is important to highlight that the inclusion of a compensator allowed the algorithms to work as adaptive algorithms as the step sizes were variable according to error function, achieving outstanding tracking factors (TFs) in the range of 99%. The proposed design procedure and control strategy allowed us to tune an MPPT algorithm, which is based on flowcharts, as a loop control system. With this strategy, all references were generated within the MPPT, with controllers instead of flowcharts. Thus, this approach represented an interesting alternative for designers to optimize their MPPTs designing them as loop control systems.
In Section 2, we present the MPPT rules and the MPPT power and voltage transfer functions. In Section 3, we present obtained results and discuss them in relation to the literature. Finally, Section 4 concludes the work.

MPPT Rules
Obtaining the maximum power point is based on the fact that the P×V curve has a point of power derivative, in relation to voltage, which is null. Moreover, on the left and right sides of the maximum power, voltage is positive and negative, respectively. According to this knowledge, the algorithms work by varying the current, voltage, or directly the converter duty cycle. Thus, schemes are created to change such quantities with fixed or varying steps.
Instead of applying steps that follow a designed flowchart, it is possible to directly or indirectly evaluate the derivative of power, as well as to reduce it to 0. Therefore, Equation (1) presents the rule to find the MPP for the P&O based on the PI method and Equation (2) presents the rule for finding the MPP for the IC based on the PI method. In this sense, a control system is the proper choice for dealing with these methods.

Controlled MPPT Transfer Functions
Considering PV modules (or PV modules association) as a current source (I PV ) to feed a boost converter in cascaded association with a voltage source inverter and to regulate the C BUS voltage towards an average value (V BUS ) via a power control loop, it is possible to find the input to control transfer function for the DC-DC MPPT control.
To observe that the algorithms can control the MPPT in a boost converter (or other DC-DC converter), we fed a local load or DC bus of a voltage source inverter. Here, the inverter regulates the DC bus voltage through the power control loop in an almost constant value [39]. A common and reliable grid-connected approach is summarized in Figure 1. In Figure 1, Cv(s) represents the DC bus controller, where Ci(s) the current controller, PLL the phase-locked-loop algorithm, C in is the input decoupling capacitance, C BUS is the capacitance of the DC bus, and L con is the output filter. The acquired variables are V grid , I grid , I PV , V PV , and V BUS , which represent the grid voltage, grid current, PV current, PV voltage, and the voltage at the DC bus, respectively. V ref is the average DC bus value and V pu is the output of the PLL. The PV model was built according to [40], i.e., as a voltage-dependent current-source in conjunction with C in . The MPPT block controls the DC-DC converter, whereas Cv(s) and Ci(s) controls the DC-AC converter for proper power injection in the grid [39].

Controlled MPPT Transfer Functions
Considering PV modules (or PV modules association) as a current source (IPV) to feed a boost converter in cascaded association with a voltage source inverter and to regulate the CBUS voltage towards an average value (VBUS) via a power control loop, it is possible to find the input to control transfer function for the DC-DC MPPT control.
To observe that the algorithms can control the MPPT in a boost converter (or other DC-DC converter), we fed a local load or DC bus of a voltage source inverter. Here, the inverter regulates the DC bus voltage through the power control loop in an almost constant value [39]. A common and reliable grid-connected approach is summarized in Figure 1. In Figure 1, Cv(s) represents the DC bus controller, where Ci(s) the current controller, PLL the phase-locked-loop algorithm, Cin is the input decoupling capacitance, CBUS is the capacitance of the DC bus, and Lcon is the output filter. The acquired variables are Vgrid, Igrid, IPV, VPV, and VBUS, which represent the grid voltage, grid current, PV current, PV voltage, and the voltage at the DC bus, respectively. Vref is the average DC bus value and Vpu is the output of the PLL. The PV model was built according to [40], i.e., as a voltage-dependent current-source in conjunction with Cin. The MPPT block controls the DC-DC converter, whereas Cv(s) and Ci(s) controls the DC-AC converter for proper power injection in the grid [39]. If only the DC-DC boost converter is adopted, the designer should consider a resistive load (RL) to produce the desired output voltage (VBUS) at the maximum power point in order to optimize the controllers' design. In both cases, the input decoupling capacitance (Cin), placed in parallel with the PV modules, and the input inductance of the converter (Lin) are extremely important for MPPT dynamics because they guide the MPPT process. The main control purpose is to regulate the PV voltage to exactly match the voltage at the maximum power point.
The P&O based on the PI MPPT control is depicted in Figure 2. In Figure 3, the IC based on PI is presented. Both figures are shown as Simulink diagrams. These diagrams accomplished the outer power loop and the inner voltage loop for reaching the MPP. The If only the DC-DC boost converter is adopted, the designer should consider a resistive load (R L ) to produce the desired output voltage (V BUS ) at the maximum power point in order to optimize the controllers' design. In both cases, the input decoupling capacitance (C in ), placed in parallel with the PV modules, and the input inductance of the converter (L in ) are extremely important for MPPT dynamics because they guide the MPPT process. The main control purpose is to regulate the PV voltage to exactly match the voltage at the maximum power point.
The P&O based on the PI MPPT control is depicted in Figure 2. In Figure 3, the IC based on PI is presented. Both figures are shown as Simulink diagrams. These diagrams accomplished the outer power loop and the inner voltage loop for reaching the MPP. The current (K i ), voltage (K v ), and PWM (K PWM ) gains were considered unitary. In  Figure 4, we presented the control loops with transfer functions Gvcind and GPV for the tuning procedures of the inner and outer loops, respectively.   The operation at the maximum power point is represented by the PV equivalent conductance (Ge) insertion, as shown in Figure 5. Therefore, Equations (3) and (4) were determined considering the average state equation modeling [41]. We also considered the insertion of the inductor resistance rLin, wherein the capital letters represent constant values and the lowercase letters represent the variables.
After applying small-signal perturbations [42], removing second-order terms, and verifying that the sum of the DC components results in a null value, we were able to derive Equations (5) and (6).   Figure 4, we presented the control loops with transfer functions Gvcind and GPV for the tuning procedures of the inner and outer loops, respectively.   The operation at the maximum power point is represented by the PV equivalent conductance (Ge) insertion, as shown in Figure 5. Therefore, Equations (3) and (4) were determined considering the average state equation modeling [41]. We also considered the insertion of the inductor resistance rLin, wherein the capital letters represent constant values and the lowercase letters represent the variables.
After applying small-signal perturbations [42], removing second-order terms, and verifying that the sum of the DC components results in a null value, we were able to derive Equations (5) and (6).   Figure 4, we presented the control loops with transfer functions Gvcind and GPV for the tuning procedures of the inner and outer loops, respectively.   The operation at the maximum power point is represented by the PV equivalent conductance (Ge) insertion, as shown in Figure 5. Therefore, Equations (3) and (4) were determined considering the average state equation modeling [41]. We also considered the insertion of the inductor resistance rLin, wherein the capital letters represent constant values and the lowercase letters represent the variables.
After applying small-signal perturbations [42], removing second-order terms, and verifying that the sum of the DC components results in a null value, we were able to derive Equations (5) and (6). The operation at the maximum power point is represented by the PV equivalent conductance (G e ) insertion, as shown in Figure 5. Therefore, Equations (3) and (4) were determined considering the average state equation modeling [41]. We also considered the insertion of the inductor resistance rL in , wherein the capital letters represent constant values and the lowercase letters represent the variables.
Energies 2021, 14, x FOR PEER REVIEW 4 of 18 current (Ki), voltage (Kv), and PWM (KPWM) gains were considered unitary. In Figure 4, we presented the control loops with transfer functions Gvcind and GPV for the tuning procedures of the inner and outer loops, respectively.   The operation at the maximum power point is represented by the PV equivalent conductance (Ge) insertion, as shown in Figure 5. Therefore, Equations (3) and (4) were determined considering the average state equation modeling [41]. We also considered the insertion of the inductor resistance rLin, wherein the capital letters represent constant values and the lowercase letters represent the variables. (4) After applying small-signal perturbations [42], removing second-order terms, and verifying that the sum of the DC components results in a null value, we were able to derive Equations (5) and (6).  After applying small-signal perturbations [42], removing second-order terms, and verifying that the sum of the DC components results in a null value, we were able to derive Equations (5) and (6).
After applying Laplace transform and some mathematical manipulations, we derived Equation (7), which represents how the input voltage V cin = V PV varies when the converter duty cycle varies. Thus, by controlling the duty cycle of the power converter, we controlled the PV voltage in order to find the true MPP.
The dynamics of the PV can be neglected once the PV reproduces almost instantaneously the power variations when submitted to irradiation and temperature changes. Therefore, based on the product of PV panel voltage and current (8), we applied the smallsignal analysis after removing second-order terms and verifying that the sum of the DC components resulted in a null value. As such, we derived Equation (9).
For the aforementioned MPPT control, it is necessary to use both Equations (7) and (9). Equation (9) was used to derive the controller that generates the PV voltage reference (V FV_ref in Figures 2 and 3) and also derived the controller that produced the duty cycle D. This strategy performed a two-loop control MPPT process to accomplish the input capacitors voltage regulation (MPP finding).
Thus, Equation (9) guides the outer loop and Equation (7) guides the inner loop. Table 1 summarizes the parameters of the boost plus PV to obtain the MPPT controllers. A proportional plus integral (PI) compensator was used to perform the task in the MPPT control system. The acquisition frequency was considered as 1 kHz and a firstorder low-pass filter at a cut-off frequency of 500 Hz was inserted in the outer loop, for anti-aliasing purposes. Thus, a PI + filter composed the outer loop compensator. The crossing over frequency for the power loop was chosen as 50 Hz, which was the same as the desired MPPT speed. As such, the final Bode crossing-over frequency was expected to be in the range of 50 Hz. For the inner loop (voltage loop), we adopted a PI controller with a crossing-over frequency of 200 Hz, which was faster than the outer loop. These crossing-over frequencies could be changed according to the designer's specifications. Details on how to tune controllers using crossing-over frequency and phase margins via the Bode plot concepts can be observed in [42].
It is possible to verify the crossing-over frequency and stability margins for the compensated system in Figures 6 and 7 as 50 Hz and 85 degrees, as well as 200 Hz and 70 degrees, for the outer and inner loops, respectively. Equation (10) presents the proposed controller for the power loop (outer loop) and (11) presents the proposed controller for the voltage loop (inner loop).

Results and Discussions
Among the performance procedures that can be used as comparison criteria, transmitted energy is essential for using PV as an energy source. This important measure is known as the tracking factor (TF), which is the percentage of converted available energy [7]. The ripple voltage in the steady-state is also of vital importance because there is a limit of ripple so that the PV remains effective at the MPP. For the MPPT algorithm to reach 98% of the power extracted, the ripple voltage at MPP should not exceed 8.5% in the steady-state [43].
Following the same power profile as [7], the present work compared the TF for the P&O, P&O based on PI and IC, and IC based on PI methods, with steps of irradiance and temperature changes at every 2 s for a total of 6 s. The PI-based algorithms are tuned according to the proposed design procedure of Section 2. According to these results, the design procedure allowed the MPPT algorithms to reach a TF of more than 98.5% in these conditions. Table 2 summarizes the obtained TFs. Figures 8-11 show the extracted power

Results and Discussions
Among the performance procedures that can be used as comparison criteria, transmitted energy is essential for using PV as an energy source. This important measure is known as the tracking factor (TF), which is the percentage of converted available energy [7]. The ripple voltage in the steady-state is also of vital importance because there is a limit of ripple so that the PV remains effective at the MPP. For the MPPT algorithm to reach 98% of the power extracted, the ripple voltage at MPP should not exceed 8.5% in the steady-state [43].
Following the same power profile as [7], the present work compared the TF for the P&O, P&O based on PI and IC, and IC based on PI methods, with steps of irradiance and temperature changes at every 2 s for a total of 6 s. The PI-based algorithms are tuned according to the proposed design procedure of Section 2. According to these results, the design procedure allowed the MPPT algorithms to reach a TF of more than 98.5% in these conditions. Table 2 summarizes the obtained TFs. Figures 8-11 show the extracted power

Results and Discussions
Among the performance procedures that can be used as comparison criteria, transmitted energy is essential for using PV as an energy source. This important measure is known as the tracking factor (TF), which is the percentage of converted available energy [7]. The ripple voltage in the steady-state is also of vital importance because there is a limit of ripple so that the PV remains effective at the MPP. For the MPPT algorithm to reach 98% of the power extracted, the ripple voltage at MPP should not exceed 8.5% in the steady-state [43].
Following the same power profile as [7], the present work compared the TF for the P&O, P&O based on PI and IC, and IC based on PI methods, with steps of irradiance and temperature changes at every 2 s for a total of 6 s. The PI-based algorithms are tuned according to the proposed design procedure of Section 2. According to these results, the design procedure allowed the MPPT algorithms to reach a TF of more than 98.5% in these conditions. Table 2 summarizes the obtained TFs. Figures 8-11 show the extracted power using the aforementioned algorithms. The converter fed a standalone load in order to obey the parameters of Table 1.                In order to verify the behavior of the converter duty cycle, Figures 12 and 13 present the duty cycle variation for the P&O (fixed ∆D = 0.002) and P&O based on PI MPPT, respectively. The period of the step-sizes of the P&O was chosen as ∆t = 0.001 s in order to comply with the acquisition frequency of the P&O based on PI. The duty cycle variation was found to be adaptive in the P&O based on PI. In steady-state, the oscillations were suppressed optimizing the harvesting capability.  In order to verify the behavior of the converter duty cycle, Figures 12 and 13 present the duty cycle variation for the P&O (fixed D = 0.002) and P&O based on PI MPPT, respectively. The period of the step-sizes of the P&O was chosen as t = 0.001 s in order to comply with the acquisition frequency of the P&O based on PI. The duty cycle variation was found to be adaptive in the P&O based on PI. In steady-state, the oscillations were suppressed optimizing the harvesting capability.  Considering the necessity to evaluate the power ripple in the steady-state, Figures 14  and 15 present the power ripple for the P&O and P&O based on PI algorithm, respectively. One can easily verify the reduction of the power ripple for the P&O based on PI algorithm in relation to the conventional and well-applied MPPT approach. The ripple for the proposed algorithm was in the range of 3.75%, which was far less than the recommended.  In order to verify the behavior of the converter duty cycle, Figures 12 and 13 present the duty cycle variation for the P&O (fixed D = 0.002) and P&O based on PI MPPT, respectively. The period of the step-sizes of the P&O was chosen as t = 0.001 s in order to comply with the acquisition frequency of the P&O based on PI. The duty cycle variation was found to be adaptive in the P&O based on PI. In steady-state, the oscillations were suppressed optimizing the harvesting capability.  Considering the necessity to evaluate the power ripple in the steady-state, Figures 14  and 15 present the power ripple for the P&O and P&O based on PI algorithm, respectively. One can easily verify the reduction of the power ripple for the P&O based on PI algorithm in relation to the conventional and well-applied MPPT approach. The ripple for the proposed algorithm was in the range of 3.75%, which was far less than the recommended.    Figure 13. Detail of the duty cycle variation for the algorithms-step from 100 W to 200 W.
Considering the necessity to evaluate the power ripple in the steady-state, Figures 14 and 15 present the power ripple for the P&O and P&O based on PI algorithm, respectively. One can easily verify the reduction of the power ripple for the P&O based on PI algorithm in relation to the conventional and well-applied MPPT approach. The ripple for the proposed algorithm was in the range of 3.75%, which was far less than the recommended.
Other power profiles were applied to the P&O based on PI algorithm in order to test the proposed design effectiveness in different scenarios. The first and second power profiles consider four steps of power, with varying irradiance and temperature, as shown in Table 3. For Profile I, the P&O based on the PI reached 99.17%. For Profile II, the P&O based on PI reached 99.32%. Figures 16 and 17 show such an extraction of power.
Additionally, in Figure 18, a daily power profile that tries to emulate the temperature and irradiance changed during a typical PV day from 6 AM to 6 PM for the P&O based on PI is observed. In such conditions, the proposed MPPT reached the TF of 99.65% for all available powers, which was a remarkable TF. The P&O and IC based on PI algorithms, with the proposed design strategy, were digitally implemented in the dSPACE ACE1104 platform. The DSP core is a TMS320F40. dSPACE is used due to rapid prototyping because the implemented MatLab/Simulink system can be easily converted in the aforementioned platform. The control board possesses a DSP core with peripherals as IOs, ADs, DAs, PWMs, and communication with the ControlDesk platform. This is all part of the dSPACE environment. The ControlDesk platform allows for easy and real-time direct change of the controller's gains. Moreover, it can verify the values of the inner variables without disconnecting the prototype. This significantly reduces development times and costs. Considering the necessity to evaluate the power ripple in the steady-state, Figures 14  and 15 present the power ripple for the P&O and P&O based on PI algorithm, respectively. One can easily verify the reduction of the power ripple for the P&O based on PI algorithm in relation to the conventional and well-applied MPPT approach. The ripple for the proposed algorithm was in the range of 3.75%, which was far less than the recommended.   Figure 14. Power ripple using the P&O algorithm. Other power profiles were applied to the P&O based on PI algorithm in order to test the proposed design effectiveness in different scenarios. The first and second power profiles consider four steps of power, with varying irradiance and temperature, as shown in Table 3. For Profile I, the P&O based on the PI reached 99.17%. For Profile II, the P&O based on PI reached 99.32%. Figures 16 and 17 show such an extraction of power.  Figure 15. Power ripple using the P&O based on the PI algorithm.  Additionally, in Figure 18, a daily power profile that tries to emulate the temperature and irradiance changed during a typical PV day from 6 AM to 6 PM for the P&O based on PI is observed. In such conditions, the proposed MPPT reached the TF of 99.65% for all available powers, which was a remarkable TF. The P&O and IC based on PI algorithms, with the proposed design strategy, were digitally implemented in the dSPACE ACE1104 platform. The DSP core is a TMS320F40. dSPACE is used due to rapid prototyping because the implemented MatLab/Simulink system can be easily converted in the aforementioned platform. The control board possesses a DSP core with peripherals as IOs, ADs, DAs, PWMs, and communication with the ControlDesk platform. This is all part of the dSPACE environment. The ControlDesk platform allows for easy and real-time direct change of the controller's gains. Moreover, it can verify the values of the inner variables without disconnecting the prototype. This significantly reduces development times and costs.
For the experimental evaluations, the irradiance and temperature step changes were configurable through the GPIB port of an Agilent PV emulator. The DC-DC power electronics prototype operates with a switching frequency of 10 kHz while the control system presents a sampling rate of 1 kHz. The power converters main parameters obey Table 1.
To assist in the experimental evaluations for computing the TF, an acquisition  Additionally, in Figure 18, a daily power profile that tries to emulate the temperature and irradiance changed during a typical PV day from 6 AM to 6 PM for the P&O based on PI is observed. In such conditions, the proposed MPPT reached the TF of 99.65% for all available powers, which was a remarkable TF. The P&O and IC based on PI algorithms, with the proposed design strategy, were digitally implemented in the dSPACE ACE1104 platform. The DSP core is a TMS320F40. dSPACE is used due to rapid prototyping because the implemented MatLab/Simulink system can be easily converted in the aforementioned platform. The control board possesses a DSP core with peripherals as IOs, ADs, DAs, PWMs, and communication with the ControlDesk platform. This is all part of the dSPACE environment. The ControlDesk platform allows for easy and real-time direct change of the controller's gains. Moreover, it can verify the values of the inner variables without disconnecting the prototype. This significantly reduces development times and costs.
For the experimental evaluations, the irradiance and temperature step changes were configurable through the GPIB port of an Agilent PV emulator. The DC-DC power electronics prototype operates with a switching frequency of 10 kHz while the control system presents a sampling rate of 1 kHz. The power converters main parameters obey Table 1.
To assist in the experimental evaluations for computing the TF, an acquisition management system was used with a PC user-friendly graphical interface. This graphical interface was implemented by the authors in [7]. The interface acquired the waveforms and dynamically computed the TF.
The evaluation of the extracted power can be observed in Figures 19-22, wherein PMAX represents the maximum available power and PMPPT represents the energy For the experimental evaluations, the irradiance and temperature step changes were configurable through the GPIB port of an Agilent PV emulator. The DC-DC power electronics prototype operates with a switching frequency of 10 kHz while the control system presents a sampling rate of 1 kHz. The power converters main parameters obey Table 1.
To assist in the experimental evaluations for computing the TF, an acquisition management system was used with a PC user-friendly graphical interface. This graphical interface was implemented by the authors in [7]. The interface acquired the waveforms and dynamically computed the TF.
The evaluation of the extracted power can be observed in Figures 19-22, wherein PMAX represents the maximum available power and PMPPT represents the energy converted. The applied power profiles are the same as Profiles I and II of the simulation section. The obtained TFs were around 99%.
Similar profiles of typical daily irradiation were applied, as shown in Figures 23 and 24, and a good response to these profiles represents a greater gain concerning the study of the ability of energy extraction in the face of real circumstances. This was supposed to simulate a daily characteristic, i.e., the power profile and not the total time (6 AM to 6 PM).           Similar profiles of typical daily irradiation were applied, as shown in Figures 23 and  24, and a good response to these profiles represents a greater gain concerning the study of the ability of energy extraction in the face of real circumstances. This was supposed to simulate a daily characteristic, i.e., the power profile and not the total time (6 AM to 6 PM). Figure 24 considers the usage of a sun tracker. Figures 25 and 26 present the daily profile captured by the acquisition management system that computed TF. The obtained TFs were 99.2% and 99.4%, demonstrating the effectiveness of the proposed design methodology.    Similar profiles of typical daily irradiation were applied, as shown in Figures 23 and  24, and a good response to these profiles represents a greater gain concerning the study of the ability of energy extraction in the face of real circumstances. This was supposed to simulate a daily characteristic, i.e., the power profile and not the total time (6 AM to 6 PM). Figure 24 considers the usage of a sun tracker. Figures 25 and 26 present the daily profile captured by the acquisition management system that computed TF. The obtained TFs were 99.2% and 99.4%, demonstrating the effectiveness of the proposed design methodology.    Similar profiles of typical daily irradiation were applied, as shown in Figures 23 and  24, and a good response to these profiles represents a greater gain concerning the study of the ability of energy extraction in the face of real circumstances. This was supposed to simulate a daily characteristic, i.e., the power profile and not the total time (6 AM to 6 PM). Figure 24 considers the usage of a sun tracker. Figures 25 and 26 present the daily profile captured by the acquisition management system that computed TF. The obtained TFs were 99.2% and 99.4%, demonstrating the effectiveness of the proposed design methodology.   The P&O based on the PI algorithm was also implemented in a single-stage gridconnected PV system to verify its effectiveness. In total, 10 PV panels were series-connected to produce 2000 W with V MPP of 262.7 V. The chosen values for the simulation were C Bus 2.5 mF, L con 5 mH, V grid 127 RMS with 60 Hz. The switching frequency of the inverter was 30 kHz. With regard to the current control loop, the crossing-over frequency was 3 kHz and with respect to the voltage control loop, its crossing-over frequency was 10 Hz. Figure 29 shows the algorithm response with good initialization speed (t = 0.2 s) and low settling time (t = 0.1 s) when subjected to power variation, as well as a remarkable TF of 99.05%. Figure 30 shows the power ripple in further detail.  The P&O based on the PI algorithm was implemented in a double-stage gridconnected PV system to verify the double grid ripple frequency effect on energy harvesting. The chosen values for simulation were CBus 1.1 mF, Lcon 5 mH, Vgrid 127 RMS with 60 Hz. The switching frequency of the inverter was 30 kHz. With regard to the current control loop, the crossing-over frequency was 3 kHz. For the voltage control loop, its crossing-over frequency was 10 Hz. Two PV panels were series-connected to produce 400 W with VMPP of 52.54 V. The VBUS voltage was chosen as 220 V, which is a higher value than the grid peak voltage. In these circumstances, the boost gain was 4.18, which is a possible gain to be obtained with the DC-DC boost converter. Figure 27 shows the algorithm response with high initialization speed (t = 35 ms) and low setting time (t = 4 ms) when subjected to power variation, as well as a remarkable TF of 99.7%. Figure 28 verifies the double-grid low-frequency effect, which does not affect energy harvesting.  The P&O based on the PI algorithm was implemented in a double-stage gridconnected PV system to verify the double grid ripple frequency effect on energy harvesting. The chosen values for simulation were CBus 1.1 mF, Lcon 5 mH, Vgrid 127 RMS with 60 Hz. The switching frequency of the inverter was 30 kHz. With regard to the current control loop, the crossing-over frequency was 3 kHz. For the voltage control loop, its crossing-over frequency was 10 Hz. Two PV panels were series-connected to produce 400 W with VMPP of 52.54 V. The VBUS voltage was chosen as 220 V, which is a higher value than the grid peak voltage. In these circumstances, the boost gain was 4.18, which is a possible gain to be obtained with the DC-DC boost converter. Figure 27 shows the algorithm response with high initialization speed (t = 35 ms) and low setting time (t = 4 ms) when subjected to power variation, as well as a remarkable TF of 99.7%. Figure 28 verifies the double-grid low-frequency effect, which does not affect energy harvesting.

Reference Extracted Power
Power (W) Figure 27. Power extracted using the double-stage system. Figure 31 shows a comparison with a specifically designed MPPT for single-stage systems [44] and the current proposal. The power ripple reduction is notorious using the MPPT based on PI. In [44], V PVref was added with ∆V PV , which varied as a linear ramp. The point of maximum power was always on the right side of the P×V curve and, thus, did not work at the true MPPT.
Comparing the single and double-stage PV systems using the proposed MPPT algorithm, the speed response and TF were higher for the double-stage approach. However, the usage of a one-stage solution was attractive for reducing the total converters in the system and, thus, increasing total efficiency.  The P&O based on the PI algorithm was also implemented in a single-stage gridconnected PV system to verify its effectiveness. In total, 10 PV panels were seriesconnected to produce 2000 W with VMPP of 262.7 V. The chosen values for the simulation were CBus 2.5 mF, Lcon 5 mH, Vgrid 127 RMS with 60 Hz. The switching frequency of the inverter was 30 kHz. With regard to the current control loop, the crossing-over frequency was 3 kHz and with respect to the voltage control loop, its crossing-over frequency was 10 Hz. Figure 29 shows the algorithm response with good initialization speed (t = 0.2 s) and low settling time (t = 0.1 s) when subjected to power variation, as well as a remarkable TF of 99.05%. Figure 30 shows the power ripple in further detail.    The P&O based on the PI algorithm was also implemented in a single-stage gridconnected PV system to verify its effectiveness. In total, 10 PV panels were seriesconnected to produce 2000 W with VMPP of 262.7 V. The chosen values for the simulation were CBus 2.5 mF, Lcon 5 mH, Vgrid 127 RMS with 60 Hz. The switching frequency of the inverter was 30 kHz. With regard to the current control loop, the crossing-over frequency was 3 kHz and with respect to the voltage control loop, its crossing-over frequency was 10 Hz. Figure 29 shows the algorithm response with good initialization speed (t = 0.2 s) and low settling time (t = 0.1 s) when subjected to power variation, as well as a remarkable TF of 99.05%. Figure 30 shows the power ripple in further detail.    Figure 31 shows a comparison with a specifically designed MPPT for single-stage systems [44] and the current proposal. The power ripple reduction is notorious using the MPPT based on PI. In [44], VPVref was added with VPV, which varied as a linear ramp. The point of maximum power was always on the right side of the P×V curve and, thus, did not work at the true MPPT.  Observing the work presented in , the MPPT process achievement was based on flowcharts with fixed or variable step sizes. The present work is the first to present a complete design procedure to convert algorithms into a loop control system. The step sizes were variable and adaptive to the error function, and thus easy to be obtained when compared to [11,14]. In [14], variable step-sizes during initialization resulted in accentuated overshoots in power. However, as the proposed work used compensators inside the MPP control system, the step change was smooth without losing tracking and speed capacity. In [16], a remarkable TF in the range of 99% was achieved, which was similar to what was obtained by the proposed work. However, they considered this result only in steady-state situations. We evaluated the TF in the entire scenario, steady-state plus irradiance, and temperature step changes in more realistic scenarios (as shown in Figures 25 and 26). Observing these more realistic scenarios, the proposed work achieved power extraction with fewer oscillations in power than [7], probably because of the proposed design procedure. Figure 30. Detail of power extracted using the single-stage system. Figure 31 shows a comparison with a specifically designed MPPT for single-stage systems [44] and the current proposal. The power ripple reduction is notorious using the MPPT based on PI. In [44], VPVref was added with VPV, which varied as a linear ramp. The point of maximum power was always on the right side of the P×V curve and, thus, did not work at the true MPPT. Comparing the single and double-stage PV systems using the proposed MPPT algorithm, the speed response and TF were higher for the double-stage approach. However, the usage of a one-stage solution was attractive for reducing the total converters in the system and, thus, increasing total efficiency.
Observing the work presented in , the MPPT process achievement was based on flowcharts with fixed or variable step sizes. The present work is the first to present a complete design procedure to convert algorithms into a loop control system. The step sizes were variable and adaptive to the error function, and thus easy to be obtained when compared to [11,14]. In [14], variable step-sizes during initialization resulted in accentuated overshoots in power. However, as the proposed work used compensators inside the MPP control system, the step change was smooth without losing tracking and speed capacity. In [16], a remarkable TF in the range of 99% was achieved, which was similar to what was obtained by the proposed work. However, they considered this result only in steady-state situations. We evaluated the TF in the entire scenario, steady-state plus irradiance, and temperature step changes in more realistic scenarios (as shown in Figures 25 and 26). Observing these more realistic scenarios, the proposed work achieved power extraction with fewer oscillations in power than [7], probably because of the proposed design procedure.
In relation to the use of the MPPT algorithm for single-stage grid-connected systems, the proposed scheme warrants less ripple in the steady-state and consequently a higher  Figure 31. Detail of power extracted using the current proposal and the proposal of [44].
In relation to the use of the MPPT algorithm for single-stage grid-connected systems, the proposed scheme warrants less ripple in the steady-state and consequently a higher TF than the work presented in [44]. Finally, the double ripple effect that propagated from the grid to the PV source did not influence the proposal's effectiveness.

Conclusions
This paper presented a novel complete tuning procedure to design an MPPT algorithm as a loop control system, presenting an alternative to the well-established algorithms. This was done to avoid following flowcharts to obtain maximum power transfer. By employing power and voltage control loops, it is possible to govern MPP searching as a control system with outstanding performance and a high tracking factor. The MPPT control transfer functions were derived through average state equations and small-signal analysis for both the P&O and IC algorithms, returning the P&O and IC based on PI algorithms. Such algorithms were evaluated from simulation and experimental results that achieved tracking factors above 99%. Therefore, this demonstrated the effectiveness of the design criteria.
Finally, the proposed design procedure can be applied to any renewable and alternative energy source used to optimize energy extraction via MPPT algorithms. Some works present the PI compensators to regulate the power converters' current or voltage in a typical photovoltaic power converter application. This paper, however, is the first to insert the PI controllers into the MPPT algorithm, obtaining all the references, to guide the MPPT process and thus the paper archival value. The proposed algorithm can also be applied as a second-stage of a hybrid MPPT algorithm to mitigate partial shading effects and improve energy harvesting.