A Sensorless Asymmetric and Harmonic Load Compensation Method by Photovoltaic Inverters Based on Event-Triggered Impedance Estimation

Low-voltage distribution grids face substantial challenges in terms of power quality, efficiency, and grid utilization that can affect both utilities and consumers. This work proposes a controller for grid-tied photovoltaic (PV) inverters, enhanced with advanced functionalities, to compensate current asymmetries and harmonics in low-voltage distribution grids. The proposed method relies on the estimation of the grid impedance that is utilized to approximate the current imbalance and harmonics caused by nearby loads. As a result, the need to measure the asymmetries and harmonics of nearby loads is alleviated, allowing a plug-and-play operation of PV inverters for the provision of phase balancing and harmonic compensation services. The effectiveness of the proposed method is experimentally validated in a laboratory-scale low voltage distribution grid with prototype inverters, in which PV inverters estimate and compensate current imbalance and harmonics of nearby loads. The experimental results indicate benefits in terms of power quality, reduced energy losses, and effective utilization of distribution grid capacity.

adapters, power supplies, etc.) and single-phase-connected, resulting in poor power quality and increased energy losses in the distribution grid [1]. Several standards have been designed to define or recommend certain limits on power quality-related problems, such as current imbalance and harmonic pollution [2], [3]. However, the compensation of power quality problems is still a challenging task due to the dispersed nature of single-phase nonlinear loads in the distribution grid. Therefore, a method for compensating asymmetric loading and harmonic currents in these networks can be of great interest.
Power quality compensation was initially provided by shunt active power filters [4] and unified power quality conditioners [5], [6] connected at several locations within the distribution feeder. Such solutions result in significant capital cost due to the extra power electronics-based converters that should be covered by the distribution system operator or the end users. In [7], the installation of an energy storage system at the medium-voltage/low-voltage (MV/LV) substation is proposed to compensate the asymmetric loading. However, the high capital investment for the batteries and the converter can be considered as the main barrier for the development of such a solution.
Alternative solutions have been proposed in [8], [9], [10], [11], [12], in which grid-tied inverters of PV systems are utilized not only for injecting properly the produced power into the grid, but also for providing power quality services to benefit the grid operation. In [8] and [9], the PV inverters are used to compensate the harmonic distortion imposed by the prosumer's nonlinear loads. In these cases, the inverter controller receives local measurements for the load currents that are analyzed by an adaptive observer to estimate the required distortion to be compensated. Further, a PV inverter, enhanced with advanced functions, has been proposed to compensate the asymmetric loading conditions [10] and selected harmonic currents [11], [12] of a prosumer. The load current is analyzed, using an advanced decoupling network, into sequence components which are used as reference inputs to the inverter's controller. All the aforementioned works [8], [9], [10], [11], [12] can maintain a high quality interaction between the prosumer and grid. However, the use of additional current sensors is required to measure the building loading conditions. The use of extra sensors imposes an additional cost for the prosumer and in some cases technical and distance restrictions are imposed due to the electrical installation of the building, since the PV inverter and the load may not be connected to the same distribution board. Another approach has also been proposed in [13] and [14] that is based on virtual harmonic resistances to compensate the effect of harmonic distorted local loads at the point of common coupling (PCC). This approach does not require another measurement device; however, it may cause a steady-state error on the compensation that needs to be taken care of.
Centralized control schemes that utilize advanced PV inverter functionalities are proposed to compensate current imbalances in [15], [16], and [17]. In these works, the coordination of phase balancing between several PV inverters is achieved by a central controller, which receives measurements from a single point at the MV/LV substation and generates the reference currents for the PV inverters. Using the centralized control approach, the asymmetries can be eliminated at the substation level; however, the unbalanced current may increase within the distribution feeder. For example, the PV inverters that are located far away from the source of unbalance will inject asymmetric currents to provide phase balancing, as a result several parts of the distribution grid will be highly unbalanced.
In this article, the asymmetric and harmonic loading conditions of the distribution grids are estimated by a PV inverter, using only local voltage measurements at the PCC. First, the PV inverter estimates the grid impedance using negative sequence current variations, similar with active and reactive power (PQ) variation methods [18], [19], [20]. Further, for avoiding periodic disturbances of the distribution grid due to the estimation of the grid impedance, an event-detection scheme is proposed to trigger the grid impedance estimation method. An adaptive threshold for the allowable voltage at the PCC is introduced by considering the PV inverter operating conditions, to trigger the estimation mechanism only when a grid event occurs. Then, the estimated grid impedance is utilized in real time for the estimation of the asymmetric and harmonic loading conditions absorbed by nearby buildings. Finally, an advanced PV inverter controller is designed to compensate the estimated loading conditions to improve the power quality of the distribution grid in a decentralized manner. The effectiveness of the proposed technique has been experimentally validated using a laboratory-scale low-voltage distribution feeder with prototype PV inverters and nonideal loads (i.e., asymmetric and harmonic currents). The main contributions of this article are as follows: 1) Develop a method for estimating the asymmetric and harmonic currents of nearby loads by utilizing only the estimated grid impedance and local measurements by the inverter. 2) Develop an event-detection scheme for triggering the grid impedance estimation. 3) Combine the above methods to design a fully decentralized and plug-and-play solution for providing phase balancing and harmonic compensation services. The proposed solution does not require additional sensors or any communication infrastructure and is able to maximize the power quality of the distribution grid and reduce the circulating currents within the feeder. A benchmarking is also included in this article, where the required features and the performance evaluation between the proposed method and existing methods in the literature are compared. The benchmarking demonstrates that the proposed method is the only method that does not require any additional features (i.e., additional sensors, communication infrastructure) for providing phase balancing and harmonic compensation scheme, and outperforms the other methods in terms of power quality improvement since it is also minimizing circulating current across the feeder. The article is organized as follows. In Section II, the new controller is presented to enable phase balancing and harmonic compensation. Section III demonstrates the effectiveness of the proposed method based on experimental results. The performance evaluation of the proposed strategy is demonstrated in Section IV, while the article is concluded in Section IV.

