## 3 Solution Approach
### Protection Procedure of ECPSs under Cyber Attacks  
Based on Algorithm 1, in this section, we introduce the protection procedure of ECPSs considering cyber attacks. The procedure begins with a tripped branch and follows the steps below:  
2. Judge the connectivity of the system after cutting off a branch. 1. [label=()]
3. If there is a splitting incident, then go to step (b). 2.  If there is no separation of the system, directly go to step (f). 3. Identify the main area as the remaining system after splitting. 1. [label=()]
4. If there is a main area, go to step (c). 2. If there is no main area, go to step (i). 3. [label=()]
5. Upload the changed topology and electrical information to the control center.  
* Make decisions with the unbalanced power in the control center.
* Download and adjust the control strategies to the appointed generators.
* Update the topology and electrical information to the control center for calculation.
* Calculate the power flow.
* Search for the overloaded branches.
* If there are overloaded branches, cut off the branches and go back to step (a).
* If there is no overloaded branch, then go to step (i).
* End the procedure, record the loss.  
In power systems, splitting incidents caused by cutting off the overloaded branches may lead to serious cascading failure propagation, especially in ECPSs. Owing to the topology change, related electrical information will be changed, which will consequently influence the stability, robustness, and safety margin of the system. Algorithm 2 is used to assess the damage degree of a system using tools from graph theory when there is an overloading incident. By analyzing the connectivity of the system, the splitting incident is considered a special situation. Let \(L\in R^{|V|\times 1}\) be the area label vector, with \(l_{k}\in L\) as the area label of node \(k\), \(k\in 1,2,\ldots,|V|\).  
```
1: Input \(V\), set \(t=1\) and \(L=[0,0,\ldots,0]\).
2: For \(i=1:|V|\)
3: For \(j=1:|V|\)
4: If branch \((i,j)\in E\)
5: If \(l_{i}=l_{j}\)
6: If \(L(i)=0\)
7: Then \(l_{i}=l_{j}=t\), \(t=t+1\);
8: End if
9: Else
10: If \(l_{i}\cdot l_{j}\
eq 0\)
11: Then \(l_{i}=l_{j}=\max\Bigl{\{}l_{i},l_{j}\Bigr{\}}\);
12: Else
13: For \(k=1:|V|\)
14: If \(L(k)=L(i)\)
15: \(L(k)=L(j)\);
16: End; end; end; end; end; end;
17: Output and count the number \(n<|V|\) of areas.
```  
**Algorithm 2****Assess the damage degree**  
**Remark 2**.: _Note that \(n\) is the number of different values of elements in \(L\). If all the elements in \(L\) are the same, then there is no splitting and \(n=1\)._  
Based on the results from Algorithm 2, we know whether there is a splitting incident and how many areas the system will be separated into when cutting off an overloaded branch. However, according to Kirchhoff laws, not every separated area can still be a functional subsystem. The control center needs to identify the main area of the system.  
According to the results in Algorithm 2, assume that the power grid \(G(V,E)\) is separated into \(n(n\in Z)\) parts. The \(i^{th}\) part is abstracted as \(G_{i}(V_{i},E_{i})\), \(i\in 1,2,\ldots,n\). Algorithm 3 is used to search for the main area after a splitting incident with the standard of the maximum numbers of generators and loads.  
Let \(K=[k_{1},k_{2},\ldots,k_{n}]\) and \(M=[m_{1},m_{2},\ldots,m_{n}]\) be the vector of the number of generators and loads, respectively.  
So the \(j^{th}\) area is the main system after the splitting incident.