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.

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 [35]. 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 ability

The structure of this paper is organized as follows. The related works are discussed in Section 2. 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.

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 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 Figure 1.

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 Figure 2, there are many paths from node to node , such as , , and . 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.

Subsequently, to solve the routing energy consumption optimization problem of IWSNs with QoS constraints, the mathematical model is given in Sections 3.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 where is the perception ability of node to node . If , it means that can send data to ; otherwise, it cannot.

3.3. QoS Routing Model

The IWSN routing model with QoS constraints can be represented by an undirected weight graph , where is the collections of node links in the undirected weight graph and represents the set of all nodes. Each link in 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 Table 1.

Given a source node and destination node in the IWSNs, a path that satisfies equations (2), (3), (4), and (5) and has the lowest transmission cost is a QoS routing request that can be accepted: where , , , and , respectively, represent the constraint values for bandwidth, delay, delay jitter, and packet loss rate in QoS routing. is the collection of links on the routing request , and is the set of nodes on the route request . In the IWSN QoS routing model, we first define the total number of sensor nodes in as , the source node belongs to , and the destination node . 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, where represents all paths between the node and the node 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, can be represented by

In (11), is the total energy consumption between two adjacent nodes, which is composed of and . represents the energy consumption of data transmission, and denotes the energy consumption of receiving information between two nodes.

Assuming that the distance between two nodes is and the amount of information transmitted is bits, the energy consumption of the transmitted information can be expressed as

In (12), is the energy parameter. The power amplification parameter used for multipath fading determines the energy of the amplifier. and are the distance between two nodes and the number of bits, respectively. In addition, the power consumption for receiving information is shown as

With the purpose of evaluating the energy consumption of routing, a fitness function is designed as shown in

In (14), represents all routing paths that meet the QoS constraints from the node to the node in IWSNs. is the energy consumption between two nodes, is the delay between two nodes, is the delay jitter, is the packet loss rate, is the cost of packet loss, and is the network bandwidth. 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 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 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

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 where is the quantity of sensors and is a function to scramble the number. If , can be . Since the starting point number is always 1, the destination point number is always , so the logical routing order is . Combining equation (15), it can be concluded that the actual route is , 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

In (17), is the number of whales and 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 where is the current iteration, represents the position of the leading whale in the generation, and should be updated during each iteration if a better solution appears. denotes the position of the individual whale in the generation, and the constant is the coefficient vector, which is calculated adaptively by where is the fitness value of the current whale, is the average fitness value of the population, is the fitness value of the leading whale, and and 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 where is another coefficient vector, which is calculated by where , , and are the same as those in equation (19) and and 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 can be adaptively adjusted according to the fitness of the population. If the value of is between , 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

Then, the individual whale updates its position, as shown in where is the spiral constant, is a random number in , and denotes the position of the leading whale in the 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 where is a random number and .

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 vector A. If , CAWOA conducts the random search behavior, thereby increasing the global search ability of the algorithm, as shown in where 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 Algorithm 1.

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 pop2
1.  First perform multi-level cloning operations
2.  for p ∈ [1, pop_num]
3.    if p<pop_num×0.2
4.      Assign the individual of pop1(1) to pop2(p)
5.    else if p <pop_num×0.5
6.      Assign the individual of pop1(2) to pop2(p)
7.    else if p <pop_num×0.7
8.      Assign the individual of pop1(3) to pop2(p)
9.    else
10.      Assign the individual of pop1(4) to pop2(p)
11.    end if
12.  end for
13.  Then perform high-probability mutation operations
14.  for p ∈ [1, pop_num]
15.    r is a random number and r∈ [0,1]
16.    if r<0.3
17.      Perform mutation operation on pop2(p)
18.    end if
19.  end for
20.  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 Section 4.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 iteration .

Step 2. Calculate the fitness of individual whales according to equation (14) and compare them, select the leading whale, and define it as .

Step 3. Entering the main loop of the algorithm, if and , then the whale individual updates its position according to ; otherwise, it updates its position with . If , the individual whale updates its position according to .

Step 4. Update coefficient vector and 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 , and set the cloned population as the initial population for the next iteration.

Step 7. , 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 solution .

The flow chart of CAWOA can be expressed in Figure 3.

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 data

To 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, is 2, is 0.5, , and . 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 is 0.9, and 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.

In Figures 4(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.

Figure 5 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.

In Figures 6(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.

In the real industrial production environment, there is often a large number of sensor nodes in IWSNs. Therefore, Figures 7(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.

According to the results in Table 6, 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.

Data Availability

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.

Disclosure

The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Conflicts of Interest

The authors declare no conflict of interest.

Acknowledgments

This paper was funded by the Corps innovative talents plan, grant number 2020CB001; project of Youth and Middleaged Scientific and Techno-logical Innovation Leading Talents Program of the Corps, grant number 2018CB006; China Postdoctoral Science Foundation, grant number 220531; Funding Project for High Level Talents Research in Shihezi University, grant number RCZK2018C38; and Project of Shihezi University, grant number ZZZC201915B.