Predictive Control with Current-Based Maximum Power Point-Tracking for On-Grid Photovoltaic Applications

: The high increase of renewable energy sources and the increment of distributed generation in the electrical grid has made them complex and of variable parameters, causing potential stability problems to the PI controllers. In this document, a control strategy for power injection to the electrical system from photovoltaic plants through a voltage source inverter two-level-type (VSI-2L) converter is proposed. The algorithm combines a current-based maximum power point-tracking (Current-Based MPPT) with model predictive control (MPC) strategy, allowing avoidance of the use of PI controllers and lowering of the dependence of high-capacitive value condensers. The sections of this paper describe the parts of the system, control algorithms, and simulated and experimental results that allow observation of the behavior of the proposed strategy.


Introduction
The current dependence on electrical equipment needed for daily tasks, mobile devices and electromobility has generated a global increase in energy demand [1,2]. As electric energy requirements grow, a change to more environmentally friendly methods has to be made in order to help decrease global greenhouse gases emissions [3].
Electric power systems have used power from renewable sources for some time, mainly from solar and wind energy plants which use of power converters, which obtain the maximum benefit independent of the environmental conditions [4].
Renewable energy sources are often away from the centers of energy demand, therefore the paradigm of unidirectional power systems is changing. Distributed generation is converting power systems into bidirectional-power-flow systems, making them more complex to control and protect [5]. Due to the chance of isolated operation, the concept of microgrids, using the big spread and development of power-electronics-interfaced distributed generation, can be applied [6]. Distributed generation leads to intermittently produced energy by the electrical power systems [7], causing the system parameters to be affected and generates possible divergences in the converter's control loops. Commonly, these power converters use PI-based control schemes, which show good performance when the system works near the nominal operating point [8].
In the literature it is possible to find that solar arrays typically use cascaded doublestage power converters, in which the solar array is connected to the first DC/DC stage in charge of making the solar array function in the maximum power point (MPP), and in The contribution of this work is the development of a control strategy that allows operating solar arrays with a reduced number of control stages and has few parameters for its design, the novelty being the development of an MPPT strategy based on current for a voltage source converter that is able to directly communicate with the current control on the AC side. The proposed strategy is capable of operating in electrical networks, setting PI control completely aside, allowing continuation of operation before variations in their electrical parameters without damaging the harmonic content of the injected current, as well as enabling the size reduction of the capacitor used in voltage source-type converters.
At the beginning of the document, a description of the system and the used controls is provided alongside design considerations, after this, the results obtained through simulation are presented considering a non-ideal electrical system with resistive and inductive parameters. For the simulation, three cases were contemplated: simulation with the proposed control, simulation with the proposed control reducing the DC link condenser, and a simulation with cascaded PI controllers for a further comparison. A new simulation considering disturbances in the voltage of the grid was run. Finally, the experimental results obtained for the proposed control, discussion and conclusions are shown.

System Description
The proposed control strategy is shown in Figure 1, which displays a solar array coupled to a single-stage converter, a resistive inductive (RL) filter, an isolation transformer and a representation of the electrical grid [28].
This strategy is a model predictive current-control technique, In which the amplitude of the reference is taken directly from the MPPT algorithm [27,29]. Each part of the system and the control loops used are described with the aim of having a clear understanding of the control scheme.

Photovoltaic Array
The photovoltaic array consists of a set of solar panels that can be modeled considering the non-linear behavior that is due to temperature and irradiance conditions [30]. Thus, a power converter is needed to allow the maximum power from the solar array to deal with disturbances in the electrical variables.
In order for the suggested scheme to work, a solar panels array must be connected in parallel to a capacitor that is responsible for keeping the voltage on the DC side stable in case of disturbances. The capacitor voltage depends on the one hand, on the environmental conditions, and on the other, on the current required at the AC side [31].
It should be mentioned that panels that are series-connected should be considered, since, for single-stage systems, it is necessary to have a voltage in the DC link higher than the rectified grid voltage, to allow a power injection into the electrical system [32].

