# A Biologically Inspired Algorithm for Low Energy Clustering Problem in Body Area Network

Authors: Mengying Xu; Jie Zhou
Journal: Journal of Sensors
 (2021)

---

## Abstract

The growing application of body area networks (BANs) in different fields makes the low energy clustering a paramount issue. A clustering optimization algorithm in BANs is a fundamental scheme to guarantee that the essential collected data can be forwarded in a reliable path and improve the lifetime of BANs. Low energy clustering is a technique, which provides a method that shows how to reduce network communication costs in BANs. A careful low energy clustering scheme is one of the most critical means in the research of BANs, which has attracted considerable attention, comprising monitoring capability constraints. However, the classical clustering method leads to high cost when constraints such as large overall energy consumption are undertaken. Hence, a binary immune hybrid artificial bee colony algorithm (BIHABCA), a randomized swarm intelligent scheme applied in BANs, motivated by immune theory and hybrid scheme is introduced. Furthermore, we designed the formulation that considers both distances between two nodes and the length of bits. Finally, we have compared the energy cost optimized by BIHABCA with a shuffled frog leaping algorithm, ant colony optimization, and simulated annealing in the simulation with different quantity of nodes in terms of energy cost. Results show that the energy cost of the network optimized by the proposed BIHABCA method decreased compared to those by the other three methods which mean that the proposed BIHABCA finds the global optima and reduces the energy cost of transmitting and receiving data in BANs.


---

## Body

## 1. Introduction

As a branch of wireless sensor networks (WSN), a special network in medical applications called body area network (BAN) is an important network in biomedical and many other fields, which plays an important role in telemedicine, special population monitoring, and community medical services [1, 2]. It is a special type of sensor network, which has brought tremendous changes to human society. It is used for health care, individual health recovery, and sports, even in social public health to collect the data of electrocardiograph signal, blood pressure, blood sugar, temperature, etc. [3, 4]. BAN is one of the most important networks in telemedicine, special population monitoring (such as infants and the elderly), and community health care and has broad application prospects [5].The typical wireless BAN consists of three parts: medical sensor nodes (the nodes or devices are generally placed on the human body), sink nodes, and network management nodes [6]. BAN is generally constructed with a distributed strategy. Medical sensor nodes and portable mobile devices are employed to collect health data of the human body. The specific process is as follows: sensor nodes collect physiological data by monitoring the human body, and the collected information is transferred to the sink node. The sink node communicates with network management nodes using the Internet, satellite, and other communication methods, which can control and manage the BAN. Medical sensor nodes are evenly distributed in different areas of the human body, including the head, limbs, and trunk. In addition, in order to transmit the collected vital data effectively, the transmission distance, transmission rate, and residual energy of each node must also be fully considered [7, 8]. A BAN consists of distributed autonomous sensor nodes, and each sensing unit consists of sensing boards, processor, short-range radio transmitter unit, and battery. Each node is a small and compact device to sense the healthy data and send to the base station [9–11].Clustering optimization is an important sensor deployment issue in many industrial, consumer, and environmental monitoring applications. The storage capacity of BANs is generally small, which limits the network’s lifetime. In order to save communication energy and further prolong the lifetime of BANs, an effective clustering optimized method is designed to ensure the reasonable allocation of cluster heads on each path and improve transmission speed [12]. However, there are many defects and shortcomings in the research of low energy clustering. Firstly, the random selection of cluster heads leads to uneven distribution of cluster and cluster heads. Secondly, in the cluster head selection, the remaining energy of nodes, the amount of neighboring nodes, and the amount of times that the cluster head has been used are not considered, which aggravates the burden of cluster head and makes the communication energy and lifetime uneven. Thirdly, cluster heads near sink nodes consume more energy and are prone to premature death [13–15].The artificial bee colony algorithm (ABCA) is a swarm intelligent method, which imitates the honey gathering behavior of bees. It is similar to many heuristic algorithms and belongs to an intelligent optimization algorithm. The optimization performance of ABCA is superior because few parameters should be adjusted and the complexity of the algorithm is low. Therefore, it is suitable for solving NP-hard problems, such as a clustering algorithm. However, many other heuristic algorithms, such as ant colony optimization, genetic algorithm, and evolutionary algorithm, have many parameters to adjust and are easy to fall into evolutionary stagnation. Therefore, they are not the optimal methods to optimize the clustering algorithm.In this paper, in order to optimize the position of cluster heads and energy cost of BAN, we propose a binary immune hybrid artificial bee colony algorithm (BIHABCA) in the low energy clustering problem for reducing network communication costs. To solve the problem, the distance between nodes and the number of data are considered to model the low energy clustering problem and introduce the fitness function of calculating energy cost. In BIHABCA, the immune operator and hybrid mechanism are considered into the artificial bee colony algorithm (ABCA) to develop global search capability, and the fitness function for low energy clustering is given to calculate the energy cost of the network in each generation.In the simulation, we compare the BIHABCA with the shuffled frog leaping algorithm (SFLA), ant colony optimization (ACO), and simulated annealing (SA) in BANs with different quantity of cluster heads on the human body. The BIHABCA has demonstrated to have good potential in the optimization scheme of cluster heads to reduce communication energy. It also avoids local optima and improves the quality of solutions. The main contributions are given as follows:(1)
Firstly, the BIHABCA method can successfully minimize the network energy consumption in BANs. After iterations, the energy cost optimized by the BIHABCA is 13.00%, 21.38%, and 27.38% less than SFLA, ACO, and SA, respectively, with 10% cluster heads when the number of nodes in BAN is 100. Furthermore, when the number of nodes increases, the similar conclusions can be deduced by comparing with other three algorithms. The clustering method based on BIHABCA requires less communication energy consumption of nodes in BANs, which can successfully strengthen the energy utilization efficiency(2)
Secondly, the BIHABCA combined with immune and hybrid operators has better performance with no premature convergence. When the cluster head nodes account for 10% and 20% of total sensor nodes, respectively, in BANs. The BIHABCA has higher convergence rate than the SFLA, ACO, and SA. After iteration, the fitness optimized by BIHABCA converges to the optimal value compared with those by the other three algorithms(3)
Finally, total energy cost of a system depends on energy costs on transmission and reception of all node. Therefore, with the increase of the amount of sensors in BANs, the demand for data transferred increases and the energy cost also improves correspondingly


