# Experimental Validation of Peer-to-Peer Distributed Voltage Control System
## 3 Dual-Decomposition-Based P2P Voltage Control Algorithm
Incorporating the grid losses however would require a more complete network model. \(v_{d,i}^{\text{P}}\) and \(v_{d,i}^{\text{Q}}\) are the sensitivity of the voltage at bus \(i\) (observer \(i\)) to the change in the active power and reactive power (respectively) of inverter \(d\). \(c_{r}\) is the curtailment factor. In this paper, \(c_{r}\) is set to 30%. In reality, \(c_{r}\) can be set based on how much the prosum would like to curtail the active power. \((P_{d}^{\text{profile}})^{(t)}\) is the active power generated by inverter \(d\) at time step \(t\). \(S_{d}\) is the rated apparent power of inverter \(d\). \((\lambda_{i}^{\text{max}})^{(t-1)}\) and \((\lambda_{i}^{\text{min}})^{(t-1)}\) are the control signals of violating the maximum and minimum (respectively) allowed voltage at bus \(i\). They are calculated at the previous time step \(t-1\) and considered in the optimization of time step \(t\). Mathematically speaking, they represent the Lagrangian multipliers. Each observer measures the voltage at its bus and updates these control signals based on the following equations:  
\[ \begin{split}&(\lambda_{i}^{\text{max}})^{(t)}=\text{max}\Big{(}0,( \lambda_{i}^{\text{max}})^{(t-1)}+\alpha\big{(}(V_{i}^{\text{meas}})^{(t)}-V^ {\text{max}}\big{)}\Big{)}\\ &(\lambda_{i}^{\text{min}})^{(t)}=\text{max}\Big{(}0,(\lambda_{i} ^{\text{min}})^{(t-1)}-\alpha\big{(}(V_{i}^{\text{meas}})^{(t)}-V^{\text{min}} \big{)}\Big{)}\end{split}  \tag{2}\]  
where \((\lambda_{i}^{\text{max}})^{(t)}\) and \((\lambda_{i}^{\text{min}})^{(t)}\) are the updated control signals calculated at time step \(t\) and considered in the optimization of time step \(t+1\). \((V_{i}^{\text{meas}})^{(t)}\) is the measured voltage at bus \(i\) after applying the decisions \(\Delta P_{d}^{(t)}\) and \(\Delta Q_{d}^{(t)}\). \(V^{\text{max}}\) and \(V^{\text{min}}\) are the maximum and minimum allowed voltage, respectively. We set \(V^{\text{max}}=1.1\) p.u. (per unit) and \(V^{\text{min}}=0.9\) p.u. according to the European standard EN50160. The parameter \(\alpha\) is the step size of the dual decomposition method. Because of the Karush-Kuhn-Tucker conditions (KKT), the Lagrangian multipliers cannot be smaller than zero. This explains the use of maximum operator in (2). The control algorithm goes through the following steps:Each observer agent measures the voltage. If the voltage exceeds the upper voltage limit, it will increase \(\lambda_{i}^{\max}\). If the voltage is lower than the upper limit, it will decrease \(\lambda_{i}^{\max}\), at most until it reaches zero. A similar procedure applies to \(\lambda_{i}^{\min}\). The parameter \(\alpha\) determines how large the updates to the control signals will be. 2. The actuator agents receive updates of \(\lambda_{i}^{\max}\) and \(\lambda_{i}^{\min}\) periodically. They will adjust their compensation to take the new values of the control signals into account. 3. The voltage changes due to the actions of the actuator agents. The observer agents update again their \(\lambda_{i}^{\max}\) and \(\lambda_{i}^{\min}\), and the whole process repeats. The communication from observer to actuator takes place through the D2D communication modules, while the feedback path goes through the electrical network. From this explanation, it is clear that this process is based on feedback. As long as the voltage problem persists, the observer agents will increase the control signals to get more compensation from the actuator agents. The effect of \(\alpha\) is similar to a gain in control theory. The trade-off in its selection is similar: a low value can lead to slow convergence, while a too large value can lead to instability.