New Approach of Energy-Efficient Hierarchical Clustering Based on Neighbor Rotation for RWSN

Energy Efficient Hierarchical Clustering (EEHC) method is a distributed random clustering algorithm for residential wireless sensor networks (RWSNs) with the goal of maximizing network lifetime. However, during selection of the cluster head stage, a node declares itself as a cluster head to neighboring nodes with probability p, which does not consider well the topological characteristics of the network. The new energy-efficient hierarchical clustering approach based on neighbor rotation (EEHCN) for RWSN has been proposed in this paper, the new idea of which determines whether a node of RWSN can become a cluster head node by comparing the comprehensive weighting of the degree of the sensor node and the distance between the sensor node and the center of the subarea. When the cluster head is replaced, a member node in the set of neighbor nodes of the current cluster head becomes the new cluster head for a random time slice, and the merged information is transmitted to the nearest sink node in a multi-hop manner according to the routing information. The experimental results demonstrate that the proposed method is more effective in saving network energy, improving data transmission efficiency, and maximizing network lifetime of RWSN. The innovative research work is very useful for the relative application of the RWSN, such as smart home or smart community.


I. INTRODUCTION
With the rapid development of wireless technology, residential wireless sensor networks (RWSNs) in the Internet of Things (IOT) with RWSN for smart home or smart community have been extensively used for monitoring applications [1]. The computing resources and energy of the IoT devices are limited, so the growth of the IoT devices has brought enormous challenges to the IoT system. The traditional solution is to introduce cloud computing and offload computing tasks to servers with sufficient computing resources. However, cloud services are centralized to process data. Multiple IoT devices offload data to the cloud center at The associate editor coordinating the review of this manuscript and approving it for publication was Tawfik Al-Hadhrami . the same time, which may lead to serious network congestion and increase latency and energy consumption of the IoT devices, especially for some delay-sensitive tasks. RWSN is a self-organizing network composed of a large number of sensor nodes that sense various physical or environmental conditions within the network. These nodes communicate with each other and have limited resources, especially energy [2]. Sensor nodes have the functions of monitoring, processing, storing, and transmitting data and have accurate data fusion capabilities [3]- [5]. Furthermore, sensor nodes are in charge of sending environmental information over the network, collecting monitoring data, and transmitting these data to the base station through sink nodes (SN) [6]. RWSN has the characteristics of high node deployment density, unreliability, high power consumption, computation and memory VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ limitations [7], [8]. In addition, RWSN has a complex and varied topological structure. To improve the efficiency of network perception and data processing, the method of network cluster management has emerged [9]. In the wake of the scalability of sensor networks and improvements in their power and efficiency, hierarchical clustering is playing an increasingly important role [10]. In a hierarchy-based architecture, the central node of each layer can fuse the data, which is collected by its member nodes using data fusion technology, and then transmits the clustered data to the base station (BS). Non-central nodes can only perceive data. The inner nodes are called cluster heads (CHs). The nodes located on the upper layer transmit data to the BS with the help of the nodes on the lower layer. Cluster formation and special tasks assigned to CHs reduce power consumption within a particular cluster, which increases the scalability of the sensor network [11], [12]. Because these sensed data are clustered, the amount of data transmitted to the BS can be reduced, and the lifetime of the entire sensor network can be extended. Hierarchical routing protocols can extend the lifetime of RWSNs to a large extent, but because they ignore the state of neighbors in CH selection, existing protocols may lead to premature death of the CH [13]. In hierarchical clustering, the RWSN is randomly divided into several clusters, and each cluster is managed by a CH. First, the sensor node transmits data to the CH, and then the CH forwards the clustered data to the base station [14].
The hierarchical clustering routing protocol in RWSN supports the mobility of sensor nodes and CHs. The whole protocol is divided into two phases: the establishment phase and the steady-state phase [15]. After the sensor nodes are deployed, they are divided into logical clusters. Each cluster contains sensor nodes with different roles, such as the intermediate nodes, the CH, and the ordinary sensor nodes. Most computationally intensive tasks are handled by the CH [16]. In our proposed EEHCN algorithm, each cluster is managed by a set of neighbor nodes with large node degrees and close to the center of the sub-region, which can prolong the survival time of the cluster nodes. CHs transmit clustered data to the SN in a multi-hop manner. Therefore, our newly proposed method can reduce network energy consumption by optimizing the hierarchical clustering structure, thereby extending the life cycle of the wireless sensor network and achieving efficient data transmission. This is our innovative idea.
This paper introduces a cluster-head routing protocol mechanism based on an energy-saving hierarchical structure in RWSNs and investigates a new energy-efficient hierarchical clustering approach (EEHCN) based on neighbor rotation for residential energy management of the Internet of Things (IOT) with RWSN. The experimental results show that our new method can reduce the network energy consumption to a greater extent and achieve the purpose of extending network lifetime. The innovative research work is very useful for the relative application of the RWSN.

