Distributed-hierarchical control strategy to coordinate peer-to-peer energy transactions and node voltages at low voltage distribution networks

: Peer-to-peer (P2P) energy market has emerged as a promising way to absorb local generations. However, unregulated P2P transactions are likely to exacerbate voltage violations at distribution networks. The challenge is how to ensure P2P markets to flourish whilst maintaining system voltages within the stator limits. This study proposes a distributed-hierarchical control structure consisting of a central controller and peer controllers to address the challenge. The central controller computes the optimised P2P transaction levels and the nodal voltage references simultaneously and sends the outcomes to the peers as routing-update messages at regular intervals. The peer controllers are developed based on individual phase decupled P – Q theory where two individual channels follow the optimised transaction levels and nodal voltage references. The peers, also, apply a current limit strategy to release the network capacity and improve voltage profiles when confronting with short-term voltage magnitude variations between the two update intervals. A case-study-based investigation shows that reactive power contributions improve the power transaction levels up to 30% while the node voltage violations are reduced. The effectiveness of the proposed strategy is validated using simulation and compared with state-of-the-art voltage mitigation methodologies over the IEEE 19-bus system.


Challenges
From the grid layer point of view, a P2P transaction can cause voltage violations across the whole system due to changes in power flow directions and consequently can present risks for other customers. On the contrary, the distributed system operators (DSOs) desire transaction mechanisms which can follow the contractual commitments regarding the reliability and quality of power supply at the utility end. According to EN 50160, the 10 min mean value of each node voltage magnitude is allowed to range between 0.9 and 1.1 pu. Therefore, to conduct a P2P transaction whilst respecting the voltage regulations, the fundamental challenge is: to maximise the volume of P2P energy transactions whilst minimising the node voltage violations. The challenge particularly will be extended by considering uncertainties in both the peer's energy productions and the nodal voltage profiles. The peer's energy production can be rapidly changed by the shadow of the moving clouds over photovoltaic (PV) panels or wind speed variations in wind turbines. The nodal voltage uncertainties become manifested because the P2P transactions are implemented between units within an altimetry electrical network with unpredictable faults or changes in electric usage by other customers.

State of the art
In power grid layer system architecture of P2P energy trading [8], voltage source converter (VSC) can be an important enabling component for developing the P2P transactions and compensating the voltage violations due to its fast dynamic response, decoupling active and reactive power control, and cost effective. Presently, the VSCs under decoupled P-Q control strategy bring a very high level of controllability and have been extensively investigated in different research area [9][10][11][12][13][14][15]. However, no research paper provides control structure for implementing the P2P transactions based on VSCs.
Looking at grid-connected VSC applications such as PVs, the overvoltage prevention based on reactive power is investigated in [10] and it shows that the effectiveness of this method greatly depends on the R/X ratio of the lines. Considering a distribution network with cables having a small cross-section, high R/X ratios, and compensation based on reactive power injections/absorptions causes drawbacks such as: oversizing the producer and consumer converters, increasing the transmission losses, overloading the upper stream transformers and cables, and malfunctioning the network protections. The power curtailment strategies for mitigating the voltage profiles on its own can waste available energy at the DERs and deteriorate the utilisation of the converter capacities [11,12]. However, without sophisticated control, power curtailment strategies are an unavoidable solution because without accepting a level of it, reaching a high level of voltage compensation is quite expensive [13]. Therefore, there is an untapped opportunity to utilise converter capacities and minimise the voltage violations using combination of reactive power support and active power curtailment schemes to find an optimal solution.
To settle a combinatorial optimisation problem over extensive distribution networks, previous researches proposed three broad structures including central structure, distributed structure, and decentralised structure [16][17][18][19][20]. The centralised or coordinated control methods are as a special case of the optimal power flow which aims to minimise the objective and assume that the network details are available by accurate measurements. Although these methods offer precise and optimal solutions, however, they are costly due to need to the communication infrastructure requirements and careful measurements. Furthermore, considering fluctuation in renewable power productions due to uncertainties in the cloud and wind transient effects and electric usage by other customers, computation speed is another concern [16]. Decentralised control strategies do not require any communication subtractions and stations would be controlled based on the voltage and current measurements at the points connecting to the grid. For example, a reactive power (active power), Q (P), curve has been developed by the German Grid Codes (GGC) to coordinate all PV converters in a distribution system with only local measurements [17]. This causes that the proposed method has fast response speed and easily can be implemented in real-life applications, but they suffer from voltage and frequency deviations, poor load sharing, and may not be optimally employed the whole available converter capacities [18]. Consensus-based distributed control structures apply local control agents interconnected through a limit communication network. The local agents are appointed to disseminate a set of information states such as average voltage, frequency, or output power of PV stations. Distributed control strategies are able to reduce the computational burden effectively and more effective for online applications with frequent updating requirements of control settings using limited communication links [19,20]. Although the calculations are done in a distributed manner, each agent must run a metaheuristic optimisation algorithm separately that increases the computational complexity.

