# Intelligent Optimization of QoS in Wireless Sensor Networks Using Multiobjective Grey Wolf Optimization Algorithm

Authors: Seyed Reza Nabavi; Nafiseh Osati Eraghi; Javad Akbari Torkestani
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

With the advancement of technology and the emergence of new types of communication networks, new solutions have emerged to protect the environment and monitor natural resources. Wireless sensor networks (WSNs) have revolutionized environmental science and research by embedding sensors in environments where constant access and monitoring by manpower is difficult. WSNs have a variety of uses in the military, environmental monitoring, medicine, robotics, and so on. With the advent of applications in WSNs, the fundamental problem of the network has also increased. The performance of WSNs is influenced by various parameters that are varied according to the applications. In general, the performance of a WSN is typically specified through its average energy use, which determines the lifespan of the grid. A WSN should acquire the ability for controlling the overall performance of the network for ensuring the transmission of information based on quality of service (QoS) parameters in order to maximize the satisfaction of the services for the application. Therefore, we provided a multiobjective grey wolf optimization algorithm (QAMO-GWO) in order to optimize routing and improve QoS in WSNs. In the proposed method, sensor nodes receive information about the environment over regular periods of time and send it to the cluster heads in each. The selection of cluster heads in each cluster is done using a multiobjective grey wolf optimization algorithm. MO-GWO algorithm via balancing QoS parameters tries for selecting the optimal cluster heads. Finally, simulation outputs showed that the proposed method has been able to improve QoS criteria due to balancing the goals in the network.


---

## Body

## 1. Introduction

WSNs have been constructed of the nodes that consist of a microcontroller, a sensor, and radio transmitter. Sensors that have various uses may be employed in all areas that show good performance. Sensors are mainly classified based on readiness for deployment, focusing on deployment with regard to economics and engineering efficiency, cost, and scalability. However, the main category of these sensors is presented as chemical, biological, and physical sensors. WSNs contain a data distribution network and an information network. A central station manages and controls this network. Data Acquisition Network: A WSN will be employed to obtain data from various fields. These data are transmitted to the main station through different wireless distribution methods. The wireless distribution techniques entail transmission with cell phones, WLAN, computers, and Wi-Fi. After reaching the data to the main station, the data analysis and additional processing are performed. The major features of WSN include energy recovery, abilities to address the node failure, node mobility, node heterogeneity, ability to withstand harsh environmental conditions, simplified utilization, and scalability in large-scale deployment. These properties guarantee various sensor network applications [1, 2].Extremely effective applications of wireless sensor networks have increased acceptance and use in many research and application areas. However, the inherent limitations of sensor nodes and the error-prone nature of the wireless channels, such as lower bandwidth, limited power, limited processing capability, and short communication range, create difficulties for using WSN. Slowly, in general, limited energy is a major problem of sensor nodes and WSNs [3]. Depending on the application of environmental monitoring, sensor nodes begin their work by receiving information from the relevant environment. Depending on the system requirements, this node can perform several calculations on the information. After calculation, this information should be sent to the base stations for processing. Because of the absence of infrastructure like routers, these sensor nodes can be used as a source node or router in the field of data transmission [4, 5]. The sensor node will receive energy required for sensing information from the environment and then send and receive information from a connected battery, which cannot be usually recharged. Battery life also determines the sensor node life, and hence, existing energy must be used wisely [6, 7].In general, the performance of a WSN would be commonly specified by its average power use, which in turn determines the life of the network (the period for which the network remains in operation) [6]. WSN should be able to control the overall performance of the network to ensure data transmission based on the quality of service (QoS) parameters. QoS is defined as a collective effect of service performance, which determines the level of service satisfaction for the user. In general, QoS justifies communication networks, control, and evaluation of devices. QoS refers to the evaluation and management of latency parameters, packet loss in a network, and power consumption and seeks to properly configure the protocol to obtain the appropriate response to these variables [8]. However, it may be stated that energy use in the WSNs plays the maximum part in estimating QoS parameters. Since the highest level of the use of energy in sensor nodes is associated with the power necessary to send information, therefore, optimal routing methods can, in addition to transmitting information in several steps, lead to energy management in WSN and increase life expectancy sensor and network nodes [9].Achieving maximum WSN lifetime is as difficult and complex as traditional optimization problems, which means that efficient mechanisms can be useful in extending the life of such a network. According to publications, due to low computational capacity and the need for real-time, deterministic algorithms and traditional search algorithms may not be able to provide solutions that can be used for WSN. Instead, light and fast metaheuristic algorithms can meet near-optimal solutions for such an environment by considering QoS constraints [10, 11].Sensor nodes need to consume energy to transmit information, which if the data are transmitted over long distances, the energy loss of these nodes will increase, and soon these nodes will fail and cause disruption in the overall performance. Hence, the need for techniques to reduce the energy consumption of nodes includes clustering. In clustering, data are sent to the hole through cluster heads, so the selection of cluster head should be based on parameters such as proximity to other nodes and more residual energy and so on to be balanced energy consumption and increase the life of the network. Therefore, clustering and selection of optimal cluster heads greatly affect network performance.Providing an optimal routing approach in a wireless sensor network to overcome existing limitations is as difficult and complex as NP-hard optimization issues. Therefore, deterministic and traditional search algorithms do not have the ability to provide near-optimal solutions at the right time for routing the wireless sensor network. They have been able to provide near-optimal solutions for the wireless sensor network.Therefore, in this research, intelligent optimization of QoS in wireless sensor networks has been proposed. In this method, the QoS optimization algorithm (QAMO-GWO) is used to optimize routing and improve QoS in desert monitoring networks. In the proposed method, the sensor nodes receive data related to the environment at regular intervals and then transmit it to the base station. For sending information, this proposed technique uses multistep routing in which the algorithm dynamically decides to select a threaded node to send data in each step. To select clustered nodes, the proportional function of the extra-exploratory algorithm sets the evaluation objectives based on QoS parameters including data latency, data delivery rate, and residual energy of the nodes; hence, nodes with the shortest distance ratio. Then, the source node and have the lowest estimated distance from the destination node, and the greatest value of the evaluation function is chosen as the node to send data. The data aggregated in each cluster head travel to the base station through other cluster heads. In the proposed method, a local search is performed in order to find local optimizations. It is expected that by finding local optimizations in each step, global optimizations will be obtained throughout the network for optimal routing.The structure of the continuation of the article is as follows: in Section 2, a review of the literature is provided. Moreover, in Section 3, proposed method is presented, and Section 4 presents the implementation and evaluation of the proposed procedure. Finally, Section 5 concludes the paper and suggests further research.


## 2. Related Works