A. PV Inverter System Model
The PV inverter model that is used in this work is shown in Fig. 1. The PV inverter is connected to the low-voltage distribution grid through an LC filter, which is connected in parallel with a single-phase load and an electronic load. The lowvoltage distribution grid is modeled as an equivalent Thevenin model, represented by a grid impedance (Z G ) in series with a grid voltage source (v G ). For the grid impedance representation, the resistive-inductive model is used because it is considered sufficient to obtain accurate characterization of the grid impedance [19].
The inverter controller is designed in αβ frame and is based on 1) a decoupling network [10], illustrated in Fig. 2(a), and an advanced synchronization unit [21], illustrated in Fig. 2(b), to analyze the PCC voltage and current into sequence and harmonic components; 2) an event-based grid impedance estimation unit [19], illustrated in Fig. 3;  3) a PQ controller to regulate power injection and ensure current limitation; 4) a proportional resonant (PR) current controller with parallel resonant controllers; 5) a Q-profile unit to ensure proper reactive support during voltage sag events [22, Fig. 2]; 6) a maximum power point tracking (MPPT) algorithm to maximize the power extraction from the PV panels; The first step for the design of an advanced inverter controller, which can compensate asymmetries and harmonic currents imposed by prosumer or nearby loads, is the decomposition of the voltage and current into sequence and harmonic components. For this purpose, the voltage and current at the PCC can be expressed in the αβ frame as  Fig. 2(a). It should be noted that the accurate extraction of the sequence and harmonic components relies on the estimation of angle θ, which corresponds to the positive sequence grid voltage angle estimated by the phase-locked loop (PLL). Therefore, the sequence components of the voltage and current are estimated by combining (2) in a recursive crosscoupling way where m can take the same value as k but for each row k should be excluded. In (2), [T dq m ] and [T dq −m ] represent the forward and backward Park's transformation matrix to transform the vector into a m-plane, rotating with m × ω speed, where ω represents the frequency of the positive sequence fundamental grid voltage. The term [F (z)] represents a first-order low-pass filter matrix with a cutoff frequency equal to 2π50/3 rad/s to achieve dynamic performance and adequate attenuation of oscillations [10], [21]. As a result, the utilized decoupling network achieves fast dynamic response that allows a stable and proper operation of the inverter. The positive sequence of the grid voltage, extracted by the decoupling network, is fed to a conventional PLL to accurately track the grid phase angle theta, as shown in Fig. 2 The PQ controller should regulate the positive sequence reference of active (P +1 * ) and reactive (Q +1 * ) power injection of the inverter as defined in the following: where v +1 α and v +1 β represent the PCC voltage in αβ frame and i +1 * αβ = [i +1 * α i +1 * β ] T represents the positive sequence reference current in αβ frame. The PQ controller also regulates the reference current for phase balancing (i −1 * αβ ) and harmonic compensation (i h 1 * αβ . . . i h n * αβ ). These reference current can be either measured at the point where compensation is needed [15] or they can be estimated based on the proposed strategy (see Section II-D) without requiring additional sensors, and can be provided as inputs for the PQ controller. The reference current generated by current of the PQ controller in αβ frame (i * αβ ) is defined as follows: The reference current from the PQ controller is fed into the current controller that is designed based on PR controllers with parallel harmonic compensators [22]. The transfer function of the current controller (G i (s)) is defined as follows: where k p−cc represents the proportional gain, k i−cc the resonant gain at the fundamental frequency, and k ih the resonant gain at the particular harmonic order. As a result, the current controller can intentionally generate asymmetric and harmonic currents for compensation of imbalances and harmonics, respectively. Further, the PQ controller is responsible to maintain the dc-link voltage and to ensure that the current limits of the converter will never be violated. In case the imbalance and harmonic currents are intense, the required current may exceed the nominal current (I rated ) of the PV inverter. Therefore, the magnitudes of negative sequence current (|i −1 * αβ |) and harmonic sequence current should be limited. It should be highlighted that the magnitude of the positive sequence current must not be affected by the phase balancing or/and harmonic compensation for ensuring maximum power production. As a result, the maximum negative sequence and selected harmonic currents are determined as follows: An important point to mention is that by using (6), the negative sequence current injection is prioritized and then the rest of the selected harmonic current is prioritized according to their order and to the inverter capacity availability. The developed PV inverter can deliver the available power into the grid while providing compensation services. For the compensation mode, the inverter requires an estimation of the grid impedance that can be used to approximate the current imbalance and harmonics imposed by nearby loads. More specifically, the event-based grid impedance estimation block provides the estimated resistance and inductance to the asymmetric and harmonic current estimation unit.

