Distributed Control Strategy Based on a Consensus Algorithm and on the Conservative Power Theory for Imbalance and Harmonic Sharing in 4-Wire Microgrids

A distributed control system is proposed which uses the Conservative Power Theory (CPT) and a consensus algorithm to share imbalance and harmonics between different converters in three-phase four-wire droop-controlled Microgrids (MGs). The CPT is used to identify the balanced, unbalanced and distorted components of the currents and powers in the system. Control loops based on virtual impedance and implemented in the stationary a-b-c frame are then used to distribute these components between the various converters in the MG. The magnitudes of the virtual impedances are adaptively calculated using a novel consensus-based distributed control scheme with the aim of sharing imbalances and harmonics according to the residual VA capacity of each converter whilst regulating the imbalance and distortion at their output to meet the appropriate IEEE power quality standards. Extensive simulations show that the proposed distributed control has excellent performance, and experimental validation is provided using a laboratory-scale 4-wire MG.

Recently, this aspect has become important in MGs due to the need for higher reliability and security [4]. For instance, in [5] [6], distributed schemes for restoring frequency and voltage, considering active and reactive power sharing in three-wire MGs have been proposed. However, there is no straightforward solution for sharing imbalance and harmonic components in MGs. Moreover, to the best of our knowledge, there are no papers where distributed control schemes are proposed for sharing imbalances and harmonics in 4-wire MGs.
In a 4-wire MG, unbalanced loads produce negative sequence and zero sequence current components. In this situation, especially under heavy loading conditions, the overloading of a phase in one of the converters could reduce the power capability of the whole distributed generating unit, (e.g. by reaching the thermal limit in a single phase) unless the imbalance is either eliminated [7][8] [9] or shared with the other converters [10] [11] [12][13] [14].
One of the most serious problems arising from harmonic producing single-phase loads is the zero-sequence third harmonic current components (or triple order harmonics) that flow through the neutral conductor [15]. This zero-sequence third harmonic current circulating in the neutral conductors could be shared among any 4-leg converters in the MG to avoid overloading and/or tripping of individual converters [15].
It is worth noting that imbalance/harmonic sharing can only be achieved at the expense of increasing voltage imbalance/distortion at the outputs of the converters, as discussed in [16] [17]. Obviously, the maximum unbalanced voltage and voltage distortion allowed in the MG has to be regulated to avoid power quality issues such as those defined by the standard IEEE 1547-2003 [18] (which states the maximum voltage imbalances) and IEEE 519-1992 [19] (which states the maximum Total Harmonic Distortion (THD) values). However, at the planning stage of a 4-wire MG, the fact that not all the loads have the same sensitivity to supply voltage imbalance and distortion should be considered. Therefore, sharing methods should be designed to meet the voltage requirements at the most sensitive voltage busbars of the MG.
The sharing of imbalances and harmonics can be achieved using virtual-impedance-based methods [10] [11] [16] [20] [21]. In these publications, MGs working in islanded mode were studied. The sharing of imbalance requires the definition of negative and/or zero sequence impedances. In a similar way, harmonic sharing is achieved by defining virtual impedances for the harmonics of interest. Since imbalance and harmonic sharing is achieved at the expense of increasing voltage imbalance/distortion at the output of the converters [16] [17], these types of algorithms are implemented considering centralised [11] [16][20] [21] or decentralised [10] control schemes to actively modify the magnitude of the virtual impedances. These virtual impedances are modified where a highly unbalanced and/or distorted load is fed by the MG. Indeed, in these cases, the methodology proposed in [30] might achieve the sharing of imbalances and harmonics, but at the expense of producing voltage quality issues inside the MG. Furthermore, zero sequence components are not considered in [30].
In [29] [30], positive, negative and zero sequence current components (at the fundamental frequency), and harmonic current components, are identified using sequence separation algorithms. However, these algorithms are strongly affected by noise, harmonic distortion, variations in the sampling time magnitude, etc [31] [32]. In this paper, issues associated with the use of sequence separation algorithms are avoided by using the CPT-current transform recently proposed in [11]. In fact, as was demonstrated in [11], the CPT-transform is a robust tool for the identification of positive, negative and zero sequence components (at the fundamental frequency), and harmonic current components.
This paper proposes a new distributed control scheme for sharing imbalance and harmonics in 4-wire MGs. The scheme considers the limits of the imbalance and distortion in the voltage at the converters' outputs where sensitive loads might be located. With the proposed strategy, the frequency and voltage are restored to their nominal values, and the active and reactive powers are also shared according to the rating of each converter. Both imbalance and harmonic sharing are achieved by using a virtual unbalanced impedance and a virtual harmonic impedance. The magnitudes of these virtual impedances are adaptively modified on-line using a consensus algorithm [6] designed to achieve the sharing of the imbalance and harmonic components according to the residual VA power capacity of each converter at any particular operating point. Moreover, the algorithm also verifies that the converter voltage outputs meet the power quality required from the applicable regulations [18] [19]. The proposed distributed control scheme is executed in the fixed abc coordinate reference frame, and sequence separation is not required. The Conservative Power Theory (CPT) [8] [11] is used as the theoretical framework to achieve the identification of imbalances and harmonics at the output of each converter. The contributions of this paper are: (i) To the best of our knowledge, this is the first paper to propose a consensus scheme for the sharing of imbalances and harmonics, considering positive, negative and zero sequence components. Only 3-wire isolated MGs were studied in [29]- [30]. Therefore, only positive and negative sequence components in the voltages and currents were considered. (ii) The proposed consensus algorithm shares imbalances and harmonics in the MG, and at the same time, regulates the maximum values of imbalances and/or distortion in the voltage at the output of the converters to meet the corresponding IEEE standards (avoiding voltage quality issues). (iii) Unlike previous work [29] [30], the proposed distributed control scheme is performed in the abc coordinate reference frame, and sequence separation is not required. This produces a more robust imbalance sharing algorithm, particularly because most of the sequence separation algorithms are strongly affected by noise, harmonic distortion, small variations in the sampling time, etc [31] [32].
(iv) In previous work [29][30] paralleled converters feeding a single common load connected to a PCC were considered. The application to a MG with a more complex topology has not been considered. In this paper, a more generalised distributed scheme is proposed (the 4-wire MG depicted in Fig. 1).
The rest of this paper is organised as follows: in section II, the distributed 4-wire MG considered in this paper is described together with the CPT current transform; section III introduces the proposed distributed control scheme for the sharing of imbalance and harmonics; section IV presents the simulation results and section V provides the experimental validation of the proposed control scheme. Finally, section VI presents the conclusions.
II. CONTROL SCHEME FOR AN INDIVIDUAL 4-LEG CONVERTER Fig. 1 shows the islanded three-phase four-wire microgrid considered in this work. It is composed of five 4-leg power converters, six distribution lines, five loads and a distributed communication network (see the dashed lines in Fig. 1). and are respectively, the voltages and currents at the output of the th 4-leg converter shown in Fig. 1; and are the inductance and the capacitance of the LC output filter in that converter. In Fig. 1, it is assumed that the loads are unbalanced and non-linear.

