# Proposing a Density-Based Clustering Approach (DBCA) to Aggregate Data Collected from the Environment in Arid Area for Desertification

Authors: Zhihao Peng; Raziyeh Daraei; Seyed Mojtaba Ahmadpanahi; Amir Seyed Danesh; Safieh Siadat; Poria Pirozmand; Rozita Jamili Oskouei
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Nowadays, the expansion of desert areas has become one of the main problems in arid areas due to various reasons such as rising temperatures and vegetation fires. Establishment of wireless sensor networks in these areas can accelerate the process of environmental monitoring and integrate temperature and humidity information sending to base stations in order to make basic decisions on desertification. The main problem in this regard is the energy limitation of sensor nodes in wireless sensor networks, which is one of the main challenges in using these nodes due to the lack of a fixed power supply. Because the node consumes the most energy during data transmission, the node that transmits the most data or sends the packets over long distances runs out of energy faster than the others and the network work process is disrupted. Therefore, in this study, a density-based clustering approach is proposed to integrate data collected from the environment in arid areas for desertification. In the proposed method at each step, the node that has the most residual energy and is highly centralized will be selected to transfer information. The results of experiments for evaluating the performance of the proposed method show that the proposed method balances the energy consumption of the nodes and optimizes the lifespan of the nodes in the wireless sensor network installed in the arid area.


---

## Body

## 1. Introduction

In arid areas, due to the high temperature of the area and direct sunlight, the existing plant tissue is at risk of fire. When plant tissue is destroyed in desert areas and that area becomes a desert, the habitat in these areas will be severely damaged. On the other hand, human intervention and environmental manipulation in desert areas is also a potential threat to the plant tissue of the region. Human beings may cause fires in these areas due to negligence, in which case they will increase the area of deserts and waterless and grassy areas. Therefore, controlling such areas using wireless sensor networks to detect temperature changes at different times of the day can be a useful solution to prevent fires.Wireless sensor networks (WSNs), as part of the Internet of Things (IoT) that can collect data from different areas, are widely used today in various aspects of human life [1]. The wireless sensor network consists of a set of sensor nodes that can sense environmental conditions such as temperature, pressure, humidity, and pollution. The sensor node has three main functions: it senses the data, processes the collected data, and transmits it to other nodes or a base station (BS) [2]. One of the most common uses of WSNs is to monitor changes in the field of interest. The changes may belong to any physical variable such as heat, sound, and light. The sensor node detects these changes and processes them to become a consistent format of the data. Now, this data must reach the hole effectively [3]. Recent advances in wireless network technology with optimal energy consumption have created the technical conditions for the construction of multifunctional small sensor devices that can be used to sense and observe physical phenomena. The main purpose of environmental monitoring is not only to collect data from different places but also to provide the necessary information for scientists, planners, and policymakers to be able to optimally decide on management and improvement of the environment and provide useful information to end users [4].The motivation of this paper is as follows:(i)
Wireless sensor networks suffer from limited resources, especially shortages of fixed power supplies. Therefore, sensor nodes can consume their limited energy resources when performing a process or transmitting information in a wireless environment. Therefore, it is essential to use different methods to save energy when performing processes and communications(ii)
Further, the lifespan of sensor nodes is highly dependent on battery life; therefore, clustering of wireless sensor nodes in order to transfer the sensed information to the nearest hole and the base station can be very effective in reducing energy consumption, which is a reason for the need for this researchThe contributions of this paper are as follows:(i)
Proposing a novel clustering method for wireless sensor nodes in order to transfer the sensed information faster to the hole and the base station(ii)
The use of a proposed method for reducing energy consumption and increasing the lifespan of sensors in WSN, which are the main purposes of this research(iii)
We have used density-based clustering in environmental observer sensor networks in the direction of desertification in which the selection of the cluster head node in a comparative way to create a balance between distance and residual energy between nodesThis research is organized in five sections. In the second section, we explain some of the researches which are done by other researchers related to this research. In the third section, we explain the proposed method in this research. In the fourth section, we will explain in detail the simulation performed to evaluate the performance of the proposed method, and finally, the fifth section will include the conclusion.


## 2. Related Works

