DC-Offset Compensation for Three-Phase Grid-Tied SPV-DSTATCOM Under Partial Shading Condition With Improved PR Controller

This work deals with a single-stage three-phase grid-connected solar photovoltaic distribution static compensator (SPV-DSTATCOM) under partial shading condition (PSC). During PSC, the SPV-DSTATCOM is connected to the distribution network to solve issues like active current sharing, reactive power control, and harmonic elimination. The conventional Proportional Resonant (PR) controller for SPV-DSTATCOM behaves as a notch filter at resonance frequency with high gain of magnitude and has less DC offset rejection capability. Here, an improved PR based on second-order generalized integrator (IPR-SOGI) control architecture with unity gain at the fundamental frequency and more DC offset rejection capability is presented to address the drawback of the conventional PR controller. The performance of the proposed controller is examined under different loading conditions in steady-state and dynamic conditions. Finally, a comparison between the proposed controller with the conventional PR controller and adaptive PR controller are provided with the experimental validation.


I. INTRODUCTION
In recent years, the world pays attention to renewable energy sources due to the shortening of fossil fuel sources, increasing air pollution, and global warming. The utilization of renewable energy sources has been promoted quickly to fulfill the increasing energy demand. The distributed power generation by renewable sources has different characteristics in comparison to conventional power generation. Therefore, interdisciplinary research is going on towards developing the improvement of existing energy conversion technologies and the development of new methods in terms of novel configuration, topologies, and control techniques. Special attention is made to the wide use of Solar PV (SPV) system on The associate editor coordinating the review of this manuscript and approving it for publication was S. K. Panda . the grid-tied condition due to greenhouse gas effect, global warming, safety, security, and payback period [1].
The exploitation of PV systems depends on the optimization of dynamic performance, such as the variation of solar radiation and robustness to various disturbances. In the specific case of grid application, large numbers of PV panels are connected in series or parallel to synchronize with the grid. In such a system, partial shading conditions (PSC) occur due to the appearance of the shadow of trees or big buildings, or stools of birds or moving clouds. In this scenario, the power versus voltage curve becomes more complex due to the appearance of multiple local maximum power points (MPP). Out of multiple local MPP, only one peak represents the global MPP (GMPP). The conventional technique fails to guarantee successful tracking of the GMPP and may fall in any local MPP, resulting in a significant reduction of the VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ generated power and efficiency. Recent publications show the importance of tracking GMPP under rapidly changing irradiance conditions [2], [3]. Therefore, one of the important aspects of the grid-tied PV system is harvesting the maximum energy with respect to the variation of solar radiation. To search GMPP during PSC, an extreme seeking algorithm (ESA) has been proposed in [1]. In a grid integrated renewable system, any small deviation of the inverter output voltage and the grid voltage at PCC will lead to a high inrush current in the system. Therefore, a dedicated control action is required for grid synchronization. Phase locked loop (PLL) is the traditional choice for the researcher and industrialist for this purpose [4]. However, PLL has many drawbacks such as nonlinear properties, complex tuning, sluggish and deteriorated performance during weak grid condition [5], [6]. To overcome such problems, many advanced tuning methods has been proposed in literature [7]- [9]. These advanced tuning methods compete in terms of computational burden, system stability, system dynamics response, improved system performance such as active current sharing with the presence of two sources, power quality issues, reactive power compensation, harmonic elimination, grid current and voltage THD improvement, etc. These advanced tuning methods further lead to complicated control actions and reduction of the system dynamics response.
The aim of the grid-tied SPV-DSTATCOM is to inject active power and reactive power into the system with the available solar irradiation. In addition, in the absence of solar irradiation, it injects the harmonic compensation power required by the load, termed as a distribution static synchronous compensator (DSTATCOM). This is helpful in maintaining the grid current harmonic-free, sinusoidal, balanced, and unity power factor operation using current regulation. The current regulation is performed by a hysteresis current regulator or linear PI regulator or predictive regulator. These classes of regulators can further be divided into the synchronous rotating dq frame and stationary reference frame. The three-phase synchronous reference frame regulator performance is unsatisfactory, as it needs information about the phase angle in the rotating frame. The controller action is erroneous if the estimation of the phase angle is not accurate. At the same time, the stationary frame regulator performance such as proportional resonance (PR) controller [10], is satisfactory. The PR controller has been applied in active power filter [11], photovoltaic systems [12], wind turbines [13], controlled rectifiers [14], induction motor drives [15], and fuel cells [16]. The advantages of PR controller includes: 1) faster dynamic and zero steady state tracking error; 2) lesser computational burden as it does not require rotating reference frames; and 3) independent of PLL, but requires a suitable synchronization algorithm for grid-tied applications. The disadvantage of the PR controller is that it has a high gain at the resonance frequency. The undesired anomalous peaks cause erroneous estimation for the conventional PR controller. As a consequence, it leads to a significant loss of performance. Moreover, the presence of two integrators is responsible for the deviation of the frequency at which the infinite gain is located considering the expected resonant frequency, due to the displacement of the resonant pole. This reflects in terms of a large steady-state error [17]. To overcome this one, an adaptive PR (APR) controller has been proposed in [18]. It introduces a fourth-order band pass filter and adaptive integration to detect grid frequency variation. As a consequence, it will reduce the frequency sensitivity, but it develops the complexity and computation burden of the system. Also, the estimated frequency is erroneous due to the presence of DC offset. This causes the superimposition of the low-frequency component on the average value of the estimated frequency. The presence of the DC offset not only introduces fundamental frequency oscillations, but also introduces the DC injection by the grid-tied converters. Removal of these oscillations is a very challenging task due to their low-frequency [19]. Therefore, the international standard IEC 61727 has introduced a restriction on the limitation of the DC offset on the grid-connected photovoltaic inverters to less than 1% of their rated output current [20]. These restrictions introduce the importance of rejecting the DC offset present in the input signal of the controller.
An improved PR controller based on SOGI (IPR-SOGI) is proposed in this paper to overcome the aforementioned issues. It not only reduces the high gain and phase jump, but also has the ability to reject the DC offset from the input signal. The proposed controller is applied to the grid-tied SPV-DSTATCOM. The performance is validated under PSC with different loading conditions as well as dynamic conditions. It is observed to be less complex with more DC offset reduction capability, more harmonic elimination capability, and increased robustness. The outstanding performance is observed by comparison of experimental results with conventional PR and APR. These are the major contributions of this work.
This paper is organized in four sections: Section II describes the system topology and the control architecture of the improved PR controller; Section III explains the experimental validation and comparison results with relevant control structures. The conclusion is provided in Section IV.

