The Control Scheme of the Multifunction Inverter for Power Factor Improvement

: Grid-connected photovoltaic (PV) systems require an inverter that allows an efﬁcient integration between the panels and the grid; however, the operation of conventional inverters is limited to the periods of power generation by the panels. This paper proposes a control scheme based on the theory of passivity to provide additional functions to the inverter of a PV system. These additional functions improve the power quality; for example, when loads demand inductive currents be connected, the power factor is improved independently of the intermittency of the solar energy source. The performance of the system with the passivity-based control is veriﬁed by simulation and experimentation using MATLAB/Simulink ® (2017a, MathWorks, Natick, MA, USA). in dynamics in the grid current conﬁrmed the injection of the excess active power, and its phase indicated the compensation of the reactive power generated by the load. The multifunction inverter injected the reactive power needed, and successfully regulated the current supplied to the PCC within almost one cycle. This test validated the stability of the PV system during the initialization of the inverter and in its reactive power compensation function.


Introduction
Recently, many researchers have focused on solar energy as the best option to contribute to energy diversification with clean energy, as this renewable source is available everywhere in the world, is unlimited, and contributes to mitigating climate change. The photovoltaic (PV) panel converts solar radiation into direct current electricity by using semiconductors that exhibit the photovoltaic effect [1]. Cost-effectiveness is the primary constraint on the use of PV systems, and this factor is determined by the total cost of the required components for the system, as well as the maximum exploitation of the energy generated. Conversely, in the operation of grid-connected PV systems, the challenge of increasing the reliability of the power supply arises from the fact that the amount of electric power generated by solar panels changes continuously with weather conditions [2], and is also limited by the intermittent availability of solar radiation. Moreover, its operation is affected by quality problems in the distribution stage of the grid-connected PV systems [3]. One of the most severe problems of power quality is the low power factor. The proliferation of motors, transformers, and discharge lamps, as well as the reactance of distribution and transmission systems, degrade the power quality in the power distribution supply [4], increase the value of line current, and generate a low power factor (PF).
One important reason for connecting power electronic equipment to the grid is to inject only a limited amount of harmonic voltages and currents; the IEEE standard establishes a method to reduce the harmonics in the power system by limiting the harmonic current that a user can inject into the grid [1]. Therefore, power factor correction is fundamental in achieving a high power factor, and complying with the relevant input current harmonic standards [5]. Much research has been directed toward improving renewable energy source-based power quality in power distribution systems. Thus, the challenge is to satisfy the demand for quality energy without compromising the availability and reliability of the electricity supply. It is known that inverters are a determining factor in the conversion and management of power in this sense; therefore, they affect the efficiency, lifetime, and size of PV systems [6,7].
An approach to solving the power quality problem is to make inverters able to efficiently manage active and reactive power in the grid [8]. Consequently, the design of multifunction inverters is a significant development for efficient PV systems, and represents an option for improving the power quality to the grid. Based on similar structures and principles of operation, inverters can also be used as reactive power compensators [9,10]. The inverters are also able to perform active filtering functions, thereby decreasing the total harmonic distortion (THD) [11,12]. Additionally, it is possible to extend the operation of the inverters in moments of an absence of power generation in the source, acting as an active power filter on rainy days for example [13], or continuing the operation in reactive power compensation mode during night hours [14]. The control algorithm is the determining factor for providing additional features to inverters, and extending their operation in periods of absence of power generation. Studies that incorporated devices that provided a virtual power supply have reported that the interconnection of the supercapacitor (SC) module provided stability in power systems during periods of power interruption [15]. The SC module provided active and reactive power to the grid in energy management systems based on a static synchronous compensator (STATCOM), thus improving the transient stability of the system [16,17].
Conversely, the topology of the PV system with multifunction inverters offers the advantage of being able to eliminate a line frequency transformer, thereby reducing costs without affecting the overall efficiency. The use of a transformer guarantees the galvanic isolation of the photovoltaic array from the grid. Apart from this advantage, the transformer adds weight to the converter and deteriorates the system efficiency [18]. Transformerless grid-tied inverters are studied due to their high efficiency, low cost, small volume, and light weight. However, since panels in PV systems have a direct electrical connection with the power grid by the PV-to-ground, the leakage current can flow through this loop. The leakage current might potentially lead to a series of problems, like current harmonics [19]. PV Systems with multifunction inverters can mitigate or limite these currents, given that the inverter can perform filtering functions, not including additional passive filters. Therefore, there are neither losses nor reductions in the conversion efficiency. Based on the above, the importance of providing multiple functions to inverters is evident; therefore, it is essential to obtain maximum efficiency, and to ensure quality power delivery.
The contribution of this work is to grant the capacity of reactive power compensation to the PV inverter under any condition of power generation; this main objective is obtained with the development of a passivity-based control (PBC). The proposed strategy is improving power quality and reliability supplied by low power grid-connected PV systems. Additionally, the incorporation of an SC module and PI-based Voltage Control ensures the effective operation of the grid-connected inverter under any operating conditions of the PV system and the grid. The current references are carried by the DQ transformation, the PI control loop, and the power estimator. Therefore, the PBC generates the control signal for the tracking of this reference. The correct operation tuning between the current control loop and the PI voltage control provides appropriate reactive power support under intermittent power generation conditions, including the absence of PV generation. This scheme of control allows the PV system to operate 24/7, improving the power factor and offering the support to the grid as needed. The development of multifunction inverters allows for highly efficient PV systems with fewer required elements, thereby reducing cost, size, and weight. The performance of the system with passivity-based control was evaluated through MATLAB/Simulink ® .
The rest of this paper is organized into five sections. Following the introduction, the system description is introduced in Section 2, and the mathematical model is derived to obtain the model of the inverter. The two control loops are described and presented in Section 3. In that section, the authors specified the passivity-based technique for the current control and the PI control for the voltage loop.
The simulation results are introduced in Section 4, as well the experimental results that demonstrate the efficiency and applicability of the developed control strategy are show in Section 5. Finally, conclusions are presented in Section 6.