II. RELATED WORK
Based on our studies, we provide an overview of related work on residential energy management of the RWSN for smart home or smart community, including clustering algorithms, multi-hop data transmission, and energy hole problems.
Zhang et al. [17] proposed the LEACH (Low-Energy Adaptive Clustering Hierarchy) protocol, which randomly selects CHs in a round-robin manner and distributes network energy consumption evenly to each sensor node. The objective is to reduce energy consumption and improve network survival time. However, the LEACH protocol does not guarantee the location of the CH, which may reduce overall performance over a number of rounds and may even make the LEACH protocol fail. Mahmood et al. [18] proposed a cluster-based MODLEACH protocol that is different from the LEACH protocol. In this protocol, the new CH is replaced only when the remaining energy of the current CH is less than a set threshold. This approach can save energy consumption for cluster formation. Tyagi et al. [19] proposed an enhanced heterogeneous LEACH (EHE-LEACH) protocol, which selects direct communication or cluster communication based on a fixed distance threshold. The nodes near the BS communicate directly with the BS, whereas the nodes farther away from the BS use cluster-based communication. Gupta and Jha [20], Masoud and Belkasim et al. [21], and Gupta et al. [22] proposed an improved cuckoo-harmonic search-based routing protocol (ICSHS). Cuckoo search uses a new objective function to distribute CHs evenly, which can balance node energy consumption during clustering. Simultaneously, harmonic search is used for packet transmission between the CHs and the SN.
In a cluster-based RWSN, multi-hop data transmission is used to transmit data between a CH and the BS. The reason for its use can be that the distance between the CH and the BS is too long, or there may be an obstacle between them. At present, the following two methods can be used to solve this problem. One is the multi-hop plane method, in which the CH uses an existing routing algorithm to transmit data to the BS through one of its neighbor nodes [23]- [26]. The other is a hierarchical cluster-based approach, in which the network is divided into cluster layers and data are transmitted from a higher CH to a lower CH and then to the BS [27]- [30].
In RWSNs, because the sensor nodes close to the BS act as a medium for data transmission, data aggregation for multi-hop transmission will rapidly deplete energy. This is called a self-induced black hole problem or an energy hole problem [31]- [34]. This problem can lead to transmission gaps in the area around the BS. If the transmission gap of a sensor node is too large, the network will lose its perception. To solve this problem, some methods distribute sensor nodes non-uniformly, and some use routing algorithms [35]- [42].
It is known to all that the node degree involves in many different factors such as the communication/ sensing radius and the network coverage, and so on [43]- [45]. As we know that the hierarchical concept is already available, the new idea of our proposed hierarchical method selects the CH according to the node degree and the distance from the node to the center of the subarea and then determines the cluster level according to the distance between the CH and the SN. Finally, the neighbor node rotates and becomes a new CH for a random time slice, which can effectively reduce CH mortality rate, extend cluster lifetime, and improve data transmission efficiency.The proposed method is more effective in saving network energy, improving data transmission efficiency, and maximizing network lifetime of the RWSN for smart home or smart community. The topic in this paper is a multi-objective optimization problem, which means that a mathematical optimization model is needed to be used [46]- [55].

