Artículos
Power aggregator in active distribution networks using IoT
Agregador de potencia en redes de distribución activas usando IoT
Power aggregator in active distribution networks using IoT
Revista UIS ingenierías, vol. 22, no. 4, pp. 71-80, 2023
Universidad Industrial de Santander
Received: 12 July 2023
Accepted: 03 October 2023
Published: 23 October 2023
Abstract: This paper presents an Internet of Things (IoT) architecture for a power aggregator of energy resources in active distribution networks. Two types of algorithms are evaluated and compared: centralized and decentralized control. The former is based on real-time estimation of the demand and subsequent optimization. The latter is based on the Alternating Direction Method of Multipliers (ADMM). Both algorithms were evaluated on an IoT platform consisting of agents implemented on a series of small single-board computers based on Raspberry Pi technology, connected to a centralized computer that emulates the grid. This platform allows realistic evaluation of the algorithms, considering the effects of communication. The main grid considers power losses and the dynamics of inverter-based renewable resources using quasi-dynamic simulation. This type of simulation can be considered real-time for this application. The platform is demonstrated to be flexible and provides a real view of the practical problems that aggregators may face when implementing them in a power distribution network.
Keywords: Active distribution networks, power aggregation, economic dispatch, alternating direction method of multipliers, quasi-dynamic simulation, internet of the things.
Resumen: Este documento presenta una arquitectura de Internet de las cosas (IoT por sus siglas en inglés) para la agregación de recursos energéticos en redes de distribución activas. Se evalúan y comparan dos tipos de algoritmos, a saber, control centralizado y descentralizado. El primero se basa en una estimación en tiempo real de la demanda y su posterior optimización. El segundo, se basa en el método de multiplicadores de dirección alterna (ADMM). Ambos algoritmos fueron evaluados en una plataforma IoT conformada por agentes implementados en una serie de pequeñas computadoras monoplaca basadas en la tecnología Raspberry Pi, conectadas a una computadora centralizada que emula la red. Esta plataforma permite evaluar de forma realista los algoritmos considerando el efecto de las comunicaciones. La red principal considera las pérdidas de energía y la dinámica de los recursos renovables basados en inversores mediante una simulación cuasi-dinámica. Este tipo de simulación puede considerarse tiempo real para esta aplicación.
Palabras clave: Redes de distribución activa, agregación de potencia, despacho económico, método de multiplicadores de dirección alternada, simulación cuasi-dinámica, internet de las cosas.
1. Introduction
1.1. Motivation
Recently, the transformation of conventional distribution networks into active distribution networks (ADNs) has gained significant attention. These advanced networks integrate renewable energy resources, storage devices, and demand-side controls, enabling a more sustainable and efficient energy ecosystem. However, this evolution necessitates the inclusion of a novel component known as an aggregator, responsible for managing the energy exchange between distributed energy sources and the main system. Functioning as a counterpart to the national dispatch center in power transmission systems, the aggregator operates in real-time with minimal human intervention, posing theoretical and practical challenges.
From a theoretical standpoint, the development of realtime algorithms with fast convergence becomes imperative. These algorithms may adopt either a centralized or decentralized approach, but they should be perceived as control mechanisms rather than simple optimization problems. Therefore, it becomes crucial to consider the practical dynamics of the grid and communication infrastructure as integral components of the aggregator's design.
Consequently, the evaluation of the communication infrastructure's effectiveness and the impact of phenomena such as latency in an aggregator design becomes necessary. The emergence of the Internet of Things (IoT) is a viable solution, both from an academic and practical perspective. An IoT architecture may replicate realistic optimization and communication challenges encountered by aggregators in active distribution systems. Thus, it becomes essential to assess optimization methods for aggregators using a realistic platform that emulates communication-related phenomena.
1.2. State of the art
Despite significant research on an effective manner to develop an aggregator in active distribution networks, a unifying framework remains under debate. In [1] a Stackelberg game was proposed to model the economic interaction between distributed energy resources and the aggregator with the aim of maximizing profits. In that work, the model was formalized mathematically, considering uncertainty in the generation capacity. However, it was not evaluated practically.
Current regulation in most of the countries, including Colombia, does not allow peer-to-peer contracts among users [2]. However, the concept is being increasingly studied in the scientific literature. For example, in [3] the aggregator was studied with the concept of prosumer, that is a user that both consumes and produces energy [4]. The economic benefits of this type of approach have been extensively studied [5]. However, its practical evaluation is still under study.
Most of the experimental implementations of aggregators are based on the hardware-in-the-loop and power hardware-in-the-loop technology [6], which allow a detailed modeling of the power network with high detail in the power network and the power electronic converters [7]. However, the communication infrastructure is not considered at full capacity.
On the other hand, the emulation of energy aggregation does not necessitate a high-speed simulation akin to hardware-in-the-loop setups [8]. In this type of study, a quasi-dynamic simulation is deemed more than sufficient for the intended purposes. A quasi-dynamic simulation operates in the order of the seconds or even the minutes, allowing the use of a phasor representation [9]. This time discretization is real-time from the point of view of the aggregator and the communications systems. Notice that an aggregator is not in charge of the frequency control and hence, it does not require a fast communication system.
1.3. Contribution
This paper presents an IoT architecture based on a quasi-dynamic simulation of the power network which is executed in Matlab-Simulink, using a phasor representation. Both centralized and decentralized algorithms are considered. The centralized algorithm is based on real-time demand estimation and optimization, whereas the decentralized algorithm is based on the alternating direction method of multipliers (ADMM). Distributed resources such as photovoltaic units and energy storage divides are represented as generic inverter-based resources (IBR). Each of these IBRs is integrated into single-board computers based on the Raspberry-Pi technology, enabling the emulation of agents and facilitating M2M (Machine-to-Machine) communication. The inter-agent communication is facilitated through wireless IoT-based technology using a message queuing telemetry transport (MQTT) protocol.
It is important to emphasize that the communication system is real and not simulated. Therefore, any problem related to loss of information or latency is practically evaluated.
1.4. Outline
The rest of this paper is organized as follows: Section 2 presents the proposed aggregator architecture with some characteristics related to the market structure. Next, centralized control is shown in Section 3, followed by decentralized control in Section 4. The IoT implementation is described in Section 5. Finally, Section 6 presents the main results. Conclusions are raised in Section 7.
2. Proposed aggregator architecture
The proposed aggregator architecture is shown in Figure 1. Each IBR has a grid-following control with the ability to control active power according to the available primary resource. The main substation is the slack node, which represents the connection to the main grid (i.e., the point of common coupling PCC).