A. Current Decomposition Based on the CPT
Consider the th 4-leg converter shown Fig. 1. Because of the unbalanced and non-linear nature of loads, the output current of that converter may contain positive, negative, and zero sequence components of the fundamental frequency and harmonic current components, as shown in (1) (in vector format). In this equation, + , − and 0 are the positive, negative and zero sequence components (at the fundamental frequency) of the current. The term ℎ represents the harmonic current vector.
Using the CPT, it is possible to avoid the use of sequence separation, performing a current component decomposition in the abc reference frame. By applying the CPT to the th 4-leg converter of Fig. 1, can be decomposed into five orthogonal current components, as shown in (2) (in vector format) [8]. In this equation, is the balanced active current, is the balanced reactive current, corresponds to the unbalanced active current, is the unbalanced reactive current, and correspond to the void current. All these currents are calculated in the abc reference frame based on measurements of and (see Fig. 1). In [33], an explanation of the calculation of these currents is provided.
Based on the RMS values of currents , , , , and the voltage , the CPT defines the power terms shown in (3) and (4). Notice that the capital letters I and denote RMS values. For instance the term denotes the RMS value of the addition of and [see (2)]. In (3), is the active power, and is the reactive power. In (4), is the unbalanced power and is the distorted power. Finally, these power terms are related to the apparent power ( ) through (5). [11] it has been demonstrated that the five orthogonal current components defined by the CPT (2) are approximately related to the current sequence components shown in (1), under the assumption of small imbalances and distortion in the voltage (see [11][34]). In particular, when IEEE Std 1547-2003 [18] (stating maximum voltage imbalances of 5%) and IEEE Std. 519-1992 [19] (stating maximum voltage THD of 5%) are met, it is possible to assume that the imbalances and distortion are small (see [11] [34]). Therefore, in this case, it can be concluded that the sequence currents shown in (1) are related to the CPT current decomposition shown in (2) through the relationships given by (6), (7) and (8) (see [11] [34]).
In (6), is the balanced current vector, and it contains the positive sequence of [see (1)]. The unbalanced current vector given by (7) contains both the negative and zero sequence current components of (1). Finally, the void current vector given by (8) contains the harmonic current components of (1).
Considering the framework discussed above, and using the definitions stated by the CPT, both active ( ) and reactive ( ) powers (see (3)) are produced mainly by the positive-sequence current components. Moreover, the unbalanced power defined in (4) is produced by both the negative and zero sequence current components (at the fundamental frequency). Finally, the distorted power is produced mainly by the harmonics current components of . (See (1)) Based on the decoupling characteristics of the CPT, it is possible to implement control loops using virtual impedances implemented in the stationary abc reference frame, without requiring sequence separation algorithms.

