## 2 Optimization Model for Network Reconfiguration Problem of Ship Power System
### Load Branch Correlation Matrix Method
#### 2.4.1 Load Branch Matrix Generation Principle  
1. Determine the nodes and branches: A node is defined as an endpoint formed by the interconnection of two or more electrical components, while a branch refers to the cable conductors that link these endpoints. 2. Establishment of topology: The topology of the power system is established based on nodes and branches, which define the interconnection methods of each node and the paths of the branches. 3. Construct the matrix: A load branch correlation matrix is developed according to the established topology. The connectivity between nodes and branches is denoted by binary values, with 0 indicating no connection and 1 indicating a connection. In this matrix, the rows represent nodes, while the columns correspond to branches. The selected ship power grid is simplified as shown in Figure 4. The numbers in the figure represent 10 branches, with branches 1 and 8 located adjacent to the generator, designated as root branches. L1 and L4 are critical load recovery supply paths, where two supply lines--solid and dashed--are visible. Similarly, L2 and L3 serve as critical load recovery supply paths, also showing both solid and dashed supply lines. Two of the root branches are 1 and 8. The lower branches of 1 are 2, 3, 4, 9, and 10; the lower branches of 8 are 5, 6, 7, 8, 9, and 10. Enumerating the root branches to form the first row of the matrix, searching downward with the root branches as the starting point, and enumerating all the branches, we obtain the matrix \(M\) as follows:  
\[M= \begin{bmatrix}1&0&0&0&0&8&0&0&0&0\\ 2&3&4&9&10&5&6&7&9&10\end{bmatrix} \]  
Figure 4: Simplified diagram of the power grid. Replacing the numerical numbering of the root branch and subordinate branches with the branch capacity, the system capacity matrix \(C\) is obtained, which can be used to represent the grid capacity:  
\[C= \begin{bmatrix}c_{1}&0&0&0&0&c_{8}&0&0&0&0\\ i_{2}&i_{3}&i_{4}&i_{9}&i_{10}&i_{5}&i_{6}&i_{7}&i_{9}&i_{10}\end{bmatrix} \]  
where \(c_{1}\) and \(c_{8}\) are the capacity limits of the two root branches, and \(i_{2-10}\) is the capacity of each subordinate branch. We specifically use the load branch correlation matrix to calculate and analyze the method as follows: if L1 uses the backup branch 5 for power supply, \(i_{2}=0\), L2 uses the normal branch 7 for power supply, then \(i_{4}=0\), L3 is normally powered, and L4 loses power, then \(i_{6}=0\), so that we can obtain the following matrix:  
\[C= \begin{bmatrix}c_{1}&0&0&0&0&c_{8}&0&0&0&0\\ 0&i_{3}&0&i_{9}&i_{10}&i_{5}&0&i_{7}&i_{9}&i_{10}\end{bmatrix} \]  
In the reconfiguration scheme, it should be satisfied that the total power consumption of the branch is less than the capacity of the root branch, i.e., \(\sum\limits_{n\in L}i_{n}\leq C_{n}\), \(L\) is the set of all conduction branches and \(C_{n}\) is the maximum capacity of the root branch, hence \(i_{3}+i_{9}+i_{10}\leq C_{1}\), \(i_{5}+i_{7}+i_{9}+i_{10}\leq C_{8}\). According to the simplified diagram of the ship's power grid structure studied in this paper, the ship's power grid matrix rooted at each generator can be obtained as follows using the load branch matrix generation principle:  
\[G1= \begin{bmatrix}1&0&0&0&0&0&0&0&0&0\\ 102&2&7&0&0&16&0&0&15&26\\ 0&3&8&9&13&17&18&23&27&28\\ 0&4&0&10&14&0&19&24&30&0\\ 0&0&0&11&100&0&20&25&0&0\\ 0&L1&L2&L3&L20&L4&L5&L6&L8&0\end{bmatrix} \]  
\[G2= \begin{bmatrix}34&0&0&0&0&0&0&0&0\\ 29&33&35&0&0&41&0&0&45&53\\ 0&32&40&39&36&44&42&47&46&54\\ 0&31&0&22&37&0&43&48&52&0\\ 0&0&0&21&38&0&55&49&0&0\\ 0&L6&L7&L5&L8&L9&L13&L10&L11&0\end{bmatrix} \]  
\[G3= \begin{bmatrix}66&0&0&0&0&0&0&0&0&0\\ 59&60&63&0&0&69&0&0&68&67\\ 0&57&62&61&64&70&72&76&77&79\\ 0&58&0&51&65&0&71&78&81&0\\ 0&0&0&50&56&0&73&80&0&0\\ 0&L11&L12&L10&L13&L14&L15&L17&L16&0\end{bmatrix} \]  
\[G4= \begin{bmatrix}93&0&0&0&0&0&0&0&0\\ 90&87&91&0&0&92&0&0&94&104\\ 4&88&86&85&82&95&96&97&6&103\\ 0&89&0&83&75&0&98&101&5&0\\ 0&0&0&84&74&0&99&12&0&0\\ 0&L16&L18&L17&L15&L19&L20&L3&L1&0\end{bmatrix} \]  
where the state matrix \(S\) is as follows:\[S=\left[