3. Centralized control
In a centralized architecture, Agent 1 placed in the point of common coupling, directly communicates with the other agents as depicted in Figure 2. Agent 1 receives information related to the maximum available power in each agent and the power measured at the point of common coupling. This agent, in turn, resolves an optimization problem, obtaining the value for the active power required to be generated by each agent. This value is sent back to the agents via IoT.

Demand is estimated using the value of power at the point of common coupling and the actual power measured in each of the agents. A low-pass filter is used to smooth the information flow. Therefore, the following equation requires to be implemented on Agent 1 for each timestep:

Where α is a positive constant.
On the other hand, active distribution networks usually operate through hierarchical control. This hierarchy consists of three layers known as primary, secondary, and tertiary controls. The economic dispatch problem is the focus of this paper, it is embedded in the tertiary control, which aims to optimize the operation of the system [10]. The optimization problem has the structure shown in Model (1), where the objective is to minimize a cost function where generally the decision variables are the generated power, subject to physical constraints, such as power balance and maximum generation capacity.

where
Pi: dispatched power
d: demand
: available power
pi : minimum power
fi (•): i-th cost function
This section addresses two main objectives of centralized control, the typical tertiary control of economic dispatch, and addresses the objective of proportional powersharing (PPS).
3.1. Economic dispatch
Economic dispatch is one of the classic problems in power system operation. This problem consists of minimizing system operation costs subject to load balance constraints, generation capacity, and primary resource dynamics as shown in (2).

Where
Ci : cost
τ: time constant of the input filter
p*i : power reference of the i-th IBR
For this case, a linear objective function is proposed. Renewable resources are integrated through converters to control the active and reactive power. In this way, this control is limited by the capacity of the converters and by the availability of the primary resource, i.e., solar irradiance and wind speed, which is reflected in the generation capacity restrictions [11].
This optimization problem can be solved as a merit order optimization, in which the IBRs with the lowest cost are dispatched first, and are dispatched to the maximum, if necessary, followed by the second-lowest-cost, and so on until the demand is satisfied. A first-order dynamics is included in the control to smooth the output power transitions.
3.2. Proportional power-sharing
Proportional power-sharing is a centralized dispatch, in which the power generation is allocated proportionally to each of the IBRs according to their available power [12]. This means that the utilization factor of each converter is equal in all converters. This improves the performance of the equipment and protects the lifetime of the equipment for an energy surplus.
As in the economic dispatch, in the PCC a central agent is needed where all the optimization calculations are developed and finally, the power to be generated is sent to each converter. The optimization model has a quadratic objective function, subject to the power balance, the maximum available power of each primary resource, and the dynamic of the primary resource; finally, considering that the utilization factor "r" must be between 0 and 1, the complete optimization model for the PCC is shown in (3).