Due to the widespread use of metaheuristic search methods in the field of routing in WSNs, this section of the article will review previous works.In [12], we introduce the grey wolf optimization (GWO) hybrid three-level cluster routing protocol algorithm for WSNs followed by a centralized selection for level one, where the base station contributes centrally to the selection of the cluster head. At level 2, we provide a GWO routing for data transmission so that nodes can choose the optimal route to the base station for saving higher energies, and a distributed clustering according to the cost function would be presented for level 3.In [13], a cluster head optimization model is introduced in wireless sensor networks by applying grey wolf optimization. Optimizing cluster heads in WSN greatly affects network life. Grey wolf optimization (GWO) has a variety of successful applications. Therefore, it has been adapted and used here to solve the problem of choosing a clue. Additionally, one of the modified iterative factors has been proposed for enhancing the local search abilities in the cluster head selection for improving cluster head search accuracy.In [14], for adapting to the real situation, the process energy use of the nodes would be limited, and a three-phase energy heterogeneous network model would be designed. Then, for node convergence, repeated transport of tasks, and complicated energy clustering, via a combination of the optimum number of the cluster heads with the GWO algorithm, one of the novel fitness functions would be designed, which measures the remaining energy of the nodes and merge the distance from the node to the base station.Moreover, [15] presented a routing based on the tree aggregation protocol. In case of sensing a message by the sensor node in the network, the optimal neighbor node would be selected according to the optimal channel quality, the least energy consumed, and the lowest sensor node temperature. The sensor node temperature would be directly proportionate to the number of packets sent and proportional to the time elapsed inversely since the last packet sent by the node. The optimally selected neighbor or parent node has a close distance to the source node, high residual energy, and low temperature.In [16], one of the novel clustering algorithms is proposed, which chooses the cluster head with the use of the grey wolf optimization algorithm. To select the cluster heads, the solutions would be graded according to the anticipated energy usage and the residual energy flow of all nodes. For improving the efficiency of energy, this new protocol utilizes a similar clustering in several consecutive cycles, which enables this protocol to store the energy needed to modify the clustering. A new two-hop routing algorithm is also proposed to transfer data between clusters that are far from the base station, and thus, this technique is proven to guarantee the least and most balanced energy usage while remaining nodes of communication. They apply the single hop.In [17], using a grey wolf optimization algorithm (DBSCDS-GWO) algorithm to achieve a stable, balanced, and efficient WSN, a distance-based dominant set-based set method is proposed. A stable distance-based clustering algorithm using GWO (DBSC-GWO) is also proposed to improve the performance of cluster WSN.In [18], a fuzzy grey wolf optimization algorithm based on the low-consumption clustering protocol on the sensitive threshold is proposed to extend the network stability period.In [19], a new energy efficiency protocol according to the GWO has been provided, which is referred to as the improved GWO based on the fitness value. This takes into account a fitness to improve the optimum solution in GWO that would ensure a more acceptable distribution of the CHs and thus a more balanced cluster structure. Considering the distance to the headboard as well as a base station, the transmission distance of the sensor nodes is recalculated to reduce energy consumption.In [20], an energy-aware routing protocol according to the multiobjective particle swarm optimization algorithm has been proposed. Fitness function of the particle swarm optimization algorithm for selecting the optimum cluster head based on QoS goals like residual energy, end-to-end delay, delivery rate, and link quality. This new protocol has less energy consuming and extends network lifetime due to balancing the goals of QoS criteria than other protocols.In [21], a new topology control algorithm according to the binary GWO has been presented. This algorithm employs the active and inactive program of the sensor nodes in the binary format and the proportion function to minimize the number of active nodes to achieve the goal of extending the life of the network and nodes. As can be seen, previous methods have used the grey wolf optimization algorithm to improve energy consumption, while other than the power consumption in wireless sensor networks, other QoS parameters such as latency, delivery rate, and other existence have not been considered in the solutions provided in previous methods. The proposed method tries to optimize other QoS parameters by providing a multiobjective fitness function, in addition to reducing energy consumption.In [22], a new greedy technique was proposed for finding the shortest random path in WSNs. Research has shown more rapidity of the greedy local search method in comparison to other techniques, reaching the optimum solution in resolving several concerns. In this new method, the use of the energy of the nodes is nearly symmetric, and thus, network life time is declined with a moderate slope.


## 3. Methodology

As mentioned, in the proposed method, we present a routing approach according to the multiobjective GWO algorithm. In the continuation of this section, first, the grey wolf optimization method will be introduced, and finally, the method characteristics will be presented.


### 3.1. GWO Algorithm

According to the studies, grey wolves have been regarded to be apex predators that are at the top of the food chain. Grey wolves are more likely to live in groups. Moreover, the average group size is 5–12. It is noteworthy that they enjoy a very difficult social governance hierarchy [23].In fact, leaders are a man and a woman, known as alpha. The main responsibility of alpha is deciding on hunting, sleeping location, waking time, and so on. Therefore, alpha’s decisions would be passed to the group. Nonetheless, they obtained one of the kinds of democratic behavior, wherein alpha follows the other wolves in this group. At gatherings, the whole group would acknowledge alpha via holding up its tail. Alpha wolf is known as the dominant wolf because his instructions must be followed by the group. Alpha wolves would be merely permitted mating in groups. It is notable that alpha would not be crucially most powerful member of the group; however, it is the best with regard to the group management, showing the higher importance of organization and discipline of a group in comparison to its strength [23].The second level in the grey wolf hierarchy has been introduced to be beta. Beta is subwolves who assist alpha for deciding or other group activities. This wolf beta may be female or male, and if one of the alpha wolves dies or grows old, it will probably be the best alpha candidate. The wolf beta must respect alpha, but it also commands other low-level wolves. These wolves play the role of alpha advisor and regulator of the group. Beta injects alpha commands across the group and provides feedback to alpha [23].Some studies showed that the lowest grade is the omega grey wolf. Omega plays the role of the victim. Omega wolves must continually surrender to each dominant wolf. Actually, they are the last wolves who are permitted to eat. Omega does not appear to be a prominent person in the group; however, if omega is lost, the whole group faces civil war and problems. This is caused by the frustration and violence of each wolf by omega(s), which helps maintain the whole group as well as the structure of domination. Under several conditions, omega-3s are included in the group [23].If the wolf is not beta, omega, or alpha, it is referred to as a subordinate (or according to several sources delta). Delta wolves must submit to alpha and beta, though they dominate omega. Guards, elders, scouts, hunters, and caretakers are the members of this category. In fact, scouts involve in watching the territory boundaries and warning the group if there are dangers. The guards would protect and also guarantee the group’s safety. Elders have been introduced as the experienced wolves used to be beta or alpha. Predators assist alpha and beta in case of hunting prey and providing food for the group. Ultimately, caregivers involve in caring for weak, sick, and injured wolves in this group [23].Besides the social hierarchy of wolves, group hunting is one of the other attractive social behaviors of grey wolves.The key steps of hunting a grey wolf include:(i)
Tracking, chasing, and approaching prey(ii)
Chase, blockade, and harass prey until it stops movement(iii)
Attack on prey


#### 3.1.1. Grey Wolf Optimization Mathematical Model