B. Grid Impedance Estimation Method
In this work, the grid impedance estimation is required toward the estimation of the asymmetric and harmonic operating conditions to be compensated by the inverter. Therefore, an established grid impedance estimation method from the literature is utilized [18], [19], [20]. In this section, the grid impedance estimation method is described where the estimation is performed by deviating the injection of negative sequence currents, similar to the active and reactive power variation initially used in [18], [19], and [20]. Since the asymmetric current injection is enabled by the inverter for ancillary services provision, the negative sequence current injection is utilized for the estimation to avoid active and reactive power disturbances without introducing additional complexity. However, the periodic deviation of either the negative sequence current or the active/reactive power introduces undesired operating disturbances. Therefore, an event-based triggering mechanism is proposed in Section II-C, which activates this estimation mechanism only whenever an event occurs to reduce the disturbances introduced by the estimation scheme.
The knowledge of grid impedance can be used to improve the overall operation of grid-tied inverters. For instance, the grid impedance estimation has been used for islanding detection [23], adaptive control [24], and decoupling inner control loop in synchronous (dq) frame [25]. In this work, the grid impedance estimation method is used for enabling the estimation of asymmetric and harmonic currents of nearby buildings. Several methods have been proposed in the literature to online estimate the grid impedance [18], [19], [20], [26], [27]. These methods can be divided into active and passive techniques. The passive methods utilize the normal system operation to estimate the grid impedance [26], [27]. Although, these methods do not disturb the grid operation, their lower accuracy compared with the active techniques is considered their main drawback.
The procedure for the grid impedance estimation is shown in Fig. 3. It should be noted that the estimation unit operates in the dq frame, where the sampled values are dc quantities, to allow more accurate estimation. The transformation from αβ to dq frame is achieved using the decoupling network. An enable command for detection (D), generated by the event-detection unit, activates the negative sequence current variations (Δi −1 dq ) for estimation of the grid impedance. Three different operating points are sampled during the estimation time (t est ), as show in Fig. 3, to obtain the estimated grid resistance (R G ) and inductance (L G ). The first operating point is obtained by varying the negative sequence d-axis current (Δi −1 d ) for a specific time Δt d . The second operating point is obtained by varying the negative sequence q-axis current (Δi −1 q ) for the duration of Δt q . The third operating point is obtained without any variations on the negative sequence current, considered as steady-state conditions of the system. The impedance estimation method avoids concurrent variations of Δi −1 d and Δi −1 q to minimize the inherent decoupling in the dq reference frame. As a result, more accurate estimation can be obtained. Once the three operating points are sampled, the grid resistance and inductance are estimated aŝ Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
where subscripts 1, 2, and 3 denote the sampled values from the three distinct operating points stated in Fig. 3 (i.e., first, second, and third operating points) and ω represents the angular fundamental frequency of the grid. It should be pointed out that the value of the estimated grid impedance is updated on the falling-edge of the enable signal D.

