## 4 Dynamic Reconfiguration of Distribution Network
### Event Triggered Dynamic Reconfiguration Model  
Aiming at minimizing the power losses of a certain time period in the future, the reconfiguration problem is to decide the open or close status of every switch, which finally change the topologies of a distribution network. Thus, the dynamic reconfiguration model can be represented as:  
\[{f_{r}}(t,{T_{r}},{tp_{t}})=min\sum\limits_{t=1}^{t+T_{r}}{({P_{loss}}^{\prime }(t)\mid tp_{t}\in TP)} \tag{23}\]  
where \(T_{r}\) is time horizon for calculating power losses, \(tp_{t}\in TP\) is the selected topology of a distribution network for time period \([t,t+T_{r}]\), \(TP\) is the set of total possible topologies of the distribution network. Generally, it can be assumed that each branch is equipped with a switch, thus a topology \(tp\) can be further defined as the status of switches in the distribution networks. \[tp=\{sw_{i}\},i=1,...,N \tag{24}\]  
where \(sw_{i}\) is the status of the \(i\)-th switch, i.e., 1 for close, 0 for open. In order to cooperate with the scheduling of the MG coalition, the DNO can make decisions after receiving the expected exchanging energy \(P_{mi}(t)\). However, due to the forecasting errors, the errors of expected exchanging energy are also cannot be omitted, even with the utilization of stochastic programming. Finally, the errors may influence the efficiency of reconfiguration model. Thus, the power flow of the distribution network containing DC-linked MGs can be updated as follows. \[{P_{i}}^{\prime\prime}(t)=\sum\limits_{j\in{C_{i}}}{\left[{{P_{j}}(t)+{r_{j}}{ l_{j}}(t)}\right]}+{P_{li}}(t)-({P_{mi}}(t)+\Delta{P_{mi}}(t)) \tag{25}\]  
\[{Q_{i}}^{\prime\prime}(t)=\sum\limits_{j\in{C_{i}}}{\left[{{Q_{j}}(t)+{x_{j}}{ l_{j}}(t)}\right]}+{Q_{li}}(t)-({Q_{mi}}(t)+\Delta{Q_{mi}}(t)) \tag{26}\]  
\[{\rm{U}}_{k}^{\prime\prime}(t)^{2}{=}{\rm{U}}_{i}^{\prime\prime}(t)^{2}{+}2 \left[{{r_{i}}{P_{i}}^{\prime\prime}(t)+{x_{i}}{Q_{i}}^{\prime\prime}(t)} \right]+{({r_{i}}^{2}+{x_{i}}^{2})}{l_{i}} \tag{27}\]  
where \(\Delta{P_{mi}}(t)\) and \(\Delta{Q_{mi}}(t)\) is the exchanging power deviation of active and reactive power exchanging between MGs and DNO, respectively. As a result, the actual power loss at time \(t\) is:  
\[{P_{loss}}^{\prime\prime}(t)=\sum\limits_{i=1}^{N}{r_{i}\frac{{{P_{i}}^{\prime \prime}(t)^{2}+{Q_{i}}^{\prime\prime}(t)^{2}}}{{{U_{i}}^{\prime\prime}(t)}^{2}}} \tag{28}\]  
Furthermore, considering the real-time errors, the dynamic reconfiguration model can be updated as follows:  
\[\widetilde{f_{r}}(t,{T_{r}},{tp_{t}})=min\quad(({P_{loss}}^{\prime\prime}(t)+ \sum\limits_{t=t+1}^{t+T_{r}}{{P_{loss}}^{\prime}(t)})\mid tp_{t}\in TP) \tag{29}\]  
By solving (29) at time \(t\), \(tp_{t}\in TP\) is the optimal decided topology of a distribution network for time period \([t,t+T_{r}]\). However, with the time progress, \(tp_{t}\) may not be the optimal solution for time period \([t+1,t+T_{r}]\) due to the real-time operation errors at time \(t+1\). Extremely, if the DNO choose to update the reconfiguration scheme every time slot, the switches could be operated very frequently to change the network topologies, which is also not economical considering the cost of switch operations. To address this problem, a event triggered model is formulated as follows. \[\widetilde{f}_{r}(t,T_{r},tp_{t})-(({P_{loss}}^{\prime\prime}(t)+\sum_{t=t+1}^{ t+T_{r}}{P_{loss}}^{\prime}(t))\mid tp_{c}\in TP)>\sum_{t=2}^{T}C_{sw}N_{sw}(t)/\eta \tag{30}\]  
where \(tp_{c}\) is the current topology of distribution network, \(C_{sw}\) is the unit cost of changing switches, and \(N_{sw}\) is the total number of switches changed; \(\eta\) is the unit cost of power loss. At time \(t\), if \(tp_{t}=tp_{c}\), that means the current topology is already the optimal solution, which don't need to make any change; otherwise, if \(tp_{t}\
eq tp_{c}\), the current topology is not the optimal solution, the DNO should compare the benefit with the cost caused by switch operations, as expressed in (30).