Contributions
In this paper, a control strategy is proposed to manage the P2P platform within low voltage distribution networks in respect of minimising the voltage violations. To take the advantages of both decentralised and centralised control strategies [16][17][18], the proposed control strategy is implemented through a distributedhierarchical control structure combination of a central controller and peer controllers. In a distributed-hierarchical control structure, peers share their own hardware resources without passing through intermediary entities and the central controller is applied for providing parts of the offered services [21]. The central controller solves a two-level programming problem based on the active and reactive power control capabilities of the peers to maximise the volume of P2P energy transactions whilst minimising the nodal voltage violations. The two-level programming problem manages the transaction level in a hierarchical manner so that firstly the reactive power within volt-ampere range of the peers is used to support the P2P transaction level, then the power curtailment is applied if the node voltages go beyond their boundary limitations. The peer controllers are developed based on individual phase decoupled P-Q theory [15] and follow the determined transaction levels and node voltage references based on the local measurements. In addition and to mitigate transient voltage magnitude variations happened between two computation intervals, a current limit strategy is applied over the peers. In the proposed current limit strategy, the reactive power takes priority over the active power so that peers reduced active powers to release the network capacity and apply proper reactive powers to support the voltage profiles.

Impact of P2P trading to network voltage profiles
Uncoordinated P2P trading may trigger violations on nodal voltage limits in low voltage distribution networks. To have a better evaluation, the relationship between the nodal voltages and a P2P transaction is illustrated using a simple electrical system shown in Fig. 1. The assumed system is consisting of a distribution feeder and four units. Two units play the roles of producer (H Pr . ) and consumer (H Co . ) in the P2P transaction whereas units H 1 and H 2 simulate the other household effects. The feeder and units are connected via a power line having a resistance and reactance. Units are presented by a current source as the node voltages are a function of load currents whereas the upstream network is replaced by Thevenin equivalent voltage and related impedances. The unpredictable changes in electric usage can be simulated by sudden changes in I H1 and I H2 . Before initiating the P2P transaction, the producer and consumer node voltages are where R 1 + jX 1 and R 2 + jX 2 are the related impedances, V b is Thevenin equivalent voltage seen at point b, V Pr.1 and V Co.1 are the producer and consumer node voltages, I H1 and I H2 are the currents taken from the feeder by H 1 and H 2 units. Considering a P2P transaction between the producer and consumer units, the corresponding node voltages are where I Pr . and I Co . are the currents injected and absorbed by producer and consumer. Rewriting (3) and (4) based on the power transaction level, P, and ignored the transaction losses Equations (7) and (8) can be investigated as a three-dimensional curve, where the transaction level and the voltage uncertainties caused by H 1 and H 2 units are inputs and in the range of and the producer and consumer node voltages as outputs.
Figs. 2a and b show the producer and consumer node voltages against node voltages before initiating P2P transactions for different transaction levels, respectively.
The applied parameters have been detailed in Table 1. As it can be seen by increasing the P2P transaction level, the node voltages vary in vice-versa direction so that the voltage magnitude is increased at the producer node whereas it is reduced at the consumer node. For example, the producer and consumer node voltages reach to 1.05 and 0.95 pu for 0.3 pu power transaction level, respectively, considering both voltage nodes, V Pr.1 and V Co.1 , at 1 pu before initiating the P2P transaction. Also, it is observed that voltage uncertainties, modelled by V Pr.1 and V Co.1 variations, can lead the producer and consumer node voltages beyond the statuary limitations for a certain power transaction level. For example, the consumer node voltage falls to <0.9 pu if 0.05 pu variation is considered at the V Co.1 , whereas P = 0.3 pu.
As we can see, a P2P transaction can affect the reliability of power supply at the utility end especially in distribution networks with sensitive loads.