Environmental monitoring applications by wireless sensor networks can be broadly classified into internal and external monitoring. Consequences of internal oversight typically include oversight of buildings and commercial offices. These applications include measuring temperature, light, humidity, and air quality. Other important indoor applications may include habitat monitoring, road traffic monitoring, earthquake detection, volcanic eruption detection, flood detection, and weather forecasting. Sensor nodes are also widely used in arid and desert areas and can play a very important role in monitoring humidity and temperature in these areas [5].Clustering in wireless sensor networks (WSNs) is an important step in communicating between sensor nodes. Many clustering techniques are presented with different features. Their main purpose is to facilitate conscious communication of energy between a large number of established nodes. One of the most important factors affecting the clustering process is the distribution of nodes. In many cases, the distribution of nodes is random. This type of distribution creates a network with different regions and with different densities. A different number of nodes in each subarea of the network means different communication loads and therefore different energy consumption.Abdellatief et al. [6] proposed a distributed density-based clustering method called “spatial density-based clustering for WSNs” to reduce power consumption and ultimately increase grid life. This method was performed with the help of a simple initial spatial analysis for the distribution of nodes before the clustering process and divides the network into different regions according to their density level. Clusters are formed in each region separately, according to the amount of density measured.Sinha et al. [7] developed a new forest fire prevention technique that detects the High Active Area (HA) (near the center of the fire) in the forest and records all sensed data through wireless communication that will be transferred to the base station as soon as possible so that the fire department can take the necessary measures as soon as possible to prevent the spread of fire. For this purpose, sensors have been deployed in the forest area to sense the various data needed to detect forest fires and divide that area into different clusters. A law-based semiregulatory classification model is proposed in this study to identify whether the cluster area is high active, medium active (MA), or low active (LA) in the forest. This model is trained in such a way that only one parameter of the data sensed by the sensor nodes is transferred to the primer (hole) of that area due to energy limitation, the primer can state (HA, MA, and LA) to predict. The region with 96% accuracy transmits all its sensor nodes in the HA cluster through the cap to the base station, and the greedy transfer technique is continuously used. This proposed method efficiently and quickly transfers the measured data from the HA area to the base station in the forest and saves the energy of all sensor nodes in the forest.Grover et al. [8], in order to monitor the forest, divided its environment into square clusters, each of which has a sensor system. Node localization is done using satellite communications to reduce cover holes and ensure maximum range with the least delay. These nodes link the data to a monitoring station with a specific location, and an alarm is generated according to the sensed thresholds based on the new logic algorithm.Moussa et al. [9] proposed a method for comparing fault-tolerant routing protocols to develop a method for forest fire detection that measures network longevity and network response time to an event, taking into account characteristics. Considers various issues in this regard. To test this method, the researchers simulated multilevel fault-tolerant routing protocols, disconnected heterogeneous routing protocol (HDMRP), and advanced ant-based QoS-based routing protocol in heterogeneous wireless sensor networks (EAQHSeN). Castalia WSNs were performed and tested in this research. The simulation results showed that HDMRP and EAQHSeN use twice as much and almost three times longer network response time than the multilevel protocol, respectively.Ravikumar [10] proposed a method involving the exceptional component of remote control sensors for detecting forest fires. The sensor data is aggregated using the Arduino board and transmitted to a remote base station. In addition, an alert is generated and sent using the GSM module.Kadir et al. [11] considered the development of the use of wireless sensor networks (WSNs) to identify the source of forest fires in Indonesia. WSN technology, which is used for the ground-based sensor system to collect environmental data, records any changes in reporting time to the data center for analysis. Data training is performed to identify fire points in the data center to determine the focus of the fire. The sensors will be installed in several places where the fire has already occurred and the next possible fire location is predicted. Mathematical analysis was used in this study to model the number of sensors required to be located in the forest area.Aksamovic et al. [12] proposed a system for early detection of forest fires using a WSN simulator based on the proposed sensor model and the developed WSN model. The WSN emulator covers important design issues (including coverage of the monitored area in relation to the initial sensor deployment, the number of sensors required for targeted deployment, and the change of coverage as a function of time).Darabkh et al. [13] proposed a density-based and energy-aware clustering and routing protocol (EA-DB-CRP) for data collection in wireless sensor networks. Its purpose is to distribute the load between the sensor nodes, which in turn balances the energy consumption in the network and thus prolongs the life of the network.Yuan et al. [14] proposed a compact sensor-based cyclic routing data collection (CS-CARDG) to improve network life. The key technology adopted by the CS-CARDG scheme is that the data is collected by the cluster head node and the network first forms a cluster and each node in the cluster sends the data packet to the head of the cluster, and finally, each cluster forms M-dimensional data according to the requirements of intensive measurement technology to ensure data retrieval.Abdullah et al. [15] proposed a common data collection algorithm (CDCA). The simulation results of the algorithm presented in this research showed that using this algorithm, the latency in a small number of mobile elements is significantly reduced. In addition, the performance of the CDCA algorithm is compared with the area division algorithm (ASA). As a result, CDCA showed superior performance in terms of network latency, load balance, and required number of mobile elements.Edla et al. [16] proposed a clustering algorithm based on particle swarm optimization and a new fit function taking into account the average distance of clusters, gate load, and number of overhead gates in the network suggested.Mahdi et al. [17] first briefly reviewed the various clustering methods, and then, they reviewed the node clustering methods that have been proposed by several researchers for tracking targets in wireless sensor networks and are based on data aggregation. They explained and briefly stated the advantages and disadvantages of each one of these methods. Finally, these researchers tabulated all the methods studied in this study in terms of their performance in tracking targets in wireless sensor networks and compared their advantages and disadvantages.Khan et al. [18] focused on saving energy and extending the life of nodes in wireless sensor networks and proposed the Energy-Efficient Multistage Routing Protocol (EE-MRP) for energy saving in wireless sensor networks. This protocol has 3 parts including (a) a new multistage routing algorithm for data transmission in the network, (b) a new algorithm for efficient selection of cluster head, and (c) a new scheme for cluster formation. The simulation results of the proposed protocol in this research, using MATLAB software, showed that, compared to other researches, this protocol increases the performance of wireless sensor networks by reducing energy consumption, streamlining the selection of cluster head, and increasing the lifespan and operational capacity of the network.Mahdi et al. [19] focused on tracking identified targets in wireless sensor networks and proposed a fully distributed algorithm named as Endocrine Inspired Sensor Activation Mechanism for Multi-Target Tracking (ESAM) in which node placement is self-organizing and energy efficient. This operation of this algorithm is limit to the number of activated nodes around the targets that are being tracked, so that they can reduce energy consumption and increase network life. The proposed algorithm reflects the features of the real-time activation system of sensors based on the general information flow in the endocrine system in the human body. The amount of hormones can directly affect the regulation of sleep and wakefulness of the nodes. In this algorithm, special rules were defined that can enable hormone levels to regulate the sleep-wake cycle of the nodes in a way that reduces the wake-up time of the nodes and ultimately reduce the energy consumption of these nodes. The simulation results of the proposed algorithm showed that this algorithm can control the performance of nodes without having to receive commands from the central controller, and in addition, compared to other algorithms for tracking an attacking object in wireless sensor networks, the results show that this algorithm is more efficient and stable.Mahdi et al. [20] proposed a routing strategy aimed at maximizing overlap paths for efficient data aggregation and linking cost issues in clustered WSNs, known as the weighted data aggregation protocol (WDARS). The proposed method was evaluated simultaneously to evaluate the energy consumption, network life, production capacity, and package delivery ratio, and its performance was compared with the InFRA and DRINA protocols (which are cluster-based routing protocols that aim only to maximize routes overlap for efficient data aggregation). The results of analysis and simulation showed that WDARS has better performance and more reliable than other methods and can further increase the lifespan of the network.Ali et al. [21] categorized all research conducted by other researchers based on important parameters such as their objectives, applications, communication technology, types of data sets used, discovery, and types of data. In addition, several case studies were examined to demonstrate the role of sensor clouds in providing high computational capabilities. In addition, they outlined some of the challenges of collecting data in sensor clouds.Wang et al. [22] proposed the advanced Power Efficient Gathering in Sensor Information Systems (EPEGASIS) algorithm to reduce the hot spot problem. This algorithm has two stages; the operations performed in the first stage are determining the optimal communication distance to reduce energy consumption, setting the threshold to protect the dying nodes, and using mobile sink technology to balance energy consumption between nodes, and the operation performed in the second step is setting the communication range of nodes to the sink node. The results obtained from the simulation of the proposed algorithm of these researchers showed that the proposed algorithm has a better performance compared to other methods and algorithms in terms of increasing life, reducing power consumption, and reducing latency in the network.Wang et al. [23] proposed a new algorithm to optimize the performance of the PSO algorithm. In the proposed algorithm, the nodes are first randomly placed in fixed geographical areas. Then, a network is created between these nodes. The whole network is then divided into several subnetworks, and the amount of coverage and energy consumption for each subnetwork is calculated. The results obtained from the simulation of the proposed algorithm show that this algorithm is able to create a balance between the amount of network coverage and energy consumption in that network.Ge et al. [24] on the similarities and differences between the big data technologies used in different areas of the Internet of Things (such as smart cities, industry, smart homes, smart transportation, and healthcare) discussed and proposed a platform for mutual understanding of these differences and similarities and mentioned that some of these technologies can be used in several IoT domains. Finally, these researchers proposed a conceptual framework to guide other researchers in selecting Big Data technologies in various areas of the Internet of Things.Wang et al. [25] studied an empower Hamilton loop-based data collection algorithm with a mobile agent for WSNs, then proposed the combination of the PEGASIS algorithm and the Hamilton loop algorithm. Through a combination of single-hop and multihop mechanisms and a moving agent added a mobile agent node (MA), this authors proposed a design of an optimal empower Hamilton loop using a local optimization algorithm. The simulation results of the proposed algorithm showed that this algorithm can increase the network lifespan and reduce the propagation delay in the network and balance the amount of resource consumption compared to the application of each algorithm alone (PEGASIS and Hamilton loop algorithm).Table1 summarizes the research-related articles reviewed in this study.Table 1
Summarization of related works reviewed in this research.
RelatedAuthor nameYearBrief explanationProposed algorithm based on PSOEdla et al. [16]2019Proposed a clustering algorithm based on particle swarm optimization and a new fit function taking into account the average distance of clusters, gate load, and number of overhead gates in the network suggested.Wang et al. [23]2018Proposed a new algorithm to optimize the performance of the PSO algorithm. In the proposed algorithm, the nodes are first randomly placed in fixed geographical areas. Then, a network is created between these nodes. The whole network is then divided into several subnetworks, and the amount of coverage and energy consumption for each subnetwork is calculated.SurveyMahdi et al. [17]2016First briefly reviewed the various clustering methods and then they reviewed the node clustering methods that have been proposed by several researchers for tracking targets in wireless sensor networks and are based on data aggregation. They explained and briefly stated the advantages and disadvantages of each one of these methods.Ali et al. [21]2018Categorized all research conducted by other researchers based on important parameters such as their objectives, applications, communication technology, types of data sets used, discovery, and types of data. In addition, several case studies were examined to demonstrate the role of sensor clouds in providing high computational capabilities. In addition, they outlined some of the challenges of collecting data in sensor clouds.Ge et al. [24]2018Studied on the similarities and differences between the big data technologies used in different areas of the Internet of Things discussed and proposed a platform for mutual understanding of these differences and similarities and mentioned that some of these technologies can be used in several IoT domains. Finally, these researchers proposed a conceptual framework to guide other researchers in selecting Big Data technologies in various areas of the Internet of Things.Proposed algorithm based on PEGASIS algorithmWang et al. [22]2018Proposed the advanced Power Efficient Gathering in Sensor Information Systems (EPEGASIS) algorithm to reduce the hot spot problem.Wang et al. [25]2019Proposed the combination of the PEGASIS algorithm and the Hamilton loop algorithm. Through a combination of single-hop and multihop mechanisms and a moving agent added a mobile agent node (MA), these authors proposed a design of an optimal empower Hamilton loop using a local optimization algorithm.Reduce energy consumptionMahdi et al. [19]2016Proposed a fully distributed algorithm named as Endocrine Inspired Sensor Activation Mechanism for Multi-Target Tracking (ESAM) in which node placement is self-organizing and energy efficient. The main purpose of the ESAM is to reduce energy consumption and increase network lifespan.Mahdi et al. [20]2016Proposed a routing strategy aimed at maximizing overlap paths for efficient data aggregation and linking cost issues in clustered WSNs, known as the weighted data aggregation protocol (WDARS). The main purpose of WDARS is to reduce energy consumption, increase network lifespan, increase production capacity, and package delivery ratio.