B. Control Scheme for a 4-leg Converter
Using the CPT current transform given by (6), (7) and (8), each 4-leg converter of Fig. 1 is controlled with the scheme depicted in Fig. 2 (shown in the Laplace domain). In this figure, the th 4-leg converter (see Fig. 1) is used as an example for showing the mathematical analysis of the control scheme. From Fig. 2, the current at the output of the converter ( ) is measured and using (6)- (8), it is divided into ( ), ( ) and ( ). With ( ), the virtual balanced impedance loop is implemented for achieving decoupling between the active and reactive powers (see [35] [36]). With ( ) and ( ), the virtual unbalanced impedance loop and the virtual harmonic impedance loop discussed in [11] are implemented. The dynamic response of the control scheme shown in Fig. 2, is given by (9), where * (s) is the voltage reference obtained from the droop control system; ( ) is the closed-loop transfer function of the voltage controller; ( ) is the virtual balanced output impedance; ( ) is the virtual unbalanced output impedance, and is the virtual harmonic output impedance. From (9), it is concluded that the virtual impedance loops shown in Fig. 2 are equivalent to output impedances where voltage drops are produced by circulation of balanced, unbalanced and harmonic currents respectively. The explicit form of ( ), ( ) and are given respectively, by (10), (11) and (12). These equations are obtained by calculating the closed-loop transfer function of the control scheme depicted in Fig. 2.
The control scheme of Fig. 2, achieves a decoupled control of the voltage drop produced by the balanced, unbalanced and harmonic currents. The balanced voltage drop can be controlled through and as is shown in Fig. 2 and (10). These parameters are set to be constant (with the values given in TABLE II), and they are used to implement the virtual impedance loop [35] [36]. The unbalanced voltage drop at each converter's output is controlled using ( ) given by the transfer function ( ) = + [see Fig. 2 and (11)], therefore there are two degrees of freedom ( and ) for controlling it. In a similar way, the harmonic voltage droop at the converter's output can be controlled through and [see Fig. 2 and (12)]. It should be pointed out that the parameters of ( ) and ( ) can be actively changed in order to achieve the sharing of imbalances and harmonics.

III. PROPOSED IMBALANCE AND HARMONIC SHARING SCHEME BASED ON DAPI CONTROLLERS
In a 4-wire microgrid feeding unbalanced loads, if the voltages at the output of the 4-leg converters are maintained approximately balanced, then the currents are unbalanced (i.e. negative and zero sequence components are present in the currents). Therefore, one of the line or converter's output current could have a significantly higher peak than the other currents at a particular point. Hence, in the absence of an algorithm to share the imbalances, this converter could be operating at a reduced power rate just because one of its line currents has reached nominal value and as a consequence, no more balanced power output can be obtained from this device. A similar situation arises when the load is distorted. These issues are avoided when control algorithms for the sharing of imbalances and harmonics are implemented in MGs. The aim of these types of algorithms is to share imbalance and harmonic content between the power converters according to their residual VA capacity (i.e. the capacity remaining after the real power demands are considered), therefore preventing an overload of one or more of them.
Equation (9) can be rewritten in terms of balanced, unbalanced and harmonic voltages as (13). In this equation, ( ) is given by ( ) · ( ), and ( ) is given by ( ) · ( ). As was discussed in the previous section, both ( ) and ( ) can be actively controlled through ( ) = + and ( ) = + respectively (see Fig. 2). Therefore, for controlling ( ) there are two degrees of freedom represented respectively by and . It is

Power Stage
Control System --

Virtual balanced impedance loop
Virtual unbalanced impedance loop the same for ( ), where the degrees of freedom are given by and . From simulation work, it was concluded that good results are obtained using only the resistive parts of ( ) and ( ). Therefore, in this work, it is considered that ( ) = and ( ) = [10] [37]. Moreover, considering the fact that ≈ and ≈ as discussed in [10][37], ( ) and ( ) can be approximated to (14).
Fig . 3 shows the proposed control architecture for each of the 4-leg converters shown in Fig. 1, including the implementation of a distributed control strategy for sharing the imbalances and harmonic components. In this figure, three control layers are considered. The first layer corresponds to the output voltage and current controls, which rely only on local measurements. In this layer, each 4-leg converter calculates both current and power terms defined by the CPT (3)- (4). With the balanced current , the implementation of the virtual impedance loop is performed (see Fig. 3). The second layer corresponds to the droop controller, which determines the reference of frequency ( * ) and voltage ( * ), used in the first layer. From Fig. 3, notice that the unbalanced and void currents discussed in section II-A (7)-(8) are used to implement both unbalanced and harmonic voltage drops given by (14). The virtual resistances and [ Fig. 3 and (14)] are adaptively modified in the third control layer to achieve the sharing of imbalances and harmonics among the converters. The calculation of and for each 4leg converter of Fig. 1 is performed based on the proposed consensus algorithm discussed in section III-C. In addition, voltage and frequency regulation are performed in the third layer. Finally, from Fig. 3, it can be appreciated that an active damping loop is used (after the block labelled "PR Current Controller") to attenuate the oscillation produced in the LC output filter. In [14], the design of this loop is discussed more in detail.

A. Communication Structure
The bidirectional network used in this paper is modelled as an undirected graph = ( , , ) among the converters = {1, … , }, where is the set of communication links and is the non-negative × weighted adjacency matrix. The elements of are [38]. Let ∈ ℝ denote the value of some quantity of interest at bus ; in our specific context, achieves consensus if [ ( ) − ( )] → 0 as → ∞. Consensus can be achieved via the following algorithm [6] [39] : which is distributed according to the topology of the communication network. It is worth noting that the communication network used in this work (see Fig. 4), defined by the adjacency matrix ( Fig. 4), does not necessarily have the same topology as the electric network of the 4-leg MG. Moreover, in this work, it is assumed that the communication network allows a bidirectional exchange of information, and it is ideal, i.e., without delays.