In this part, we present mathematical models of social hierarchy, siege, tracking, and prey attack. The GWO algorithm would be also described.(1) Social Hierarchy. For mathematical modelling of wolf social hierarchy, while designing GWO, the most appropriate solution has been viewed as alpha (α). As a result, the second and third solutions would be called beta (β) and delta (δ), respectively. We assume the remaining solutions as omega (ω) candidates. For the GWO algorithm, hunting (optimization) would be driven by α and β, and δ and ω wolves follow the above three wolves [23].(2) Siege of Prey. As mentioned, grey wolves surround prey. For mathematical modelling of the siege behavior, the following equations have been provided:(1)D⟶=C⟶⋅Xp⟶t−X⟶t,(2)X⟶t+1=Xp⟶t−A⟶⋅D⟶,where t represents the current iteration, A⟶ and C⟶ are coefficient vectors, Xp⟶ represents the prey position vector, and X⟶ represents the grey wolf position vector. Finally, vectors A⟶ and C⟶ have been computed by these relations as follows:(3)A⟶=2a⟶⋅r1⟶⋅a⟶,(4)A⟶=2⋅r2⟶,where the components a⟶ decrease linearly from 2 to 0 during the iteration and r1 and r2 represent the random vectors in 0,1.For seeing the effect of equations (1) and (2), a 2D position vector and several probable neighbors have been shown in Figure 1(a). Considering the figure, the grey wolf in position (X, Y) may update its position based on the prey X∗,Y∗ position. By setting the values and vectors A⟶ and C⟶, different places can be obtained surrounding the best factor, for example, X∗−X,Y∗ may be set by determining A⟶=0,1 and C⟶=1,1. Therefore, the probable updated position of a grey wolf in three-dimensional space has been shown in Figure 1(b). Notably, the random vectors r1 and r2 enable the wolves for reaching any position between the points shown in Figure 1; hence, a grey wolf may use equations (1) and (2) to position itself in the space around the prey. Update any random positions.Figure 1
Two-dimensional and 3D position vectors and the next possible location of wolves [23].
(a)(b)This concept may be extended to then-dimensional search space, and the grey wolves in the hypercube (or hypersphere) move around the best solution.(3) Hunt. Grey wolves are able to detect the prey and surround them. Hunting is generally led by alpha. Moreover, delta and beta may occasionally involve in hunting. Nevertheless, in an abstract search space, there has been not any conception of the desired position (prey). For mathematical simulation of the hunting behavior of the grey wolves, it is assumed that alpha (the best candidate solution), delta, and beta have more knowledge of the potential prey position. Hence, we store the first three solutions observed and oblige the other search agents (like omega) for updating their locations based on the location of the best search representative. Here, these formulas are provided:(5)Dα⟶=C1⟶⋅Xα⟶−X⟶,Cβ⟶=C2⟶⋅Xβ⟶−X⟶,Cδ⟶=C3⟶⋅Xδ⟶−X⟶,(6)X1⟶=Xα⟶−A1⟶⋅Dα⟶,X1⟶=Xβ⟶−A2⟶⋅Dβ⟶,X1⟶=Xδ⟶−A3⟶⋅Dδ⟶,where A⟶ and C⟶ are coefficient vectors, Xα⟶ is the position vector of the prey, and X⟶ indicates the position vector of a grey wolf.Figure2 depicts updating the position of a search engine with respect to alpha, delta, and beta in a 2D search space. It is observed that the resulting position will be placed in a circle at a random position that has been described by alpha, beta, and delta positions in the search space. Put differently, beta, delta, and alpha approximate the prey position, and other wolves randomly update their locations surrounding the prey [23].Figure 2
Position update in GWO.(4) Attack on Prey (Exploitation). As mentioned, grey wolves end their prey via attacks on the prey after it has stopped moving. For mathematical modelling, an approach to the prey, a⟶ value is reduced. It should be noted that the amplitude of the fluctuations also decreases. Put differently, it is a random value in the interval −a,a, wherein it decreases from 2 to 0 during repetition. When the random values are at −1,1, it is possible that the next position of a search agent is in any position between the prey position and its current location.Based on the presented operators, the GWO algorithm enables its search agents for updating their positions according to alpha, delta, and beta positions and attack prey. However, the GWO algorithm would be susceptible to stagnation in the local solutions with the above operators. Obviously, the proposed siege mechanism partly demonstrates exploration; however, the GWO requires greater operators for emphasis on the exploration.(5) Bait Search (Exploration). Grey wolves search mostly for beta, delta, and alpha locations. These distance themselves from each other in searching for prey and convergence for attacking the prey. For mathematical model divergence, the study uses random values >1 or <−1 to require the search agent for divergence from the prey. Such a condition focuses exploration and enables the global search of the GWO algorithm. Figure 1(b) depicts A>1 that forces the grey wolves to deviate from the prey in order to successfully find the right prey. The other GWO component that supports exploration (see equations (3)–(6)) is the vector containing the random values in 2,0. The above component establishes the effect of prey in determining the distance in equation (1) and the prey weight to find prey for emphasizing the random (C>1) or minor (C<1), which assists GWO to have a more random behavior during optimization, for exploring and avoiding local optimization. However, C, unlike A, does not decrease linearly, and therefore, C would be necessarily required to present the random values at each time so that the emphasis is on exploration in the initial iterations and in the final iterations. Finally, results showed the high usefulness of the component in the optimal local recession, in particular, in the final repetitions.VectorC may also be viewed as the impact of barriers to approaching the prey in nature. Obstacles in nature usually appear in wolf hunting trails and actually prevent them from approaching the prey quickly and easily that would be precisely what vector C performs. With regard to the wolf location, it may accidentally gain the prey weight and make it harder and harder for the wolf to reach and approach, or vice versa.In summary, the process of searching begins with the production of a random population of grey wolves (candidate solutions) in the GWO algorithm. During the repetition, beta, delta, and alpha wolves approximate the probable position of the prey. Moreover, each candidate solution updates its distance from the bait. For emphasizing the exploitation and exploration, the parameter a is declined from2 to 0. Candidates’ solutions usually move away from the bait when A⟶>1 and converge toward the bait in case of A⟶<1. In the end, the GWO algorithm ends with satisfying the final criterion.


### 3.2. Proposed Multiobjective Grey Wolf Optimization Algorithm

As mentioned, in the proposed method, the multiobjective grey GWO algorithm has been employed for choosing the best cluster head in each step of data transfer. In general, it can be said that the difference between GWO algorithms so that GWO has been in determining the evaluation parameters in the fitness function. In the single-objective grey wolf optimization algorithm, the fitness function uses a parameter to evaluate the optimality of the solutions. However, the fitness function in the grey wolf optimization algorithm tries to strike a balance between several goals to provide a solution to the problem. In the proposed method, the parameters of intracluster distance, distance to the base station, and energy are used to determine the eclipse node to optimize the goals of data delay rate, data delivery rate, and node energy consumption.In order to adapt the multiobjective GWO algorithm to wireless sensor networks, a base station is considered as prey. Then, in the proposed method for the efficiency of the multiobjective GWO algorithm in the WSN, the network nodes would be categorized into three groups. Alpha nodes are the first group. This category includes threaded nodes at all steps of the data transfer. In fact, considering that in the proposed method, in all steps of data transfer, the eclipse node is selected as the most optimal node in terms of evaluation parameters; these nodes have a high priority for data transfer and are considered as alpha nodes. The second category is beta nodes. Beta nodes are selected as cluster member nodes that have relatively less optimality than clustered nodes. These nodes can be selected as the next cluster head in the next steps due to the reduced energy of the cluster heads. Finally, the third group of nodes is also selected as delta and gamma nodes, which include other members of the cluster. Beta, delta, and gamma nodes send sensed information to alpha nodes, which act as eclipses. Alpha nodes also send aggregate information to other alpha nodes in the base station. In this method, if some nodes are closer to the base station than other alpha nodes, the base station would be chosen as the cluster head, and information is sent as a step to the base station. In the following, we will introduce the proposed multiobjective fitness function.


#### 3.2.1. Proposed Fitness Function

As mentioned, in this proposed method, a multiobjective fitness function is used in order to optimally route and provide QoS parameters. The main parameters of the proposed fitness function include the distance between nodes, the distance to the hole, the energy expected to send packets from the next hop to the hole, and the remaining energy of the nodes. The distance between nodes and distance to sink is defined as follows:(7)Dij=xi−xj2+yi−yj2,(8)DSi=xi−xsink2+yi−ysink2,where xi represents the longitude of sensor i, yi represents the latitude of sensor i, and i and j are the sensors. The energy expected model in the proposed method is defined as follows:(9)ETXl,dij=Eelec∗l+Eampdij∗l=Eelec∗l+εfs∗l∗dij2ifdij<d0,Eelec∗l+εmp∗l∗dij4ifdij≥d0,where Eelec is the energy required to conduct and control electronic components; Eampdij represents the energy consumed by amplifying the signal when transmitting l-bit data (l represents the number of bits in the packet); εfs and εmp are the factors of the open space model and the multistep model, respectively; and dij is the distance threshold, which is calculated as follows:(10)d0=εfsεmp.The fitness function of the proposed method is defined as equation (9).(11)Ming=∑i,j=1nDij+∑i=1nDSi+∑i,j=1nETXij−∑i,j=1nEi,Subject to∑i=1nDi≤DSi,∑i=1nDSi−1≤DSi,∑i=1nETXij≤∑i=1n∑k=1mETXikk,∑i,j=1nEi≤ETotal,whereDi is the distance from the source node to the next hop, DSi is the estimated distance from the next hop to the destination node, and E residual energy of the node is a wireless sensor node. The source node in each step calculates the factors of distance to the neighboring node, distance to the destination, residual energy from the neighboring node, and the channel quality between the selected neighboring node and the value obtained. It calculates the fitness function for neighboring nodes and selects the next hop in the local partial solution. Selecting the optimal partial solutions in the path from the source node to the destination node will lead to optimal global routing. Figure 3 displays the pseudocode of the proposed method, and Figure 4 shows the proposed method flowchart. The architecture model of the proposed method has shown in Figure 5.Figure 3
Pseudocode of the proposed method.Figure 4
The proposed method.Figure 5
Overall architecture model of proposed.