System Description
The grid-connected renewable power system, as shown in Figure 1, is completed by a solar PV array, an SC module, an inverter, and an inductor filter. The power source of the system is the solar PV array, that is connected to the SC module and the inverter through a power diode, which prevents the return of the electrical current from grid current to the solar PV array. Due to being a low power system and the fact that the voltage supplied by the PV panels complies with the requirements demanded by the load, the grid-connected PV system design is not considered for the incorporation of the converter. It was not considered in the control scheme design as a means of increasing the tension and the MPPT calculation (Maximum Power Point Tracking) in this case. The objective is to demonstrate the power factor improvement by the multifunction inverter in the absence of power generation by the PV panels. Additionally, a converter was not incorporated because it would generate an additional load for the power system. The H-bridge topology inverter, was considered in this work since it is the most widely used in grid-connected PV inverters [20]. An inductive filter RL was placed between the inverter output and grid to minimize the current ripple. The inverter of the system presented in Figure 1 is switched; therefore, its structure changes depending on the state of the power switches S 1 , S 2 , S 3 , and S 4 , and the diode D. Consider two control signals u and m, where u defines the state of the power switches for two-level operation and m is the state of D. The four equivalent circuits presented in Figure 2 are obtained to analyze inverter behavior. The inductive filter current is established, as shown in every circuit. Figure 2a displays that the diode D is conducting (m = 0) as the voltage generated by PV array (V PV ) is higher than the grid peak voltage (V AC peak ). The solar PV array is virtually parallel connected to the SC module in this case, so their voltages are practically equal. Consequently, the PV array is considered as the voltage source for the power system. demonstrate the efficiency and applicability of the developed control strategy are show in Section 5. Finally, conclusions are presented in Section 6.

System Description
The grid-connected renewable power system, as shown in Figure 1, is completed by a solar PV array, an SC module, an inverter, and an inductor filter. The power source of the system is the solar PV array, that is connected to the SC module and the inverter through a power diode, which prevents the return of the electrical current from grid current to the solar PV array. Due to being a low power system and the fact that the voltage supplied by the PV panels complies with the requirements demanded by the load, the grid-connected PV system design is not considered for the incorporation of the converter. It was not considered in the control scheme design as a means of increasing the tension and the MPPT calculation (Maximum Power Point Tracking) in this case. The objective is to demonstrate the power factor improvement by the multifunction inverter in the absence of power generation by the PV panels. Additionally, a converter was not incorporated because it would generate an additional load for the power system. The H-bridge topology inverter, was considered in this work since it is the most widely used in grid-connected PV inverters [20]. An inductive filter was placed between the inverter output and grid to minimize the current ripple. The inverter of the system presented in Figure 1 is switched; therefore, its structure changes depending on the state of the power switches , , , and , and the diode . Consider two control signals and , where defines the state of the power switches for two-level operation and is the state of . The four equivalent circuits presented in Figure 2 are obtained to analyze inverter behavior. The inductive filter current is established, as shown in every circuit. Figure 2a displays that the diode is conducting ( = 0) as the voltage generated by PV array ( ) is higher than the grid peak voltage ( ). The solar PV array is virtually parallel connected to the SC module in this case, so their voltages are practically equal. Consequently, the PV array is considered as the voltage source for the power system.  Finally, conclusions are presented in Section 6.

System Description
The grid-connected renewable power system, as shown in Figure 1, is completed by a solar PV array, an SC module, an inverter, and an inductor filter. The power source of the system is the solar PV array, that is connected to the SC module and the inverter through a power diode, which prevents the return of the electrical current from grid current to the solar PV array. Due to being a low power system and the fact that the voltage supplied by the PV panels complies with the requirements demanded by the load, the grid-connected PV system design is not considered for the incorporation of the converter. It was not considered in the control scheme design as a means of increasing the tension and the MPPT calculation (Maximum Power Point Tracking) in this case. The objective is to demonstrate the power factor improvement by the multifunction inverter in the absence of power generation by the PV panels. Additionally, a converter was not incorporated because it would generate an additional load for the power system. The H-bridge topology inverter, was considered in this work since it is the most widely used in grid-connected PV inverters [20]. An inductive filter was placed between the inverter output and grid to minimize the current ripple. The inverter of the system presented in Figure 1 is switched; therefore, its structure changes depending on the state of the power switches , , , and , and the diode . Consider two control signals and , where defines the state of the power switches for two-level operation and is the state of . The four equivalent circuits presented in Figure 2 are obtained to analyze inverter behavior. The inductive filter current is established, as shown in every circuit. Figure 2a displays that the diode is conducting ( = 0) as the voltage generated by PV array ( ) is higher than the grid peak voltage ( ). The solar PV array is virtually parallel connected to the SC module in this case, so their voltages are practically equal. Consequently, the PV array is considered as the voltage source for the power system.  Additionally, the state of the power switches is such that the inverter voltage output is positive. The corresponding circuit equation is: (1) Figure 2b shows the diode is also conducting ( = 0); however, the state of the power switches makes the inverter voltage output negative. The corresponding circuit equation is: Figure 2c shows that diode is blocked ( = 1), because is lower than and SC module voltage ( ). Thus, the SC module is considered to be a voltage source for the power system to allow for reactive power compensation. The state of the power switches is such that the inverter voltage output is positive. The corresponding circuit equations are: Finally, in Figure 2d, the diode ( = 1) is also blocked, and the state of the power switches makes the inverter voltage output negative. The corresponding circuit equations are: According to Equations (1)-(6), the mathematical model of the system is described as follows:

Scheme of Control
Conventional PV inverters inject active power from a solar PV array to the grid; however, in this work, power factor improvement is proposed as an additional function. The control objectives of this study are to track the current of the inductor and regulate the voltage of the SC.

