Clustering Routing Protocol for Mobile Wireless Sensor Networks Based on Dynamic Network Partition

— To prolong the network life and improve the network performance, a new clustering routing protocol which uses dynamic network to divide and consider the residual energy of sensor nodes is proposed. The design and simulation of the clustering scheme for mobile wireless sensor networks are also studied. The results show that the protocol controls the number of cluster heads by region division of the network and balances its distribution in wireless sensor networks according to the latest location of the sink node. At the same time, the residual energy of nodes is considered to balance the energy consumption of the network when the cluster head is elected. The protocol effectively solves the problem of uneven distribution of cluster heads in time and space and energy consumption of each node in the LEACH protocol. Compared with the LEACH protocol, M-LEACH effectively prolongs the network life. From this, it is seen that the application of M-LEACH protocol in mobile wireless sensor network clustering routing is effective. Paper— Clustering Routing Protocol for Mobile Wireless Sensor Networks Based on Dynamic Network… Routing Mobile Sensor Networks Based on Dynamic Network…


Introduction
communicators. WSN is a hot research field in which sensors, information processing technology, network communication technology, microelectronic technology, distributed embedded technology, software programming technology, and wireless transmission technology can intersect with each other. The United States is the origin of researches on WSN, and its research on wireless sensor networks begins in the research project of the advanced military research bureau of the Ministry of Defense in the early twenty-first Century. It is limited to the communication technology and microelectronic technology at that time, so the research on wireless sensor networks is difficult to be expanded. As a result, it is limited to military projects and cannot be applied to various civil fields. After a period of time, with the rapid development and maturity of low power chip integration technology and communication technology, more and more researchers in the computer industry and communication industry are gradually joining in the research on wireless sensor network technology. In 2003, the Natural Science Foundation of the United States developed an investment of up to $34 million for the research to support the basic theory and key technologies of sensor networks. In addition, the US Department of Defense and all military departments regard sensor networks as an important research field, attach great importance to sensor network technology, and set up a series of projects for the research on sensor networks. The content of the project covers all aspects of sensor networks from signal processing to network protocol. Compared with developed countries, the research on wireless sensor network technology in China started relatively late, but it has been basically synchronized with the advanced international level in the fields of research, application and standardization. WSN technology has become one of the directions in the information field in the world.

2
Literature review Sharma and so on (2017) proposed the classic HEED protocol (A hybrid, energyefficient, distributed clustering approach for ad hoc sensor networks) protocol and improved LEACH protocol threshold judgment method TEEN (Threshold Sensitive Energy Efficient Sensor Network Protocol). All of these protocols make the cluster head distribution uneven nature and the irrationality of the cluster head election greatly improved [1]. Lee et al. (2016) proposed the WSN clustering routing protocol C-FCM based on the FCM (Fuzzy C-Means) clustering algorithm. The protocol uses the objectivity of the fuzzy clustering algorithm to divide the sensor network into different categories. As a result, the cluster structure is more fixed, the cluster head is formed to be rational, and the survival time of the WSN node is extended [2]. Adhikary et al. (2017) proposed a clustering routing protocol ECPF based on fuzzy logic theory (An energyaware distributed clustering protocol in wireless sensor networks using fuzzy logic). The protocol cluster head adopts fuzzy logic theory to increase the quality of the cluster head and improve the node energy utilization rate [3].
In addition to inter-cluster communication and link quality, Bhatia et al. (2016) proposed a distance aware hierarchical routing protocol (DAIC), which uses distance and energy factors to divide the sensor network into a multilevel architecture, thus reducing the energy consumption among clusters [4]. Fan et al. (2016) put forward a secure and efficient ESRPSDC protocol based on the signal-noise-ratio (SNR) dynamic clustering method. In this protocol, the member nodes choose the cluster head according to the SNR, and effectively ensure the accuracy of the Sink receiving data [5]. Guravaiah et al. (2017) proposed a 2(ACH) protocol based on adaptive clustering habit to select cluster structure and path. This protocol maximizes the throughput of routing protocols and improves the data receiving rate of base station [6]. Shah et al. (2017) proposed the DEEG (A routing protocol for enhanced efficiency in wireless sensor networks) protocol, which takes into account the residual energy of the node, and communicates through the routing between the different clusters, thus effectively reducing the consumption of the communication energy between the clusters. Then, they improved DEEG and proposed the EADEEG protocol, which uses the best radius to cluster, and improves the routing between clusters with energy, which arrives at the number of rounds that postpone the node death of WSN [7]. Gupta et al. (2016) put forward a non-uniform clustering algorithm EEUC (An Uneven Cluster-Based Routing Protocol for Wireless Sensor Networks). The protocol innovatively generates cluster heads through two rounds of election, thus constructing an uneven clustering scale, and effectively reducing the energy consumption of the nodes near the Sink region, that is, relieving the "hot area" phenomenon [8].
To sum up, the above research is mainly focused on the cluster head distribution, inter-cluster communication and link quality, but the research on the fusion of mobile wireless sensor networks and cluster routing protocols is insufficient. Therefore, based on the above research, clustering routing protocol for mobile WSN using dynamic network partition is focused on. Firstly, wireless sensor networks and clustering are introduced, and then the two entities are merged together so as to divide them by applying dynamic network.