Where:
power reference
ξ: penalty factor
ω: soft constraint
r: load factor
In this quadratic optimization problem, it is desired to minimize the squared difference between the power to be dispatched and the reference power, which is imposed by the energy management system (EMS). A penalty factor is added so that a global minimum is always ensured since this objective function is strictly convex. The model is subject to a power balance where the sum of the power generated by the IBRs must be equal to the reference power plus a variable that was created to soften this constraint. The model becomes infeasible without this variable when the reference power is greater than the generation capacity of the IBRs.
4. Decentralized control
Decentralized strategies only require local information interaction with nearest neighbors, resulting in sparse communication architecture, and thus can handle singlepoint failure well, protect privacy, reduce computational and communication costs, and may be more suitable for plug-and-play operations. Therefore, it is more desirable to design distributed algorithms to solve the tertiary control problem in microgrids [13]. The proposed distributed architecture is depicted in Figure 3.

For the distributed architecture, the objective function is the same, just the solution is made via an alternating direction method of multipliers ADMM strategy. The ADMM algorithm requires a different reformulation of the problem for which we generate a convex set, as shown in (4) [14].

Now we propose a new function, g(p) for the set Ω, obtaining (5).

The model presented in (2) can be equivalently rewritten as shown in (6).

Now, the augmented Lagrangian function shown in (7) must be defined.

The iteration of the proximal method for a convex and differentiable function is as shown in (8).

By definition, the proximal operator proXf: Rn→ R with penalty factor p ≥ 0 is given in (9) [15].

A proximal operator is suggested as given in (10).

Finally, the power to be dispatched from each IBR is given by (11).

In this way, the optimization algorithm for the economic dispatch is decentralized, avoiding having a central computer that performs all the calculations and sends data to all the agents. There is no central agent that knows all the data. Each agent performs independent calculations with its data and data from nearby neighbors, so the agents that are higher up do not have to know all the data. This architecture improves security, providing greater protection to cyberattacks.
5. IoT implementation
Communications plays an important role in active distribution networks. The exchange of information is becoming indispensable in this type of grid, given the presence of smart meters, distributed generation, and real-time system monitoring [16]. Currently, IoT-based solutions are present within the framework of smart grids. One of the utilities of the IoT is given by the smart meters that allow to establishment of a data flow between the energy company and the users. One of the main advantages of IoT platforms is their rapid development and evolution into open-source platforms, which gives vendors independence and provides them with the facility to develop plug-and-play systems [17].
The growing integration of the IoT in active components in power distribution networks has prompted a demand for investigating the implications of IoT communications on control and power management systems. The widespread implementation of IoT devices within these networks has resulted in heightened interconnectedness and the generation of real-time data, consequently introducing novel challenges, including the influence of latency on current management systems. For this reason, in this article, a quasi-dynamic simulation system has been developed to assess the impact of communications on various control techniques discussed in the preceding sections. Figure 4 shows the implementation of the proposed architecture using a configuration of Raspberry Pi and a centralized computer.

The following steps were considered for the implementation of the set-up:
In Simulink, the network to be simulated was set up, including the converters and components corresponding to the physical network. The system was executed in real-time using the Real-Time libraries available in the Simulink functionalities.
Simulink calls a Matlab function, which is responsible for the link between Simulink and a Python algorithm. This function allows performing the two main actions of IoT-based communications, which are Subscribe (read) and Publish (write) on a topic, under the MQTT protocol. This type of implementation allows the use of free brokers and previous developments made in Python.
Each Raspberry Pi plays the role of aggregator, and an algorithm is implemented that executes the subscribe-and-publish tasks in parallel. This algorithm receives the power data available in each of the converters and processes an optimization algorithm. Then, it publishes the optimal reference powers to which they must be taken, that is, it sends the information to Simulink to be executed. This process is repeated on each of the Raspberry Pi's and has the ability to function in a plug-and-play manner, given its ease of implementation and a few algorithm modifications that must be made to add a new aggregator.
Following the steps described above, it was possible to implement a quasi-dynamic simulation system that allows us to see the effects of communications on control systems that are applied to ADN.
6. Experimental results
The simulated network was based on the CIGRE test system for low-voltage networks, which is presented in reference [18]. Figure 5 depicts the basic structure of this network, including four inverters-based renewable resources that participate in the proposed control. This network includes several loads and distributed generators. However, only four IBRs participate actively in the aggregation control. The other components are included in the quasi-dynamic simulation but are not visible for the control.

