Performance Evaluation of Three-Phase Grid-tied SPV-DSTATCOM with DC-offset Compensation Under Dynamic Load Condition

The phase and frequency correction with a three-phase grid-connected solar photovoltaic-distributed static compensator (SPV-DSTATCOM) is challenging. For grid-connected SPV-DSTATCOM, this paper proposes a cascaded enhanced second-order general integrator frequency locked loop with prefilter (CESOGI-FLL-WPF) controller. The suggested work uses the available SPV power to meet the active power requirement of local loads. Furthermore, after addressing the local load demands, the extra SPV power is pumped into the grid. The voltage source converter (VSC) operates as a DC/AC inverter when sunlight is available and as a DSTATCOM when sunlight is not available. As a result, the VSC contributes to reactive power compensation, improved power quality, improved power factor, zero voltage regulation, efficient load balancing, and increased device utilization. The CESOGI-FLL-WPF controller is able to extract the fundamental components from nonlinear load currents, resulting in superior harmonics compensation and a highly rapid and stable dynamic response of the overall system under varied conditions. The suggested system is modelled and simulated using the MATLAB/Simulink software. The proposed SPV-DSTATCOM prototype is tested in the laboratory to ensure that it performs as expected.


I. INTRODUCTION
N OWADAYS, the solar PV (SPV) is penetrated into the energy sector at a faster rate across the world, subjected to policies and market forces of demand supply [1]. The SPV is playing a vital role to shift the conventional energy sector to green and clean energy, owing to its non-polluting nature and rich availability. The primary goal of the SPV system is to extract the maximum power with higher efficiency from the available power. Lower per unit cost and short payback period are also important criteria considered during installation of the SPV system [2], [3]. The grid-connected SPV system is the desired solution to enhance reliability of the overall power system. As a result of higher penetration of the SPV in the utility power system, many complications are introduced in the power system such as increased harmonics level in the currents due to the use of power electronics converters, voltage sag, reactive power imbalance, erroneous operation of the protective devices, hampering the safety and security of the system, introducing magnetizing current due to injection of dc-offset and reduced reliability of the power system. Moreover, the availability of the power from the SPV system is fluctuating with varying environments. To regulate the power quality of the grid-connected SPV system, many international standards and codes are proposed. As per IEEE 519 standard, the total harmonics distortion (THD) of the grid currents must be below 5% [4]. The voltage fluctuations at the point of common coupling (PCC) must be within 5% in compliance with the IEEE-1547 standard [5]. According to IEEE-1547, PCC DC current injection should be no greater than 0.5% of output current. As a result, the grid-connected SPV system requires an effective controller to keep the power quality and DC offset rejection capability at or above the aforementioned levels. Presently, this is a burning research issue, which draws the attentions of many researchers across the world.
To overcome above-mentioned power quality issues in the conventional grid-connected SPV system, the SPV-DSTATCOM system is proposed in the literature. The SPV-DSTATCOM system is capable of providing active power demand of the load and injecting excess power to the grid, preserving the desired power quality. Such single-stage SPV systems suffer from the lower utilization ratio of the power electronic devices. Because the power converters remain unutilized when sunlight is not available. Such lower utilization issue is addressed in the proposed SPV-DSTATCOM system by operating the power converters to act as DSTAT-COM during the absence of sunshine. Thus, the device utilization factor of the SPV-DSTATCOM is significantly improved by almost two times, so that the overall cost of the system is lowered down considerably. Many DSTATCOM topologies are investigated in the literature. The major objectives of the DSTATCOM are reactive power compensation, harmonics elimination, compensating the SPV power variations, maintaining load balance, and providing zero voltage regulation to the low voltage distribution networks. Hence, an efficient and robust controller is needed for the DSTATCOM so that a constant voltage will be maintained at the PCC irrespective of unbalanced load and fluctuating environmental parameters. Several power converter topologies are reported in the literature for DSTATCOM. To achieve efficient control of those converters, many advanced control techniques are investigated in the literature. As the generated power from the SPV fluctuates with the variations of the environmental conditions, maximum PowerPoint tracking (MPPT) techniques are required to be adopted to extract the optimum power from the SPV [6]- [8]. Several efficient MPPT techniques are reported in the literature such as perturb and observe (P&O) [9], variable step size, incremental conductance (INC) [10], fuzzy logic-based MPPT, voltage control [11], and current control [12]. This algorithm is differed from one another by their implementation, tracking speed, cost, etc. The P&O MPPT technique is commonly used because of good performance, ease of implementation, and less complexity in comparison with other MPPT techniques.
The phase-lock-loop (PLL) [13], synchronous reference frame-based PLL (SRF-PLL) [14] are the traditional choice for synchronization in the presence of two sources. It is studied that conventional PLL leads to harmonic resonance, which causes system instability [15]. Under distorted grid conditions, SRF-PLL performance is degraded due to limited bandwidth. There is a trade-off between large bandwidth and narrow bandwidth. Large bandwidth causes a fast response and at the same time, it has poor filtering capability [16]. To overcome this issue, a delayed signal cancellation PLL (DSC-PLL) based moving average filter (MAF) has been presented in [17]. The drawback of this filter is due to the introduction of the large latency, as it requires a larger filter window [18]. Sun et al. have proposed a tedious and cumbersome control algorithm based on proper learning of neurons [19]. A fourth-order optimization-based the least mean fourth (LMF) algorithm has been proposed in [20]. It has extensive computation, large steady-state error, and unable to block dc-offset [21]. To overcome the aforementioned problems, PLL-less method such as induceverter [22] synchronverter [23], unit template [24] and frequency-lock-loop (FLL) have been introduced in recent literature. The drawback of the first two methods is their current limiting properties, the unit template method depends on the symmetrical grid voltage. The performance of this method is satisfactory under steady state conditions, but in the case of weak grid its performance deteriorates. As a result, the positive sequence component must be extracted from the weak grid. To support this idea, SOGI has been introduced [25]. Based on this technique, many researchers have developed advanced control algorithms such as enhanced PLL (EPLL) [26], quadrature PLL (QPLL) [27], SOGI based frequency-lock-loop (SOGI-FLL) [28], multi SOGI-FLL (MSOGI-FLL) [29]. In SOGI-FLL the frequency is obtained through adaptive algorithm, whereas in PLL the frequency is estimated through feedback path of the PLL block. Thus, FLL has better performance in comparison with PLL. However, the performance of FLL has severely hampered with the presence of DC offset. The estimated frequency is erroneous because the low frequency component is superimposed on the average value. An improved PR controller-based SOGI-FLL is developed in [30] to address DC offset. However, it is less effective during highly dynamic load conditions. In this paper, a novel CESOGI-FLL-WPF controller is proposed for the SPV-DSTATCOM. The proposed controller is constituted by connecting two ESOGI-FLL controllers in a cascade manner. The filter associated with the first ESOGI-FLL block performs as a prefilter, which rejects the DC offset and suppresses the sub-harmonics from the input signal. Another filter associated with the second ESOGI-FLL block facilitates the extraction of the fundamental as well as quadrature components of currents. The proposed controller is tested under a variety of load circumstances, including both static and dynamic loads. In addition, certain performances of the proposed controller are compared with the ESOGI and SOGI under the same experimental conditions. The proposed controller is simple, reliable, and better at eliminating harmonics and rejecting DC offsets than the ESOGI and SOGI. The summary of the most important contributions made by this paper are as follows: extract fundamental components as well as quadrature components from the distorted load currents for satisfactory operation of grid-connected SPV-DSTATCOM system. • Ensuring active power injection to the grid after fulfilling the active power demand of the connected loads. At the same time, the power quality issues are solved via SPV-DSTATCOM. • P&O MPPT technique is implemented to extract the maximum available power from the SPV. • Enhancement of device utilization ratio as the grid connected inverter (GCI) acts as DSTATCOM during nighttime or absence of sunlight. • Improvement of stability of the system under both unbalanced load and dynamic load conditions. MATLAB/Simulink software is used to execute the simulations. The potency of the proposed controller is confirmed through simulations followed by experimental tests on the developed hardware prototype.
The following are the sections that make up this manuscript: Section II describes the CESOGI-FLL-WPF control architecture and the shunt compensator configuration. Experimental validation and comparisons with other control structures are discussed in Section III, which includes the desirable findings. Section IV comes to a conclusion.