Data as the center
Because whether it is to ensure the availability of wireless sensor networks or to ensure the reliability of the transmitted data, there will be more redundancy when the wireless sensor nodes are deployed. As a result, it makes the data collected by the sensor nodes usually have greater relevance and redundancy. If the original data collected by all nodes are sent to sink nodes, it is unnecessary and it will cause great waste for energy and bandwidth in WSN. Therefore, by reducing the redundancy of data in the network, the total amount of data transmitted in the network can be reduced and the lifetime of the network can be extended. The specific methods can be roughly divided into the following several kinds: The first method: in the multi hop network protocol, when the transmitted data passes through the intermediate node, there is an intermediate node for data fusion operation. Then, the total amount of data transmitted in the network is reduced.
The second method: compress the data that needs to be sent through certain compression coding technology by sending nodes data.
The third method: use the data prediction technology, that is, through the analysis of historical data, to establish the mathematical model of the process of data evolution. Through this data model, the future data can be predicted in a certain range.

Mechanism of rotation dormancy
Usually, nodes in wireless sensor networks do not always collect information, but collect data in a certain period when the monitored events occur. This mechanism enables nodes to have considerable idle time, while in idle time, nodes can enter the dormant state to save energy. There are two kinds of mechanisms for controlling node's rotation dormancy: The first is topology control, that is, in a network with more redundant nodes, a part of the node is chosen to sleep to save energy. At the same time, it also makes the nodes that have not entered dormant to have the enough ability to ensure the connectivity of the whole network.
The second is energy management, which refers to the periodic dormancy and wakeup of each node in the network. In other words, the nodes in the network do not need to open the wireless module, but switch off the wireless communication module into the low power dormancy state according to the specific time period allocated by the protocol.

Introduction of mobility
By adding mobile sink nodes into the network, it can also play an important role in increasing network lifetime. In static wireless sensor networks, if the multi hop routing protocol is used, the nodes near the sink node will cause extra consumption because they need to transmit the data of other nodes more frequently. This extra consumption will cause "energy hole" around the sink node and then affect the network performance. In order to avoid this imbalance, mobile nodes can be introduced into the wireless sensor network, and the energy consumption of the network is balanced through the movement of nodes, so as to prolong the network life.
According to the different mobile nodes, mobility schemes in the network can also be subdivided into mobile sink nodes and mobile data collectors. The most effective way to prolong the network life is to introduce the mobile sink node, and change the distance between the nodes and the sink nodes in the network through the movement of sink nodes, and then balance the energy consumption of the whole network.

