# A Novel QoS Routing Energy Consumption Optimization Method Based on Clone Adaptive Whale Optimization Algorithm in IWSNs

Authors: Jing Xiao; Yang Liu; Hu Qin; Chaoqun Li; Jie Zhou
Journal: Journal of Sensors
 (2021)

---

## Abstract

Routing requests in industrial wireless sensor networks (IWSNs) are always restricted by QoS. Therefore, finding a high-quality routing path is a key problem. In this paper, a clone adaptive whale optimization algorithm (CAWOA) is designed for reducing the routing energy consumption of IWSNs with QoS constraints, and a novel clone operator is proposed. More importantly, CAWOA innovatively adopts a discrete binary-based routing coding method, which provides strong support for optimal routing schemes. In addition, a novel routing model of IWSNs combined with QoS constraints has been designed, which involves comprehensive consideration of bandwidth, delay, delay jitter, and packet loss rate. Subsequently, in a series of simulations, the proposed algorithm is compared with other heuristic-based routing algorithms, namely, whale optimization algorithm (WOA), simulated annealing (SA), particle swarm optimization (PSO), and genetic algorithm (GA). The simulation results suggest that the CAWOA-based routing algorithm outperforms other methods in terms of routing energy consumption, convergence speed, and optimization ability. Compared with GA, SA, PSO, and WOA under the conditions that the number of nodes is 120, the maximum delay is 120 ms, the maximum delay jitter is 25 ms, the maximum bandwidth is 9 Mbps, and the packet loss rate is 0.02; the energy consumption of CAWOA-based routing is reduced by 12%, 17%, 19%, and 7%, respectively.


---

## Body

## 1. Introduction

With the improvement in productivity and the popularization of industrial automation, industrial wireless sensor networks (IWSNs) have become an important tool for monitoring the production environment [1, 2]. In addition, IWSNs adopt the concept of the Industrial Internet of Things (IIOT); therefore, IWSNs have the characteristics of flexible, mobile, and large scale [3–5]. There is a large number of wireless sensor nodes in IWSNs, and these nodes are connected to the gateway through the Network Manager (NM), thereby transmitting information to the plant automation network. In IWSNs, there are requirements for low latency, high reliability, and real time. To meet these requirements, reasonable planning and careful design of IWSNs are necessary, and the characteristics of sensor devices and the properties of IWSNs make these tasks more complex and challenging.To reduce the transmission distance of data and improve the quality of service (QoS) of IWSN applications, routing optimization is a commonly used method. Routing refers to the data transmission path from the source node to the destination node. Since there are usually many choices for the routing path, the optimal routing is a key issue in IWSNs. The so-called optimal routing represents the path with the least energy consumption of routing under the given evaluation criteria, generally QoS restrictions. Nowadays, there are many literatures on the reasonable planning of IWSN routing, and the effect of routing schemes obtained by different methods and different evaluation criteria is not the same [6].Hizal and Zengin [7] proposed that it is necessary to do research on a novel QoS routing protocol, which not only considers the shortest path and the lowest cost but also studies the coverage, location, energy level, and mobility of the sensor. Therefore, routing algorithms in IWSNs also need to consider QoS constraints. More specifically, Indumathi and Vaithianathan [8] started from the energy consumption and delay in QoS constraints and proposed a scheme that can reduce energy consumption and delay for multiconstrained QoS multicast routing. Vafaei et al. [9] proposed a QoS routing protocol that can increase the average data packet transmission rate in a vehicle ad hoc network. In addition, due to the rapid development of machine learning in recent years, Sun et al. [10] proposed a QoS routing path selection algorithm combined with machine learning, which can improve link congestion.The selection of the optimal routing path under QoS constraints is an NP-hard problem [11]. In this case, heuristic swarm intelligence algorithms may be more applicable for solving the optimal routing problem in IWSNs [12]. Compared with conventional algorithms, the most significant advantage of swarm intelligence algorithms is that they are not limited to the complexity of the problem to be solved. They can obtain a set of potential optimal solutions and use their unique mechanisms to continuously optimize the solution during the iterative process. Therefore, in this paper, we propose a novel clone adaptive whale optimization algorithm (CAWOA), establish a novel routing model in IWSNs with QoS constraints, and prove the effectiveness of the proposed algorithm in reducing routing energy consumption through a series of simulation experiments under different conditions.The main goal of this paper is to find a routing path with the lowest energy consumption in IWSNs under multiple QoS constraints. In general, the main contributions of this paper can be listed as follows:(1)
A novel clone adaptive whale optimization algorithm (CAWOA) is proposed, which combines the advantages of clonal expansion and adaptive operator(2)
CAWOA has made significant innovations to make it applicable for solving the discrete binary-based routing energy optimization problem in IWSNs with QoS constraints(3)
A new cloning operator is proposed, which can perform hierarchical cloning of the population, thus effectively avoiding the situation of local optimum(4)
A novel routing model of IWSNs that comprehensively considers network bandwidth, delay, delay jitter, and packet loss rate is established, and a fitness function for evaluating routing energy consumption is designed(5)
CAWOA is compared with the genetic algorithm, particle swarm optimization, simulated annealing, and whale optimization algorithm in routing energy consumption, convergence speed, and optimization abilityThe structure of this paper is organized as follows. The related works are discussed in Section2. Then, Section 3 shows the IWSN QoS routing model and the fitness function. In Section 4, the process of CAWOA is introduced. Subsequently, there are simulation experiments and discussions of the results in Section 5. Finally, the conclusion is given in Section 6.


## 2. Related Work