II. CESOGI-FLL-WPF METHODOLOGY FOR SPV-DSTATCOM A. SPV-DSTATCOM SYSTEM DESCRIPTION
A three-phase, three-wire SPV-DSTATCOM with grid integration is shown schematically in Fig. 1. This system includes an SPV array, three-phase grid with source impedance, linear and nonlinear loads, three-phase GCI, and an interfacing inductor with a ripple filter. The threephase nonlinear and linear loads are fed from three-phase alternating current (AC) mains. The SPV with GCI is linked through an inductor filter at the point of common coupling (PCC) in order to eliminate phase current ripples at high switching frequencies. An uncontrolled diode bridge rectifier and a series RL load are used to create the nonlinear load. Besides the load and grid side phase currents, PV voltage and current, PCC line-to-line voltages are measured through hall-effect current and voltage sensors. These sensed signals are given feedback to the proposed controller. At PCC, noise from voltage signals is removed using a ripple filter. The grid integrated SPV-DSTATCOM system has experimental parameters as shown in Table 1.

B. CONTROL ARCHITECTURE
On the weak grid, the positive sequence voltage can be extracted using the CESOGI-FLL-WPF control structure. It is used for grid synchronization to estimate the unit templates. Once the fundamental components are calculated, the proposed control structure is used to generate GCI gate pulses with estimated reference currents for the hysteresis controller. VOLUME X, XXXX

