scieee AI-readable full text Open interactive document viewer

A systemic and model-less approach for real-time optimal control of unbalanced AC microgrids dominated by power electronics

Olives Camps, Juan Carlos; Rodríguez del Nozal, Álvaro; Mauricio, Juan Manuel; Maza Ortega, José María

Abstract

This paper presents a two-layer hierarchical control system for power regulation between grid-former converters feeding islanded or grid-connected microgrids. This work considers the inherent unsymmetric nature of microgrids that can be composed of, in addition to three-phase loads, single-phase loads. The proposed secondary control strategy combines the classical automatic generation control (AGC) for active power and frequency regulation with an online feedback optimisation (OFO) method for reactive power and voltage regulation per phase. By coordinating the grid-forming devices using these techniques, an optimal operating point can be attained that minimises the voltage imbalance on target buses. This methodology confers a high degree of robustness to disturbances and model inaccuracies. The efficacy of the methodology is evaluated through the simulation of two case studies. The results demonstrate the suitability of the proposed strategy, which leverages the fast responses of the power converters.

Full text

Contents lists available at ScienceDirect International Journal of Electrical Power and Energy Systems journal homepage: www.elsevier.com/locate/ijepes A systemic and model-less approach for real-time optimal control of unbalanced AC microgrids dominated by power electronics J. Carlos Olives-Campsa,b, Álvaro Rodríguez del Nozala, Juan Manuel Mauricioa, José María Maza-Ortegaa,∗ aDepartment of Electrical Engineering, Universidad de Sevilla, Camino de los descubrimientos s/n, Seville, 41092, Spain bCITCEA-UPC, Universitat Politècnica de Catalunya, Av. Diagonal, 647, Barcelona, 08034, Spain ARTICLE INFO Keywords: AC microgrids Unbalanced low voltage distribution systems Centralised hierarchical control Online feedback optimisation Load sharing control Secondary voltage control ABSTRACT This paper presents a two-layer hierarchical control system for power regulation between grid-former converters feeding islanded or grid-connected microgrids. This work considers the inherent unsymmetric nature of microgrids that can be composed of, in addition to three-phase loads, single-phase loads. The proposed secondary control strategy combines the classical automatic generation control (AGC) for active power and frequency regulation with an online feedback optimisation (OFO) method for reactive power and voltage regulation per phase. By coordinating the grid-forming devices using these techniques, an optimal operating point can be attained that minimises the voltage imbalance on target buses. This methodology confers a high degree of robustness to disturbances and model inaccuracies. The efficacy of the methodology is evaluated through the simulation of two case studies. The results demonstrate the suitability of the proposed strategy, which leverages the fast responses of the power converters. 1. Introduction Contemporary distribution networks are undergoing a transformative and unprecedented transition, evolving from a composition of oversized and passive elements to a stressed and active grid [1]. This transformation has been driven by the necessity to decarbonise the electrical power system. Consequently, renewable energy sources (RES), which are more scalable than traditional power plants, are being massively integrated into the power network [2]. A significant proportion of these RES are connected to the low-voltage grid through power electronics converters; these units are called inverter-based resources (IBRs). In this context, the concept of microgrid (MG) emerged as a flexible solution for the management of electrical power and the provision of support services to the main grid, as described in [3]. A MG clusters generation units, loads, and energy storage elements at the distribution level into a single controllable entity for the main grid, enabling it to be operated in either grid-connected or islanded mode. However, the introduction of these smaller and autonomous versions of the power system is causing a plethora of new and vexing control issues of considerable practical importance, as evidenced in [4]. The principal difficulties associated with low-voltage MG control can be attributed to the intrinsic uncertainty that arises on both the generation and consumption fronts [5]. Moreover, given the low inertia in systems dominated by power electronics, it becomes especially ∗Corresponding author. E-mail address: [email protected] (J.M. Maza-Ortega). challenging to balance active and reactive power when considering intermittent renewable generation and variable consumption [6]. The challenge of preventing microgrid instability in such volatile conditions requires a detailed investigation for the development of innovative control techniques unlocking the flexibility and rapid response capabilities that grid-forming IBRs may provide [7–9]. The operational objectives of a IBR-driven microgrid can be mapped into a hierarchical control system with control layers organised according to their priority as explained in [10]. The primary control layer is tasked with maintaining the MG stability by regulating power balance regardless of steady-state operating point [8,11]. The secondary control layer is responsible for the restoration of voltage and frequency deviations caused by the actions of the primary layer. Finally, the tertiary control layer is responsible for the economic optimisation of the MG operation. This work addresses the challenge of computing the reference voltage signal, i.e. amplitude and frequency, of the MG grid-forming IBRs within the secondary layer [12]. In this regard, the high penetration of RES at the residential level has a significant impact on the voltage quality in the distribution networks [13]. In particular, the presence of arbitrarily connected single-phase loads and distributed RES introduces a significant difficulty in maintaining an adequate voltage profile [14– 16]. This situation is further compounded when the MG comes to https://doi.org/10.1016/j.ijepes.2024.110443 Received 5 August 2024; Received in revised form 28 November 2024; Accepted 24 December 2024 Electrical Power and Energy Systems 165 (2025) 110443 Available online 10 January 2025 0142-0615/© 2024 Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/by-nc-nd/4.0/ ). J.C. Olives-Camps et al. islanded operation, as there is an additional need to achieve adequate power sharing between existing IBR units [17,18], particularly challenging when unbalanced conditions arise [19]. In this context, there are several decentralised methods in the literature, mainly based on the concept of virtual impedance [20,21]. However, as formally demonstrated in [22], without a communication infrastructure, the resulting steady-state voltage profile is not optimal in any sense. For this reason, this paper considers a centralised communication infrastructure,1wherein optimal controllers, which consider the system as a whole, demonstrate the most effective results in terms of performance [25,26]. Most optimisation-based methodologies taking advantage of this centralised approach require an accurate grid model and generator parameters, in addition to full observability of the network state [27–30]. However, these prerequisites are often unattainable in MG environments. Furthermore, when voltage unbalance is intended to be corrected, control strategies in the literature are typically based on sequence decomposition, which requires angle information [31,32]. While this is a viable approach for buses with converters, it is not applicable to other buses with loads due to the unavailability of this requisite information. Proposals have emerged suggesting the utilisation of Phasor Measurement Units to provide the voltage angles [33], although their deployment in distribution networks or microgrids is not currently feasible due to economic reasons. Therefore, a methodology that does not necessitate knowledge of these angles would eliminate the additional investment cost. From a computational perspective, the primary limitation of these techniques is the evaluation of the nonlinear set of equations that comprise the power flow problem. As a result, centralised optimisation techniques are typically solved offline, considering load and generation forecasts, and a fully known network model [34]. Then, the solution is applied directly to the system in a feedforward manner. A substantial body of research has been conducted with the objective of reducing this computational cost. This has involved the use of approximations and relaxations to convexify the problem [35–37], model-free formulations such as the extremum-seeking approach [38], and the use of metaheuristic algorithms to solve problems with an arbitrary precision [39, 40]. However, the feedforward structure is particularly vulnerable to uncertainty and model inaccuracy. A novel perspective that transcends these previously identified shortcomings and avoids the need for simplification or relaxation of the model is the Online Feedback Optimisation (OFO) paradigm [41]. The fundamental concept of OFO is the implementation of optimisation algorithms as feedback controllers, which are coupled to physical plants through a closed-loop scheme. Eventually, the operating point converges to the solution of the optimisation problem by using realtime measurements. As a result, it is highly robust against disturbances and uncertainties. Moreover, the nonlinear plant model is not evaluated numerically, which significantly reduces the computational burden. Furthermore, OFO provides data privacy because it requires only a steady-state input–output sensitivities map of the plant. It is also worthy of note that this strategy is currently under consideration for implementation in the electrical power system. Early results of its deployment in laboratory settings [42,43] and existing power grids [44] have already been published in the academic literature. Previous research on constrained OFO formulations in power system applications has demonstrated the stability and convergence of this closed-loop approach with the underlying dynamic plant [45,46]. Additionally, an experimental validation of a setup for voltage regulation by reactive power injection was developed in [42], and the joint operation of OFO and a dynamic state estimator was illustrated in [47]. It should 1Another approach of great interest to the control community is distributed optimisation, which has the potential to enhance the robustness of the control layer. However, a comprehensive review of these methodologies is beyond the scope of this article. For further insight, we recommend consulting [23,24]. be noted that all of the aforementioned works assume a stiff grid with a stable voltage signal at the power converter terminals, which enables the grid-following mode of IBRs. However, this assumption may no longer be valid in situations where the MG is islanded from the main grid. The initial efforts to utilise the OFO algorithm for the coordination of grid-forming devices can be found in previous work by the authors. In [48], the OFO is formulated for the coordination of generators in DC microgrids, which was experimentally validated in a laboratory environment [43]. Subsequently, a strategy based on OFO combined with a conventional Automatic Generation Controller (AGC) was proposed for balanced AC microgrids in [49]. This paper makes a significant contribution to the existing body of research by extending the two-layer hierarchical algorithm proposed in [49] to consider the inherent asymmetrical2nature of MGs. The primary control layer of the grid-forming devices is based on the virtual synchronous generator scheme presented in [51]. The secondary control layer is divided into two parallel algorithms. On the one hand, an optimal compromise solution between phase voltage regulation and reactive power sharing is achieved using a non-convex OFO algorithm [52]. On the other hand, frequency regulation is conducted using classical AGC to adjust the active power injection of each grid-forming IBR. The main contributions of this work are summarised as follows: •Extend the work presented in [49] to include in the OFO formulation the regulation of unbalanced voltage on certain MG target buses, maintaining the reactive power sharing between generators. The use of OFO allows the desired robustness and privacy characteristics to be maintained in this layer. •The optimisation problem is formulated in such a way that it makes use of the RMS voltage measurements of the target nodes. The formulation imposes some voltage magnitudes to achieve a performance as close as possible to a balance ideal scenario, thereby relieving the algorithm of the necessity to determine the angle of each phase and the subsequent need to synchronise the measurements. The following sections constitute the remaining content of this paper. Section 2presents the issue under examination and sets out the objectives pursued in this study. Section 3presents the methodology that has been proposed. Firstly, the implementation of a grid-forming IBR is discussed, and subsequently, the secondary control strategy is detailed. Section 4presents the results of simulations of two different MGs, which analyse the performance of the proposed algorithm. The subsequent section, Section 5, presents the conclusions of this study. 2. Problem description Let us consider a three-phase and four-wire AC MG, which may be modelled as an undirected graph, denoted by the notation = (,), where represents the set of buses and ⊆×represents the multiset of edges that interconnect the aforementioned buses. A matrix term of appropriate size is associated with each edge in to represent the (asymmetrical) line impedance. Some buses, 𝑔⊆, are supplied by IBRs operating in grid-forming mode. It is assumed that IBRs are four-leg voltage source converters (VSCs), which are capable of independently controlling the phase voltage amplitudes and the frequency at their corresponding point of interconnection (POI), as demonstrated in [53]. Finally, it is considered that some uncontrollable singleand three-phase loads, as well as grid-following IBRs, can be connected to the remaining MG buses ∖𝑔. All grid-forming IBRs in the network are assumed to have an appropriate measurement and control system that enables them to emulate a 2The terminology used is that of [50]. Balanced is used in the context of signals and symmetrical in the context of circuits. International Journal of Electrical Power and Energy Systems 165 (2025) 110443 2 J.C. Olives-Camps et al. synchronous generator. On the DC side, the devices are assumed to be connected to a primary resource source that determines the maximum amount of steady-state power. In addition, IBRs have a communication system with a centralised control layer that calculates their setpoints. The aim of the central controller is to coordinate the joint operation of all the MG IBRs without relying on a detailed network model. Instead, the controller relies on the data obtained from the network measurements, which serve as the only source of information. Furthermore, it is of utmost importance to respect technical and physical constraints to avoid any possible compromise and to ensure the MG safe operation. The technical objectives that the centralised control layer seeks to achieve can be summarised as follows: (i) Eliminate steady-state frequency deviations caused by the primary control layer. (ii) Maintain bus phase voltages 𝑉ℎ,𝑎𝑏𝑐 within voltage limits for all ℎ∈𝑔. (iii) Share the active and reactive power load demanded in the network among the installed IBRs to prevent overloads. (iv) Minimise the voltage imbalance and keep each phase amplitude close to the given setpoint for certain target buses 𝑡⊆. (v) Maintain the injected currents within their thermal limits, with special attention devoted to injection of the neutral wire current. To achieve these objectives, the central secondary control layer must calculate the set points of the active power injections and virtual electromotive force (EMF) per phase for each IBR. Consequently, when the asymmetrical structure of the MG is considered, the original formulation presented in [49], is generalised, since objectives (ii) and (iii) must be met per phase, and in addition, objectives (iv) and (v) are incorporated in order to reduce MG imbalance. 3. Proposed method This section provides a detailed and comprehensive presentation of the methodology proposed to address the problem outlined in Section 2. In order to achieve this, the control architecture is presented first, followed by a detailed description of the grid-forming IBR primary controllers. Finally, the secondary controller, which is responsible for coordinating the control actions of the IBRs in order to achieve proper MG operation, is outlined. Note that the following notation will be used in the sequel: lower-case variables refer to instantaneous values, while upper-case ones are related to the corresponding RMS values. 3.1. Control architecture The proposed hierarchical two-layer control architecture, designed to fulfil the objectives outlined in the previous section, is illustrated in Fig. 1. In order to elucidate the functioning of the controller, let us consider a three-phase four-wire (3P-4W) VSC connected to the main grid through a coupling filter with impedance 𝐙𝑠. The VSC is operating in grid-forming mode and is capable of synthesising phase-to-neutral voltages, i.e. 𝑣𝑠,𝜒 with 𝜒∈ {𝑎𝑛, 𝑏𝑛, 𝑐 𝑛}, and the neutral-to-ground voltage 𝑣𝑠,𝑛𝑔 at the POI. Four currents are injected into the POI to set the output voltage, i.e. 𝑖𝑠,𝜒 with 𝜒∈ {𝑎, 𝑏, 𝑐 , 𝑛}. The characteristics of these currents will depend on Kirchhoff’s laws according to the network variables. The VSC lowest control level is responsible for ensuring compliance with the POI voltage setpoints (phase amplitudes and frequency) with a characteristic time response in the order of tens of milliseconds [53]. The primary control layer is implemented at local level within each IBR, and is therefore designed to facilitate rapid responses that contribute to maintain a stable MG operation. This work adopts the methodology of emulating a synchronous generator which enables IBRs to maintain a connection between a virtual internal frequency and the active power exchanged with the grid. Since the IBR contains a model of a synchronous generator, the setpoints of this control layer are the active power reference, 𝑝𝑐, and increments of the phase amplitudes of the internal EMFs, 𝛥𝐯𝑟. Note that the EMF amplitude can be set independently in each phase, being not required to perform a balanced operation. The secondary control is designed at the system level in a centralised manner. This layer receives measurements from all the grid-forming IBRs and at least one MG target bus where the voltage imbalance is regulated. Its task is to coordinate the grid-forming IBRs to return the grid to a proper operating point after a disturbance. This objective is achieved with two independent strategies for the calculation of the active power and internal EMF references of each grid-forming IBR. Note that this layer will calculate one voltage reference per IBR phase. Further details on each control layer are given in the following subsections. 3.2. Primary virtual synchronous generator control The IBR primary control is based on the Proportional-Integral Virtual Synchronous Generator (PI-VSG) [51]. The instantaneous active power injected by the IBR is calculated from the three-phase currents and phase-to-neutral voltages, 𝐢𝑠and 𝐯𝑠, as: 𝑝𝑒=𝐯⊤ 𝑠𝐢𝑠.(1) Note that this instantaneous active power may have oscillatory terms because voltages and currents are unbalanced. Therefore, a lowpass filter is applied to eliminate any oscillatory component resulting in the average active power 𝑝𝑒𝑓 . As stated above, the PI-VSG control requires the active power setpoint defined by the secondary control layer, 𝑝𝑐. This signal is passed through a low-pass filter in order to prevent undesired transients. The virtual mechanical power of the IBR is obtained by adding to this filtered power setpoint, 𝑝𝑐 𝑓, a droop term as: 𝑝𝑚=𝑝𝑐 𝑓+1 𝑘𝑑 (𝜔⋆−𝜔𝑣),(2) where 𝑘𝑑is the droop constant and 𝜔𝑣and 𝜔⋆represent the virtual angular speed and its reference, respectively. The active power error 𝜖𝑝, i.e. difference of the virtual mechanical power 𝑝𝑚and the filtered POI power 𝑝𝑒𝑓 , is fed into a PI controller to update the virtual angular speed, 𝜔𝑣. Finally, the internal angle of the virtual rotor, 𝜃𝑣, is obtained by integrating the virtual rotor speed. Note that this paper proposes an independent per-phase control of the IBR by using a virtual three-phase system associated to each IBR phase [54]. For this purpose, virtual quadrature signals are computed to the corresponding actual phase magnitudes, voltages, or currents. This enables the generation of a magnitude in the virtual stationary reference frame of each phase rotating at 𝜔𝑣. These rotating magnitudes can be transformed into the virtual synchronous reference frame by applying the corresponding transformation using the angle 𝜃𝑣. Once the phase voltages and currents are transformed into their corresponding virtual synchronous frame, a virtual impedance is applied to determine the reference IBR terminal voltages. This is accomplished by considering the filtered voltage increments computed by the secondary controller, as detailed in the next subsection. Finally, the Park antitransformation is applied to compute the phase-terminal voltage of the IBR. It is noteworthy that the virtual quadrature signal associated with each phase is disregarded, as it corresponds to the artificially created quadrature signal. 3.3. Secondary control The secondary control layer has two main functions. First, it must restore the system frequency to the reference value dictated by the tertiary control. Secondly, it must regulate the bus voltages within the regulatory limits and balance them as much as is feasible. International Journal of Electrical Power and Energy Systems 165 (2025) 110443 3 J.C. Olives-Camps et al. Fig. 1. Proposed hierarchical control architecture. The strategy proposed in this article employs two control stages that operate in parallel. A PI control structure performs the task of an Automatic Generation Controller (AGC) by dispatching power setpoints to the grid-forming IBRs. In turn, an optimal strategy based on the Online Feedback Optimisation (OFO) technique is responsible for managing the target bus voltages. 3.3.1. Active power - frequency regulation The objective of this stage is to restore the power system frequency to the reference value by balancing generation and load within the MG. A PI-based controller receives the system frequency and determines the required active power to restore the frequency to its steady-state reference value, thus maintaining the power balance. This controller can be formulated in a discrete form as follows: 𝜖𝜔[𝑛] =𝜔⋆−𝜔𝐶 𝑂 𝐼[𝑛], 𝜉[𝑛+ 1 ] =𝜉[𝑛] +𝛥𝑡 𝐾𝑝 𝑇𝑖 𝜖𝜔[𝑛], 𝑃𝑟[𝑛] =𝐾𝑝𝜖𝜔+𝜉[𝑛], (3) where 𝐾𝑝,𝑇𝑖are the proportional gain and integration time of the PI controller, respectively, 𝛥𝑡 is the communication period of the secondary control layer and 𝑛is the discrete-time step. In this work, the system frequency is approximated by calculating the frequency at the centre of inertia (𝜔𝐶 𝑂 𝐼). This value is computed as the weighted arithmetic mean of the virtual rotor speeds of all grid-forming IBRs. Once 𝑃𝑟has been determined using (3), the grid-forming IBRs are dispatched according to their rated power. Given the limited amount of data required for this process and the fast dynamics of the VSCs, it is proposed to execute this control cycle at time intervals of one second. 3.3.2. Reactive power - voltage regulation This part of the secondary control is concerned with the management of the MG voltage profile. This is achieved by adjusting the internal phase EMF references of the grid-forming IBRs to maintain appropriate voltage levels on some previously selected target buses. Voltage regulation in asymmetrical systems represents a significant challenge. One of the main obstacles is that even when the loads Fig. 2. Equivalence between the balanced voltage system and an equilateral triangle. (asymmetrical) in a system are supplied with balanced voltages, the current consumption will inevitably show an imbalance. Consequently, the voltage drop across the feeder will also be unbalanced, and the system voltages at other points will retain this imbalance. For this reason, the authors of this paper arbitrarily specified the target buses on which the regulation is performed. The question of determining the number and location of buses to be controlled is related to the optimal location of the grid-forming IBRs to ensure system stability. Therefore, in this paper, this task is considered as part of a network planning problem rather than an operational one, where the objective is to formulate a controller that is not dependent on the target buses. This work aims to eliminate the need to decompose unbalanced voltage systems using the Fortescue transform, which involves measuring the voltage angle of each phase. This avoids the need for synchronous measurements to correctly calculate the relative angles in case several MG target buses are selected. As a result, this work only considers the phase-to-neutral, phase-to-phase, and neutral-to-ground voltages. Therefore, to achieve the highest possible balance in the 3P-4W MG, it is necessary to maintain the phase-to-neutral and the phase-to-phase voltages as close as possible to their nominal values while the neutralto-ground voltage close to zero. Ensuring that all moduli have the same length is equivalent to generating a balanced voltage system. Fig. 2 illustrates the transformation of a balanced voltage system into an equilateral triangle. International Journal of Electrical Power and Energy Systems 165 (2025) 110443 4 J.C. Olives-Camps et al. Furthermore, it is intended to maintain an equal distribution of the loads between the MG IBRs. Consequently, at this stage, it is also considered that an appropriate per-phase reactive power sharing between the grid-forming IBRs must be carried out. In order to facilitate the calculation when different VSC sizes are considered, all variables are expressed in a p.u. system relative to each device. In order to achieve an operating point that satisfies the aforementioned objectives, the problem is formulated within a mathematical optimisation framework. This approach allows for the incorporation of constraints to ensure that operational limits are not exceeded. To formulate this problem, consider the set of buses with generation, 𝑔, and the set of target buses, 𝑡. The control actions are the internal FEM variations per phase of all of the grid-forming IBRs: 𝐮ℎ= [𝛥𝑣𝑟,𝑎, 𝛥𝑣𝑟,𝑏, 𝛥𝑣𝑟,𝑐]⊤ ℎ∀ℎ∈𝑔. The endogenous variables, i.e. MG measurements, are composed of the phase-to-neutral, neutral-to-ground and phase-to-phase voltages measured at the target buses: 𝐲𝑘= [𝑉𝑎𝑛, 𝑉𝑏𝑛, 𝑉𝑐 𝑛, 𝑉𝑛𝑔 , 𝑉𝑎𝑏, 𝑉𝑏𝑐 , 𝑉𝑐 𝑎]⊤ 𝑘∀𝑘∈ 𝑡, as well as the phase-to-neutral and neutral-to-ground voltages, current and active and reactive power injections of the grid-forming IBRs: 𝐲ℎ= [𝑉𝑎𝑛, 𝑉𝑏𝑛, 𝑉𝑐 𝑛, 𝑉𝑛𝑔 , 𝐼𝑎, 𝐼𝑏, 𝐼𝑐, 𝐼𝑛, 𝑃𝑎, 𝑃𝑏, 𝑃𝑐, 𝑄𝑎, 𝑄𝑏, 𝑄𝑐]⊤ ℎ∀ℎ∈𝑔. From the control perspective, it is assumed that the plant maintains a nonlinear relationship between all these variables in steady-state and that they are affected by a number of exogenous variables, 𝐰, e.g. power consumption or grid-following IBRs with no complete power regulation capability: 𝐲=𝐡(𝐮,𝐰).(4) where 𝐡(⋅)encompasses all nonlinear functions that define the steadystate behaviour of the plant. In general, these equations encompass, but are not limited to, the equations that describe the power flow problem and the impact of the controllers implemented in the VSCs. All these variables are subject to limits that represent the constraints of the optimisation problem: •On the target buses, all measured voltages must be bounded: 𝑉𝑘≤𝑉𝑘,𝜒 ≤𝑉𝑘 𝑉𝑛𝑔 ≤𝑉𝑘,𝑛𝑔 ≤𝑉𝑛𝑔 ∀𝑘∈𝑡, 𝜒∈ {𝑎𝑛, 𝑏𝑛, 𝑐 𝑛}, 𝑉′ 𝑘≤𝑉𝑘, 𝜒 ≤𝑉′ 𝑘𝜒 ∈ {𝑎𝑏, 𝑏𝑐 , 𝑐 𝑎} (5) where the underscore and overscore symbols indicate the lower and upper limits, respectively. The use of primes serves to identify that the limits are phase-to-phase voltage. •On the generation buses, all the phase voltages and currents are constrained within the corresponding technical limits, whereas the active power is limited by the available power of the primary resource, 𝑃𝑝𝑟𝑖𝑚: 𝑉𝑘≤𝑉𝑘,𝜒 𝑛≤𝑉𝑘, 𝑉𝑛𝑔 ≤𝑉𝑘,𝑛𝑔 ≤𝑉𝑛𝑔,∀ℎ∈𝑔, 𝜒∈ {𝑎, 𝑏, 𝑐} 𝐼ℎ,𝜒 ≤𝐼ℎ, 𝐼ℎ,𝑛 ≤𝐼𝑛, ∑ 𝜒 𝑃ℎ,𝜒 ≤𝑃ℎ,𝑝𝑟𝑖𝑚, (6) The set of constraints (5)–(6) is linear and can therefore be written compactly as3: 𝐛−𝐀𝐲 ≥𝟎,(7) where 𝐛contains the limit values of the variables, whereas 𝐀contains the linear operations between variables. 3Consider one variable with upper and lower bounds as follows: 𝑥𝑙 𝑜𝑤 1≤ 𝑥1≤𝑥𝑢𝑝 1. This can be rewritten in two expressions 𝑥1≤𝑥𝑢𝑝 1and −𝑥1≤−𝑥𝑙 𝑜𝑤 1. Finally, the aforementioned constraints can be expressed in matrix form as: [1 −1]⊤𝑥1≤[𝑥𝑢𝑝 1−𝑥𝑙 𝑜𝑤 1]⊤. The objective function representing the voltage regulation and reactive power sharing problem can be formulated as follows: 𝜙(𝐲) =∑ 𝑘∈𝑡 𝛽𝑘∑ 𝜒∈{𝑎𝑛,𝑏𝑛,𝑐 𝑛} 𝜒∈{𝑎𝑏,𝑏𝑐 ,𝑐 𝑎} ((𝑉𝑘,𝜒 −𝑉⋆ 𝑘)2+ (𝑉𝑘,𝑛𝑔 −𝑉⋆ 𝑘,𝑛𝑔)2+ (𝑉𝑘, 𝜒 −𝑉′⋆ 𝑘)2) +∑ ℎ,𝑗∈𝑔 𝛾ℎ,𝑗 ∑ 𝜒∈{𝑎,𝑏,𝑐} (𝑄ℎ,𝜒 −𝑄𝑗 ,𝜒 )2, (8) where 𝛽𝑘and 𝛾ℎ,𝑗 are weighting variables to determine the relative importance of each factor. Eq. (8) can be stated in a more compact manner as: 𝜙(𝐲) = (𝐲−𝐲⋆)⊤𝐐(𝐲−𝐲⋆),(9) where 𝐐aggregates all weights. Finally, the optimisation problem can be formulated by combining the sets of Eqs. (4),(7) and (9) as follows: min 𝐮𝜙(𝐲), 𝑠.𝑡. 𝐛−𝐀𝐲 ≥𝟎,(10) 𝐲−𝐡(𝐮,𝐰) =𝟎. In order to address (10) in real time, this paper proposes the implementation of a closed-loop OFO scheme. This approach offers multiple advantages at both the computational and data-privacy levels, as previously discussed in Section 1. In particular, it is proposed to use the algorithm presented in [52]. In this scheme, the control actions (𝐮) are updated following the gradient descent direction [55]: 𝐮+=𝐮+𝛼 𝝈(𝐲),(11) where superscript +indicates the updated value for the next iteration, 𝛼is a non-negative fixed step-size, and  𝝈(𝐲)is the direction vector calculated as follows:  𝝈(𝐲) ∶= ar g min 𝐰‖𝐰+𝐇⊤∇𝜙(𝐲)⊤‖2 2 𝑠.𝑡. 𝐛−𝐀(𝐲+𝛼𝐇𝐰)≥𝟎,(12) where 𝐇corresponds to the sensitivity matrix that relates control actions, 𝐮, and measurements, 𝐲, around an operational point. Consequently,  𝝈can be defined as the projection of the control actions that minimise the objective function onto the feasible region of the control actions. It should be noted that this formulation does not require any knowledge of the network topology or its parameters, which makes the algorithm highly robust. Furthermore, it is not necessary to have knowledge of the internal control models of the VSCs involved in the regulation to properly operate the proposed control strategy. Thus, internal layers can be maintained as black-box models, thereby ensuring the protection of the industrial property of the corresponding manufacturers. Additionally, it is also important to note that there is no need for demand measurements or predictions due to the algorithm’s ability to adapt to MG dynamic changes. Finally, it should be noted that this paper is based on the assumption that the sensitivity matrix 𝐇is known or can be determined experimentally [56]. 4. Performance assessment This section presents the results of numerical simulations to evidence the dynamic performance of the proposed control architecture on two different MGs. The fisrt system is a4-bus setup comprising two grid-forming IBRs supplying symmetrical and asymmetrical loads. This simple system is employed to analyse the fundamental attributes of the controller. Simulations are then performed on one MG based on the topology of the CIGRE European LV benchmark distribution network [57], demonstrating the effectiveness of the control scheme International Journal of Electrical Power and Energy Systems 165 (2025) 110443 5 J.C. Olives-Camps et al. Fig. 3. One-line diagram of the simple test case. in a larger system. In order to evaluate the voltage imbalance on the 𝑗th bus, this study uses the following indicator from [58]: 𝜓𝑉𝑗= 100 max 𝜒∈{𝑎𝑛,𝑏𝑛,𝑐 𝑛}(|𝑉𝑗 ,𝜒 −𝑉𝑗 ,𝑎𝑣𝑔| 𝑉𝑗 ,𝑎𝑣𝑔 ), where 𝑉𝑎𝑣𝑔 is the average of the RMS phase-to-neutral voltages. A similar indicator is proposed for measuring the reactive power sharing per phase: 𝜓𝑄𝜒= 100 max ℎ∈𝑔(|𝑄ℎ,𝜒 −𝑄𝑎𝑣𝑔 ,𝜒 | 𝑄𝑎𝑣𝑔 ,𝜒 )∀𝜒∈ {𝑎, 𝑏, 𝑐}. A notable distinction is that the reactive power sharing indicator assesses the discrepancy in the amount of reactive power injected by each IBR into a phase, rather than the imbalance between phases. In both case studies, the sensitivity matrix 𝐇is calculated using a perturb-and-observe approach [48, Appendix B]. This requires coordination between the grid-forming IBRs. In this work, it is assumed that the coordination is done through a token that can only be held by one device at a time. The process is as follows: 1. The central controller requests the value of the control actions of each grid-forming VSC and the value of the measurements of interest, thus establishing a base case: 𝐮0,𝐲0. 2. The central controller gives the token to the 𝑘th IBR, which performs a perturbation on its control action: 𝛥𝑢𝑘 3. The central controller records the variation of the control action, the effect on the measurements of interest and determines the increments with respect to the base case: 𝛥𝑢𝑘,𝛥𝐲=𝐲−𝐲0. The relationship between output j and input k determines the 𝑘, 𝑗-th value of the 𝐇-matrix: 𝐻𝑗 ,𝑘 =𝛥𝑦𝑗 𝛥𝑢𝑘 This procedure ends when all grid-forming IBRs in the network have received the token. In the event of a new grid-forming device being connected to the system, the secondary layer must be informed so that its contribution to frequency and voltage regulation can be considered. The sensitivity determination process must then be repeated in order to quantify the updated matrix values. This approach ensures that no parameters are set manually, thereby minimising human intervention in the process. 4.1. Illustrative example: simple test case The system comprises two grid-forming IBRs that feed the two ends of a low-voltage four-wire feeder. For simplicity and without loss of generality, it is assumed that both IBRs have identical rated power with reference voltages equal to the MG rated voltage. There are two buses located along the feeder. A three-phase symmetrical load is connected to one of them, while a single-phase load between the phase 𝑎and the neutral wire is connected to the other. Fig. 3shows the one-line diagram of the described system, and Table 1provides a summary of the main MG parameters. The cables that comprise the feeder correspond to the UG3/3-ph cables with the impedance matrix detailed in [57]. It is important to highlight that the physical geometry of the overhead lines gives rise to disparate inductive effects between all phases. Moreover, the longest feeder section is the one between the loads, which presents a significant challenge if power sharing between grid-forming IBRs is pursued. Table 1 Parameters of the simple test case. Parameter Value Rated ph-to-ph voltage (RMS) 400 V Length of line 1–250 m Length of line 2–380 m Length of line 3–450 m Power load 𝑆212 +𝚥7kVA/phase Power load 𝑆320 +𝚥7kVA/phase The balanced version of the control algorithm was the subject of a previous analysis in [49]. In particular, that work covered the AGC performance, the convergence of the OFO to a model-based OPF and its parametrisation. Therefore, the aim of the next subsections is to discuss all the specific differential factors of the presented methodology with respect to the previous balance version. 4.1.1. Degree of imbalance and comparison with the OPF with complete information In this initial test, the efficacy of the algorithm in regulating the voltage of a target bus while maintaining the reactive power sharing per phase of the IBRs is evaluated. The primary objective is to demonstrate the capacity of the algorithm to adapt and control target buses with different degrees of imbalance in power consumption. The benchmark system is initiated in a steady state, with no frequency deviation, the phase EMFs of both IBRs are equal to 1 pu, and the centralised OFO algorithm is disabled. At this operating point, the complex voltages 𝑎𝑛, 𝑏𝑛, 𝑐 𝑛and 𝑛𝑔 on the load buses are: 𝑉2=[210.7∠-5.9◦234.9∠-123.2◦225.3∠119.6◦9.5∠34.7◦]⊤𝑉 , 𝑉3=[211.3∠-6.1◦231.6∠-123.5◦220.8∠119.4◦8.6∠45.1◦]⊤𝑉 , whereas the IBR phase reactive powers are: 𝑄1=[7.24 2.17 1.87]⊤kvar, 𝑄4=[8.23 4.76 4.50]⊤kvar. At the time instant 𝑡= 5s, the centralised OFO-based voltage regulation algorithm is enabled with the following parameters: 𝛼= 1.2 × 10−4,𝛽ℎ= 400,𝛾ℎ,𝑗 = 100,∀ℎ, 𝑗∈𝑔. The target voltage modules are set to 230 V for phase-to-neutral, 400 V for phase-to-phase and 0 V for neutral-to-ground. Note that the communication period of the secondary layer is one second. The target bus, i.e. the MG bus where the voltage imbalance is controlled, is the bus 2 from 𝑡= 5s to 𝑡= 60 s and bus 3 from this instant until the end of the simulation. Note that this target bus change causes a small transient in the active power, attributable to the resistance of the cables. However, this effect is considered negligible for the AGC. Therefore, the results of this test focus on the regulation capabilities of the centralised OFO algorithm. Fig. 4(a) illustrates the phase-to-neutral voltage evolution of both buses (solid line) and the comparison with the same model-based OPF result (dotted line). When bus 2 is target bus, the OFO-based algorithm brings the system to an operating point characterised by the following conditions: 𝑉2=[230.6∠-4.8◦232.8∠-123.5◦229.8∠119.0◦7.6∠33.1◦]⊤𝑉 , 𝑉3=[231.4∠-5.0◦229.1∠-122.8◦225.4∠119.1◦6.5∠47.3◦]⊤𝑉 , 𝑄1=[7.44 3.51 3.31]⊤kvar, 𝑄4=[7.60 3.43 3.24]⊤kvar. Likewise, the load voltages and the IBR reactive powers when the target bus is the bus 3 are the following: 𝑉2=[230.1∠-4.9◦236.2∠-123.4◦233.9∠119.4◦7.8∠33.1◦]⊤𝑉 , 𝑉3=[230.9∠-5.0◦232.7∠-122.8◦229.6∠119.2◦6.8∠46.5◦]⊤𝑉 , 𝑄1=[7.49 3.53 3.25]⊤kvar, 𝑄4=[7.58 3.41 3.28]⊤kvar. Fig. 4(b) illustrates the evolution of the control actions computed by this layer. The transition to the optimum is smooth, thereby avoiding severe transients. Finally, Table 2collects the indicators’ values at the International Journal of Electrical Power and Energy Systems 165 (2025) 110443 6 J.C. Olives-Camps et al. Fig. 4. Simple test case: simulation results comparing the proposed controller (solid lines) with classical OPF (dotted lines). Colours identify the phases 𝑎(red), 𝑏(green), and 𝑐 (blue). Table 2 Value of indicators for simple test: effect of target bus. 𝑉2,𝑎𝑣𝑔 [V] 𝜓𝑉 ,2[%] 𝑉3,𝑎𝑣𝑔 [V] 𝜓𝑉 ,3[%] 𝜓𝑄,𝑎[%] 𝜓𝑄,𝑏[%] 𝜓𝑄,𝑐 [%] ic 223.64 5.78 221.23 4.68 6.42 37.34 41.3 𝑏𝑡=2 231.06 0.73 228.66 1.42 1.00 1.18 0.94 𝑏𝑡=3 233.41 1.41 231.05 0.69 0.60 1.79 0.52 three steady state instants indicated as: ic (initial conditions), 𝑏𝑡= 2 (bus 2is targeted), and 𝑏𝑡= 3(bus 3is targeted). The results indicate that the average voltage of the target bus tends towards its nominal value and that the voltage unbalance is considerably reduced, irrespective of the imbalance of the load connected to the target bus and the asymmetrical impedances of the cables. Furthermore, improving the voltage quality on the target bus yields benefits for the other bus as well. The per-phase reactive power sharing between the grid-forming IBRs is enhanced simultaneously since the reactive power indicators are significantly reduced. Finally, it is noteworthy that the system is driven to an optimal operating point, thereby achieving the same result as the classical OPF. Note that the classical OPF is evaluated offline and requires an accurate model (including topology and impedance values) of the distribution network and a forecast of perturbations (loads and non-controlled generators). On the contrary, the OFO-based algorithm is run online with real-time measurements and the knowledge of the matrix 𝐇identified by the perturbation-and-observe methodology. 4.1.2. Performance with constrained variables The objective of this test is to analyse the performance of the OFObased algorithm when an operational limit is reached. To facilitate the comparison of the results, two time-domain simulations are conducted: one in which the operating limits are relaxed (to prevent them from being reached) and one in which the operating limits are tightened. In particular, it is required that the phase currents injected by the gridforming IBR of bus 1 in steady state do not exceed a value of 0.6 pu. Hence, this constraint is incorporated into the secondary control layer, but not into the primary layers or the basic control of the VSC, thus allowing for transient exceedance of this value. The system initiates in steady-state, with the aforementioned initial conditions. Once again, there is no deviation in frequency, and the phase EMF of both IBRs are equal to 1 pu. The OFO-based centralised controller is activated at 𝑡= 5s with bus 2 as target bus, and the following parameters: 𝛼= 1.2 × 10−4,𝛽ℎ= 400,𝛾ℎ,𝑗 = 100,∀ℎ, 𝑗∈𝑔. The voltage references for the target buses are the same as in the test presented in 4.1.1. Table 3 Value of indicators for simple test: constrained variables. 𝑉2,𝑎𝑣𝑔 [V] 𝜓𝑉 ,2[%] 𝜓𝑄,𝑎[%] 𝜓𝑄,𝑏[%] 𝜓𝑄,𝑐 [%] Relaxed 231.25 2.31 1.40 2.31 1.91 Constrained 233.62 3.33 24.92 28.47 53.08 Once the controller is enabled, at 𝑡= 5s the system converges to a point that does not reach the limit. At 𝑡= 60 s, there is an increase in the power consumed in the single-phase load connected to bus 2, reaching 𝑆2,𝑎 = 24 +𝚥11 kVA. Fig. 5illustrates the behaviour of the injected currents in each scenario. Each phase is represented in a subplot. The solid lines represent the strongly constrained case, while the fuzzy lines correspond to the relaxed case. The red colour is used to identify the grid-forming IBR injections to bus 1, and the blue colour is used to identify the grid-forming IBR injections to bus 4. As illustrated in Fig. 5, in the relaxed case, the steady-state current of phase 𝑎of the IBR on bus 1 is observed to reach a value of 0.7 pu. Therefore, to reduce the current injected into phase 𝑎when the constraint is applied, it is necessary for the IBR of bus 4 to increase its contribution in phase 𝑎and alter the currents of the other phases. This has an effect on both the voltage and the reactive power. Upon the occurrence of the load change, a transient overcurrent (with respect to 0.6 pu) is observed for the IBR on bus 1. It is noteworthy that the controller is able to return the operating point to a feasible region within a single iteration. The indicators evaluated in the final state of this test, presented in Table 3, demonstrate the consequences of this alteration, which greatly affects the reactive power sharing. This fact is consistent with the weightings specified in the algorithm. 4.2. Large case study: CIGRE benchmark network The network used to test the algorithm on a realistic scale system is that presented in the CIGRE European LV benchmark distribution network [57], with certain modifications. The network preserves the topology of the previous work [49]. It is a radial network comprising International Journal of Electrical Power and Energy Systems 165 (2025) 110443 7 J.C. Olives-Camps et al. Fig. 5. Simple test case. Evolution of the RMS value of injected currents by the grid-forming IBRs in both constrained and unconstrained scenarios (constraints:  𝐼𝑠,1,𝑎𝑏𝑐 = 0.6p.u.). Fig. 6. MG one-line diagram based on the CIGRE European LV benchmark distribution network [57] including the considered grid-forming IBRs. 41 buses and 8grid-forming IBRs distributed across 3feeders (residential, industrial, and commercial), as depicted in Fig. 6. It should be noted that the MG operates islanded from the main grid. A 24-hour simulation is conducted to evaluate the potential impact that the proposed OFO-based control algorithm may have on a large time and spatial scale. The proposed daily load curves, as proposed in [57, Section 7], have been used with updates every 15 min. Initially, a random distribution of the total rated bus load is made between the three phases and then it evolves following the aforementioned daily load curves. The control actions updates computed by the secondary layer are communicated every one second. The OFO controller parameters are the following: 𝛼= 5 × 10−7,𝛽ℎ= 5 × 104,𝛾ℎ,𝑗 = 102and the target buses are R16 and C07. With this choice, one target bus is located at one end of the feeder, while the other target bus is located at an intermediate point. Therefore, two locations with different characteristics are assessed at the same time. Finally, note that this parametrisation of the secondary controller prioritises the voltage power quality with respect to the reactive power sharing of the IBRs. The objective of this study is to evaluate the OFO capabilities in coordinating grid-forming IBRs in unbalanced networks. Figs. 7 and 8presents the results obtained for the voltage indicators in the target buses and the reactive power sharing results, respectively. The statistical data on the left side of Fig. 7represent the average voltage of the target buses, measured during the 24-hour test, with the OFO controller (blue) and without it (red). The value of the voltage unbalance indicator, computed on the same buses, is presented on the right side of Fig. 7. Whereas, Fig. 8provides a statistical representation of the 4-indicator calculated for each phase of the existing IBRs considering all the 24-hour simulation. It is well-known that the objectives of controlling voltage and regulating reactive power are inherently contradictory. Note that voltagerelated objectives have been defined with greater weight in the OFO parameters, given that in the absence of a regulator, undervoltage and unbalance conditions above the permitted threshold are observed. Consequently, to maintain a high-quality voltage at the target buses, the reactive power sharing deteriorates in some phases when compared to the base case where the OFO is not implemented. However, thanks to the mathematical optimisation framework, it is guaranteed that the reactive power deviation between phases is the minimum required to improve the voltage. The reactive power injection requirements are modified depending on the location of the IBRs. Particularly, those IBRs located at the end of the feeder tend to inject more reactive power than those located near the secondary substation. As previously identified in [49], there is a period of time during the day when the reactive power exchange between the feeders is not feasible due to voltage limitations, resulting in the sacrifice of the reactive power sharing capability of the IBRs. Despite the slight deterioration in reactive power sharing, it should be noted that this does not cause overloads on any IBR. Furthermore, the benefits in voltage quality for the target buses are evident. It should be noted that the OFO controller is capable of raising the average voltages to their nominal value of 230 V and maintaining a low level of imbalance between the phase voltages as shown in Fig. 7. Of particular interest is the case of bus R16, where the OFO controller successfully avoids the 3% voltage unbalance specified in some standards for weak grids [59]. 5. Conclusion This paper has presented a control scheme for the coordination of grid-forming IBRs within an AC MG, taking into account the effects of unbalanced consumption and asymmetric circuits. The methodology is founded upon a hierarchical two-layer control architecture. The primary control layer is implemented locally on each grid-forming IBR and serves to emulate the performance of a synchronous generator, offering active power sharing and frequency and voltage support. The setpoints of each grid-forming IBR are calculated by the secondary control layer, International Journal of Electrical Power and Energy Systems 165 (2025) 110443 8 J.C. Olives-Camps et al. Fig. 7. Voltage indicators obtained from 24-hour CIGRE benchmark network test. Fig. 8. Reactive power indicator obtained from 24-hour CIGRE benchmark network test. which is based on two independent stages. Firstly, a conventional AGC is responsible for determining the active power setpoints required to regulate the frequency of the grid. Secondly, an OFO-based controller is employed to regulate the phase voltages of the buses and the reactive power sharing between the controllable IBRs in an optimal manner. The proposed control scheme offers numerous advantages to MGs dominated by power electronics: 1. The system exploits the rapid response of the VSCs, with algorithms requiring minimal computational resources and no extensive communication channels, thus enabling quick updates to the setpoints. 2. It is not a prerequisite to possess an accurate network model, which is advantageous in the context of MGs, where the precise configuration is often unknown. 3. The system is designed to reach an optimal operating point by updating control actions based on system measurements rather than consumption forecasts. The feedback nature of the secondary layer algorithms ensures a high robustness of the system to uncertainty, as the system is able to adapt to changing conditions. 4. An optimisation problem formulation for unbalanced voltage regulation based on phase-to-neutral and phase-to-phase voltage measurements circumvents the necessity to determine the angle of each phase, and furthermore, eliminates the requirement for synchronous measurements. 5. The primary control layer, which is responsible for maintaining a stable MG operation, has been developed in a decentralised fashion. Consequently, in the event of a communication failure, the grid-forming IBRs would be capable of maintaining the MG powered, thus ensuring the continued stability of the system. 6. It does not require knowledge of the internal control layers of the VSCs, which ensures that the manufacturers’ industrial property is maintained. In order to demonstrate the efficacy and adaptability of the proposed control architecture, the paper has presented two test cases. The results demonstrate that the control scheme is capable of maintaining the target bus voltage at a near-nominal value with minimal unbalance. Additionally, the solution exhibits an appropriate reactive power sharing between the grid-forming IBRs. The authors identify a prospective avenue for further research in developing a distributed communication scheme for the controller, which would enhance the controller communication fault tolerance and scalability. CRediT authorship contribution statement J. Carlos Olives-Camps: Writing – original draft, Software, Methodology, Investigation, Formal analysis, Conceptualization. Álvaro Rodríguez del Nozal: Software, Formal analysis, Conceptualization. Juan Manuel Mauricio: Writing – review & editing, Supervision, Software, Methodology, Formal analysis, Conceptualization. José María MazaOrtega: Writing – review & editing, Methodology, Conceptualization. International Journal of Electrical Power and Energy Systems 165 (2025) 110443 9