Peer-to-peer platform controller design
The proposed control strategy is implemented by a distributedhierarchical control structure consisting of the central controller and peer controllers. The ICT overview of the proposed control structure is shown in Fig. 3. The central controller needs to communicate with DSO and peers to acquire distribution network and P2P platform data such as distribution network topology, line parameters, and peer locations. Also, there is device-to-device communication between the peers to disseminate the locally measured powers, voltages, and currents used for implementing control and protection strategies in a real-time manner.
There is a corresponding flexibility at the communication links and it can be integrated with power line, making use of separate cables, or even a wireless communication system applied in smart grid and distribution network with latency delay between 100 ms and 15 min. Also, there are growing interests in distribution system supervisory control and data acquisition management systems [22,23] and it is expected that such algorithms will be made available in the future to assist P2P trading; these are beyond the scope of this research and the respected readers are encouraged to refer to the cited references.

Central controller
The main task of the central controller is to compute the optimised power transaction levels and node voltage references for the peers. The central controller involves a two-nested mathematical programing [24], including inner level and outer level, based on the controllability of active and reactive powers by the peers and Fig. 4 shows the flowchart of solving it.
The outer level computes the maximum transaction levels from the producer and consumer's point of views in respect of the voltage limitations and considers the minimum of them as the optimised power transaction. Approximate estimation of power transaction levels from the peer's point of view are computed based on (7) and (8) by considering R >> X as where R Pr . Th and R Co . Th are Thevenin equivalent resistors seen at the producer and consumer nodes, V Pr.1 and V Co.1 are the producer and consumer node voltages before initiating the transaction, V Pr.2 and V Co.2 are the producer and consumer node voltages during the transaction. Estimating V Pr.1 and V Co.1 from the latest data and considering the voltage boundary limits as the node voltages, the approximate estimation of maximum power transaction levels are computed as  where V Pr . i − 1 , V Co . i − 1 , P Pr . i − 1 , and P Co . i − 1 are the peer node voltages and power transaction level available from the latest iteration in the inner level, and V Max and V Min are the voltage boundary limits defined by voltage characteristics of electricity supplied by public electricity networks. Using the latest node voltages and power transactions in calculating the optimised transaction levels builds a droop control over the transaction levels and the node voltages so that the transaction levels will be reduced when the node voltages are beyond the boundary limits and increased when the node voltages are within the limits. In first iteration, where there is no history of the inner level computations, P Maxi is set at the desired transaction levels, P Fi , entered into an agreement in the initial phase between the peers. The outer level is only applied to the transactions that the corresponded node voltages hit the upper/lower bounds of the voltage limits. The inner level programing problem is defined as an optimisation problem as follows: subject to (17)- (18). V Fi is the node voltages before initiating the transactions, V i is the optimised node voltages, and N is the number of nodes. Since P has been decided by the outer level, the decision variables can change the node voltages are the injected/absorbed reactive powers, Q i . However, each peer reactive output power is limited by its maximum apparent power (S n ) and the optimised transaction levels acquired in the outer level. In this study, we assume that peers are 10% over-sized and also we consider each peer has the current rating equal to 110% of its nominal current (I n ). This means that peers can operate when the voltages at the consumer and producer points are within 0.9 to 1.1 pu The inner level optimisation problem is solved using particle swarm optimisation and is started by considering the swarm size to produce the primary population of reactive powers within the peer's capacities. Then, run the power flow in order to obtain the values of the node voltages to work out the values of the objective function for each particle. If the algorithm has unsecured the optimal points, the next coordinated particles are founded based on the latest step [25]. Since the feasible solution for the inner level is based on the fixed values of transaction levels defined by the outer level, the transaction level takes priority over the optimisation problem considered at the inner level.
The distribution system constraints and limitations are considered as the criteria which should be checked after solving the outer and inner levels. Equation (19) shows the allowable voltage variations for the nodes in the network and (20) shows the line thermal limits at the network branches To be guaranteed the maximum volume of P2P energy transactions within the voltage boundaries, (21) is considered as another criterion. The criterion is applied when the transaction levels are curtailed from the desired transaction levels (P Fi ) to check whether voltages at the critical nodes are close enough to the statuary voltage limits or not. The node with highest/lowest voltage at the P2P platform is considered as the critical node