Current Control
The purpose of the current control loop is to track the current reference to inject reactive power to the grid and compensate the low power factor generated by the inductive load. This control loop is based on passivity (PBC), as this control strategy increases the dynamic response by modifying the damping of the system by considering the nonlinear features of the system [21]. It is possible to apply this technique when the system dissipates energy where the relative degree is one; this Additionally, the state of the power switches is such that the inverter voltage output is positive. The corresponding circuit equation is: Figure 2b shows the diode D is also conducting (m = 0); however, the state of the power switches makes the inverter voltage output negative. The corresponding circuit equation is: Figure 2c shows that diode D is blocked (m = 1), because V PV is lower than V PV and SC module voltage (V SC ). Thus, the SC module is considered to be a voltage source for the power system to allow for reactive power compensation. The state of the power switches is such that the inverter voltage output is positive. The corresponding circuit equations are: Finally, in Figure 2d, the diode D (m = 1) is also blocked, and the state of the power switches makes the inverter voltage output negative. The corresponding circuit equations are: According to Equations (1)-(6), the mathematical model of the system is described as follows:

Scheme of Control
Conventional PV inverters inject active power from a solar PV array to the grid; however, in this work, power factor improvement is proposed as an additional function. The control objectives of this study are to track the current of the inductor and regulate the voltage of the SC.

Current Control
The purpose of the current control loop is to track the current reference to inject reactive power to the grid and compensate the low power factor generated by the inductive load. This control loop is based on passivity (PBC), as this control strategy increases the dynamic response by modifying the damping of the system by considering the nonlinear features of the system [21]. It is possible to apply this technique when the system dissipates energy where the relative degree is one; this approach is valid for ensuring a wide operating range and high stability [22]. This kind of system exhibits the particular structure, presented in Equation (9): where A is a constant diagonal matrix, J is a skew symmetric matrix that represents the conservative forces, and the positive-semidefinite matrix R represents the dissipative forces in the system [23].
The control input channels are represented by the constant matrix B, and E is the energy acquisition term obtained from the components that inject energy into the system.
Considering the system described in Equation (10), this exogenous system is a copy of the system shown in Equation (9) with enhanced damping, which is active only when the tracking error e = x − x * is non-zero, and which precisely coincides with the original system dynamics when the tracking error is null [24]. The state vector is represented by x, the desired state vector is x * , where the current (i L * ) and tension (V SC * ) references to the control are defined. The damping injection plus energy shaping controller R p represents a nominal desired trajectory for the inverter circuit model, which is a positive semi-definite matrix; therefore, R + R p > 0, which represents the increment in the damping factor, is deemed to be desirable. Furthermore, the controllability of the system guarantees the possibility of tracking such a state trajectory via a suitable feedback control law. The exogenous system in Equation (10) is accomplished by defining the matrices as follows: According to Equations (10)-(11), now it is possible to define a dynamic controller by Equation (12): where: given that the control designed has a dynamic behavior and makes use of V x , which is an additional virtual variable and represents the ideal voltage behavior in the SC. The proposed methodology results in an output dynamic feedback controller which induces a shaped closed loop energy, and enhances the closed loop damping of the system [23]. The asymptotical stability of the closed-loop system is assured with R + R p > 0; however, the convergence time is dependent on the selection of the value of R pp .

Voltage Control
A DC/DC stage regulates the DC bus voltage of the inverter in a typical configuration of the grid-tie inverters. Therefore, when the active power generation is not available through the PV array, the DC/DC stage is inactive [14]. The DC/DC stage can be omitted in this case, because with an appropriate control scheme, the SC voltage can be regulated to allow the inverter to continue the reactive power compensation, even without the presence of active power. Assuming a fast and stable dynamic in the current loop, it is possible to rewrite Equation (8) as follows: where Now, considering f (i L , u, m) as an input function of the dynamics of V SC based on Equation (14), the transfer function relating the SC voltage with this input function is described by: Since Equation (17) represents a first order system, this can be controlled by the Proportional + Integral (PI) compensator presented in Equation (18), where the proportional (K p ) and integral (K i ) gains determine the transient response.

Current Reference
A fundamental issue in control is determining the compensation reference. This signal must include information from the reactive power generated by the connected load. The current reference is obtained according to the DQ transformation for single-phase systems, and then a stationary reference frame is obtained. One of the main advantages of DQ theory is that it only needs one of the two electrical variables to be compensated: voltage or current. Furthermore, the fundamental component of the variable is mapped as a constant, which means simpler calculations when performing compensation in real time. Using single-phase systems, the DQ transformation proposed in [25] is given by: where i d represents the components in phase with V AC , and i q includes the components in quadrature with V AC ; sin(ωt) is a sinusoidal signal with the same frequency and phase as those of the fundamental component of V AC ; I Ld is the inductive current; and finally, i im = i Ld < −90• . The current reference (i * L ) only contains information related to the reactive power, then based on DQ theory; thus, the component i q represents all components necessary for reactive power compensation. However, these signals do not include power active information. This is determined by two conditions. When V PV > V AC peak , the PV array power is injected to the grid. Consequently, direct current power is the same as the alternating current. When V PV ≤ V AC peak , active power is not injected; however, a small flow of active power toward the SC is necessary to regulate its voltage. Therefore, the PI compensator output provides the information for this task. The complete expression of the components in phase with V AC peak is given below: (20) where I PV is the current of the PV array; eV = V * SC − V SC is the voltage error in the SC; and η = eVdt is the integral of the voltage error in the SC. Finally, the reference i * L is obtained from i q , which does not require additional processing to apply the inverse DQ transformation.
The complete control scheme is presented in Figure 3. The phase-locked loop (PLL) is a control system block for synchronization, providing the angle (phase locked loop) or frequency (frequency locked loop) of the grid. The estimated phase is feedback on DQ transformation, with synchronization on axis q. The synchronization voltage has only component d on the axes DQ. Regarding the control, the design uses Zero-Crossing. This type of PLL accepts sinusoidal signals, and samples only on the positive-going zero crossings. Such a process is simple to implement, the easiest to model, and its operation and performance are indicative of the general purpose. The complete control scheme is presented in Figure 3. The phase-locked loop (PLL) is a control system block for synchronization, providing the angle (phase locked loop) or frequency (frequency locked loop) of the grid. The estimated phase is feedback on DQ transformation, with synchronization on axis q. The synchronization voltage has only component d on the axes DQ. Regarding the control, the design uses Zero-Crossing. This type of PLL accepts sinusoidal signals, and samples only on the positive-going zero crossings. Such a process is simple to implement, the easiest to model, and its operation and performance are indicative of the general purpose.