III. DESIGN AND ANALYSIS OF THE ALGORITHM
This paper proposes a new hierarchy-based clustering neighbor rotation routing protocol called the EEHCN routing protocol. Whether a sensor node can become a CH is determined by comparing the comprehensive weighting of the node degree and the distance between the node and the center of the subarea. When replacing the CH, a member node in the set of neighbor nodes of the current CH becomes a new CH for a random time slice, and the merged information is transmitted to the nearest SN in a multi-hop manner according to the routing information.

A. NETWORK MODEL
A network model of a large-scale RWSN was considered, which consisted of hundreds of sensor nodes distributed over a large area. Because sensor nodes far from the BS cannot communicate directly with the BS within their transmission range, their energy is quickly exhausted, and all sensor nodes can reach the BS only through multi-hop transmission. For simplicity, this network is assumed to be an RWSN system in which sensed data are transmitted to the BS, and there is assumed to be only one BS with sufficient energy in the vicinity of the sensor node. Assume further that the RWSN has the following properties: 1) the RWSN has high density characteristics, meaning that its topology changes only when a node's energy is exhausted; 2) the BS is unique, and its energy is unlimited; 3) the initial energy of all sensor nodes is E 0 and cannot be increased; 4) the energy consumed by sensor nodes per round is not necessarily the same; 5) each sensor node has a certain data fusion capability and a unique identifier; and 6) each sensor node can determine its own location. Figure 1 shows a case of structural model of the RWSN. Sensor nodes collect data and send them to the CH. High-level CHs transmit clustered data to the SN in a multi-hop manner by means of low-level CHs. Finally, the SN forwards data to the BS. In the structure, low-level CHs serve as intermediate nodes for high-level CHs. According to its distance from the candidate nodes and the distance between the candidate nodes and the SN, the CH decides whether to select a node as its own intermediate node.

