**4. Voltage Compensation in a Distribution-Level VGI System**

A voltage compensation process is divided into two parts. In the first part, the voltage–load variation relation analysis is conducted by the grid-level agent. With this relation, the microgrid agents and the grid-level agent negotiate and find out the further power curtailment of the microgrids and the adjusted voltage compensation target.

### *4.1. The Voltage–Load Variation Relationship Analysis*

The relationship between the voltage change and the load variation of the nodes is analyzed at the grid-level agent with a Jacobi iterative method. This relationship is useful for the microgrid agents to determine their PEV charging power curtailment and the grid-level agent to adjust its voltage compensation target in performing the voltage regulation. Figure 3 shows a distribution feeder branch from a substation BUS 0 as a power source to the end bus—BUS N. The distribution line section parameters are simplified as an impedance model R + jX. The cross-coupling effects of inductance and shunt capacitance from different phases are not considered.

**Figure 3.** The adjacent buses in a distribution feeder branch.

Based on the results deduced in [12], the active and reactive supply power at a random BUS k can be related to the power loss on the distribution line and the grid parameters of BUS k − 1, as shown in Equations (5) and (6). The voltage relationship between BUS k − 1 and BUS k can also be derived as Equation (7):

$$\mathbf{P}\_{\mathbf{k}} = \mathbf{P}\_{\mathbf{k}-1} - \mathbf{P}\_{\text{Loss},\mathbf{k}} - \mathbf{P}\_{\text{L,k}} = \mathbf{P}\_{\mathbf{k}-1} - \mathbf{R}\_{\mathbf{k}} \frac{\mathbf{P}\_{\mathbf{k}-1}^2 + \mathbf{Q}\_{\mathbf{k}-1}^2}{\left|\mathbf{V}\_{\mathbf{k}-1}\right|^2} - \mathbf{P}\_{\text{L,k}} \tag{5}$$

$$\mathbf{Q}\_{\mathbf{k}} = \mathbf{Q}\_{\mathbf{k}-1} - \mathbf{Q}\_{\text{Loss},\mathbf{k}} - \mathbf{Q}\_{\text{L,k}} = \mathbf{Q}\_{\mathbf{k}-1} - \mathbf{X}\_{\mathbf{k}} \frac{\mathbf{P}\_{\mathbf{k}-1}^2 + \mathbf{Q}\_{\mathbf{k}-1}^2}{\left|\mathbf{V}\_{\mathbf{k}-1}\right|^2} - \mathbf{Q}\_{\text{L,k}} \tag{6}$$

$$\left|\mathbf{V}\_{\mathbf{k}}\right|^{2} = \left|\mathbf{V}\_{\mathbf{k}-1}\right|^{2} - 2\left(\mathbf{R}\_{\mathbf{k}}\mathbf{P}\_{\mathbf{k}-1} + \mathbf{X}\_{\mathbf{k}}\mathbf{Q}\_{\mathbf{k}-1}\right) + \frac{\left(\mathbf{R}\_{\mathbf{k}}^{2} + \mathbf{X}\_{\mathbf{k}}^{2}\right)\left(\mathbf{P}\_{\mathbf{k}-1}^{2} + \mathbf{Q}\_{\mathbf{k}-1}^{2}\right)}{\left|\mathbf{V}\_{\mathbf{k}-1}\right|^{2}}\tag{7}$$

The square of the downstream root-mean-square (RMS) voltage square can be represented as a function of its adjacent upper-stream supply power and the square of RMS voltage. It is also related to the distribution line impedance between the two buses. Fazio et. al, [21] provide a proof that a random bus parameter variation ΔPk, ΔQk, Δ|Vk| 2 can be estimated as a linear combination of all buses' loads along the distribution feeder and the source voltage variation square. By using Taylor expansion and the chain rule, the voltage–load variation relationship is deduced; the square of RMS voltage variation for a random BUS k can be represented as Equation (8).

$$\left|\Delta\mathbf{V}\_{\mathbf{K}}\right|^{2} = \sum\_{\mathbf{k}=1}^{N} \left[\mathbf{c}\_{\mathbf{Q},\mathbf{k}\prime}\mathbf{c}\_{\mathbf{P},\mathbf{k}}\right] \left[\Delta\mathbf{P}\_{\mathbf{L},\mathbf{k}\prime}\Delta\mathbf{Q}\_{\mathbf{L},\mathbf{k}}\right]^{\mathrm{T}} + \mathbf{c}\_{\mathbf{V}\_{0}}\Delta\left|\mathbf{V}\_{0}\right|^{2}\tag{8}$$

The coefficients cP,k, cQ,k compose the weighting factor vector that represents the effect of load variation at BUS k on the BUS K RMS voltage square. The values of the coefficients are deduced from [21]. Δ|V0| <sup>2</sup> denotes the power source voltage fluctuation. cV0 represents the weighting factor between the variation of power source voltage and the BUS k voltage. Considering the power factor of the PEV charging in each microgrid as pfk, the reactive PEV charging power curtailment of a microgrid can be represented as ΔQCap,k = <sup>1</sup>−pf2 k pfk ΔPCap,k. Assuming that the voltage source V0 does not fluctuate, the distribution voltage improvement at BUS K about power curtailment at each node along the distribution feeder line then can be simplified and reformulated as

$$\left|\text{co}\Delta\middle|\text{V}\_{\text{k}}\right|^{2} + \sum\_{\mathbf{k}=1}^{N} \text{c}\_{\text{k}} \Delta\text{P}\_{\text{Cap},\text{k}} = 0, \text{ where } \text{c}\_{0} = -1 \tag{9}$$

where the parameter ck <sup>=</sup> cP,k, cQ,k ⎡ ⎢⎢⎢⎢⎢⎣ 1, <sup>1</sup>−pf<sup>2</sup> k pfk ⎤ ⎥⎥⎥⎥⎥⎦ T . The relationship (Equation (9)) is broadcasted to all the voltage recovery participants—the microgrid agents and the grid-level agent.