Peer controllers
The peer controllers are developed based on the individual phase decoupled P-Q control theory where the desired active powers and voltage references are followed by two individual active and reactive channels as shown in Fig. 5. The active current channel at the producer and consumer nodes are driven by a common active power loop shown at the consumer side. This is because the attribution of power losses to a given power transaction is not straightforward due to the non-linear coupling of power flows on a branch deriving by other units. The common active power loop translates the required active power into the active current reference which is transmitted to the producer side. Since there are no current losses, the currents flowing out of the producer are absorbed entirely by the consumer [26] and minimise the active current variations at the branches outside the P2P platform. It should be noted that the voltage phase angle between nodes is very small and can be negligible due to the high ratio R/X in the distribution lines. The local voltage control loops manage the reactive power at each peer based on the node voltage and reference computed by the central controller. Under short-term voltage magnitude variations happen between intervals, the peer's duty is to release the network capacity and contribute to the voltage profile recovering. On the other hand, the peer current references may exceed beyond their maximum allowable peak currents because the active power and node voltage controllers want to maintain the transaction levels and node voltages at their references dedicated by the central controller. Therefore, it is necessary to consider current limiters at the individual paths to keep the converter operations in a safe mode. Even, compensating the voltage violations is linked to both active and reactive powers, but, there is no guaranty for increasing the active power either in the producers or consumers during the fault conditions. However, if the active power is reduced, the peers are self-protected and able to manage their resources [27,28]. Therefore, the reactive current reference should take priority over the active current reference during grid fault conditions. Current limiting strategy is performed using the limiter blocks at output of the active power loop and voltage control loops as shown in Fig. 5. The limiter at the reactive current channel is set at the nominal current rating (I n ) whereas the limiter at the active current channel is set at the spare capacity of the current converter rating, i.e. I PMax = (I n 2 − I Q 2 ). It should be mentioned that the current references will be within the allowable limitations under grid normal operating conditions. This is because the peers follow the transaction power level and voltage references computed by the central controller in respect of peers and network limitations, therefore the current references go through the current limiter without being affected. The phase angles required by the current references are determined using single-phase phase locked loop based on the measured voltage at the peer nodes. To make the VSC tracks the reference currents, there is a reference current to reference voltage conversion stage which is not shown in Fig. 5. The conversion is based on producing the reference voltage signal by negative feedback of the error between the measured output current and the reference current.

Case study
The considered P2P platform test system is part of a single-phase version of IEEE 19-bus distribution system [29] as shown in Fig. 6. Houses #5, #6, #7, #8, #10, #11, #13, and #14 are member of the P2P platform and have the possibility to contribute in a P2P transaction as they have been equipped by VSCs. The voltage magnitude at the main feeder is considered 1.06 pu (253 V) and the lower and upper bounds of the voltage are 0.9 pu (215 V) and 1.1 pu (263 V), respectively. We assume a static pure resistive load model for houses outside the P2P platform with 1 kW, whereas the power converter capacity at each peer is 5 kVA.
The details of line parameters and current rating of all branches are tabulated in Tables 2 and 3. The central controller which optimises (14) to (16) uses AC full power flow model and is implemented by Mathwork Matlab 2018b to compute the transaction level and node voltage references. The central controller updates the peers every 30 s. The detailed model of the distribution test system and the peer controllers are developed by PSCAD. The node voltages are rounded to three significant digits, and then they could be same at some neighbour nodes when differences are <0.5 V.