## 3. The Proposed Method

This study presents a density-based clustering approach for collecting critical data in wireless sensor networks. In wireless sensor networks, resource constraint is one of the main challenges facing the network. In most cases, the installation of nodes in the network is done randomly. These nodes are spread in different areas by helicopter, and access to these nodes is not easily possible. For this reason, the limited energy in wireless sensor nodes has become a major issue for the longevity of wireless sensor networks. Wireless sensor networks are evaluated according to the balance of energy consumption and network life. Therefore, researchers are trying to optimize energy consumption in wireless sensor networks and a lot of work has been done in this field. Wireless sensor nodes use the following three modes of power when networked:(i)
Receive data and information from the environment(ii)
Data processing(iii)
Sending informationOptimization of energy consumption in wireless sensor networks depends on providing optimal methods to reduce energy consumption in the above situations. At the stage of receiving data and information from the environment, each of the sensor nodes embedded in the network environment has a constant energy consumption, and reducing energy consumption at this stage requires the design of special-purpose sensor nodes, which may incur design costs. There are more nodes than normal sensor nodes, and in this case, using wireless sensor networks may not be cost-effective. Optimization of energy consumption in the data processing stage depends on the policy of sending data to the hole node. Wireless sensor nodes send the collected data to the node based on periodic and event-based policies. In the periodic data transmission policy, wireless sensor nodes periodically send the collected data to the hole node at regular intervals. In this policy, the amount of energy consumption is higher, because the collected data, in addition to the energy required to process the data, also consume the energy required to send the data in each intermittent period of time, if it may not have changed at all in the environmental parameters and the energy consumed to send the data is actually wasted. In this regard, an event-based policy has been proposed to reduce energy consumption. In this policy, when something special happens in the environment under the supervision of the wireless sensor network, the wireless sensor nodes send information. Wireless sensor nodes, like periodic policies, collect data from the environment at regular intervals and process the collected data. When the processing result is true under a certain condition, the wireless sensor nodes send the data. In this case, only when a special event occurs in the network and the network-controlled environment, the necessary energy is consumed to send data.In the proposed method, a wireless sensor network has been used for desertification. In desert and arid regions, due to the high temperature of the region and direct sunlight, the existing plant tissue is at risk of fire. When plant tissue is destroyed in arid areas that area becomes a desert and a lot of damage is done to the habitat in these areas. On the other hand, human intervention and environmental manipulation in desert areas is also a potential threat to the plant tissue of the region. By setting fires in these areas, humans may cause fires in these areas due to negligence, in which case it will lead to an increase in the area of deserts and waterless and grassy areas. Therefore, controlling such areas using wireless sensor networks to send temperature data at different times of the day can be a useful solution. Wireless sensor networks aggregate area temperature information and send it to the base station. In order to desertify the proposed method, sensor nodes equipped with a temperature sensor have been used. In desert areas, when the temperature exceeds a certain level, it may damage the vegetation of the area and cause the loss of vegetation and the expansion of desert areas. Therefore, in the proposed method to collect information from desert areas, the temperature of the area is collected at regular intervals. In the proposed method, in order to optimize energy consumption in the process of information processing and data aggregation and sending to the hole, the event-based data aggregation policy is used. In this method, the ambient temperature is compared with the temperature threshold specified in the central station and if the temperature obtained is higher than the average, it is recognized as critical data and this critical data is sent to the hole node. Critical data in wireless sensor networks are aggregated in the proposed method when plant tissue in these areas is compromised. The danger in the proposed method is felt when the temperature of the area rises to such an extent that it exceeds the tolerable threshold for plant tissue in the area and there is a possibility of loss of plant tissue. In such circumstances, it is necessary to send a warning to the Central Desert Monitoring Station to take the necessary measures to prevent damage to plant tissue. Therefore, in the proposed method, considering that the temperature of desert areas increases only in limited hours of the day, critical data detection and transfer of data and information is done only when necessary, and energy consumption will be its lowest value. Therefore, the proposed method considers energy consumption optimization in the data processing stage according to the information processing model and critical data transmission.In the data transmission stage, the energy consumption of the nodes is determined based on the distance between the source node and the destination node. The greater the distance between the nodes, the more force is required to send the nodes and the energy consumption will naturally increase. Therefore, methods based on sending data packets and information directly to the hole can have the highest energy consumption in routing wireless sensor networks. For this purpose, in order to optimize energy consumption at this stage, multistep methods are used instead of single-step sending. In multistep transmission methods, the node with the most residual energy is selected as the next node to transfer data at each stage. One of the most common methods introduced to optimize energy consumption is clustering. In clustering methods, the nodes that have the most residual energy are selected as cluster nodes and the task of aggregating data from the wireless sensor nodes of the cluster member and sending it to the hole are in charge. In these methods, the energy in the wireless sensor nodes is balanced when the data is transferred to the hole and the lifespan of the wireless sensor network is increased. In the proposed method, the density-based clustering method is used. Due to the sensitivity of clustering methods to the initial central points, clustering methods based on density have been developed to create clusters without the need for a cluster center and with the desired shape. These methods usually identify clusters as dense areas of nodes in the network. The density of nodes in the network reduces the intercluster distances as much as possible and optimizes the energy consumption in the wireless sensor network. One of the most popular density-based clustering algorithms is the DBSCAN algorithm, which expands clusters according to density-based connection analysis. In wireless sensor networks, the distances of the nodes are different due to the fact that the nodes are randomly distributed in the network. Thus, the clustering method places the density of nodes that are close to each other in a cluster. In the following, we present the basic concepts of density-based clustering.Density-based application spatial clustering (DBSCAN) is one of the most popular density-based clustering algorithms. This algorithm covers areas of the network with sufficient density in the clusters and forms irregularly shaped clusters in the network space with nodes far from the rest of the nodes as noise. This algorithm defines each cluster as a set of maximum connected points with high density [26]. The main idea of density-based clustering is based on neighborhood definitions and connected nodes in the neighborhood.


### 3.1. Proposed Routing in This Research

In the proposed method, in order to aggregate data from desert areas, a wireless sensor network is used, in which we use the density-based clustering method to send data for routing. In the proposed method, the proposed sensor network is first simulated based on the random distribution of nodes in the desert region. According to the definitions of the density-based clustering algorithm in wireless sensor network, the proposed method clusters wireless nodes in the network. In the proposed method for density-based clustering, several random nodes are selected. The neighborhood radius and the threshold are initially randomly selected, but by changing these parameters based on trial and error, we will reach the optimal value for the neighborhood radius and the threshold number of wireless sensor nodes in the neighborhood. Then, according to the neighborhood radius and the threshold of the minimum nodes in the neighborhood ofε-node, the neighboring nodes of each of the random nodes are searched and the nodes in the neighborhood radius of each are identified. If the number of these nodes exceeds the minimum threshold of the number of nodes in the neighborhood, the initial random node is selected as the main member of the cluster and the same process is repeated for all neighboring nodes of the main node. Thus, clusters of sensor nodes are formed in the network. After density-based clustering in the network to transmit sensed data, the wireless sensor nodes after processing the data, if data is detected as critical data, sends the hole or node that has the most value based on the selection function in the cluster. The amount of competence in the proposed method is determined based on a combination of three parameters (including the distance of the nodes from each other, the direct distance of the node to the hole, and the remaining energy of the nodes). The node that has the shortest distance to its neighbors in the neighborhood radius and its direct distance to the hole is less than the rest and also has more residual energy will have the highest amount of merit. The node with the most competence in the cluster is selected as the cluster head node in each step so that the energy consumption of the nodes in the cluster is balanced. If the cluster head nodes collide with another cluster head node on their way to the hole, they send the data to that node to take advantage of the multistep transfer. Otherwise, if the head node is in the closest cluster to the hole, it sends the data directly to the hole.In wireless sensor networks, after determining the density-based clusters, some nodes may not be in the neighborhood of any other node and also do not have the appropriate number of nodes in their neighborhood, so they do not belong to a cluster and remain as individual nodes in the network. Such nodes send their data to the hole in a single step if they have a critical data to send to the hole, if these nodes are close to the hole; otherwise, they send their data to the nearest node in the nearest cluster to route between the cluster member node and the cluster head node. By sending data to the head node of a cluster, the routing process from the head node to the hole node is done in a single step or multiple steps.