C. Event-Based Triggering of the Detection Method
The periodic disturbance of the grid due to the estimation procedure, with negative sequence current variations, deteriorates the power quality and threatens the grid's stability [19]. Therefore, an algorithm for detecting the variations of the grid impedance is proposed in this section. The positive sequence PCC voltage amplitude (V +1 ) and the previously estimated grid impedance are utilized by the event-detection scheme to trigger the enable signal D for updating the grid impedance estimation. It should be noted that an initial estimation of the grid impedance is required for the operation of event-detection unit. The first estimation can be performed when the inverter is connected to the grid for the first time. Thereafter, the monitored V +1 is continuously compared with an upper and a lower threshold to determine any changes in the grid impedance. The upper (V +1 th−up ) and lower (V +1 th−low ) voltage thresholds are given by whereV +1 andī +1 dq denote the sampled positive sequence PCC voltage and inverter current injection during the previous estimation in dq reference frame, respectively. The i +1 dq represents the real-time positive sequence current injection of the inverter in dq reference frame, theẐ T G = [R G jωL G ] represents the estimated grid impedance and e v is a deadband zone margin. This margin is introduced in (9) and (10) to allow a voltage variation, typically 1-5% due to normal load deviations in distribution grid or expected grid voltage fluctuations, where the estimation should not be triggered. For example, a tap change at the transformer will change the grid impedance and re-estimation will be required. In this case, one tap change typically corresponds to 1.25% voltage variation and as a result, the grid impedance estimation unit should be able to be triggered under such voltage variations to capture the new grid impedance. The main idea behind the adaptive thresholds introduced in (9) and (10) is that any significant change in the V +1 that is not caused by the positive sequence current injection of the inverter itself can indicate a change in the grid impedance. Finally, if V +1 exceeds any of the threshold values for the minimum duration of detection (t det ), then the estimation should be triggered. The minimum duration of detection is introduced to avoid any unnecessary estimation tripping in case of transient voltage variations. Hence, the enable signal for triggering the estimation detection scheme is determined by   Fig. 4 demonstrates the diagram for the proposed event-based grid impedance estimation method and the approximation of the current imbalance and harmonics. The event-based grid impedance estimation method developed in Sections II-B and II-C can be utilized to approximate the current imbalance and harmonics. Fig. 5 demonstrates the equivalent circuit diagram of an inverter connected in parallel with a load to the main grid. It should be noted that the PV inverter is represented by a current source and a parallel inverter impedance (Z l I ). The equivalent circuit will be used to derive the estimated asymmetric and harmonic loading conditions of the load. Therefore, the following analysis considers only the negative sequence and harmonic orders that are represented by the superscript l = −1, h 1 , . . . , h n . Initially, the PV inverter does not provide phase balancing and harmonic compensation, as a result negative sequence current and harmonic currents are considered zero (i.e., i l dq = 0). Hence, the voltage vector at the PCC (v l dq ) at dq synchronous reference frame can be given as