## 2. Related Work

In the initial position management, the medical sensors are arranged arbitrarily in the BANs and different detection areas have different densities. Due to the small sensing radius of the sensor, the energy of the node is not only used for sensing data but also for transmitting data. If the node approaches the sink sensor, more energy is needed for transmitting the data. When the battery is exhausted, the data cannot be transmitted to the sink node, which will lead to the phenomenon of an energy hole. The research hotspot in this field is to optimize this problem by a heuristic swarm intelligent method for the practical situation.In recent years, many researchers use different methods to solve problems of routing, clustering, and mobile sink for WSNs. In the WSN, a clustering strategy depending on a wolf pack algorithm using levy flight is definitely given to enhance the overall efficiency of system in [16]. Through simulation evaluation, a network’s lifetime is steadily raised and the energy efficiency is even better balanced.In [17], the authors give a hexagon beehive model. Nodes are allocated throughout a hexagon arbitrarily. Therefore, the experiment results of the suggested model indicate the improvement in the residual energy between sensors, minimizing over-all energy cost and finally strengthening the life span of the system.In order to reduce the risk of premature sensor death in the system, in [18], a cluster head assortment strategy with ACO-based MDC is given. In the experiment, the suggested approach can easily improve the sensor network lifespan considerably; nevertheless, the computing complex is too high.In [19], the authors study a survey on clustering methods or algorithms reported in WSNs. They notice the clustering algorithms have certainly few overall efficiency in lessening system communication cost. It is also appropriate for limited equipment constraints of WSNs.There is an effective clustering strategy with a hybrid anomaly monitoring technique for misdirection as well as black hole. An experiment was performed to lessen the energy consumption of the system in [20]. The outcomes illustrate that the suggested approach is important in security application.In [21], the change mechanism of sensing radius is proposed to improve the network lifetime. It can be regarded as a linear programming problem. In [22], the lifetime is developed by increasing the number of sensors. Although the method improves the lifetime, it increases the energy consumption of WSN.In BANs, an effective clustering method that considers large scale nodes and computational time is proposed. Experiment data represent that the method improves communication efficiency and lifetimes of networks [23]. Some recent works on the clustering issue are mainly focused on the optimization algorithms which are given in the following in-depth description.In the WSN, the cluster head selection is improved by a grey wolf optimizer that considers both average intracluster distance and residual energy to lessen energy consumption in [24]. The suggested clustering method improved by the grey wolf optimizer is applied to raise the network lifespan. The acquired results show that the overall performance and efficiency of the given method outperform other metaheuristics. It expands network lifetime successfully.In [25], the authors study a gravitational search algorithm to optimize gradient clustering selection in the system. They study the length from the cluster heads to the gateway nodes as well as the remaining energy of the gateway nodes in the model. The suggested gravitational search algorithm is dependent on an evolutionary optimization. Experimental tests display the effectiveness and scalability of the offered strategy and demonstrate a great balance between exploration and search capabilities.Particle swarm optimization is used to lessen the energy optimized dynamic clustering, to additionally choose the ideal cluster head in [26]. In the fitness computation, Manhattan distance is specially designed to compute the shortest route between the cluster heads and the base station. Energy consumption has been decreased by a suggested algorithm.Optimal cluster head selection is explored employing an artificial bee colony metaheuristic in [27]. The provided approach uses an advanced population sampling strategy. The provided technique raises the global convergence and boosts energy effectiveness in a system.In [28], a distributed clustering strategy based on ACO is given to improve communication efficiency. Furthermore, the allocation of cluster heads is selected using the Manhattan distance. Sensing data is transmitted between the two nodes. Experience results show that the energy of the network reduces efficiently. In [29], the SFLA is given in the clustering algorithm in the BAN to reduce total computational time. It can also effectively optimize communication costs after a limited number of iterations. Simulation results show that SFLA effectively extends the BAN’s stable period and lifetime, and the energy consumption is balanced effectively. More heuristic optimization algorithms are introduced in recent years.


## 3. System Model

In this section, after determining how many clusters in the BAN should be divided into, the cluster heads in each cluster must be carefully selected. The distance between nodes, the amount of data, and other factors must be considered when the cluster heads are selected, to make the cluster stable and extend the effective working time of the BANs. Therefore, we build a system model of the low energy clustering problem. With the continuous work to sense data, sensor nodes will stop working because of the exhaustion of energy. Energy cost is used to evaluate the lifetime of the BANs, which is defined as the time from the beginning of the BAN to death.BAN is divided into several clusters, which include cluster member nodes and cluster heads. The normal nodes send medical information to the cluster heads. After that, data is sent to the base station from sink nodes. Cluster effectively saves the total energy consumption of BAN when the amount of information is huge. It is significant to the sensor network for transferring data.The energy cost of a node is mostly consumed in the phase of transmission and reception. The low energy clustering model is simplified, and the wireless communication module is only considered in this paper. The energy consumption required by a sensor to transmit data includes transmission energy and reception energy. Our goal is to calculate the communication cost consumed in the process of transmission energy and reception energy of all sensor nodes in BANs.Energy consumption of transmitting data includes energy consumption of signal transmitting circuit and signal amplifying circuit. Reception energy is the consumption of receiving data in the signal receiving circuit.Transmission energy is related not only to the length of bits but also to the distance of data transmission between nodes. The energy consumed by a node to send data withk bits to another node whose distance is d. Energy costs on transmission and reception of one node are given in
(1)Etk,d=Eelec⋅k+k⋅εamp⋅d3,(2)Erk=Eelec⋅k,where Et is the transmission energy, Er is the reception energy, and Eelec represents the consumption parameter of transmitting or receiving per bit. Furthermore, Eelec⋅k in the above equations represents the energy consumption of transmitting or receiving k bits. εamp is the power amplification parameter. Transmission energy cost can be affected by the distance between two connected nodes.
(3)E=Et+Er.In (3), E is the total energy cost of a node, which includes transmission energy and reception energy.
(4)Esum=∑m=1MEm.Suppose that there areM nodes in the coordinate area. Esum is the total cost of M nodes in BANs.In (5), the function is designed to find the minimum energy of whole medical nodes in BANs when the cluster head nodes are allocated.
(5)f=minEsum,where f indicates the quality of the individuals after clustering. It also means the energy consumption of the allocation scheme of cluster heads in a round when communicating with other nodes. The individual with lower energy consumption in a round has better performance than other individuals.The goal of building the low energy clustering model of BANs is to reduce the energy cost by allocating the cluster head nodes when data is transmitted and received in the network. In this way, the lifetime of BANs is improved effectively.