II. IPR-SOGI ALGORITHM FOR SPV-DSTATCOM A. SPV-DSTATCOM SYSTEM DESCRIPTION
The schematic diagram of grid-integrated three-phase threewire SPV-DSTATCOM is shown in Fig. 1. It consists of a solar PV array, three-phase AC mains, three-phase nonlinear load, three-phase voltage source converter (VSC), an interfacing inductor, and a ripple filter. The available maximum power extraction during PSC is done through the ESA method. A three-phase inductor filter (L 1 , L 2 , L 3 ) is connected at the point of common coupling (PCC) to filter out high-frequency ripples from the phase currents. A ripple filter with series connected resistor (R f ) and capacitor (C f ) is provided at PCC for removing noise from the voltage signals. A three-phase AC main is connected to a three-phase nonlinear load. The nonlinear load is designed by using an uncontrolled diode bridge rectifier along with a series R-L load. PCC line-to-line voltage, PV voltage and current, load and grid side phase currents, are measured by using voltage and current sensors. These measured signal is feedback to the controller for the closed-loop performance evaluation.

B. CONTROL ARCHITECTURE
The control architecture of SPV-DSTATCOM operation involves the extraction of the positive sequence of voltage and its quadrature component by utilizing IPR-SOGI control algorithm. Furthermore, these components are used to estimate the unit templates for grid synchronization. In the next step, the proposed control structure is applied for the calculation of the load current fundamental components, which are used to estimate the reference currents for the hysteresis current controller to generate gate pulses for grid-connected inverter.