In recent years, the problem of wireless sensor QoS routing has attracted more and more people’s attention. In different application scenarios, the QoS constraints that need to be considered are not exactly the same, so the routing energy consumption generated is also different.Nayyar and Singh [13] conducted a comprehensive review of 31 WSN simulators for the convenience of researchers in WSN simulation. Zhang et al. [14] proposed a routing algorithm combining quantum genetics and heuristic Q learning strategy to adapt to rapid changes in the network structure. In addition, to further reduce the routing energy consumption, some energy-saving routing protocols have been designed. Mostafaei et al. [15] modeled the QoS routing problem as a multiconstrained optimal path problem and proposed an algorithm based on distributed learning automata to save it. Zhang et al. [16] proposed a clustering method based on compressed sensing based on the clustering structure of wireless sensor networks, which can reduce the total energy consumption of the network within and between clusters. Mostafaei and Obaidat [17] proposed an algorithm based on irregular cell learning automata, which can reduce energy consumption while ensuring the safety of WSN. However, in IWSNs with QoS constraints, it is also necessary to consider factors such as delay and delay jitter to meet actual production requirements.Many researchers use heuristic algorithms to solve the optimal routing problem. Varshney et al. [18] proposed a lightning-based lion optimization routing algorithm for minimizing the energy consumption in IWSNs. The algorithm determines the most suitable sensor placement method by considering the throughput, lifetime, delay, and coverage area of the sensor. In [19], Xu et al. proposed a routing protocol based on the genetic algorithm. They observe that the minimal sensor node coverage set can be found by avoiding redundant coverage of sensor nodes, thereby reducing the energy consumption of wireless sensor networks. Kirsan et al. proposed a multihop LEACH routing protocol based on simulated annealing to reduce network energy consumption [20]. However, these methods are neglected to consider the convergence speed of the algorithm when optimizing the energy consumption of sensor routing. Thus, some improved algorithms with faster convergence speed have been proposed. Kavitha and Velusamy [21] proposed a routing algorithm that combines genetic algorithm and simulated annealing. Bilandi et al. [22] proposed a hybrid routing algorithm based on simulated annealing and particle swarm optimization (PSO) to optimize energy consumption. Similar to [21, 22], Mohanakrishnan and Ramakrishnan [23] designed a routing protocol combining the genetic algorithm and whale optimization algorithm (WOA). However, these methods have the possibility of falling into a local optimum. Nayyar and Singh [24] proposed an energy-saving routing protocol that optimizes the real-time performance of WSN. The protocol is based on ant colony optimization and can provide the best solution in terms of throughput and packet delivery. Duan et al. [25] proposed a hybrid IWSN solution based on a task-oriented model and used heuristic modeling methods to design collaborative routing algorithms, thereby reducing the energy consumption of wireless nodes and data communication delays. Jin et al. [26] proposed a convergent broadcast scheduling algorithm for IWSNs with multiple radio interfaces and, based on this algorithm, proposed a fast heuristic algorithm to minimize routing under the time constraints of industrial production. To solve the load balancing and fault tolerance in QoS routing, Moussa and El Alaoui [27] proposed a routing protocol based on ant colony optimization and unequal clustering, which improves the convergence speed of the algorithm and avoids local optimization. However, the parameters used in these routing algorithms are all fixed and lack the ability to dynamically adjust the algorithm parameters along with the running process.With the purpose of minimizing the energy consumption of IWSN routing under QoS constraints, we propose a novel IWSN routing model. The model takes into account the impact of QoS constraints that are very important in IWSNs on routing energy consumption, including delay, bandwidth, delay jitter, and packet loss rate. In addition, a novel clone adaptive whale optimization algorithm (CAWOA) is proposed to solve the routing path with the lowest energy consumption. Compared with other algorithms for routing optimization, CAWOA has faster convergence speed, higher solution quality, and stronger ability to jump out of the local optimum. Furthermore, the important parameters in CAWOA can be dynamically adjusted along with the running process of the algorithm, thereby enhancing its ability to search for the solution space.


## 3. System Model

### 3.1. Problem Description

IWSNs include sensor nodes, sink nodes, gateway nodes, and base stations. Normally, the sensor nodes send data to the sink nodes, the sink nodes receive the data and transmit it to the gateway nodes after preliminary processing, and then, the gateway nodes transmit the data to the base station so that the technical staff can plan the next step according to the data content. Since the principle of routing from sensor nodes to sink nodes is the same as that of routing from sink nodes to a gateway node, the optimal routing of IWSNs can be defined as the path with the lowest routing energy consumption under QoS constraints. An industrial wireless sensor network with 6 sensor nodes, 8 sink nodes, and one gateway node is shown in Figure1.Figure 1
Composition of an industrial wireless sensor network.In IWSNs, the main energy consumption of sensor nodes comes from data transmission, which is the so-called routing energy consumption. Routing refers to the data transmission path from the specified source node to the destination node. As shown in Figure2, there are many paths from node A to node D, such as A→E→D, A→D, and A→C→D. In the routing energy consumption optimization problem of IWSNs with QoS constraints, it is not that the less the number of nodes passing by, the lower the energy consumption of the routing, but the overall energy consumption of a route is obtained through a combination of multiple factors.Figure 2
Route map in IWSNs.Subsequently, to solve the routing energy consumption optimization problem of IWSNs with QoS constraints, the mathematical model is given in Sections3.2 and 3.3.


### 3.2. Sensing Model

In the IWSN sensing model, since the sensing capabilities of sensors are limited, nodes can only transmit data to other nodes within the sensing range. The specific perception method is shown in(1)sa,b1,ifnodebiswithinthesensingrangeofnodea,0,otherwise,where Sa,b is the perception ability of node a to node b. If Sa,b=1, it means that a can send data to b; otherwise, it cannot.


### 3.3. QoS Routing Model