## 3.1. GWO Algorithm

According to the studies, grey wolves have been regarded to be apex predators that are at the top of the food chain. Grey wolves are more likely to live in groups. Moreover, the average group size is 5–12. It is noteworthy that they enjoy a very difficult social governance hierarchy [23].In fact, leaders are a man and a woman, known as alpha. The main responsibility of alpha is deciding on hunting, sleeping location, waking time, and so on. Therefore, alpha’s decisions would be passed to the group. Nonetheless, they obtained one of the kinds of democratic behavior, wherein alpha follows the other wolves in this group. At gatherings, the whole group would acknowledge alpha via holding up its tail. Alpha wolf is known as the dominant wolf because his instructions must be followed by the group. Alpha wolves would be merely permitted mating in groups. It is notable that alpha would not be crucially most powerful member of the group; however, it is the best with regard to the group management, showing the higher importance of organization and discipline of a group in comparison to its strength [23].The second level in the grey wolf hierarchy has been introduced to be beta. Beta is subwolves who assist alpha for deciding or other group activities. This wolf beta may be female or male, and if one of the alpha wolves dies or grows old, it will probably be the best alpha candidate. The wolf beta must respect alpha, but it also commands other low-level wolves. These wolves play the role of alpha advisor and regulator of the group. Beta injects alpha commands across the group and provides feedback to alpha [23].Some studies showed that the lowest grade is the omega grey wolf. Omega plays the role of the victim. Omega wolves must continually surrender to each dominant wolf. Actually, they are the last wolves who are permitted to eat. Omega does not appear to be a prominent person in the group; however, if omega is lost, the whole group faces civil war and problems. This is caused by the frustration and violence of each wolf by omega(s), which helps maintain the whole group as well as the structure of domination. Under several conditions, omega-3s are included in the group [23].If the wolf is not beta, omega, or alpha, it is referred to as a subordinate (or according to several sources delta). Delta wolves must submit to alpha and beta, though they dominate omega. Guards, elders, scouts, hunters, and caretakers are the members of this category. In fact, scouts involve in watching the territory boundaries and warning the group if there are dangers. The guards would protect and also guarantee the group’s safety. Elders have been introduced as the experienced wolves used to be beta or alpha. Predators assist alpha and beta in case of hunting prey and providing food for the group. Ultimately, caregivers involve in caring for weak, sick, and injured wolves in this group [23].Besides the social hierarchy of wolves, group hunting is one of the other attractive social behaviors of grey wolves.The key steps of hunting a grey wolf include:(i)
Tracking, chasing, and approaching prey(ii)
Chase, blockade, and harass prey until it stops movement(iii)
Attack on prey


### 3.1.1. Grey Wolf Optimization Mathematical Model

In this part, we present mathematical models of social hierarchy, siege, tracking, and prey attack. The GWO algorithm would be also described.(1) Social Hierarchy. For mathematical modelling of wolf social hierarchy, while designing GWO, the most appropriate solution has been viewed as alpha (α). As a result, the second and third solutions would be called beta (β) and delta (δ), respectively. We assume the remaining solutions as omega (ω) candidates. For the GWO algorithm, hunting (optimization) would be driven by α and β, and δ and ω wolves follow the above three wolves [23].(2) Siege of Prey. As mentioned, grey wolves surround prey. For mathematical modelling of the siege behavior, the following equations have been provided:(1)D⟶=C⟶⋅Xp⟶t−X⟶t,(2)X⟶t+1=Xp⟶t−A⟶⋅D⟶,where t represents the current iteration, A⟶ and C⟶ are coefficient vectors, Xp⟶ represents the prey position vector, and X⟶ represents the grey wolf position vector. Finally, vectors A⟶ and C⟶ have been computed by these relations as follows:(3)A⟶=2a⟶⋅r1⟶⋅a⟶,(4)A⟶=2⋅r2⟶,where the components a⟶ decrease linearly from 2 to 0 during the iteration and r1 and r2 represent the random vectors in 0,1.For seeing the effect of equations (1) and (2), a 2D position vector and several probable neighbors have been shown in Figure 1(a). Considering the figure, the grey wolf in position (X, Y) may update its position based on the prey X∗,Y∗ position. By setting the values and vectors A⟶ and C⟶, different places can be obtained surrounding the best factor, for example, X∗−X,Y∗ may be set by determining A⟶=0,1 and C⟶=1,1. Therefore, the probable updated position of a grey wolf in three-dimensional space has been shown in Figure 1(b). Notably, the random vectors r1 and r2 enable the wolves for reaching any position between the points shown in Figure 1; hence, a grey wolf may use equations (1) and (2) to position itself in the space around the prey. Update any random positions.Figure 1
Two-dimensional and 3D position vectors and the next possible location of wolves [23].
(a)(b)This concept may be extended to then-dimensional search space, and the grey wolves in the hypercube (or hypersphere) move around the best solution.(3) Hunt. Grey wolves are able to detect the prey and surround them. Hunting is generally led by alpha. Moreover, delta and beta may occasionally involve in hunting. Nevertheless, in an abstract search space, there has been not any conception of the desired position (prey). For mathematical simulation of the hunting behavior of the grey wolves, it is assumed that alpha (the best candidate solution), delta, and beta have more knowledge of the potential prey position. Hence, we store the first three solutions observed and oblige the other search agents (like omega) for updating their locations based on the location of the best search representative. Here, these formulas are provided:(5)Dα⟶=C1⟶⋅Xα⟶−X⟶,Cβ⟶=C2⟶⋅Xβ⟶−X⟶,Cδ⟶=C3⟶⋅Xδ⟶−X⟶,(6)X1⟶=Xα⟶−A1⟶⋅Dα⟶,X1⟶=Xβ⟶−A2⟶⋅Dβ⟶,X1⟶=Xδ⟶−A3⟶⋅Dδ⟶,where A⟶ and C⟶ are coefficient vectors, Xα⟶ is the position vector of the prey, and X⟶ indicates the position vector of a grey wolf.Figure2 depicts updating the position of a search engine with respect to alpha, delta, and beta in a 2D search space. It is observed that the resulting position will be placed in a circle at a random position that has been described by alpha, beta, and delta positions in the search space. Put differently, beta, delta, and alpha approximate the prey position, and other wolves randomly update their locations surrounding the prey [23].Figure 2
Position update in GWO.(4) Attack on Prey (Exploitation). As mentioned, grey wolves end their prey via attacks on the prey after it has stopped moving. For mathematical modelling, an approach to the prey, a⟶ value is reduced. It should be noted that the amplitude of the fluctuations also decreases. Put differently, it is a random value in the interval −a,a, wherein it decreases from 2 to 0 during repetition. When the random values are at −1,1, it is possible that the next position of a search agent is in any position between the prey position and its current location.Based on the presented operators, the GWO algorithm enables its search agents for updating their positions according to alpha, delta, and beta positions and attack prey. However, the GWO algorithm would be susceptible to stagnation in the local solutions with the above operators. Obviously, the proposed siege mechanism partly demonstrates exploration; however, the GWO requires greater operators for emphasis on the exploration.(5) Bait Search (Exploration). Grey wolves search mostly for beta, delta, and alpha locations. These distance themselves from each other in searching for prey and convergence for attacking the prey. For mathematical model divergence, the study uses random values >1 or <−1 to require the search agent for divergence from the prey. Such a condition focuses exploration and enables the global search of the GWO algorithm. Figure 1(b) depicts A>1 that forces the grey wolves to deviate from the prey in order to successfully find the right prey. The other GWO component that supports exploration (see equations (3)–(6)) is the vector containing the random values in 2,0. The above component establishes the effect of prey in determining the distance in equation (1) and the prey weight to find prey for emphasizing the random (C>1) or minor (C<1), which assists GWO to have a more random behavior during optimization, for exploring and avoiding local optimization. However, C, unlike A, does not decrease linearly, and therefore, C would be necessarily required to present the random values at each time so that the emphasis is on exploration in the initial iterations and in the final iterations. Finally, results showed the high usefulness of the component in the optimal local recession, in particular, in the final repetitions.VectorC may also be viewed as the impact of barriers to approaching the prey in nature. Obstacles in nature usually appear in wolf hunting trails and actually prevent them from approaching the prey quickly and easily that would be precisely what vector C performs. With regard to the wolf location, it may accidentally gain the prey weight and make it harder and harder for the wolf to reach and approach, or vice versa.In summary, the process of searching begins with the production of a random population of grey wolves (candidate solutions) in the GWO algorithm. During the repetition, beta, delta, and alpha wolves approximate the probable position of the prey. Moreover, each candidate solution updates its distance from the bait. For emphasizing the exploitation and exploration, the parameter a is declined from2 to 0. Candidates’ solutions usually move away from the bait when A⟶>1 and converge toward the bait in case of A⟶<1. In the end, the GWO algorithm ends with satisfying the final criterion.


