**1. Introduction**

In recent years, unbalanced conditions in three-phase four-wire power systems, due to high penetration and uneven allocation of single-phase rooftop PV systems and load demands, have become exacerbated [1]. Specifically, the unbalanced active powers among phases and between single-phase PV systems and local loads can have a negative effect on power quality and system reliability due to large current flowing through neutral wires. The unbalanced conditions in the three-phase four-wire power systems can be described as a condition when the voltages or currents are not equal in the magnitudes and/or the phase angles of voltages and currents are not equal in consecutive sequence of phasors [2]. Since the voltages and/or currents are unbalanced, the active powers among phases in the three-phase system are also unbalanced.

There are several strategies to mitigate the unbalanced conditions. Traditionally, the unbalanced conditions were considered to be static since the penetration and variation of renewable energy sources (RESs) in power systems were low. Traditional compensation strategies, include using static synchronous compensators (STATCOMs) [3], passive devices, such as shunt capacitors [4], equalizing power generation, and load consumption [5], or using STATCOM with delta cascaded H-bridge (CHB) converter [6]. Moreover, some traditional methods to mitigate the neutral current and neutral to ground voltage (NGV)

**Citation:** Pinthurat, W.; Hredzak, B. Distributed Control Strategy of Single-Phase Battery Systems for Compensation of Unbalanced Active Powers in a Three-Phase Four-Wire Microgrid. *Energies* **2021**, *14*, 8287. https://doi.org/10.3390/en14248287

Academic Editors: Alon Kuperman and Alessandro Lampasi

Received: 13 November 2021 Accepted: 2 December 2021 Published: 9 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

rise by resizing the neutral conductor, improving grounding and installing a passive harmonic filter were introduced in [7–10], respectively. However, owing to high variation in a number of single-phase PV rooftop systems distributed in the three-phase four-wire power systems, balancing between single-phase loads and rooftop PV sources and among the three phases becomes more difficult and, hence, the traditional methods cannot properly manage the unbalanced conditions.

Recently, the unbalanced conditions have been mainly compensated by designing new power electronic converters, managing electric vehicles (EVs) based on arrival and departure times, and employing energy storage systems (ESSs). The control strategies based on these approaches can be broadly divided into three main frameworks: centralized, decentralized, and distributed. A centralized controller requires information from all agents to be sent to a central control unit. The communication system should be fast and reliable, which can be challenging in practical distribution systems. A decentralized controller can make decisions based on only local observations, but the capability of resources may not be fully utilized due to the lack of cooperation between agents. A distributed controller is able to achieve cooperative control using the agent's own (and neighbouring agents') information [11].

#### *1.1. Unbalance Compensation by Power Electronic Converters*

As an active compensation strategy, three-phase four-leg topology based PV-VSI inverters with fixed capacity [12] and with dynamic capacity [13] were designed to alleviate the neutral current caused by the unbalanced loads. However, different network parameters, e.g., negative and zero sequence components of line impedance can affect the system stability and additional switching devices are required for the compensation. In [14], a distributed control method of a single-phase H-bridge PV-VSI was proposed for compensating the voltage unbalance factor (VUF) at a critical bus. Steinmetz design was employed for calculating required reactive power injections at different PV and load connections. However, if an upstream network (medium voltage side) was imbalanced and downstream loads were not constant power, using the Steinmetz design to calculate the required reactive powers for compensation may not be applicable. Furthermore, a reactive power control method with a centralized controller was developed for single-phase H-bridge VSI of DGs to compensate zero and negative sequence current components [15]. Power factors of DGs were controlled to obtain required reactive power, and Karush–Kuhn–Tucker (KKT) optimization algorithm using instantaneous power analysis was used to minimize the unbalanced conditions. The required reactive powers were shared among DGs through communication links by considering capacity ratings of the VSIs. However, there was a trade-off between compensation of the negative sequence current component and the zero sequence current component. The authors in [16] developed a current control strategy based asynchronous parallel pattern search (APPS) method for three single-phase full-bridge VSIs to reduce the voltage unbalance. Different indicators of the voltage unbalance were discussed. Moreover, a geometric norm based on a phasor diagram was introduced to examine the unbalanced conditions with different indicators. Then, the geometric norm was used as an objective function for obtaining asymmetrical current references for the three single-phase full bridge VSIs to inject the required current to the grid. However, the new power converters required three single-phase full bridge inverters, twelve switching devices, and three isolated DC voltage sources, thus increased additional cost.