Simulation Results
To analyze the behavior of the multifunction inverter, several tests were conducted in the MATLAB/Simulink ® environment. Operation modes are described for different power system operating conditions: (i) Startup response: the response when the inverter is initialized and the power factor correction function is enabled. (ii) Transitory response: the behavior of the inverter under intermittent generation conditions. (iii) Stable response: the operation of the inverter with and without power generation.
The efficiency was measured based on the PF achieved. Based on the control scheme of the power system (Figure 3), and due to the nominal voltage of the SC module, a transformer was used as an interface between the power system and the grid. The parameters of the power system are given in Table 1, and the parameters of the control scheme are exhibited in Table 2. An inductive load reference in all the simulation results was connected to the PLL, denoted by . Figure 4 shows the grid voltage ( ) and current ( ). The displacement was observed for both generated waves when the reference inductive load was connected. This load caused a power factor of 0.92.

Simulation Results
To analyze the behavior of the multifunction inverter, several tests were conducted in the MATLAB/Simulink ® environment. Operation modes are described for different power system operating conditions: (i) Startup response: the response when the inverter is initialized and the power factor correction function is enabled. (ii) Transitory response: the behavior of the inverter under intermittent generation conditions. (iii) Stable response: the operation of the inverter with and without power generation.
The efficiency was measured based on the PF achieved. Based on the control scheme of the power system (Figure 3), and due to the nominal voltage of the SC module, a transformer was used as an interface between the power system and the grid. The parameters of the power system are given in Table 1, and the parameters of the control scheme are exhibited in Table 2. An inductive load reference in all the simulation results was connected to the PLL, denoted by I Ld . Figure 4 shows the grid voltage (V AC ) and current (I AC ). The displacement was observed for both generated waves when the reference inductive load was connected. This load caused a power factor of 0.92.

Startup Response
The first simulation corresponded to the startup response of the inverter with the inductive load connected. The waveform of , and the inverter current ( ) are shown in Figure 5. During time = 0 s to = 0.3 s, the inverter was disabled, and the displacement observed in the and waves occurred because the reactive power demand of the load was supplied by the . Occurring at time t = 0.3 s, the inverter was enabled and the power factor, the function defined by the implementation of the proposed control scheme, was initialized. First, it was observed that was in phase with . This was due to the reactive power compensation function of the inverter being enabled, and the current injected into the compensating for the reactive power generated by . Conversely, it was also observed that the was in contra phase to the . This was because the active power generated by the PV panels ( ) was sufficient to meet the demand of the load, and the excess was supplied to the grid by the inverter.

Startup Response
The first simulation corresponded to the startup response of the inverter with the inductive load connected. The waveform of I AC , V AC and the inverter current (i L ) are shown in Figure 5. During time t = 0 s to t = 0.3 s, the inverter was disabled, and the displacement observed in the V AC and I AC waves occurred because the reactive power demand of the load was supplied by the I AC .
Occurring at time t = 0.3 s, the inverter was enabled and the power factor, the function defined by the implementation of the proposed control scheme, was initialized. First, it was observed that I AC was in phase with V AC . This was due to the reactive power compensation function of the inverter being enabled, and the current injected into the I AC compensating for the reactive power generated by I Ld . Conversely, it was also observed that the I AC was in contra phase to the V AC . This was because the active power generated by the PV panels (V PV ) was sufficient to meet the demand of the load, and the excess was supplied to the grid by the inverter.

Transitory Response
The second simulation corresponded to the performance of the inverter in conditions of intermittent generation. Figure 6 shows the and profile. During the time = 0.25 s to = 0.62 s, the active power was available; then > and, as detailed above, the excess of active power was supplied to the grid.
During the time = 0.62 s to = 1.0 s, there was no active power generation. When < , it generated the reference that activated the PI control loop. It is observed in Figure 6 that the voltage in the did not drop in the moment in which both control loops began to work together due to the rapid response by the proportional part of the PI control, maintaining the at its reference value. During periods of intermittent or null power generation, when the PV array voltage dropped under the peak value of the grid, the SC module was the voltage source for the power system, thus allowing reactive power compensation. The voltage control loop began to provide the reference to ensure that the was maintained at a voltage reference value to facilitate the active and reactive power flow between the SC module and the grid, which allowed the inverter to continue generating the compensation current reference. The waveform of , and are shown in Figure 7. Upon reaching time = 0.62 s, there was no active power available, during which time the dynamics of the amplitude of changed to be in phase with the . Although, there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated for the reactive power generated by the inductive load. The voltage level of the > and the active power flow between the SC and the grid both allowed the inverter to continue with the generation of compensation references.