## 3.1.1. Grey Wolf Optimization Mathematical Model

In this part, we present mathematical models of social hierarchy, siege, tracking, and prey attack. The GWO algorithm would be also described.(1) Social Hierarchy. For mathematical modelling of wolf social hierarchy, while designing GWO, the most appropriate solution has been viewed as alpha (α). As a result, the second and third solutions would be called beta (β) and delta (δ), respectively. We assume the remaining solutions as omega (ω) candidates. For the GWO algorithm, hunting (optimization) would be driven by α and β, and δ and ω wolves follow the above three wolves [23].(2) Siege of Prey. As mentioned, grey wolves surround prey. For mathematical modelling of the siege behavior, the following equations have been provided:(1)D⟶=C⟶⋅Xp⟶t−X⟶t,(2)X⟶t+1=Xp⟶t−A⟶⋅D⟶,where t represents the current iteration, A⟶ and C⟶ are coefficient vectors, Xp⟶ represents the prey position vector, and X⟶ represents the grey wolf position vector. Finally, vectors A⟶ and C⟶ have been computed by these relations as follows:(3)A⟶=2a⟶⋅r1⟶⋅a⟶,(4)A⟶=2⋅r2⟶,where the components a⟶ decrease linearly from 2 to 0 during the iteration and r1 and r2 represent the random vectors in 0,1.For seeing the effect of equations (1) and (2), a 2D position vector and several probable neighbors have been shown in Figure 1(a). Considering the figure, the grey wolf in position (X, Y) may update its position based on the prey X∗,Y∗ position. By setting the values and vectors A⟶ and C⟶, different places can be obtained surrounding the best factor, for example, X∗−X,Y∗ may be set by determining A⟶=0,1 and C⟶=1,1. Therefore, the probable updated position of a grey wolf in three-dimensional space has been shown in Figure 1(b). Notably, the random vectors r1 and r2 enable the wolves for reaching any position between the points shown in Figure 1; hence, a grey wolf may use equations (1) and (2) to position itself in the space around the prey. Update any random positions.Figure 1
Two-dimensional and 3D position vectors and the next possible location of wolves [23].
(a)(b)This concept may be extended to then-dimensional search space, and the grey wolves in the hypercube (or hypersphere) move around the best solution.(3) Hunt. Grey wolves are able to detect the prey and surround them. Hunting is generally led by alpha. Moreover, delta and beta may occasionally involve in hunting. Nevertheless, in an abstract search space, there has been not any conception of the desired position (prey). For mathematical simulation of the hunting behavior of the grey wolves, it is assumed that alpha (the best candidate solution), delta, and beta have more knowledge of the potential prey position. Hence, we store the first three solutions observed and oblige the other search agents (like omega) for updating their locations based on the location of the best search representative. Here, these formulas are provided:(5)Dα⟶=C1⟶⋅Xα⟶−X⟶,Cβ⟶=C2⟶⋅Xβ⟶−X⟶,Cδ⟶=C3⟶⋅Xδ⟶−X⟶,(6)X1⟶=Xα⟶−A1⟶⋅Dα⟶,X1⟶=Xβ⟶−A2⟶⋅Dβ⟶,X1⟶=Xδ⟶−A3⟶⋅Dδ⟶,where A⟶ and C⟶ are coefficient vectors, Xα⟶ is the position vector of the prey, and X⟶ indicates the position vector of a grey wolf.Figure2 depicts updating the position of a search engine with respect to alpha, delta, and beta in a 2D search space. It is observed that the resulting position will be placed in a circle at a random position that has been described by alpha, beta, and delta positions in the search space. Put differently, beta, delta, and alpha approximate the prey position, and other wolves randomly update their locations surrounding the prey [23].Figure 2
Position update in GWO.(4) Attack on Prey (Exploitation). As mentioned, grey wolves end their prey via attacks on the prey after it has stopped moving. For mathematical modelling, an approach to the prey, a⟶ value is reduced. It should be noted that the amplitude of the fluctuations also decreases. Put differently, it is a random value in the interval −a,a, wherein it decreases from 2 to 0 during repetition. When the random values are at −1,1, it is possible that the next position of a search agent is in any position between the prey position and its current location.Based on the presented operators, the GWO algorithm enables its search agents for updating their positions according to alpha, delta, and beta positions and attack prey. However, the GWO algorithm would be susceptible to stagnation in the local solutions with the above operators. Obviously, the proposed siege mechanism partly demonstrates exploration; however, the GWO requires greater operators for emphasis on the exploration.(5) Bait Search (Exploration). Grey wolves search mostly for beta, delta, and alpha locations. These distance themselves from each other in searching for prey and convergence for attacking the prey. For mathematical model divergence, the study uses random values >1 or <−1 to require the search agent for divergence from the prey. Such a condition focuses exploration and enables the global search of the GWO algorithm. Figure 1(b) depicts A>1 that forces the grey wolves to deviate from the prey in order to successfully find the right prey. The other GWO component that supports exploration (see equations (3)–(6)) is the vector containing the random values in 2,0. The above component establishes the effect of prey in determining the distance in equation (1) and the prey weight to find prey for emphasizing the random (C>1) or minor (C<1), which assists GWO to have a more random behavior during optimization, for exploring and avoiding local optimization. However, C, unlike A, does not decrease linearly, and therefore, C would be necessarily required to present the random values at each time so that the emphasis is on exploration in the initial iterations and in the final iterations. Finally, results showed the high usefulness of the component in the optimal local recession, in particular, in the final repetitions.VectorC may also be viewed as the impact of barriers to approaching the prey in nature. Obstacles in nature usually appear in wolf hunting trails and actually prevent them from approaching the prey quickly and easily that would be precisely what vector C performs. With regard to the wolf location, it may accidentally gain the prey weight and make it harder and harder for the wolf to reach and approach, or vice versa.In summary, the process of searching begins with the production of a random population of grey wolves (candidate solutions) in the GWO algorithm. During the repetition, beta, delta, and alpha wolves approximate the probable position of the prey. Moreover, each candidate solution updates its distance from the bait. For emphasizing the exploitation and exploration, the parameter a is declined from2 to 0. Candidates’ solutions usually move away from the bait when A⟶>1 and converge toward the bait in case of A⟶<1. In the end, the GWO algorithm ends with satisfying the final criterion.


## 3.2. Proposed Multiobjective Grey Wolf Optimization Algorithm