Cross-layer design
The functions of each layer in the traditional IP network with OSI layered architecture are relatively independent, and the interaction between layers can only be realized through a specific interface. The upper layer only needs to call the lower service by a set interface, but it does not need to understand the specific implementation details of the functions called. This strict hierarchical mode has the characteristics of easy encapsulation and standardization, which can effectively improve the efficiency of software programming. However, wireless sensor networks have their own characteristics, such as complex and changeable wireless channels, dynamically changing network topology structure, and severely limited resources. These features make the performance of different layers of protocols have a mutual influence on the performance. Therefore, the traditional strict layer protocol, which is restricted by each layer, cannot manage or optimize the various resources in the wireless sensor network, and it cannot achieve the optimal network performance. Therefore, cross-layer protocol design is a necessary means to maximize the lifetime of wireless sensor networks.

LEACH protocol and its hypothesis model
The LEACH protocol is a typical low power, adaptive, and hierarchical routing protocol based on layered thinking, and it is also the multi-layer routing algorithm first using data fusion. The basic idea of the protocol is to divide the whole network into several independent clusters, and the member nodes in each cluster will send the collected information to the cluster head, and the cluster heads can retransmit the data to the sink nodes after the data fusion, so as to reduce the number of data in the network. The network topology is shown in Figure 1. The LEACH protocol relies on local collaboration to cluster in the process of operation, and selects cluster heads in a random loop to achieve the purpose of balancing the energy consumption of each node and prolonging the network life. Because the energy consumed by sensor nodes in the process of sending data depends on the transmission distance and data amount, the nodes in the LEACH protocol can reduce the data transmission distance as much as possible and reduce the amount of data sent in the network through data fusion. The LEACH protocol is established based on some basic assumptions, and the following assumptions are made for the wireless sensor network model: First, all nodes know the location of sink nodes and have the ability to communicate directly with sink nodes.
Second, all nodes except sink node have the same structure and status. Third, the wireless transmission power of nodes can be adjusted according to needs. Fourth, the energy required for radio signals to transmit signals in all directions of space is the same.
The energy consumption of wireless sensor nodes sending l bit data in the distance d is as follows: (1) The meaning of each parameter in formula (1) is shown in Table 1: It can be seen that when the transmission distance of nodes is small, they follow the energy model of free space, and follow the multipath fading energy consumption model when the node transmission distance is large.
The energy used by sensor nodes to receive l bit data through wireless channels is: (2)

LEACH protocol performance analysis
Based on the above analysis of LEACH protocol, the following conclusions can be drawn: First, the selection of the cluster head is only based on the threshold value calculated by the number of nodes and the random number produced by each node. It does not take the state of the node itself into consideration. For example, when the node becomes a cluster head, the node will accelerate the death of the node, and the death of the cluster head node in the data packet transmission phase will undoubtedly lead to the data transmission interrupt.
Second, in the LEACH protocol, the node independence determines whether it is a cluster head. Not considering the location of the cluster head node will lead to the uneven distribution of the cluster head nodes in the spatial location, and cause the energy waste when the common node transfers data to the cluster head node. At the same time, the node independence decides whether it becomes cluster heads, which will also make the cluster head node unevenly distributed in each round, and the data fusion degree is not high in the round with a large number of nodes becoming cluster heads. However, in the rounds with little nodes becoming the cluster heads, the cluster head will bear more load and the thinner cluster heads will lead to the increase of the transmission overhead in the cluster.
Third, the number of cluster head nodes is constrained only by a fixed value p. In the actual deployment, the nodes in the network may not agree with the expected number because of the damage in the casting process, the placement of the location away from the other nodes, and the addition of the new nodes during the network use.
Fourth, a mobile sink node is added to the network to balance the load of each node in the network by moving the sink node in the network to reduce the impact of the "energy hole" phenomenon on the network. But the LEACH protocol does not take into account the mobility of sink nodes. The cluster heads produced by each round are randomly distributed in the network. Thus, it is difficult to give full play to the advantages of mobile sink node movement to overcome the related problems.