D. Unbalance and Harmonic Current Estimation
where v l G−dq and i l L−dq represent the grid voltage vector and the load current for negative sequence and selected harmonic orders, respectively. Further, Z l G = [R G jlωL G ] represents the grid impedance at the corresponding sequence and harmonic orders (l = −1, h 1 , . . . , h n ). Considering (12), the imbalance and harmonic loading conditions can be calculated according to the decomposition of the local voltage measurement (v l dq ) and the estimated grid impedance aŝ It should be noted that v l G−dq is not known by the PV inverter. Under ideal conditions, the grid voltage is purely sinusoidal and thus v l G−dq = 0; however, when intense nonideal loads are connected to other locations of the grid then v l G−dq may not be zero. In this work, v l G−dq is intentionally considered equal to zero, since the controller objective is to compensate all the phenomena that can lead to nonzero v l G−dq . Therefore, if nonzero v l G−dq values are mainly caused by nonideal loads connected to the same feeder with the inverter, the controller will force the inverter to inject currents i l dq for compensating i l L−dq and as a result v l dq = v l G−dq = 0 will be achieved. However, if nonzero v l G−dq values are caused by nonideal loading conditions absorbed by other feeders (without such inverters), the inverter will inject currents i l dq for compensating i l L−dq and will try as well to provide further compensation currents to suppress v l G−dq . In the latter case, the inverter will overcompensate the nonideal loading conditions offering compensation services to other feeders of the distribution grid as well.
A proportional integral (PI) controller is used to accurately regulate the estimated load current. The output of the PI controller is defined aŝ where i l * L−dq represents the reference load current at negative sequence and selected harmonic orders that should be equal to zero for achieving complete elimination of asymmetries and harmonic currents. The k p and k i represent the proportional and integral gain of the PI controller, respectively.
Finally, eachî l * dq is transformed into the corresponding αβ frame, by using the backward Park's transformation matrices ([T dq −l ]), and all the components are added to generate the total reference signal for phase balancing and harmonic compensation servicesî * P BHC−αβ , as given bŷ where It should be noted that due the compensation of unbalance and harmonic currents by the PV inverter, double frequency and harmonic frequencies oscillations will appear on the dc-link voltage. An investigation is performed to analyze the oscillations on the dc link by increasing the compensation of asymmetries and harmonics from 10%-30%. In this case, the oscillations that appear are from 0.132% to 0.36% of the nominal dc-link voltage. As a result, these oscillations are not expected to affect the MPPT performance. Further, a low-pass filter can be used for the dc-link voltage to reduce the double frequency oscillations since the execution frequency of the MPPT is slower than the frequencies of oscillations [28]. Further, these oscillations can increase the hot spot temperature of the dc-link capacitor, which is considered the main stress factor for the reliability of the capacitor [29], and as a result its lifetime will be reduced. In practice, the reliability issues can be balanced with advanced control algorithms that regulate the compensation according to the temperature of the device [30], [31], [32]. The selection of the optimum operation temperature should be selected to maximize the profit of the PV system considering a tradeoff between the revenues gained by the provision of the asymmetric and harmonic compensation services and the cost associated with the lifetime reduction.