Definition 1 (Node Degree):
In an RWSN, the number of nodes that exist within a node's perceived range is defined as the degree of the node. The greater the node degree, the higher is the importance of the node in the network. It is known to all that the node degree involves in many different factors such as the communication/ sensing radius and the network coverage, and so on. The following papers can be found in References [43]- [45]. In this paper, we mainly care the following factors.
For a network with N sensor nodes, a node can obtain the following connection matrix by sensing surrounding node information, For any node i, its node degree can be expressed as: The proposed network model includes two main kinds of energy consumption methods: data transmission and data fusion. The energy consumption of data transmission is higher than that of data fusion [25]. For CHs to perform data fusion and then send the fused data to the BS is better than for each node to send data directly to the BS [26].
According to the radio energy consumption model, if k bits of data are sent, the energy consumption is: where d 0 can be calculated as: In Eq. (3), k is the number of bits or bytes in the transmitted packet, and d is the transmission distance. When d is less VOLUME 8, 2020 than a threshold d 0 , the emissive power conforms to a free space mode; otherwise, the multi-path fading mode is applied. E elec (n J/bit) is the RF energy consumption coefficient, and ε fs and ε mp are the energy dissipation coefficients of the circuit amplifier in the two modes [27].
The energy consumption to receive k bits of data is: Each node can perform data fusion, using E cp to represent the energy to fuse one bit of data. Then the energy consumed to combine m packets of k bits into one packet is: On the basis of Eqs. (3), (5), and (6), the residual energy of the node after data transmission and data fusion is: B. ALGORITHM DESIGN The hierarchy-based clustering neighbor rotation algorithm proposed in this paper, like most clustering routing algorithms, is divided into three stages: selecting CHs, forming clusters, and inter-cluster communication [29], [30]. The CH plays a key role in both the cluster establishment and cluster maintenance phases. It not only collects node information within the cluster, but also is responsible for forwarding inter-cluster data. This paper mainly considers the degree of a node and its distance from the center of the subarea. It can reduce overlaps in cluster coverage area as much as possible and replace CHs in rotation, thus reducing node energy consumption and prolonging network lifetime.
In the initial phase of the proposed algorithm, nodes within the network broadcast their own information to neighboring nodes, including location, residual energy, and node degree. To reduce network energy consumption, the algorithm is divided into the following three phases: Step1, (Selecting a Temporary CH): Selecting The node with the largest node degree and close to the center of the subarea is selected as the temporary CH, and the nodes within a radius R are selected as member nodes of the cluster.
In different sub-regions, the decision matrix A is constructed by using Eq. (1) with the node position and the sensed radius: According to Eq. (2), the degree of each node is calculated to yield the node degree matrix DN: The node with the largest degree is chosen as the CH from the DN. The ith CH is denoted as H i , and the node degree is: If there are two or more nodes with the largest node degree in the node degree matrix DN, then the nearest of these to the center of the sub-region is selected as the CH, and the formula for distance Dis becomes: where (x i , y i ) are the position coordinates of the node with the largest node degree and (xm i , ym i ) are the position coordinates of the center of the subarea.
Step 2, (CH Adjustment): If the distance between the temporary CHs in step 1 is too small, there will be a large overlap of coverage area between clusters, which will cause a great waste of energy.
Definition 2 (Coverage Overlap Rate): When two clusters are close to each other, their coverage will overlap. Coverage overlap rate is defined as the ratio of overlap area to cluster coverage area and is denoted as Overlap. When Overlap >30%, the CH needs to be adjusted.
As shown in Figure 2, the area of the circle with center O 1 or O 2 and radius R is denoted as S. The area of triangle AO 1 B is S 1 , and the area of sector AO 2 B is S 2 . Hence, In addition, According to the cosine theorem: The value of θ 1 can be obtained from Eq. (14): The coverage overlap area ratio Overlap 1 (shaded part) can be calculated by Eqs. (12), (13), and (15) as: Step 3 (CH Replacement): The CHs not only need to sense data, but also are responsible for processing and forwarding data, which causes a CH to die prematurely. In a random time slice, converting a neighboring node of the CH into a new CH can reduce the energy consumption of the CH.
Definition 3 (Set of Neighbor Nodes) The set of nodes in a circle with the CH s i as the center and r as the radius is defined as the set of neighbor nodes, which is denoted as s i .r CH . To reduce the probability of changes in cluster structure when the CH is replaced, the new CH should be selected from the set of neighbor nodes.
As shown in Figure 3, the area of the circle with center O 1 or O 2 and radius R is denoted as S. The area of triangle CO 4 D is S 3 , and the area of sector CO 4 D is S 4 . Hence, According to the cosine theorem: The value of θ 2 can be obtained from Eq. (18): By use of Eqs. (17), (18), and (19), the coverage area overlap ratio Overlap 2 (shaded part) between the original CH coverage area and the new CH coverage area can be obtained as: It is easy to determine that the larger the value of Overlap 2 , the more stable is the cluster structure. When a CH is replaced within a set of neighbor nodes, the member nodes of the cluster are minimally changed, which reduces the energy consumption required to form clusters.
The phase of establishing inter-cluster communication links occurs after the cluster is formed. The proposal is mainly to transmit the data collected by sensor nodes efficiently to the BS in a multi-hop manner. The non-cluster head nodes send data to their respective CHs based on different TDMA time slices. The CH applies a fusion strategy after receiving the data to reduce redundancy or to restore key original data.
As shown in Figure 1, according to the distance between the CH and the SN, clusters can be layered into Layer 1 , Layer 2 ,..., Layer n , and the CH with the largest layer number selects an intermediate node from among the sublayer CHs.