M-LEACH protocol design
Network model: a modified LEACH protocol (M-LEACH protocol) based on mobile sink nodes is proposed in this section in view of no consideration of the distribution of cluster heads in space and time and the residual energy of the nodes and so on individual information. This protocol will solve the problem that the number of cluster heads in the original LEACH protocol is uneven in time and space by regionalization of the network and the location of the cluster head. At the same time, the current location of the mobile sink node is referred to in the region division and the recommendation of cluster head position. Because of the random movement of the sink node is in the entire detection range, the area division and recommended cluster head position in each round are different, which can alleviate the "hot area" effect to a certain extent.
In terms of energy consumption, the M-LEACH protocol will follow the energy model given in the previous formula (1) and formula (2). As the main goal of the cluster protocol design is to improve the scalability of the protocol, the protocol designed is aimed at a large network of wireless sensor networks.
Cluster head selection in cluster structure construction phase: similar to the original LEACH protocol, the execution process of the M-LEACH protocol is carried out periodically by "Round", and each round is also composed of two stages: the cluster structure construction phase and the packet transmission phase. The clustering structure construction phase is used for network clustering and packet transmission phase for data transmission. In order to reduce protocol overhead, the duration of packet transmission phase is much longer than that of cluster structure construction phase.
At the beginning of the clustering structure construction phase, the sink node divides the whole network into several areas with equal area in its own location. The number of regions can be controlled according to the number of surviving nodes, and the gravity for each region is calculated as "the best cluster head candidate position". These "best cluster head candidate positions" are sent to all network nodes in the form of a full network broadcast with the number of nodes and the average energy of the whole network at the end of the last round. Figure 2 shows the network partition scheme and the "best cluster candidate position" in the case of "the network area is a square and the number of network nodes is 100". As shown in Figure 2, in the process of square network division, sink nodes first calculate the area of each region according to the size of the network and the number of areas to be divided. Then, the lower left corner of the network is zero, and the end points of each region on the edge of the network are calculated in order in accordance with their own position. Then the gravity of each area is calculated as the "best cluster head candidate position" according to the end point coordinates of each region.
At the same time, all nodes adjust their wireless communication module to the receiving mode at the beginning of the cluster structure construction, so as to receive the information of the sink node's full network broadcast. When a node decides to participate in the cluster head competition of the current round, it first calculates the distance between its location and the nearest "best cluster head candidate position". Then, it sets the timer according to this distance and enters the cluster head competition phase. Specifically, a competitor cluster head uses the following formula to calculate the time T of cluster head competition timer: In the above formula, T0 suggests the total time used for competition cluster head, d0 indicates the distance between the node and the nearest "best cluster head candidate", and K represents the random number between 0 and T0/n. By introducing the numerical n, the nodes participating in the competition are mainly the nodes in the "best cluster head candidate position" (n-1). It thus avoids the conflict caused by the excessive number of nodes participating in the competition, which can dynamically adjust the value of n according to the node density. K is introduced to avoid conflicts between d0 similar nodes when sending cluster head information.
The introduction of formula (3) is to encourage nodes near the "best cluster head candidate position" to become cluster heads.
When the timer timeout node set by the nodes detects whether the cluster head notification message has been received for other nodes competing for the same "best cluster head candidate position", the cluster head notification message sent by other nodes competing for the same "best cluster head candidate position" will be set as common node. On the contrary, it announces its own cluster head information by broadcasting. In the cluster head information of the broadcast, in addition to the existing self-node ID in the LEACH protocol, it also includes the number and location of the "best cluster head candidate position" competed by its own, to ensure that other nodes competing for the same cluster head position will not continue to compete. The process of cluster head determination is shown in Figure 3.
Data transmission in packet transmission phase: each node in the packet transmission phase sends information to the cluster hair according to the time slot assigned by the cluster head, and the cluster head fuses the data and then sends to the sink node.
In the wireless sensor network using mobile sink nodes, when the cluster head node is ready to send information to the sink node, it needs to set its own radio transmission power according to the latest location information of the sink node. In the whole packet transmission phase, the sink node will periodically broadcast its position to the whole network. It requires that the node transmits data to the sink nodes can calculate the distance between the sink nodes after receiving the location information of the sink node, and adjusts its transmission power according to the distance. In order to prevent the sink node from leaving the transmission range in the transmission process, the node will set the transmission radius slightly higher than the distance from the node to the sink node.
When every common node transmits data to cluster head at the last time of each round, except for the data needed, it also sends its residual energy information to the cluster head by piggyback. The cluster head is responsible for the statistics of the number of remaining nodes and the remaining energy in the cluster according to the received energy information, and sends it to the sink node so that the sink node determines the network partition based on the number of remaining nodes in the next round of cluster head construction. In the meanwhile, it calculates the average residual energy of the network. In the next round, it is sent to each node together with "the best cluster head candidate position". The packet transmission phase flow is shown in Figure 4. Sink node calculates optimal cluster head candidate location and average residual energy The sink node broadcasts the best cluster head candidate location and average residual energy Ordinary node judges whether its own excess energy is surplus average average residual energy

