## 5 Evolutionary Computing-Based Optimal UFLS
### Implementation of ICA into UFLS  
The initial values and variables which are required to solve the cost minimization problem of load-shedding must be pre-determined and then implemented in the algorithm. Like most algorithms when using ICA, initial population and the number of iterations must be specified. However, with ICA other parameters such as the number of colonies, number of decades as well as other algorithm parameters are also pre-set. In this paper, nine constraints were introduced but some of the constraints  
Figure 2: flow chart of the offline implementation of ICA for optimizing the load to be shed.  
can be defined at once in the algorithm. As a result, the variables in the algorithm can be described as follows:  
\[nVar=x\] \[VarMin=\left[P_{stage1,\min},...,P_{stage5,\min};f_{\min 1},...,f_{\min 5};t_{m,\min 1 },...,t_{m,\min 5}\right] \tag{15}\] \[VarMax=\left[P_{stage1,\max},...,P_{stage5,\max};f_{\max 1},...,f_{ \max 5};t_{m,\max 1},...,t_{m,\max 5}\right]\]  
The number of variables (\(nVar=x\)) are different for each case with \(x=5\) or \(N\), where \(N\) can be 10 or any other fixed integer greater than 5 (the maximum number of stages considered in this paper).  
Here the minimum and the maximum amount of load to be shed at every stage \((k=1,...,5)\) is 0 and 0.2 per units, respectively. The values for \(f_{\min},f_{\max},t_{m,\min}\) and \(t_{m,\max}\) are re-defined at each load-shedding case or scenario to assess the effectiveness of the proposed method.  
The ICA is used for solving the proposed UFLS optimization problem. In this problem, three objective functions are considered, and their performance are compared. For implementing the suggested algorithm, firstly the system frequency model is online validated using WAMS platform. Once the model parameters such as H, D, and others are obtained. The phasor measurements data using WAMS are assumed to be available in the control center. Then, the most severe disturbance is applied to the SFR dynamic model, and in parallel with this model, ICA is responsible to solve the UFLS problem by trying to find the best amount to be shed in which the frequency is maintained within a specific range. The online implementation of the proposed optimal multi-stage UFLS based on WAMS platform is shown in Figure 3.  
Figure 3: Flowchart of the online implementation of the proposed WAMS-based optimal multi-stage UFLS scheme.  
In the ICA platform, we have empires, countries, and colonies. Where colonies are countries within an empire. In our optimization problem, we had 3 objective functions cost which we can simply represent as (\(p\)). Now the main goal is to find an argument, \(p\), whose relevant cost is optimum. If we consider that the optimization problem is N-dimensional, a colony or a country within an empire is a (\(1\times N\)) array that can be expressed as follows  
\[\left[country=\left[p_{1},p_{2},\ldots,p_{N\,\mathrm{var}}\right]\right. \tag{16}\]  
Our optimization problem is designing an optimum UFLS scheme to arrest frequency decline in the event of a large disturbance, so we generate the initial country that is defined by various arrays. If the aim was on finding the optimum load to be shed like in case 1 and case 2 the country will be represented as follows  
\[\left[country_{ik}=\left[\Delta P_{shed1},\Delta P_{shed2},\ldots,\Delta P_{ shedN}\right]\right. \tag{17}\]  
However, if the aim is on finding both the load to be shed and the shedding frequency as in case 4 up to 6 the country will be defined as follows  
\[\left[country_{ik}=\left[\left(\Delta P_{shed1},f_{1}\right),\left(\Delta P_{ shed2},f_{2}\right),\ldots,\left(\Delta P_{shedN},f_{N}\right)\right]\right. \tag{18}\]  
In conclusion, the colony \"country\" depends on the selected objective function. The colony in the first objective is the load to be shed, whereas is the load and frequency threshold in the objectives 2 & 3.