B. Frequency and Voltage regulation using Distributed Control
The distributed-averaging proportional-integral control (DAPI) approach presented in [6] is used in this work for frequency regulation and active power-sharing. The droop frequency is defined by (16) where is the − droop coefficient, is the active power, and is the nominal frequency of the MG. The term in (16) corresponds to the secondary control action for frequency regulation which is obtained by (17).
In (17), the first term on the right-hand side corresponds to the frequency error; the second term is introduced so that Ω i converges to a unique value for all DG units, i.e. in the steady state, all the droop curves are modified by the same factor, which is achieved via the consensus algorithm depicted in (17). The terms represent the entries of the adjacency matrix; thus, the control action Ω j is shared with generator i only if is non zero, is a positive gain, and 1/ is the controller gain, which modifies the transient behaviour of the controller.
In this work, for voltage regulation purposes, DAPI controllers are implemented based on [6]. These controllers are represented by equations (18) and (19). The droop voltage E is defined by (18) where is the − droop coefficient, is the reactive power, and is the nominal voltage of the 4-wire MG.
Local bus The term in (18) corresponds to the secondary control action for voltage regulation and reactive power sharing, which it is obtained by (19). The first term on the right-hand side of (19) corresponds to the voltage error, * is the reactive power rating of unit , and are positive gains, and is an element of the adjacency matrix of communication between DGs for voltage control.

C. Proposed Consensus-Based Distributed Strategy for Imbalances and Harmonics Sharing
Considering (14), both unbalanced and distorted voltages at the output of each 4-leg converter ( and ), in the abc reference frame, are given by (20). In this equation, and are respectively, the unbalanced and void currents at the output of the th converter, and and are the virtual unbalanced resistance and the virtual void resistance discussed in section III. It should be noted that the choice of these virtual resistances will determine the imbalance and harmonic sharing effort in each converter. For instance, small values of and will produce small unbalanced and harmonic voltages at the output of the ith converter. In contrast, high values of and mean that voltage at the output of that converter will be highly unbalanced and distorted. The latter case should be carefully studied because the insertion of large virtual resistances into the converters' control might induce large imbalance and harmonic voltages at the output of them, possibly exceeding regulatory limits. In this paper, we propose (i) the adequate calculation of the virtual resistances for achieving unbalanced and harmonic sharing among the converters according to their residual VA capacity, and (ii) a method to ensure that the voltage regulations for imbalances and harmonics are met in each converter. In (21) and (22), the proposed distributed control method based on the consensus algorithms are shown.
In (21), the Phase Voltage Unbalance Rate index (PVUR, (23)) [11] is introduced to limit the imbalances in the voltage at the output of each converter. Note that in (23), the voltages are measured with respect to the neutral point. In (21), corresponds to the phase voltage unbalance rate in the th converter, * is defined as the maximum unbalanced voltage that the th converter can tolerate, is the unbalanced power given by (4) and * is the ith converter's unbalanced power rating. The proposed controller (21), includes two control terms; the first term on the right-hand-side is designed in order to maintain the within the values allowed by IEEE Std 1547-2003 [18] (stating maximum voltage imbalances of 5%). If the is greater than * then a control action is introduced to drive the to within the allowed margins. The second term on the right-hand-side of (21) is considered in order to weight the value of / * with the values of / * belonging to the other nodes, to achieve unbalanced power-sharing among converters according to their residual VA power capacity.
Similarly, equation (22) shows the proposed distributed controller for harmonic sharing. In this case, both , and the distorted power defined in (4) are considered. Using (22), the virtual harmonic resistances in each converter are calculated to achieve harmonic power-sharing according to their residual VA power capacity and for THD limit control. In this paper, the THDs for the voltages at the output of converters are controlled in order to meet IEEE Std. 519-1992 [19] (stating maximum voltage THD of 5%) In (21) and (22), , , , are parameters of the proposed controllers, and the terms represent the entries of the adjacency matrix. The residual capacities * and * in the converter "i" are calculated using (5), yielding (24). In this equation, is the nominal VA capacity of the ith converter and , and are respectively, the active and reactive powers that the ith converter is injecting into the MG. Note that in this paper, it is assumed that the residual capacity of each converter is used in the same proportion for sharing imbalances and harmonics ( * = * ). Therefore the values of * and * for the th 4-leg converter are calculated using (24). It is highlighted that the value reserved for * and * are a function of the type of load present in a particular microgrid. In this work, * = * is assumed based on simulation work, realised with the model of a particular microgrid. Nevertheless, if the assumption of * = * is incorrect, a secondary controller could be used to obtain the optimal distribution of the residual capacities ( * and * ) for each power converter. This issue has not been addressed in this paper because it is considered outside the scope of this work. * = * = √ 2 − 2 − 2 2 In summary, (21) and (22) show the proposed consensus algorithms to calculate respectively, the virtual unbalanced resistance ( ) and the virtual void resistance ( ) for each 4leg converter. The terms associated with unbalanced ( ) and distorted powers ( ) in (21) and (22) are in charge of achieving imbalance and harmonic sharing respectively among the converters. The terms associated with and in (21) and (22) respectively, are utilized to limit imbalance and harmonics in the voltage at the output of the converters, at the values defined by IEEE Std 1547-2003 and IEEE Std. 519-1992. Notice that it is important to regulate and THD, to deliver good power quality, especially, in the case of loads with high levels of imbalances and/or harmonics.
Note from (21), that the proposed consensus algorithm for the sharing of imbalances and PVUR regulation, can adjust the values of in each converter dynamically and in real-time to operate with different degrees of load imbalances. The same occurs with (see (22)), which is adjusted dynamically and in real-time, to work with different levels of distorted loads.