1) Unit Template Generation
The calculation of the unit template is carried on by sensing two line-line voltages. It is converted to phase voltages as (1).
These phase voltages are passed through CESOGI-FLL-WPF and follow a simple calculation to get the positive sequence Fig. 2. The positive sequence components of the PCC voltages are calculated as From Fig. 2, the transfer functions of the CESOGI-FLL-WPF in between the output signal and input signal are as follows: Fig. 3(a), the bode plot of the suggested control structure is shown in comparison with the ESOGI and SOGI control structures. The proposed controller is examined to see how it rejects DC offsets and eliminates harmonics of lower and higher orders. The proposed controller has a positive phase margin and a positive gain margin, indicating stability. The root locus plot reveals that the system is more stable at R 1 = 0.2 as shown in Fig. 3(b). The proposed controller's stability is tested under transient grid frequency (f) conditions and shown in Fig. 3(c). The PCC voltages are being utilized to evaluate the magnitude and phase of the unit template (u px ∈ {u pa , u pb , u pc }) as (4).
where the amplitude of the terminal voltage is represented by v t (= 0.816 u 2 pa + u 2 pb + u 2 pc ). In this case, the quadrature unit templates are calculated once again as (5).

2) Estimation of Fundamental Load Current
The fundamental, quadrature, and harmonic components are all present in the sensed three-phase load currents. Active power is represented by the fundamental component, while the quadrature component represents the reactive power. CESOGI-FLL-WPF estimates both the fundamental (h pa , h pb andh pc ) and quadrature (h qa ,h qb andh qc ) components of the measured load current. PV-DSTATCOM uses the reference current calculated after the fundamental component current calculation is completed. Fig. 4 depicts the process of separating the essential components. Prior to being detected by a zero-crossing detector (ZCD), the estimated fundamental components are transmitted via a sample and hold circuit to confirm their accuracy. In each phase, two separate ZCDs  are used to produce eitherh px orh qx . The unit template u px (u qx ) triggers the ZCD corresponding toh px (h qx ). The average value of the fundamental (h px ) component can be deduced as (6). Similarly, the quadrature (h qx ) component can be evaluated as (7). 3

) Power Loss Estimation
To maintain the actual DC-link voltage at its reference value, a capacitor needs to draw extra current. The supply voltage is in phase with this current. This current keeps the system loss constant during the steady state. By charging and discharging  during transient states, it helps keep the DC-link voltage at its reference voltage [31]. It is calculated by passing the difference between the reference (V * (i) dc ) and the actual (V (i) dc ) DC-link voltages through a PI tuner. It is written in a discrete manner as (15) dc,err (8) where the error between the reference and actual DC-link voltage is denoted by V is estimated by using the MPP operation of P&O algorithm [32].