Transitory Response
The second simulation corresponded to the performance of the inverter in conditions of intermittent generation. Figure 6 shows the V PV and V SC profile. During the time t = 0.25 s to t = 0.62 s, the active power was available; then V PV > V peak and, as detailed above, the excess of active power was supplied to the grid.
During the time t = 0.62 s to t = 1.0 s, there was no active power generation. When V PV < V peak , it generated the reference that activated the PI control loop. It is observed in Figure 6 that the voltage in the V SC did not drop in the moment in which both control loops began to work together due to the rapid response by the proportional part of the PI control, maintaining the V SC at its reference value. During periods of intermittent or null power generation, when the PV array voltage dropped under the peak value of the grid, the SC module was the voltage source for the power system, thus allowing reactive power compensation. The voltage control loop began to provide the reference to ensure that the V SC was maintained at a voltage reference value to facilitate the active and reactive power flow between the SC module and the grid, which allowed the inverter to continue generating the compensation current reference.

Transitory Response
The second simulation corresponded to the performance of the inverter in conditions of intermittent generation. Figure 6 shows the and profile. During the time = 0.25 s to = 0.62 s, the active power was available; then > and, as detailed above, the excess of active power was supplied to the grid.
During the time = 0.62 s to = 1.0 s, there was no active power generation. When < , it generated the reference that activated the PI control loop. It is observed in Figure 6 that the voltage in the did not drop in the moment in which both control loops began to work together due to the rapid response by the proportional part of the PI control, maintaining the at its reference value. During periods of intermittent or null power generation, when the PV array voltage dropped under the peak value of the grid, the SC module was the voltage source for the power system, thus allowing reactive power compensation. The voltage control loop began to provide the reference to ensure that the was maintained at a voltage reference value to facilitate the active and reactive power flow between the SC module and the grid, which allowed the inverter to continue generating the compensation current reference. The waveform of , and are shown in Figure 7. Upon reaching time = 0.62 s, there was no active power available, during which time the dynamics of the amplitude of changed to be in phase with the . Although, there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated for the reactive power generated by the inductive load. The voltage level of the > and the active power flow between the SC and the grid both allowed the inverter to continue with the generation of compensation references. The waveform of I AC , V AC and i L are shown in Figure 7. Upon reaching time t = 0.62 s, there was no active power available, during which time the dynamics of the amplitude of I AC changed to be in phase with the V AC . Although, there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated for the reactive power generated by the inductive load. The voltage level of the V SC > V AC Tm and the active power flow between the SC and the grid both allowed the inverter to continue with the generation of compensation references.

Stable Response
The last simulation corresponded to the performance of the inverter in stable conditions of generation. Figure 8 shows the dynamics of the waveform of , and . The operation of the inverter when the active power was available is shown in Figure 8a. During the time = 0.4 s to = 0.5 s, the inductive load was connected, and the system behavior was determined by power generation from the PV array. The amplitude of the was dependent on the active power generated by the PV array, and the reactive power to be compensated. It was also observed that became negative because the grid-connected inverter supplied the load reactive power demand. Therefore, the grid only supplied/received fundamental active power [26]. The amplitude of the indicated that the load power demand was supplied by active power generated by PV array.
The operation of the inverter without power generation from the PV array is shown in Figure  8b. During the time = 0.7 s to = 0.8 s, the inductive load was connected and system behavior was determined by the fact that both control loops began to work together. The waveform of was in phase with . Although there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated the reactive power generated by the inductive load. The voltage level of the > and the active power flow between the SC and the grid both allowed the inverter to continue with the generation of compensation references.
The control efficiency was determined in all cases by the power factor value. The PF was improved by remaining at a value of 0.99, which was within the limits of the allowable operating PF established in Mexico [27]. The amplitude of the fundamental when there was a generation source represented the active power supplied to the grid. This current was obtained from the value of power supplied by the PV array ( ) and . According to the relation = 2 / , the maximum current given by the PV array was 5.28 A. The excess active power supplied to the grid after covering the demand of the connected loads was indicated by the amplitude of the fundamental. Conversely, without power generation, the amplitude of the fundamental indicated the active power supplied by the grid for the power factor improvement by the inverter.

Stable Response
The last simulation corresponded to the performance of the inverter in stable conditions of generation. Figure 8 shows the dynamics of the waveform of I AC , V AC and i L . The operation of the inverter when the active power was available is shown in Figure 8a. During the time t = 0.4 s to t = 0.5 s, the inductive load was connected, and the system behavior was determined by power generation from the PV array. The amplitude of the i L was dependent on the active power generated by the PV array, and the reactive power to be compensated. It was also observed that I AC became negative because the grid-connected inverter supplied the load reactive power demand. Therefore, the grid only supplied/received fundamental active power [26]. The amplitude of the I AC indicated that the load power demand was supplied by active power generated by PV array.
The operation of the inverter without power generation from the PV array is shown in Figure 8b. During the time t = 0.7 s to t = 0.8 s, the inductive load was connected and system behavior was determined by the fact that both control loops began to work together. The waveform of I AC was in phase with V AC . Although there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated the reactive power generated by the inductive load. The voltage level of the V SC > V AC Tm and the active power flow between the SC and the grid both allowed the inverter to continue with the generation of compensation references.
The control efficiency was determined in all cases by the power factor value. The PF was improved by remaining at a value of 0.99, which was within the limits of the allowable operating PF established in Mexico [27]. The amplitude of the fundamental when there was a generation source represented the active power supplied to the grid. This current was obtained from the value of power supplied by the PV array (P PV ) and V AC . According to the relation I peak = 2P/ V AC Tm , the maximum current given by the PV array was 5.28 A. The excess active power supplied to the grid after covering the demand of the connected loads was indicated by the amplitude of the fundamental. Conversely, without power generation, the amplitude of the fundamental indicated the active power supplied by the grid for the power factor improvement by the inverter.

Experimental Results
To prove the feasibility of the proposed control scheme, a low power PV system prototype was built. This section presents the laboratory scale implementation and experimental results. Figure 9 shows the laboratory scale system employed in the experimental part. The tests were carried out using CY8CKIT-059 PSoC ® (5LP, Cypress Semiconductor Corp., San Jose, CA, USA) hardware for the real-time implementation. The test bank is depicted in Figure 10. The connection diagram of the lab setup for the proposed PV system is shown in Figure 9. A 150 kW Chroma PV Simulator was employed to simulate the behavior of the PV solar panels. An SC module was assembled with seven SC (100 F−2.7 V)