IV. SIMULATION RESULTS
To verify the proposed control scheme shown in Fig. 3, the 4wire MG depicted in Fig. 1 was simulated using Plexim PLECS software with the parameters listed in TABLE I. Note that the converters have the same LC output filters, and the line impedances are the same (see Fig. 1). Three simulation cases are studied. In cases 1 and 2, the imbalances on the loads are emulated considering unbalanced resistances, and the proposed distributed control scheme is investigated to manage third harmonic currents. For this reason, balanced-three-phase current sources (consuming third harmonic currents) are used in these cases to emulate non-linear loads. In case 3, loads consume both active and reactive powers, and the proposed control scheme is used to manage other harmonics different from the third. Finally, self-tuning voltage and current PR controllers [8] are used (implemented in the abc reference frame), at the fundamental frequency and at three, five, and seven times the fundamental frequency. They are configured in a parallel topology in each phase of each converter of Fig. 1. TABLE II shows the main parameters associated with these controllers as well as the parameters of the proposed distributed controllers.

A. Case 1: 4-leg Converters with equal power ratings
In this case, it is assumed that the five 4-leg converters shown in Fig. 1 have the same VA capacity ( in TABLE II), and the loads have different degrees of imbalance and 3rd harmonic currents, as shown in TABLE III. Based on that, and considering the topology of the MG studied, both negative and zero sequence current components are shared among the converters in different proportions (the same sharing happens with the 3rd harmonic currents). Indeed, without compensation, the converters connected to loads with a high level of imbalance and harmonics inject more unbalanced and distorted currents than the ones connected to loads with small levels of imbalances and harmonics. In this case, and taking into account that the converters have the same power rating, it is desirable that imbalances and harmonics are shared in the same proportion. This can be achieved with the proposed control scheme shown in Fig. 3. To verify the control strategies proposed in this work, seven simulation steps are considered: step 1 (0s≤t<5s), where the third control layer shown in Fig. 3 is disabled, and only the values of * and * shown in layer 2 are calculated (see Fig.  3) by each converter; step 2 (5s≤t<10s) where the third control layer is activated, but only to achieve (i) frequency regulation [ in (16) and (17)], and (ii) voltage-regulation and reactivepower-sharing [ in (18) and (19)]. In step 3 (10s≤t<15s), the proposed distributed control strategy for imbalance sharing [see (21)] is activated (see control layer 3 in Fig. 3). It should be pointed out that in this step, the first term on the right-hand side of (21) is not activated and therefore, PVUR limit control is not performed (to evaluate the performance of the proposed controller only to share imbalances between the 4-leg converters). In step 4 (15s≤t<20s), the proposed distributed control for harmonic sharing [ calculation, see (22)] is activated. Similar to step 3, in step 4, THD limit control is not activated [the first term on the right-hand side of (22) is disabled]. In step 5 (20s≤t<25s), both PVUR and the THD limit controllers are enabled [activating respectively, the first term on the right-hand side of (21) and (22)]. In this work, these indexes are limited to 2.5%, i.e., * = * = 2.5%. [See (21) and (22)] In order to analyse the performance of the controller considering communication link failures, step 6 (25s≤t<30s) is realised. In this step, the failure of the communication links between units DG1 and DG2 and DG3 and DG5, as shown in Fig. 5(b) is emulated. Finally, in step 7 (30s≤t<35s) an 8% incremental load is applied (2800W are added) at load 4 (see Fig. 1), to evaluate the performance of the proposed control scheme in the operational condition of step 6. Fig. 6 shows the active, reactive, unbalanced and distorted powers at the output of the converters [see (3)-(4)], for the 7 steps studied. From this figure, it is concluded that in step 1, only the active power is shared among the converters in the same proportion (because all the converters have the same power rating, and therefore the same − curves). In step 2, when the DAPI controllers given by (17) and (19) are enabled, the frequency and voltage, in each 4-leg converter, are restored to the nominal values as shown in Fig. 7 (steps 2 to 7), and also the active and reactive powers are shared among the converters in the same proportion [see Fig. 6(a)-(b) in steps 2 to 7]. Fig. 6(a)-(b) shows that the active and reactive powers are decoupled from the operation of the imbalance and harmonic sharing control system [see steps 2 to 7 in Fig. 6(a)-(b)]. The same pattern is appreciated for the frequency, as shown in Fig.  7(a) [see steps 2 to 7].
From Fig. 6(c), step 2, it is noticed that some converters are feeding the loads with high unbalanced powers, because the loads are highly unbalanced. For instance, converter 1 injects the highest unbalanced power into the MG; conversely, converter 2 is feeding the MG with the lowest unbalanced power [see step 2 in Fig. 6(c)]. In this context, considering that all the converters have the same power rating, it is desirable that all of them inject into the MG the same unbalanced power. This goal is achieved when the proposed control scheme for imbalance sharing is activated, as shown in step 3 of Fig. 6(c). Similarly, from step 2 and 3 shown in Fig. 6(d), it is concluded that all the converters are injecting to the MG different levels of distorted powers (these are produced by the 3 rd harmonic currents). Again, because all the converters have the same power rating, it is desirable that the harmonics are equally shared among them. This aim is achieved, as shown during step 4, depicted in Fig. 6(d), when the proposed distributed control for harmonic sharing is activated [see (22)]. On the other hand, from step 4 of Fig. 6(a)-(d), it is concluded that the proposed control schemes discussed in section III and shown in Fig. 3 achieve equal sharing of active, reactive, unbalanced and distorted powers, among the converters of Fig. 1. Inspecting  Fig. 6, it is concluded that active, unbalanced and distorted powers in step 2, are increased in comparison with step 1. This is because the voltage at the output of the converters is regulated to the nominal value at t=5s, producing an increase in these powers. The voltage regulation is depicted in Fig. 7, where before the regulation (step1) the voltages were close to 190V RMS, then, in step 2 (when the voltage regulation is enabled), voltages are regulated to nominal conditions (230V RMS).
In Fig. 7(b), particularly from t=10s, and onwards, the voltages have some deviations from the nominal voltage. These are because at t=10s, and onwards, the control algorithm for sharing imbalances is enabled, and therefore imbalances in the voltage at the output of converters are induced (for achieving imbalance sharing). As voltages have imbalances, at calculating RMS values, small deviations of RMS voltage around the nominal value are produced (see Fig. 7(b)). It is worth remembering that the RMS voltages depicted in Fig. 7(b) corresponds to the average of the RMS voltage in the three phases of each power converter.   As discussed in section III-C, the sharing of imbalances and harmonic powers among the converters will produce some imbalances and distorted voltages at the output of the converters. Therefore, the maximum unbalanced voltage and voltage distortion allowed in the MG has to be regulated to avoid power quality issues. This regulation is achieved by the proposed distributed controllers given by (21) and (22). In particular, the first term on the right-hand side of (21) limits the maximum allowed PVUR in the voltage at the output of each converter, while the first term on the right-hand side of (22) limits the maximum allowed THD in the voltage at the output of each converter. In this test, the maximum allowed PVURs and THDs in each converter are set to 2.5%. From step 4 shown in Fig. 8(a)-(b) [where all the PVURs and THDs of the converters are shown], it is concluded that unbalanced and distorted powers among the converters are shared in the same proportion [see step 4 in Fig. 6(c)-(d)] at the expense of having the PVURs in converter 1 over 2.5% (steps 3, 4 in Fig. 8(a)) and the THD in converter 4 over 2.5%. To overcome this issue, in step 5, the terms in (21) and (22) for achieving the PVUR and THD limits control are activated. From Fig. 8(a)-(b), it is concluded that in step 5, both PVURs and THD are correctly limited in order to achieve values below 2.5%. Obviously, there is a trade-off between unbalanced power-sharing and PVURs limitation, and between distorted power-sharing and THDs limitation, as shown in step 5 of Fig. 6(c)-(d).   9 shows the Fourier analysis of the neutral currents at the output of the 4-leg converters in steps 2 and 5. From Fig. 9(a) it is concluded that without the proposed control scheme for imbalance and harmonics sharing, there is a relatively large difference between the magnitude of the neutral currents at the fundamental frequency (50Hz). The same trend can be seen with the 3 rd harmonic current components, as shown in Fig.  9(a). This pattern is changed when the proposed control scheme is enabled, as shown in Fig. 9(b). Indeed, from Fig. 9(b) it is concluded that the difference between the magnitudes of the neutral currents at 50Hz is considerably reduced when the proposed scheme is working. The same change occurs with the 3 rd harmonic current components [see Fig. 9(b)], showing the effectiveness of the proposed methodology to share the zero sequence currents of the loads among the 4-leg converters of the MG.