4) Reference Current Extraction
The grid provides the loss current components as well as the active power current components for the connected load. In addition, the SPV unit also provides the active power at the PCC, considered as feedforward termh pv .
where V P V and I P V are the measured SPV voltage and current, respectively. Now, the net active power current component (h sp ) required from the grid can be derived as in (10).
By multiplying the net component by the relevant unit templates, the fundamental reference currents can be evaluated as (11).
The reactive reference current for zero voltage regulation (ZVR) can be derived from the voltage control loop's output using a PI controller. Initially, the terminal error voltage is evaluated as v where v * (i) t is the reference terminal voltage from (1) and v (i) t is the measured value of the terminal voltage.
The net reactive current component (h sq ) is calculated using the difference between the fundamental reactive current component required by load and the AC loss component, i.e., The reactive current component is estimated as (15).
Eventually, the grid current references are evaluated as (15).
The current error is yielded by the reducing the sensed grid currents (i sa , i sb , i sc ) from reference currents (i * sa , i * sb , i * sc ). Gate pulses are generated by passing these errors through the hysteresis current controller. Hysteresis band of 0.05 A is used for the proposed control action. VOLUME X, XXXX

III. EXPERIMENTAL VERIFICATION
To prove the potentiality of the proposed controller, a laboratory prototype of the proposed system is developed. A GCI of three-phase two-level configuration is used. The non-linear loads are realized by diode-bridge rectifier connected with R-L loads. A solar PV simulator (Chroma made) is adopted for physical realization of the SPV power generation. The DC-Link voltage and line voltages at PCC are sensed using the hall effect voltage sensors (LEM LV 25P). The three-phase load currents, three-phase grid currents and SPV output current are sensed using hall effect current sensors (LEM 55P). The power circuit and gate pulse circuit are optically isolated by an optocoupler (TLP250). The DSP controller (dSPACE 1202) is used to implement the proposed CESOGI-FLL-WPF controller. A power analyzer (YOKOGAYA WT500) and a YOKOGAYA made four channel DSO (DLM2024) are employed to record the performance of the system during experiments. The screenshot of the laboratory setup for the proposed system is shown is Fig. 5. All the data regarding the tests are summarized in Appendix.

A. STEADY-STATE PERFORMANCE ANALYSIS
The steady state performance of the proposed system is tested under balanced grid and load conditions. Both the linear load and nonlinear load are connected to the system. The MPPT (P &O) performance under steady state condition at 1000 w/m2 irradiance is shown in Fig. 6. It is observed from I-V curve and P-V curve that the voltage and current corresponding to MPP are 118 V and 8.4 A, respectively. The MPPT efficiency is showing as 99.6%, which claimed that the maximum available power is extracted from the SPV. The reference currents for A-phase (i * sa ), B-phase (i * sb ) and C-phase (i * sc ) are produced by the controller. The A-phase load current (i La ) and the three-phase reference currents are plotted in Fig. 7(a). The compensation currents are provided by the GCI. The three-phase compensation currents and measured dc-link voltage waveforms are shown in Fig. 7(b). The waveforms of the line voltage (v sab ) at PCC and the three-phase   Fig.  7(c). Initially, the magnitude of the grid currents is high, and their waveforms are distorted to some extent. Because the power generated by the SPV is zero initially, so the total load demand is supplied from the grid. After a few cycles, the SPV starts power generation and the SPV-DSTATCOM also starts its functioning. Total active power demand of the connected loads is shared between the SPV and the grid, and GCI pro-duces compensation currents. Hence, the magnitude of the grid currents is reduced, and their waveform becomes close to sinusoidal. Such phenomenon of grid current is numerically proved by the power analyzer results shown in Fig. 8. The power analyzer results for the grid side before compensation and after compensation are presented in Figs. 8(a) and 8(b) respectively. Before compensation, the magnitude of the grid current is 12.5A, and the active and reactive power provided by the grid are 1.4 kW and 0.309 kVar, respectively. When SPV-DSTATCOM starts its functioning, the magnitude of grid current is reduced to 5.86A, and the active and reactive power injected by the grid are also reduced to 0.718KW and 0.084KVAR respectively. The THD analysis of individual phase currents of the grid are presented in Figs. 8(c)-8(e), respectively.