Power Converter
For the purpose of extracting maximum power from the solar array, a two-level voltage source inverter (2L-VSI) is used. This converter was selected due to its simplicity of construction and development. The power converter is represented in Figure 2. This is composed of three legs, each with two power switches which operate in a complementary way with each other in order to avoid short circuits or loss of control over the load. The valid states of the converter are presented in Table 1.   1  1  1  0  0  0  1  2  1  1  1  0  0  0  3  0  1  1  1  0  0  4  0  0  1  1  1  0  5  0  0  0  1  1  1  6  1  0  0  0  1  1  7  1  0  1  0  1  0  8  0  1  0  1  0  1

Proposed MPPT Strategy Current-Based
Considering that the power behavior in the photovoltaic system varies depending on environmental conditions, and in most cases it is expected that photovoltaic generating plants deliver the maximum available power, it is necessary to use a maximum power pointtracking algorithm (MPPT) [33] that allows operating the solar arrays at the maximum power point (MPP).
To implement the proposed MPPT algorithm, a sample of the voltage (v pv (t)) and the current (i pv (t)) of the solar array in the present state must be taken every T s MPPT period. With these measurements, the operating power of the panels (P pv (t)) is calculated. Subsequently, the variations of current (∆i pv (t)) and power (∆P pv (t)) between the current and previous state are obtained.
With the slopes of power (∆P pv (t)) and current (∆i pv (t)), the algorithm determines if the next iteration should increase (i re f = (i re f + ∆i) − i pv ) or decrease (i re f = (i re f − ∆i) − i pv ) the reference current in the developed predictive control strategy. Finally, the current measurements are stored in memory, to be used in the next step as the previous values. The above is described step by step in Table 2.
A current-based P&O algorithm makes disturbances in the AC-side current and analyzes the behavior of the variables on the DC side, thus, allowing the removal of the capacitance value dependence. As a result, there is no need to consider a voltage control loop for the capacitor, prompting a lower total harmonic distortion (THD) in the injected current than in the values that are obtained using a PI-based control strategies [34].
This strategy is similar to a regular voltage-based P&O algorithm, but the difference is that its output corresponds to the current reference. Please note that the proposed strategy considers the subtraction of the current i pv in the output. This works as a feed-forward loop to the algorithm, since the current delivered by the solar panel is proportional to the solar irradiance. Step Action Step 1 Measure v pv and i pv Step 2 Calculate P pv with v pv and i pv Step 3 Calculate ∆P pv with P pv (t) and P pv (t − T s MPPT ) Step 4 Calculate ∆i pv with i pv (t) and i pv (t − T s MPPT ) Step  If(∆P pv > 0 and ∆i pv > 0) {go to Step 10} Step 10 i re f = (i re f + ∆i) − i pv and go to Step 12 Step 11 i re f = (i re f − ∆i) − i pv and go to Step 12 Step 12 Return to Step 1

Reference Plane Transform
To implement the proposed MPPT strategy, it is necessary to use spatial transforms, which allow to take the output of the current-based P&O MPPT directly. The latter allows communication between the MPPT strategy and the AC-side current control.
Since the algorithm of the predictive control works in the αβ plane with the purpose of reducing the number of the control equations, transforms from the plane dq to αβ are used for the DC side in function to communicate the DC whit the AC side, and finally transforms from the plane abc to αβ, for the current and voltage grid measurements.
Lastly, and to make unity power factor injection possible, a grid voltage phase-locked loop (PLL) is used [35], this allows the synchronization of said transforms to the electrical system voltage. Please note that the algorithm also permits reactive power injection if needed.

Phase-Locked Loop Algorithm
The control algorithm shown in Figure 3 is used to obtain the θ angle. In this diagram, a transform from the plane abc to dq that takes the voltage signal e q is considered. This signal is passed through a discrete filter (Filter PLL (z)) that allows a noise reduction of the measurement. A discrete PI controller (PI PLL (z)) is used to find the angular velocity that allows obtaining zero error in steady state (this point being synchronized with the grid) and an integral in the z plane that takes the angular velocity and returns the required angle θ. The closed loop shown is fed back with a constant 2π50 that accelerates the convergence, given that the frequency of the grid is known. The transfer functions Filter PLL (z), PI PLL (z) and integral in the z plane are given by Equations (1)