Experimental Results
To prove the feasibility of the proposed control scheme, a low power PV system prototype was built. This section presents the laboratory scale implementation and experimental results. Figure 9 shows the laboratory scale system employed in the experimental part. The tests were carried out using CY8CKIT-059 PSoC ® (5LP, Cypress Semiconductor Corp., San Jose, CA, USA) hardware for the real-time implementation.

Experimental Results
To prove the feasibility of the proposed control scheme, a low power PV system prototype was built. This section presents the laboratory scale implementation and experimental results. Figure 9 shows the laboratory scale system employed in the experimental part. The tests were carried out using CY8CKIT-059 PSoC ® (5LP, Cypress Semiconductor Corp., San Jose, CA, USA) hardware for the real-time implementation. The test bank is depicted in Figure 10. The connection diagram of the lab setup for the proposed PV system is shown in Figure 9. A 150 kW Chroma PV Simulator was employed to simulate the behavior of the PV solar panels. An SC module was assembled with seven SC (100 F−2.7 V) The test bank is depicted in Figure 10. The connection diagram of the lab setup for the proposed PV system is shown in Figure 9. A 150 kW Chroma PV Simulator was employed to simulate the behavior of the PV solar panels. An SC module was assembled with seven SC (100 F−2.7 V) manufactured by Nexus, with six SC (100 F−2.7 V) supplied by IC, and with an SC module (58 F-16.2 V), manufactured by Maxwell. Connecting all the devices in series, a module of 6.78 F and 51.3 V was obtained. A single-phase inverter IPES-2K5-4510 (UADY, Mérida, Yucatán, Mexico) based on Insulated Gate Bipolar Transistor (IGBTs) DC bus voltage of 630 VDC and 20 Amp maximum output current with 12 kHz switching frequency was chosen as the PV system inverter.
An L filter was installed after the inverter to remove the harmonic frequencies generated by switching. A 127 V/24 V 5 Amp interface transformer was used for interconnecting the PV system to PCC. Three voltage and current sensor cards were designed to measure PCC voltage, inverter current, load current, and PV Simulator voltage. The power stage and control parameters, as well as the load reference used, were the same as those used in the simulation. The control scheme was implemented on CY8CKIT-059 PSoC ® card. The sensor signals were read through Analog-to-digital converter (ADC) channels. The development card processes and through the pulse width modulation (PWM) signals generated the pulses into firing pulses for the IGBT gates of the inverter based on the passivity-based control objectives and operation modes programmed. The dead-band time was chosen as 580 ns, so the PWM signals could avoid inverter bridge shoot through. An L filter was installed after the inverter to remove the harmonic frequencies generated by switching. A 127 V/24 V 5 Amp interface transformer was used for interconnecting the PV system to PCC. Three voltage and current sensor cards were designed to measure PCC voltage, inverter current, load current, and PV Simulator voltage. The power stage and control parameters, as well as the load reference used, were the same as those used in the simulation. The control scheme was implemented on CY8CKIT-059 PSoC ® card. The sensor signals were read through Analog-to-digital converter (ADC) channels. The development card processes and through the pulse width modulation (PWM) signals generated the pulses into firing pulses for the IGBT gates of the inverter based on the passivity-based control objectives and operation modes programmed. The dead-band time was chosen as 580 ns, so the PWM signals could avoid inverter bridge shoot through.

Startup Response
The first experimental result corresponded to the startup response of the inverter with the inductive load connected. Tektronix oscilloscope (TDS2022C) with time scale 10 ms/div was used to capture the waveforms. An inductive load reference was connected on the PCC, which is shown in Figure 11 to yield the power factor that was generated. Figure 12 depicts the waveform of , , and . During this mode, from the time = 0 s to = 50 ms, the inverter and the power factor function was disabled, the inductive load reference was connected on the PCC denoted by , and, hence, the amplitude of and were equal. Therefore, in Figure 12 the displacement between the voltage and grid current generated by the demand of this inductive load is shown. Upon reaching time = 50 ms, the CY8CKIT-059 PSoC ® development card started working, the inverter was enabled, and power factor function was initialized. Therefore, the grid current became negative. This change in dynamics in the grid current confirmed the injection of the excess active power, and its phase indicated the compensation of the reactive power generated by the load. The multifunction inverter injected the reactive power needed, and successfully regulated the current supplied to the PCC within almost one cycle. This test validated the stability of the PV system during the initialization of the inverter and in its reactive power compensation function.

Startup Response
The first experimental result corresponded to the startup response of the inverter with the inductive load connected. Tektronix oscilloscope (TDS2022C) with time scale 10 ms/div was used to capture the waveforms. An inductive load reference was connected on the PCC, which is shown in Figure 11 to yield the power factor that was generated. Figure 12 depicts the waveform of I AC , V AC , i L and I Ld . During this mode, from the time t = 0 s to t = 50 ms, the inverter and the power factor function was disabled, the inductive load reference was connected on the PCC denoted by I Ld , and, hence, the amplitude of I Ld and I AC were equal. Therefore, in Figure 12 the displacement between the voltage and grid current generated by the demand of this inductive load is shown. Upon reaching time t = 50 ms, the CY8CKIT-059 PSoC ® development card started working, the inverter was enabled, and power factor function was initialized. Therefore, the grid current became negative. This change in dynamics in the grid current confirmed the injection of the excess active power, and its phase indicated the compensation of the reactive power generated by the load. The multifunction inverter injected the reactive power needed, and successfully regulated the current supplied to the PCC within almost one cycle. This test validated the stability of the PV system during the initialization of the inverter and in its reactive power compensation function.