1) UNIT TEMPLATE GENERATION
Initially, the line voltages between phase-a and phase-b (v sab ) and between phase-b and phase-c (v sbc ) are measured through two voltage sensors. The phase voltages (v sa , v sb v sc ) are then calculated by using (1).
The phase voltages are converted from abc-frame to stationary αβ-frame (v α , v β ) for the implementation of IPR-SOGI [21]. The voltages v α1 and v β1 (v α2 and v β2 ) are the output of IPR-SOGI for the input voltage v α (v β ). Fig. 2 provides the flow diagram of this conversion process. For the smoother operation of the proposed controller, the positive sequence voltage (v p α , v p β ) in αβ-frame can be further computed as (2).
The positive sequence voltages (v  Furthermore, the three-phase unit template (u pa , u pb , u pc ) can be obtained as (3).
where v t = 0.816 u 2 pa + u 2 pb + u 2 pc represents the amplitude of the terminal voltage. Again, the quadrature unit templates are calculated as follows: The estimated positive sequence and quadrature unit templates can further utilize for the generation of the fundamental positive sequence and quadrature component of load current in the latter part of Section II.

2) LOAD CURRENT COMPONENT EXTRACTION
The measured three-phase load currents consist of fundamental component, quadrature components, and harmonic components. The fundamental components represent the active power and the quadrature component represents the reactive power. Initially, the fundamental component (h pa ,h pb andh pc ) and quadrature component (h qa ,h qb andh qc ) of the load current of the respective phases are estimated by using the process mentioned in the Fig. 2. Further, the reference currents for SPV-DSTATCOM are estimated from the fundamental component of the load current. The procedure of separation of the fundamental component is also shown in Fig. 3. The estimated fundamental components are passed through a sample and hold, followed by a zero-crossing detector (ZCD). Two separate ZCDs are utilized in each phase to generate eitherh px orh qx , x ∈ {a, b, c}. ZCD corresponding toh px (h qx ) is triggered by unit template u px (u qx ). Now, the average value of the direct (h lp ) and quadrature (h lq ) components can be calculated as (5)-(6).

3) LOSS TERM ESTIMATION
For the operation of DSTATCOM, excess currents are drawn from the grid to maintain the actual DC-link capacitor voltage to its reference value. It helps to maintain the DC-link voltage to its reference voltage by charging and discharging during the transient state [22]. However, this excess amount of current generally is in phase with the grid voltage that corresponds to more loss in the system operation. The difference of the reference DC-link voltage (V * dc ) and actual DC-link voltage (V dc ) is considered as the DC-link voltage error and fed to the proportional integral (PI) controller for estimation of the current (h cploss ) for the extra power loss. The discretetime implementation of PI controller can be obtained as (7).
where k represents the present sample and V (k) err (= V * dc − V dc ) is the error in DC-link voltage. V * dc can be obtained from the GMPP operation of ESA algorithm. K p1 and K i1 are the proportional and integral gain of the PI controller, respectively.

