## 4 Examples and Analysis
### Upper Level Programming Model and Lower Level Programming Model
\(\Delta D_{n,t,y}\) is the outage time of \(y\)-load in the nth scenario at t period. \(\varphi_{ntf}\) is t period load set for the n scenario. The lower level planning model mainly considers the operation constraints related to the operation of distribution network. At this stage, DG access to power grid costs higher. In order to maximize the utilization of DG, the lower level objective is to minimize the amount of active power cut-off of DG, and its expression is as follows:  
\[minC_{2}=\sum\limits_{n=1}^{12}P_{n}\times 365(\sum\limits_{t=1}^{24}P_{cnt}) \tag{26}\]  
The constraints are:  
(1) Node Power Balance Constraints  
\[ \begin{array}{c}P_{ci,j,t,n}+P_{\alpha,j,t,n}-P_{WTG,i,t,n}-P_{PVG,i,t,n}=\\ U_{i,t,n}\sum\limits_{j=1}^{N_{\text{Bus}}}U_{j,t,n}(G_{ij}cos\theta_{t,n,ij}+ B_{ij}sin\theta_{t,n,ij})\end{array}  \tag{27}\]  
\[ \begin{array}{c}Q_{ci,i,t,n}+Q_{\alpha,j,t,n}-Q_{WTG,i,t,n}-Q_{PVG,i,t,n}-Q_{ ci,i,t,n}=\\ U_{i,t,n}\sum\limits_{j=1}^{N_{\text{Bus}}}U_{j,t,n}(G_{ij}sin\theta_{t,n,ij}- B_{ij}cos\theta_{t,n,ij})\end{array}  \tag{28}\]  
where \(P_{WTG,i,t,n}\) and \(P_{PVG,i,t,n}\) are the active output of the t time of the n scenario, respectively. \(P_{ci,i,t,n}\) and \(P_{\alpha,j,t,n}\) are the active power of residential and commercial loads at the first time of \(t\) in the first \(n\) scenario, respectively.\(Q_{WTG,i,t,n}\) and \(Q_{PVG,i,t,n}\) are the reactive power of DG at the \(t\) time of the n scenario, respectively.\(Q_{ci,i,j,t,n}\) and \(Q_{\alpha,j,t,n}\) are the reactive power of resident load reactive power and commercial load at the t time of the n scenario, respectively, supplied by the reactive power compensation device. \(U_{i,t,n}\) and \(U_{j,t,n}\) are the voltage amplitude of node \(i\) and the voltage amplitude of node \(j\) at the \(t\) time node of the \(n\) scenario, respectively. \(\theta_{t,n,ij}\) is the phase difference between node \(i\) and node \(j\) of t in the \(n\) scenario, respectively. (2) Node Power Balance Constraints  
\[U_{imin}\leq U_{i}\leq U_{imax} \tag{29}\]where \(U_{i}\) is node voltage. \(U_{imin}\) and \(U_{imux}\) are the minimum voltage values and maximum voltage values allowed by node \(I\), respectively. (3) Branch power constraints  
\[S_{i}\leq S_{imax} \tag{30}\]  
where \(S_{i}\) is the apparent power of branch \(L\). \(S_{imax}\) is the limit of branch transmission capacity. (4) DG output control constraints  
\[P_{imin}\leq P_{i}\leq P_{imax} \tag{31}\]  
where \(P_{imin}\) and \(P_{imax}\) are the minimum active power output of node \(i\) and the maximum active power output of distributed generation respectively. (5) Constraints of reactive power compensation  
\[Q_{imin}\leq Q_{i}\leq Q_{imax} \tag{32}\]  
where \(Q_{imin}\) and \(Q_{imax}\) are the minimum value of reactive power compensation device of node \(I\) and the maximum value of the reactive power compensation device. (6) Regulation constraints of on-load tap-changer  
\[T_{imin}\leq T_{i}\leq T_{imax} \tag{33}\]  
where \(T_{i}\) is the tap position of transformer \(i\). \(T_{imin}\) and \(T_{imax}\) are the tap values of transformer \(i\) and the maximum tap value of \(i\), respectively.