Definition 4 (Set of Candidate Routing Nodes):
The set of candidate routing nodes of s i is defined as the set of CHs having a distance from the SN that is less than the distance from s i to the SN. This can be expressed as s i .R CH and calculated as: where k is the smallest integer that makes s i .R CH non-empty. If k does not exist, then s i .R CH is defined as an empty set, and node s i communicates directly with the SN. Lemma 1: When the selected intermediate node is located between a node and the SN, the energy required for data transmission is reduced.
Proof: If CH s i selects s j as its intermediate node, the network energy consumption incurred by transmitting data to the SN can be approximated as: From the above equation, it is evident that if s j is located between s i and SN, this is beneficial to energy savings. Property 1: The intermediate node of the CH is generated from its set of candidate routing nodes; otherwise, the CH directly establishes single-hop communication with the SN.
The explanation of the property 1 can be described by the Counter-example. When a CH establishes a multi-hop communication link with an SN, an intermediate node is responsible for forwarding the required data. If the intermediate node is not generated from among the set of candidate routing nodes, the intermediate node is not a CH, and the non-cluster head node does not have the function of forwarding data. The attempt is assumed to be unsuccessful. Therefore, the intermediate node of the CH is either generated VOLUME 8, 2020 from among its set of candidate routing nodes, or the CH is located in a lowest-layer cluster and directly establishes single-hop communication with the SN.
On the basis of the remaining energy E r of the candidate routing nodes and the network energy consumption E relay incurred by transmitting the data to the SN, the comprehensive weight of a candidate node is defined as: where w 1 , w 2 represent weighting coefficients and w 1 + w 2 = 1. The greater the weighting coefficient, the greater will be the predominance of this factor in selecting intermediate nodes for candidate nodes. In this study, w 1 = 0.6, w 2 = 0.4, meaning that the weight of the remaining energy is slightly higher than the weight of network energy consumption.
It is known to all that the standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance. It is calculated as the square root of variance by determining the variation between each data point relative to the mean. If the data points are further from the mean, there is a higher deviation within the data set; thus, the more spread out the data, the higher the standard deviation. Standard deviations are usually easier to picture and apply. The standard deviation is expressed in the same unit of measurement as the data, which isn't necessarily the case with the variance. Using the standard deviation, we may determine if the data has a normal curve or other mathematical relationship. Bigger variances cause more data points to fall outside the standard deviation. Smaller variances result in more data that is close to average. In this experimental tests of this paper, we adopt the classical method to deal with the standard deviation [52]- [55].

C. DESCRIPTION OF THE EEHCN ALGORITHM
This paper proposes a new hierarchy-based clustering neighbor rotation routing protocol based on node degree and distance from the center of the subarea. The CH is replaced by neighbor nodes to increase the survival time of the CH, thus prolonging network lifetime. The core idea of the algorithm is to consider comprehensively the two factors of node degree and distance from the center of the subarea. Rotation replaces the CH to balance CH energy consumption in random time slices to solve the ''hot zone'' problem in RWSN clustering [31]- [33]. The main workflow of the protocol is as follows: 1) The first step is the preparation phase. All nodes in the network broadcast their own position information and residual energy with a fixed transmitting power. At this time, the residual energy of each node is equal to the initial energy, and the degree of each node is calculated by Eq. (2). This information is stored in the node information table, which contains four fields: node ID, position coordinates, residual energy, and node degree. This step calls Algorithm 1. The pseudo-code of the algorithm 1 for the preparation phase is described as follows:  ID, i.Location, i.Er, i.DN); end 2) The second step is the CH selection phase. The CH is selected within a sub-region. A node with a large node degree and close to the center of the sub-region is selected as the temporary CH, and those nodes within the sensor radius R are the member nodes of its cluster. Algorithms 2 and 3 are called here. The distance between CHs is calculated by Eq. (11) and Eq. (16) to judge the overlap coverage of clusters. If Overlap1 exceeds 30%, the CH is re-selected according to the replacement rule of selecting a new node with opposite direction from the center and large node degree. Algorithm 4 is called here. The pseudo-codes of the algorithm 2, 3, 4 are described as follows: 3) The third step is the inter-cluster communication link establishment phase. The CH is responsible for transmitting the data collected by each sensor node to the BS in a multi-hop manner through the intermediate node. First, the candidate routing node set of each CH is obtained using Eq. (21), and then the nodes with the largest comprehensive weights are selected as intermediate nodes using Eqs. (7), (11), (22), and (23). Communication network links are then established to the SN, starting from the highest layer; 4) The fourth step is the data transmission phase. With the help of the communication links established in the third step for data transmission, Eq. (7) is used to calculate and store the residual energy of all sensor nodes, including CHs, in the transmission process; 5) The fifth step is the link maintenance phase. As time goes by, some nodes, especially CHs, may have too little residual energy or may even die. In this case, the neighbor nodes of the CH need to replace the CH. Steps 1 and 3 are repeated until the entire network lifetime is 0.