Analysis of network partition characteristics
The M-LEACH protocol can guarantee the relative controllability of the number of cluster heads in each round by controlling the number of the partition in the cluster construction phase. The uniform distribution of the cluster head in the space position can be guaranteed by calculating the "the best cluster head candidate position". At the same time, the energy consumption of the network is balanced by the movement of sink nodes.
Due to the random movement of sink nodes in the network, the division of each cluster structure is different to the network. When the sink node is in the middle of the whole network, the division of the whole network is shown in Figure 2. When the sink node moves to the edge of the network, the area divided may appear concave polygon. In that the position of the center of gravity may be outside the graph, "the best cluster head candidate position" recommended by the sink node may not be in the area divided, and Figure 5 and Figure 6 show two possible situations.  The "best cluster head candidate position" in the upper right position in Figure 6 is calculated by the concave hexagonal region including the right edge and upper edge of the network. It can be clearly seen that it is outside the hexagon, which effectively avoids the possibility that nodes in the edges and corners become cluster heads.
It can be seen from Figures 2, 5 and 6 that, the protocol can make the cluster head relatively averaging across the network, but the "best cluster head candidate position" recommended by the sink node is mainly focused on the zone near the network center.
If the cluster head is determined only by "the best cluster head candidate position", the nodes in the center of the network will rapidly die because of overbearing cluster head and "energy hole" will occur in the network.
In order to avoid this case, the protocol takes into account the energy factors of the node in the process of determining the cluster head, so that the energy of nodes lower than the network average energy at the end of the last round do not participate in the cluster head election. By this way, the nodes at the edge of the network will have the opportunity to become cluster heads to balance the energy of the nodes in the network.
Because other nodes around the network edge nodes have smaller density and are usually far away from the sink nodes, the nodes will consume more energy than the cluster head nodes in the middle of the network when they transmit data to the sink nodes. If these nodes are frequently used as cluster heads, the energy consumption of their own and their cluster members will be increased. Therefore, nodes located at the edge of the network are not suitable for being used as cluster head nodes. However, in the routing protocol considering node energy factors, nodes that consume more energy when being used as cluster head will less shoulder cluster heads. In other words, routing protocols considering node energy factors can make the nodes at the edge of the network less shoulder the cluster head, and the nodes in the network center have more opportunities to serve as cluster heads.

Conclusion
As wireless sensor networks are gradually becoming practical, the problem of severely limited energy constraints in wireless sensor networks is becoming more and more serious. Therefore, it is very important to study efficient network protocols to prolong network lifetime, improve network energy efficiency and save network use cost. In this context, the routing protocol of wireless sensor networks is studied in depth. In traditional static networks, if multiple hop routing protocols are used in the network, the nodes near the sink node need to transmit additional data to other nodes more frequently, which will cause additional consumption. This additional consumption will cause "energy hole" around the sink nodes, thus affecting the network performance. If the single hop routing protocol is used, it will make the nodes far away from the sink node consume a lot of energy to transmit data to the sink node, which also affects network performance. The introduction of mobile sink nodes in wireless sensor networks can balance energy consumption around the network and extend the network lifetime.
The malicious attack is further suppressed by node feedback. The experiments show that simple game and cooperative game can effectively suppress malicious attacks in normal networks and the networks dominant by malicious nodes.