# Empowering WBANs: Enhanced Energy Efficiency Through Cluster-Based Routing and Swarm Optimization
## 3 Proposed Methodology
### Clustering and CH Selection Using Adaptive Binary Bird Swarm Optimization Algorithm (ABBSOA)  
ABBSOA (Algorithm 1) is one of the most recent inventions in swarm computing and intelligence, aimed at solving global optimization problems in clustering. Figure 3 represents ABBSOA, a bionic optimization technique that tries to attain the global optimum while exceeding the local one. The group interactions of birds draw in as they hunt for food. This behaviour depends on three key mimicry behaviours in birds: foraging, guarding, and flying. It uses a directed randomization system, like other metaheuristics, to produce solutions with numerous properties. Five rules govern these bird behaviours. According to rule one, each bird can either forage or keep watch simultaneously. This process of finding food and remaining vigilant is stochastic. The responsibilities are eliminated from overloaded CH selection (CHs) and assigned to CH selection (CHs) in problem conditions [25; 26; 27; 28]. The concept of scrouning is associated with the complication of mapping tasks (as birds) onto the necessary CH selection (CHs) (as a target food source). The bird will search for food if a uniform random number (0, 1) is less than P, P \(\in\) (0, 1). Otherwise, the task will remain silent. According to rule two, each bird chooses a foraging location depending on its prior experience and the experience of the flock during the hunting process. A task's location is updated based on its previous experience with the food's location and CH selection. In problem circumstances, birds' positions relative to their p_best are constantly updated and assigned to their respective CH selection (CHs). Equation (5) is derived, and Equation (6) determines the primary position. \[X_{i}^{k+1}=X_{i}^{k}+s\times rand_{1}\times\left(p_{best_{i}}-X_{i}^{k}\right) +a\times rand_{2}\times\left(g_{best}-X_{i}^{k}\right) \tag{5}\]  
\[X_{0}^{k}=X_{min}+\left(X_{max}-X_{min}\right)\times rand \tag{6}\]  
As inferred from Equations (5) and (6), where \(X_{0}^{k}\) represents the particle's initial position, \(X_{min}\) represents the minimum value, \(X_{max}\) represents the maximum value, \(X_{i}^{k}\) represents the particle's current position at the \(k\)th iteration, \(X_{i}^{k+1}\) represents the position vector, \(p_{best_{i}}\) represents the best position, and \(g_{best_{i}}\) denotes the global best position of the particle i and \(rand_{i}\) are the random numbers between 0 and 1, while a and c are the acceleration and cognitive coefficients, the two positive integers that remain constant(s \(=a=1.5\)). Rule three states that while being alert, each bird will naturally battle with the others to approach the base of the group rather than flying straight there. The particle with the lowest optimum value will likely move to the population's centre. This vigilant behaviour may be associated with complex environments due to competition from hunters vying for the best position. Equations (7)-(9) are used to form this. \[X_{i}^{k+1}=X_{i}^{k}+A_{1}\left(p_{mean_{j}}-X_{i}^{k}\right)\times rand_{a }+A_{2}\left(p_{best_{1}}-X_{i}^{k}\right)\times rand_{b} \tag{7}\]  
\[A_{1}=c_{1}\times exp\left(-\frac{\overline{pbest_{j}}}{\overline{pbest_{j}} }\times M\right) \tag{8}\]  
\[A_{2}\ =\ c_{2}\times exp\left(\left(\frac{p_{best_{i}}-p_{best_{1}}}{\left|p_{ best_{1}}-p_{best_{1}}\right|+\epsilon}\right)\frac{N\times p_{best_{1}}}{p_{ best_{j}}+\epsilon}\right) \tag{9}\]  
where \(p_{mean_{j}}\) is the average position of the whole swarm, \(Rand_{a}\), which prevents zero- \(M\), is the total number of particles; \(\Delta\) is utilized to prevent a zero-division error; 1 and 1, \(A_{1}\) and \(A_{2}\) do indicate the surroundings which generate the indirect and direct impacts; and between 0 and 1, \(rand_{b}\) and is a random number between \(-1\) and 1. Following the fourth rule, birds regularly fly away to find food. They frequently switch between producers and predators while flying, and the bird with the most minor fitness level will be a scrounger.