The IWSN routing model with QoS constraints can be represented by an undirected weight graphG=<V,E>, where E is the collections of node links in the undirected weight graph and V represents the set of all nodes. Each link in G represents a direct path between two adjacent nodes. QoS routing is defined as finding an optimal path that satisfies QoS constraints and minimization of energy consumption. In actual factory production, five evaluation parameters are usually used as QoS constraints in IWSNs. They are delay, delay jitter, bandwidth, cost, and packet loss rate.Delay represents the average time it takes for data packets to be transmitted in IWSNs. Delay jitter denotes the fluctuation of data packet transmission time. Bandwidth refers to the amount of data that the sensor can transmit per unit time. Packet loss rate is the loss or damage of data packets during transmission. The above factors will affect the routing transmission quality of IWSNs. What is more, the specific QoS function definition is shown in Table1.Table 1
QoS function definition.
Function nameAbbreviationDefinitionDelayDLAverage duration of data transmissionDelay jitterDLJFluctuations of the transmission timeBandwidthBWThe amount of data per unit timePacket loss ratePLRData loss during transmissionCostCThe overhead of data transmissionGiven a source nodei and destination node h in the IWSNs, a path P that satisfies equations (2), (3), (4), and (5) and has the lowest transmission cost is a QoS routing request that can be accepted:
(2)BWi≥Blim,(3)∑i∈EPDLi+∑h∈VPDLh≤DLlim,(4)∑i∈EPDLJi+∑h∈VPDLJh≤DLJlim,(5)PLRh≤PLRlim,where Blim, DLlim, DLJlim, and PLRlim, respectively, represent the constraint values for bandwidth, delay, delay jitter, and packet loss rate in QoS routing. EP is the collection of links on the routing request P, and VP is the set of nodes on the route request P. In the IWSN QoS routing model, we first define the total number of sensor nodes in G as n=V, the source node s belongs to V, and the destination node d∈V−s. Then, with the purpose of measuring the advantage of a route, we have defined 5 measurement functions in Table 1, which are delay function, delay jitter function, bandwidth function, packet loss rate function, and cost function. These five functions are represented by equations (6), (7), (8), (9), and (10), respectively,
(6)DLrs,d=∑e∈rs,dDLe+∑n∈rs,dDLn,(7)BWrs,d=minBWe,e∈rs,d,(8)DLJrs,d=∑e∈rs,dDLJe+∑n∈rs,dDLJn,(9)PLRrs,d=1−∏n∈rs,d1−PLRn,(10)Crs,d=∑e∈rs,dCe,where rs,d represents all paths between the node s and the node d that meet the QoS constraints. Then, the routing energy consumption optimization problem of IWSNs is to find the path with the least energy consumption that satisfies equations (2), (3), (4), and (5) at the same time.Specifically,Ce can be represented by
(11)Ce=Ca+Cb.In (11), Ce is the total energy consumption between two adjacent nodes, which is composed of Ca and Cb. Ca represents the energy consumption of data transmission, and Cb denotes the energy consumption of receiving information between two nodes.Assuming that the distance between two nodes isdist and the amount of information transmitted is x bits, the energy consumption Ca of the transmitted information can be expressed as
(12)Cax,d=Ee⋅x+ηamp⋅x⋅dist3.In (12), Ee is the energy parameter. The power amplification parameter ηamp used for multipath fading determines the energy of the amplifier. dist and x are the distance between two nodes and the number of bits, respectively. In addition, the power consumption Cb for receiving information is shown as
(13)Cbx=Ee⋅x.With the purpose of evaluating the energy consumption of routing, a fitness function is designed as shown in(14)fitness=minCA+DLA∗1+DLJA+PLRA∗PLCr∗BWA.In (14), A=rvs,vd represents all routing paths that meet the QoS constraints from the node s to the node d in IWSNs. CA is the energy consumption between two nodes, DLA is the delay between two nodes, DLJA is the delay jitter, PLRA is the packet loss rate, PLC is the cost of packet loss, and BWA is the network bandwidth. r is the bandwidth factor. However, if a route fails to meet QoS constraints, which include delay, delay jitter, bandwidth, packet loss rate, and cost, then the route request will be discarded.The design reason for the fitness function (14) is that an optimal route should consider not only the energy consumption of data transmission but also other factors that affect the overall routing. These factors include data transmission delay, delay jitter, packet loss rate, and bandwidth. The increase in delay will cause the degradation of routing quality, and the delay is not fixed, so the delay jitter must be considered. In addition, there is no guarantee that every transmission is successful during data transmission; therefore, the packet loss rate is used to deal with this situation. After the loss of packet, there is a corresponding packet loss cost, and PLC is used to indicate the packet loss cost. It also considers the bandwidth of data transmission. Usually, the routing performance is proportional to the bandwidth. Since the bandwidth will fluctuate due to the influence of the actual environment, the bandwidth factor r is introduced for regulation. In general, a qualified route in IWSNs has the necessity of taking QoS factors into consideration.


## 3.1. Problem Description

IWSNs include sensor nodes, sink nodes, gateway nodes, and base stations. Normally, the sensor nodes send data to the sink nodes, the sink nodes receive the data and transmit it to the gateway nodes after preliminary processing, and then, the gateway nodes transmit the data to the base station so that the technical staff can plan the next step according to the data content. Since the principle of routing from sensor nodes to sink nodes is the same as that of routing from sink nodes to a gateway node, the optimal routing of IWSNs can be defined as the path with the lowest routing energy consumption under QoS constraints. An industrial wireless sensor network with 6 sensor nodes, 8 sink nodes, and one gateway node is shown in Figure1.Figure 1
Composition of an industrial wireless sensor network.In IWSNs, the main energy consumption of sensor nodes comes from data transmission, which is the so-called routing energy consumption. Routing refers to the data transmission path from the specified source node to the destination node. As shown in Figure2, there are many paths from node A to node D, such as A→E→D, A→D, and A→C→D. In the routing energy consumption optimization problem of IWSNs with QoS constraints, it is not that the less the number of nodes passing by, the lower the energy consumption of the routing, but the overall energy consumption of a route is obtained through a combination of multiple factors.Figure 2
Route map in IWSNs.Subsequently, to solve the routing energy consumption optimization problem of IWSNs with QoS constraints, the mathematical model is given in Sections3.2 and 3.3.


## 3.2. Sensing Model

In the IWSN sensing model, since the sensing capabilities of sensors are limited, nodes can only transmit data to other nodes within the sensing range. The specific perception method is shown in(1)sa,b1,ifnodebiswithinthesensingrangeofnodea,0,otherwise,where Sa,b is the perception ability of node a to node b. If Sa,b=1, it means that a can send data to b; otherwise, it cannot.


## 3.3. QoS Routing Model