Normally, studies of optimization models and communications are done, but both the hardware and the communications part, are simulated [19]. In this case, the proposed dispatch algorithms were evaluated and implemented practically using Raspberry Pi. This approach allows the demonstration of the behavior of these with communications, performing a real-time simulation, having the hardware in Matlab Simulink, and real communications through the Raspberry devices. All results reported in this paper were obtained by executing the system on a laptop computer with a processor Intel Core i7 12650Hz with 16GB of RAM that emulates the grid in Matlab/Simulink with the real-time library. The control was implemented in Python using a Raspberry Pi Model B-4GB of RAM with a 64-bit quad-core cortex A72 processor.
The first case evaluated is the economic dispatch given by Model (2). There are 4 IBRs and a central computer where the dispatch algorithm is executed. Each of these has a maximum power that can generate 50 kW, 30 kW, 25 kW, and 15 kW, respectively. A profile of available power in each IBR was made, to bring the simulation a little closer to reality; primary resources are different at each instant of time, hence, every 600 seconds, there is a change in the available power of each agent. Each of these generators has an associated cost of 310 $/kW, 314 $/kW, 315 $/kW, and 320 $/kW, respectively, and for the slack node 350 $/kW. Finally, to evaluate different dispatch cases, load changes are performed in 400 s, 8000 s, 1300 s, 1500 s, and 2000 s.
The results of this test are shown in Figure 6, where it is evident that the IBRs are dispatched in order of cost and always supply the demand, considering their available power.

The second case evaluated is the power-sharing given in (3). In this case, there are also 4 IBRs, and the same scenario as in the previous case with the same available power in each instant. The proposed controls were validated using a quasi-dynamic simulation and an IoT-based communications architecture. Available powers and changes of load and available powers at the same times are already mentioned. Figure 7 shows the results of this test. The capacity factor of all IBRs achieves the same value.

Figure 8 shows the behavior of the ADMM algorithm with and without communication. In both cases, it is observed that the algorithm manages to converge and deliver the necessary values of power to supply the demand, in addition to being fulfilled according to the costs established in each IBR. The difference, considering the communications, is that the algorithm takes a little longer to converge, in addition to the fact that a small ripple is noticed due to the demand estimation and the sensitivity of the model.

