Controller for the Grid-Connected Microinverter Output Current Tracking

: The modification of the proportional–integral (PI) controller with the variable proportional constant for tracking of the grid-connected photovoltaic microinverter output current has been proposed. The obtained results show that in the case when the proportional constant of the PI controller varies in time according to the appropriate law, the microinverter output current sinus shape distortions decrease as compared to the case when the ordinary PI controller is used. The operation of the microinverter with the proposed controller was investigated for the cases when the electrical grid voltage sinus shape is not distorted and when it is distorted by the higher harmonics.


Introduction
Microinverters are designed for a single photovoltaic module with a power of 50-350 W and are increasingly used to convert the photovoltaic energy into the standard power grid energy in small scale grid-connected residential applications [1,2]. Microinverters can also be used in high power solar farms instead of centralized inverters. Their application in solar farms increases the efficiency of energy harvesting because the maximum power point tracking is performed individually for each module [1][2][3].
The grid-connected microinverter operates as a current source. Therefore, it is important to keep the shape of the grid-connected photovoltaic inverter output current as close as possible to the sinus to minimize the generation of higher harmonics [4][5][6][7]. Higher harmonics can be suppressed using traditional LC filters. However, passive filters are not efficient in removing harmonics [8][9][10][11][12][13]. It is more effective to include the feedback control system into the structure of the microinverter for tracking of the sinusoidal reference to guarantee the sinus shape of the output current and to minimize the steady-state error between the actual output current and the current reference [14][15][16][17][18].
The PI and PID controllers are usually employed in the industrial microinverters [29]. The popularity of these well-known controllers is determined by the easy implementation, efficiency, and well-developed tuning techniques of controller parameters [21]. The disadvantage of PI and PID controllers is that they cannot track the sinus reference signal without the steady-state error.
The transfer function of PR controller [32]: where KP is the proportional constant, Kr is the resonant gain and ω is the resonant frequency. Theoretically, the PR controller is characterized by the infinite gain at the resonant frequency (for the standard electric grid ω = 314 rad/s) and, therefore, it should provide a zero steady-state error between the actual output current of the inverter and the current reference. However, the employment of the PR controller is challenging because there are no common tuning methods of controller parameters [32,35]. The predictive current controllers are more sophisticated as compared to the PI, PID, and PR controllers. The algorithm of the predictive current controller estimates the inverter output current value of the next switching cycle using the results of the previous cycle and provides a more precise control of the inverter output current and lower current shape distortions. However, the implementation of the predictive current controller is complicated and it requires a good understanding of the system parameters [4,33].
The authors of this work have found that when the proportional constant of the PI controller varies in time according to a certain law, the microinverter output current sinus shape distortions decrease as compared to the case when the ordinary PI controller is used. The novelty of this work is that a new modification of the PI controller with the variable proportional constant for tracking of the grid-connected photovoltaic microinverter output current has been proposed. This controller provides more effective suppression of higher harmonics as compared to ordinary PI controller. The operation of the proposed controller was investigated using it in the single stage photovoltaic microinverter based on a couple of two-switch DC-DC flyback converters. The photovoltaic grid-connected microinverter based on this topology [36,37], which was previously proposed by the authors of the paper, is characterized by the higher energy efficiency as compared to the microinverters with the traditional topology.
The obtained investigation results of the grid-connected photovoltaic microinverter using proposed modification of the PI controller are compared with these obtained using popular in microinverter applications ordinary PI controller. Matlab/Simulink (Mathworks; Natick, MA; USA) software was used for the investigation. Additionally, the experimental investigation of the proposed controller was performed.
The comparison of proposed controller with other more advanced controllers that can be used for current control, e.g., with proportional-resonant and predictive current controllers was not analyzed in this work because they are less popular in microinverter applications. On the other hand, it is self-evident without analysis that these controllers provide lower current distortions and lower steady-state error, but their implementation is more complicated [4], [32][33][34][35].