The IWSN routing model with QoS constraints can be represented by an undirected weight graphG=<V,E>, where E is the collections of node links in the undirected weight graph and V represents the set of all nodes. Each link in G represents a direct path between two adjacent nodes. QoS routing is defined as finding an optimal path that satisfies QoS constraints and minimization of energy consumption. In actual factory production, five evaluation parameters are usually used as QoS constraints in IWSNs. They are delay, delay jitter, bandwidth, cost, and packet loss rate.Delay represents the average time it takes for data packets to be transmitted in IWSNs. Delay jitter denotes the fluctuation of data packet transmission time. Bandwidth refers to the amount of data that the sensor can transmit per unit time. Packet loss rate is the loss or damage of data packets during transmission. The above factors will affect the routing transmission quality of IWSNs. What is more, the specific QoS function definition is shown in Table1.Table 1
QoS function definition.
Function nameAbbreviationDefinitionDelayDLAverage duration of data transmissionDelay jitterDLJFluctuations of the transmission timeBandwidthBWThe amount of data per unit timePacket loss ratePLRData loss during transmissionCostCThe overhead of data transmissionGiven a source nodei and destination node h in the IWSNs, a path P that satisfies equations (2), (3), (4), and (5) and has the lowest transmission cost is a QoS routing request that can be accepted:
(2)BWi≥Blim,(3)∑i∈EPDLi+∑h∈VPDLh≤DLlim,(4)∑i∈EPDLJi+∑h∈VPDLJh≤DLJlim,(5)PLRh≤PLRlim,where Blim, DLlim, DLJlim, and PLRlim, respectively, represent the constraint values for bandwidth, delay, delay jitter, and packet loss rate in QoS routing. EP is the collection of links on the routing request P, and VP is the set of nodes on the route request P. In the IWSN QoS routing model, we first define the total number of sensor nodes in G as n=V, the source node s belongs to V, and the destination node d∈V−s. Then, with the purpose of measuring the advantage of a route, we have defined 5 measurement functions in Table 1, which are delay function, delay jitter function, bandwidth function, packet loss rate function, and cost function. These five functions are represented by equations (6), (7), (8), (9), and (10), respectively,
(6)DLrs,d=∑e∈rs,dDLe+∑n∈rs,dDLn,(7)BWrs,d=minBWe,e∈rs,d,(8)DLJrs,d=∑e∈rs,dDLJe+∑n∈rs,dDLJn,(9)PLRrs,d=1−∏n∈rs,d1−PLRn,(10)Crs,d=∑e∈rs,dCe,where rs,d represents all paths between the node s and the node d that meet the QoS constraints. Then, the routing energy consumption optimization problem of IWSNs is to find the path with the least energy consumption that satisfies equations (2), (3), (4), and (5) at the same time.Specifically,Ce can be represented by
(11)Ce=Ca+Cb.In (11), Ce is the total energy consumption between two adjacent nodes, which is composed of Ca and Cb. Ca represents the energy consumption of data transmission, and Cb denotes the energy consumption of receiving information between two nodes.Assuming that the distance between two nodes isdist and the amount of information transmitted is x bits, the energy consumption Ca of the transmitted information can be expressed as
(12)Cax,d=Ee⋅x+ηamp⋅x⋅dist3.In (12), Ee is the energy parameter. The power amplification parameter ηamp used for multipath fading determines the energy of the amplifier. dist and x are the distance between two nodes and the number of bits, respectively. In addition, the power consumption Cb for receiving information is shown as
(13)Cbx=Ee⋅x.With the purpose of evaluating the energy consumption of routing, a fitness function is designed as shown in(14)fitness=minCA+DLA∗1+DLJA+PLRA∗PLCr∗BWA.In (14), A=rvs,vd represents all routing paths that meet the QoS constraints from the node s to the node d in IWSNs. CA is the energy consumption between two nodes, DLA is the delay between two nodes, DLJA is the delay jitter, PLRA is the packet loss rate, PLC is the cost of packet loss, and BWA is the network bandwidth. r is the bandwidth factor. However, if a route fails to meet QoS constraints, which include delay, delay jitter, bandwidth, packet loss rate, and cost, then the route request will be discarded.The design reason for the fitness function (14) is that an optimal route should consider not only the energy consumption of data transmission but also other factors that affect the overall routing. These factors include data transmission delay, delay jitter, packet loss rate, and bandwidth. The increase in delay will cause the degradation of routing quality, and the delay is not fixed, so the delay jitter must be considered. In addition, there is no guarantee that every transmission is successful during data transmission; therefore, the packet loss rate is used to deal with this situation. After the loss of packet, there is a corresponding packet loss cost, and PLC is used to indicate the packet loss cost. It also considers the bandwidth of data transmission. Usually, the routing performance is proportional to the bandwidth. Since the bandwidth will fluctuate due to the influence of the actual environment, the bandwidth factor r is introduced for regulation. In general, a qualified route in IWSNs has the necessity of taking QoS factors into consideration.


## 4. CAWOA-Based Routing Algorithm for Minimizing Energy Consumption in IWSNs with QoS Constraints

To optimize the routing energy consumption of IWSNs with QoS constraints, a novel clone adaptive whale optimization algorithm (CAWOA) is proposed. The whale optimization algorithm (WOA) has low computational complexity. In the early stage of the algorithm, WOA performs a global search, while in the later stage of the algorithm, it performs a local search, which can effectively obtain the routing path that meets the QoS constraints. Compared with other heuristic algorithms, WOA’s local search ability is stronger. Its major disadvantage is that it is easy to fall into the local optimum. However, the addition of the clone operator can effectively avoid the emergence of local optimal conditions. Furthermore, WOA has a faster convergence speed; this advantage can make it have higher practicability. As a result, CAWOA is inspired by the traditional WOA but has made significant improvements in convergence speed and optimization capabilities. By using CAWOA, the optimal routing path with the least energy consumption can be found; therefore, the network lifetime of IWSNs can be effectively extended for saving factory costs. In addition, different from the traditional WOA, the significant improvement of the CAWOA is the addition of the clone operator and the adaptive operator.The process of CAWOA includes population coding and initialization, calculating fitness and finding the leading whale, adaptive encircling predation, bubble-net attacking, random search for prey, cloning operation, and termination operation.


### 4.1. Population Coding and Initialization

The first step of applying CAWOA to the routing energy consumption optimization problem of IWSNs is to determine the encoding method. It is difficult to achieve the expected goal using conventional decimal coding in the routing problem, because the data does not need to pass through all nodes during the routing process, and the optimal routing is the path that has minimal energy consumption under the QoS constraints. Therefore, binary encoding is a desirable coding method, which has the characteristics of simple and easy encoding and decoding. Under the problem of binary encoding, 1 means passing through the node, and 0 means not passing through the node. Assuming there are 5 sensor nodes in IWSNs, the binary code of the individual whale can be expressed as(15)whale=1,0,1,1,1.In (15), since the source node and the destination node must be passed, the first and last bits are both 1. In addition, the third and fourth bits are also 1, indicating that the nodes through which the data passes during this routing process are the first, third, fourth, and fifth nodes. However, equation (15) cannot indicate the order of access between nodes. For example, we do not know whether to pass through the third node or the fourth node first, so the application of equation (15) needs to be combined with
(16)order=randpermN,where N is the quantity of sensors and randpermN is a function to scramble the number. If N=5, randpermN can be 3,4,2,5,1. Since the starting point number is always 1, the destination point number is always N, so the logical routing order is 1,3,4,2,5. Combining equation (15), it can be concluded that the actual route is 1,4,2,5, so that the optimal solution search for the problem can be realized in the entire solution space.After determining the coding method of the individual whale, the encoding of the whale population can be expressed as(17)pop=w1,1w1,2⋯w1,M−1w1,Mw2,1w2,2⋯w2,M−1w2,M⋮wn,m⋮wN−1,1wN−1,2⋯wN−1,M−1wN−1,MwN,1wN,2⋯wN,M−1wN,Mwn,m∈0,1.In (17), N is the number of whales and M is the number of sensors. In the initialization process, the first column and the last column are all set to 1, and the remaining positions are initialized randomly.


### 4.2. Calculating Fitness and Finding the Leading Whale

In the routing energy consumption optimization problem with QoS constraints, the fitness value of the whale represents the energy consumption of a route. Before other operations of CAWOA, it is necessary to calculate the fitness of each individual to find the position of the leading whale. The fitness value of each individual is obtained according to formula (14). Different from traditional WOA, CAWOA uses binary coding when encoding the population, so there is no need to judge whether the position is out of bounds, which reduces the computational complexity of the algorithm to a certain extent. What is more, the whale with the lowest fitness is the leading whale, and its position will affect the activities of other whales.


### 4.3. Adaptive Encircling Predation