As mentioned, in the proposed method, the multiobjective grey GWO algorithm has been employed for choosing the best cluster head in each step of data transfer. In general, it can be said that the difference between GWO algorithms so that GWO has been in determining the evaluation parameters in the fitness function. In the single-objective grey wolf optimization algorithm, the fitness function uses a parameter to evaluate the optimality of the solutions. However, the fitness function in the grey wolf optimization algorithm tries to strike a balance between several goals to provide a solution to the problem. In the proposed method, the parameters of intracluster distance, distance to the base station, and energy are used to determine the eclipse node to optimize the goals of data delay rate, data delivery rate, and node energy consumption.In order to adapt the multiobjective GWO algorithm to wireless sensor networks, a base station is considered as prey. Then, in the proposed method for the efficiency of the multiobjective GWO algorithm in the WSN, the network nodes would be categorized into three groups. Alpha nodes are the first group. This category includes threaded nodes at all steps of the data transfer. In fact, considering that in the proposed method, in all steps of data transfer, the eclipse node is selected as the most optimal node in terms of evaluation parameters; these nodes have a high priority for data transfer and are considered as alpha nodes. The second category is beta nodes. Beta nodes are selected as cluster member nodes that have relatively less optimality than clustered nodes. These nodes can be selected as the next cluster head in the next steps due to the reduced energy of the cluster heads. Finally, the third group of nodes is also selected as delta and gamma nodes, which include other members of the cluster. Beta, delta, and gamma nodes send sensed information to alpha nodes, which act as eclipses. Alpha nodes also send aggregate information to other alpha nodes in the base station. In this method, if some nodes are closer to the base station than other alpha nodes, the base station would be chosen as the cluster head, and information is sent as a step to the base station. In the following, we will introduce the proposed multiobjective fitness function.


### 3.2.1. Proposed Fitness Function

As mentioned, in this proposed method, a multiobjective fitness function is used in order to optimally route and provide QoS parameters. The main parameters of the proposed fitness function include the distance between nodes, the distance to the hole, the energy expected to send packets from the next hop to the hole, and the remaining energy of the nodes. The distance between nodes and distance to sink is defined as follows:(7)Dij=xi−xj2+yi−yj2,(8)DSi=xi−xsink2+yi−ysink2,where xi represents the longitude of sensor i, yi represents the latitude of sensor i, and i and j are the sensors. The energy expected model in the proposed method is defined as follows:(9)ETXl,dij=Eelec∗l+Eampdij∗l=Eelec∗l+εfs∗l∗dij2ifdij<d0,Eelec∗l+εmp∗l∗dij4ifdij≥d0,where Eelec is the energy required to conduct and control electronic components; Eampdij represents the energy consumed by amplifying the signal when transmitting l-bit data (l represents the number of bits in the packet); εfs and εmp are the factors of the open space model and the multistep model, respectively; and dij is the distance threshold, which is calculated as follows:(10)d0=εfsεmp.The fitness function of the proposed method is defined as equation (9).(11)Ming=∑i,j=1nDij+∑i=1nDSi+∑i,j=1nETXij−∑i,j=1nEi,Subject to∑i=1nDi≤DSi,∑i=1nDSi−1≤DSi,∑i=1nETXij≤∑i=1n∑k=1mETXikk,∑i,j=1nEi≤ETotal,whereDi is the distance from the source node to the next hop, DSi is the estimated distance from the next hop to the destination node, and E residual energy of the node is a wireless sensor node. The source node in each step calculates the factors of distance to the neighboring node, distance to the destination, residual energy from the neighboring node, and the channel quality between the selected neighboring node and the value obtained. It calculates the fitness function for neighboring nodes and selects the next hop in the local partial solution. Selecting the optimal partial solutions in the path from the source node to the destination node will lead to optimal global routing. Figure 3 displays the pseudocode of the proposed method, and Figure 4 shows the proposed method flowchart. The architecture model of the proposed method has shown in Figure 5.Figure 3
Pseudocode of the proposed method.Figure 4
The proposed method.Figure 5
Overall architecture model of proposed.


## 3.2.1. Proposed Fitness Function

As mentioned, in this proposed method, a multiobjective fitness function is used in order to optimally route and provide QoS parameters. The main parameters of the proposed fitness function include the distance between nodes, the distance to the hole, the energy expected to send packets from the next hop to the hole, and the remaining energy of the nodes. The distance between nodes and distance to sink is defined as follows:(7)Dij=xi−xj2+yi−yj2,(8)DSi=xi−xsink2+yi−ysink2,where xi represents the longitude of sensor i, yi represents the latitude of sensor i, and i and j are the sensors. The energy expected model in the proposed method is defined as follows:(9)ETXl,dij=Eelec∗l+Eampdij∗l=Eelec∗l+εfs∗l∗dij2ifdij<d0,Eelec∗l+εmp∗l∗dij4ifdij≥d0,where Eelec is the energy required to conduct and control electronic components; Eampdij represents the energy consumed by amplifying the signal when transmitting l-bit data (l represents the number of bits in the packet); εfs and εmp are the factors of the open space model and the multistep model, respectively; and dij is the distance threshold, which is calculated as follows:(10)d0=εfsεmp.The fitness function of the proposed method is defined as equation (9).(11)Ming=∑i,j=1nDij+∑i=1nDSi+∑i,j=1nETXij−∑i,j=1nEi,Subject to∑i=1nDi≤DSi,∑i=1nDSi−1≤DSi,∑i=1nETXij≤∑i=1n∑k=1mETXikk,∑i,j=1nEi≤ETotal,whereDi is the distance from the source node to the next hop, DSi is the estimated distance from the next hop to the destination node, and E residual energy of the node is a wireless sensor node. The source node in each step calculates the factors of distance to the neighboring node, distance to the destination, residual energy from the neighboring node, and the channel quality between the selected neighboring node and the value obtained. It calculates the fitness function for neighboring nodes and selects the next hop in the local partial solution. Selecting the optimal partial solutions in the path from the source node to the destination node will lead to optimal global routing. Figure 3 displays the pseudocode of the proposed method, and Figure 4 shows the proposed method flowchart. The architecture model of the proposed method has shown in Figure 5.Figure 3
Pseudocode of the proposed method.Figure 4
The proposed method.Figure 5
Overall architecture model of proposed.


## 4. Implementation of the Proposed Method