### 3.2. Select the Cluster Head Node

In the proposed method, after clustering the wireless sensor nodes based on the DBSCAN algorithm, in the routing and data transfer stage, nodes that contain critical data send cluster head data into nodes. In order to select the cluster head node in the proposed method, three factors (including distance within the cluster, distance to the hole, and residual energy) are examined. The node with the most energy remaining in the cluster, the shortest distance to the other nodes in the cluster, and the shortest distance to the hole is considered the best option for selection as the cluster head. The main difference between the proposed method and the DBSCAN clustering algorithm is that at each step, the cluster head node is evaluated and the node that is more qualified is selected as the cluster head node. Therefore, the cluster head nodes are constantly updated and changed, in which three factors (distance within the cluster, distance to the hole, and residual energy) are examined at each stage. Given the proposed wireless sensor network, it is assumed that the nodes are fixed. Therefore, the main factor determining the cluster head node will be the amount of energy remaining, and if the nodes are considered mobile, the values of all three factors are constantly changing and changes in the selection of cluster head nodes at each stage can be very significant. In the following, we will model the factors of the cluster head node selection function.


#### 3.2.1. Intracluster DistanceDnc

In the proposed method, cluster member nodes must send information to the cluster head node. When the cluster member nodes in each cluster surround the cluster head, it means that the distance between the cluster member nodes and the cluster head node is half, and the distance between the data packets and data transmission is the shortest. In fact, when the cluster head node is almost in the middle of the other nodes in the cluster, it will be approximately the same distance from all nodes or will have the minimum distance from all nodes. Thus, the transmission of data in the shortest distance requires the least amount of energy. The intracluster distance model is expressed in Equation (1) [27]:
(1)Dnc=min∑m=1M∑n=1Ndncluster.In Equation (1), M represents the number of clusters, N represents the number of members of each cluster, and dncluster represents the Euclidean distance of cluster head nodes to cluster member nodes.


#### 3.2.2. Distance of Cluster Head Node toDcs Hole Node

In clustering-based protocols, the cluster head node combines data and information on the received data and information and sends them to the hole node. In fact, in a cluster head node, a data processing step is performed to eliminate incomplete and duplicate information. The remaining information is then sent to the hole node as useful information. In the initial protocols, nodes are sent from the cluster head to the hole in a single step, and information is sent directly from each cluster head node to the hole. Such a strategy wastes too much energy on a cluster head. Therefore, using multistep data transfer is a solution to solve this problem, which is used in the proposed method. As shown in Figure1, cluster head nodes send data and information to the destination through other cluster head nodes to transfer data.Figure 1
Multistage transfer from cluster head to hole node [19].As shown in Figure1, cluster head nodes use a multistep approach to transmit data and information. In this case, the shorter the distance between the cluster head node and the hole node is, the shorter the path, and as a result, energy consumption is reduced. The distance model between the cluster head node and the cavity node is expressed in
(2)Dcs=min∑m=1Mdcsink,where dcsink shows the Euclidean distance from the cluster head node to the hole node.


#### 3.2.3. Energy Consumption

The energy consumption model in WSN is divided into two general parts, which we will review and model in the following.(1) Total Energy Consumption of the Energy1 Network. The total energy consumption of the network in the clustering stage is as follows.In the first step, the cluster head node plays a message informing the others that it is the cluster head node. The cluster node table is also updated and distributed among the cluster member nodes. This table is sent to the nodes of the cluster, and the value of the transmitted data in this case is equal tot bits. The energy consumption of the cluster head node when it sends information is calculated from Equation (3) [27].
(3)Ecnt.dcn=tEelec+τfdcn2.dcn<dc,tEelec+τmdcn4.dcn≥dc.In Equation (3), Eelec represents the energy consumption by the cluster head node for the transmission of 1 bit of data, τf and τm represent the signal amplifier energy consumption when transmitting 1 bit of data at each unit distance in open space, respectively. Multiple fade models. dcn shows the Euclidean distance of the current cluster members to the cluster head node. Threshold d0=τf/τm is used for conversion between communication channel models. The cluster member node then receives the t-bit information and the cluster table from the cluster head node and, according to the same table, sends the t-bit data to the cluster head node to verify the cluster head node. In this process, the energy consumption of cluster member nodes is calculated using Equation (4) [27]:
(4)Enon−cnt.dcn=tEelec+τfdcn2+t×Eelec.dcn<dc,tEelec+τmdcn4+t×Eelec.dcn≥dc.Finally, the process energy consumption for the cluster head node to accept the cluster member nodes to send the packet to them is calculated through Equation (5) [27]:
(5)Ecnt.dcn=tEelec×NM−1.In summary, the total energy consumption of the Energy1 grid in the clustering phase is summarized by Equation (6) [27].
(6)Energy1=mintEelec×N+2M−1+τfdcn2×NM−1.dcn<dc,mintEelec×N+2M−1+τmdcn4×NM−1.dcn≥dc.(2) Energy Consumption Balance of Energy2 Network. The network energy balance of the network has two parts, Dno and Den. The frequency of the number of node members in each Dno cluster is as follows.The smaller the cluster size, the higher the average number of nodes per cluster, meaning that the load on each cluster head is more balanced [27].
(7)Dno=∑i=1mvi−u2m,where vi is the number of node members in the i cluster and u is the average number of nodes in each cluster in the network.Energy consumption per cluster isDen. The smaller size of each cluster, then the average energy consumption in the clusters is calculated from
(8)Den=∑i=1mEi−ue2m,where Ei is the total energy consumption in clusters i and ue is the average energy consumption of each cluster.In summary, the network energy balance is calculated from Equation (9) [27]:
(9)Energy2=minDno+Den.Thus, in order to optimize energy consumption in WSN, it is possible to select a suitable cluster head node, based on the mentioned factors, which can improve energy consumption and wireless sensor network life. Figure2 shows the proposed method flowchart.Figure 2
Flowchart of the proposed method.


## 3.1. Proposed Routing in This Research

In the proposed method, in order to aggregate data from desert areas, a wireless sensor network is used, in which we use the density-based clustering method to send data for routing. In the proposed method, the proposed sensor network is first simulated based on the random distribution of nodes in the desert region. According to the definitions of the density-based clustering algorithm in wireless sensor network, the proposed method clusters wireless nodes in the network. In the proposed method for density-based clustering, several random nodes are selected. The neighborhood radius and the threshold are initially randomly selected, but by changing these parameters based on trial and error, we will reach the optimal value for the neighborhood radius and the threshold number of wireless sensor nodes in the neighborhood. Then, according to the neighborhood radius and the threshold of the minimum nodes in the neighborhood ofε-node, the neighboring nodes of each of the random nodes are searched and the nodes in the neighborhood radius of each are identified. If the number of these nodes exceeds the minimum threshold of the number of nodes in the neighborhood, the initial random node is selected as the main member of the cluster and the same process is repeated for all neighboring nodes of the main node. Thus, clusters of sensor nodes are formed in the network. After density-based clustering in the network to transmit sensed data, the wireless sensor nodes after processing the data, if data is detected as critical data, sends the hole or node that has the most value based on the selection function in the cluster. The amount of competence in the proposed method is determined based on a combination of three parameters (including the distance of the nodes from each other, the direct distance of the node to the hole, and the remaining energy of the nodes). The node that has the shortest distance to its neighbors in the neighborhood radius and its direct distance to the hole is less than the rest and also has more residual energy will have the highest amount of merit. The node with the most competence in the cluster is selected as the cluster head node in each step so that the energy consumption of the nodes in the cluster is balanced. If the cluster head nodes collide with another cluster head node on their way to the hole, they send the data to that node to take advantage of the multistep transfer. Otherwise, if the head node is in the closest cluster to the hole, it sends the data directly to the hole.In wireless sensor networks, after determining the density-based clusters, some nodes may not be in the neighborhood of any other node and also do not have the appropriate number of nodes in their neighborhood, so they do not belong to a cluster and remain as individual nodes in the network. Such nodes send their data to the hole in a single step if they have a critical data to send to the hole, if these nodes are close to the hole; otherwise, they send their data to the nearest node in the nearest cluster to route between the cluster member node and the cluster head node. By sending data to the head node of a cluster, the routing process from the head node to the hole node is done in a single step or multiple steps.