Voltage deviations against different transaction levels
To assess the performance of the proposed control strategy, a P2P transaction for two levels of 3.3 and 4.3 kW are considered between House #14 as producer and House #11 as consumer. Table 4 shows the node voltages inside the P2P platform before initiating, P = 0 kW, and when the P2P transactions are conducted. The proposed strategy performances are evaluated against two other strategies where peer's reactive powers are set based on GGC curve for power factor 0.95 [17] and where peer's reactive powers are set at zero, without Q compensation. Table 5 compares the required reactive powers from House #11 and House #14 under the Fig. 6 IEEE 19-node distribution test system [29]   Other line current rating 1.5 pu. Table 4 Node voltages for a P2P transaction between Houses #14 and #11 Node voltages Strategies   0 k→  248  247  245  245  244  245  240  248  3 3 k→  proposed structure  250  250  246  246  245  224  241  251  GGC  247  246  244  243  242  217  238  249  without Q  247  246  244  242  241  215  238  249  4.3 k→  proposed  252  250  248  247  246  215  243  254  structure  GGC  247  245  242  241  241  207  237  249  without Q  247  245  243  241  240  204  237  proposed control strategy and GGC curve. The reactive power at the peers is constructed by the proposed local voltage control loop. According to Table 4 and for 3.3 kW, the node voltages under the strategy without Q are mostly same as the node voltages under the strategy based on the GGC curve. Concentrate on the node #11 as it is critical point, the voltage magnitude meets minimum voltage level, 215 V, under the strategy without Q compensation, slight improvement can be seen under GGC curve strategy, whereas it is 224 V, 9 V over the lower bound, under the proposed strategy. According to Table 5, the required reactive power from House#14 is 1 kVar based on GGC curve whereas the proposed strategy requests 0 kVar from House #14. Although absorbing reactive power by the producer can diminish the voltage violation at node #14, however, it will cause a voltage drops at node#5 and consequently will affect the voltage profile at node #11. In contrast to this, the proposed strategy requests maximum spare converter capacity which is − 3.7 kVar, instead of − 1 kVar based on GGC curve, from House#11 to boost the voltage profile at node #11. This is an example to show that decentralised strategies such as GGC curve unable to utilise the whole available converter capacity in confrontation with voltage violations.
According to Table 4 and under the proposed strategy, node #11 meets the lower bound, 215 V, for 4.3 kW as transaction level. This amount of transaction is failed for other two strategies because voltage at node #11 will be under the lower bound, 207 and 204 V, respectively. According to Table 5 and for 4.3 kW, not only the consumer is requested for full spare converter capacity injection which is − 2.65 kVar but also the producer as well to support the voltage profile at the node #5 and eventually nodes #6, #7, #8, and #11. Due to the reactive power injection by the producer, the voltage at node #14 is increased in comparison with two other strategies.
To provide an overview from voltage violations over the test system, square root of (16) is defined as voltage profile index. The lower voltage profile index, V ind . , means less voltage violation. The voltage profile index for the proposed strategy, the strategy based on GGC curve, and strategy without Q compensation for amount of 4.3 kW transaction are 21, 60, and 65 respectively. As we can see, the reactive power management within the spare capacity of the peers can improve the overall voltage violation, voltage profile index, to almost one-third in comparison with other strategies.

Increasing penetration rate of P2P transactions
To evaluate the proposed control strategy performance against increasing penetration of P2P transactions, two more case studies are investigated here. Firstly, we consider two 4.3 kW transactions where House #14 and House #6 are producers whereas House#11 and House#8 are the corresponded consumers. Tables 6 and 7 compare the node voltages and the required reactive powers for strategies mentioned in the previous section. As second case study, four 4.3 kW transactions between House #6, House #7, House #10, and House #14 as producers and House#8, House#5, House #13, and House #11 as the corresponded consumers are considered. The node voltages and the required reactive power from each house are presented at Tables 8 and 9, respectively.
As it can be seen for both case studies, only the proposed strategy keeps the node voltages within the boundaries whereas voltage at the node #11 is <215 V, lower limit, under other strategies. According to Table 6, the required reactive power pattern under the proposed strategy also is different from what is extracted from the GGC curve. For example, the proposed strategy requests House #6 to inject the reactive power whereas it plays the role of a producer in the transaction, based on GGC curve producers should absorb the reactive power. We can also see same pattern in second case study (Table 9), where the proposed strategy requires reactive power injection from House #7 which is a producer and the reactive power absorption from House #5 which     is a consumer. The voltage profile index for the proposed strategy, the strategy based on GGC curve, and strategy without Q compensation and for first case study is 27, 71, and 75 and for second case study is 25, 82, and 87, respectively. From the presented results here and in previous section, this could be confirmed that the reactive power management over the P2P platform not only is a function of the peer's role, consumer or producer, but also is a function of the peer location and other P2P transactions.