For implementing our method, the WSN was configured according to the existing standard parameters. The proposed network is implemented in an environment of 100 × 100; in order to implement this scenario, MATLAB 2021a has been used. A random location function is employed to establish nodes in the network. Table1 lists other parameters related to the proposed network, and Figure 6 depicts the initial configuration of the proposed WSN.Table 1
Parameters of simulation.
ParametersValueNetwork dimensions100 × 100 m2Number of sensor nodes100Sink node coordinates(50,50)The initial energy of the nodes0.5 JThe initial energy of the sink nodes5 JEnergy consumption coefficient in data transmission5 × 108 JEnergy consumption coefficient in data reception5 × 108 JEnergy consumption coefficient in sending routing packets5 × 1010 JEnergy consumption coefficient in sending routing packets13 × 1013 JEnergy consumption coefficient in data aggregation5 × 109 JThe initial probability of selecting the sensor node as cluster head0.01 sGreatest number of the rounds3500Packet size4000 bitsNumber of the packets transmitted in each step10 pktsMessage size100 bitsRadio range5000 mFigure 6
Initial configuration of the proposed wireless sensor network.As shown in Table1 and Figure 6, the proposed WSN is simulated based on the initial parameters. This network consists of 100 sensor nodes whose distribution is seen within the network based on the proposed method. A sink node would also be designed in the grid center, which makes it easier for nodes to achieve the sink node.Data about the environment as well as the position of the network sensors are collected by the sink node, and based on this information, in addition to being aware of the state of the area, based on the location of the nodes, the nodes in the network. They are divided into several clusters. Several selected node nodes are selected as alpha nodes in the paths between the sensor nodes and BS, which is considered as bait in the proposed method. Cluster heads choose the optimal path to the sink node based on QoS parameters. Other sensor nodes would be selected according to the distance and value of the fitness function as bit nodes, in blue, and delta and gamma nodes in yellow and green, respectively, and transmit their data to the nearest node that has the greatest value of the fitness function. Considering that in the initial configuration of the proposed method, the energy of each sensor node is the same; therefore, in determining the next node in the first step, the distance between the sensor nodes and the selected nodes can play a decisive role. Figure7 shows the threaded nodes in the WSN.Figure 7
Initially selected alpha, beta, delta, and gamma nodes as the initial optimal paths.With regard to Figure7, several wireless sensor nodes in the network have been selected as alpha (threaded) nodes. Other nodes are selected as beta, delta, and gamma nodes based on the value of the proportion function. Alpha nodes are selected as data transfer nodes in the network according to our method and the weight values of the nodes change in each step. Figure 8 shows some of the steps for transferring data from wireless sensor nodes to alpha nodes.Figure 8
Steps to transfer data to alpha nodes in a WSN.According to Figure8, wireless sensor nodes transmit their data to the nodal nodes with regard to the values of the fitness function. Sensor nodes within the network select their path to the node based on the information shown by the alpha nodes, and each sensor node transmits its data to the nearest alpha node. From Figure 8, it can be seen that some wireless sensor nodes that are around the base station and their distance to the sink node is lower than their distance to the nearest alpha node, instead of sending their information directly to the alpha node. It will be sent to the sink node. The proposed fitness function of alpha, beta, delta, and gamma nodes in terms of QoS factors including data latency, data delivery rate, and residual energy of nodes, minimum distance from the source node, and minimum estimated distance from sink nodes are evaluated. In this regard, Table 2 reports the node fitness function value in the sensor network in one of the information transfer steps.Table 2
Value of the sensor node fitness function.
Gamma nodeFitnessDelta nodeFitnessBeta nodeFitnessAlpha nodeFitness20.583630.474990.253260.052550.5421170.4425140.359370.0561110.5739250.4934150.2103130.0503270.5839340.4614210.2329200.0501370.5877390.5094260.3614220.1084410.5987710.4025280.2119230.0981560.5837750.4844330.2374460.0623660.5728860.4135450.2465640.0653720.5831880.4085530.2257670.0394800.5487920.4852690.2095810.1175900.5119960.4548890.2968840.0571970.5765990.4297930.3733910.0377Based on Table2, values of the fitness function for alpha, beta, delta, and gamma nodes are calculated in the proposed solution of the symbol. Given that the material of the fitness function is of the minimization type, the nodes that have the least value of the fitness function would be chosen as the dominant solutions. These nodes exhibit the shortest intracluster distances, the shortest distance to the base station, the lowest power consumption (maximum residual energy), the lowest latency, and the lowest data loss rate (highest delivery rate). Moreover, some selected nodes enjoy good fitness function values, but some are weak, and therefore, the value of the fitness function determines the type of node in the grey wolf optimization algorithm. Figure 9 depicts the values of the fitness function of the dominant solutions.Figure 9
Optimum values of dominant solutions.With regard to Figure9, the fitness values for the dominant solutions are shown. Due to the dynamics of the network, the weight of the nodes may change during the steps and the amount of fitness dimensions may also vary. Therefore, at each stage, the dominant solutions are changed, and the routing table related to the proposed method is also updated.


### 4.1. Evaluation of Our Method

Evaluation of this proposed method is done to evaluate the quality of this proposed method that provides the improvement created by the proposed method based on the initial problem. Various criteria are presented for evaluating WSNs. This article focuses on evaluating the measures of energy consumed and residual energy, message transmission delay nodes, number of lost packets, and delivered rate. Therefore, Figure10 shows the energy remaining in the WS nodes in the network. Figure 11 also shows the average energy consumed in the network.Figure 10
Residual energy of WS nodes.Figure 11
Average energy consumption in all network nodes.As shown in Figures10 and 11, the slope of the diagram is related to the energy remaining in the nodes, and the average energy consumption is linear, indicating symmetrical energy consumption in the network nodes. Therefore, premature energy depletion does not occur in the nodes, and the life of the network will also increase. Figure 12 shows the life diagram of the network sensor nodes in this proposed method.Figure 12
Graph of network life in the proposed method.With regard to Figure12, the first node in the proposed wireless sensor network is dead following 1,415 iterations. In wireless routing networks, in the event of the death of a node, an alternative route may be sent to send information, but information about that area covered by that node will be nonaggregated. So as long as the death of the nodes does not disrupt the network process, we can cope with the death of the nodes. In the proposed method, this happened around 1,490, in which about half of the nodes ran out of energy, and the network performance was disrupted.Another criterion used for evaluating this proposed technique is the number of lost packets. In fact, the lower the number of missed packets in the process of aggregating information from the environment, the higher the quality of the information collected and the high accuracy of the routing method in route selection. One of the main reasons for the loss of packets is the selection of nodes with congestion packets that appear in the network as bottlenecks. Figure13 demonstrates the missing nodes in the proposed method.Figure 13
Chart of lost packages in the proposed method.As can be seen in Figure13, the number of missed packets in our method is about 53 packages, which according to the total of 5,000 packets transferred during the routing process; the rate of lost packets reaches a maximum of 0.0106%. Therefore, our conclusion is that the proposed technique enjoys a higher ability to find the optimal route and safe delivery of data packets. In this regard, the data delivery rate criterion can be examined for the proposed method, which is the rate of data received to the data sent throughout the network by all nodes. Figure 14 depicts the data delivery rate in our method.Figure 14
Data delivery rate in our method.According to Figure14, the data delivery rate in our method is high and reaches about 99.7% for 3,500 cycles in the network. As mentioned, this high value indicates the method’s strength in finding the optimum route and safe delivery of packets.The end-to-end delay of nodes in the network has been considered to be the final criterion employed in our method for evaluation. Since the transfer time coefficient of a packet is for the fixed nodes, the distance between the nodes has been regarded as the major reason for delaying the end-to-end transfer. Because transfer in our method performs between the cluster head and the sensor nodes, the shorter distance between the cluster heads and other nodes refers to the precise clustering so that average distances within the cluster is less that is one of objectives were the objective function in the proposed GWO algorithm. Figure15 shows the cumulative end-to-end delay of 100 nodes.Figure 15
End-to-end accumulation delay diagram of the nodes.As demonstrated in Figure15, the proposed method was delayed by only 100 milliseconds for 100 nodes and 3,500 rpm, which indicates the high precision of our method while selecting the threaded nodes.In this paper, considering the use of the grey wolf optimization algorithm in order to find the optimal cluster heads in each cluster, it can be seen that the algorithm has been able to solve the presented problem. In this method, in each cluster, the wolf hierarchy is identified as nodes within the cluster. The selection of alpha, beta, delta, and gamma wolves is based on the proposed fitness function. Therefore, the nodes that have the most appropriate value for the parameters of the fitness function are placed in the wolf hierarchy. The node that is selected as the alpha wolf is the most suitable option for the cluster head. By selecting the cluster head in each cluster, the packets have transferred between the cluster heads to the sink. After one round of packet transferring, in the next round, the parameters of the fitness function for the nodes within the cluster are checked again to update the wolf hierarchy within each cluster. This continues until the simulation time is complete. Considering several parameters in the fitness function, it can be assured that the selected cluster heads have the ability to create a trade-off between network objectives, so it can be said that the proposed method can improve the quality of service criteria.


### 4.2. Comparing the Proposed Method with the Earlier Work