## 3.2. Select the Cluster Head Node

In the proposed method, after clustering the wireless sensor nodes based on the DBSCAN algorithm, in the routing and data transfer stage, nodes that contain critical data send cluster head data into nodes. In order to select the cluster head node in the proposed method, three factors (including distance within the cluster, distance to the hole, and residual energy) are examined. The node with the most energy remaining in the cluster, the shortest distance to the other nodes in the cluster, and the shortest distance to the hole is considered the best option for selection as the cluster head. The main difference between the proposed method and the DBSCAN clustering algorithm is that at each step, the cluster head node is evaluated and the node that is more qualified is selected as the cluster head node. Therefore, the cluster head nodes are constantly updated and changed, in which three factors (distance within the cluster, distance to the hole, and residual energy) are examined at each stage. Given the proposed wireless sensor network, it is assumed that the nodes are fixed. Therefore, the main factor determining the cluster head node will be the amount of energy remaining, and if the nodes are considered mobile, the values of all three factors are constantly changing and changes in the selection of cluster head nodes at each stage can be very significant. In the following, we will model the factors of the cluster head node selection function.


### 3.2.1. Intracluster DistanceDnc

In the proposed method, cluster member nodes must send information to the cluster head node. When the cluster member nodes in each cluster surround the cluster head, it means that the distance between the cluster member nodes and the cluster head node is half, and the distance between the data packets and data transmission is the shortest. In fact, when the cluster head node is almost in the middle of the other nodes in the cluster, it will be approximately the same distance from all nodes or will have the minimum distance from all nodes. Thus, the transmission of data in the shortest distance requires the least amount of energy. The intracluster distance model is expressed in Equation (1) [27]:
(1)Dnc=min∑m=1M∑n=1Ndncluster.In Equation (1), M represents the number of clusters, N represents the number of members of each cluster, and dncluster represents the Euclidean distance of cluster head nodes to cluster member nodes.


### 3.2.2. Distance of Cluster Head Node toDcs Hole Node

In clustering-based protocols, the cluster head node combines data and information on the received data and information and sends them to the hole node. In fact, in a cluster head node, a data processing step is performed to eliminate incomplete and duplicate information. The remaining information is then sent to the hole node as useful information. In the initial protocols, nodes are sent from the cluster head to the hole in a single step, and information is sent directly from each cluster head node to the hole. Such a strategy wastes too much energy on a cluster head. Therefore, using multistep data transfer is a solution to solve this problem, which is used in the proposed method. As shown in Figure1, cluster head nodes send data and information to the destination through other cluster head nodes to transfer data.Figure 1
Multistage transfer from cluster head to hole node [19].As shown in Figure1, cluster head nodes use a multistep approach to transmit data and information. In this case, the shorter the distance between the cluster head node and the hole node is, the shorter the path, and as a result, energy consumption is reduced. The distance model between the cluster head node and the cavity node is expressed in
(2)Dcs=min∑m=1Mdcsink,where dcsink shows the Euclidean distance from the cluster head node to the hole node.


### 3.2.3. Energy Consumption

The energy consumption model in WSN is divided into two general parts, which we will review and model in the following.(1) Total Energy Consumption of the Energy1 Network. The total energy consumption of the network in the clustering stage is as follows.In the first step, the cluster head node plays a message informing the others that it is the cluster head node. The cluster node table is also updated and distributed among the cluster member nodes. This table is sent to the nodes of the cluster, and the value of the transmitted data in this case is equal tot bits. The energy consumption of the cluster head node when it sends information is calculated from Equation (3) [27].
(3)Ecnt.dcn=tEelec+τfdcn2.dcn<dc,tEelec+τmdcn4.dcn≥dc.In Equation (3), Eelec represents the energy consumption by the cluster head node for the transmission of 1 bit of data, τf and τm represent the signal amplifier energy consumption when transmitting 1 bit of data at each unit distance in open space, respectively. Multiple fade models. dcn shows the Euclidean distance of the current cluster members to the cluster head node. Threshold d0=τf/τm is used for conversion between communication channel models. The cluster member node then receives the t-bit information and the cluster table from the cluster head node and, according to the same table, sends the t-bit data to the cluster head node to verify the cluster head node. In this process, the energy consumption of cluster member nodes is calculated using Equation (4) [27]:
(4)Enon−cnt.dcn=tEelec+τfdcn2+t×Eelec.dcn<dc,tEelec+τmdcn4+t×Eelec.dcn≥dc.Finally, the process energy consumption for the cluster head node to accept the cluster member nodes to send the packet to them is calculated through Equation (5) [27]:
(5)Ecnt.dcn=tEelec×NM−1.In summary, the total energy consumption of the Energy1 grid in the clustering phase is summarized by Equation (6) [27].
(6)Energy1=mintEelec×N+2M−1+τfdcn2×NM−1.dcn<dc,mintEelec×N+2M−1+τmdcn4×NM−1.dcn≥dc.(2) Energy Consumption Balance of Energy2 Network. The network energy balance of the network has two parts, Dno and Den. The frequency of the number of node members in each Dno cluster is as follows.The smaller the cluster size, the higher the average number of nodes per cluster, meaning that the load on each cluster head is more balanced [27].
(7)Dno=∑i=1mvi−u2m,where vi is the number of node members in the i cluster and u is the average number of nodes in each cluster in the network.Energy consumption per cluster isDen. The smaller size of each cluster, then the average energy consumption in the clusters is calculated from
(8)Den=∑i=1mEi−ue2m,where Ei is the total energy consumption in clusters i and ue is the average energy consumption of each cluster.In summary, the network energy balance is calculated from Equation (9) [27]:
(9)Energy2=minDno+Den.Thus, in order to optimize energy consumption in WSN, it is possible to select a suitable cluster head node, based on the mentioned factors, which can improve energy consumption and wireless sensor network life. Figure2 shows the proposed method flowchart.Figure 2
Flowchart of the proposed method.


## 3.2.1. Intracluster DistanceDnc

In the proposed method, cluster member nodes must send information to the cluster head node. When the cluster member nodes in each cluster surround the cluster head, it means that the distance between the cluster member nodes and the cluster head node is half, and the distance between the data packets and data transmission is the shortest. In fact, when the cluster head node is almost in the middle of the other nodes in the cluster, it will be approximately the same distance from all nodes or will have the minimum distance from all nodes. Thus, the transmission of data in the shortest distance requires the least amount of energy. The intracluster distance model is expressed in Equation (1) [27]:
(1)Dnc=min∑m=1M∑n=1Ndncluster.In Equation (1), M represents the number of clusters, N represents the number of members of each cluster, and dncluster represents the Euclidean distance of cluster head nodes to cluster member nodes.


## 3.2.2. Distance of Cluster Head Node toDcs Hole Node

In clustering-based protocols, the cluster head node combines data and information on the received data and information and sends them to the hole node. In fact, in a cluster head node, a data processing step is performed to eliminate incomplete and duplicate information. The remaining information is then sent to the hole node as useful information. In the initial protocols, nodes are sent from the cluster head to the hole in a single step, and information is sent directly from each cluster head node to the hole. Such a strategy wastes too much energy on a cluster head. Therefore, using multistep data transfer is a solution to solve this problem, which is used in the proposed method. As shown in Figure1, cluster head nodes send data and information to the destination through other cluster head nodes to transfer data.Figure 1
Multistage transfer from cluster head to hole node [19].As shown in Figure1, cluster head nodes use a multistep approach to transmit data and information. In this case, the shorter the distance between the cluster head node and the hole node is, the shorter the path, and as a result, energy consumption is reduced. The distance model between the cluster head node and the cavity node is expressed in
(2)Dcs=min∑m=1Mdcsink,where dcsink shows the Euclidean distance from the cluster head node to the hole node.