III. EXPERIMENTAL VALIDATION
A radial laboratory-scale low-voltage distribution feeder (LVDF) has been developed to evaluate the performance of the proposed controller for providing phase balancing and harmonic compensation services. The experimental setup consists of two prototype PV inverters and a fully controllable building load. The diagram of the experimental setup is demonstrated in Fig. 6(a) and a photograph of the setup is shown in Fig. 6(b). The PV inverters and the load have been connected with additional impedances (Z 12 and Z 21 ) that emulate the distribution lines between the inverters and the load. These distribution lines can be bypassed or connected in series to emulate impedance changing events. The controllers of PV inverter 1 and 2 have been developed within dSPACE DS1104 and OPAL-RT OP4200 control boards, respectively, and these controllers drive two 5-kVA three-phase inverters based on IGBTs switching devices (SEMIKRON Semiteach B6U+E1C1F+B6CI). The building load has been developed within a PUISSANCE PLUS 4Q power amplifier that has been configured to operate in current control mode. Further, a real time digital simulator (RTDS) OP5707 has been used to generate the reference currents that are used to drive the power amplifier to emulate the variable loading conditions of a consumer. Finally, the PV inverters and the load have been connected to the main power grid with a 10-kVA isolation transformer. A list with the experimental parameters is available in Table I. It should be noted that the same LC filter parameters are used for both PV inverters, regardless their different switching frequencies, due to experimental limitations. The filter parameters are designed according to [33]. It should be noted that the majority of the experimental results are sampled with the control frequency of the prototype inverter. However some results showing the inverter current injection have been sampled by an oscilloscope with 20-MHz sampling frequency.
For evaluating the performance of phase balancing service provided by the inverter based on the negative sequence current estimation, the CUF is calculated as where |i −1 G | and |i +1 G | represent the negative and positive sequence grid current magnitude, respectively. Further, the total current harmonic distortion (THD i ) is utilized as a performance indicator to evaluate the performance of the current harmonic compensation service by the inverter and is defined as where |i h G | is the magnitude of the selected harmonic current at the grid side.

A. Event-Based Grid Impedance Estimation Validation
This section investigates the performance of the event-based grid impedance estimation scheme. Figs. 7 and 8 demonstrate the experimental results of PV inverter 2 for estimating the grid impedance. It should be noted that PV inverter 1 has been deactivated during this case study. The PV inverter 2 initially produces active power P = 1000 W and reactive power Q = 400 VAr. Further, the extra impedances, Z 12 and Z 21 , have been connected between the two inverters while the building load has been configured to consume active power P = 670 W. At t = 0.7 s the grid impedance estimation is initially triggered to perform the first approximation. Once the trigger signal D is enabled, negative sequence current variations are performed according to the proposed methodology to estimate the grid impedance as shown in Fig. 8. At the end of the first estimation cycle, t = 0.9 s the grid resistance and reactance are accurately estimated as shown in Fig. 7.
Further, at t = 0.9 s, the upper and lower voltage thresholds are updated using the first estimation of the grid impedance to enable the event-based detection. Thereafter, Z 21 is bypassed at t = 2.3 s using a switch. As can be seen from Fig. 7, the PCC voltage is outside of the threshold values for the minimum duration t det as a result, the estimation of the grid impedance is triggered and the new impedance value is identified 0.3 s later. Finally, the active power of the PV inverter 2 is altered to P = 1300 W at t = 6.4 s to demonstrate the performance of the event-based algorithm under PV power variations. As can be seen, the adaptive upper and lower voltage thresholds have also been changed with the PCC voltage to ensure that grid impedance estimation is not triggered by the PV production variations of the inverter itself. The error between the estimated and reference resistance and reactance for the initial estimation is 4.5 mΩ and 5 mΩ, respectively, indicating accurate estimation. For the second estimation, the resistance error increases to 5.4 mΩ and the reactance error remains constant. These errors can be considered acceptable in practice and would not affect significantly the estimation of unbalance and harmonic currents due to the closed-loop structure of the controller.