4) REFERENCE CURRENT FORMATION
The feed-forward termh pv of SPV is estimated as (8).
where V PV and I PV are the PV voltage and current, respectively, and measured from the PV terminal. The effective component of load current (h sp ) can be estimated from the loss component and the average load active components supplied by the grid as (9).
Now, the fundamental reference currents can be generated by multiplying the net component with the corresponding unit templates as follows: Similarly, the quadrature component of load current can be derived by estimating the reactive weight component (h sq ). Now,h sq is estimated by the difference between the average reactive weight of the fundamental component and the AC loss component, i.e.,h For zero voltage regulation (ZVR), the reactive reference current can be found out from the voltage control loop with PI controller output as (12).
where v can be used as in (3) and v (k) t is the measured value. K p2 and K i2 are the proportional and integral gain of the PI controller, respectively. Now, the reactive weight component of the load current can be estimated as (13) i * qa = u qahsq , i * qb = u qbhsq , i * qc = u qchsq (13) Finally, the reference grid currents for the hysteresis current controller can be estimated as (14) i The error is generated by the reduction of the sensed grid currents (i sa , i sb , i sc ) from grid reference currents (i * sa , i * sb , i * sc ). These errors are passed through the hysteresis current controller to generate gate pulses which operate the grid-connected inverter. The hysteresis band of 0.05 A is considered for the overall operation in order to get reduced current ripple. The transfer functions G 1 (s) (in-phase signal, A 1 to input current signal, i La ) and G 2 (s) (quadrature signal, B 1 to input current signal, i La ) of the proposed controller are derived in (15) and (16), respectively. G 1 (s) and G 2 (s) are graphically represented in Fig. 3. Fig. 4(a) shows the Bode plot of the proposed control structure in comparison with the conventional PR controller. Here, it is observed that the proposed controller acts as a band pass filter and has better DC offset rejection capability in comparison to PR controller. The PR controller acts as a notch filter and has a flat character in the magnitude plot. However, the proposed controller has zero phase jump in comparison with the conventional controller. It is observed that both the phase margin and gain margin are positive, which represents the proposed controller is stable. From the Bode plot, it is found that the system is more stable at K A = 2500 and K B = 500. The stability of the proposed controller against the variation of grid frequency (f ) during transient conditions is shown in Fig. 4(b). Fig. 3 also shows the estimation of the system angular frequency (ω) by utilizing the constant (λ) and the nominal grid frequency 50 Hz.

III. EXPERIMENTAL VERIFICATION
An experimental prototype of grid-tied SPV-DSTATCOM is developed in the laboratory for testing the proposed control algorithm, as shown in Fig. 5. It consists of a solar PV emulator (Chroma 62020H-150S), three-phase two-level VSC, interfacing inductors, a combination of three-phase diode bridge rectifier with R-L load as a non-linear load. The Hall effect voltage (LEM LV 25P) and current (LEM 55P) transducers are used for sensing the voltage and current signal. A four-channel YOKOGAWA WT500 power analyzer and a four-channel YOKOGAWA DSO-DLM2024 digital storage oscilloscope have been used for the recording of steady-state and transient waveforms. The control algorithm is implemented by using Digital Signal Processor (dSPACE 1202). Generated pulses from dSPACE 1202 are passed through  the TLP-250 driver circuit and fed to the VSC switches. During the test, the DC-link voltage is maintained at the GMPP voltage of the SPV (V mpp ). Here, V mpp is kept as 110.4 V. The experimental parameters of the grid integrated SPV-DSTATCOM system are given in Table 1.

A. STEADY STATE PERFORMANCE UNDER PSC
The prototype is tested with PSC under a balanced grid and a nonlinear loading condition. The shadow is developed with the help of a solar emulator. This leads to the generation of multiple jumps in the current vs voltage characteristics curve VOLUME 9, 2021 of SPV and develops multiple local MPP on the power curve of SPV, as shown in Fig. 6(a). Under PSC, the magnitude of the SPV voltage is 110.4 V and the current is 6.64 A. The SPV is operating at 99.78% efficiency with respect to available power (741 W), which shows the maximum energy is being harvested from the solar array. Fig. 6(b) represents the compensation currents (i ca , i cb and i cc ) drawn from the VSC and the DC-link voltage (V dc ) is maintained with its reference value generated from the GMPP operation. Fig. 6(c) shows the line-to-line voltage of the grid (v sab ) and grid currents (i sa , i sb and i sc ). Initially, the grid is supplying nonlinear characteristics of the load current as per the demand of the load. With the operation of the SPV-DSTATCOM, the grid current becomes sinusoidal and has less magnitude due to the sharing of MPP current from SPV. Fig. 6(d) represents the power quality analysis of the overall system on the grid side. Initially, the grid is providing 1.4 kW active power and 309 VAR reactive power to the load. The load is drawing 12.5 A current in all three phases. With the operation of the SPV-DSTATCOM, the grid current magnitude decreases to 6.25 A, whereas the active power decreases to 740 W and the reactive power decreases to 101 Vars. The %THD of grid currents are shown in Figs. 6(e)-6(g).  the B-phase of the SPV-DSTATCOM is reduced, as shown in Fig. 7(a). Fig. 7(b) represents the nature of the A-phase and C-phase load currents. It also ensures stable operation with constant DC-link voltage and constant MPP current during the transient condition. Fig. 7(c) represents the response grid current under this scenario. As the demand of the load reduces, the grid current magnitude decreases, and it remains sinusoidal due to the compensation action performed by SPV-DSTATCOM. Fig. 8(a) represents the operation of SPV-DSTATCOM from night mode to day mode. In the absence of solar radiation, the SPV-DSTATCOM operates in DSTATCOM mode with DC-link voltage of 105 V and SPV current at 0 A. With the availability of solar radiation, SPV current increases from 0 A to 6.64 A, DC-link voltage maintained at V mpp (110 V), the grid current magnitude decreases, and in phase with the grid voltage. Fig. 8(b) represents the A-phase compensation current flow from the VSC, phase-a load current loss component, and net active weight component. Initially, the compensation current contains the harmonic current required by the load (acting as DSTATCOM) with the availability of solar radiation. It delivers an active current which is in phase with the grid voltage.