Current Control for Power Injection to the Grid
Considering that the connection points of solar plants can have large variations in their parameters due to the grid robustness, distributed generation and integration of renewable energy, it is proposed to use predictive current control for the current injection to the electrical grid, which allows to improve the response dynamics and operate with non-linear systems [36]. Note in Figure 1 that, in this study, the current predictive control reference is addressed from the MPPT strategy, going through the transform dq to αβ, allowing communication of the MPPT algorithm with the predictive control.
The implementation of model predictive control (MPC) requires a mathematical model of the plant to be controlled, in which all the possible conditions of the actuator can be evaluated. This makes MPC ideal for power converters, because to its discrete nature [37,38].
Regarding the proposed strategy, all the 2L-VSI states are shown in Table 1 and must be evaluated to determine the optimal switching vector that generates the minimum error in the output current with respect to the reference. Considering that the connection point of the converter (including the filter and transformer) corresponds to nodes e a , e b and e c , shown in Figure 1, an KVL (Kirchhoff's Voltage Law) is performed between the converter and the aforementioned nodes obtaining Equation (4). Selecting this point to apply the KVL allows not to depend on the grid parameters for the functioning of the control.
Predictive control has a limitation in the computational capacity required to solve the mathematics of the models. To deal with this, the Clarke transform is used to simplify from a three-phase abc plane to only two variables in αβ plane. Considering this, Equation (5) Using the forward Euler approach (6) and replacing in (5), the equation for the predictive model (7) can be obtained in discrete time.
To implement this control strategy, the finite switching states must be considered. Each converter admissible state generates a load voltage vector (shown in Equation (8)) that is transformed to the αβ plane using the Clarke transform, obtaining vectors v αk and v βk . These vectors are evaluated in Equation (7), allowing current prediction to be obtained for all valid switching states for the (k + 1) sampling time [39].
Thus, considering the eight switching states on the αβ plane on Equation (7), eight possible current predictions can be obtained for both alpha and beta plane (i αβ k+1 ). Please note that although the switching states are binary values, the currents correspond to real values. With the purpose of minimizing the errors between the output and the current reference, the square errors for the instant currents in alpha and beta are obtained according to (9), which ensures stability and control convergence [40]. The foregoing allows the generation of the g vector of dimension equal to the number of combinations of the converter, from which the position with less value that allows the determination of the optimal switching combination to apply on the next state is selected.
It often stated that predictive control must consider compensation for delays [41] because once a state has been applied, its response can only be observed one sampling cycle later. This is because there is an associated delay in the analog to digital converter (ADC) in the microcontroller. The delay compensation performs a prediction for the state k + 2 according to Equation (10), where all the switching states are evaluated and the current i(k + 1) previously obtained considering the newly applied switching state generated by the previous prediction of i(k + 2) , which corresponds to a horizon one considering delay compensation [42]. Figure 4 shows the flowchart of the predictive current control including the delay compensation.

Simulations
Intending to validate the proposed strategy shown in Figure 2, simulations were carried out using MATLAB/Simulink. A comparison is made between the proposed system and the cascade control strategy using sinusoidal pulse-width modulation (SPWM), to analyze and contrast the performance of both algorithms. This control strategy has been described previously and the design criteria is shown in this section in order to clearly demonstrate cascade control.

Cascade Controller Design
The majority of single-stage power converter topologies use cascade, PI for control, the internal loop for current control and the external loop for voltage control [43]. For solar arrays, the voltage loop controls the operating voltage of the solar array based on making it work in its MPP, delivering a reference current to the output. The current loop modifies the modulation of the converter, to track the current reference.
To provide a contrast with the proposed strategy, a simulation is shown in Figure 5, in which the reference voltage is obtained from P&O MPPT strategy [24] with a 1 ms step for the MPPT and voltage reference changes ∆v of 0.1 V. The current reference i q (s) is considered to be 0 (no injected reactive power). The constant G ac corresponds to the converter gain, equal to 0.5.
For the design of the controllers, the transfer functions (11) and (12) were used for the AC side and (13) as the transfer function of the capacitor on the DC side.
In the design of the PI current (s) controllers, a bandwidth of 1000 rad s and a damping coefficient of 0.707 were considered for closed-loop design criteria, obtaining the parameters of the PI current (s) as shown in (14).
The voltage controller was designed with a bandwidth 20 times slower than the current one (50 rad s ) and with a damping of 0.707, obtaining the constants shown in (15).
H q (s) Figure 5. Diagram cascade PI control.

Simulation Results
In this section, the results obtained by simulation using MATLAB/Simulink software are presented, considering the parameters in Tables 3-7 and with three different conditions:  Table 4. AC side parameters simulation.

Parameter Value
C 600 µF C (case lower capacitance) 200 µF To show that the proposed strategy was dependent on the parameters of the electrical grid filter, simulation results have been obtained considering a decrease in the value of the capacitor bank. It is important to mention that the ∆i parameter must not be an overly high number, for it would introduce considerable subharmonics into the current injected to the grid, whereby a small value that could be perceived in the current sensor used in the implementation is considered. The ∆T s MPPT parameter allows the acceleration or delaying of the control algorithm. How much it can be accelerated will mainly depend on the inductive parameter of the electric grid.
To  Figures 6 and 7, and a summary of the results is presented in Table 8. Please note that T 0−MPP corresponds to the amount of time the algorithm takes in going from 0 to the MPP. Intending to demonstrate the potential of the proposed strategy, Figures 8 and 9 show the simulations of the system with distortion in the grid voltage. Equations (16)- (18) show the grid voltages considering third, fifth and seventh order harmonics, as well as phase-shift and unbalance in the grid voltages. The idea is to show the good performance of the proposed algorithm in the face of poor electrical network conditions. e agrid = 20 √ 2((1.2 sin(wt + 180 • )) + 0.05 sin(3(wt + 180 • )) + 0.03 sin(5(wt + 180 • )) + 0.03 sin(7(wt + 180 • ))) (16) e bgrid = 20 √ 2(( 1 (2) sin(wt + 60 • )) + 0.05 sin(3(wt + 60 • )) + 0.03 sin(5(wt + 60 • )) + 0.03 sin(7(wt + 60 • ))) (17) e cgrid = 20 √ 2(0.8 sin(wt + 305 • )) + 0.05 sin(3(wt + 305 • )) + 0.03 sin(5(wt + 305 • )) + 0.03 sin(7(wt + 305 • ))) (18) Figures 8 and 9 shown simulation results even under disturbances in the environmental parameters. Results expose that the proposed strategy may control considering voltage grid distortion. Figures 8 and 9 show that the proposed strategy is able to control the system considering variations of environmental parameters and even under electrical grid distortions.   THD v 51 =5.5317 WTHD v =0.66788 (i) Figure 7. Simulation results: (a) steady state current i a for the proposed strategy, (b) steady state current i a for the simulation with lower capacitance, (c) steady state current i a for the PI control, (d) steady state voltage v a for the proposed strategy, (e) steady state voltage v a for the simulation with lower capacitance, (f) voltage v a steady state for PI control, (g) voltage spectral analysis of (d) and calculation of THD and WTHD, (h) voltage spectral analysis of (e) and calculation of THD and WTHD, (i) spectral analysis of the voltage of (f) and calculation of THD and WTHD. Simulation results: (a) steady state current i a for the proposed strategy, (b) steady state current i a for the simulation with lower capacitance, (c) steady state current i a for the PI control, (d) steady state voltage v a for the proposed strategy, (e) steady state voltage v a for the simulation with lower capacitance, (f) voltage v a steady state for PI control, (g) voltage spectral analysis of (d) and calculation of THD and WTHD, (h) voltage spectral analysis of (e) and calculation of THD and WTHD, (i) spectral analysis of the voltage of (f) and calculation of THD and WTHD.