In CAWOA, the predation behavior of whales symbolizes the process of finding the optimal solution in the QoS routing energy consumption optimization problem. In the problem, the individual whale finds the position of the prey first and then surrounds the prey. The prey can be regarded as the leading whale, which means that other whales update their positions toward the position of the leader whale for carrying out the predation operation. Therefore, the first step in encircling predation is to calculate the distance between the individual whale and the leading whale, which is derived from(18)D=C⋅W∗gen−Wgen,where gen is the current iteration, W∗gen represents the position of the leading whale in the genth generation, and W∗gen should be updated during each iteration if a better solution appears. Wgen denotes the position of the individual whale in the genth generation, and the constant C is the coefficient vector, which is calculated adaptively by
(19)C=C1−C1−C2fc−favgfmax−favg,fc≥favg,C1,fc<favg,where fc is the fitness value of the current whale, favg is the average fitness value of the population, fmax is the fitness value of the leading whale, and C1 and C2 are two constants.Then, the position of the leading whale affects the update of the position of the individual whale, and its formula is shown in(20)Wgen+1=Wgen−A⋅D,where A is another coefficient vector, which is calculated by
(21)A=A1−A1−A2fc−favgfmax−favg,fc≥favg,A1,fc<favg,where fc, fmax, and favg are the same as those in equation (19) and A1 and A2 are two constants.The addition of adaptive operators allows CAWOA to dynamically adjust the parameters according to the fitness value when the whale is preying, which speeds up the convergence speed of the algorithm.


### 4.4. Bubble-Net Attacking

In the problem of IWSN routing energy consumption optimization under QoS constraints, the bubble-net attacking behavior of whales helps to find a better solution. There are two strategies for simulating the bubble-net attacking: one is the shrinking encircling mechanism, and the other is the spiral updating position.In CAWOA, the shrinking encircling means that the position update of the whale is performed according to equation (20). The coefficient vector A can be adaptively adjusted according to the fitness of the population. If the value of A is between −1,1, the updated position of the current whale can be any value between its own position and the position of the leading whale.The spiral updating position means that whales swim to the surface with a spiral posture and spit out varying size bubbles for preying on shrimp and fish. In this stage, the distance between the whale and the leading whale is first calculated, and the calculation formula is shown in(22)D′=W∗gen−Wgen.Then, the individual whale updates its position, as shown in(23)Wgen+1=D′⋅ebl⋅cos2πl+W∗gen,where b is the spiral constant, l is a random number in −1,1, and W∗gen denotes the position of the leading whale in the genth generation. Assuming that the probability of performing the two bubble-net attacking behaviors of the whale during the predation process is 0.5, the update formula of the whale position can be summarized as
(24)Wgen+1=W∗gen−A⋅D,r<0.5,D′⋅ebl⋅cos2πl+W∗gen,r≥0.5,where r is a random number and r∈0,1.


### 4.5. Random Search for Prey

With the purpose of avoiding falling into a local optimum in solving the IWSN routing energy optimization problem under QoS constraints, the position of the whale in CAWOA cannot be updated only by the position of the leading whale, and sometimes, it must be updated with the position of the partner. Specifically, CAWOA at this stage is to conduct a random search for prey and obtain the next position of the whale, and this operation is carried out under the influence of the coefficient vectorA. If ∣A∣>1, CAWOA conducts the random search behavior, thereby increasing the global search ability of the algorithm, as shown in
(25)D=C⋅Wr−Wgen,(26)Wgen+1=Wr−A⋅D,where Wr can be a random position in the whale population.


### 4.6. Cloning Operation

In CAWOA, the cloning operation is inspired by the concept of cloning in biology, and its purpose is to improve the local search capability and convergence speed of the algorithm. Normally, the optimal solution of the IWSN routing problem with QoS constraints is related to the optimal individual in the current iteration process; however, traditional WOA performs many unnecessary operations. Therefore, the cloning operation can effectively improve the performance of the algorithm by expanding the number of individuals with high fitness. The cloning operation in CAWOA is divided into two parts: one is clonal expansion, and the other is high-probability mutation. The purpose of high-probability mutation operation is to reduce the possibility of falling into a local optimum, and for the same purpose, clonal expansion generally uses the way of multilevel cloning. The pseudocode of the cloning operation is shown in Algorithm1.Algorithm 1: Clonal expansion and high-probability mutation.
Input: The population sorted according to the energy consumption value from small to large is set to pop1, the number of individuals is pop_num,Output: The cloned population is set to pop21.  First perform multi-level cloning operations2.for p ∈ [1, pop_num]3.if p<pop_num×0.24.      Assign the individual of pop1(1) to pop2(p)5.else if p <pop_num×0.56.      Assign the individual of pop1(2) to pop2(p)7.else if p <pop_num×0.78.      Assign the individual of pop1(3) to pop2(p)9.else10.      Assign the individual of pop1(4) to pop2(p)11.end if12.end for13.  Then perform high-probability mutation operations14.for p ∈ [1, pop_num]15.    r is a random number and r∈ [0,1]16.if r<0.317.      Perform mutation operation on pop2(p)18.end if19.end for20.  Return pop_2


### 4.7. Termination Operation

If CAWOA reaches the specified number of iterations, the algorithm stops looping and outputs the result; otherwise, it returns to Section4.2.


### 4.8. Steps of CAWOA

The specific steps can be expressed as follows.Step 1.
Determine the number of sensors and the population size, randomly generate the location of sensor nodes in the monitoring area, and randomly generate whale locations. Initialize the parameters of the CAWOA and set the initial iterationgen=1.Step 2.
Calculate the fitness of individual whales according to equation (14) and compare them, select the leading whale, and define it as W∗.Step 3.
Entering the main loop of the algorithm, ifr<0.5 and ∣A∣<1, then the whale individual updates its position according to Wgen+1=Wgen−A⋅D; otherwise, it updates its position with Wgen+1=Wr−A⋅D. If r>0.5, the individual whale updates its position according to Wgen+1=D′⋅ebl⋅cos2πl+W∗gen.Step 4.
Update coefficient vectorC and A according to equations (19) and (21).Step 5.
Calculate and sort the fitness value of the whale population according to equation (14), perform cloning operation according to Algorithm 1, and then perform mutation operations on the cloned population with high probability.Step 6.
Calculate the fitness value according to equation (14), find the globally optimal individual and set it as W∗, and set the cloned population as the initial population for the next iteration.Step 7.
gen=gen+1, if the maximum number of iterations of the algorithm is reached, the algorithm ends; otherwise, go to Step 3 to continue the iteration.Step 8.
Output the optimal solutionW∗.The flow chart of CAWOA can be expressed in Figure3.Figure 3
Steps of CAWOA.


## 4.1. Population Coding and Initialization