#### *1.2. Unbalance Compensation by Management of EVs/PEVs*

Some strategies using EV chargers for the unbalance compensation were proposed. Impact of uncoordinated plug-in EVs was investigated in [17]. Two coordinated control strategies were proposed for PEVs to regulate bus voltages and minimize voltage unbalance. First, a centralized active power charging control method was introduced for charging PEVs using genetic algorithm (GA). Second, a decentralized reactive power discharging control system was developed for the voltage regulation and voltage unbalance compensation. PEV inverter was locally assigned to discharge the reactive power based on reactive power droop controller at the bus having a poor voltage profile. In [18], two distributed consensus algorithms were proposed for PV units and PEVs to regulate bus voltages and to reduce voltage unbalance. The first algorithm was developed to maximize utilization of ES capacity of PEVs subject to ES constraints by controlling charge and discharge of PEV ESs, while the second algorithm was used to minimize the active power curtailment (APC) of PV units in case of PEVs having insufficient capacity for reduction of voltage rise. Arrival and departure times of PEVs used for verification of the proposed algorithms were selected randomly. In [19], an energy management system (EMS) of PV units and PEVs using decision making optimization based demand response (DR) was introduced to minimize VUF. PEV owners could decide to participate in various charging and discharging options offered by an aggregator. A central communication system was used as all PEVs were required to send all data to the aggregator. Owner preferences offered flexibility, while the combination of PVs and PEVs ensured minimizing VUF. Comprehensive indices represented by current waveforms were derived in [20]. The indices were then used to analyse the unbalanced conditions and harmonic distortion at the fundamental and harmonic currents of three-phase EV chargers during unbalanced charging and grid voltage unbalance. Two different EV technologies were used for the verification.

#### *1.3. Unbalance Compensation by ESSs*

ESSs have widely been employed to minimize the unbalanced conditions in threephase four-wire power systems. Central energy storage, also called community energy storage (CES), with a centralized controller [21], and single-phase distributed energy storage system (DESs) with a distributed cooperative control strategy [22], respectively, were proposed to alleviate the neutral current and NGV rise in a multi-grounded three-phase four-wire distribution system. The current unbalance factor (CUF) was used to quantify the the unbalanced conditions. The authors assumed that all single-phase household installed PV systems were willing to participate in the control strategy. A three-phase damping control strategy for a CES connected at the end of line feeder was proposed in [23] to address over-voltage and voltage unbalance. The control strategy was applied to split DC-bus capacitors of VSI to consume (deliver) asymmetrical (negative and zero sequence components) phase currents from (to) the grid by adjusting the damping conductance. Based on the damping conductance, the VSI was able to operate in resistive mode. Comparing the proposed controller with the positive sequence control method, less current was required. However, the damping capacitance was a function of the VSI capacity; hence, performance of the proposed control strategy may be limited by the inverter size. Furthermore, a fuzzy logic control strategy was proposed in [24] for controlling individual single-phase DES based on the phase voltage deviation and the battery SoCs to mitigate voltage unbalance and voltage rise. Park's transformation was used to obtain the positive, negative, and zero sequence voltage components. It was also used to determine which phase DES should take action for the balancing process.

In addition, a distributed control strategy was proposed for single-phase distributed generators (DGs) to alleviate the unbalanced powers at PCC, but without considering variability and fluctuation of RESs [25]. It can be observed from the literature review that few studies focused on using single-phase distributed ESSs with distributed control strategies to mitigate the unbalanced conditions. The comparison of existing techniques for compensation of unbalanced conditions is summarized in Table 1. As illustrated in the table, the strategy proposed in this paper employs single-phase distributed battery storage systems and a distributed control strategy to minimize VUF and CUF in a modified IEEE-13-bus test system.



**Table 1.** Comparison of techniques for compensation of unbalanced conditions.

To employ single-phase battery storage systems distributed in a three-phase fourwire microgrid for compensation of unbalanced conditions, the battery storage systems must know information about the active powers and phases at the PCC so that the agents (single-phase battery storage systems) can select the correct phase to perform the balancing. To achieve this task, clustering algorithms based on k-means, hierarchical clustering, a self-organization map, and expectation maximization in [26–29], can be applied. However, the mentioned algorithms have to be operated in a centralized manner, and cannot be directly applied to a multi-agent distributed system with a unidirectional communication graph. Thus, distributed clustering approach-based supervised learning has to be developed in order to match the phase active powers at the PCC with the agent phases using labelled data.