Experimental Results
Experimental tests are conducted using solar panels connected in series (model ED50-6M) to validate the simulation results. To emulate sudden disturbances in solar conditions, a bypass is performed for one of the panels using a two-position relay, controlled by a digital signal. The only difference compared to the simulation parameters of the proposed strategy is that a T s MPPT of 20 [ms] is used.
In Figure 10 the setup used for this work is shown and the results obtained are presented in Figure 11. To clearly illustrate the behavior of the experimental results and proper operation of the algorithm, the results are considered during the MPPT algorithm start, disturbance in the number of solar panels connected in series to emulate decrease in solar irradiance and loss of available power (a bypass is made to one of the solar panels of the series-connected array) and steady state signals to see the quality of the signals.
In Figure 11a,d,g,j the signals are shown from the start of the control to the establishment of the MPP, considering 6 solar panels connected in series. Figure 11b,e,h,k show the behavior of the system during the disconnection of one of the solar panels (at approximately 0.5 s), and then during the connection (approximately after 2 s), to see if the system is able to remain stable under strong disturbances. Finally, Figure 11c,f,i,l show the quality of the voltages and currents and also confirm that there is a proper current tracking with respect to the grid voltage.

Discussion
In both simulation and implementation, the control is capable of operating the system at the MPP, even during disturbances. The experimental response presents two main differences with respect to the simulation. Experimentally, the control in the MPPT requires a higher ∆T to be able to work properly. In experimental tests, the control works about 10 times slower compared to simulations, and it is possible that it may work faster, but this depends on the coupling place of the photovoltaic system, due to differences in electrical systems, since it is the inductance of the grid that defines how fast the variations in the current references can be made. In the experimental system the autotransformer and the isolation transformer add more inductance to the system. The other main difference is observed in the harmonic distortion of the signals. which is over twice the value of the simulations. This may be due to the signal adaptation stage, in which low-bandwidth operational amplifiers with a slow rate (LM324) are used, which causes the microcontroller to not read the correct signal. Nevertheless, both simulation and experimental results present the majority of its spectrum centered around 2200 [Hz] (44th harmonic), which makes the analysis of the distortion up to 51st harmonic present low values in the current signal, since higher order harmonics are attenuated in the signal due to the inductive nature of the system.
Comparing the proposed strategy against the traditional cascade control, the designed PI control has a better performance on the DC side, for it is able to reach the MPP in less time during the start and disturbances, and it also has less ripple in the voltage signals ( Figure 6a) and current (Figure 6b). On the other hand, the predictive control strategies, despite having a higher mean absolute error during the disturbances (Figure 6e,g,i) in the current signals show a better behavior on the AC side, even in a highly distorted grid (Figure 9a), since they do not present harmonics at low frequency, this being quantifiable with the weighted total harmonic distortion (WTHD) index [44], which weights a lower value at higher harmonics compared to the THD index.
By using current references in the MPPT strategy, it is possible to decrease the size of the capacitor in the DC link, since it is the inductive elements that determine the dynamics of the system. This compared to the PI strategy allows a decrease in system costs. It is even possible to observe from Figure 7c,f that lower-capacitance results in a lower THD index and a very similar WTHD between both situations.
When obtaining the current reference for the MPPT algorithm, the time it takes for the system to reach the MPP is directly dictated by the value of ∆i, being an advantage over the traditional cascade strategy, since the control PI has a dynamics set by the ∆v of the MPPT voltage plus the dynamics of the controller. The PI control does not ensure good performance for different plants due to its linear nature.