The first step of applying CAWOA to the routing energy consumption optimization problem of IWSNs is to determine the encoding method. It is difficult to achieve the expected goal using conventional decimal coding in the routing problem, because the data does not need to pass through all nodes during the routing process, and the optimal routing is the path that has minimal energy consumption under the QoS constraints. Therefore, binary encoding is a desirable coding method, which has the characteristics of simple and easy encoding and decoding. Under the problem of binary encoding, 1 means passing through the node, and 0 means not passing through the node. Assuming there are 5 sensor nodes in IWSNs, the binary code of the individual whale can be expressed as(15)whale=1,0,1,1,1.In (15), since the source node and the destination node must be passed, the first and last bits are both 1. In addition, the third and fourth bits are also 1, indicating that the nodes through which the data passes during this routing process are the first, third, fourth, and fifth nodes. However, equation (15) cannot indicate the order of access between nodes. For example, we do not know whether to pass through the third node or the fourth node first, so the application of equation (15) needs to be combined with
(16)order=randpermN,where N is the quantity of sensors and randpermN is a function to scramble the number. If N=5, randpermN can be 3,4,2,5,1. Since the starting point number is always 1, the destination point number is always N, so the logical routing order is 1,3,4,2,5. Combining equation (15), it can be concluded that the actual route is 1,4,2,5, so that the optimal solution search for the problem can be realized in the entire solution space.After determining the coding method of the individual whale, the encoding of the whale population can be expressed as(17)pop=w1,1w1,2⋯w1,M−1w1,Mw2,1w2,2⋯w2,M−1w2,M⋮wn,m⋮wN−1,1wN−1,2⋯wN−1,M−1wN−1,MwN,1wN,2⋯wN,M−1wN,Mwn,m∈0,1.In (17), N is the number of whales and M is the number of sensors. In the initialization process, the first column and the last column are all set to 1, and the remaining positions are initialized randomly.


## 4.2. Calculating Fitness and Finding the Leading Whale

In the routing energy consumption optimization problem with QoS constraints, the fitness value of the whale represents the energy consumption of a route. Before other operations of CAWOA, it is necessary to calculate the fitness of each individual to find the position of the leading whale. The fitness value of each individual is obtained according to formula (14). Different from traditional WOA, CAWOA uses binary coding when encoding the population, so there is no need to judge whether the position is out of bounds, which reduces the computational complexity of the algorithm to a certain extent. What is more, the whale with the lowest fitness is the leading whale, and its position will affect the activities of other whales.


## 4.3. Adaptive Encircling Predation

In CAWOA, the predation behavior of whales symbolizes the process of finding the optimal solution in the QoS routing energy consumption optimization problem. In the problem, the individual whale finds the position of the prey first and then surrounds the prey. The prey can be regarded as the leading whale, which means that other whales update their positions toward the position of the leader whale for carrying out the predation operation. Therefore, the first step in encircling predation is to calculate the distance between the individual whale and the leading whale, which is derived from(18)D=C⋅W∗gen−Wgen,where gen is the current iteration, W∗gen represents the position of the leading whale in the genth generation, and W∗gen should be updated during each iteration if a better solution appears. Wgen denotes the position of the individual whale in the genth generation, and the constant C is the coefficient vector, which is calculated adaptively by
(19)C=C1−C1−C2fc−favgfmax−favg,fc≥favg,C1,fc<favg,where fc is the fitness value of the current whale, favg is the average fitness value of the population, fmax is the fitness value of the leading whale, and C1 and C2 are two constants.Then, the position of the leading whale affects the update of the position of the individual whale, and its formula is shown in(20)Wgen+1=Wgen−A⋅D,where A is another coefficient vector, which is calculated by
(21)A=A1−A1−A2fc−favgfmax−favg,fc≥favg,A1,fc<favg,where fc, fmax, and favg are the same as those in equation (19) and A1 and A2 are two constants.The addition of adaptive operators allows CAWOA to dynamically adjust the parameters according to the fitness value when the whale is preying, which speeds up the convergence speed of the algorithm.


## 4.4. Bubble-Net Attacking

In the problem of IWSN routing energy consumption optimization under QoS constraints, the bubble-net attacking behavior of whales helps to find a better solution. There are two strategies for simulating the bubble-net attacking: one is the shrinking encircling mechanism, and the other is the spiral updating position.In CAWOA, the shrinking encircling means that the position update of the whale is performed according to equation (20). The coefficient vector A can be adaptively adjusted according to the fitness of the population. If the value of A is between −1,1, the updated position of the current whale can be any value between its own position and the position of the leading whale.The spiral updating position means that whales swim to the surface with a spiral posture and spit out varying size bubbles for preying on shrimp and fish. In this stage, the distance between the whale and the leading whale is first calculated, and the calculation formula is shown in(22)D′=W∗gen−Wgen.Then, the individual whale updates its position, as shown in(23)Wgen+1=D′⋅ebl⋅cos2πl+W∗gen,where b is the spiral constant, l is a random number in −1,1, and W∗gen denotes the position of the leading whale in the genth generation. Assuming that the probability of performing the two bubble-net attacking behaviors of the whale during the predation process is 0.5, the update formula of the whale position can be summarized as
(24)Wgen+1=W∗gen−A⋅D,r<0.5,D′⋅ebl⋅cos2πl+W∗gen,r≥0.5,where r is a random number and r∈0,1.


## 4.5. Random Search for Prey

With the purpose of avoiding falling into a local optimum in solving the IWSN routing energy optimization problem under QoS constraints, the position of the whale in CAWOA cannot be updated only by the position of the leading whale, and sometimes, it must be updated with the position of the partner. Specifically, CAWOA at this stage is to conduct a random search for prey and obtain the next position of the whale, and this operation is carried out under the influence of the coefficient vectorA. If ∣A∣>1, CAWOA conducts the random search behavior, thereby increasing the global search ability of the algorithm, as shown in
(25)D=C⋅Wr−Wgen,(26)Wgen+1=Wr−A⋅D,where Wr can be a random position in the whale population.


## 4.6. Cloning Operation

In CAWOA, the cloning operation is inspired by the concept of cloning in biology, and its purpose is to improve the local search capability and convergence speed of the algorithm. Normally, the optimal solution of the IWSN routing problem with QoS constraints is related to the optimal individual in the current iteration process; however, traditional WOA performs many unnecessary operations. Therefore, the cloning operation can effectively improve the performance of the algorithm by expanding the number of individuals with high fitness. The cloning operation in CAWOA is divided into two parts: one is clonal expansion, and the other is high-probability mutation. The purpose of high-probability mutation operation is to reduce the possibility of falling into a local optimum, and for the same purpose, clonal expansion generally uses the way of multilevel cloning. The pseudocode of the cloning operation is shown in Algorithm1.Algorithm 1: Clonal expansion and high-probability mutation.
Input: The population sorted according to the energy consumption value from small to large is set to pop1, the number of individuals is pop_num,Output: The cloned population is set to pop21.  First perform multi-level cloning operations2.for p ∈ [1, pop_num]3.if p<pop_num×0.24.      Assign the individual of pop1(1) to pop2(p)5.else if p <pop_num×0.56.      Assign the individual of pop1(2) to pop2(p)7.else if p <pop_num×0.78.      Assign the individual of pop1(3) to pop2(p)9.else10.      Assign the individual of pop1(4) to pop2(p)11.end if12.end for13.  Then perform high-probability mutation operations14.for p ∈ [1, pop_num]15.    r is a random number and r∈ [0,1]16.if r<0.317.      Perform mutation operation on pop2(p)18.end if19.end for20.  Return pop_2


