# Experimental Validation of Peer-to-Peer Distributed Voltage Control System
## 2 Testbed Architecture  
The architecture of the P2P voltage control testbed is depicted in Figure 1. The testbed consists of four different layers which interact with each other: (1) microgrid layer; (2) control layer; (3) communication layer; and (4) monitoring layer. The microgrid layer consists of programmable inverters (label 1 in Figure 1); connected to DC power supplies (label 2). The inverters emulate prosumers with photovoltaic (PV) installations, they are connected to the grid by resistors in series with inductors (label 3). The resistors and inductors are used to emulate a low voltage feeder. The control layer consists of inner control systems (label 4) that drive the power inverters, and grid voltage support functions (GVSFs) that control the voltage profiles of the microgrid (label 6). The communication layer consists of D2D communication modules (label 7) that are used to disseminate the status of the voltage profiles in a P2P fashion. The monitoring layer consists of voltmeters (label 9) and data acquisition platform (label 11).  
The P2P voltage control testbed consists of three types of agents: (1) actuators; (2) observers; and (3) a monitor. Each GVSF is connected to a D2D communication module and together they form an actuator agent (label 5). The actuator agents are connected to the programmable inverters through the inner control systems (control loops) and participate actively in voltage control by calculating the change in reactive power and active power that each inverter should follow to maintain the voltage profiles within specified limits. The set-points of the change in reactive and active power of the inverters are determined based on an optimization problem solved in a fully distributed way.  
The observer agent (label 8) consists of a voltmeter connected to a D2D communication module through a Raspberry Pi (R.Pi) computer (label 10). The voltmeter periodically measures the voltage of its bus, and the R.Pi fetches the latest reading. The R.Pi of each voltmeter hosts a software that was developed for interfacing with both the communication module and the voltmeter. The R.Pi calculates the control signals (further referred to as Lagrangian multipliers) based on the latest voltage measurement, according to a procedure described later. These control signals are broadcasted through the D2D modules. The actuators communicate with the observers in a P2P fashion to receive the control signals. The actuators then determine how to react based on these control signals and based on their impact on the observed voltages (the impact on the voltages is expressed by voltage sensitivities). They also take into account the cost of dispatching a change in active and reactive power.  
The third type of agent, the monitoring agent (label 11), represents a data acquisition platform. This additional agent is not required for the operation of the P2P voltage control algorithm. The observers and actuators record several variables from the algorithm that they execute, together with timestamps. These recordings are cached locally. Periodically, the observers and actuators transfer the cached recordings to the monitoring agent in a robust way. Therefore, even if the data acquisition  
Figure 1: Multi-layer multi-agent architecture of the Peer-to-Peer (P2P) voltage control testbed ( VM stands for voltmeter, Device-to-Device (D2D): device-to-device communication module, grid voltage support function (GVSF): grid voltage support function, Raspberry Pi (R.Pi): raspberry pi computer, **Right** resistor, **Left**: inductor, labels 1 to 11 indicate the different parts of the testbed).  
network is temporarily offline, no data will be lost. The monitoring agent hosts a web service, through which all recorded data is visualized in several dashboards.  
The overall schematic of the testbed is depicted in Figure 2. The microgrid is connected to the main grid through 400 V (line-to-line voltage (L-L)), 64 Amps (A) busbar.