Motivated by the above discussion, this paper presents a distributed control strategy for compensation of unbalanced active powers in a three-phase four-wire microgrid. First, the phase active powers at the PCC are required to be labelled and sent to an agent via a unidirectional communication link. Each agent labels its own data with its own phase. The agent receives information about the labelled active powers at the PCC and agent phase labels from a neighbour agent. Then, it compares its own phase label with the received phase labels and selects the active power, having the same phase by applying the proposed clustering approach. In the next step, the proposed distributed control strategy is applied. Single-phase battery storage systems (agents) will cooperatively charge/discharge their active powers to minimize the unbalanced active powers. A battery owner can choose to not participate in the control strategy, e.g., due to violation of state of charge or power limits. This offers participation flexibility to the battery owner, while the active powers are still being balanced by the other participating owners. It should be noted that once the active powers have been balanced, the voltages also become balanced, as the voltage is also a function of the active power. The main contributions of this paper can be summarized as:


The rest of the paper is organized as follows. Section 2 describes the test system used to verify the proposed strategy, it introduces indicators to measure the unbalanced conditions, the constraints on battery storage systems, as well as a local active power control method. Centralized and proposed distributed power balancing control strategies are presented in Section 3. Section 4 verifies the performance of the proposed control strategy using real household PV powers and load demands. Finally, Section 5 concludes the paper.

#### **2. Formulation of Unbalanced Active Power Problem**

#### *2.1. System Description*

For verification, the IEEE-13-bus test system in [14] is modified with single-phase households equipped with rooftop PV systems, battery storage systems, and load demands, as seen in Figure 1. There is a transformer between the buses 650 and 632 to step-down the voltage level from the main grid from 33 kV to 4.16 kV. It is assumed that single-phase households with battery storage systems are connected to bus numbers 646, 611, 652, and 680, whereas households without battery storage systems are connected to other buses. Schematic diagram of a single-phase household is shown in Figure 2. Also, bus numbers 633 and 634 are three-phase balanced buses. There are nine agents (*N* = 9) considered in this paper. Each agent is single-phase and consists of a rooftop PV system, a local load and a battery storage system. The capacity of all battery storage systems is selected as 25 kW· h. Connection of the agents is given in Table 2. Real data of household PV powers and load demands over 24 h, taken from [30] are used for each agent, as shown in Figures 3 and 4 respectively.

**Table 2.** Locations of distributed single-phase battery systems.

**Figure 1.** Modified IEEE-13-bus test system.

**Figure 2.** Illustrative example of agent *i* (single-phase household). During the normal mode of operation, the rooftop PV unit is operated at maximum power and the battery storage system can operate in either the charging or discharging mode to compensate the power mismatch between PV generation and load demand.

**Figure 3.** PV powers of all agents over 24 h.

**Figure 4.** Load demands of all agents over 24 h.

#### *2.2. Indicators for Measurement of Unbalanced Conditions*

In three-phase four-wire power networks, the unbalance factor (UF), considering both negative and zero sequence current components is widely employed to measure voltage and current unbalances caused by high variation and uneven allocation of rooftop PV systems and load demands [1], and is defined as,

$$\begin{aligned} \text{UF}\_{\%} &= \frac{\sqrt{|G\_{\text{fl}}|^2 + |G\_z|^2}}{|G\_p|} \times 100, \\ \begin{bmatrix} G\_p \\ G\_{\text{fl}} \\ G\_z \end{bmatrix} &= \frac{1}{3} \begin{bmatrix} 1 & a & a^2 \\ 1 & a^2 & a \\ 1 & 1 & 1 \end{bmatrix} \times \begin{bmatrix} G\_a \\ G\_b \\ G\_{c\nu} \end{bmatrix}, \end{aligned} \tag{1}$$

where *a* = *ej*( <sup>2</sup>*<sup>π</sup>* 3 ) ; *Gp*, *Gn* and *Gz* are positive, negative, and zero sequence components, respectively. The unbalance factor can be represented by the voltage unbalance factor

(VUF) or the current unbalance factor (CUF) if *G*<sup>∗</sup> is replaced by *V*<sup>∗</sup> or *I*∗. The standard for the voltage unbalance factor that is widely adopted in the literature is less than 2%.

#### *2.3. Constraints on Battery Storage Systems*