A. TEST ENVIRONMENT AND PARAMETER SETTINGS
The MATLAB 2013A platform was used to validate the algorithm through experimental testing and simulation and to compare it with the proposed LEACH, EHE-LEACH, and ICSHS protocols. Under the same test environment and test parameters, the data traffic, the energy consumption, and the lifetime of a network were analyzed and compared with the four protocols. The annotations (a), (b), (c), and (d) represent the LEACH, EHE-LEACH, and ICSHS protocols and the EEHCN protocol proposed in this paper.
The nodes in the network were randomly distributed in a 400 × 400 area, the BS was not in the area, the SN was located in the center of the area, and the SN was responsible for forwarding the collected data to the BS. Table 1 shows the network parameter settings. The packet length may be set one of four sizes as 512 / 1024 / 2048 / 4096 bits, the tests are done according to these four sizes. In this paper, we give the experimental results of 1024bits packet length.

B. EXPERIMENTAL TESTS
In the initial stage of the experiment, 200 ordinary sensor nodes were randomly generated in a two-dimensional coordinate plane of 400m × 400 m as Figure 4. The only SN was located at the center of the coordinate plane, that is, the coordinates of the SN were (200,200).
In the temporary CH selection phase, because all sensor nodes have the same initialization energy at the beginning, dividing them into cluster areas at this time needs to consider only the node degree of the subarea. Figure 5 shows that if the cluster area is divided according to the temporarily selected CHs, a large coverage area overlap will occur, resulting in low energy utilization efficiency and excessive energy consumption. Therefore, it is necessary to make further adjustments to the CHs to reduce the problem of excessive coverage overlap.    Figure 6 shows the adjusted CH distribution. The coverage overlap between clusters is less than 30%, and no excessive energy waste is caused.
The CH distribution is dynamically changed according to the different application scenarios, so the CH distribution is complex when the application scenario is moving in the RWSN, simple analysis isn't enough to explain the CH distribution with comparison, the detailed discussion for this CH distribution can be found in our other papers [1], [55].
According to the adjusted CHs, an inter-cluster communication link diagram was established, as shown in Figure 7. The outer CHs use the inner CHs as their intermediate nodes.
The outer clusters transmit collected data to the SN in a multi-hop manner. The clusters of the innermost layer directly transmit their collected data to the SN. Finally, data are transmitted by the SN to the BS.  Figure 8 shows that the larger the subarea and the sensor radius R, the smaller will be the number of CHs. According to the proof of Tao et al. [34], the optimal solution can be achieved when the sensing radius is R = 50(m) and the number of CHs is 22. Therefore, the sensor radius is defined as R = 50m. The CH plays a key role in both the cluster establishment stage and the inter-cluster maintenance stage. It not only collects the data of its member nodes, but also is responsible for forwarding inter-cluster data. Therefore, the energy consumption of the CH over a certain period of time is an important indicator of network performance. Figure 9 shows that the LEACH protocol randomly selects the CH each time; this randomness leads to instability in CH energy consumption, and an unreasonable selection may cause CH energy consumption to become excessive. The EHE-LEACH protocol, the ICSHS protocol, and the protocol proposed here are relatively stable. Otherwise, because the proposed protocol uses the strategy of combining the node degree and the residual energy to select the CH, energy consumption is reduced compared with the other protocols.
As shown in Figure 10, the node energy consumption of the LEACH protocol is not balanced. When the number of rounds is less than 700, dead nodes appear. The proposed protocol extends the lifetime of the network compared to the other three protocols. However, due to the energy black hole problem, the result almost becomes a straight line at the end of the simulation. The reason for this is that the high-level CH in the RWSN cannot establish multi-hop link communication with the SN due to the death of its intermediate node. At the same time, the EEHCN protocol network proposed in this paper has the highest number of data packets and the lowest packet loss rate. With the extension of network lifetime, the EEHCN protocol transmits more data packets than the EHE-LEACH or ICSHS protocols, and hence it can better meet the data transmission requirements of RWSNs.  Figure 11 shows that the proposed protocol has the lowest network energy consumption and that the LEACH protocol consumes the most network energy. Network energy consumption can reflect the survival time of the network, meaning that this protocol can extend the network's survival time.   Figure 12 reveals that the average residual energy of the EEHCN protocol node is higher than in the other three protocols, which can better reduce network energy consumption and improve network lifetime.
Based on the aforementioned classic calculation method of the standard deviation, Figure 13 presents the standard deviation of network energy consumption, which reflects its stability. Clearly, the energy consumption of the LEACH protocol is unstable. The network energy consumption stability FIGURE 13. Comparison of network energy standard deviation. VOLUME 8, 2020 of the proposed EEHCN protocol is slightly better than the EHE-LEACH and ICSHS protocols, showing a better energy balance.