Transitory Response
The second experimental result corresponded to the performance of the inverter in conditions of an intermittent generation with the inductive load connected. Figure 13 depicts the waveform of , and . During this mode, the inductive load reference was connected on the PCC, and as shown in Figure 13a, the transition occurred when the active power generation by PV panels stopped being available. During the time = 0 s to = 45 ms, the active power by the PV was available > , and the excess of active power was supplied to the grid. Upon reaching time t = 50 ms, the change in dynamics in the grid current confirmed that there was no active power generation; the amplitude and phase of changed. Regarding the , although there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated the reactive power generated by the inductive load. When < , the reference that activated the PI control loop was generated. It was observed that the voltage in the did not drop at the moment in which both control loops began to work together; a variation in the waveforms was influenced by the noise generated during the measurements. The SC module > was the voltage source for the power system and the active power flow between the SC and the grid, both of which allowed the inverter to continue with the generation of compensation references. Conversely, Figure 13b shows that the transition occurred when the active power generated by PV panels began to become available. The stability of the system in both cases was maintained, and the reactive power

Transitory Response
The second experimental result corresponded to the performance of the inverter in conditions of an intermittent generation with the inductive load connected. Figure 13 depicts the waveform of , and . During this mode, the inductive load reference was connected on the PCC, and as shown in Figure 13a, the transition occurred when the active power generation by PV panels stopped being available. During the time = 0 s to = 45 ms, the active power by the PV was available > , and the excess of active power was supplied to the grid. Upon reaching time t = 50 ms, the change in dynamics in the grid current confirmed that there was no active power generation; the amplitude and phase of changed. Regarding the , although there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated the reactive power generated by the inductive load. When < , the reference that activated the PI control loop was generated. It was observed that the voltage in the did not drop at the moment in which both control loops began to work together; a variation in the waveforms was influenced by the noise generated during the measurements. The SC module > was the voltage source for the power system and the active power flow between the SC and the grid, both of which allowed the inverter to continue with the generation of compensation references. Conversely, Figure 13b shows that the transition occurred when the active power generated by PV panels began to become available. The stability of the system in both cases was maintained, and the reactive power

Transitory Response
The second experimental result corresponded to the performance of the inverter in conditions of an intermittent generation with the inductive load connected. Figure 13 depicts the waveform of I AC , I Ld and V SC . During this mode, the inductive load reference was connected on the PCC, and as shown in Figure 13a, the transition occurred when the active power generation by PV panels stopped being available. During the time t = 0 s to t = 45 ms, the active power by the PV was available V PV > V peak , and the excess of active power was supplied to the grid. Upon reaching time t = 50 ms, the change in dynamics in the grid current confirmed that there was no active power generation; the amplitude and phase of I AC changed. Regarding the I Ld , although there was no active power available from the PV array, the reactive power compensation function of the inverter kept working, and the current injected into the grid current compensated the reactive power generated by the inductive load. When V PV < V peak , the reference that activated the PI control loop was generated. It was observed that the voltage in the V SC did not drop at the moment in which both control loops began to work together; a variation in the waveforms was influenced by the noise generated during the measurements. The SC module V SC > V AC Tm was the voltage source for the power system and the active power flow between the SC and the grid, both of which allowed the inverter to continue with the generation of compensation references. Conversely, Figure 13b shows that the transition occurred when the active power generated by PV panels began to become available. The stability of the system in both cases was maintained, and the reactive power compensation by the inverter was not affected by the intermittency in the generation of active power. When the PV array fluctuated, the SC was utilized for smoothing out the power fluctuations [28], given that the supercapacitor had the ability to respond to fast PV power changes [29].
Energies 2018, 11, x FOR PEER REVIEW 14 of 18 compensation by the inverter was not affected by the intermittency in the generation of active power. When the PV array fluctuated, the SC was utilized for smoothing out the power fluctuations [28], given that the supercapacitor had the ability to respond to fast PV power changes [29].
(a) (b) Figure 13. Experimental results of the transitory response (a) active power generation stops being available, (b) active power generation begins to be available.

Stable Response
The last experimental result corresponded to the performance of the inverter under stable conditions. Figure 14a,b depicts the waveform of , , and . In this mode, the inductive load reference was connected to the PCC, when active power generation by PV panels was available. It was shown that the system behavior was determined by power generation from the PV array. The amplitude of the was 5.28 A, and it was dependent on the active power generated by the PV array and the reactive power to be compensated. Additionally, it was observed that was contra phase with , because the grid-connected inverter supplied the load inductive power demand; therefore, the grid only supplied/received active power, in this case 2.72 A [26]. The amplitude of the indicated that the load power demand was supplied by the active power generated by PV array. It was demonstrated that the system behavior was determined by power generation from the PV array.

Stable Response
The last experimental result corresponded to the performance of the inverter under stable conditions. Figure 14a,b depicts the waveform of I AC , V AC I Ld , i L and V PV . In this mode, the inductive load reference was connected to the PCC, when active power generation by PV panels was available. It was shown that the system behavior was determined by power generation from the PV array. The amplitude of the i L was 5.28 A, and it was dependent on the active power generated by the PV array and the reactive power to be compensated. Additionally, it was observed that I AC was contra phase with V AC , because the grid-connected inverter supplied the load inductive power demand; therefore, the grid only supplied/received active power, in this case 2.72 A [26]. The amplitude of the I AC indicated that the load power demand was supplied by the active power generated by PV array. It was demonstrated that the system behavior was determined by power generation from the PV array. compensation by the inverter was not affected by the intermittency in the generation of active power. When the PV array fluctuated, the SC was utilized for smoothing out the power fluctuations [28], given that the supercapacitor had the ability to respond to fast PV power changes [29].
(a) (b) Figure 13. Experimental results of the transitory response (a) active power generation stops being available, (b) active power generation begins to be available.