## 4. BIHABCA for Minimizing Energy Cost in BANs

### 4.1. Basic ABCA

The ABCA is a swarm intelligent method proposed by a Turkish scholar in 2005, which imitates the process of honey gathering of bees. Honeybees carry out different activities and perform the information sharing and selection between the colonies, to further obtain the best solution of the problem. It is similar to many heuristic algorithms and belongs to an intelligent optimization algorithm. Good results have been achieved in solving continuous combinatorial optimization problems [30].Reference [31] proves that the convergence speed of the ABCA is superior to those of heuristic algorithms in solving multiobjective and multiextremum function problems, avoiding falling into local optimum as well as solving engineering problems including complex and multiextremum value. ABC is employed to cope with many projects involving traveling salesman problem, knapsack problem, engineering, software testing, neural networks, job scheduling, etc.In the ABCA, one half of the bees is composed of employed bees, and the other half is composed of onlookers. The amount of employed bees is equal to that of onlookers. A food source represents a possible solution.In the ABCA, each iteration consists of the three parts: employed bees are employed to collect the location of the honey source and calculate its solution; onlookers evaluate the fitness and use wheel roulette selection to calculate the possibility. Food source will be chosen with probability by calculating the value of fitness. Scout bees find a new individual to take the place of the abandoned one.The optimization process of the ABCA is given as follows: firstly, initialize the location of food location and analyze the fitness of each individual. Employed bees generate a new food location nearby as well as assess the fitness of a new individual. Greedy selection is executed between the new solution and the old one [32].After the employed bee has finished the search process, the onlookers evaluate the fitness as well as its location from all the bees in the area and select the honey location according to the probability of fitness. With the increase of the quality of solution of the honey source, the possibility of the honey source to be selected also increases. If a solution is abandoned, the scout bee randomly generates a honey source to replace the abandoned one.


#### 4.1.1. Phase of Employed Bees

In the ABCA, the quantity of food locations is determined by the quantity of employed bees. In the BIHABCA, each bee generates a random locationvn,m as follows:
(6)vn,m=xn,m+φxn,m−xk,mn=1,2,⋯,Nn≠k,where xn,m is the nth food source in the population; m=1,2,⋯,M; M is the dimension of the population; xk,m is another food source near xn,m; φ is a random number subject to mean and distribution, φ∈−1,1; and N represents the number of food locations.If the solution is better than the earlier one, the employed bee will remember the better solution; otherwise, it will still remember the old solution.


#### 4.1.2. Phase of Onlookers

In the ABCA, for each food location in the phase of employed bees, the probability of each individuals being selected in the whole population is calculated in(7)Possibilityn=fitnessn∑n=1Nfitnessn,where fitnessn represents the quality of the nth honey location and Possibilityn is the possibility that the onlooker chooses the food location in the population. It indicates that the honey source with high possibility has better solution to the problem.


#### 4.1.3. Phase of Scout Bees

When an individual optimized many times in the stage of employed bees and onlookers is not improved, it will be discarded. The new honey source will be randomly produced by scout bees after limit times, limit is the upper limit of the algorithm. The new food location is randomly selected depending on (6).


### 4.2. Binary Immune Hybrid Artificial Bee Colony Algorithm

In this paper, the BIHABCA is used to solve the low energy clustering problem in BANs. It is improved in encoding and updating of honey source of BIHABCA in BANs to decrease the total energy cost when monitoring human health data and improve the global exploration abilities of proposed algorithm. The energy clustering problem is regarded as antigen. A possible solution is an antibody. There areN antibodies in the population.The steps of BIHABCA include solution encoding and initialization, fitness evaluation, stage of employed bees, stage of onlookers, stage of scout bees, and termination condition.


#### 4.2.1. Solution Encoding and Initialization

BANs are divided into cluster head nodes and sensing nodes to collect heathy data. Binary coding is used to describe the clustering problem in BANs. In (8), P is a population that contains N antibodies and each antibody represents the mode of M sensors: P=P1,P2,⋯,PN and Pn=pn,1,pn,2,⋯,pn,M. When pn,m=1, the sensor node is a cluster head node. On the contrary, when pn,m=0, the sensor node is a common node. For instance, pn=1,0,0,0,1,0,1,0,0,0 represents that there are 10 nodes in the nth antibody, where the 1st, 5th, and 7th nodes are cluster heads and the rest of the individuals represent ordinary nodes. In (9), the maximum amount of cluster heads in an antibody is T.In the BIHABCA, the initial generation is 0 and the population is optimized forGENmax times.
(8)P=p1,1p1,2⋯p1,M−1p1,Mp2,1p2,2⋯p2,M−1p2,M⋯⋯pn,m⋯⋯pN−1,1pN−1,2⋯pN−1,M−1pN−1,MpN,1pN,2⋯pN,M−1pN,M,(9)T=∑m=1Mpn,m.


#### 4.2.2. Fitness Evaluation

Evaluate the energy cost of each food source in (4) and (5), and record the minimum energy cost and its food source. The fitness function of an individual can be calculated in (5).


#### 4.2.3. Phase of Employed Bees