Conclusions
In this work, a combination of predictive current control and a current-based maximum power point-tracking strategy is proposed, in which disturbances are performed on the AC side and the behavior of the DC side is analyzed.
Simulation results compare the proposed scheme for different capacitive values against the controlled system by cascade loops using PI-type controllers. Then, the experimental results of the proposed algorithm are presented, considering disturbances in the available power.
In light of the results, it is possible to say that despite external (environmental) disturbances, the photovoltaic solar system remains operating at its maximum power point. The system is capable of operating when disturbances occur in environmental conditions and uncertain system's electric parameters. The application of the proposed algorithm implies less dependency on the capacitive parameters; thus, dynamics of the system are determined by inductive elements, enabling the use of less voluminous and lower cost capacitors.
When comparing the classic cascade control and the proposed control, it is found that the DC-side signals have an improved behavior considering PI-type controls. The presented control strategy shows higher quality in the injected current into the electrical system, making possible the connection of solar arrays at different points, without causing problems to the control algorithm and consequently, to the quality of power supply. Generally speaking, it can be observed that the proposed algorithm is able to provide better quality currents to the system, there is a better follow up of the references and the majority of the harmonic content is found at a high frequency Further work must contemplate the study of the strategy exploring algorithms that allow the consideration of virtual inertia, thus, allowing the photovoltaic plants to present changes in power variation that contribute to the stability of the electrical grid in case of failure.