B. EXTRA POWER DELIVERY TO GRID
When SPV-DSTATCOM starts its functioning, it extracts the maximum power from the SPV at a given irradiance value.  3 Ω, L s = 0.03 mH, R s /X s = 3.185 Ripple filter R f = 6 Ω, C f = 10 µF Non-linear load 3-Φ rectifier with RL load of 4 Ω, 40 mH Load power P L = 1.49kW, Q L = 309V ar Load current 12.59 A PI tuning parameter K p1 = 0.152, K i1 = 0.016, K p2 = 0.0136, K i2 = 0.0019 DSTATCOM parameter V * dc = 150 V, C dc = 2200 µF , L f = 5 mH, λ=0.0126 PV emulator rating P mpp = 741 W, V GM P P = 110.4 V, I GM P P = 6.7 A, V pv = 111.27 V, I pv = 6.64 A The whole amount of the generated PV power is supplied to the loads. To fulfil the total active power demand of the loads, the loads draw the deficit amount of active power from the grid. Thus, both the SPV and the grid share the total active power demand of the loads. When the connected loads are suddenly reduced to a value that is less than the power generated by the SPV at that time. Now the whole active power demand of the load is provided by the SPV. The excess generated power of the SPV is injected to the grid. The waveforms of the grid voltage, grid current, dc-link voltage, and PV output current are shown in Fig. 9. It is noticed that the grid voltage and grid current prior to such a sudden change of load are in phase with each other. In this phase, the relationship between grid voltage and grid current indicates that the grid is injecting active power to the load. Just after the curtailment of load, the grid voltage becomes out of phase with the grid current. Such out-of-phase relationships prove that the SPV-DSTATCOM system in delivering active power to the grid. However, the magnitude of dc-link voltage and PV output current both remain unchanged prior and after load changes. Under the circumstances of such sudden load changes, the waveforms of the A-phase compensation current provided by the GCI, A-phase load current, dc-loss component, and net active weight component are plotted in Fig. 9(b). Prior to load change, the compensation current provided by the GCI is composed of active component current and harmonics current. When the nonlinear loads are suddenly withdrawn from the system, the requirements of harmonics currents become null. Hence, the compensation current only consists of the active components of the load current. As a result, both the load current and compensation current become nearly sinusoidal. As the dc-link voltages remain unchanged, the magnitude of DC loss component remains unaltered. As the grid current is decreased after the withdrawal of nonlinear loads, the magnitude of the net active current increases after such load withdrawal.

C. NIGHT MODE TO DAY MODE TRANSITION
The SPV power output is reduced to zero during the night because of zero solar irradiance at that period. Hence, the PV output current also becomes zero. The SPV-DSTATCOM performs as DSTATCOM, maintaining 105 V dc-link voltage. When the solar irradiance value is increased from zero to a threshold value, the SPV starts power generation. The magnitude of PV current is increased from 0 to 8.4 A, and the dc-link voltage is maintained at 118 V, corresponding to the MPP. With the increase of PV current, the magnitude of the grid current is decreased and becomes in phase with the grid voltage. The variations of grid voltage, grid current, dc-link voltage, and PV current during the transition from night mode to day mode are plotted in Fig. 10(a). During such transition, the waveforms of the compensation current, A-phase load current, dc-loss component, and active weight component are shown in Fig. 10(b). During nighttime, the compensation current generated by the GCI contains only the harmonic components. When SVP starts generation, the GCI starts to deliver active component current in addition to the harmonics current. Then the grid currents become in phase with the grid voltages.