Stable Response
The last experimental result corresponded to the performance of the inverter under stable conditions. Figure 14a,b depicts the waveform of , , and . In this mode, the inductive load reference was connected to the PCC, when active power generation by PV panels was available. It was shown that the system behavior was determined by power generation from the PV array. The amplitude of the was 5.28 A, and it was dependent on the active power generated by the PV array and the reactive power to be compensated. Additionally, it was observed that was contra phase with , because the grid-connected inverter supplied the load inductive power demand; therefore, the grid only supplied/received active power, in this case 2.72 A [26]. The amplitude of the indicated that the load power demand was supplied by the active power generated by PV array. It was demonstrated that the system behavior was determined by power generation from the PV array.   Figure 15a,b depicts the waveform of I AC , V AC I Ld , i L and V SC . During this mode, the inductive load reference was connected to the PCC, while active power generation by PV panels was disabled. The system behavior was determined by the fact that both control loops began to work together, corroborating the outcomes of these experimental tests. The waveform of I AC was in phase with V AC , and although there was no active power available from the PV array, the power factor compensation function of the inverter kept working, and the current injected by the grid current was 2.88 A to compensate the inductive load. The voltage level of the V SC > V AC Tm and the active power flow between the SC and the grid allowed the inverter to continue with the generation of compensation references. Due to the inherent features of intermittence and fluctuation in power generation by PV array, SC contributed to performing energy management or to smooth power fluctuations [28]. Given that the dynamics of the voltage in the SC was slow, its waveform shows variation over short periods of time, as shown in Figure 15b. This was determined by the PI control response, and involved two parameters: the term proportional to the error, and the integral of error. These parameters influenced the transient and stable response of the SC voltage control loop. The amplitude of i L is 1.20 A, and it was dependent on the absence of active power generation.
The results of simulated and experimental tests indicate that the proposed reactive power control strategy operates under normal conditions and intermittent generation, providing a power factor correction 24 h a day. Simulation results also reveal that, with the implementation of the proposed PBC strategy, the utilization factor of the photovoltaic inverter is maximized, given that it operates in the absence of generation, and the number of required components in the PV system is reduced. An important point is that in the implementation does not require any structural or connection changes in the PV system, thus only requiring the modification of the inverter control algorithm. Inverters with STATCOM functions and support to the grid in critical conditions have been reported; however, the experimental strategy is more complex, and involves robust development cards. [9,30]. One of the determining factors in the proposed implementation is the use of the SC module. The use of SC to increase the active power generation capability of a STATCOM in Fixed-Speed Wind Turbines has been reported [31]. In this case, the short-time storage capabilities of an SC as high power and energy density contributed to power oscillation damping and to reactive compensation in the low power system. Therefore, the incorporation of the SC allowed the inverter to operate 24/7, and to have the capacity to handle reactive power compensation at all times. This multifunction inverter also opens up a potential revenue generating opportunity for the PV system, having the additional benefit of providing support in the area of power quality. The systems are smaller, with fewer components and higher performance. . During this mode, the inductive load reference was connected to the PCC, while active power generation by PV panels was disabled. The system behavior was determined by the fact that both control loops began to work together, corroborating the outcomes of these experimental tests. The waveform of was in phase with , and although there was no active power available from the PV array, the power factor compensation function of the inverter kept working, and the current injected by the grid current was 2.88 A to compensate the inductive load. The voltage level of the > and the active power flow between the SC and the grid allowed the inverter to continue with the generation of compensation references. Due to the inherent features of intermittence and fluctuation in power generation by PV array, SC contributed to performing energy management or to smooth power fluctuations [28]. Given that the dynamics of the voltage in the SC was slow, its waveform shows variation over short periods of time, as shown in Figure 15b. This was determined by the PI control response, and involved two parameters: the term proportional to the error, and the integral of error. These parameters influenced the transient and stable response of the SC voltage control loop. The amplitude of is 1.20 A, and it was dependent on the absence of active power generation. The results of simulated and experimental tests indicate that the proposed reactive power control strategy operates under normal conditions and intermittent generation, providing a power factor correction 24 h a day. Simulation results also reveal that, with the implementation of the proposed PBC strategy, the utilization factor of the photovoltaic inverter is maximized, given that it operates in the absence of generation, and the number of required components in the PV system is reduced. An important point is that in the implementation does not require any structural or connection changes in the PV system, thus only requiring the modification of the inverter control algorithm. Inverters with STATCOM functions and support to the grid in critical conditions have been reported; however, the experimental strategy is more complex, and involves robust development cards. [9,30]. One of the determining factors in the proposed implementation is the use of the SC module. The use of SC to increase the active power generation capability of a STATCOM in Fixed-Speed Wind Turbines has been reported [31]. In this case, the short-time storage capabilities of an SC as high power and energy density contributed to power oscillation damping and to reactive compensation in the low power system. Therefore, the incorporation of the SC allowed the inverter to operate 24/7, and to have the capacity to handle reactive power compensation at all times. This multifunction inverter also opens up a potential revenue generating opportunity for the PV system, having the additional benefit of providing support in the area of power quality. The systems are smaller, with fewer components and higher performance.

Conclusions
This paper proposed a control scheme to create a multifunctional PV system inverter. When the power system is under conditions of inductive load demand, the proposed control scheme provides the inverter of the power system with the ability to improve the power quality. The efficiency of the scheme was defined by the perfect synchrony of both control loops when working together, as well as the incorporation of the SC module. The high-power density of the SC module operated as the source for the power system under conditions of intermittent generation, and allowed inductive power compensation, thus improving the power factor. It was demonstrated that an inverter with the proposed scheme control could effectively compensate for the inductive power. The results showed an improvement in power quality; the power factor was improved, keeping it at a unitary value in all cases. Resulting from the experimental tests, it was evident that the grid-connected inverter could be effectively used to improve the power factor, in addition to the active power injection to the grid from the PV system, thus allowing the grid to supply/receive sinusoidal and balanced power at unit PF, despite intermittent conditions of power generation.