Imposed power losses due to P2P transactions
In this section, the imposed losses caused by P2P energy transactions and reactive power flows are assessed individually. The case studies are one, two, and four 4.3 kW transactions considered at Sections 4.2 and 4.3. Since the computation of power losses to the given transactions is not straightforward, the power variations seen at the main feeder are considered as imposed losses by the transactions. The first row of Table 10 shows power variations when the transactions are conducted using the proposed common active power loop shown in Fig. 5 and the voltage control loops are inactive (Scenario I). The second row shows when the transactions are conducted and the voltage control loops are activated (Scenario II).
As we expected, the power variations are insignificant for Scenario (I) because of using the common active power loop which minimises the active current variations outside the P2P platform. This means that transaction losses are mostly damped by the producers as their active power profiles are amended following their voltage profile modifications. For Scenario II, the power variations are increased in comparison with Scenario I due to losses caused by injection/absorption reactive powers. The imposed losses caused by reactive currents depend on system parameters and peer locations and can be bigger, but since P2P transactions will improve spinning reserve capacities at distribution networks, this would not make a technical challenge from operating network point of view. However, this is worth of investigation from pricing policy perspective to find how much each transaction's contribution to the system losses is and considered for our future study.

Effectiveness of the limiting strategy confronted with short voltage variations
To show the effectiveness of the proposed limiting strategy in the event of sudden voltage variations between two intervals, a voltage sag and swell with −0.15 and +0.1 pu magnitude starting at t = 12 s and t = 24 s for a 4 s period are simulated at the main feeder. Three 2.6 kW P2P transactions are considered between units #14, #6, and #10 as producers and units #11, #8, and #13 as corresponded consumers. Fig. 7a shows the voltage profiles at the nodes inside the P2P platform when the proposed limit strategy is applied at each peer. The results are compared with the situation where the peers consider sudden changes as fault and disconnected from the network as shown in Fig. 7b. Observe that the proposed limit strategy can remarkably cancel voltage variations so that the node voltages remain within the boundary limitations. The reason of this phenomenon is that during the voltage sag, all peers in proportion to the fault effects seen at their nodes reduce the transaction level and increase the reactive power injection to mitigate the voltage drops. The peers also reduce the transaction levels and absorb the reactive powers when there is a voltage swell during 24-28 s. Fig. 8 details how the peer active and reactive currents are changed at each peer against these sudden voltage changes.

Conclusion
This paper showed that compensating the voltage violations caused by P2P transactions are complicated due to the voltage and local power generation uncertainties. To tackle the problem, a distributed-hierarchical control structure consisting of a central controller and peer controllers has been proposed. The central controller computes the optimised transaction level and node voltage references whereas the peer controllers guaranty following these optimised references. In confronting with short-term voltage variations within the intervals, a local limit strategy has been designed to revise actively the peer operations.
Overall, several findings had been pointed out in this paper. Firstly, the presented results confirmed that managing reactive powers over P2P platforms could reduce the voltage violations and simultaneously improve the P2P transaction levels. Secondly, it showed that not only a transaction level but also the location of a peer and other P2P transactions are important factors for optimising the reactive powers over P2P platforms. Thirdly, it shows that negative side of circulating the reactive power for minimising the voltage violations is a modest increase in power losses. Finally, the results also acknowledged that increasing penetration of peers is an opportunity to improve power quality level of distribution networks in confronting with short-term voltage variations.