# 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)
Randomly chosen birds between the best and worst fitness values are either producers or hunters. The tasks for birds with the highest and lowest fitness values are producers and hunters. Because producers are always looking for food sources, tasks (producers) overloaded with CHs are always looking for CHs that are lightly loaded. Sroungers have the lowest fitness values for lightly loaded CHs that share the same CHs as producers. The bird's flight pattern changes at FQ intervals. Equations (10) and (11) simulate this bird's flight behaviour. \[X_{i}^{k}\ =\ X_{i}^{k}+rand_{n}(0,1)\times X_{i}^{k} \tag{10}\]  
\[X_{i}^{k+1}\ =\ X_{i}^{k}+\left(X_{i}^{k}-X_{i}^{k}\right)\times\text{FL}\times \text{rand}(0,1) \tag{11}\]  
where \(rand_{n}\) and (0, 1) is a random number drawn from a Gaussian distribution with a mean of 0 and a standard deviation of 1, and FL is the possibilitythat a scavenger will follow a producer searching for food, whereas FL \(\in\) [0, 2]. When the grower reaches a  
Figure 3: Adaptive binary bird swarm optimization algorithm. newly discovered food source, it will search for it again, while the scrouspers will support themselves from the food source begun by the producer. The proposed ABBSOA and MSSOA technique of clustering routing protocol would use each biosensor's function to detect changes in the patient's health and translate those alterations into electrical energy that can be transmitted to the medical server. ```
1. Input:
2. M: Number of particles
3. fq: Frequency flight characteristics (producing and scrounging)
4. P: Possibility of foraging
5. s, a, c1, c2, FL: Constant variables
6. max_iter: Maximum number of iterations
7. Initialization
8. Find optimal solution
9. Procedure BSA (population, fq, P, max-iter...)
1. for iter = 1 to max-iter do
2. if t % fq \(\
eq\) 0 then
3. for i = 1 to M do
4. if rand \(\leq\) P then
5. Birds forage for food
6. else
7. Birds keep vigilance
8. endif
9. endfor
10. else
11. Divide the population into producers and scroungers
12. for i = 1 to N do
13. If i am a producer, then
14. Update producer individuals
15. else
16. Update scrounger individuals
17. endif
18. endfor
19. endif
20. Calculate (Population)
21. Find objective function
22. Endfor
23. Return Best objective function
24. Endprocess
```  
**Algorithm 1**ABBSOA--Cluster selection algorithm  
Data Collection and Selecting the Best Routes Using the Modified Snake Swarm Optimization Algorithm (MSSOA)  
Due to biological information processing, energy efficiency is essential in WBANs for biological data exchange. This information must be activated during an anomaly or heart rate monitoring. Failure to handle the energy dissipation rate will result in frequent replacement of body nodes. Therefore, effectively utilizing the topic node and CH services is crucial. Biological data compression solutions must also tackle the challenge of handling augmented biological data traffic during multi-hop data transfers and the constraints of area code repositories. This work categorizes routing into two distinct classifications. All internet of things (IoT) nodes initially send biological information to the closest CH node. A node located at the distance of two hops from a CH transmits biological data to a neighbouring node that is only one hop away. This neighbouring node then relays the received biological data to the CH that is closest to it. Next, the CH acquires the biological data and incorporates them. Transfers within a cluster happen after transfers between clusters. Figure 4 provides a comprehensive explanation of the intra-cluster transfer process. The modified snake swarm optimization algorithm is employed to optimize cluster transfer. This technique attempts to select nodes with high residual power during the route selection to maximize power distribution over the network and reduce the transmission distance between the recipient and the CH. When the base station (BS) is beyond the range of the CH node, the CH node transmits biological data to the BS using a multi-hop route.