B. Case 2: 4-leg Converters with different power ratings
In this case, unlike the previous scenario, it is assumed that the 4-leg converters of Fig. 1 have different power ratings, with the following VA capacities: = for converter 1, 2 = 0.9 for converter 2, = 0.8 for converter 3, = 0.7 for converter 4, and = 0.6 for converter 5. The value of is given in TABLE II. Based on this configuration, the following droop coefficients are used for implementing the − and − droop controllers: = and = for converter 1, 2 = 0.9 and 2 = 0.9 for converter 2, = 0.8 and = 0.8 for converter 3, = 0.7 and = 0.7 for converter 4, and = 0.6 and = 0.6 for converter 5. The value of and are shown in TABLE II. In addition, the characteristics of the loads used for this case are shown in  Four simulation steps are considered in this case, they are: step 1 (0s≤t<5s) where regulation of frequency and voltage, and active and reactive power sharing are performed [see (16)- (19)]; step 2 (5s≤t<10s) where the proposed distributed controllers for imbalances and harmonics sharing [see (21) and (22)] are simultaneously enabled without considering the terms related with PVUR and THD limit control; step 3 (10s≤t<15s), where the terms associated with both PVUR and THD limit control are enabled to limit these indexes to 3% (to evaluate the performance of the controller with a different set point to that used in case 1); and finally, step 4 (15s≤t≤20s), where converter 1 trips at t=15s (the one with the highest VA capacity). The latter case is designed to evaluate the performance of the proposed distributed control scheme when a fault is produced in one of the generating units. Finally, in this case, the terms * and * depicted in (21) and (22) respectively, are calculated according to (24). Fig. 10(a) shows that the active power is shared among the converters according to their power rating. Fig. 11, shows the residual VA capacities ( * and * ) of the converters for this simulation case.
From step 1 shown in Fig. 10(b)-(c), it is concluded that both unbalanced and distorted powers are not shared according to the converters' VA residual power capacity (see Fig. 11). In step 2, shown in Fig. 10(b) and Fig. 10(c) [where the proposed distributed controllers are activated], this pattern is changed, and now the 4-leg converters are feeding the MG with imbalances and 3rd harmonic currents according to their a) b) Step 2 Step 5 residual VA power capacity (see Fig. 11), showing the effectiveness of the proposed control methodology. As mentioned before, with the proposed methodology to share imbalances and harmonic components, the voltages at the converter outputs could be distorted and unbalanced (see step 2 in Fig. 12). To avoid power quality issues, the control terms designed to achieve PVUR and THD limit control are enabled at t=10s, to regulate both indexes at 3%. This is effectively accomplished, as shown in step 3 of Fig. 12(a)-(b).
Finally, as shown in Fig. 10 and Fig. 12, during step 4 converter 1 trips at t=15s when all the control terms of (21) and (22) are already enabled. After a short transient, imbalance and harmonic components are effectively shared among the other four converters still connected to the MG. Notice that the power-sharing is realised as a function of the residual VA power capacity of the converters [see step 4 in Fig. 10(b)-(c), and Fig. 11], demonstrating the additional flexibility of the proposed controllers.   C. Case 3: 4-leg Converters with the same power ratings and considering real MG operating conditions. Previous cases showed the performance of the proposed consensus algorithms considering high levels of imbalance and harmonics in the loads. In these cases, the proposed scheme was validated to manage the third harmonic current component, and for resistive loads (reactive powers close to zero). Now the proposed consensus algorithms will be verified for other harmonics and considering loads that draw reactive power. The operational conditions of a real MG located in the north of Canada were used [8]. More information about the loads used in this simulation case is given in TABLE V. Distorted loads were emulated by three-phase rectifier bridges feeding DC resistive loads, noting that only the fifth and seventh harmonics are studied as these are the main contributors to the THD for the current at the loads. Three simulation steps are considered which are: step 1 (0s≤t<5s) where frequency regulation [ in (16) and (17)], and voltage-regulation and reactive-power-sharing [ in (18) and (19)] are enabled; step 2 (5s≤t<10s) where the proposed distributed controllers for imbalance and harmonic sharing are enabled without considering the terms related with PVUR and THD limit control; step 3 (10s≤t<15s), where the control terms associated with both PVUR and THD limit control are enabled to limit these indexes to 1% and 1.6% respectively.
In case 3, unbalanced and distorted powers are shared among the power converters in the same proportion (see step 2 in Fig.  13(c)-(d)), showing the effectiveness of the proposed control scheme. Note that, when the consensus algorithms are enabled at t=5s, active and reactive powers are remain virtually unaffected (see Fig. 13(a)-(b)), confirming the expected decoupling feature of the CPT-current transform discussed in section II. Fig. 14 shows the PVURs and THDs of the voltage at the output of the converters. From step 2 shown in Fig. 14(a)-(b), it is concluded that the equal sharing of unbalanced and distorted powers among the converters is achieved at the expense of not meeting the limits considered ( * = 1% and * = 1.6%). To correct this, at t=10s, the control terms associated with both PVUR and THD limit controls of the proposed consensus algorithms are enabled. From step 3 in Fig. 14(a)-(b), it is concluded that PVURs and THDs are effectively regulated to 1% and 1.6% respectively. Obviously, there is a trade-off between unbalanced and distorted power-sharing and meeting the PVURs and THDs requirements, as is shown in step 3 of Fig. 13(c)-(d), respectively.   Fig. 15 shows the performance of the proposed consensus algorithm for harmonic-current sharing. Fig. 15(a) shows the fifth harmonic current component injected by the converters into the MG before (step 1) and after (step 2) the activation of the proposed harmonic sharing controller. Fig. 15(b) shows the same information but related to the seventh harmonic-current. From Fig. 15(a), it can be concluded that after the activation of the proposed control scheme (step 2), the fifth harmonic current is equally shared among the power converters. The same trend can be seen in Fig. 15(b) with the seventh harmonic current component.