In the BIHABCA, a honey source represents a feasible solution in the low energy clustering problem in (6) that is randomly generated by employed bees [33, 34]. In addition, the quantity of honey locations is equal to the quantity of employed bees. Employed bees and onlookers are fifty percent of the total amount of bees, respectively. In the low energy clustering problem, the binary updating method is designed to calculate the position of food source. A sigmoid function is given to transform food source as follows:
(10)Sigxn,m=11+exp−xn,m,pn,m=1r,<sigxn,m,0r,≥sigxn,m.


#### 4.2.4. Phase of Onlookers

The onlookers choose the honey source depending on the quality of solution. The probability of the onlookers choosing a honey source based on the energy cost of all nodes in BANs can be calculated in(11)Possibilityn=1/fn∑n=1N1/fn,where Possibilityn is the possibility of the nth individual being selected by onlookers and fn is the energy cost of transmitting data and receiving data in BANs. However, individuals with low energy costs are more likely to be selected. Therefore, fitness is converted to reciprocal to calculate the possibility. In a low energy clustering problem, the food locations with lower communication costs are more likely to be chosen by the onlookers.


#### 4.2.5. Phase of Scout Bees

When an individual is not updated withinlimit times, it should be discarded by employed bees. The scout bees will generate a new food location. In the BIHABCA, a new food location can be randomly generated instead of the abandoned one in
(12)pn,m=1r,≥0.5,0r,<0.5.


#### 4.2.6. Termination Condition

In this work, stop searching when the iteration counter is equal toGENmax, and output the best clustering scheme with the lowest energy cost.


#### 4.2.7. Basic Steps of BIHABCA

The basic steps of the BIHABCA are described as follows:Step 1. Population and its parameters are initialized. Set the quantity of food sources N, limit times in the phase of scout bees, and maximum number of iterations GENmaxStep 2. Binary code is designed to describe the food source in low energy clustering problem. Initial antibodies are randomly createdStep 3. Calculate the affinity (total transmission energy and reception energy of M nodes in BAN), and find the optimal solution. Individuals with lower network energy consumption have better affinityStep 4. Add one iteration, t=t+1Step 5. Add one bee, n=n+1Step 6. Use employed bees to update the food source in (6) and convert to binary code in (7)Step 7. The onlookers are selected according to the probability Possibilityn to produce a new solutionStep 8. If food source is not updated after limit times by employed bees, it will be abandoned. Scout bees will randomly produce a new food source in equation (12)Step 9. The several antibodies with the lowest energy cost in each generation are replaced to update some highest antibodies in population to the next generationStep 10. If GENmax is met, output the best individual and its energy cost. Otherwise, turn to step 4


#### 4.2.8. Computational Complexity Analysis

Computational complexity of the proposed method is considered in this part to demonstrate the performance. The distance and energy cost need to be calculated from each sensor to other sensors. Thus,OM2 complex multiplications are needed in energy calculation in the system model, where M is the number of sensors. For the BIHABCA, each population contains N individuals and each individual represents the working mode of M sensors. The optimization is executed G generation times. Thus, as for the worst situation, the computational complexity in the BIHABCA for minimizing energy cost in BANs is OM2+OGNM.


## 4.1. Basic ABCA

The ABCA is a swarm intelligent method proposed by a Turkish scholar in 2005, which imitates the process of honey gathering of bees. Honeybees carry out different activities and perform the information sharing and selection between the colonies, to further obtain the best solution of the problem. It is similar to many heuristic algorithms and belongs to an intelligent optimization algorithm. Good results have been achieved in solving continuous combinatorial optimization problems [30].Reference [31] proves that the convergence speed of the ABCA is superior to those of heuristic algorithms in solving multiobjective and multiextremum function problems, avoiding falling into local optimum as well as solving engineering problems including complex and multiextremum value. ABC is employed to cope with many projects involving traveling salesman problem, knapsack problem, engineering, software testing, neural networks, job scheduling, etc.In the ABCA, one half of the bees is composed of employed bees, and the other half is composed of onlookers. The amount of employed bees is equal to that of onlookers. A food source represents a possible solution.In the ABCA, each iteration consists of the three parts: employed bees are employed to collect the location of the honey source and calculate its solution; onlookers evaluate the fitness and use wheel roulette selection to calculate the possibility. Food source will be chosen with probability by calculating the value of fitness. Scout bees find a new individual to take the place of the abandoned one.The optimization process of the ABCA is given as follows: firstly, initialize the location of food location and analyze the fitness of each individual. Employed bees generate a new food location nearby as well as assess the fitness of a new individual. Greedy selection is executed between the new solution and the old one [32].After the employed bee has finished the search process, the onlookers evaluate the fitness as well as its location from all the bees in the area and select the honey location according to the probability of fitness. With the increase of the quality of solution of the honey source, the possibility of the honey source to be selected also increases. If a solution is abandoned, the scout bee randomly generates a honey source to replace the abandoned one.


### 4.1.1. Phase of Employed Bees

In the ABCA, the quantity of food locations is determined by the quantity of employed bees. In the BIHABCA, each bee generates a random locationvn,m as follows:
(6)vn,m=xn,m+φxn,m−xk,mn=1,2,⋯,Nn≠k,where xn,m is the nth food source in the population; m=1,2,⋯,M; M is the dimension of the population; xk,m is another food source near xn,m; φ is a random number subject to mean and distribution, φ∈−1,1; and N represents the number of food locations.If the solution is better than the earlier one, the employed bee will remember the better solution; otherwise, it will still remember the old solution.


### 4.1.2. Phase of Onlookers

In the ABCA, for each food location in the phase of employed bees, the probability of each individuals being selected in the whole population is calculated in(7)Possibilityn=fitnessn∑n=1Nfitnessn,where fitnessn represents the quality of the nth honey location and Possibilityn is the possibility that the onlooker chooses the food location in the population. It indicates that the honey source with high possibility has better solution to the problem.


### 4.1.3. Phase of Scout Bees