## 3.2.3. Energy Consumption

The energy consumption model in WSN is divided into two general parts, which we will review and model in the following.(1) Total Energy Consumption of the Energy1 Network. The total energy consumption of the network in the clustering stage is as follows.In the first step, the cluster head node plays a message informing the others that it is the cluster head node. The cluster node table is also updated and distributed among the cluster member nodes. This table is sent to the nodes of the cluster, and the value of the transmitted data in this case is equal tot bits. The energy consumption of the cluster head node when it sends information is calculated from Equation (3) [27].
(3)Ecnt.dcn=tEelec+τfdcn2.dcn<dc,tEelec+τmdcn4.dcn≥dc.In Equation (3), Eelec represents the energy consumption by the cluster head node for the transmission of 1 bit of data, τf and τm represent the signal amplifier energy consumption when transmitting 1 bit of data at each unit distance in open space, respectively. Multiple fade models. dcn shows the Euclidean distance of the current cluster members to the cluster head node. Threshold d0=τf/τm is used for conversion between communication channel models. The cluster member node then receives the t-bit information and the cluster table from the cluster head node and, according to the same table, sends the t-bit data to the cluster head node to verify the cluster head node. In this process, the energy consumption of cluster member nodes is calculated using Equation (4) [27]:
(4)Enon−cnt.dcn=tEelec+τfdcn2+t×Eelec.dcn<dc,tEelec+τmdcn4+t×Eelec.dcn≥dc.Finally, the process energy consumption for the cluster head node to accept the cluster member nodes to send the packet to them is calculated through Equation (5) [27]:
(5)Ecnt.dcn=tEelec×NM−1.In summary, the total energy consumption of the Energy1 grid in the clustering phase is summarized by Equation (6) [27].
(6)Energy1=mintEelec×N+2M−1+τfdcn2×NM−1.dcn<dc,mintEelec×N+2M−1+τmdcn4×NM−1.dcn≥dc.(2) Energy Consumption Balance of Energy2 Network. The network energy balance of the network has two parts, Dno and Den. The frequency of the number of node members in each Dno cluster is as follows.The smaller the cluster size, the higher the average number of nodes per cluster, meaning that the load on each cluster head is more balanced [27].
(7)Dno=∑i=1mvi−u2m,where vi is the number of node members in the i cluster and u is the average number of nodes in each cluster in the network.Energy consumption per cluster isDen. The smaller size of each cluster, then the average energy consumption in the clusters is calculated from
(8)Den=∑i=1mEi−ue2m,where Ei is the total energy consumption in clusters i and ue is the average energy consumption of each cluster.In summary, the network energy balance is calculated from Equation (9) [27]:
(9)Energy2=minDno+Den.Thus, in order to optimize energy consumption in WSN, it is possible to select a suitable cluster head node, based on the mentioned factors, which can improve energy consumption and wireless sensor network life. Figure2 shows the proposed method flowchart.Figure 2
Flowchart of the proposed method.


## 4. Simulation and Evaluation

In order to implement the proposed method based on multistep routing and density-based clustering, we first simulate the environmental monitoring network in desert areas. The proposed network is configured in a monitored desert environment in a space of100×100 that the number of nodes distributed in this environment is equal to 100 sensor nodes that these nodes are randomly in the monitored environment are scattered. Due to the scalability of the proposed method and review of improvements made by this method, the number of sensors can be changed in different scenarios. Recommended wireless sensor network settings include antenna and transmission channel settings, bandwidth, power consumption, packet length, queue length for sensor nodes, and other network configuration parameters according to the standards listed in various studies conducted by numerous researchers have been considered. In order to implement the proposed method, MATLAB software version 2015 has been used. The proposed method is theoretically done in MATLAB software with the aim of using it in desert areas in order to aggregate critical data, which can be generalized for use in other environments. Figure 3 shows the initial configuration of the proposed sensor network.Figure 3
Configuration of the desert environment sensor network.As shown in Figure3, a hole node is embedded in the middle of the desert area with coordinates 50∗50 that can be accessed by all wireless sensor nodes and the distance between the wireless sensor nodes is from a balanced cavity. Wireless sensor nodes in the monitored area surround the hole node to collect sensed information in the desert area, including the temperature of the area, and send it to the hole.Wireless sensor nodes are clustered around the hole to classify nodes close together, and a cluster head node is specified to communicate with the hole. Cluster head nodes usually lose their energy with each transfer of information, so the cluster is updated at each step of the data transfer, and the node provides the best conditions for communication with other cluster head nodes. They exchange information with the hole, selected as the cluster head node. In this way, the energy consumption of the nodes in each cluster is balanced and according to the clustering of all nodes in the network, the energy consumption in the whole network will be balanced.In the proposed method, density-based clustering is used. Density-based clustering is done according to the presence of nodes around the cavity node. There are two basic conditions for selecting a node as a member of a cluster (including neighborhood radius and number of wireless sensor nodes in the vicinity of a wireless sensor node). The value of the parameters related to the neighborhood radius and the threshold of the number of sensor nodes in the neighborhood radius vary according to different applications and the area covered. Thus, in the proposed method, in order to obtain the value of these parameters, several tests have been performed to determine the neighborhood radius of each node in the desert area under monitoring and the number of neighboring sensor nodes.Based on the test results, the best value of the neighborhood radius parameter is equal to 10 meters and the best value for the threshold number of sensor nodes in the neighborhood is equal to 3 neighboring sensor nodes. Figure4 shows the density-based clustering for wireless sensor nodes in the desert region.Figure 4
The density-based clustering for wireless sensor nodes in the desert region.As shown in Figure4, the wireless sensor nodes in the desert area are clustered based on density. In Figure 4, you can see the wireless sensor nodes are divided into 9 separate clusters. One of the most important advantages of the density-based clustering method is that there is no need to select the primary central node. In partial clustering methods, the basis of clustering is based on the selection of the initial central node and the distance of the spheres is calculated based on these central points. In these methods, each wireless sensor node is assigned to the nearest center of the cluster and is placed in the cluster that most likely belongs to that cluster. In split methods, incorrect selection of the primary node can lead to incorrect clustering of wireless sensor nodes. For this purpose, to eliminate the disadvantage of partition clustering methods, in the proposed method, the density-based clustering method is used, which is more efficient in dividing nodes and clustering nodes in the wireless sensor network of the region, which is under supervision. In Figure 4, the sensor nodes are clustered based on their neighborhood radius and the number of wireless sensor nodes located in the neighborhood radius, and each node is assigned to one of the clusters based on the density connection chain. Some nodes do not belong to any of the clusters. To transfer data and information from these nodes, if they are close to the hole, send data directly to the hole or send data and information to the nearest node from the nearest cluster. In the proposed method, first, the cluster head nodes are selected according to the value of their proportionality function. Cluster head nodes are the nodes that have the most residual energy, the shortest distance to other nodes in the cluster, and the shortest distance to the hole. Given that the energy of all nodes is equal in the first step of transmitting information in the network and identifying the cluster head nodes and the energy of any node is not currently consumed, in this step to determine the cluster head nodes from two factors (including distance to cluster member nodes and distance to hole) were used. Cluster head nodes first update the cluster head node information in the routing table and send a message in the form of a routing message to all nodes in the cluster, in addition to declaring themselves heads, receive information about wireless sensor nodes. Accordingly, the wireless sensor nodes send a routing response message to the cluster head node in order to recognize and validate the cluster head node. After receiving the routing response messages, the cluster head nodes also update the routing table and determine the cluster member nodes that are responsible for receiving sensed information from the desert area covered by these nodes and send this information to the node of the hole. Figure 5 shows the sending of information from cluster member nodes to verify cluster head nodes.Figure 5
Sending information from cluster member nodes to cluster head nodes.As shown in Figure5, cluster member nodes send their information in the form of routing response messages to cluster head nodes. Cluster head nodes are selected according to the residual energy factors, distance to cluster member nodes, and distance to hole node. Cluster member nodes also send their packets to the node when they have critical information. In some clusters, the distance from some cluster member nodes to the cluster head node may be greater than the distance from the cluster member node to the adjacent cluster head node. In this case, the cluster member nodes send their packets to the adjacent cluster head node. The aim of the proposed method is to balance energy consumption in wireless sensor nodes, and for this purpose, cluster head nodes that have a better position in terms of energy and distance within the cluster and distance to the hole are less than other nodes in the cluster, which are used to send data to the hole. Table 2 shows the selected cluster head nodes, the amount of energy remaining, and the distance between them and the hole node.Table 2
Information about cluster head nodes.
90807670634734254Index of cluster head nodes0.499950.499950.499950.499950.499950.499950.499950.499950.49996Residual energy40.3841.4931.1841.8733.6541.1446.6742.5254.65Distance to the holeAs shown in Table2, the cluster head nodes are selected according to the residual energy and the distance to the hole node. These nodes are responsible for communicating with the hole and receive the sensed information from the wireless nodes, aggregate it, and send the processed information to the hole in a single step or multiple steps. Single-step sending, if the cluster of the critical data sending node is the closest cluster to the hole node. Otherwise, the data is sent in several steps between the cluster head nodes in order to send to the hole. Finally, the path created in the routing table is updated and declared as the current path. The next step in sending information is when one of the wireless sensor nodes installed in the desert area has critical data. In this case, the wireless sensor node needs to send information to the cluster head node. At this stage, the previous cluster head node is evaluated based on the residual energy factor. If the nodes in the network are more suitable in terms of residual energy factors, distance to other nodes of the cluster, and distance to the node of the hole compared to the current head node, the clusters are updated in order to balance energy consumption. New cluster heads are selected. Otherwise, the old head node remains in place and continues to send information to the hole. Figure 6 shows the steps for updating clusters and transmitting information over a wireless sensor network every 200 repetitive steps until the nodes are energized.Figure 6
Steps to update clusters and cluster head nodes.
(a)(b)(c)(d)(e)(f)(g)As shown in Figure6, at each step of receiving the critical message and sending information from the wireless sensor nodes to the cluster head nodes, the cluster head nodes are updated and the node with the best merit from the factors mentioned are selected as the cluster head node.Further, in Figure6, we have the following:
(a)
The nodes of the cluster, the cluster head node, and the hole node are repeated in the 201st step, as we see in this sectionThe position of the nodes inside all the clusters and the cluster heads related to each of the clusters in every 200 repetitions are shown in Figures6(b) to 6(g).
(b)
Cluster member nodes, cluster head node, and hole node are repeated in the 401st step(c)
Cluster member nodes, cluster head node, and hole node are repeated in the 601st step(d)
Cluster member nodes, cluster head node, and hole node are repeated in the 801st step(e)
Cluster member nodes, cluster head node, and hole node are repeated in the 1001st step(f)
Cluster member nodes, cluster head node, and hole node are repeated in the 1201st step(g)
Cluster member nodes, cluster head node, and hole node are repeated in the 1401st stepIn all of these forms, we see that in every 200 repetitions, the amount of energy of the nodes decreases, so the cluster head is updated and replaced by another node that has more energy and less distance than the hole and other nodes. In all of these cases, the number of dead nodes is zero, that is, until 1401 repetitions, no node died, or in other words, the energy of no node was zero until 1401 repetitions.The transmission of information in wireless sensor networks continues until most of the sensor nodes within the network lose their energy and a coverage gap in the network occurs. When a node in the network loses its energy and is not able to collect data from the monitored environment, according to the use of density-based clustering method in the proposed method, the nodes connected to the desired node, they are responsible for collecting data from the area covered by the dead node. This will continue until the cover hole phenomenon occurs in the network, but in the event of a hole in the network cover, the wireless sensor network will not be able to collect data from the desert area. Thus, the network performance is disrupted and the so-called network life ends.Figure7 shows the proposed wireless sensor network after the end of the network life. As shown in Figure 7, the proposed wireless sensor network is unable to collect data from the monitored environment after the death of a large number of sensor nodes embedded in the network. In this case, the life of the network ends and the transfer of information to the network temperature monitoring stations is not possible. According to Figure 7, the dead nodes can be seen as small black dots, which have lost the ability to transmit information. Thus, with the death of sensor nodes in the network, the life of the network ends.Figure 7
Wireless sensor network in desert areas after the end of network life.