## 4.7. Termination Operation

If CAWOA reaches the specified number of iterations, the algorithm stops looping and outputs the result; otherwise, it returns to Section4.2.


## 4.8. Steps of CAWOA

The specific steps can be expressed as follows.Step 1.
Determine the number of sensors and the population size, randomly generate the location of sensor nodes in the monitoring area, and randomly generate whale locations. Initialize the parameters of the CAWOA and set the initial iterationgen=1.Step 2.
Calculate the fitness of individual whales according to equation (14) and compare them, select the leading whale, and define it as W∗.Step 3.
Entering the main loop of the algorithm, ifr<0.5 and ∣A∣<1, then the whale individual updates its position according to Wgen+1=Wgen−A⋅D; otherwise, it updates its position with Wgen+1=Wr−A⋅D. If r>0.5, the individual whale updates its position according to Wgen+1=D′⋅ebl⋅cos2πl+W∗gen.Step 4.
Update coefficient vectorC and A according to equations (19) and (21).Step 5.
Calculate and sort the fitness value of the whale population according to equation (14), perform cloning operation according to Algorithm 1, and then perform mutation operations on the cloned population with high probability.Step 6.
Calculate the fitness value according to equation (14), find the globally optimal individual and set it as W∗, and set the cloned population as the initial population for the next iteration.Step 7.
gen=gen+1, if the maximum number of iterations of the algorithm is reached, the algorithm ends; otherwise, go to Step 3 to continue the iteration.Step 8.
Output the optimal solutionW∗.The flow chart of CAWOA can be expressed in Figure3.Figure 3
Steps of CAWOA.


## 5. Results and Discussion

