A Network Topology Control and Identity Authentication Protocol with Support for Movable Sensor Nodes

It is expected that in the near future wireless sensor network (WSNs) will be more widely used in the mobile environment, in applications such as Autonomous Underwater Vehicles (AUVs) for marine monitoring and mobile robots for environmental investigation. The sensor nodes’ mobility can easily cause changes to the structure of a network topology, and lead to the decline in the amount of transmitted data, excessive energy consumption, and lack of security. To solve these problems, a kind of efficient Topology Control algorithm for node Mobility (TCM) is proposed. In the topology construction stage, an efficient clustering algorithm is adopted, which supports sensor node movement. It can ensure the balance of clustering, and reduce the energy consumption. In the topology maintenance stage, the digital signature authentication based on Error Correction Code (ECC) and the communication mechanism of soft handover are adopted. After verifying the legal identity of the mobile nodes, secure communications can be established, and this can increase the amount of data transmitted. Compared to some existing schemes, the proposed scheme has significant advantages regarding network topology stability, amounts of data transferred, lifetime and safety performance of the network.


Introduction
Mobile wireless sensor networks (MWSNs) are a kind of wireless sensor network. Usually they are composed of any minority or majority of mobile sensor nodes in a monitoring area, and they can form an arbitrary network topology among the nodes. The main difference with a static wireless sensor network is the mobility support of the nodes. After one-time deployment of a static sensor network, the positions of nodes are fixed, and centralized control can be realized. However in the MWSN, usually there are some nodes joining and exiting the network, in addition, the mobility of nodes makes the deployment area dispersive, so only distributed control can be realized [1,2]. MWSNs not only have the characteristics of traditional WSNs, but also have their own advantages, which makes them have wide application prospects in military applications, environmental monitoring, medical care and other related fields [3]. On the other hand, the mobility of nodes also brings some problems. The topology of the network changes frequently and the communication links are not stable, which can interrupt the data transmission or decrease the amount of data transmitted. The identity authentication after movement and the large energy consumption 1. The physical properties for all the nodes like the configurations of energy and hardware are the same. 2. All the nodes are on the same plane and their original positions are random. 3. All the nodes can move in the monitoring area with a random speed and direction. 4. The sink nodes have more abundant resources than the ordinary sensor nodes, such as communication range and storage space.
The mobile sink moves in the network and communicates with the nodes in its communication range, and it will collect the data fused by cluster heads along the planned route. It takes on the topology establishment and maintenance tasks. The base station is fixed and it communicates with the cluster heads, in fact, it can transmit the information collected by the sensor nodes to the control center but the mobile sink cannot.

The Topology Establishment Phase
Currently most of the clustering algorithms such as the LEACH-M and ALM just improve the selection of cluster heads on the basis of LEACH. These algorithms do not consider certain factors like   15,[29958][29959][29960][29961][29962][29963][29964][29965][29966][29967][29968][29969] The mobile sink moves in the network and communicates with the nodes in its communication range, and it will collect the data fused by cluster heads along the planned route. It takes on the topology establishment and maintenance tasks. The base station is fixed and it communicates with the cluster heads, in fact, it can transmit the information collected by the sensor nodes to the control center but the mobile sink cannot.