B. Phase Balancing and Harmonic Compensation Based on Grid Impedance Estimation
The second case study examines the imbalance and harmonic current estimation of the building load by using the estimated grid impedance. In this case study, Z 21 is bypassed and PV inverter 1 is disabled during this experiment. Figs. 9 and 10 demonstrate the experimental results for the estimation and compensation of the current imbalances and harmonics. The building load is configured to consume additional negative sequence and harmonic current expressed in the corresponding negative sequence and fifth harmonic sequence dq synchronous reference frame as respectively. An initial estimation of the grid impedance is performed at t = 2.5 s, which can enable the estimation of the negative sequence and harmonic currents of nearby loads as in (13). At t = 5.48 s, the phase balancing and harmonic compensation controller is enabled to compensate the estimated negative sequence and harmonic current of the load. As indicated by Fig. 9, after the activation of the proposed controller the CUF and THD i are considerably reduced, improving the overall operation of the distribution feeder in terms of power quality, losses, and grid capacity utilization. It should be noted that in this case study the THD i is calculated by considering only the fifth harmonic component and other harmonics are neglected. Finally, an increase of the negative sequence current of the load is performed at t = 9.28 s. The additional negative sequence current is estimated and compensated by the proposed controller as it can be seen by the CUF and THD i . Fig. 10 demonstrates the three phase currents before and after the activation of the proposed controller of the building load, PV inverter 2, and grid. As can be seen, before the activation of the proposed controller, the grid currents are asymmetrical and harmonic distorted. After the activation of the controller, the grid currents are symmetrized  and contain considerably lower harmonic components due to the injection of unbalance and harmonic currents by the PV inverter 2. The phase currents before and during the compensation of PV inverter for this case study are also obtained with the oscilloscope and are shown in Fig. 11. The phase currents of the PV inverter during the dynamic response of the system, when the compensation scheme is activated at t = 5.48 s and when the feeders loading conditions are changed at t = 9.28 s, is demonstrated in Fig. 12. The phase currents shows that the inverter is able to achieve a dynamic performance and the injected current can compensate the asymmetric and harmonic current within 40 ms.

C. Operation in a Laboratory-Scale Distribution Grid
For investigating the operation of the proposed controller within a LVDF, PV inverter 1 and 2 are connected with the additional impedances and the building load as shown in Fig. 6.  The building load is configured to consume negative sequence current (i −1 L−dq ) as shown in Fig. 13. First, the grid impedance is estimated by both PV inverters and then the compensation is activated at t = 6.28 s and t = 14.28 s for PV inverter 2 and 1, respectively. As can be observed from Fig. 13, initially PV inverter 2 compensates part of the unbalance load because the load is located closer to PV inverter 1 (Z 21 ≥ Z 12 ). Once the compensation controller is enabled for PV inverter 1, the negative sequence current of the load is completely compensated. It should be noted that PV inverter 1 provides a more intense compensation of the negative sequence current because it is located closer to the building load. At t = 20.13 s, an increase of the negative sequence current of the load is performed. This increase is compensated by both PV inverters, which adjust their negative sequence currents according to the estimated grid impedance to compensate the current imbalances. Therefore, the unbalance and harmonic currents absorbed by building loads can  be compensated even in case the load is located in a distance from the PV inverter. Further, the PV inverters located closer to the imbalance provide higher compensation than the PV inverters located in a greater distance from the source of unbalance. Fig. 13 also demonstrates the total negative sequence current (i −1 tot−dq ) injected by the PV inverters, which is calculated as the summation of the negative sequence current of PV inverter 1 and 2. The total negative sequence current by both PV inverters indicates accurate estimation of the negative sequence current of the load. This allows a more efficient operation of the grid because the power quality phenomena are compensated by the inverter located closer to the load. The dynamic performance of the two PV inverters considering their phase current injection is also demonstrated in Fig. 14, when i) the compensation of PV inverter 2 is activated at t = 6, 28 s [see Fig. 14(a)], ii) the compensation of PV inverter 1 is enabled at t = 14, 28 s [ Fig. 14(b)], and iii) when there is a load change event at t = 20.13 s [ Fig. 14(c)].