V. EXPERIMENTAL VALIDATION
In this section, the experimental validation of the proposed control algorithm is presented. Fig. 16 shows the topology of the 4-wire MG implemented in the laboratory. The 4-wire MG of Fig. 16 has been implemented on the experimental system shown in Fig. 17. Two Triphase units are used as 4-leg converters [40] [41]. Converter 1 is a Triphase PM15F120 unit (operated as a 5kW converter) while converter 2 is a Triphase PM5F42R (5kW) unit. The distorted load is emulated by an Ametek (9kW) programmable load, and the unbalanced load is created by resistances (see Fig. 17).
The proposed control systems are implemented in the realtime target computers controlling each of the 4-leg converters of Fig. 17. The inner control loops are based on self-tuning voltage and current PR controllers. The parameters of the experimental system and control loops are given in TABLE VI.   Magnitude of the seventh harmonic current component Step 1 Step   Fig. 18(a) shows the currents in the distorted load of Fig. 16, while Fig. 18(b) shows the currents on the unbalanced load. In this case, since converter 1 is connected with a low impedance to the distorted load, this converter feeds the load with most of the harmonic-currents, and converter 2 injects negligible harmonic-current to the system. On the other hand, because converter 2 is close to the unbalanced load (e.g. the impedance of the connection between the converter and the load is much lower), this converter will feed the 4-wire MG with most of the negative and zero sequence current components (at the fundamental frequency). In this case, converter 1, injects negligible negative and zero sequence current components into the MG. This behaviour can be corroborated in Fig. 19 (upper), where the currents injected by both converters to the MG are shown (before enabling the proposed control scheme). In order to modify this behaviour, i.e., to achieve sharing of imbalances and distortion between the power converters, the control scheme shown in Fig. 3 is used.
Six steps are used in the experimental validation: step 1, where the third control layer shown in Fig. 3 is disabled, and only the values of * and * shown in layer 2 are calculated (see Fig. 3) by each converter; step 2, where the third control layer is activated, but only to achieve (i) frequency regulation [ in (16) and (17)], and (ii) voltage-regulation and reactivepower-sharing [ in (18) and (19)]; step 3, where the proposed distributed controller for imbalance sharing [see (21)] is enabled without considering the term related to PVUR limit control [first term on the right-hand side of (21)]; step 4, where the proposed distributed controller for harmonic sharing [see (22)] is enabled without considering the term related with THD limit control [first term on the right-hand side of (22)]; step 5, where the control term associated with PVUR limit control is enabled to limit this index to 1.5%. Finally, in step 6, the control term associated with the THD limit control is enabled to limit this index to 3.0%. It should be highlighted that the harmonic sharing is performed mainly for the third harmonic component of the current because this is the main contributor to the THD for the current waveform shown in Fig. 18(a).  Fig.  17, during the six steps. At the beginning of step 2 and onwards, it is noticed that all the powers are increased as the voltage is regulated to its rated value. This voltage regulation is shown in Fig. 21(b). The frequency at the output of converters during the six steps studied is shown in Fig. 21(a). From this figure, it is concluded that the frequency is regulated to the nominal value.
In step 3 of Fig. 20(b), the unbalanced powers are equally shared between the converters. The same occurs with distorted powers, as is shown in step 4 of Fig. 20(c). Both results have demonstrated the effectiveness of the proposed control scheme (see Fig. 3) for the sharing of imbalances and harmonics.
In steps 3 and 4 shown in Fig. 20(b), equal unbalanced power-sharing between the converters is achieved, with a PVUR in converter 2, over 1.5%, as shown in Fig. 22(a) in steps 3 and 4. To regulate this index to 1.5%, in step 5, the first term on the right-hand side of (21) is enabled. From steps 5-6 shown in Fig. 22(a), it can be seen that the PVUR is effectively regulated to 1.5%. Obviously, there is a trade-off between unbalanced power-sharing and fulfilling the PVUR requirements, as is shown in step 5 and 6 of Fig. 20(b).
In steps 4-5 shown in Fig. 20(c), equal distorted powersharing is achieved with the THD in converter 1 over 3%, as shown in Fig. 22(b) in steps 4-5. To reduce this index to 3%, in step 6, the first term on the right-hand side of (22) is enabled. From step 6 depicted in Fig. 22(b), it can be seen that the THD is effectively regulated to 3%. As with the PVUR regulation, there is a trade-off between distorted power-sharing and meeting the THD requirements, as shown in step 6 of Fig. 20(c). These results have shown the effectiveness of the proposed controller for PVUR and THD regulation. Finally, Fig. 19 shows the waveforms of the currents at the output of the 4-leg converters of Fig. 17, in step 2 (the proposed controller is disabled) and in step 4 (the proposed controller is working). From this figure, it is concluded that imbalances and harmonics are shared between the converters when the proposed scheme for the sharing of imbalances and harmonics is working. (See Fig. 19, lower)

VI. CONCLUSIONS
A novel distributed control strategy for sharing imbalance and harmonics between converters in a 4-wire droop-controlled MG has been presented. The operating principle is based on decomposing the converter current into balanced, unbalanced and harmonic components according to the CPT, and on the concept of unbalanced virtual output impedance, implemented Step 2: Currents at the output of converters when the proposed control scheme is disabled Step 4: Currents at the output of converters when the proposed control scheme is enabled in the control loops of each converter. The consensus algorithm is used to adaptively modify the magnitudes of the virtual impedances, to achieve sharing of the imbalances and harmonic components according to the residual VA capacity of the power converters. Simulation and experimental results have confirmed the effectiveness of the sharing strategy. It was assumed that the residual capacity of each converter is used in the same proportion for sharing imbalances and harmonics (see (24)). For future work, the use of a secondary controller to calculate the optimal distribution of the residual capacities * and * for each 4-leg converter will be studied.