### 4.1. Evaluation of the Proposed Method

After implementing the proposed method to evaluate the amount of energy efficiency and other network parameters, we evaluate the proposed method. The evaluation of the proposed method includes the study of the behavior of nodes in the network and the amount of energy consumption by them and the effect of the density-based clustering method on the performance of nodes in the network. Due to the increasing use of wireless sensor networks for environmental monitoring, many parameters have been introduced in wireless sensor networks that need to be improved and optimized. In the proposed method, according to the research objectives, which include reducing the energy consumption of nodes, increasing the lifespan, and increasing the throughput and data delivery rate in the wireless sensor network, the performance of the proposed wireless sensor networks in terms of these three, the invoice is checked.According to the clustering methods in wireless sensor networks, which is based on the transmission of information at close distances, the transmission of information at short distances in the wireless sensor network, in addition to creating a balance in energy consumption in network and increase network life, can reduce end-to-end latency between wireless sensor nodes and the number of packets lost in the network. Reducing the number of lost packets in the network increases the throughput rate and data delivery. Therefore, first, the amount of energy consumed in the wireless sensor nodes in the network is evaluated in the proposed method. The amount of energy consumed for each wireless sensor node in the proposed wireless sensor network is calculated and shown in the graph. In this diagram, the energy consumption increases linearly, which indicates the balanced energy consumption of the wireless sensor nodes in the proposed method. Due to the fact that the energy of all nodes runs out of time in close proximity to each other and there is no node in the diagram whose energy is exhausted earlier than the rest and disrupts the performance of the network, therefore, the average energy consumption in the network increases in a balanced way. Therefore, the average energy consumption of nodes in the proposed wireless network increases in a balanced way due to the use of the density-based clustering method. The density-based clustering method divides the wireless sensor nodes based on the density in the wireless sensor networks. Dense clusters of nodes in different areas of the wireless sensor network select nearby nodes and transmit data at the closest distance. Thus, energy consumption in wireless sensor networks is balanced and the average energy consumption in the network per step of data transmission in the network is 2.548 joules.The second goal of the proposed method is to increase the lifetime of the network. Network longevity is one of the basic criteria in the network that most routing methods try to improve this criterion. Network lifetime is considered as the time when wireless sensor nodes are available and collect desert temperature data and send it to the hole. In a wireless sensor network, some nodes may lose energy, but due to the use of density-based clustering, other connected nodes are responsible for collecting data, but in some cases, the number of dead nodes in the network may be so great that the network coverage is disrupted. In this case, the operation of wireless sensor networks is disrupted and the life of the network ends. Figure8 shows the network lifetime diagram in the proposed method.Figure 8
Graph of network lifetime in the proposed method.As shown in Figure8, the lifetime of the network is completed after 1525 cycles of data and information transfer and critical data aggregation. The energy of the wireless sensor nodes ends after the first death of the nodes, respectively, and this indicates the balanced energy consumption in the proposed network. All wireless sensor nodes consume the same energy, and after the first node completes its energy in 1429, the other nodes die almost identically, indicating optimized energy consumption and longevity.Other criteria evaluated in the proposed method are data delivery rate and network throughput. The rate of data delivery in the network is the ratio of packets delivered to the hole from total packets sent by wireless sensor nodes.Also, the pass rate is the ratio of packages delivered per unit of time. Therefore, in order to calculate these criteria in order to optimize the proposed method based on data delivery rate and throughput rate, the rate of lost packets in the network must be first evaluated. Loss in the network increases with a very slight slope, the total number of lost packets during the life of the network is equal to 99 packets, and the loss rate of data packets is equal to 0.0198%. The proposed method, due to the use of the density-based clustering method, transmits information at the closest distance, and this reduces the rate of data packet loss and increases the rate of delivery and network throughput. Figure9 shows a graph of data delivery rates in the proposed method. Also shown in Figure 10 is the network throughput diagram in the proposed method.Figure 9
Delivery rate in the proposed method.Figure 10
Permeability rate in the proposed method.As shown in Figures9 and 10, the proposed method reduces the data loss rate and increases the data delivery rate and throughput rate in the network by considering the data transfer at the closest distances between nodes. In the proposed method, the average data delivery rate is 93% and the average throughput is 99.55%.