We made the following assumptions in the simulation:(1)
Delay, bandwidth, delay jitter, and packet loss exist in the link and affect routing(2)
The node is stimulated by physical signals before sending data(3)
There are sending energy and receiving energy. The sending node generates sending energy by sending data, and the receiving node generates receiving energy by receiving dataTo prove the effectiveness of the proposed algorithm in reducing the energy consumption of IWSN routing with QoS constraints, a series of simulations is carried out, and CAWOA is compared with the whale optimization algorithm, particle swarm optimization, genetic algorithm, and simulated annealing. The simulation experiment includes the trend of the algorithm for reducing the routing energy consumption, the speed of algorithm convergence, the percentage of energy consumption obtained after optimization, and the trend graph of energy consumption in large-scale IWSNs. Different types of simulations are carried out under different numbers of sensors, which can better reflect the practicality of the algorithm. In addition, all simulations are performed on a computer equipped with R7 4800H 2.9 GHz CPU, and the fitness function used in the algorithms is according to formula (14).For the IWSN routing energy optimization problem with QoS constraints, the unified definition of public parameters helps to compare algorithms in a relatively fair situation. Therefore, the population size of the algorithms is set to 40, the number of iterations is set to 100, the sensors in IWSNs are distributed in a square area with a side length of 400, and the sensor coordinates are generated randomly. Specifically, CAWOA uses multilevel cloning, with the mutation probability set to 0.2,C1 is 2, C2 is 0.5, A1=2, and A2=−2. The genetic algorithm uses a two-point crossover method with a crossover probability of 0.7, and the probability of mutation is set to 0.05. The initial temperature of simulated annealing is set to 200, and an exponential annealing method with an annealing coefficient of 0.96 is adopted. The individual learning factor and social learning factor of the particle swarm optimization algorithm are both 2, the weighting factor ωmax is 0.9, and ωmin is 0.4. In the whale optimization algorithm, if the position is positive, set it to 1; otherwise, it is 0. Table 2 shows the simulation parameters in Figure 4.Table 2
Simulation parameters in Figure4.
SensorsDelay (max)Delay jitter (max)Bandwidth (max)Packet loss rate (max)Figure4(a)3050 ms10 ms6 Mbps0.01Figure4(b)4060 ms15 ms6 Mbps0.01Figure4(c)5070 ms20 ms7 Mbps0.01Figure4(d)6080 ms25 ms7 Mbps0.01Figure 4
Energy consumption comparing five algorithms: (a) 30 sensors; (b) 40 sensors; (c) 50 sensors; (d) 60 sensors.
(a)(b)(c)(d)In Figures4(a)–4(d), the graphs of the optimization of routing energy consumption by five algorithms are shown. It can be found in Figure 4(a) that the convergence speeds of GA, SA, and PSO are slow, while CAWOA and WOA converge faster than them. However, WOA is stuck in premature convergence, and the routing energy consumption 6.98 J obtained by WOA is not the optimal solution. In contrast, CAWOA obtains the optimal routing solution with an energy consumption of 5.83 J while maintaining a faster convergence speed. In Figure 4(b), CAWOA has achieved lower routing energy consumption than other algorithms at the beginning of the iteration, and this trend has been maintained until the termination of the algorithm. In Figure 4(c), the performance shown by SA is the most unsatisfactory, followed by PSO, GA, and WOA which have roughly the same performance when the number of iterations reaches 70. The 7.04 J obtained through CAWOA optimization is the optimal value among the five algorithms. What is more, in Figure 4(d) with 60 sensor nodes, the energy consumption value obtained by the CAWOA-based routing algorithm is 10.39 J, while the results obtained by GA, SA, PSO, and WOA are 17.39 J, 23.82 J, 20.28 J, and 14.42 J, respectively; the percentages of CAWOA’s solution better than GA, SA, PSO, and WOA are 40.25%, 56.39%, 48.77%, and 27.98%, respectively. Table 3 shows the simulation parameters in Figure 5.Table 3
Simulation parameters in Figure5.
SensorsDelay (max)Delay jitter (max)Bandwidth (max)Packet loss rate (max)Figure5(a)4080 ms10 ms6 Mbps0.01Figure5(b)6090 ms20 ms7 Mbps0.01Figure5(c)80100 ms30 ms8 Mbps0.01Figure5(d)100110 ms40 ms9 Mbps0.01Figure 5
Convergence iteration comparison.Figure5 shows the changes in convergence iterations required by the five algorithms as the number of sensor nodes in IWSNs increases. In the case of 40 sensor nodes, the convergence iterations required by the routing algorithm based on GA, SA, PSO, and WOA are 46, 39, 44, and 37, respectively, while the CAWOA-based routing algorithm only needs 34 iterations, so convergence speed of CAWOA is faster than that of GA, SA, PSO, and WOA. When the number of sensor nodes increases to 60, 80, and 100, the iterations required for the CAWOA-based routing algorithm to achieve convergence are 42, 47, and 48, respectively. It can be seen from Figure 5 that the convergence iterations of CAWOA are less than that of GA, SA, PSO, and WOA, which can prove that CAWOA has a good convergence performance. Table 4 shows the simulation parameters in Figure 6.Table 4
Simulation parameters in Figure6.
SensorsDelay (max)Delay jitter (max)Bandwidth (max)Packet loss rate (max)Figure6(a)6060 ms10 ms6 Mbps0.01Figure6(b)8080 ms15 ms7 Mbps0.01Figure6(c)100100 ms20 ms8 Mbps0.02Figure6(d)120120 ms25 ms9 Mbps0.02Figure 6
Comparison of energy consumption optimized by algorithms: (a) 60 sensors; (b) 80 sensors; (c) 100 sensors; (d) 120 sensors.
(a)(b)(c)(d)In Figures6(a)–6(d), in order to prove the quality of the solution obtained by the CAWOA-based routing algorithm in IWSNs with QoS constraints, pie charts of the energy consumption results obtained by the five algorithms are shown. Figure 6(a) suggests that the energy consumption of routing based on CAWOA accounts for 12% and is the lowest among the five algorithms, while the energy consumption based on GA, SA, PSO, and WOA accounts for 20%, 28%, 23%, and 17%, respectively. More importantly, with the increase in the number of sensor nodes, the energy consumption obtained by the CAWOA-based routing algorithm has been maintained at a low level. The energy consumption ratio is 11%, 10%, and 9% in Figures 6(b)–6(d), respectively. Especially in Figure 6(d), where there are 120 sensor nodes in its simulation conditions, the energy consumption of the CAWOA-based routing algorithm is much lower than that based on GA, SA, PSO, and WOA. Their proportions are 21%, 26%, 28%, and 16%, respectively. In general, the CAWOA-based routing algorithm has the capability of obtaining excellent routing schemes under certain QoS constraints in IWSNs. Table 5 shows the simulation parameters in Figure 7.Table 5
Simulation parameters in Figure7.
SensorsDelay (max)Delay jitter (max)Bandwidth (max)Packet loss rate (max)Figure7(a)5070 ms10 ms6 Mbps0.02Figure7(b)10080 ms15 ms7 Mbps0.02Figure7(c)15090 ms20 ms8 Mbps0.02Figure7(d)200100 ms25 ms9 Mbps0.02Figure 7
Line charts of energy consumption comparison of algorithms in large-scale IWSNs: (a) 50 sensors; (b) 100 sensors; (c) 150 sensors; (d) 200 sensors.
(a)(b)(c)(d)In the real industrial production environment, there is often a large number of sensor nodes in IWSNs. Therefore, Figures7(a)–7(d) show the routing performance based on different algorithms in large-scale IWSNs with QoS constraints. Firstly, in Figure 7(a) with 50 nodes, it is obvious that the energy consumption of the CAWOA-based routing algorithm is lower than that of CA, SA, PSO, and WOA. In the first 10 iterations, the energy consumption of CAWOA-based routing is reduced to 12.31 J, while the energy consumption based on CA, SA, PSO, and WOA only reached 18.79 J, 23.08 J, 20.67 J, and 16.29 J. Then, the number of sensor nodes in Figures 7(b)–7(d) is 100, 150, and 200, respectively, and the energy consumption of the CAWOA-based routing algorithm is always lower than that of GA, SA, PSO, and WOA. The results clearly demonstrate that the CAWOA-based routing algorithm solves the problem of IWSN routing optimization with a large number of nodes by its slow growth of routing energy consumption, which is beneficial for saving the energy of the IWSNs. Table 6 shows the further comparison of routing energy consumption in large-scale IWSNs with QoS constraints. Table 7 shows the simulation parameters in Table 6.Table 6
Comparison of optimization results of algorithms.
Number of sensorsRouting energy consumption (J)GASAPSOWOACAWOA10027.4833.9546.5123.3713.9420062.9193.1274.5158.1422.18300101.46115.67131.80100.9435.94400144.34161.05185.89134.3358.78500213.56236.23270.84191.2192.89Table 7
Simulation parameters in Table6.
SensorsDelay (max)Delay jitter (max)Bandwidth (max)Packet loss rate (max)10060 ms10 ms6 Mbps0.0120070 ms15 ms7 Mbps0.0130080 ms20 ms8 Mbps0.0140090 ms25 ms9 Mbps0.02500100 ms30 ms10 Mbps0.02According to the results in Table6, the energy consumption of the CAWOA-based routing algorithm is always the lowest among the five algorithms. With the continuous expansion of IWSNs, the energy consumption based on GA, SA, PSO, and WOA has risen sharply, while the energy consumption of routing based on CAWOA has always been maintained at a low value. When the number of nodes is 100, 200, 300, 400, and 500, the energy consumption values of CAWOA-based routing are 13.94 J, 22.18 J, 35.94 J, 58.78 J, and 92.89 J, respectively. Therefore, the algorithm CAWOA proposed in this paper can effectively reduce energy consumption in large-scale IWSNs with QoS constraints.


## 6. Conclusions

The purpose of this paper is to reduce the routing energy consumption of IWSNs under the QoS constraints; therefore, a novel clone adaptive whale optimization algorithm (CAWOA) is designed. The significant innovation of CAWOA is the adoption of the latest adaptive technology and cloning operation. What is more, the routing method of IWSNs is optimized and the energy consumption of the network is reduced. In addition, under the premise of considering the QoS constraints in IWSNs, we designed a novel IWSN routing model that takes into account the influence of network bandwidth, delay, delay jitter, and packet loss rate on sensor routing energy consumption. Subsequently, CAWOA is compared with the genetic algorithm, whale optimization algorithm, particle swarm optimization, and simulated annealing for proving its optimization of IWSN routing energy consumption with QoS constraints. The simulation results show that the proposed routing algorithm based on CAWOA is better than other algorithms in terms of routing energy consumption, convergence speed, and optimization capability. In addition, CAWOA is especially suitable for large-scale IWSNs. As the number of sensor nodes increases, the effect of CAWOA-based routing algorithms in reducing energy consumption becomes more obvious. Therefore, it can be concluded that the application of CAWOA can effectively reduce the routing energy consumption in IWSNs.Future research should consider more complex IWSNs, including but not limited to heterogeneous IWSNs and mobile IWSNs. In addition, in more complex situations, machine learning technology can be used as a powerful tool, such as reinforcement learning, to further improve the reliability of IWSNs and reduce routing energy consumption.



---

*Source: 5579252-2021-04-23.xml*