C. TESTS WITH REAL SCENARIOS
As one of many scenarios for residential energy management of RWSN [38]- [42], the proposed method was tested in the residential environment of smart home or smart community [47]- [55]. According to related statistics, many gas explosions occur every year, which cause huge economic losses and casualties. Therefore, monitoring the gas environment is particularly important and can effectively reduce the occurrence of accidents.
How to monitor environmental information in a smart home or smart community and transmit it to the BS through an RWSN to give further warning of the danger is an urgent problem that needs to be solved. The clustering method proposed in this paper can be applied to the field of RWSN environmental security monitoring in a smart home or smart community and to real-time synchronous safety monitoring of subarea clusters of different smart communities, thus reducing network energy consumption, extending network lifetime, and effectively protecting workers and enhancing the data safety of smart home or smart community.
The main purpose of the test was to compare the number of surviving nodes, data traffic, average network residual energy, and network energy consumption of the four protocols in the same real-world scenario and to capture real-time data from two rounds (t 1 = 540, t 2 = 1080) as an object of comparison. The specific scenario test parameters are as Table 1. The relative comparison figures are as figure 14, figure 15. According to these figures, we can know that by being compared with the existing LEACH, EHE-LEACH, and ICSHS protocols, our approach has the following advantages: the survival time of the cluster is improved, and the network life cycle is significantly prolonged, and so on. So the innovative research work is very useful for the relative  applications of the RWSN, such as smart home or smart community.

V. CONCLUSION
A new energy-efficient hierarchical clustering approach based on neighbor rotation for RWSN has been proposed in this paper. At the CH selection stage, the determination of whether a node becomes a CH depends on a comprehensive weighting of the node degree and the distance between the node and the center of the subarea. In the CH replacement stage, one of the member nodes in the set of neighbor nodes of the cluster head in the current round becomes the cluster head for a random time slice. In the communication link phase, the fused information is transmitted to the nearest aggregation node in a multi-hop manner. Compared with the existing LEACH, EHE-LEACH, and ICSHS protocols, the survival time of the cluster is improved, and the network life cycle is significantly prolonged. The innovative research work is very useful for the relative application of the RWSN, such as smart home or smart community.