Control System for Tracking of the Grid-Connected Microinverter Output Current
The block diagram of a single stage photovoltaic microinverter based on a couple of two-switch DC-DC flyback converters [36] is given in Figure 1. The feedback control system for tracking of the sinusoidal reference has to be used to effectively suppress the higher harmonics of the output current. The purpose of the control system is to form the pulse width modulation (PWM) signals for the control of the microinverter switches in such a way that the shape of the output current of the inverter would be as close as possible to the sinus. The proposed structure of the microinverter control system is given in Figure 2. It presents the feedback control system for tracking of the sinusoidal setup signal. The PWM signal is formed by the comparator circuit, which compares the controller output signal with the saw-teeth signal. The instantaneous duty cycle of the PWM signal can be found using the following equation: where U(ti) is the controller output signal value at time moment ti, and UAst is the saw-tooth signal amplitude. The condition U(ti) ≤ UAst has to be satisfied. The first order low-pass filter is employed in the current feedback circuit ( Figure 2) to increase the stability of the controller operation under the influence of current ripples. The operation of the microinverter control system has to be synchronized with the mains power system. Therefore, the mains power system voltage phase has been observed using the voltage feedback circuit. The PWM signal provided by the comparator is conducted to the input HF control 1, i.e., to the switches Q1, Q4, and the potential that opens the switch Q5 is sent to the LF control 1 input (Figure 1) during the half period, at which the electric grid voltage is positive. During the negative half period the PWM signal has to be sent to the HF control 2 input (to switches Q2, Q3) and the potential that opens the transistor Q6-to the input LF control 2.

Analysis of the Microinverter Control System Based on the PI Controller
The behavior of the microinverter control system ( Figure 2) based on the ordinary PI controller was analyzed. The output signal of this controller is: where KP and KI are proportional and integral constants, t is time, t0 is the initial time, and e(t) is the control error that acts as the input signal of the controller. The inverter control system has to provide the sinus shape of the microinverter output current tracking the sine setup signal. The phase of the inverter current has to coincide with the mains power system voltage phase. The performance of the investigated inverter control system depends not only on the control algorithm of the controller but on the active resistances and inductive resistances of flyback transformer windings and the magnetizing inductance. It depends on the parameters of the output CL filter as well.
The parameters of flyback transformer and CL filter are presented in Table 1. The parameters of the PI controller were adjusted for the minimal total harmonic distortion (THD) of inverter output current. The obtained values of PI controller parameters are as follows: KP = 10, KI = 15. The microinverter output current for the case when the electric grid voltage shape is not distorted is presented in Figure 3. The analysis was provided for the microinverter output current with 200 mA, 400 mA and 600 mA amplitude, that correspond to 32 W, 62 W, and 97 W power delivered to the grid, respectively. It is seen (Figure 3) that the shape of the inverter output current is close to the sine. However, the high-frequency ripples are seen on the current curve. It has been estimated that the amplitude of the ripples strongly depends on the value of the PI controller proportional constant KP. The ripples decrease if the value of KP decreases. However, the shape of the current worsens and the phase shift of current is introduced at low KP. All results presented in the work have been obtained for the 28 kHz switching frequency of inverter switches. The microinverter output current spectra at the 32 W, 62 W, and 97 W load power obtained using the fast Fourier transform are given in Figure 4. It is seen that 37-43 and 79-83 harmonics are characterized by the highest amplitudes. The analysis of the harmonic spectrum shows that the THD, which is defined as the ratio of the root mean square (RMS) of the higher harmonics to the RMS of the fundamental 50 Hz harmonic, is 6.3% at 32 W, 6.6% at 62 W, and 5.5% at 97 W load power.  Figure 5 shows the analysis results of the microinverter output current when the electric grid voltage is distorted by third-and fifth-order harmonics. The curve of the grid voltage is described by the following equation: where is the fundamental harmonic component of 325 V; is the third-order harmonic voltage component of 55 V; is the fifth-order harmonic voltage component of 55 V. It is seen ( Figure 5) that at the microinverter load of 32 W the asymmetry of the current half-cycle is observed. The asymmetry decreases with increasing of the load power and it becomes almost unnoticeable at the 97 W load of the microinverter.
The microinverter output current spectra at the 32 W, 62 W, and 97 W load power are given in Figure 6. Using the data presented in spectra, it can be estimated that the THD of the output current is 9.9% at 32 W, 8.9% at 62 W, and 6.1% at 97 W load power, i.e., the distortions are higher as compared to values (6.3%, 6.6%, and 5.5%, respectively) that were obtained for the case when the electric grid voltage was not distorted. Therefore, the conclusion can be drawn that the electric grid voltage shape distortion by third-and fifth-order harmonics increase the output current distortion and this increment is higher at lower load.

