An improved synchronous reference frame current control strategy for a photovoltaic grid-connected inverter under unbalanced and nonlinear load conditions

In recent years, renewable energy sources have been considered the most encouraging resources for grid and off-grid power generation. This paper presents an improved current control strategy for a three-phase photovoltaic grid-connected inverter (GCI) under unbalanced and nonlinear load conditions. It is challenging to suppress the harmonic content in the output current below a pre-set value in the GCI. It is also difficult to compensate for unbalanced loads even when the grid is under disruption due to total harmonic distortion (THD) and unbalanced loads. The primary advantage and objective of this method is to effectively compensate for the harmonic current content of the grid current and microgrid without the use of any compensation devices, such as active and passive filters. This method leads to a very low THD in both the GCI currents and the current exchanged with the grid. The control approach is designed to control the active and reactive power and harmonic current compensation, and it also corrects the system unbalance. The proposed control method features the synchronous reference frame (SRF) method. Simulation results are presented to demonstrate the effective performance of the proposed method.


Introduction
Among the various renewable energy sources (RESs), photovoltaics (PVs) are the most promising environmental friendly and fastest growing clean and renewable energy source [1,2]. The RESs are connected to the utility network or microgrid (MG) by an interface converter. An MG is a local grid composed of distributed generators (DGs), energy storage systems and loads and can operate in both grid-connected [3] and island modes [4]. Power quality problems are a specific concern with MGs because distortion harmonic sources can represent a high proportion of the total loads or nonlinear loads (NLLs) in small-scale systems [5]. The main limitation associated with MGs occurs when exchanging the current from the grid to the MG [6][7][8]; this exchange is considered a source of harmonic distortion in a grid-connected inverter (GCI) [9]. To improve the power quality in MGs, several approaches have been PLOS  proposed [10]. Installing passive filters (PFs) in the appropriate locations, preferably close to the harmonic generator, can lead to trapping of the harmonic currents near the source and can reduce their distribution throughout the other parts of the system [11]. Active power filters (APFs) have been proven as a flexible solution for compensating the harmonic distortion caused by various NLLs in power distribution systems [12]. Hybrid compensation (HC) has the advantages of both passive and active power filters for the improvement of power quality problems [13]. Traditionally, the GCIs used in MGs connected to the main grid have behaved as current sources [14]. The GCI controller should be able to correct an unbalanced system and cancel the main harmonics to meet the waveform quality requirements of the local loads and MGs [9]. The primary goal of a power-electronic interface inverter is to control the power injection [15]. However, compensation for power quality problems, such as current harmonics, can be achieved through appropriate control strategies. Consequently, the control of DGs must be improved to meet the requirements when connected to the grid [16].
In the literature [9,[17][18][19][20][21][22][23][24], several methods have been presented to control the DGs in terms of a current harmonic compensator. The methods in [17] and [9] were proposed to compensate for current harmonics in grid-connected MGs. The current controller proposed in [17] uses the synchronous reference frame (SRF) and is composed of a proportional-integral (PI) controller and a repetitive controller (RC). The other study [9] proposed a cascaded current and voltage control strategy for the interface converter in MGs. M. Hamzeh et al. [19] proposed a control strategy that includes a harmonic impedance controller and a multi-proportional resonant controller. Additionally, one researcher presented a control method for a multi-bus MV MG under unbalanced and nonlinear load conditions [24]. Several controllers, namely, PI controllers implemented in the dq frame as well (also constituting an SRF), a resonant controller, a PI controller implemented in the abc frame, and a dead-beat (DB) predictive controller, were proposed in [23]. In 2013 Savaghebi et al. published a paper in which they proposed methods to compensate for the voltage unbalance at the RER terminal; the power quality at the point of common coupling (PCC) is usually the main concern due to sensitive loads that may be connected [25]. Mohamed Abbes et al. [26] proposed a control strategy for a threelevel, neutral point clamped (NPC) voltage source converter. Two current controllers were designed to achieve grid current control.
Unfortunately, traditional APFs have several drawbacks, including higher cost, larger size, higher power switch count, and complex control algorithms and interface circuits to compensate for unbalanced and nonlinear loads.
Due to the aforementioned issues, this study presents a new inverter control method for harmonic compensation. The proposed control strategy consists of an SRF method, which is proposed to control power injection to the grid, provide harmonic current compensation and correct the unbalanced system. The focus of the present paper is the reduction of total harmonic distortion (THD) in the current flowing between the PCC and MG. Furthermore, simulation studies are presented, discussed and analysed. The main proposed control methods are as follows: • voltage and current controllers; • active and reactive power controllers; • harmonic current compensation; • current unbalance compensation. This paper is organized as follows. The proposed control scheme for the DG GCI is discussed in Section II. In this section, details of the entire control structure, including the active and reactive power control unit and harmonic current compensation unit, are explained. Simulation results with three case studies are presented in Section III. Finally, conclusions are presented in Section IV.

The proposed control method
To enhance grid and MG current quality, an advanced current control method for the GCI is presented. The proposed method contains two units: the active and reactive power control unit and the harmonic current compensation unit. Fig 1 presents a schematic block diagram of the proposed control strategy for the GCI. This block diagram is applicable for main and remaining harmonic compensation, reactive power supply for distortion sources and system unbalance correction.

Active and reactive power control unit
In the grid-connected power control mode, essentially all the available power that can be achieved from the microturbine (MT) [27], fuel cell (FC) [28] and PV is delivered to the grid [29]. Furthermore, compensation of the reactive power is possible. A block diagram of the control arrangement for the grid-connected control mode is shown in  Certain controllers, namely, the PI controllers, are implemented in the dq frame (also called the SRF) to adjust the grid currents in the dq-synchronous frame. The well-known SRF method can be used for control of the APF and GCI, and it also can be designed as in [30]. This method uses a reference frame transformation module, abc!dq. The dq transformation can be used to convert the three phase currents injected by the inverter into three constant DC components defined as the direct, quadrature and zero components: I d , I q and I 0 , respectively. In general, three phase voltages and currents are transformed into dq0 coordinates by the Park transformation, as shown by the matrix [L]: The phase angles of the voltage and current signals are set as a reference current, which achieves the SRF while I Ã d = 0. Fig 1 shows the current controller of interest [31]. The sinusoidal pulse width modulation (SPWM) voltage frame is guaranteed. The voltage reference and design phase-locked loop (PLL) synchronize the inverter with the grid. Thus, I Ã d and I Ã q as the reference currents in the dq transform are re-calculated as follows: The reference currents in the dq-axis, I Ã d and I Ã q , can be obtained from the following relations: where V d and V q are the grid voltages in the dq transform. Furthermore, the inverter is able to deliver P Ã and Q Ã , which are the reference active and reactive power, respectively. The simplified active and reactive powers are calculated as: Eq 5 shows that although the system voltage is constant (V d ), the currents of dq control the active and reactive powers. The real power injection from the GCI is controlled by the reference signal of I Ã d , whereas the reactive power is set to zero (I Ã q = 0). The reference current I Ã d is extracted from dynamic analysis of the DC-link capacitor. A constant DC voltage across the capacitor shows that the DG matches the power. The equation is: The DC-DC converter controls the power input (P in ) to the capacitor to generate the maximum DG output power. To keep the inverter output voltage constant, the inverter controls the capacitor output power (P out ). The reference current is extracted from the difference between P in and P out using the PI controller.
From these parameters, the command voltages V Ã d and V Ã q for the inverter gates SPWM can be acquired using: The command voltages are directed to the inverter for PWM. The control strategy applied to the interface converter usually includes two cascaded loops. An external voltage loop controls the DC-link voltage, and a fast internal current loop regulates the grid current. The DClink voltage in this structure is controlled by the essential output power, which is the reference for the active current controller. Typically, the dq control methods are associated with PI controllers because they have satisfactory behaviour when regulating DC variables [32]. Eq 9 gives the matrix transfer function in dq coordinates: where K p and K i are the proportional and integral gain of the controller, respectively. To provide the phase information of the grid voltage, the PLL technique [33] can be used, which is required to generate the current reference i ref and is also used to maintain the GCI synchronism with the grid. To create the three current references, a PLL system has been proposed in which the error of each is directed into the controller, and the corresponding measured current can be compared. Regarding the switches in the GCI, the switching of the output of these controllers is noteworthy. When three PI controllers are used, the modulator is essential for creating the duty cycles for the SPWM pattern. The PLL schematic is illustrated in Fig 3. In this synchronization structure, ω ff and ω are the fixed frequency and the estimated grid frequency, respectively. As depicted in Fig 3, the value of the rated frequency normally consists of a feed-forward ω ff to improve the dynamics of the phase estimation θ, which is obtained by integrating ω.

Harmonic current compensation control unit
In the control unit for the compensation of harmonic currents, a three-phase stationary rotating frame is converted to a synchronous rotating frame via Park's transformation. This transform for the active and reactive components of the load voltage and current [34] is illustrated The active and reactive components of the current are decomposed into the dq components in (11) and (12).
The current source generates the fundamental component of the d-axis of the load and the filter DC component associated with the strategy of harmonic compensation.
The steady-state error of the inverter's DC component is eliminated by the PI controller to keep the voltage across the capacitor constant. The error voltage is computed by comparing the DC capacitor voltage with the reference voltage. Moreover, to regulate the capacitor under dynamic conditions and mitigate the steady-state error, the output of the PI controller is modified. The PLL performance has a significant effect on the dq transform of the output signal. In a PLL, the rotating reference frame (ωt) is set as a fundamental component. Application of the inverse of Park's transformation is represented in (13) through (15). The dq rotating frame is converted back to a three-phase stationery frame: This theory is only applicable to the three-phase system. Because the harmonic current compensation controller addresses DC quantities, its control unit is entirely stable. However, there is a time delay in filtering the DC quantities due to the instantaneous computation of quantities [35]. The extracted reference signal is then used to trigger the gate driver controller, which will allow the inverter to introduce the desired compensation current into the system.

Simulation results
In a basic MG architecture (Fig 4), the system is assumed to be radial with several feeders and a collection of NLLs. To demonstrate the effectiveness of the proposed control strategy, the system in Fig 4 was simulated in MATLAB/Simulink. This MG includes three DGs, namely, the PV, MT and FC, which are connected to the grid by the power electronic interface. The proposed control methods are applied to the PV; however, the FC is connected to the grid by the ordinary interface converter without the control strategy. The MT has a frequency of 1,500 Hz, which is similar to a normal generator, but its output voltage has a frequency of 1,500 Hz. Therefore, the effective voltage of the output phase of this 220 V MT has a frequency of 1,500 Hz, but this source cannot be connected to a power system with a frequency of 50 Hz. For this purpose, the input voltage must first be rectified using a diode rectifier, and the maximum output voltage of the rectifier will be 530 V. Then, the level of the output voltage can be raised to 750 V using a boost convertor connected to an inverter transformer. Thereafter, the DC voltage is applied to the interface converter, which is controlled by the SRF controller.
Furthermore, the FC has an output of 50 kW at 625 VDC and is connected to the grid by an ordinary AC/DC convertor. Another side of this system consists of two NLLs, such as the three unbalanced single-phase diode rectifiers and the three-phase diode rectifier, which produced the distorted waveform.
The PFs are distributive and are connected near the unbalanced NLLs and DGs in the system; an APF is connected at the PCC. In operation, the PF is used to compensate for the major harmonics. The APF is located at the upstream position to correct the unbalance of the system and to remove the remaining harmonics.
The parameters of the three-phase power line [13], load/DGs and control method parameters can be found in Tables 1, 2 and 3, respectively. In this system, the voltage is assumed to be sinusoidal. In the simulation, three case studies are taken into account. The configurations of the three case studies are illustrated in Fig 5. Case study I: Without any compensation devices. Case study II: With an APF and distributed PFs. Case study III: Without any compensation devices, such as APF and PFs, and with only the proposed control method on the PV. Fig 5 shows the three studied system configurations. Fig 5(A) consist of DG units and NLLs connected to the grid without any compensation devices. As shown in Fig 5(B), each PF is connected near the DGs and NLLs and designed to eliminate main harmonics and supply reactive power to the MG.

Case study I
The currents of DGs and NLLs, equipped without any compensation devices and the proposed control strategy, are shown in Fig 6. The GCI and NLLs make the system current nonlinear and unbalanced and also require the injection of harmonic currents into the MG and grid. The waveforms of the three-phase output currents and the distortion currents of the DGs under NLL conditions are depicted in Fig 6(A). All output currents of the DGs and NLLs have an effect on the system currents and produce a distortion waveform with 13.5% THD. The output currents of three DGs are highly distorted with sharp spikes. Fig 6(B) shows the PV array output current. The PV is connected to the MG through a GCI, which produces the distorted waveforms with 11.04% THD. Furthermore, the MT and FC are connected to the system through power electronic converters. Normally, the GCI discussed in the paper is considered as a harmonic current source; in this case, the parallel compensation system is the best choice. Thus, the DGs and NLLs may be considered to be current sources in terms of harmonic distortion. Fig 6(E) and 6(F) illustrate the NLL current waveform and the associated harmonic spectra.

Case study II
This case study consists of an APF and a distributed PF. Each PF is connected to DGs and NLLs and is designed to eliminate the main harmonics and supply reactive power for NLLs, while the APF is responsible for the correction of the system unbalance and the removal of the remaining harmonics. Fig 7 shows the dq current control block diagram of the APF.  A system waveform using active and passive filter compensation is shown in Fig 8. An active filter is connected to the system; the system harmonics and unbalanced current are compensated. Fig 8(A) provides the results obtained from the simulation after the connection of dedicated compensation devices that can reduce the THD in the system from 13.5% to 2.02%. Comparing the waveforms in Figs 6(B)-6(F) and 8(B)-8(F), the effects of the PFs and APF can be clearly identified.
After the active filter is connected, the source current becomes balanced and sinusoidal. Without any compensation, the system current THD is 13.56%; after compensation, the THD is reduced to 2.02%.

Case study III
This case study indicates improved power quality with the absence of compensation devices in the MG. The main contribution of this study is the harmonic current compensation between the PCC and the MG. The compensated system currents are explained in this subsection. The proposed control method can be applied to the GCI of the PV.  Before the GCI with proposed control method is switched in, the system current contains harmonics and is unbalanced. The proposed control method is effective in correcting the distortion. Fig 10(A) and 10(B) show the effective compensation values of the harmonic current for the system and PV, respectively. This case study shows that the proposed control method can compensate for the current system (PCC) and DGs in the absence of power compensation devices and an APF. The output currents of phase 'a' in the PV and their harmonic spectra, without the harmonic compensation loop, are depicted in Fig 6. The output currents of phase 'a' in the PV are distorted because of the connection of the three-phase NLL. Both negative and zero sequence harmonics, consisting of the 3rd, 5th, 7th, 9th, 11th and 13th harmonics, can cause power quality problems in the grid-connected MG. The output current quality for PV can be improved using the proposed harmonic compensator loop that consists of six modules, tuned at the 3rd, 5th, 7th, 9th, 11th and 13th harmonic frequencies. For performance comparison, the output current of phase 'a' in the DGs and their harmonic spectra, with the proposed harmonic controller, are shown in Fig 10. When comparing the output current waveforms in phase 'a', it is notable that by employing the proposed control method, the 3rd, 5th, 7th, 9th, 11th and 13th harmonics in the current are substantially suppressed.
When all of the loads and DGs are connected, the THD in the system without any compensation is 13.5% (Fig 6(A)). As shown in Fig 10(A), the THD is reduced to 1.69% at the PCC with the proposed control method. The simulation results of Fig 10(A) and 10(B) show the performance of the proposed control method for compensating the distorted waveform of Fig  6(A) and 6(B). The effects of the proposed control method can be clearly observed by comparing the bold values in Table 4 (between case study I and case study III). Thus, this approach is verified to be capable of meeting IEEE 519-1992 recommended harmonic standard limits. The currents and the THD value of the system in all case studies are given in Table 4. Full names corresponding to nomenclature are shown in S1 File.

Conclusions
This study proposes a new control strategy for harmonic current compensation for DG interface converters in an MG. The proposed control method consists of the SRF control method. When nonlinear, unbalanced loads and DGs are connected to the grid, the proposed strategy significantly and simultaneously improves the THD of the interface converter for DGs and the grid current.
In the proposed method, the harmonic currents of the NLLs and DGs in the MG and at the PCC are completely compensated. The proposed control is responsible for controlling the active and reactive power injection to the grid; it is also responsible for compensating for the harmonic currents due to the unbalanced load. The presented simulation results show that the PCC harmonic currents due to unbalanced loads, NLLs and DGs are compensated to the desired value. This strategy can be used for single-phase and three-phase systems. The simulation results verify the feasibility and effectiveness of the newly designed control method for a grid-connected converter in an MG.