When an individual optimized many times in the stage of employed bees and onlookers is not improved, it will be discarded. The new honey source will be randomly produced by scout bees after limit times, limit is the upper limit of the algorithm. The new food location is randomly selected depending on (6).


## 4.1.1. Phase of Employed Bees

In the ABCA, the quantity of food locations is determined by the quantity of employed bees. In the BIHABCA, each bee generates a random locationvn,m as follows:
(6)vn,m=xn,m+φxn,m−xk,mn=1,2,⋯,Nn≠k,where xn,m is the nth food source in the population; m=1,2,⋯,M; M is the dimension of the population; xk,m is another food source near xn,m; φ is a random number subject to mean and distribution, φ∈−1,1; and N represents the number of food locations.If the solution is better than the earlier one, the employed bee will remember the better solution; otherwise, it will still remember the old solution.


## 4.1.2. Phase of Onlookers

In the ABCA, for each food location in the phase of employed bees, the probability of each individuals being selected in the whole population is calculated in(7)Possibilityn=fitnessn∑n=1Nfitnessn,where fitnessn represents the quality of the nth honey location and Possibilityn is the possibility that the onlooker chooses the food location in the population. It indicates that the honey source with high possibility has better solution to the problem.


## 4.1.3. Phase of Scout Bees

When an individual optimized many times in the stage of employed bees and onlookers is not improved, it will be discarded. The new honey source will be randomly produced by scout bees after limit times, limit is the upper limit of the algorithm. The new food location is randomly selected depending on (6).


## 4.2. Binary Immune Hybrid Artificial Bee Colony Algorithm

In this paper, the BIHABCA is used to solve the low energy clustering problem in BANs. It is improved in encoding and updating of honey source of BIHABCA in BANs to decrease the total energy cost when monitoring human health data and improve the global exploration abilities of proposed algorithm. The energy clustering problem is regarded as antigen. A possible solution is an antibody. There areN antibodies in the population.The steps of BIHABCA include solution encoding and initialization, fitness evaluation, stage of employed bees, stage of onlookers, stage of scout bees, and termination condition.


### 4.2.1. Solution Encoding and Initialization

BANs are divided into cluster head nodes and sensing nodes to collect heathy data. Binary coding is used to describe the clustering problem in BANs. In (8), P is a population that contains N antibodies and each antibody represents the mode of M sensors: P=P1,P2,⋯,PN and Pn=pn,1,pn,2,⋯,pn,M. When pn,m=1, the sensor node is a cluster head node. On the contrary, when pn,m=0, the sensor node is a common node. For instance, pn=1,0,0,0,1,0,1,0,0,0 represents that there are 10 nodes in the nth antibody, where the 1st, 5th, and 7th nodes are cluster heads and the rest of the individuals represent ordinary nodes. In (9), the maximum amount of cluster heads in an antibody is T.In the BIHABCA, the initial generation is 0 and the population is optimized forGENmax times.
(8)P=p1,1p1,2⋯p1,M−1p1,Mp2,1p2,2⋯p2,M−1p2,M⋯⋯pn,m⋯⋯pN−1,1pN−1,2⋯pN−1,M−1pN−1,MpN,1pN,2⋯pN,M−1pN,M,(9)T=∑m=1Mpn,m.


### 4.2.2. Fitness Evaluation

Evaluate the energy cost of each food source in (4) and (5), and record the minimum energy cost and its food source. The fitness function of an individual can be calculated in (5).


### 4.2.3. Phase of Employed Bees

In the BIHABCA, a honey source represents a feasible solution in the low energy clustering problem in (6) that is randomly generated by employed bees [33, 34]. In addition, the quantity of honey locations is equal to the quantity of employed bees. Employed bees and onlookers are fifty percent of the total amount of bees, respectively. In the low energy clustering problem, the binary updating method is designed to calculate the position of food source. A sigmoid function is given to transform food source as follows:
(10)Sigxn,m=11+exp−xn,m,pn,m=1r,<sigxn,m,0r,≥sigxn,m.


### 4.2.4. Phase of Onlookers

The onlookers choose the honey source depending on the quality of solution. The probability of the onlookers choosing a honey source based on the energy cost of all nodes in BANs can be calculated in(11)Possibilityn=1/fn∑n=1N1/fn,where Possibilityn is the possibility of the nth individual being selected by onlookers and fn is the energy cost of transmitting data and receiving data in BANs. However, individuals with low energy costs are more likely to be selected. Therefore, fitness is converted to reciprocal to calculate the possibility. In a low energy clustering problem, the food locations with lower communication costs are more likely to be chosen by the onlookers.


### 4.2.5. Phase of Scout Bees

When an individual is not updated withinlimit times, it should be discarded by employed bees. The scout bees will generate a new food location. In the BIHABCA, a new food location can be randomly generated instead of the abandoned one in
(12)pn,m=1r,≥0.5,0r,<0.5.


### 4.2.6. Termination Condition

In this work, stop searching when the iteration counter is equal toGENmax, and output the best clustering scheme with the lowest energy cost.


### 4.2.7. Basic Steps of BIHABCA

The basic steps of the BIHABCA are described as follows:Step 1. Population and its parameters are initialized. Set the quantity of food sources N, limit times in the phase of scout bees, and maximum number of iterations GENmaxStep 2. Binary code is designed to describe the food source in low energy clustering problem. Initial antibodies are randomly createdStep 3. Calculate the affinity (total transmission energy and reception energy of M nodes in BAN), and find the optimal solution. Individuals with lower network energy consumption have better affinityStep 4. Add one iteration, t=t+1Step 5. Add one bee, n=n+1Step 6. Use employed bees to update the food source in (6) and convert to binary code in (7)Step 7. The onlookers are selected according to the probability Possibilityn to produce a new solutionStep 8. If food source is not updated after limit times by employed bees, it will be abandoned. Scout bees will randomly produce a new food source in equation (12)Step 9. The several antibodies with the lowest energy cost in each generation are replaced to update some highest antibodies in population to the next generationStep 10. If GENmax is met, output the best individual and its energy cost. Otherwise, turn to step 4


### 4.2.8. Computational Complexity Analysis