D. SUDDEN REDUCTION OF LOAD WITH PSC
Initially, the SPV-DSTATCOM operates at its full load capacity. The load current is shared between the grid and SPV as VOLUME 9, 2021  per the availability of solar radiation. With a sudden decrease in load, the extra power generated by the SPV will deliver to the grid, as shown in Fig. 9(a). Here, the grid voltage and grid current are in phase at full load capacity. At sudden reduction of load, it becomes out-of-phase. The DC-link voltage and SPV current remain constant with their previous values. From Fig. 9(b), it is observed that the loss component (h cploss ) remains the same due to no changes occurring in DC-link voltage. With the reduction of the grid current, the net active weight current component (h sp ) increases.

E. COMPARISON RESULT
A comparative performance between the proposed controller with PR and APR dynamic response of weight components during the removal of load is shown in Fig. 10(a). It is observed that the proposed controller has fast convergence, less steady-state error, more DC offset rejection capability, and quick response in comparison with the other controllers. Fig. 10(b) represents the THD of A-phase grid current with PR and Fig. 10(c) represents THD of A-phase grid current with APR controller at steady-state respectively. With close observation, it is found that the proposed controller has less THD in grid current in comparison to PR and APR. The overall comparison results are quantified in Table 2.

IV. CONCLUSION
The real-time implementation of a grid integrated SPV-DSTATCOM at PSC with an objective of DC offset rejection is demonstrated. The available maximum power is harvested from the SPV-DSTATCOM under different dynamic conditions by using the ESA algorithm. From the obtained results, it is observed that the power quality of the grid is improved with erratic SPV energy production and abnormal circumstances at the grid side as well as at the load side. Excellent performance is noticed for the IPR-SOGI algorithm in comparison to the conventional PR filter. Experiments are conducted on the prototype developed in the laboratory, and the test results have verified the operation of the system to be acceptable.

APPENDIX
The steps for GMPP tracking and dc-link reference voltage generation can be elaborated as following.
Step 1: Initialize all voltages corresponding to jumps occurs in the power vs voltage characteristics curve of the SPV.
Step 2: Apply ESA for the iteration process of each initialized voltage, which approach their local MPP. Then, Store the Local MPPT with respect to their voltages.
Step 3: Compute the previous PV power (P m ) and next PV power (P n ), P m V m and P n V n where m = 1, 2, 3, 4 and n = 1, 2, 3, 4 and m = n. Here, V m , V n are the previous and next value of PV voltage.
Step 4: If P m > P n and P m V m > P n V n satisfied, eliminate V n from the next iteration. Repeat the total process until one GMPP is tracked and find the corresponding voltage as V * dc . He is also the Co-Founder of the Power Electronics and Advanced Sustainable Energy Center Laboratory, ADNOC Research and Innovation Center, Abu Dhabi. His research interests include a wide range of topics, including nonlinear control, sliding mode control, control of power electronics, power systems stability and control, renewable energy systems modeling and control, smart grid, microgrid and distributed generation, and application of control theory to oil and gas applications.