D. PERFORMANCE ANALYSIS WITH CHANGE IN SOLAR INSOLATION
The proposed system is subjected to a step change of solar irradiance from 1000 w/m 2 to 500 w/m 2 . The MPPT response after such change is shown in Fig. 11. It is noticed that the PV output current is reduced to 4.8A and V mpp is reduced to 103V. The MPPT is working with 99.9% efficiency. The PV array is delivering 500W power. Under such sudden change of solar irradiance, the dynamic behavior of the dclink voltage, PV current, A-phase compensation current, and A-phase grid current are plotted in Fig. 12(a). It is revealed that the magnitude of dc-link voltage, PV current, and compensation current are reduced with the reduction of generated power of the PV array. However, the magnitude of the grid current is increased to satisfy the load demand. The grid line voltage and reference currents produced by the controller are shown in Fig. 12(b). It is noticed that the magnitude of the reference current increases with the reduction of PV output power. Following such reference currents, the magnitude of the grid current is increased.

E. PERFORMANCE ON WEAK GRID
The environment of the weak grid is created by putting an external resistance in series with the B-phase of the grid. The magnitude of B-phase grid voltage is reduced from 40V to 30V, which causes an unbalanced three-phase grid voltage. The waveform of grid voltage and grid current before compensation is depicted in Fig. 13(a). When the SPV-DSTATCOM starts its working, the magnitude of the grid current becomes constant even under unbalanced grid voltage conditions, as presented in Fig. 13(b). The THD analysis of A-phase, B-phase, and C-phase of the grid are shown in Figs. 13(c)-13(e), respectively. For all three phases, the THD values are within 5%, which is in accordance with the IEEE VOLUME X, XXXX 519 standard. The power quality analysis of the weak grid with compensation is shown in Fig. 13(f).

F. TRANSIENT STATE PERFORMANCE WITH UNBALANCE LOADING
The dynamic behavior of the system under balanced grid and unbalanced load conditions are shown in Fig.14. The unbalanced load environment is created by the sudden removing of the B-phase load. The dc-link voltage and compensation currents for all three phases are shown in Fig. 14(a). The load current for A-phase and C-phase, dc-link voltage, and PV current are shown in Fig. 14(b). Net requirement of harmonics currents by the load is reduced due to the removing of B-phase load. Hence, the B-phase compensation current produced by the GCI is also reduced. It is noticed that the magnitude of dc-link voltage and PV current both remain constant even under such dynamic conditions. The grid currents for all three phases are depicted in Fig. 14(c). It is observed that the magnitude of the grid current is reduced after removing the B-phase load. As the SPV power outputs remain the same, the grid current magnitude is reduced to cope with the reduced load condition, and the grid current waveforms remain sinusoidal.

G. COMPARISON RESULT
The weight component dynamic behavior of the proposed controller is compared with two existing controllers, MSOGI and SOGI-FLL, with B-phase load removed. Such a comparison is presented in Fig. 15(a). which reveals that the proposed controller is superior to the other two controllers in terms of steady state error dynamics, dc-offset rejection capability, convergence time, and response time. The THD analysis of A-phase grid current under SOGI-FLL and MSOGI are separately shown in Fig. 15(b) and 15(c), respectively. It is revealed that the THD value of A-phase grid current under the proposed controller is less compared to that of under SOGI-FLL and MSOGI. The whole comparisons as mentioned above are summarized in Table 2.

IV. CONCLUSION
The performance of the SPV-DTATCOM system using CESOGI-FLL-WPF controller is validated through the experiments conducted on the developed prototype. The proposed controller exhibits satisfactory performance in terms of THD, steady state error, dc-offset rejection capability, dynamic response, extraction of maximum power, load balancing, and reactive power compensation when the system is subjected to changing solar irradiance, weak grid conditions, load withdrawal condition and night mode to day mode transition. Operation of the system as DSTATCOM is satisfactory in the absence of PV power. The utilization ration of the power electronic devices is improved significantly as it is working as DSTATCOM during the absence of sunlight. Hence, efficiency of the overall system is considerably increased with the reduction of overall cost. The THD of the grid currents under the proposed controller are in accordance with the IEEE 519 standard. The proposed controller outperforms the two existing controllers, SOGI-FLL and MSOGI.