Computational complexity of the proposed method is considered in this part to demonstrate the performance. The distance and energy cost need to be calculated from each sensor to other sensors. Thus,OM2 complex multiplications are needed in energy calculation in the system model, where M is the number of sensors. For the BIHABCA, each population contains N individuals and each individual represents the working mode of M sensors. The optimization is executed G generation times. Thus, as for the worst situation, the computational complexity in the BIHABCA for minimizing energy cost in BANs is OM2+OGNM.


## 4.2.1. Solution Encoding and Initialization

BANs are divided into cluster head nodes and sensing nodes to collect heathy data. Binary coding is used to describe the clustering problem in BANs. In (8), P is a population that contains N antibodies and each antibody represents the mode of M sensors: P=P1,P2,⋯,PN and Pn=pn,1,pn,2,⋯,pn,M. When pn,m=1, the sensor node is a cluster head node. On the contrary, when pn,m=0, the sensor node is a common node. For instance, pn=1,0,0,0,1,0,1,0,0,0 represents that there are 10 nodes in the nth antibody, where the 1st, 5th, and 7th nodes are cluster heads and the rest of the individuals represent ordinary nodes. In (9), the maximum amount of cluster heads in an antibody is T.In the BIHABCA, the initial generation is 0 and the population is optimized forGENmax times.
(8)P=p1,1p1,2⋯p1,M−1p1,Mp2,1p2,2⋯p2,M−1p2,M⋯⋯pn,m⋯⋯pN−1,1pN−1,2⋯pN−1,M−1pN−1,MpN,1pN,2⋯pN,M−1pN,M,(9)T=∑m=1Mpn,m.


## 4.2.2. Fitness Evaluation

Evaluate the energy cost of each food source in (4) and (5), and record the minimum energy cost and its food source. The fitness function of an individual can be calculated in (5).


## 4.2.3. Phase of Employed Bees

In the BIHABCA, a honey source represents a feasible solution in the low energy clustering problem in (6) that is randomly generated by employed bees [33, 34]. In addition, the quantity of honey locations is equal to the quantity of employed bees. Employed bees and onlookers are fifty percent of the total amount of bees, respectively. In the low energy clustering problem, the binary updating method is designed to calculate the position of food source. A sigmoid function is given to transform food source as follows:
(10)Sigxn,m=11+exp−xn,m,pn,m=1r,<sigxn,m,0r,≥sigxn,m.


## 4.2.4. Phase of Onlookers

The onlookers choose the honey source depending on the quality of solution. The probability of the onlookers choosing a honey source based on the energy cost of all nodes in BANs can be calculated in(11)Possibilityn=1/fn∑n=1N1/fn,where Possibilityn is the possibility of the nth individual being selected by onlookers and fn is the energy cost of transmitting data and receiving data in BANs. However, individuals with low energy costs are more likely to be selected. Therefore, fitness is converted to reciprocal to calculate the possibility. In a low energy clustering problem, the food locations with lower communication costs are more likely to be chosen by the onlookers.


## 4.2.5. Phase of Scout Bees

When an individual is not updated withinlimit times, it should be discarded by employed bees. The scout bees will generate a new food location. In the BIHABCA, a new food location can be randomly generated instead of the abandoned one in
(12)pn,m=1r,≥0.5,0r,<0.5.


## 4.2.6. Termination Condition

In this work, stop searching when the iteration counter is equal toGENmax, and output the best clustering scheme with the lowest energy cost.


## 4.2.7. Basic Steps of BIHABCA

The basic steps of the BIHABCA are described as follows:Step 1. Population and its parameters are initialized. Set the quantity of food sources N, limit times in the phase of scout bees, and maximum number of iterations GENmaxStep 2. Binary code is designed to describe the food source in low energy clustering problem. Initial antibodies are randomly createdStep 3. Calculate the affinity (total transmission energy and reception energy of M nodes in BAN), and find the optimal solution. Individuals with lower network energy consumption have better affinityStep 4. Add one iteration, t=t+1Step 5. Add one bee, n=n+1Step 6. Use employed bees to update the food source in (6) and convert to binary code in (7)Step 7. The onlookers are selected according to the probability Possibilityn to produce a new solutionStep 8. If food source is not updated after limit times by employed bees, it will be abandoned. Scout bees will randomly produce a new food source in equation (12)Step 9. The several antibodies with the lowest energy cost in each generation are replaced to update some highest antibodies in population to the next generationStep 10. If GENmax is met, output the best individual and its energy cost. Otherwise, turn to step 4


## 4.2.8. Computational Complexity Analysis

Computational complexity of the proposed method is considered in this part to demonstrate the performance. The distance and energy cost need to be calculated from each sensor to other sensors. Thus,OM2 complex multiplications are needed in energy calculation in the system model, where M is the number of sensors. For the BIHABCA, each population contains N individuals and each individual represents the working mode of M sensors. The optimization is executed G generation times. Thus, as for the worst situation, the computational complexity in the BIHABCA for minimizing energy cost in BANs is OM2+OGNM.


## 5. Simulation Results and Analysis