IV. PERFORMANCE EVALUATION
A study to benchmark the performance of the proposed strategy is conducted in this section. The analysis considers four schemes in which a no compensation, local, central, and the proposed compensation strategies are implemented on a test network as shown in Fig. 15. The test network consists two passive consumers and three active prosumers (with 5-kVA PV inverter). The load demand of both consumers and prosumers is characterized by unbalanced and harmonic currents. The local compensation scheme requires a smart meter to measure the loading conditions of the building to be compensated by the inverter [10] that is installed in the same building. Hence, the asymmetric and harmonic loading of the prosumers only can be compensated. On the other hand, the central compensation strategy requires only a smart meter at the substation level, which communicates with a central controller [16]. Then, the central controller analyzes the measured current and allocates the reference negative sequence and harmonic currents for the PV inverters according to their availability (rating and real-time operating conditions). Table II summarizes the results from the benchmarking of the four different schemes. The features required by each scheme regarding the additional sensors needed and the required communication infrastructure for each scheme are also demonstrated. In addition, three key performance indicators are used to compare the operational performance of each scheme, namely substation current unbalance factor (CUF), average voltage unbalance factor (VUF) of the feeder, and the average current harmonic distortion (THD i ). Regarding the average indicators, the VUF and THD i is measured for the voltage of every bus of the feeder and the current absorbed by every consumer/prosumer, respectively, and then the average values for the two indicators have been calculated. As can be seen, the local compensation scheme requires three additional sensors for this particular case study (i.e., a sensor for each active prosumer) and local area network (LAN) communication to send the measured loading conditions to the PV inverter. The central control scheme requires only an additional sensor at the substation level to measure the total unbalance and harmonic currents. However, this measurement should be communicated to the central controller, which also requires communication with each inverter through wide area network (WAN). In this case, the cyber-security issues arise from the WAN communication should be properly considered. On the other hand, the proposed approach does not require additional sensors or any kind of communication infrastructure.
Regarding the performance comparison, the substation CUF is reduced from 32.5% in the case where no compensation is provided to 9% in case, where local control compensation is applied. The CUF cannot be reduced to zero in this case because the unbalance of passive consumers is not observed and compensated by the inverters. However, in case of the central and the proposed strategies the CUF is reduced to 0.01% and 0.001%, respectively, which indicates symmetrical currents at the substation. The lowest average VUF and THD i is achieved when the proposed scheme is applied since the compensation is provided by the PV inverter that it is closest to the source of Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. phase unbalance or/and harmonic currents, resulting in lower circulating unbalance and harmonic currents within the distribution feeder, compared to the central control scheme where the location of the currents to be compensated is not considered. As a result, the proposed scheme can improve significantly the operation and the power quality performance of the distribution grid without the need of additional communication links and sensors.

V. CONCLUSION
This work proposed a new control scheme for PV inverters to compensate the asymmetric and harmonic loading conditions imposed by the prosumer's loads or by other nearby loads without requiring any additional sensors. The solution was plug-andplay because any required grid information was estimated using the proposed event-based grid impedance estimation scheme and current imbalance and harmonic estimation algorithm. The estimated information was used by the PV inverters to provide phase balancing and harmonic compensation services to the distribution grid. Experimental results were provided to validate the effectiveness of the proposed scheme in a laboratory-scale LVDF with prototype PV inverters to demonstrate the great benefits that can be obtained regarding the power quality, efficiency, and effective utilization of the existing capacity of low-voltage distribution grids. Finally, the benefits of the proposed strategy were highlighted compared to other methods.