7. Conclusions
The problem of aggregation algorithms for active distribution networks was studied, considering multiple objectives. A centralized economic dispatch algorithm, a proportional power-sharing algorithm, and a projection-based decentralized algorithm (ADMM) were designed. The proposed controls have been validated using a quasi-dynamic simulation and an IoT-based communications architecture.
Centralized control has been shown to reach its target in times on the order of seconds. In addition, decentralized control is effective despite being slower than centralized control.
It can be significantly evidenced how the algorithms are affected by communications, which were implemented in a real way, bringing with them all the issues that occur in these such as latency and packet loss, showing the importance of the test system performed.
The proposed platform was demonstrated to be useful in evaluating the behavior and communication issues associated with an aggregator for ADN. In future works, other distributed algorithms will be considered and tested on the test system, thus studying the effects of communications on them.
Power aggregator in active distribution networks using IoT
References
K. Alshehri, M. Ndrio, S. Bose, T. Basar, "Quantifying Market Efficiency Impacts of Aggregated Distributed Energy Resources," in IEEE Transactions on Power Systems, vol. 35, no. 5, pp. 4067-4077, Sept. 2020, doi: https://doi.org/10.1109/TPWRS.2020.2979997
Cigre Colombia C4 working group. "Control en Microrredes de A.C: Control Jerárquico, Tecnologías y Normativa" in CIGRE, available online: http://www.cigrecolombia.org/Documents/Documentos-t%c3%a9cnicos/DT-6.2-Control
T. Morstyn, A. Teytelboym, M. D. Mcculloch, "Bilateral Contract Networks for Peer-to-Peer Energy Trading," in IEEE Transactions on Smart Grid, vol. 10, no. 2, pp. 2026-2035, March 2019, doi: https://doi.org/10.1109/TSG.2017.2786668
N. Patrizi, S. K. Latouf, E. E. Tsiropoulou, S. Papavassiliou, "Prosumer-Centric Self-Sustained Smart Grid Systems", in IEEE Systems Journal, vol. 16, no. 4, pp. 6042-6053, Dec. 2022, doi: https://doi.org/10.1109/JSYST.2022.3156877
G. E. Asimakopoulou, N. D. Hatziargyriou, "Evaluation of Economic Benefits of DER Aggregation," in IEEE Transactions on Sustainable Energy, vol. 9, no. 2, pp. 499-510, April 2018, doi: https://doi.org/10.1109/TSTE.2017.2743349
C. S. Edrington, M. Steurer, J. Langston, T. El- Mezyani, K. Schoder, "Role of Power Hardware in the Loop in Modeling and Simulation for Experimentation in Power and Energy Systems," in Proceedings of the IEEE, vol. 103, no. 12, pp. 2401-2409, Dec. 2015, doi: https://doi.org/10.1109/JPROC.2015.2460676
Z. R. Ivanovic, E. M. Adzic, M. S. Vekic, S. U. Grabic, N. L. Celanovic, V. A. Katic, "HIL Evaluation of Power Flow Control Strategies for Energy Storage Connected to Smart Grid Under Unbalanced Conditions," in IEEE Transactions on Power Electronics, vol. 27, no. 11, pp. 4699-4710, Nov. 2012, doi: https://doi.org/10.1109/TPEL.2012.2184772
A. B. C. De Farias, R. S. Rodrigues, A. Murilo, R. V. Lopes, S. Avila, "Low-Cost Hardware-in-the-Loop Platform for Embedded Control Strategies Simulation," in IEEE Access, vol. 7, pp. 111499-111512, 2019, doi: https://doi.org/10.1109/ACCESS.2019.2934420
A. Garcés-Ruiz, "Power Flow in Unbalanced Three-Phase Power Distribution Networks Using Matlab: Theory, analysis, and quasi-dynamic Simulation", Ingenieria., vol. 27, no. 3, p. e19252, 2022.
L. Catro, M. Bravo, A. Ríos, C. García, Garcés, M. Bueno, J. J. Mora, et al, "Control jerárquico en micro-redes AC" Colección trabajos de investigación. Editorial UTP. ISBN 978-958-722-553-2.
D. A. Ramirez, A. Garcés, J. J. Mora, "A Convex Approximation for the Tertiary Control of Unbalanced Microgrids", in Electric Power Systems Research, vol. 199, no. 107423, 2021, doi: https://doi.org/10.1016/j.epsr.2021.107423
Berry, R.A, "On Proportional Power Sharing Mechanisms for Secondary Spectrum Markets", in Northwestern University, Dept. of EECS.
G. Chen, Q. Yang, "An ADMM-Based Distributed Algorithm for Economic Dispatch in Islanded Microgrids", in IEEE Transactions On Industrial Informatics, vol. 14, September, 2018.
G. Stomberg, A. Engelmann, T. Faulwasser, "A compendium of optimization algorithms for distributed linear-quadratic MPC," at - Automatisierungstechnik, vol. 70, no. 4, 2022, pp. 317-330. https://doi.org/10.1515/auto-2021-0112
A. Garcés, "Optimización convexa: Aplicaciones en operación y dinámica de sistemas de potencia," Colección textos académicos. Editorial UTP. ISBN 978958-722-466-5.
F. E. Abrahamsen, Y. Ai, M. Cheffena, "Communication Technologies for Smart Grid: A Comprehensive Survey," Sensors, 2021, doi: https://doi.org/10.3390/s21238087
B. Aljafari, S. Vasantharaj, V. Indragandhi, R. Vaibhav, "Optimization of dc, ac, and hybrid ac/dc microgrid-based iot systems: A review," Energies, vol. 15, no. 18, 2022.
S. Papathanassiou; N. Hatziargyriou, K. Strunz, "A benchmark low voltage microgrid network," In: CIGREsymposium on power systems with dispersed generation, 2005.
M. Sun, S. Zou, Y. Gou, X. Nian, "Projection-based distributed economic dispatch algorithm considering communication delays under switching topologies," in International Journal of Electrical Power & Energy Systems, vol. 152, no. 109266, 2023, doi: https://doi.org/10.1016/j.ijepes.2023.109266
Notes
Author notes
asantiago.ramirez1234@utp.edu.cobjuancamilo.oyuela@utp.edu.cocalejandro.garces@utp.edu.co
Conflict of interest declaration