In this section, the energy cost optimized by the BIHABCA method and SFLA, ACO, and SA with different quantities of medical sensors are simulated using MATLAB R2104a. The fitness of algorithms can be calculated in part III. As indicated earlier, the objective function in section III is to calculate the effectiveness of schemes in the low energy clustering problem. We assume that the monitoring area is the hospital. Patients are equipped with sensor nodes to monitor blood pressure, blood sugar, temperature, etc. In the simulation, all sensors are initially considered uniformly distributed in the monitoring area (150m×150m). Optimization times of the BIHABCA, SFLA, ACO, and SA are 100, respectively. Monte Carlo simulation is employed in the experiments. The final result in each generation is the average value of 100 experiments; the advantage of proposed algorithm is statistically significant in the experiment.Some critical parameters in BANs are given as follows:Eelec=50 nJ/bit, εamp=100 pJ/bit/m2, and k=1 Mbps. The total energy cost of receiving data and transmitting data optimized by the BIHABCA will be compared with the SFLA, ACO, and SA.As for the BIHABCA, there are few parameters that have to be adjusted. However, the parameters in BIHABCA are sensitive, because they have to be repeated and tested a number of times in the process of adjusting parameters in the experiments. If the parameters of the BIHABCA are not suitable for the clustering problem, the performance of the algorithm will be reduced and energy cost cannot be optimized effectively.Each controlling parameter has a range of empirical values and they need to be adjusted in the range of empirical values until the optimal energy cost is reached.Table1 gives the description of parameters.Table 1
Description of parameters.
ParametersDescriptionNumber of individualsThe number of individuals is equal to the sum of the employed bees and following bees. The number of employed bees is equal to the number of following beesNumber of iterationsOptimization times of algorithmNumber of food sourceThe number of food source is equal to the number of employed bees. A food source represents a solution of clustering problemLimitNumber of times when there is search honey sourceNumber of groupsA population can be divided into several sub-memeplexesNumber of local iterationsOptimization times of local searchWeight of pheromoneThe pheromones released by ant: it determines the selection of pathWeight of heuristic informationIt determines the possibility that the ant will take the path before it choosesPheromone volatilization coefficientThe rate at which pheromones evaporate over timeInitial temperatureMaximum temperature in the first generationAnnealing temperature coefficientThe rate of temperature dropIn order to ensure that the comparison between the comparative methods is fair, the same values of parameters of the BIHABCA, SFLA, ACO, and SA are given in the compare experiment, which include the consumption parameter of transmitting or receiving per bitEelec, transmitting or receiving k bits, and power amplification parameter εamp. Furthermore, the parameters in the four optimization algorithms are the same, which include experiment times, iteration times, and number of individualsIn Table2, we set the parameters of the BIHABCA, which are tested many times to get the optimal solution. In Tables 3–5, the parameters of the SFLA, ACO, and SA are given, respectively.Table 2
Parameter setting of BIHABCA.
Number of individualsNumber of food sourceLimitNumber of iterations804020100Table 3
Parameter setting of SFLA.
Number of individualsNumber of groupsNumber of local iterationsNumber of iterations80410100Table 4
Parameter setting of ACO.
Number of individualsWeight of pheromoneWeight of heuristicNumber of individualsWeight of pheromone80220.98100Table 5
Parameter setting of SA.
Number of individualsInitial temperatureAnnealing temperature coefficientNumber of iterations803000.85100In Figure1, the examples of clustering schemes optimized by BIHABCA are given from Figures 1(a)–1(d) when the numbers of nodes are 100, 200, 500, and 1000, respectively. In the following figures, the sensing area is a square (150m×150m). Hollow circles mean normal nodes, and filled circles are cluster heads.Figure 1
The changes in the number of sensor nodes and cluster head nodes: (a) 100 nodes; (b) 200 nodes; (c) 500 nodes; (d) 1000 nodes.
(a)(b)(c)(d)The total communication costs of all medical sensors receiving data and transmitting data optimized by BIHABCA, SFLA, ACO and SA, respectively, when with 10% cluster heads are shown from Figures2(a)–2(d). The figures show the energy consumption of the BANs of the BIHABCA, SFLA, ACO, and SA on the low energy clustering problem when the quantities of sensor nodes are 100, 200, 300, and 400, respectively. After 100 runs, BIHABCA yielded much lower energy costs compared with the SFLA, ACO, and SA as shown in Figure 2.Figure 2
The changes in energy cost with 10% cluster head nodes: (a) 100 nodes; (b) 200 nodes; (c) 300 nodes; (d) 400 nodes.
(a)(b)(c)(d)In Figure2(a), the energy optimized by the BIHABCA is 63.71 J when the number of nodes in the BAN is 100. Furthermore, the energy cost of receiving and transmitting data optimized by SFLA is 73.23 J with the same number of nodes in the BAN; the energy optimized by the ACO is 81.04 J, and the energy optimized by SA is the 87.73 J with 100 nodes in the BAN. Compared with the traditional SFLA, ACO, and SA method, the BIHABCA method we designed can, respectively, reduce total transmission energy and reception energy by 13.00%, 21.38%, and 27.38%. Furthermore, the proposed optimized BIHABCA is capable of providing a global optimum solution with a faster convergent speed.Similar results can be obtained in Figures2(b)–2(d). In Figure 2(b), the energy costs of receiving and transmitting data optimized by the BIHABCA, SFLA, ACO, and SA are 111.64 J, 123.72 J, 134.82 J, and 150.60 J, respectively, when the number of medical nodes is 200. In Figure 2(c), the energy costs of receiving and transmitting data optimized by the BIHABCA, SFLA, ACO, and SA are 164.13 J, 179.26 J, 203.92 J, and 218.52 J, respectively, when the number of medical nodes is 300. In Figure 2(d), the energy costs of receiving and transmitting data optimized by the BIHABCA, SFLA, ACO, and SA are 187.56 J, 210.87 J, 220.54 J, and 257.33 J, respectively, with 400 medical nodes. Simulations indicate that BIHABCA can reduce the total energy cost to further extend the lifetime and show the effectiveness of the proposed strategy.As for a very deep analysis from different parameters of different metaheuristics, Figure2 shows the energy cost in the BAN when the percentage of cluster head is 10% and the number of nodes is given from 100 to 400, respectively, based on the BIHABCA, SFLA, ACO, and SA. In the BIHABCA, an immune operator can accelerate the search of honey source location and overcome the shortcomings of random search of the ABCA. It even improves the evolution speed. The improved BIHABCA has a great improvement in search accuracy and stability. As for the SA, the energy cost of the clustering method can be seen from the simulation results. It reduces slowly with the increase of the generation times and falls easily into stagnation state in the later running period of the algorithm. The energy cost optimized by ACO is relatively stable, and the energy cost of BAN is difficult to be reduced. The pheromone volatilization coefficient is a significant factor that effects the energy cost of BAN. A pheromone volatilization coefficient will lead to the ACO falling into the local optimal solution, which affects the global search ability of the algorithm. The frogs in SFLA adopt different jumping way according to steps, and the number of iterations of the subgroup affects the local search ability of the SFLA and reduces the search performance. It can be seen from the figure that under the condition of different numbers of nodes, the energy cost is raised because of the increased number of nodes.In Figure3, the convergence and energy cost of the BIHABCA, SFLA, ACO, and SA are given when the cluster heads are 20% in BANs. In the initial phase of iteration, the convergence speed of the BIHABCA is faster because of the immune and hybrid operator. In the later stage, the convergent speed is slow. However, the BIHABCA performs better in energy efficiency than the SFLA, ACO, and SA. Furthermore, the increase of nodes will lead to the increase of energy consumption. As the amount of cluster heads increases, the amount of transmission data increases. Therefore, the energy consumption of transmission data increases. In addition, the SFLA, ACO, and SA show a slower convergence rate than the BIHABCA. The BIHABCA combined with immune and hybrid operators has better performance with no premature convergence.Figure 3
The changes in energy cost with 20% cluster head nodes: (a) 100 nodes; (b) 200 nodes; (c) 300 nodes; (d) 400 nodes.
(a)(b)(c)(d)As shown in Figure3, the cluster head nodes account for 20% of total sensor nodes in BANs. The figures show energy costs optimized by the BIHABCA, SFLA, ACO, and SA with different numbers of nodes in BANs. It can be seen from Figure 3 that with the increase of cluster heads, the increment of the communication energy cost optimized by the BIHABCA, SFLA, ACO, and SA is continuously increased. The main reason is that the transmission energy and reception energy of total nodes in the communication process increase exponentially with the increase of head sensors. Furthermore, the SFLA, ACO, and SA are easy to fall into premature convergence. The BIHABCA can accelerate the search of honey source location and overcome the shortcomings of random search of the ABCA. At the same time, the immune operator helps the population evolutes toward the optimal search space. It avoids the stagnation of evolution and improves the convergence speed of the algorithm. In conclusion, the performance of the BIHABCA is better than those of the other three algorithms.In Table6, the best results of the BIHABCA, SFLA, ACO, and SA after 100 iterations are shown. After 100 iterations, the results optimized by the four methods are described in Table 5. The BIHABCA indicates the ideal effectiveness to decrease the energy cost with 100 medical nodes. The SFLA, ACO, and SA provide suboptimal results with 200, 300, and 400 nodes, respectively.Table 6
Energy costs optimized by the BIHABCA, SFLA, ACO, and SA for 20% cluster head nodes (J).
Number of nodesBIHABCASFLAACOSA100167.32182.65215.80233.54200184.67207.63242.65286.02300207.37222.50275.82330.62400220.20253.52312.32407.87Tables7 and 8 list the percentage of energy cost reduction optimized by BIHABCA than those by the other three algorithms with 10% cluster heads and 20% cluster heads, respectively. Experiment results show that the BIHABCA method can reduce the network energy consumption in BANs.Table 7
Percentage of energy cost reduction optimized by the BIHABCA than the other three algorithms with 10% cluster heads.
Number of nodesSFLAACOSA10013.00%21.38%27.38%2009.76%16.58%25.87%3008.44%19.51%24.89%40011.05%14.95%27.11%Table 8
Percentage of energy cost reduction optimized by the BIHABCA than the other three algorithms with 20% cluster head nodes.
Number of nodesSFLAACOSA1008.39%22.47%28.35%20011.06%23.81%35.43%3006.80%24.82%37.28%40013.14%29.72%46.01%Table9 shows the comparison of the runtime of the BIHABCA, SFLA, ACO, and SA after 100 iterations when the number of sensors increases and the percentage of cluster heads increases. Each runtime is given with 100 experimental tests. Table 9 shows that runtime is independent of the number of cluster heads. Furthermore, with the increase of sensor number, the computational complexity of algorithms raises, too. Therefore, the runtime of the algorithms also increases.Table 9
Runtime (s).
Percentage of cluster headNumber of sensorsBIHABCASFLAACOSA10%100211.06223.15247.62266.12200357.21367.44393.68451.67300521.12567.90637.56623.34400652.81676.49745.34787.2420%100207.32222.84230.56236.13200364.22374.97387.47413.56300547.81578.92640.02594.23400621.69581.37674.90701.22Figure4 shows the energy cost optimized by the BIHABCA, SFLA, ACO, and SA, respectively, with different numbers of cluster heads. As shown in the following figure, with the increase of the amount of sensors in BANs, the demand for data transferred increases and the energy cost also improves correspondingly.Figure 4
The changes in energy cost with different number of cluster head nodes: (a) 5% cluster heads; (b) 10% cluster heads; (c) 15% cluster heads; (d) 20% cluster heads.
(a)(b)(c)(d)It can be concluded from Figure4 that the clustering method based on BIHABCA requires less communication energy consumption of nodes in BANs, which can effectively improve the energy utilization efficiency.


## 6. Conclusion

Hence, a binary immune hybrid artificial bee colony algorithm (BIHABCA) in low energy clustering optimization in BANs in this paper is introduced to optimize the total energy cost. We first describe the clustering problem intimately and introduce the energy cost formulation. Then, immune and hybrid operators are designed into the ABCA to improve the effectiveness of the system. Extensive tests are carried out to validate the efficiency gain in terms of the energy efficiency when compared with the SFLA, ACO, and SA. After iterations, the energy cost optimized by the BIHABCA is 13.00%, 21.38%, and 27.38% less than those by the SFLA, ACO, and SA, respectively, with 10% cluster heads when the number of nodes in BAN is 100. The increment of the communication energy cost optimized by the BIHABCA, SFLA, ACO, and SA is continuously increased mainly because the transmission energy and reception energy of total nodes in the communication process raise with the increase of the cluster heads. Experiment results show that BIHABCA has minimized communication costs in BANs when compared with the SFLA, ACO, and SA approach with a large quantity of nodes in BANs.



---

*Source: 5525602-2021-04-26.xml*