## 4. SOP and Energy Storage Optimization Configuration Model  
### Objective Function  
This article constructs the objective function based on the principle of balancing the economic efficiency of the power grid and load balancing. The expression is as follows:  
\[\text{min}f =\alpha f_{1}^{nor}+\beta f_{2}^{nor} \tag{12}\] \[f_{1}^{nor} =\frac{f_{1}-f_{1}^{\text{min}}}{f_{1}^{\text{max}}-f_{1}^{\text{ min}}}\] (13) \[f_{2}^{nor} =\frac{f_{2}-f_{2}^{\text{min}}}{f_{2}^{\text{max}}-f_{2}^{\text{ min}}} \tag{14}\]In (12)-(14), \(f_{1}\) represents the annual comprehensive cost of SOP and energy storage, and \(f_{2}\) represents the load balancing degree. \(f_{1}^{nor}\) and \(f_{2}^{nor}\) are the normalized values of \(f_{1}\) and \(f_{2}\), respectively. \(\alpha\) and \(\beta\) are the weights of \(f_{1}\) and \(f_{2}\) in the objective function, respectively, and \(\alpha+\beta=1\). \(f_{1}^{\max}\) and \(f_{2}^{\max}\) are the maximum values obtained when \(f_{1}\) and \(f_{2}\) are solved separately. \(f_{1}^{\min}\) and \(f_{2}^{\min}\) are the minimum values obtained when solving \(f_{1}\) and \(f_{2}\) separately. The specific composition of the annual comprehensive cost of SOP and energy storage is as follows. \[f_{1}=C_{\text{SOP}}^{inp}+C_{\text{SOP}}^{ope}+C_{ES}^{inv}+C_{ES}^{ope}+C_{ES }^{loss} \tag{15}\]  
\[C_{\text{SOP}}^{inv}=\frac{d_{1}(1+d_{1})^{y_{1}}}{(1+d_{1})^{y_{1}}-1}\sum \limits_{k=1}^{N_{\text{SOP}}}c_{k,SOP}S_{k,SOP} \tag{16}\]  
\[C_{\text{SOP}}^{inv}=\frac{d_{1}(1+d_{1})^{y_{1}}}{(1+d_{1})^{y_{1}}-1}\sum \limits_{k=1}^{N_{\text{SOP}}}c_{k,SOP}S_{k,SOP} \tag{17}\]  
\[C_{ES}^{inv}=\frac{d_{2}(1+d_{2})^{y_{2}}}{(1+d_{2})^{y_{2}}-1}\sum\limits_{k =1}^{N_{ES}}c_{k,ES}S_{k,ES} \tag{18}\]  
\[C_{ES}^{ope}=\sum\limits_{k=1}^{N_{ES}}c_{k,ES}^{ope}P_{k,ES} \tag{19}\]  
\[C^{loss}=365c\sum\limits_{t=1}^{N_{t}}\left(\sum\limits_{i\in\Omega_{b}}r_{ij }l_{ij,t}^{2}+\sum\limits_{i=1}^{N_{i}}P_{SOP,i,t}^{loss}\right) \tag{20}\]  
In (15)-(20), \(C_{\text{SOP}}^{inv}\) is the investment cost of SOP. \(C_{\text{SOP}}^{ope}\) is the cost of SOP operation and maintenance. \(C_{ES}^{inv}\) is the investment cost of energy storage. \(C_{ES}^{ope}\) is the cost of energy storage operation and maintenance. \(C^{loss}\) is the cost of power supply loss in the distribution network. \(d_{1}\) is the SOP investment discount rate. \(y_{1}\) is the service life of SOP. \(N_{SOP}\) is the number of SOP installations to be selected. \(c_{k,SOP}\) is the unit capacity investment cost of the \(k\)th SOP. \(S_{k,SOP}\) is the capacity of the \(k\)th SOP. \(\eta\) is the coefficient of operation and maintenance costs. \(d_{2}\) is the discount rate for energy storage investment. \(y_{2}\) is the service life of energy storage. \(N_{ES}\) is the number of energy storage installations to be selected. \(c_{k,ES}\) is the investment cost per unit capacity of the \(k\)th energy storage. \(S_{k,ES}\) is the capacity of the \(k\)th energy storage. \(c_{k,ES}^{pe}\) is the operating and maintenance cost of the \(k\)th energy storage. unit rated power. \(P_{k,ES}\) is the rated power of the \(k\)th energy storage. c is the electricity price. \(N_{t}\) is the total number of time periods. \(\Omega_{b}\) is the collection of all branches in the distribution system. \(r_{ij}\) is the resistance of the branch \(ij\). \(I_{ij,t}\) is the current amplitude of branch \(ij\) during the \(t\)th time period. \(N_{i}\) is the total number of nodes in the distribution system. \(P_{SOP,i,t}^{loss}\) is the active power loss of SOP at node \(i\) during the \(t\)th time period. The expression for load balancing degree \(f_{2}\) is as follows. \[P_{balance}=\sum\limits_{i=1}^{N_{s}}\left|\sum\limits_{t=1}^{N_{t}}P_{ source,i,t}-P_{source,ave}\right| \tag{21}\]  
\[f_{1}^{nor} =\frac{f_{1}-f_{1}^{\text{min}}}{f_{1}^{\text{max}}-f_{1}^{\text{ min}}}\]0  
In (21) and (22), \(N_{s}\) represents the total number of power nodes in the distribution system.