PI Controller with the Variable Proportional Constant
The simulation results (Figures 3 and 5) show that the microinverter output current includes high-frequency ripples. The amplitude of the ripples depends on the aggressiveness of the proportional term of the PI controller, i.e., on the value of the proportional term KP. The amplitude of ripples decreases at lower KP. However, if KP is too low, the output current amplitude of the microinverter does not reach the set point value. If a higher value of KP is selected, the ripples of the microinverter output current increase. When evaluating the obtained results, one can assume that at a low current value that is close to zero it is more suitable to use a lower value of KP and at a high value that is close to the amplitude value it is necessary to select the value of KP higher.
Based on the conclusion made above, the assumption can be made that KP should be varied in proportion to the microinverter output current to reduce the ripples of the output current. The control algorithm of the suggested controller, which presents the PI controller with the variable proportional constant KP = KV(t) KC, is as follows: where KV(t) and KC are the time-varying and the constant terms of the proportional constant, respectively. The simulation results of microinveter control system show that low distortions of the microinverter output current shape are reached when KV(t) during every half period of the current changes in time with the current by the similar law. It was found that the same results are obtained if instead of the pure sinus law its piecewise linear approximation given in Figure 7 is used for the variation of the KV(t). The piecewise linear approximation was used because it is easier to implement. Equation (6) presents the piecewise linear dependents given in Figure 7. The parameters of piecewise linear approximation of KV(t) were estimated by variation of approximation parameters by the criterion of minimal THD of microinverter output current. . . (6) The block diagram of the microinverter control system based on the PI controller with the variable proportional constant created using Matlab/Simulink software is presented in Figure 8.

