## 2 Fuzzy Fault Level Constrained Optimal Power Flow (FFLC-OPF)
### Formulation of FFLC-OPF  
Basically, OPF is an algorithm that determines the optimal dispatch of active power generation in the system and other parameter settings that meets the load demand and satisfies the feasibility within the operating limits. The state variables of the system are the voltage magnitude and the voltage phase angle at each bus. Active and reactive power injection, which are functions of the state variables, need to be balanced with the difference between generation and demand. The active and reactive power balance equations for each bus \(i\) are expressed briefly as follows:  
\[P_{li}(V,\varphi) =P_{gi}-P_{di} \tag{4a}\] \[Q_{li}(V,\varphi) =Q_{gi}-Q_{di} \tag{4b}\]  
where \(P\) and \(Q\) denote active and reactive power, respectively, \(V\) and \(\varphi\) stand for the vectors for bus voltage magnitude and angle, respectively. In Equation (4), subscripts \(t\), \(g\), and \(d\) stand for injection, generation and demand, respectively. Additionally, the system's operating limits need to be incorporated into OPF with the form of inequality constraints and they are formulated as follows:  
\[\varphi_{i}^{min} \leq\varphi_{i}\leq\varphi_{i}^{max} \tag{5a}\] \[V_{i}^{min} \leq V_{i}\leq V_{i}^{max}\] (5b) \[P_{gi}^{min} \leq P_{gi}\leq P_{gi}^{max}\] (5c) \[Q_{gi}^{min} \leq Q_{gi}\leq Q_{gi}^{max}\] (5d) \[S_{ij}^{min} \leq S_{ij}(V,\varphi)\leq S_{ij}^{max} \tag{5e}\]  
where \(S_{ij}\) is apparent power flow on the branch connecting bus \(i\) and \(j\). In Equation (5), \(\varphi_{i}^{min}\) and \(\varphi_{i}^{max}\) are the lower and upper limit of bus voltage angle at bus \(i\); \(V_{i}^{min}\) and \(V_{i}^{max}\) are the lower and upper limit of the bus voltage magnitude; \(p_{gi}^{min}\) and \(p_{gi}^{max}\) are the lower and upper limit of the active power  
Figure 1: Triangular fuzzy membership function of a fault level constraint. generation at bus \(i\); \(Q_{gi}^{min}\) and \(Q_{gi}^{max}\) are the lower and upper limit of the reactive power generation at bus \(i\); \(S_{ij}^{min}\) and \(S_{ij}^{max}\) are the lower and upper limit of apparent power flow of the branch \(i\) to \(j\). To include FLCs in the OPF, the magnitude of the fault current rather than its complex value is needed. The fault current of each bus and its corresponding upper limit is needed to be considered as in Equation (2). As in Equation (3), in this paper, a fuzzy membership function is applied to each FLC to properly deal with the initial infeasibility and the situations wherein the control measures are not enough to get a feasible solution. Instead of crisp constraints, the fuzzy FLCs are incorporated as follows:  
\[|V_{i}/Z_{ii}|\leq I_{CB,i}+(1-z)\varepsilon_{i} \tag{6}\]  
where \(\varepsilon_{i}\) is the acceptable tolerance for fault current that will exceed the \(I_{CB,i}\). Also, the value of the fuzzy membership function for the FLC of the faulted location is represented as \(z\). This membership function value is taken into account in the formulation of the algorithm's objective function. In the FFLC-OPF, the augmented objective function should be used as follows:  
\[ \begin{array}{l}\underset{z\leq\mu_{i}}{\min}\Big{(}I_{fj}\Big{)}\underset {i=1,\ldots,N_{FLC}}{\sum}\\ \end{array}  \tag{7}\]  
where \(N_{G}\) is the number of generators in service and \(N_{FLC}\) is the number of fault current limits in the problem. The objective function in Equation (7) of the FFLC-OPF minimization problem consists of the summation of the generators' cost functions and a secondary term containing the lower limit of the membership functions for FLCs. For the first term, the quadratic cost functions of the generators are used in this study, so in Equation (7), \(C_{k}(\cdot)\) denotes the cost function for generator, \(k\). The second term is the product of a weighting factor \(\rho\), and the lowest value among the membership functions for the set of FLCs. As mentioned in the previous subsection, the value of the membership functions can range from 0 to 1.