Because of the significance of routing in wireless sensor networks in order to balance the use of energy between nodes, in order to validate the proposed method to compare it with the earlier ones according to the use of energy and other criteria we evaluate. For this purpose, it is compared with other methods [24–26] according to the use of energy in the network and network life. Figure 16 compares this proposed method with the earlier methods according to the average use of energy in the network.Figure 16
Comparison between the proposed method and previous methods in terms of the use of energy.With regard to Figure16, this proposed method enjoys a lower average use of energy per 100 nodes compared to the previous methods. It can be seen that the proposed method has been improved the energy consumption in the wireless sensor network by about 11%. Figure 17 also makes a comparison between the proposed method and the earlier ones according to the lifespan and death of the first node in the network.Figure 17
Comparing the proposed method with the previous ones according to the network lifetime.Based on Figure17, this method enjoys a more prolonged lifespan in comparison to the earlier methods, and the first node in this method dies much later than the other methods, which reflects the balance of energy in the method. It can be seen that the proposed method has been improved the network lifetime in the wireless sensor network by about 16%. Figure 18 also depicts a comparison of this proposed method with the earlier ones with regard to the data delivery rate.Figure 18
Comparing the proposed method with the previous ones according to the data delivery rate.According to Figure18, this method enjoys a higher delivery rate in comparison to the earlier procedures, which indicates the selection of the optimal route and avoidance of bottlenecks and the loss of the least amount of packets in the proposed method. It can be seen that the proposed method has been improved the data delivery rate in the wireless sensor network by about 1%.


## 4.1. Evaluation of Our Method

Evaluation of this proposed method is done to evaluate the quality of this proposed method that provides the improvement created by the proposed method based on the initial problem. Various criteria are presented for evaluating WSNs. This article focuses on evaluating the measures of energy consumed and residual energy, message transmission delay nodes, number of lost packets, and delivered rate. Therefore, Figure10 shows the energy remaining in the WS nodes in the network. Figure 11 also shows the average energy consumed in the network.Figure 10
Residual energy of WS nodes.Figure 11
Average energy consumption in all network nodes.As shown in Figures10 and 11, the slope of the diagram is related to the energy remaining in the nodes, and the average energy consumption is linear, indicating symmetrical energy consumption in the network nodes. Therefore, premature energy depletion does not occur in the nodes, and the life of the network will also increase. Figure 12 shows the life diagram of the network sensor nodes in this proposed method.Figure 12
Graph of network life in the proposed method.With regard to Figure12, the first node in the proposed wireless sensor network is dead following 1,415 iterations. In wireless routing networks, in the event of the death of a node, an alternative route may be sent to send information, but information about that area covered by that node will be nonaggregated. So as long as the death of the nodes does not disrupt the network process, we can cope with the death of the nodes. In the proposed method, this happened around 1,490, in which about half of the nodes ran out of energy, and the network performance was disrupted.Another criterion used for evaluating this proposed technique is the number of lost packets. In fact, the lower the number of missed packets in the process of aggregating information from the environment, the higher the quality of the information collected and the high accuracy of the routing method in route selection. One of the main reasons for the loss of packets is the selection of nodes with congestion packets that appear in the network as bottlenecks. Figure13 demonstrates the missing nodes in the proposed method.Figure 13
Chart of lost packages in the proposed method.As can be seen in Figure13, the number of missed packets in our method is about 53 packages, which according to the total of 5,000 packets transferred during the routing process; the rate of lost packets reaches a maximum of 0.0106%. Therefore, our conclusion is that the proposed technique enjoys a higher ability to find the optimal route and safe delivery of data packets. In this regard, the data delivery rate criterion can be examined for the proposed method, which is the rate of data received to the data sent throughout the network by all nodes. Figure 14 depicts the data delivery rate in our method.Figure 14
Data delivery rate in our method.According to Figure14, the data delivery rate in our method is high and reaches about 99.7% for 3,500 cycles in the network. As mentioned, this high value indicates the method’s strength in finding the optimum route and safe delivery of packets.The end-to-end delay of nodes in the network has been considered to be the final criterion employed in our method for evaluation. Since the transfer time coefficient of a packet is for the fixed nodes, the distance between the nodes has been regarded as the major reason for delaying the end-to-end transfer. Because transfer in our method performs between the cluster head and the sensor nodes, the shorter distance between the cluster heads and other nodes refers to the precise clustering so that average distances within the cluster is less that is one of objectives were the objective function in the proposed GWO algorithm. Figure15 shows the cumulative end-to-end delay of 100 nodes.Figure 15
End-to-end accumulation delay diagram of the nodes.As demonstrated in Figure15, the proposed method was delayed by only 100 milliseconds for 100 nodes and 3,500 rpm, which indicates the high precision of our method while selecting the threaded nodes.In this paper, considering the use of the grey wolf optimization algorithm in order to find the optimal cluster heads in each cluster, it can be seen that the algorithm has been able to solve the presented problem. In this method, in each cluster, the wolf hierarchy is identified as nodes within the cluster. The selection of alpha, beta, delta, and gamma wolves is based on the proposed fitness function. Therefore, the nodes that have the most appropriate value for the parameters of the fitness function are placed in the wolf hierarchy. The node that is selected as the alpha wolf is the most suitable option for the cluster head. By selecting the cluster head in each cluster, the packets have transferred between the cluster heads to the sink. After one round of packet transferring, in the next round, the parameters of the fitness function for the nodes within the cluster are checked again to update the wolf hierarchy within each cluster. This continues until the simulation time is complete. Considering several parameters in the fitness function, it can be assured that the selected cluster heads have the ability to create a trade-off between network objectives, so it can be said that the proposed method can improve the quality of service criteria.


## 4.2. Comparing the Proposed Method with the Earlier Work

Because of the significance of routing in wireless sensor networks in order to balance the use of energy between nodes, in order to validate the proposed method to compare it with the earlier ones according to the use of energy and other criteria we evaluate. For this purpose, it is compared with other methods [24–26] according to the use of energy in the network and network life. Figure 16 compares this proposed method with the earlier methods according to the average use of energy in the network.Figure 16
Comparison between the proposed method and previous methods in terms of the use of energy.With regard to Figure16, this proposed method enjoys a lower average use of energy per 100 nodes compared to the previous methods. It can be seen that the proposed method has been improved the energy consumption in the wireless sensor network by about 11%. Figure 17 also makes a comparison between the proposed method and the earlier ones according to the lifespan and death of the first node in the network.Figure 17
Comparing the proposed method with the previous ones according to the network lifetime.Based on Figure17, this method enjoys a more prolonged lifespan in comparison to the earlier methods, and the first node in this method dies much later than the other methods, which reflects the balance of energy in the method. It can be seen that the proposed method has been improved the network lifetime in the wireless sensor network by about 16%. Figure 18 also depicts a comparison of this proposed method with the earlier ones with regard to the data delivery rate.Figure 18
Comparing the proposed method with the previous ones according to the data delivery rate.According to Figure18, this method enjoys a higher delivery rate in comparison to the earlier procedures, which indicates the selection of the optimal route and avoidance of bottlenecks and the loss of the least amount of packets in the proposed method. It can be seen that the proposed method has been improved the data delivery rate in the wireless sensor network by about 1%.


## 5. Conclusions

Wireless sensor networks are one of the newest media for monitoring and controlling the environment that could gather information from the environment and aggregate the data for network applications without the need for infrastructure and in a self-organizing manner. Therefore, the great popularity of these networks has created many challenges; a major challenge is an imbalance of the use of energy in the network. Due to the energy limitations of the sensor nodes, energy imbalances can overshadow all network performance metrics. Therefore, in this research, a new optimization approach has been presented using the multiobjective GWO algorithm for optimal routing in the WSNs. According to this research, for selecting the next node, the multiobjective GWO algorithm has been used based on reducing the interstitial distances between nodes and reducing energy consumption in network nodes and near-optimal routing based on the multiobjective fitness function. The outputs of the execution of this proposed procedure show that considering the evolutionary capabilities of the multiobjective GWO algorithm, this method has improved with regard to the average use of energy, network lifetime, and delivery rate by 11, 17, and 1%, respectively.Given the importance of routing and energy balance in wireless sensor networks and on the other hand due to the complexity of choosing the optimal path in this type of network, suggestions for future solutions such as the use of heuristic algorithms such as particle swarm optimization generation for finding optimal cluster heads, combining network objectives with clustering criteria to form clusters based on energy efficiency, and using multiobjective meta-heuristic methods to improve various criteria in the network.



---

*Source: 5385502-2022-02-27.xml*