The Topology Establishment Phase
Currently most of the clustering algorithms such as the LEACH-M and ALM just improve the selection of cluster heads on the basis of LEACH. These algorithms do not consider certain factors like energy, distance, position and mobility which can likely influence the clustering results. Meanwhile, the cluster head selection algorithm itself has the feature of randomness, so it cannot ensure the stability of the number of cluster heads and a balanced distribution. This may cause more energy consumption and isolated nodes. To solve these problems, we put forward an efficient clustering algorithm support for mobile nodes. On the basis of the algorithm described in [19], we consider the factors like energy, distance and mobility comprehensively to ensure the sum of the distances between the sensor nodes and cluster head is minimal and the energy left is maximal. In addition, the node with the minimal moving factor will be the cluster head. All these intend to solve the problem of unbalanced clustering and the mobility of the nodes. The fitness function is defined as follows: F " a 1˚f1`a2˚f2`p 1´a 1´a2 q˚f 3 (1) , . - , . - where, f 1 is the maximal average Euclidean distance between the sensor nodes and the cluster head. dpn i , C k q is the distance between the node n i and its cluster head. Num c k is the number of nodes in the cluster C k . f 2 is the ratio of the sum of all the nodes' and all the cluster heads' energy. f 3 is the movement factor, and it only represents the relative movement of the sensor nodes and cluster head, not the sum of vector of velocities. v C k is the velocity of the cluster head, and v n i is the moving velocity of ordinary sensor nodes. θ n i is the movement angle of sensor nodes and, θ C k is the movement angle of the cluster head. The mobility of the nodes is shown in Figure 2.
Sensors 2015, 15 5 energy, distance, position and mobility which can likely influence the clustering results. Meanwhile, the cluster head selection algorithm itself has the feature of randomness, so it cannot ensure the stability of the number of cluster heads and a balanced distribution. This may cause more energy consumption and isolated nodes. To solve these problems, we put forward an efficient clustering algorithm support for mobile nodes. On the basis of the algorithm described in [19], we consider the factors like energy, distance and mobility comprehensively to ensure the sum of the distances between the sensor nodes and cluster head is minimal and the energy left is maximal. In addition, the node with the minimal moving factor will be the cluster head. All these intend to solve the problem of unbalanced clustering and the mobility of the nodes. The fitness function is defined as follows: where, 1 f is the maximal average Euclidean distance between the sensor nodes and the cluster head. ( , ) i k d n C is the distance between the node i n and its cluster head. Numc k is the number of nodes in the cluster k C . 2 f is the ratio of the sum of all the nodes' and all the cluster heads' energy. 3 f is the movement factor, and it only represents the relative movement of the sensor nodes and cluster head, not the sum of vector of velocities.  The clustering algorithm runs as follows: (1) Initialize the position and velocity of particle ( 1,2, Each has K candidate cluster heads. (2) Assign node ni to the closest cluster head, calculate the fitness values of each particle ( 1,2, ) P P S =  using Equations (1)-(4).
(3) Select the global optimal extremum G(t) of the population and the individual optimal The clustering algorithm runs as follows: (1) Initialize the position and velocity of particle PpP " 1, 2,¨¨¨Sq Each has K candidate cluster heads.
(2) Assign node n i to the closest cluster head, calculate the fitness values of each particle PpP " 1, 2,¨¨¨Sq using Equations (1)-(4). (3) Select the global optimal extremum G(t) of the population and the individual optimal extremum P i (t) of each particle. (4) Update the position and velocity of particles. (5) Mapping the position of particle to the actual cluster head. (6) Repeat steps (1) to (5) until the maximum iteration is reached or the required coverage rate is satisfied.
The clustering process is shown in Figure 3. After clustering, the network is in the topology maintenance phase. Sensor nodes will transmit the data to cluster heads by a single-hop transmission mode.
Sensors 2015, 15 6 (5) Mapping the position of particle to the actual cluster head. (6) Repeat steps (1) to (5) until the maximum iteration is reached or the required coverage rate is satisfied.
The clustering process is shown in Figure 3. After clustering, the network is in the topology maintenance phase. Sensor nodes will transmit the data to cluster heads by a single-hop transmission mode.

The Topology Maintenance Phase
After clustering, the network will be in the topology maintenance phase. The sensor nodes will establish a safe communication link with a cluster head, and then send the collected data to the cluster head. The mobile sinks will collect the data fused by cluster heads along with the planed route. Because of the mobility of the nodes, the topology may change. The three main reasons are as follows: the first is the nodes' movement within the cluster, the second is the nodes' movement between the different clusters, and the last is that some nodes will occasionally join in or die. Malicious nodes can also forge legal nodes, and obtain sensitive network information. In order to avoid this happening, we must perform identity authentication for the nodes after their dynamic changes. Besides considering the security factor, the energy consumption and efficient transmission of data are also important factors which should be seriously considered.
Before the nodes' deployment, the server creates a couple of keys for each node, namely the public key P and private key S , and they satisfy the equation P S G = * , where G is the base point on the elliptic curve. Each sensor node stores a unique identity ID , a couple of keys ( S , P ), digital

The Topology Maintenance Phase
After clustering, the network will be in the topology maintenance phase. The sensor nodes will establish a safe communication link with a cluster head, and then send the collected data to the cluster head. The mobile sinks will collect the data fused by cluster heads along with the planed route. Because of the mobility of the nodes, the topology may change. The three main reasons are as follows: the first is the nodes' movement within the cluster, the second is the nodes' movement between the different clusters, and the last is that some nodes will occasionally join in or die. Malicious nodes can also forge legal nodes, and obtain sensitive network information. In order to avoid this happening, we must perform identity authentication for the nodes after their dynamic changes. Besides considering the security factor, the energy consumption and efficient transmission of data are also important factors which should be seriously considered.
Before the nodes' deployment, the server creates a couple of keys for each node, namely the public key P and private key S, and they satisfy the equation P " S˚G, where G is the base point on the elliptic curve. Each sensor node stores a unique identity ID N i , a couple of keys (S N i ,P N i ), digital signature pW N i , w N i q, binary symmetric function F, and the hash function H. The mobile sink restores the only identity ID MS of the whole network, a couple of keys (S MS ,P MS ), digital signature pW MS , w MS q and the hash function H. The expression of the digital signature pW i , w i q is shown as follows: where r i is a random number. G is the base point on the elliptic curve. H is the hash function, and S is the private key.
If node i sends a verification request for the digital signature pW i , w i q within time T, we can prove the legitimacy of node i only if we prove the following equation N i " W i is true. The process is shown as follows:

Movement of the Nodes within a Cluster
After entering the topology maintenance phase, for the purpose of saving communication energy consumption, the sensor nodes only upload the data in their own TDMA time plots. In other time plots, they do not communicate with any neighbor nodes, and at this time, they will be in sleep mode and wait to be awakened in the next round. In the public time plot of the member nodes, the nodes do not send messages to cluster heads directly, but wait for a data transmission request Data_ req from a cluster head. The nodes will transmit the data to a cluster head only after they receive Data_req. If the movement of some sensor nodes has happened within the cluster, it can be described by the schematic of Figure 4. S j moves from position D to C in cluster C j , and cluster head broadcasts the request Data_req in its time plot. Because it moves within the cluster, the nodes can receive the request and upload the collected data. The schematic description of nodes' mobility in a sensor network is shown in Figure 4. and the hash function H. The expression of the digital signature ( , ) i i W w is shown as follows:

Movement of the Nodes within a Cluster
After entering the topology maintenance phase, for the purpose of saving communication energy consumption, the sensor nodes only upload the data in their own TDMA time plots. In other time plots, they do not communicate with any neighbor nodes, and at this time, they will be in sleep mode and wait to be awakened in the next round. In the public time plot of the member nodes, the nodes do not send messages to cluster heads directly, but wait for a data transmission request _ Data req from a cluster head. The nodes will transmit the data to a cluster head only after they receive _ Data req . If the movement of some sensor nodes has happened within the cluster, it can be described by the schematic of Figure 4. j S moves from position D to C in cluster j C , and cluster head broadcasts the request _ Data req in its time plot. Because it moves within the cluster, the nodes can receive the request and upload the collected data. The schematic description of nodes' mobility in a sensor network is shown in Figure 4.

Nodes Moving between Clusters
When the nodes move between different clusters, the communication mechanism of soft handover was adopted to keep the continuity of data transmission. When the node moves to cross the boundary of the clusters, this mechanism can keep the node communicate with the new and the old cluster heads at the same time, and when it establishes a stable link with the new cluster, it will cut off the link with the old cluster head. As shown in Figure 4, the node S i moves from cluster C i to C j , and from position A to B. In the time slot T i of S i , C i broadcasts the request Data_req. Since S i has already moved to Cj, C i cannot receive the data uploaded by S i . In this case, C i signs S i as a pseudo-mobile node, and cluster head C i increases the communication range adaptively to keep the link with S i . On the other hand, S i also cannot receive Data_req in time slot T i , it signs itself as a pseudo-mobile node, and broadcasts the Join_req: S i Ñ*:Join_req ID Si P Si (W Si ,w Si ) to request joining the cluster Cj. The cluster Cj makes an identity authentication to S i by using the digital signature (W Si ,w Si ), and then it gives the response information ACK: C i ÑS i :ACK ID Ci P Ci (W Ci ,w Ci ). Then the cluster Cj updates the member list of cluster, assigns a new time plot to S i , and broadcasts this within the cluster. When the node S i receives the new TDMA frame, confirms itself as a mobile node, and sends a quit request Exit_req to the original cluster C i . After cluster head C i receives the quit request Exit_req, it will sign S i as a mobile node, and delete the time plot of S i and other relative key information.

New Nodes Join in or Node Death
When the node S i joins in a cluster, it will broadcast the join request information, the pre-stored identity ID Si , the public key P Si , and the digital signature (W Si ,w Si ): S i Ñ*:Join_req ID Si P Si (W Si ,w Si ). After the current cluster head C i verifies its legitimacy by (W Si ,w Si ), it will give the response answer C i ÑS i :ACK ID Ci P Ci (W Ci ,w Ci ). On the other hand, after the node S i verifies the legitimacy of the cluster head by (W Ci ,w Ci ), S i will join in cluster C i , and establish the session key with C i . C i assigns a time plot to S i , and broadcasts this within the cluster. The topology control protocol is a dynamic clustering algorithm, the energy factor of the nodes has been considered in the clustering process. When there are dead nodes in network, they are not allowed to participate in the clustering and they will be excluded by the network.

Simulation and Evaluation
We use MATLAB R2009a to carry out the simulation, and in this paper the simulation parameters are set as follows: 100 nodes are randomly deployed in a region of 100 mˆ100 m. The base station locates on the point (50, 50). The original energy of the nodes is 0.1 J. The speed of movement of the nodes is in the range of 0-10 m/s and the angle of movement is in the range of [0, 180˝]. The number of cluster heads is six (the base station is regarded as a fixed cluster head). The weight coefficients are a 1 = 0.3, a 2 = 0.3. The length of data transmitted for each round is 4000 bit. The energy model is adopted as in [20].
When transmitting K bit data, and the distance is d, the energy communication of a node can be calculated as follows: where the ε f s and ε mp are energy consumption coefficients of the power amplifier circuit, and The energy consumed by receiving K bit data is calculated as follows: where E elec = 50 nJ/bit, ε f s = 10 pJ/bit/m 2 and ε mp = 0.00013 pJ/bit/m 4 . The energy consumption of data fusion is E DA = 5 nJ/bit.

Network Stabilization
The original random node deployment is shown in Figure 5, the structure of the network after the movement of 10% of the nodes is shown in Figure 6, and the clustering topology of the network for a new round after the nodes' movement is shown in Figure 7.

Network Stabilization
The original random node deployment is shown in Figure 5, the structure of the network after the movement of 10% of the nodes is shown in Figure 6, and the clustering topology of the network for a new round after the nodes' movement is shown in Figure 7.

Network Stabilization
The original random node deployment is shown in Figure 5, the structure of the network after the movement of 10% of the nodes is shown in Figure 6, and the clustering topology of the network for a new round after the nodes' movement is shown in Figure 7.   Comparing Figures 6 and 7, we can find that the movement of the nodes has a great influence on the network's topology. Not only have the cluster heads been changed, but also the number of the nodes in each cluster has been changed. As shown in Table 1  Comparing Figures 6 and 7 we can find that the movement of the nodes has a great influence on the network's topology. Not only have the cluster heads been changed, but also the number of the nodes in each cluster has been changed. As shown in Table 1, when 10% of the nodes are moved, the No. of the nodes which move within the cluster are 1, 75, 12, 88 and 31, and the No. of the nodes which move between different clusters are 17, 98, 7, 67 and 73. Although the cluster heads and their number of nodes both have been changed after the movements, all the selected cluster heads avoid the border position of the monitoring area, and the numbers of nodes in each cluster are relatively similar. This can keep the topology of network stable in a mobile environment. Compared with the classical clustering algorithm LEACH, the proposed TCM algorithm can avoid the cluster heads from being selected in the edge of the monitoring region. This proves that the TCM method can realize a relative uniform clustering, and improve the network stability. The above A, B, C, D, E, F in Table 1 are the cluster numbers corresponding to A, B, C, D, E, F in Figures 6 and 7.

Amount of Data Transmitted
The relationship between transmission data and the percentage of mobile nodes is shown in Figure 8.
Sensors 2015, 15 11 nodes will not break the link with the previous cluster until the moving nodes establish a stable communication link with the new cluster. Although this manner inevitably increases the energy consumption when the percentage of moving nodes increases, it guarantees the transmission performance of the network. The ALM algorithm will adaptively expand the communication range of mobile nodes when the moving nodes move between the clusters, but it does not maintain the links with previous cluster heads in this process. Although it can more quickly recover the link between the moving nodes and the new cluster head than LEACH-M, its data transmission quantity is still worse than that of the proposed TCM method.

Network Energy Consumption and Security
The influence of nodes' speed on the death time of the network is shown in Figure 9.  In Figure 8, as the percentage of mobile nodes increases, the data transmission decreases. The method proposed in this paper has an improvement of 14.3%-58.8% compared to LEACH-M and 10%-23.5% compared to ALM, which indicates the proposed method has better data transmission performance. The reason is that we use a soft handover manner just like in mobile communication to keep communicating with the previous cluster when the nodes just move into the new cluster. The nodes will not break the link with the previous cluster until the moving nodes establish a stable communication link with the new cluster. Although this manner inevitably increases the energy consumption when the percentage of moving nodes increases, it guarantees the transmission performance of the network. The ALM algorithm will adaptively expand the communication range of mobile nodes when the moving nodes move between the clusters, but it does not maintain the links with previous cluster heads in this process. Although it can more quickly recover the link between the moving nodes and the new cluster head than LEACH-M, its data transmission quantity is still worse than that of the proposed TCM method.

Network Energy Consumption and Security
The influence of nodes' speed on the death time of the network is shown in Figure 9.

Network Energy Consumption and Security
The influence of nodes' speed on the death time of the network is shown in Figure 9. From Figure 9, it can be seen that as the speed of nodes increases in the range of 0-10 m/s, the round number of the first dead node's appearance will increase in the beginning, and then it will decrease in most of the interval. The round number of the 10% dead nodes appearing will decrease as the moving speed increases. The reason is that when the speed of movement of the nodes is too fast, From Figure 9, it can be seen that as the speed of nodes increases in the range of 0-10 m/s, the round number of the first dead node's appearance will increase in the beginning, and then it will decrease in most of the interval. The round number of the 10% dead nodes appearing will decrease as the moving speed increases. The reason is that when the speed of movement of the nodes is too fast, the topology changes violently, and the percentage of the nodes moving across the boundary of clusters will increase. In the topology maintenance stage, the nodes which move across the boundary of the clusters need to maintain links with the new and the previous cluster head simultaneously, so the energy consumption for maintaining the safety of the link will be larger. If we define the round of the first dead node's appearance as the lifetime of the network, the best speed of movement of the nodes is 2 m/s, and at this speed the first dead node appears in round 201. A comparison of the survival nodes' numbers for the three schemes is shown in Figure 10.
Sensors 2015, 15 12 the topology changes violently, and the percentage of the nodes moving across the boundary of clusters will increase. In the topology maintenance stage, the nodes which move across the boundary of the clusters need to maintain links with the new and the previous cluster head simultaneously, so the energy consumption for maintaining the safety of the link will be larger. If we define the round of the first dead node's appearance as the lifetime of the network, the best speed of movement of the nodes is 2 m/s, and at this speed the first dead node appears in round 201. A comparison of the survival nodes' numbers for the three schemes is shown in Figure 10.  Figure 10 shows the first dead node in the three methods occurs in the 197th, 229th and 255th round, respectively. The proposed method can extend the lifetime of network as much as 58 rounds more than the LEACH method and 26 rounds more than the LEACH-M method. In addition, as Figure  10 shows, the black line falls faster than the red line and the blue line, that is to say the proposed TCM  Figure 10 shows the first dead node in the three methods occurs in the 197th, 229th and 255th round, respectively. The proposed method can extend the lifetime of network as much as 58 rounds more than the LEACH method and 26 rounds more than the LEACH-M method. In addition, as Figure 10 shows, the black line falls faster than the red line and the blue line, that is to say the proposed TCM can make the energy more uniform during clustering. In the proposed method, we consider the residual energy of cluster heads, the distance from the sensor nodes to cluster heads and mobility of the nodes comprehensively in the clustering stage, and this can ensure the selected cluster heads satisfy that the condition that sum of distances between the sensor nodes and cluster heads is minimal and the energy left is maximal.
In the topology maintenance phase, the TDMA time plot assignment and communication mechanism of soft handover are adopted. TDMA time slot assignment makes the nodes only work in their own time plots, and this wake mechanism can effectively decrease the energy consumption and extend the network lifetime. When entering a new cluster, the moving nodes will be authenticated by the digital signature based on ECC. By this step, the attacks from malicious nodes could be effectively detected. Without this mutual identity authentication, malicious nodes could pretend to be legitimate ones and communicate with the nodes to get critical information about the network, which could seriously affect the network security. After confirming the legitimacy, the moving nodes can send requests to join the clusters, and the nodes will maintain communication links with the previous cluster head and the new cluster head simultaneously until they establishes a stable link with the new cluster. This mechanism can ensure the moving nodes crossing the boundary quickly recover communication, and ensure the continuity of information transmission.

Conclusions
The classical clustering methods like the LEACH algorithm, LEACH-M algorithm and ALM algorithm have some disadvantages for MWSNs, such as large energy consumption, low topology stability and low data transmission efficiency. The proposed method can solve these problems. In the topology establishment phase, the previous research only considers one or two factors, and in our proposal we optimize some factors comprehensively with multi-objective optimization to ensure the energy left is maximal and the movement is minimal. In addition, the cluster heads are selected to ensure the sum of the distances from member nodes to the cluster head is minimal, which can improve the balance and stability of the network, and also avoid energy holes in the network and extend its lifetime. In the topology maintenance phase, the TDMA time slot assignment wake mechanism and the soft handover communication mechanism are introduced to decrease the energy consumption, ensure the legality of mobile nodes' identity and decrease the attacks from malicious nodes.