### 4.2. Comparison of the Proposed Method with Previous Methods

After evaluating the proposed method, in order to validate and evaluate the improvement resulting from the use of the density-based clustering method, we will compare the proposed method with other previous methods. Due to the importance of energy consumption in routing methods in wireless sensor networks, various criteria for evaluating and optimizing these methods have been introduced in numerous studies conducted by researchers. One of the most important evaluation criteria introduced is the method of average energy consumption and the number of live nodes in information transmission periods in the network. Therefore, the proposed method can be compared with the methods presented in other researches based on these two criteria [6]. Figure 11 shows a comparison of the proposed method with the methods presented in other studies based on the average energy consumption.Figure 11
Comparison of the proposed method with previous methods in terms of average energy consumption.As shown in Figure11, the proposed method has a lower average energy consumption than the previous methods due to the use of the density-based clustering method. Figure 12 shows a comparison of the proposed method with other previous methods in terms of the number of live nodes in different periods of information transmission in the network. As shown in Figure 12, the proposed method has a better value than the previous methods in terms of the number of live nodes in different periods of information transmission in the network.Figure 12
Number of live nodes in different cycles of information transmission in the network.


## 4.1. Evaluation of the Proposed Method

After implementing the proposed method to evaluate the amount of energy efficiency and other network parameters, we evaluate the proposed method. The evaluation of the proposed method includes the study of the behavior of nodes in the network and the amount of energy consumption by them and the effect of the density-based clustering method on the performance of nodes in the network. Due to the increasing use of wireless sensor networks for environmental monitoring, many parameters have been introduced in wireless sensor networks that need to be improved and optimized. In the proposed method, according to the research objectives, which include reducing the energy consumption of nodes, increasing the lifespan, and increasing the throughput and data delivery rate in the wireless sensor network, the performance of the proposed wireless sensor networks in terms of these three, the invoice is checked.According to the clustering methods in wireless sensor networks, which is based on the transmission of information at close distances, the transmission of information at short distances in the wireless sensor network, in addition to creating a balance in energy consumption in network and increase network life, can reduce end-to-end latency between wireless sensor nodes and the number of packets lost in the network. Reducing the number of lost packets in the network increases the throughput rate and data delivery. Therefore, first, the amount of energy consumed in the wireless sensor nodes in the network is evaluated in the proposed method. The amount of energy consumed for each wireless sensor node in the proposed wireless sensor network is calculated and shown in the graph. In this diagram, the energy consumption increases linearly, which indicates the balanced energy consumption of the wireless sensor nodes in the proposed method. Due to the fact that the energy of all nodes runs out of time in close proximity to each other and there is no node in the diagram whose energy is exhausted earlier than the rest and disrupts the performance of the network, therefore, the average energy consumption in the network increases in a balanced way. Therefore, the average energy consumption of nodes in the proposed wireless network increases in a balanced way due to the use of the density-based clustering method. The density-based clustering method divides the wireless sensor nodes based on the density in the wireless sensor networks. Dense clusters of nodes in different areas of the wireless sensor network select nearby nodes and transmit data at the closest distance. Thus, energy consumption in wireless sensor networks is balanced and the average energy consumption in the network per step of data transmission in the network is 2.548 joules.The second goal of the proposed method is to increase the lifetime of the network. Network longevity is one of the basic criteria in the network that most routing methods try to improve this criterion. Network lifetime is considered as the time when wireless sensor nodes are available and collect desert temperature data and send it to the hole. In a wireless sensor network, some nodes may lose energy, but due to the use of density-based clustering, other connected nodes are responsible for collecting data, but in some cases, the number of dead nodes in the network may be so great that the network coverage is disrupted. In this case, the operation of wireless sensor networks is disrupted and the life of the network ends. Figure8 shows the network lifetime diagram in the proposed method.Figure 8
Graph of network lifetime in the proposed method.As shown in Figure8, the lifetime of the network is completed after 1525 cycles of data and information transfer and critical data aggregation. The energy of the wireless sensor nodes ends after the first death of the nodes, respectively, and this indicates the balanced energy consumption in the proposed network. All wireless sensor nodes consume the same energy, and after the first node completes its energy in 1429, the other nodes die almost identically, indicating optimized energy consumption and longevity.Other criteria evaluated in the proposed method are data delivery rate and network throughput. The rate of data delivery in the network is the ratio of packets delivered to the hole from total packets sent by wireless sensor nodes.Also, the pass rate is the ratio of packages delivered per unit of time. Therefore, in order to calculate these criteria in order to optimize the proposed method based on data delivery rate and throughput rate, the rate of lost packets in the network must be first evaluated. Loss in the network increases with a very slight slope, the total number of lost packets during the life of the network is equal to 99 packets, and the loss rate of data packets is equal to 0.0198%. The proposed method, due to the use of the density-based clustering method, transmits information at the closest distance, and this reduces the rate of data packet loss and increases the rate of delivery and network throughput. Figure9 shows a graph of data delivery rates in the proposed method. Also shown in Figure 10 is the network throughput diagram in the proposed method.Figure 9
Delivery rate in the proposed method.Figure 10
Permeability rate in the proposed method.As shown in Figures9 and 10, the proposed method reduces the data loss rate and increases the data delivery rate and throughput rate in the network by considering the data transfer at the closest distances between nodes. In the proposed method, the average data delivery rate is 93% and the average throughput is 99.55%.


## 4.2. Comparison of the Proposed Method with Previous Methods

After evaluating the proposed method, in order to validate and evaluate the improvement resulting from the use of the density-based clustering method, we will compare the proposed method with other previous methods. Due to the importance of energy consumption in routing methods in wireless sensor networks, various criteria for evaluating and optimizing these methods have been introduced in numerous studies conducted by researchers. One of the most important evaluation criteria introduced is the method of average energy consumption and the number of live nodes in information transmission periods in the network. Therefore, the proposed method can be compared with the methods presented in other researches based on these two criteria [6]. Figure 11 shows a comparison of the proposed method with the methods presented in other studies based on the average energy consumption.Figure 11
Comparison of the proposed method with previous methods in terms of average energy consumption.As shown in Figure11, the proposed method has a lower average energy consumption than the previous methods due to the use of the density-based clustering method. Figure 12 shows a comparison of the proposed method with other previous methods in terms of the number of live nodes in different periods of information transmission in the network. As shown in Figure 12, the proposed method has a better value than the previous methods in terms of the number of live nodes in different periods of information transmission in the network.Figure 12
Number of live nodes in different cycles of information transmission in the network.


## 5. Conclusion

In this study, a density-based clustering method for collecting climate data, using wireless sensor networks that are scattered in different places in arid areas, was suggested that this method could be used for desertification-related purposes by identifying areas with critical climatic conditions. Ambient temperature information is received and analyzed at user stations. A normal threshold is defined for ambient temperature, which if the ambient temperature exceeds this threshold indicates the possibility of hazards (such as fire hazard, loss of plant tissue, and desert expansion). This study also proposes a new method to optimize energy consumption and increase the lifespan of wireless sensor networks in desert areas. The simulation results of the proposed method show that in addition to optimizing energy consumption in the network and increasing the life of the network, this method has improved the rate of packet loss and the rate of delivery and throughput in the network. In addition, the proposed method, considering the use of the density-based clustering method and the transfer of information through the closest distances, compared to other previous methods that are performed by other researchers in this field, in terms of average energy consumption and number of alive nodes on different cycles of information transmission, our proposed method has shown better results in the WSN.Given the importance of clustering in wireless sensor networks for optimal energy routing, future suggestions for the present study include the following:(i)
Using combined metaexploration methods in order to find the optimal cluster head(ii)
Using mobile cavity nodes to reduce energy consumption(iii)
Using different density-based clustering methods for clustering wireless sensor nodes in the network



---

*Source: 6627771-2021-02-10.xml*