In order to achieve good performance of unbalance compensation, all agents are required to participate at all time. However, some agents may have faulty battery systems, or battery constraints have been reached, or the owners may decide not to participate in the control strategy for a period of time. The battery state of charge is one of the constraints that should be considered. The battery state of charge (SoC) can be estimated as,

$$So\mathbb{C}\_i(t) = SoC\_i(0) - \frac{1}{E\_{bi}} \int I\_{bi}dt.\tag{2}$$

Differentiating both sides of Equation (2) gives *SoC*˙ *<sup>i</sup>* <sup>=</sup> <sup>−</sup>*Ibi*/*Ebi*. Let *Vbi* be the output voltage of the *i*-th battery storage system. Then, the output power of the *i*-th battery storage system can be obtained as *Pbi* = *Vbi* · *Ibi* and the SoC of the *i*-th battery storage system can be defined as [31],

$$P\_{\rm bi} = -V\_{\rm bi} \cdot \dot{So} \dot{C}\_{\rm i} \cdot E\_{\rm bi} \,\tag{3}$$

where *Ebi* is the battery capacity (W·s) and *Pbi* the active power of the *i*-th battery storage system. As it can be seen from Equation (3), the SoC is only a function of the battery output power if the battery voltage *Vbi* is assumed to be constant. For safe operation, the constraints on battery storage systems can be bounded as *Pbi* <sup>∈</sup> [*Pmin bi* , *<sup>P</sup>max bi* ], [*SoCmin*, *SoCmax*].

#### *2.4. Local Active Power Control Strategy*

Typically, a battery storage system is employed to locally compensate for the power mismatch between load demand and renewable generation (rooftop PV). The power exchanged with the grid by the *i*-th household at phase *φ* is,

$$P\_{gi}^{\phi} = P\_{bi}^{\phi} + (P\_{pvi}^{\phi} - P\_{li}^{\phi})\_{\prime} \tag{4}$$

where *P<sup>φ</sup> gi* is the power exchanged with the grid; *<sup>P</sup><sup>φ</sup> bi*, *<sup>P</sup><sup>φ</sup> pvi* and *<sup>P</sup><sup>φ</sup> li* are the battery output power, PV output power, and load demand of the *i*-th household at phase *φ*, respectively.

As it can be seen from Equation (4), under the normal mode of operation, if the *i*-th household at phase *φ* has a PV source and a battery storage system, and both are properly sized, the unbalanced power caused by the power mismatch between load and PV generation can be locally compensated by the battery storage system. For example, if *P<sup>φ</sup> pvi* <sup>&</sup>gt; *<sup>P</sup><sup>φ</sup> li* or *<sup>P</sup><sup>φ</sup> pvi* <sup>&</sup>lt; *<sup>P</sup><sup>φ</sup> li* the battery system will operate either in charging (*P<sup>φ</sup> bi* < 0) or discharging (*P<sup>φ</sup> bi* > 0) mode, and the power exchanged with the grid by the *i*-th household will be close to zero, *P<sup>φ</sup> gi* ≈ 0.

However, not all households have battery storage systems. Some households may have only a PV source or no battery system and no PV source. Moreover, the battery storage systems may not be evenly distributed among phases throughout the power system. As a result, there will be the unbalanced phase powers and reverse power flow at some phases at the PCC even if loads are balanced as *P<sup>a</sup> <sup>g</sup>* <sup>=</sup> *<sup>P</sup><sup>b</sup> <sup>g</sup>* <sup>=</sup> *<sup>P</sup><sup>c</sup> <sup>g</sup>*, and *<sup>P</sup><sup>φ</sup> <sup>g</sup>* <sup>=</sup> <sup>∑</sup>*N<sup>φ</sup> <sup>i</sup>*=<sup>1</sup> *<sup>P</sup><sup>φ</sup> gi*, *φ* ∈ {*a*, *b*, *c*} is the total power exchanged with the grid. Therefore, a new and effective strategy for compensating the unbalanced active powers at the PCC is necessary.

#### **3. Active Power Balancing Control Strategy**

Figure 5 illustrates a conceptual framework of the active power balancing strategy. Distributed single-phase battery storage systems in the microgrid as shown in Figure 1 can be employed to alleviate the unbalanced conditions. Two control strategies for the compensation are given in this section, (i) centralized and (ii) distributed.

**Figure 5.** Conceptual framework of the active power balancing control strategy. The active powers in all three phases are balanced by adjusting them to be equal to the average grid power *Pavg* using single-phase battery storage systems distributed in the microgrid.

#### *3.1. Centralized Active Power Balancing Strategy*

A centralized controller requires that all agents send information to a central control unit, and a fast bidirectional communication system is required. As mentioned earlier, this control strategy may not be attractive due to lack of cost-effectiveness and risk of a single-point of failure. A schematic diagram of the centralized control approach applied for mitigating the unbalanced active powers is shown in Figure 6. The central control unit located at the PCC measures phases active powers and calculates the required active power for the compensation of each phase. Each single-phase battery storage agents sends its phase connection information to the central control unit. Then, the required active power from each agent at each phase can be obtained as,

$$P\_{\rm bci}^{\phi} = \frac{1}{N\_{\phi}} \int a\_c (P\_{\rm avg} - P\_{\mathcal{S}}^{\phi}) dt, \phi \in \{a, b, c\}, \tag{5}$$

where *P<sup>φ</sup> bci* is the required active power from agent *i* at phase *φ* for the unbalance compensation, *N<sup>φ</sup>* is the number of agents at each phase that participate in the balancing, *α<sup>c</sup>* is the centralized control gain, *Pavg* = (*P<sup>a</sup> <sup>g</sup>* + *P<sup>b</sup> <sup>g</sup>* + *P<sup>c</sup> <sup>g</sup>*)/3 is the average grid power and *<sup>P</sup><sup>φ</sup> <sup>g</sup>* is the grid active power at phase *φ*.

**Figure 6.** Schematic diagram of the centralized power balancing control strategy. The central control unit aggregates agents of each phase. Then, it calculates and broadcasts to all agents how much active power is required from each of them to compensate the unbalanced active powers. Bidirectional communication links are required.

### *3.2. Distributed Active Power Balancing Strategy*

The proposed distributed active power balancing strategy employs unidirectional communication between neighbouring agents. In this subsection, preliminaries of a communication graph are introduced.

3.2.1. Communication Graph

A sparse graph, G(V, E) represents distributed communication links among neighbours, where V = {1, ... , *N*} and E denote the nodes (agents or households) and edges respectively. The node, E, has elements (*i*, *j*), in which (*i*, *j*) ∈ E if node *i* can communicate with node *j* via a communication link [32]. The neighbours of the node *i* are denoted as N*i*. Node *j* is said to be a neighbour of node *i* if (*i*, *j*) ∈ E. The adjacent matrix of the communication graph is expressed by,

$$\mathcal{A} = [a\_{ij}] \in \mathbb{R}^{N \times N}, a\_{ij} = \begin{cases} a\_{\prime}(i, j) \in \mathcal{E} \\ 0, \text{otherwise} \end{cases},\tag{6}$$

where *α* denotes the coupling gain.

The graph Laplacian matrix is defined as,

$$
\mathcal{L} = \mathcal{D} - \mathcal{A},
\tag{7}
$$

where <sup>D</sup> <sup>=</sup> *diag*{*di*}, and the in-degree of the graph is represented as *di* <sup>=</sup> <sup>∑</sup>*<sup>N</sup> <sup>j</sup>*=1*aij*.

#### 3.2.2. Distributed Power Balancing Control Strategy

It is critical for each agent to know information about the active powers at the PCC (both magnitudes and phases). Inspired by supervised machine learning that classifies data based on similar labelled features, the following clustering approach is developed. Let *k* ∈ {1, 2, 3} be a set of clusters (3-clusters) containing information about the three phases {1, 2, 3} representing phases *a*, *b* and *c* respectively. Moreover, denote *xi*, *i* ∈ {1, ... , *N*} where *xi* ∈ {1, 2, 3} as locally labelled data for each agent. Hence, the agent *i* selects its own phase data as,

$$P\_{\mathcal{S}}^k \in \left\{ k\text{-th phase} \, \middle| \, k\_i = \underset{k \in \{1, 2, 3\}}{\text{arg min}} \parallel \left. \chi\_i - k \right\vert \, \right\} \tag{8}$$

where *ki* represents the selected phase.

Meanwhile, agent calculates the average grid power based on the active powers received from neighbouring agents as,

$$P\_{\text{avg}} = \frac{1}{3} (P\_{\text{\textS}}^1 + P\_{\text{\textS}}^2 + P\_{\text{\textS}}^3). \tag{9}$$

Then, based on [32], the battery storage system of the agent *i* will charge/discharge its active power *Pbdi* to make the active power at its phase is equal to the average grid power as,

$$P\_{\rm bdi} = \gamma\_i \cdot a\_d \cdot a\_{ij} \int (P\_{\rm avg} - P\_{\rm g}^k) dt, k \in \{1, 2, 3\}, \tag{10}$$

where *γ<sup>i</sup>* ∈ {0, 1} is the willingness factor for the agent *i* to participate in the controller (*γ<sup>i</sup>* = 1 means agent agrees to participate, 0 means otherwise), *Pbdi* is the active power of agent *i*, *α<sup>d</sup>* is the distributed control gain, *Pavg* is the average grid power in Equation (9) and *Pk <sup>g</sup>* is the grid active power at the *k*-th phase, where *k* ∈ {1, 2, 3}. Schematic diagram of the distributed power balancing control strategy is illustrated in Figure 7, while the procedure of the proposed distributed power balancing strategy of agent *i* is summarized as in Figure 8.

**Figure 7.** Schematic diagram of the distributed power balancing control strategy. Active powers exchanged by bus 623 with the transformer are first labelled with the value of the active power and the phase. Then, each agent receives the labelled powers, and passes them to the neighbouring agent via unidirectional communication links. Within each agent, the average grid power, *Pavg* is obtained and the agent selects the participating phase by comparing its label with the labelled grid powers. Finally, the agent adjusts its active powers according to the obtained average power, and decides whether to contribute by setting the willingness factor, *γi*.

**Figure 8.** Distributed power balancing control strategy for the *i*-th agent (single-phase household). The distributed communication is represented by the dashed red lines.

#### **4. Verification Results**

The performance of the proposed strategy was verified on a modified IEEE-13-bus test system in Figure 1 with real data of rooftop PV units powers and load demands over 24 h, taken from [30]. Parameters are shown in Table 3. The effectiveness of three control strategies is compared. The first strategy is the local active power control strategy in Equation (4). Only the power mismatch between the PV unit and the load demand is locally compensated within each household; hence, it might fail to achieve the unbalance compensation at the PCC even if the loads are balanced. The second strategy is the centralized controller based on Equation (5). This controller can effectively balance the unbalanced active powers, and is given in order to compare its performance with the proposed distributed control strategy. The third strategy is the proposed distributed control strategy based on Equation (10). The agent can only communicate with its neighbours via a unidirectional communication system.

**Table 3.** Case study parameters.


#### *4.1. Local Power Balancing Control Strategy*

A local active power controller, given in Equation (4), is applied to illustrate that it fails to compensate the unbalanced conditions in the system. The power mismatch of each agent is locally compensated within the household, and no powers are consumed/injected from/to the grid (*P<sup>φ</sup> gi* ≈ 0). As a consequence, the active powers flowing from bus 632 to the transformer are always negative and the loads are supplied by importing the active powers from the grid. The unbalanced active powers and voltages are shown in Figures 9 and 10, respectively. Batteries active powers of the local control strategy is depicted in Figure 11. These unbalanced conditions are caused by uneven allocation of PV units and loads.

#### *4.2. Centralized Power Balancing Control Strategy*

In this control strategy, bidirectional communication links are required between agents and the central control unit. All agents that participate in the controller send information about the phase to the control unit, and then the control unit sends the required active powers back to each agent based on Equation (6). Hence, the unbalanced active powers and voltages at the PCC can be alleviated as it can be seen in Figures 12 and 13, respectively. Batteries active powers of the centralized control strategy can be seen in Figure 14.

**Figure 9.** Active powers exchanged by bus 632 at PCC with the transformer using the local active power control strategy.

**Figure 10.** Bus voltages at bus 623 at PCC using the local active power control strategy.

**Figure 11.** Batteries active powers of all agents during the balancing operation using the local control strategy.

**Figure 12.** Active powers exchanged by bus 632 at PCC with the transformer using the centralized control strategy.

**Figure 13.** Bus voltages at bus 623 at PCC using the centralized control strategy.

**Figure 14.** Batteries active powers of all agents during the balancing operation using the centralized control strategy.

#### *4.3. Distributed Power Balancing Control Strategy*

This strategy only required unidirectional communication links between agents and labelled data of active powers of each phase at the PCC. As it can be seen in Figures 15 and 16, the active powers of each phase exchanged by bus 623 with the transformer and the phase voltages at the bus are balanced. The results are similar to the results obtained by the centralized control strategy in Figures 12 and 13, respectively. However, in the proposed control scheme, the active power required for the unbalanced compensation is calculated by the agent (single-phase household) as illustrated in Figure 8. The agent can decide whether to participate in the control scheme without affecting the power balancing operation. Batteries active powers during the balancing can be seen in Figure 17.

Furthermore, during the balancing operation, at *t* = 12.00, h agent-1 is not willing to participate in the control strategy (*γ<sup>i</sup>* = 0), so it contributes zero active power. At *t* = 20.00 h, the agent-1 is reconnected (*γ<sup>i</sup>* = 1) and starts contributing the same active powers as the other agents at the same phase. During the disconnection and reconnection of the agent-1, the active powers and bus voltages are still maintained/balanced, even though there is some transient response at *t* = 12.00 h and *t* = 20.00 h.

**Figure 15.** Active powers exchanged by bus 632 at PCC with the transformer using the proposed distributed control strategy.

**Figure 16.** Bus voltages at bus 623 at PCC using the proposed distributed control strategy.

**Figure 17.** Batteries active powers of all agents during the balancing operation. It can been observed that the battery storage systems belonging to the same phase contributed the same amount of active power. At time *t* = 12.00 h to *t* = 20.00 h, the agent-1 is disconnected and contributes zero active power. After the agent-1 is reconnected it starts sharing the same active power as the other agents at the phase.

#### *4.4. Comparison of Balancing Control Strategies*

The unbalance factor in Equation (1) is adopted to quantify the unbalanced conditions. Two widely used unbalance factors are used in this subsection: the current unbalance factor (CUF) and the voltage unbalance factor (VUF). Figure 18 shows the current unbalance factor during operation. As it can be seen, the highest CUF is when the battery storage systems of all agents are switched-off (*batt. off*). The CUF obtained by the local power balancing control strategy denoted as *local* is decreased, but it is still greater than 20%. On the contrary, the CUFs for the *central* and *distributed* control strategies are substantially reduced to less than 0.5%.

**Figure 18.** Comparison of the current unbalance factor for different control strategies. *Batt. off*, *local*, *central*, and *distributed* correspond to battery switched-off, local power controller, centralized power controller, and distributed power controller, respectively. The inset figure shows the difference between the *central* and *distributed* controllers.

Similarly, the VUF, when all battery storage systems are switched-off (*Batt. off*), is the highest. Meanwhile, the VUF obtained by the *Local* power balancing control strategy is decreased, but it is still higher than the standard (VUF < 2%) [1] during midday as shown in Figure 19. However, the VUFs for the *Central* and *distributed* control strategies are significantly decreased to around 2%.

**Figure 19.** Comparison of the voltage unbalance factor for different control strategies. *Batt. off*, *local*, *central*, and *distributed* correspond to battery switched-off, local power controller, centralized power controller, and distributed power controller, respectively.

#### **5. Conclusions**

This paper presented a distributed control strategy to alleviate the unbalanced active powers, caused by high penetration and uneven allocation of PV rooftop systems and loads, using single-phase battery storage systems distributed in a three-phase four-wire microgrid. First, the three-phase active powers at the PCC were phase labelled and then the labelled

powers were sent to agents in a distributed manner via unidirectional communication links. Within each agent, the labelled power data were compared with the agent data, to select its own phase active power. Furthermore, the average grid power was obtained and then the proposed distributed power balancing control strategy was applied. The battery storage systems were cooperatively operated to minimize the difference between the phase active power and the average power so that the active powers at the PCC become balanced. The battery's owner can decide not to participate in the control strategy for a period of time due to violation of battery constraints or for other reasons. The effectiveness of the proposed strategy was verified on the modified IEEE-13-bus test system with real-time data of rooftop PV systems and load demands.

Further work will focus on developing a method for partitioning a large-scale power system into smaller sub-systems based on geographical location, and applying the proposed distributed power balancing control strategy for compensation of unbalanced active powers in each sub-system.

**Author Contributions:** Conceptualization, W.P. and B.H.; methodology, W.P. and B.H.; simulation, W.P.; validation,W.P. and B.H.; visualization, W.P.; formal analysis, W.P.; writing—original draft preparation, W.P.; writing—review and editing, W.P. and B.H.; supervision, B.H. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** W.P. gratefully acknowledges the scholarship from the Ministry of Higher Education, Science, Research, and Innovation, Thailand.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

