## 5 The Hybrid White Shark Optimizer and Whale Optimization Algorithm (WSO-WOA)
### Proposed WSO-WOA in Tuning the Controller Parameters  
The operational process of the proposed hybrid scheme is Algorithm 1. In this method, the WSO-WOA algorithm begins by randomly generating an initial population, as outlined in (51). This population comprises N individuals, each characterized by \(D\) dimensions. The performance of each individual is evaluated using the cost functions defined in (29). The individual that produces the lowest cost value is identified as the optimal solution.  
\[X_{o}=LB+rand\times(UB-LB) \tag{51}\]  
Until the termination criteria are satisfied, the algorithm continues to update the position of each individual in the population in the following steps:  
* Step 1: The WSO updating scheme is first applied:
* The behavior of moving toward prey is implemented by adjusting each shark's velocity, as shown in (38) and (39).
* Subsequently, the movement strategy aimed at the optimal white shark is utilized to revise the individual's position within the population, as indicated in (40).
* Update the shark's position by incorporating its behavior of moving toward the most successful shark in the swarm, along with its collective dynamics as a fish school, as described in Equations (41) and (42).
* Check if the solution has moved beyond the defined search.
* Step 2: Evaluation Strategy:
* The OF is calculated considering the new solution obtained by the WSO.  
* The problem constraints are checked, and if the solution does not meet these constraints, it will be penalized with a high additional cost. Step 3: Update \(X_{gbest}^{t}\) if the new solution gives better fitness value the previous best fitness value (\(OF^{best}\)) and proceed to Step 8. Step 4: If the new solution generated by the WSO fails to improve upon the best solution from the previous iteration, the WOA updating scheme is then applied:
* Update the parameters \(a\), \(A\), \(C\), \(l\), and \(p\) for every search agent, as introduced in Section 5.2.
* Update the position of the new solution using (43)-(50). Step 5: Apply the evaluation strategy explained in Step 2 considering WOA's solution. Step 6: Update the solution if the WOA's solution is better than the WSO's solution. Step 7: Update \(X_{gbest}^{t}\) if a better solution is found. Step 8: Go to the next solution and continue until the last solution is reached. Step 9: Increment the iteration count t and persist with the procedure until the maximum number of iterations is achieved.  
```
1: Specify the dimensions of the problem, including the number of candidate solutions (\(N\)), \(T_{\text{max}}\), as well as the upper bound (\(LIB\)) and lower bound (\(LB\)) for each variable.
2: Set WSO and the WOA parameters.
3: According to the procedure described in (51), the initial population is to be created through random generation.
4: Compute the cost function (\(OF\)) and check the problem constraints.
5: While (\(l\)<=\(T\))
6: For\(i\) = 1:\(N\)
7: Adjust each shark's velocity using (38) and (39).
8: Update the position of the individual using (40).
9: Update the shark's position using (41) and (42).
10: Calculate the \(OF\) (\(OF_{1}\)) of the new solution using (29).
11: If\({}_{1}\)\(OF_{1}<\)\(\text{OP}^{best}\)
12: Update the Update \(X_{gbest}^{t}\).
13:\(N=N+1\), and go to line 7.
14: Else\({}_{1}\)
15: Update the position \(X\) using the WOA's Equations (43)-(50).
16: Calculate the new \(OF\) (\(OF_{2}\)) of the new solution using (29).
17: If\({}_{2}\)\(OF_{2}<\)\(\text{OF}^{best}\)
18: Update the WOA's new solution.
19: If\({}_{3}\)\(OF_{2}<\)\(\text{OP}^{best}\)
20: Update the Update \(X_{gbest}^{t}\).
21:\(N=N+1\), and go to line 7.
22: End If\({}_{3}\)
23: Else\({}_{2}\)
24: Use the WSO's new solution.
25: End If\({}_{2}\)
26: End If\({}_{1}\)
27: End for
28:\(T=t+1\).
29: End While
```  
**Algorithm 1**Pseudo-code of WSO-WOA.