Analysis of the Microinverter Control System Based on the PI Controller with the Variable Proportional Constant
The operation of the microinverter control system based on the proposed PI controller with the variable proportional constant was analyzed at the 32 W, 62 W, and 97 W microinverter output power, which correspond to 200 mA, 400 mA, and 600 mA amplitudes of the microinverter load current, respectively.
The analyzed current trucking control system is nonlinear and the parameters of controller have to be adjusted for the minimal THD of inverter output current. Known classical PI controller tuning methods did not work in this case. The PI controller parameters can be tuned using optimization techniques in such a situation [38]. The univariate search method algorithm [39,40] was used for the tuning of controller parameters. This method is developed for the optimization of non-linear systems. During every iteration only one variable is varied to find its optimal value for the fixed initial values of another variables. After all variables are varied, the procedure is repeated again until the minimal (maximal) value of objective function is obtained.
The tuning aim of the proposed PI controller was to find the values of controller parameters KC and KI, at which the THD of the microinverter output current is minimal, i.e., the tuning leads to an optimization task with two variables. Using the univariate search method, the controller parameters were tuned as follows: at the fixed initial KC = KCi value, the KI = KIo1 value, at which the THD gets minimal, was obtained; at a fixed KI = KIo1 value, the KC = KCo1 value, at which the THD gets the minimum, was found. This process was repeated until the minimum THD value was obtained. The optimization procedure was also repeated with different initial KC = KCi values. The obtained values of parameters of PI controller with the variable proportional constant are as follows: KC = 10, KI = 15.
The microinverter output current and the grid voltage are presented in Figure 9. The obtained analysis results show that the employment of the proposed PI controller with the variable proportional constant allows us to reduce the high frequency ripples of the output current as compared with the case when the ordinary PI controller is used (compare current curves presented in Figure 9 with those given in Figure 3). The microinverter output current spectra at the 32 W, 62 W, and 97 W load power are given in Figure 10. Using the data presented in spectra, it can be estimated that the THD of the output current is 4.4% at 32 W, 3.4% at 62 W, and 3.3% at 97 W load power. The comparison of obtained THD values with these received for the case when the ordinary PI controller is used, showing that the employment of the proposed PI controller with the variable proportional constant allows us to reduce the THD of the microinverter output current by 30% at 32 W, by 48% at 62 W, and by 40% at 97 W load power. The investigation of the inverter output current using the proposed controller was also performed, when the electrical grid voltage was distorted by the third-and fifth-order harmonics and it is described by Equation (4). The current curves are presented in Figure 11. The comparison of obtained curves with those given in Figure 5, shows that employment of the PI controller with the variable proportional constant allows us to reduce the high frequency ripples as compared to the case when the ordinary PI controller is used. The microinverter output current spectra are presented in Figure 12. Using the data given in spectra, it can be estimated that the THD of the output current is 9.2% at 32 W, 6.0% at 62 W, and 4.5% at 97 W load power. Comparison of obtained THD values with these received for the case when the ordinary PI controller is used shows that employment of the proposed PI controller with the variable proportional constant allows us to reduce the THD of microinverter output current by 7% at 32 W, by 33% at 62 W, and by 26% at 97 W load power. The experimental investigation of the proposed controller using it in the single stage photovoltaic grid-connected microinverter based on a couple of two-switch DC-DC flyback converters was performed. The circuit diagram of the microinverter output stage is given in Figure  1. The types and parameters of transistors and diodes used in the output stage of the experimental model are given in Table 2. The parameters of flyback transformer and CL filter are presented in Table 1. The control system was implemented using digital signal controller dsPIC33FJ16GS504. The experimentally obtained current curves for the cases when the proposed PI controller with the variable proportional constant and conventional PI controller were used are given in Figure 13. The investigation was performed at the 600 mA output current amplitude. It is seen that the control system based on the proposed controller provides lover ripples of the current as compared to the case when the ordinary PI controller is used. The high frequency ripples that appear on the experimentally obtained microinverter output current curves and are not observed in the simulated curves are caused by the measurement noise, which is introduced by electromagnetic disturbances generated by the output stage of the microinverter. The voltage shape of the investigated electric grid (red curves in Figure 13) is slightly distorted by the nonlinear grid loads.  Figure 13. The microinverter output current (black curves) when using the ordinary PI controller (a) and the PI controller with the variable proportional constant (b). Red curves represent the electric grid voltage.
There are lots of topologies used for the realization of microinverters. The purpose of this work was to develop and to investigate the controller for the grid-connected microinverter with the topology based on a couple of two-switch DC-DC flyback converters [36], which was previously proposed by the authors of this paper. Therefore, it can be stated that the proposed controller with the proportional constant that varies by the law as shown by Equation (6) is suitable for microinverters with this particular topology. The investigation of the controller applicability for the microinveters with the other topologies was beyond the scope of this work.

Conclusions
1. The most popular controllers used for tracking of the grid-connected photovoltaic inverter output current in the industrial microinverters are PI and PID controllers. 2. The distortions of the grid-connected microinverter output current shape can be reduced when the proportional constant of the PI controller during every half period of the current changes in time with the current by the similar law. 3. The variation of the proportional constant in the proposed modification of the PI controller is realized by the introduction of the time-varying term, which varies according to the law presented by the piecewise linear approximation of the sinus. 4. The employment of the proposed PI controller with the variable proportional constant for tracking of the grid-connected photovoltaic microinverter output current instead of the ordinary PI controller allows us to reduce the THD of the output current by 30% at 32 W, by 48% at 62 W, and by 40% at 97 W load power when the electric grid voltage has a pure sinus shape and by 7% at 32 W, by 33% at 62 W and by 26% at 97 W-in the case when the grid voltage is distorted by the third-and fifth-order harmonics.
5. The experimental investigation results prove the superiority of the PI controller with the variable proportional constant over the ordinary PI controller. 6. The implementation of the proposed controller is more complicated as compared to the ordinary PI controller because the proportional constant in the proposed controller varies in time according to a certain law.