Adjustable Trajectory Design Based on Node Density for Mobile Sink in WSNs

The design of movement trajectories for mobile sink plays an important role in data gathering for Wireless Sensor Networks (WSNs), as it affects the network coverage, and packet delivery ratio, as well as the network lifetime. In some scenarios, the whole network can be divided into subareas where the nodes are randomly deployed. The node densities of these subareas are quite different, which may result in a decreased packet delivery ratio and network lifetime if the movement trajectory of the mobile sink cannot adapt to these differences. To address these problems, we propose an adjustable trajectory design method based on node density for mobile sink in WSNs. The movement trajectory of the mobile sink in each subarea follows the Hilbert space-filling curve. Firstly, the trajectory is constructed based on network size. Secondly, the adjustable trajectory is established based on node density in specific subareas. Finally, the trajectories in each subarea are combined to acquire the whole network’s movement trajectory for the mobile sink. In addition, an adaptable power control scheme is designed to adjust nodes’ transmitting range dynamically according to the movement trajectory of the mobile sink in each subarea. The simulation results demonstrate that the proposed trajectories can adapt to network changes flexibly, thus outperform both in packet delivery ratio and in energy consumption the trajectories designed only based on the network size and the whole network node density.


1.
We design an adjustable trajectory (that follows the Hilbert curve) based on the node density in each subarea for mobile sink; 2.
We propose an adaptable power control scheme to adjust nodes' transmitting range in each subarea according to the order of Hilbert curve in it in order to reduce the energy consumption.

System Model
In many real applications, sensor nodes are deployed unevenly or non-uniformly due to an unfavorable geographical location. In order to make the movement trajectory of the mobile sink adapt to networks with uneven node deployment or different node densities, the network needs to be partitioned into many subareas, so we can design an adjustable movement trajectory based on the node density in each specific subarea. Therefore, the network needs to be partitioned first according to the network size to ensure the full coverage of the network.

Network Model
In this paper, we introduce the following assumptions: sensor nodes with limited initial energy E are deployed in a square of size L, the communication range of sensor nodes is adjustable with a maximum value r max . The network is divided into some subareas according to network size, and each subarea is a square of size l, the total number of subareas is N. A mobile sink used to gather the sensing data periodically starts from the bottom left of the network and travels at a constant speed v following a predefined movement trajectory. For the mobile sink, when gathering data in a subarea, each sensor node only sends one packet with a fixed size to it directly.

Hilbert Space-Filling Curve
In this paper, to address the problem of full coverage of network, the trajectory is designed based on a space-filling curve. By using a space-filling curve, the mobile sink can traverse every defined point in the network once and only once, thus all the sensing data can be gathered in a timely and efficient way.
The Hilbert space-filling curve [9] is a space-filling curve proposed by David Hilbert in 1891. Hilbert curves can map a one-dimensional line l onto a two-dimensional square S. For instance, if we map a line l onto square S, firstly line l is split into four identical sub-intervals and the square S into four identical sub-squares, where each sub-interval can be continuously mapped onto one sub-square. If this continues, l and S are partitioned into 4 k identical duplications for k = 1, 2, 3, where k defines the order of the Hilbert curve. Finally the curves traverses over 4 k sub-squares in two dimensions. The correspondence between the line intervals and the sub-squares is shown in Figure 1, in which the first, second and third order of Hilbert curve are depicted.
Sensors 2016, 16,2091 4 of 24 move randomly or uncontrollably, the sensing data has to be sent to it by tracking its real time location, and the tracking of the mobile sinks brings extra overhead in computation and storage. In our work, the movement trajectories are predefined, and the only additional overhead is introduced by the power control messages, which can be ignored compared with the location updating message overhead.

System Model
In many real applications, sensor nodes are deployed unevenly or non-uniformly due to an unfavorable geographical location. In order to make the movement trajectory of the mobile sink adapt to networks with uneven node deployment or different node densities, the network needs to be partitioned into many subareas, so we can design an adjustable movement trajectory based on the node density in each specific subarea. Therefore, the network needs to be partitioned first according to the network size to ensure the full coverage of the network.

Network Model
In this paper, we introduce the following assumptions: sensor nodes with limited initial energy E are deployed in a square of size L, the communication range of sensor nodes is adjustable with a maximum value rmax. The network is divided into some subareas according to network size, and each subarea is a square of size l, the total number of subareas is N. A mobile sink used to gather the sensing data periodically starts from the bottom left of the network and travels at a constant speed v following a predefined movement trajectory. For the mobile sink, when gathering data in a subarea, each sensor node only sends one packet with a fixed size to it directly.

Hilbert Space-Filling Curve
In this paper, to address the problem of full coverage of network, the trajectory is designed based on a space-filling curve. By using a space-filling curve, the mobile sink can traverse every defined point in the network once and only once, thus all the sensing data can be gathered in a timely and efficient way.
The Hilbert space-filling curve [9] is a space-filling curve proposed by David Hilbert in 1891. Hilbert curves can map a one-dimensional line l onto a two-dimensional square S. For instance, if we map a line l onto square S, firstly line l is split into four identical sub-intervals and the square S into four identical sub-squares, where each sub-interval can be continuously mapped onto one subsquare. If this continues, l and S are partitioned into 4 k identical duplications for k = 1, 2, 3, where k defines the order of the Hilbert curve. Finally the curves traverses over 4 k sub-squares in two dimensions. The correspondence between the line intervals and the sub-squares is shown in Figure 1, in which the first, second and third order of Hilbert curve are depicted.  The points on the curve show the correspondence between sub-squares and sub-intervals, so adjacent sub-intervals always correspond to adjacent sub-squares. The transformation of a curve of order k − 1 into a curve of order k can be viewed as a replacement of each sub-square of the order k − 1 with a 1-order curve.
Besides Hilbert curves, there are many other space-filling curves such as the Z curve, Grey-coded curve, etc. [20]. In [21], the authors compared the above space-filling curves and found that the Hilbert curve outperforms the others in the locality preservation property that can increase the data gathering efficiency, which is the main reason Hilbert curve is adopted as the mobile sink movement trajectory in this paper.

Hilbert Curves with Heterogeneous Orders
After partitioning according to network size, the network can be divided into many subareas. Here, the number of subareas is defined by the order in which the mobile sink traverses them. Recalling that the total number of subareas is N, the subarea that the mobile sink traverses first is called C 1 while the subarea the mobile sink traverses last is called C N . In this work, the mobile sink moves into an area from the bottom left and exits from the bottom right. Figure 2a shows Hilbert curves with heterogeneous orders, where the Hilbert curve with 1-order in C 1 , C 3 and C 4 while the Hilbert curve with 2-order in C 2 , for the subarea C 2 has relatively high node density, C 2 so adopts the 2-order Hilbert curve while others adopt 1-order Hilbert curve. Similarly, Figure 2b,c show Hilbert curves with heterogeneous orders in different subareas according to the node density in them.
It should be noted that, when the orders of Hilbert curves in two adjacent subareas are different from each other, there exists a "gap" at the border of the two adjacent subareas (the red line in Figure 2), and so the movement trajectory becomes discontinuous. To get a continuous movement trajectory, the "gap" on the border needs to be connected by using the red lines as shown in Figure 2. The points on the curve show the correspondence between sub-squares and sub-intervals, so adjacent sub-intervals always correspond to adjacent sub-squares. The transformation of a curve of order k − 1 into a curve of order k can be viewed as a replacement of each sub-square of the order k − 1 with a 1-order curve.
Besides Hilbert curves, there are many other space-filling curves such as the Z curve, Grey-coded curve, etc. [20]. In [21], the authors compared the above space-filling curves and found that the Hilbert curve outperforms the others in the locality preservation property that can increase the data gathering efficiency, which is the main reason Hilbert curve is adopted as the mobile sink movement trajectory in this paper.

Hilbert Curves with Heterogeneous Orders
After partitioning according to network size, the network can be divided into many subareas. Here, the number of subareas is defined by the order in which the mobile sink traverses them. Recalling that the total number of subareas is N, the subarea that the mobile sink traverses first is called C1 while the subarea the mobile sink traverses last is called CN. In this work, the mobile sink moves into an area from the bottom left and exits from the bottom right. Figure 2a shows Hilbert curves with heterogeneous orders, where the Hilbert curve with 1-order in C1, C3 and C4 while the Hilbert curve with 2-order in C2, for the subarea C2 has relatively high node density, C2 so adopts the 2-order Hilbert curve while others adopt 1-order Hilbert curve. Similarly, Figure 2b and Figure 2c show Hilbert curves with heterogeneous orders in different subareas according to the node density in them.
It should be noted that, when the orders of Hilbert curves in two adjacent subareas are different from each other, there exists a "gap" at the border of the two adjacent subareas (the red line in Figure 2), and so the movement trajectory becomes discontinuous. To get a continuous movement trajectory, the "gap" on the border needs to be connected by using the red lines as shown in Figure 2.

Energy Model
Considering the communication range is relatively short, this paper adopted the free-space channel model [22]. Let fs  be the energy require by the amplifier in free-space channel, tx  and rx  be the energy consumed during transmitting and receiving per bit respectively.
The energy consumed during the node i transmits  bit data to node j is described as follows: where ( , ) i j D is the distance between node i and node j.
Three different kinds of Hilbert curves with heterogeneous orders: (a) 1-order curve in C 1 , C 3 , C 4 and 2-order curve in C 2 ; (b) 1-order in C 1 , C 2 , C 4 and 3-order curve in C 3 ; (c) 2-order curve in C 1 , C 2 , C 3 and 3-order in C 4 .

Energy Model
Considering the communication range is relatively short, this paper adopted the free-space channel model [22]. Let ε f s be the energy require by the amplifier in free-space channel, α tx and α rx be the energy consumed during transmitting and receiving per bit respectively.
The energy consumed during the node i transmits β bit data to node j is described as follows: where D (i,j) is the distance between node i and node j. The energy consumed by node j that receives β bit data is described as follows: The total energy consumed by node i and node j during the above two processes can be defined as follows:

Adjustable Trajectory Design Based on Node Density
The design of the adjustable trajectory for mobile sink consists of three main steps. In the first step, to ensure the full coverage of the network, we should get the proper order of the Hilbert curve (that is k) according to the network size. Then, to prepare for the second step, the whole network is divided into 4 k subareas. Once the subareas are determined, they will remain unchanged. In the second step, to adapt to networks with different node densities, especially the highly dense networks with non-uniform or uneven node deployment, we design the trajectory in each subarea by analyzing the node density in it. To distinguish from the order k of the Hilbert curve according to network size, the order of the Hilbert curve used in subarea C i based on node density is denoted by d i . Finally in the third step, the adjustable trajectory based on node density for the mobile sink can be acquired by combining the trajectories in all subareas and the trajectories on all borders. In addition, in order to relieve the network congestion and prolong the network lifetime, we propose an adaptable power control scheme according to the characteristics of the adjustable trajectory, which can adjust the transmission power of sensor nodes in specific subareas.

The Order of the Hilbert Curve According to the Network Size
In the first step of our method, to guarantee the full coverage of the network, the proper order of the Hilbert curve should be selected according to the network size. The proper order here means the minimum order Hilbert curve that can fill the full network.
Recall that the network is a square area of size L, and suppose that the network can be divided into N subareas and the subareas are smaller sub-squares of size l, as shown in Figure 3. The following Equations (4)-(8) calculating order k of the Hilbert curve are cited from [11]. The energy consumed by node j that receives  bit data is described as follows: The total energy consumed by node i and node j during the above two processes can be defined as follows:

Adjustable Trajectory Design Based on Node Density
The design of the adjustable trajectory for mobile sink consists of three main steps. In the first step, to ensure the full coverage of the network, we should get the proper order of the Hilbert curve (that is k) according to the network size. Then, to prepare for the second step, the whole network is divided into 4 k subareas. Once the subareas are determined, they will remain unchanged. In the second step, to adapt to networks with different node densities, especially the highly dense networks with non-uniform or uneven node deployment, we design the trajectory in each subarea by analyzing the node density in it. To distinguish from the order k of the Hilbert curve according to network size, the order of the Hilbert curve used in subarea Ci based on node density is denoted by di. Finally in the third step, the adjustable trajectory based on node density for the mobile sink can be acquired by combining the trajectories in all subareas and the trajectories on all borders. In addition, in order to relieve the network congestion and prolong the network lifetime, we propose an adaptable power control scheme according to the characteristics of the adjustable trajectory, which can adjust the transmission power of sensor nodes in specific subareas.

The Order of the Hilbert Curve According to the Network Size
In the first step of our method, to guarantee the full coverage of the network, the proper order of the Hilbert curve should be selected according to the network size. The proper order here means the minimum order Hilbert curve that can fill the full network.
Recall that the network is a square area of size L, and suppose that the network can be divided into N subareas and the subareas are smaller sub-squares of size l, as shown in Figure 3. The following Equations (4)-(8) calculating order k of the Hilbert curve are cited from [11]. The l can be defined by L and N as follows: The l can be defined by L and N as follows: To ensure the sensor node in each subarea can communicate with the mobile sink directly, the inequality between the size of a subarea l and the maximum communication range of sensor node r max holds: Supposed that the proper order of the Hilbert curve is k, the network can be divided into N = 4 k subareas, and then the size of a subarea l can be defined as: By combing Equations (5) and (6), we have: After some manipulation, k can be obtained as follows: Through the above calculation, the minimum order k of the Hilbert curve which can fill the whole network can be obtained. Through Equation (8), it can be known that the value of k depends on the network size L and the sensor nodes' maximum communication range r max . When k = 2, the trajectory of the mobile sink is as shown in Figure 3.
It is clear that, if the movement trajectory for the mobile sink is designed only according to the network size when using Hilbert space-filling curves, and since the mobile sink travels at a constant speed, the time it stays in each subarea must be a fixed value. In a highly dense network, the mobile sink can hardly collect sensing data completely within a limited traversing time due to the communication congestion, and thereby this results in a decrease of the packet delivery ratio and the network lifetime.

The Order of the Hilbert Curve Based on Node Density in Each Subarea
In Section 4.1, the minimum order k of the Hilbert curve which can fill the whole network is obtained according to the network size. However, in a highly dense network with uneven node deployment, this kind of trajectory according to the network size may hardly complete data gathering within a limited traversing time, and this will result in a significant decrease in packet delivery ratio.
In the second step of our method, to further improve the trajectory design according to network size, the difference of node density in each subarea is taken into consideration to make the trajectory adaptable to networks with uneven node deployment in high node density situations. For this we can design an adaptable trajectory based on node densities in specific subareas.
After getting the proper order k of the Hilbert curve according to the network size, the whole network can be divided into N = 4 k subareas. In an adjustable trajectory design based on node density, the node density in each subarea is adopted to calculate a proper Hilbert curve order in this subarea. And hence, the movement trajectories for the mobile sink of the whole network are acquired by combining all the trajectories in these subareas.
After acquiring the curve order k of the Hilbert curve according to the network size, it can be seen that in each subarea (except in the first and last subarea), the length of the curve in this subarea is the same as its side length. Therefore, the traversing time of the mobile sink in subarea C i can be calculated as follows: where l i stands for the side length of subarea C i and v stands for the travel speed of the mobile sink. Since each sensor node only sends one data packet to the mobile sink during the process of data gathering, thus in subarea C i , we define n i_max as the maximum number of sensor nodes that the mobile sink can communicate with during its traversing time, then n i_max can be calculated from Equation (10), where t avg represents the average time for transmitting the sensing data: Subarea C i has its own Hilbert curve order based on its node density, and the curve order in all subareas are initialized with k, so a curve order that is not less than k will guarantee the full coverage of the network. Here n i_max is used as the threshold to decide whether the mobile sink can complete data gathering in its traversing time in C i or not.
In a network with unevenly deployed nodes, if the number of nodes n i in C i obeys n i < n i_max , the order d i of the Hilbert curve equals the initialized order k of the Hilbert curve according to the network size, which means that the mobile sink can complete data gathering during its traversing time in this subarea. Otherwise, if the number of nodes n i in C i obeys n i ≥ n i_max , we would try to use k + 1 as the curve order in C i first, and consequently C i is further divided into four smaller sub-squares, and the new traversing time t i_new of the mobile sink in subarea C i is extended to: Since the average transmission time for a data packet t avg is a fixed value and the new traversing time t i_new the mobile sink takes becomes twice t i , hence the maximum number of sensor nodes the mobile sink can gather is also doubled.
Based on the analysis above, the proper traversing time of the mobile sink in subarea C i can be acquired by using Equation (11). Therefore, the order d i of the Hilbert curve based on node density in C i can be calculated from the proper traversing time of the mobile sink in C i as follows: Finally, the trajectories in all subareas are combined to form the final movement trajectory for the mobile sink. The adjustable trajectory based on node density in this network is shown in Figure 4. In this case, suppose that the network is divided into four subareas (C 1 to C 4 ) according to its network size. The node density in C 1 is the lowest one where the mobile sink moves following a 1-order Hilbert curve; the node density in C 2 and C 3 is higher than that in C 1 where the mobile sink moves following a 2-order Hilbert curve; and the node density in C 4 is the highest one, where the mobile sink moves following a 3-order Hilbert curve. where li stands for the side length of subarea Ci and v stands for the travel speed of the mobile sink.
Since each sensor node only sends one data packet to the mobile sink during the process of data gathering, thus in subarea Ci, we define ni_max as the maximum number of sensor nodes that the mobile sink can communicate with during its traversing time, then ni_max can be calculated from Equation (10), where tavg represents the average time for transmitting the sensing data: Subarea Ci has its own Hilbert curve order based on its node density, and the curve order in all subareas are initialized with k, so a curve order that is not less than k will guarantee the full coverage of the network. Here ni_max is used as the threshold to decide whether the mobile sink can complete data gathering in its traversing time in Ci or not.
In a network with unevenly deployed nodes, if the number of nodes ni in Ci obeys ni < ni_max, the order di of the Hilbert curve equals the initialized order k of the Hilbert curve according to the network size, which means that the mobile sink can complete data gathering during its traversing time in this subarea. Otherwise, if the number of nodes ni in Ci obeys ni ≥ ni_max, we would try to use k + 1 as the curve order in Ci first, and consequently Ci is further divided into four smaller sub-squares, and the new traversing time ti_new of the mobile sink in subarea Ci is extended to: Since the average transmission time for a data packet tavg is a fixed value and the new traversing time ti_new the mobile sink takes becomes twice ti, hence the maximum number of sensor nodes the mobile sink can gather is also doubled.
Based on the analysis above, the proper traversing time of the mobile sink in subarea Ci can be acquired by using Equation (11). Therefore, the order di of the Hilbert curve based on node density in Ci can be calculated from the proper traversing time of the mobile sink in Ci as follows: Finally, the trajectories in all subareas are combined to form the final movement trajectory for the mobile sink. The adjustable trajectory based on node density in this network is shown in Figure 4. In this case, suppose that the network is divided into four subareas (C1 to C4) according to its network size. The node density in C1 is the lowest one where the mobile sink moves following a 1-order Hilbert curve; the node density in C2 and C3 is higher than that in C1 where the mobile sink moves following a 2-order Hilbert curve; and the node density in C4 is the highest one, where the mobile sink moves following a 3-order Hilbert curve.   Calculate the node density n i ; //n i is the number of nodes in C i 8.
Calculate the traversing time t i of the mobile sink according to Equation (9); 9.
Calculate the order d i of the Hilbert curve according to Equation (12);

End for
It should be noted that using a Hilbert curve with heterogeneous orders would result in a discontinuous trajectory. If the two adjacent subareas adopt different curve orders, there exists a "gap" on the border of the two adjacent subareas, and so the movement trajectory become discontinuous since the exit location of previous subarea is not the entrance location of next subarea. To keep the trajectory continuous, we should design the movement trajectory for the mobile sink on the border of two adjacent subareas.

Trajectory Design on Borders
The trajectory design on borders will be discussed in the third step of our method in this section. It can be known from Section 4.2, that for an adjustable trajectory design based on node density in specific subareas, the order of the Hilbert curve in each subarea may be different. Consequently, as shown in Figure 5, there will be a "gap" (the red line in Figure 5) on the trajectory in the border of two adjacent subareas with different curve orders. The border here means the common edge of two adjacent subareas.

7.
Calculate the node density ni; //ni is the number of nodes in Ci 8. Calculate the traversing time ti of the mobile sink according to Equation (9); 9.
Calculate the order di of the Hilbert curve according to Equation (12);

End for
It should be noted that using a Hilbert curve with heterogeneous orders would result in a discontinuous trajectory. If the two adjacent subareas adopt different curve orders, there exists a "gap" on the border of the two adjacent subareas, and so the movement trajectory become discontinuous since the exit location of previous subarea is not the entrance location of next subarea. To keep the trajectory continuous, we should design the movement trajectory for the mobile sink on the border of two adjacent subareas.

Trajectory Design on Borders
The trajectory design on borders will be discussed in the third step of our method in this section. It can be known from Section 4.2, that for an adjustable trajectory design based on node density in specific subareas, the order of the Hilbert curve in each subarea may be different. Consequently, as shown in Figure 5, there will be a "gap" (the red line in Figure 5) on the trajectory in the border of two adjacent subareas with different curve orders. The border here means the common edge of two adjacent subareas. To combine these curves and make the whole trajectory a continuous curve, we then discuss how to design the trajectory on the border of two adjacent subareas in the following paragraphs. When the order k of the Hilbert curve is acquired according to the network size in the first step of our method, the number of subareas N is also determined. Thus the number of trajectories on borders that need to be designed is N − 1. To combine these curves and make the whole trajectory a continuous curve, we then discuss how to design the trajectory on the border of two adjacent subareas in the following paragraphs. When the order k of the Hilbert curve is acquired according to the network size in the first step of our method, the number of subareas N is also determined. Thus the number of trajectories on borders that need to be designed is N − 1.
To deal with the trajectory design on borders, the key is to get the length of the trajectory on the border and the traversing direction of the mobile sink on the border trajectory, respectively.

The Length of the Trajectory on the Border
To get the length of the trajectory on a border, we should firstly determine the order d i of the Hilbert curve in subarea C i and the order d i+1 of the Hilbert curve in subarea C i+1 , and fill the specific subarea using the Hilbert curve, then the exit location of previous subarea C i and the entrance location of next subarea C i+1 can be obtained. Once obtained the specific exit and entrance locations on the border of the two adjacent subareas, the length of the trajectory on border can be calculated as follows: where d i , d i+1 stand for curve orders based on the node density in C i , C i+1 , respectively.

The Traversing Direction of a Mobile Sink on the Border Trajectory
The current traversing direction of the mobile sink is set as a reference direction. The traversing direction we need to design for mobile sink on border trajectory is the direction relative to the reference direction. Considering that when the mobile sink leaves one subarea, its traversing direction is perpendicular to the border, the traversing direction of the mobile sink on the border trajectory could only be one of two directions: left or right.
The traversing direction of the mobile sink on the border trajectory must fulfill the following rules: in the case of a curve order increase, which means that d i+1 > d i , if the current traversing direction of the mobile sink is vertical to the border, the traversing direction for the mobile sink on the border is left, and if the current traversing direction of the mobile sink is horizontal to the border, the traversing direction for the mobile sink on the border is right; in the case of curve order reduction, which means that d i+1 < d i , the traversing direction we need to design is the opposite of the direction designed in the case of curve order increase. Figure 6 shows a network divided into four subareas according to its network size, where C 1 and C 4 adopt 1-order Hilbert curves, C 2 adopts a 2-order Hilbert curve and C 3 adopts a 3-order Hilbert curve according to their node density.
Recalling that if two adjacent subareas have different curve orders, there will be a "gap" on the border of them, in this case, since C 1 adopts a 1-order Hilbert curve while C 2 adopts a 2-order Hilbert curve, the exit location of the trajectory in C 1 does not meet the entrance location of the trajectory in C 2 , thus the trajectory becomes discontinuous, and accordingly the border trajectory (red line between C 1 and C 2 in Figure 6) is employed to connect the discontinuous trajectory. Similarly, the "gaps" between C 2 and C 3 , C 3 and C 4 are also filled with a border trajectory. To deal with the trajectory design on borders, the key is to get the length of the trajectory on the border and the traversing direction of the mobile sink on the border trajectory, respectively.

The Length of the Trajectory on the Border
To get the length of the trajectory on a border, we should firstly determine the order di of the Hilbert curve in subarea Ci and the order di+1 of the Hilbert curve in subarea Ci+1, and fill the specific subarea using the Hilbert curve, then the exit location of previous subarea Ci and the entrance location of next subarea Ci+1 can be obtained. Once obtained the specific exit and entrance locations on the border of the two adjacent subareas, the length of the trajectory on border can be calculated as follows: where di, di+1 stand for curve orders based on the node density in Ci, Ci+1, respectively.

The Traversing Direction of a Mobile Sink on the Border Trajectory
The current traversing direction of the mobile sink is set as a reference direction. The traversing direction we need to design for mobile sink on border trajectory is the direction relative to the reference direction. Considering that when the mobile sink leaves one subarea, its traversing direction is perpendicular to the border, the traversing direction of the mobile sink on the border trajectory could only be one of two directions: left or right.
The traversing direction of the mobile sink on the border trajectory must fulfill the following rules: in the case of a curve order increase, which means that di+1 > di, if the current traversing direction of the mobile sink is vertical to the border, the traversing direction for the mobile sink on the border is left, and if the current traversing direction of the mobile sink is horizontal to the border, the traversing direction for the mobile sink on the border is right; in the case of curve order reduction, which means that di+1 < di, the traversing direction we need to design is the opposite of the direction designed in the case of curve order increase. Figure 6 shows a network divided into four subareas according to its network size, where C1 and C4 adopt 1-order Hilbert curves, C2 adopts a 2-order Hilbert curve and C3 adopts a 3-order Hilbert curve according to their node density.
Recalling that if two adjacent subareas have different curve orders, there will be a "gap" on the border of them, in this case, since C1 adopts a 1-order Hilbert curve while C2 adopts a 2-order Hilbert curve, the exit location of the trajectory in C1 does not meet the entrance location of the trajectory in C2, thus the trajectory becomes discontinuous, and accordingly the border trajectory (red line between C1 and C2 in Figure 6) is employed to connect the discontinuous trajectory. Similarly, the "gaps" between C2 and C3, C3 and C4 are also filled with a border trajectory. It is worth noticing that the traversing direction of the mobile sink on the border trajectory is associated with the following two factors: current traversing direction of the mobile sink and whether the curve order is increased or reduced between the two adjacent subareas. It is worth noticing that the traversing direction of the mobile sink on the border trajectory is associated with the following two factors: current traversing direction of the mobile sink and whether the curve order is increased or reduced between the two adjacent subareas.
The detailed design of the border trajectory is shown in Algorithm 2.
Algorithm 2. The Detailed Design of the Trajectory on a Border 1. Input d i , d i+1 , cur_dir; //cur_dir is the current traveling direction of mobile sink 2. Calculate the length of the trajectory on border l border_trajectory according to Equation (12) if (cur_dir = left or cur_dir = right) 6.
//current traversing direction of mobile sink is horizontal 7.
Mobile sink traverses along the direction of direction_on_border with the length l border_trajectory ; 12.
//current traversing direction of mobile sink is vertical Mobile sink traverses along the direction of direction_on_border with the length l border_trajectory ; 20.
end if

end if
In Algorithm 2, to determine whether to employ the border trajectory, the two curve order d i , d i+1 in C i , C i+1 are compared firstly. When d i = d i+1 , the trajectory in C i and C i+1 can connect to each other directly and there is no necessity to employ the border trajectory. Otherwise the border trajectory is employed according to the method presented above. Finally the mobile sink can move following the border trajectory on the border when there is a "gap" between two adjacent subareas, thus the entire traversing trajectory becomes a continuous curve.

Adaptable Power Control
We recall that in Section 4.1, in a given network size L, the value of k is determined, the curve order k and the number of subarea N holds N = 4 k , and so the number of subareas is also a determined value. In this case, when the mobile sink moves into a subarea, nodes in the subarea can communicate with it using a constant transmission range. In Section 4.2, the curve order d is selected based on the node density in each subarea, so in some highly dense subareas, a relatively high order of the Hilbert curves will be selected.
Since the mobile sink will traverse all the subareas to collect the sensing data in them, therefore, in some subareas that nodes are densely deployed, the mobile sink moves following the high order of the Hilbert curves. It takes more time to traverse these subareas, which can decrease the distance between a sensor node and the mobile sink, and accordingly, we can use power control to adjust the transmission range the sensor node uses to communicate with the mobile sink in such a subarea, which can effectively reduce the energy consumption, so it can be deduced that in the subareas where nodes are densely deployed, the higher the curve order d, the shorter the transmission range a node needs to communicate with the mobile sink, and accordingly, the energy consumed can also be reduced.
After the first step of our method, assuming that node a in subarea C 1 will transmit data to the mobile sink, the distance between node a and the mobile sink is l 1 . Here we note that C 1 is a subarea where nodes are densely deployed, so a curve order d 1 that is larger than k is selected based on the node density in C 1 to design the movement trajectory of the mobile sink, and in this case, the distance between node a and the mobile sink becomes l 2 , and l 2 holds l 1 > l 2 .
In free-space channel, the energy saved for node a transmitting β bits data to the mobile sink can be defined as: Therefore, it can be seen that the energy consumption of the sensor is reduced by using power control to adjust its transmission range.
For example, in Figure 7, the mobile sink follows a 2-order Hilbert curve in subarea C 2 where nodes are densely deployed, and we can use power control to adjust the transmitting range the sensor node used to communicate with the mobile sink, so the transmission range of the sensor node in C 2 can be reduced from 4 according to Equation (5). Thus sensor nodes in C 2 can adjust their transmission range in order to reduce the energy consumption when transmitting their sensing data to the mobile sink. node needs to communicate with the mobile sink, and accordingly, the energy consumed can also be reduced. After the first step of our method, assuming that node a in subarea C1 will transmit data to the mobile sink, the distance between node a and the mobile sink is l1. Here we note that C1 is a subarea where nodes are densely deployed, so a curve order d1 that is larger than k is selected based on the node density in C1 to design the movement trajectory of the mobile sink, and in this case, the distance between node a and the mobile sink becomes l2, and l2 holds l1 > l2.
In free-space channel, the energy saved for node a transmitting  bits data to the mobile sink can be defined as: Therefore, it can be seen that the energy consumption of the sensor is reduced by using power control to adjust its transmission range.
For example, in Figure 7, the mobile sink follows a 2-order Hilbert curve in subarea C2 where nodes are densely deployed, and we can use power control to adjust the transmitting range the sensor node used to communicate with the mobile sink, so the transmission range of the sensor node in C2 can be reduced from 2 2 L to 2 4 L according to Equation (5). Thus sensor nodes in C2 can adjust their transmission range in order to reduce the energy consumption when transmitting their sensing data to the mobile sink. To enable sensor nodes in such subareas to adjust their transmission range to communicate with the mobile sink in a timely fashion, the mobile sink periodically broadcasts a power control message to sensor nodes as it moves into a subarea. The format of the power control message is as shown in Table 1, which includes the message type, target subarea ID and the new transmission range.

Message Type Target Subarea ID New TX Range
The "Message type" field indicates the type of the message, which is mainly used to differentiate the power control messages from the other messages used in network. "Target subarea ID" field is used to indicate which subarea this message is supposed to be sent to. The "New TX range" field is used to set the new transmission range for the sensor nodes in the target subarea.
The new transmission range of the sensor node rTX_i is determined by the network size L and the curve order di, and can be defined as follows: To enable sensor nodes in such subareas to adjust their transmission range to communicate with the mobile sink in a timely fashion, the mobile sink periodically broadcasts a power control message to sensor nodes as it moves into a subarea. The format of the power control message is as shown in Table 1, which includes the message type, target subarea ID and the new transmission range. The "Message type" field indicates the type of the message, which is mainly used to differentiate the power control messages from the other messages used in network. "Target subarea ID" field is used to indicate which subarea this message is supposed to be sent to. The "New TX range" field is used to set the new transmission range for the sensor nodes in the target subarea.
The new transmission range of the sensor node r TX_i is determined by the network size L and the curve order d i , and can be defined as follows: Each sensor node has its own subarea ID. On receiving the power control message, a node will decide whether to accept it or not by comparing the "Target subarea ID" in the message with its own subarea ID. Since each subarea may adopt different Hilbert curve orders and thus the minimum required transmitting range of sensor nodes differs, the power control message has to indicate the target subarea in case the message was received by nodes in a wrong subarea. If the "Target subarea ID" equals the nodes' own subarea ID, a node then updates its transmission range using the value in "New TX range", otherwise, it just ignores this message. Once the transmission range is updated, the sensor node can communicate with the mobile sink by using it in this subarea.

Performance Evaluation
Our simulations are performed under OMNeT++ 4.6 with the INET framework [23]. The parameters used in this simulation are listed in Table 2. By following the Hilbert curve to design the movement trajectory of the mobile sink, in this simulation, we compare our proposed adjustable trajectory based on node density in specific subareas with the trajectory based on network size [12], and the trajectory based on node density of the whole network [13], to evaluate its efficiency. In this section these three kinds of trajectories are denoted as ad-based, k-based and d-based trajectories, respectively.
In this work, we mainly concentrate on the comparing parameters such as the packet delivery ratio (PDR) and the energy consumption. In this simulation, sensor nodes are deployed in an 800 × 800 m 2 network. Two kinds of communication models which are the single-hop model and cluster model are adopted to test the performance of the proposed method. The reason we choose these two kinds of communication models is that they can fit the requirements in different applications.
In Table 2, the transmission power of the sensor node ranges from 0.05 mW to 2.6 mW. In fact, the transmission power also limits the communication range of the sensor nodes. In the cluster model, the minimum transmission power is used in the intra-cluster communication and the adaptive power control method can adjust the transmission power of the cluster head (CH). In this scheme, the CH is selected randomly and each node can and only can belong to one CH at a time. In the process of data gathering, the sensor nodes send their sensing data to the CHs first and then the CHs relay these sensing data to the mobile sink as the mobile sink passes by.
We set six scenarios with different node deployments. In Scenarios 1 and 3, sensor nodes are deployed uniformly, while in Scenarios 2, 4, 5 and 6, the sensor nodes are deployed unevenly. Then the mobile sink can move following the trajectory to collect the sensing data.

Scenario 1. Sensor Nodes Are Uniformly Deployed in the Network
In Scenario 1, we uniformly deploy 50, 100, 200, 400, 800, and 1200 nodes in the network. The mobile sink gathers sensing data along the trajectory that follows the adjustable trajectory based on node density in specific subareas, the trajectory based on network size, and the trajectory based on node density of the whole network. Then the packet delivery ratio is evaluated according to the simulation results. The orders of the Hilbert curves selected by each trajectory according to different number of nodes are shown in Table 3. It can be seen that when the number of nodes is set to 400 or larger, our ad-based curve achieved a 23.43%-29.70% improvement in PDR over the k-based curve and a 1.03%-4.21% improvement in PDR over the d-based curve, respectively, in uniform node deployment.
As shown in Figure 8, when the number of nodes is less than 400, the PDR under the d-based curve outperforms the others, since it begins with a 2-order Hilbert curve, while the other two trajectories start from a 1-order Hilbert curve. When the number of nodes rises to 400, the PDR under the adjustable d-based trajectory outperforms the others and remains the best as the number of nodes increases to 1200.
There is no doubt that a higher order Hilbert curve can achieve a better PDR in densely deployed networks. The d-based and the adjustable d-based curves use higher curve orders than that in a k-based curve according to the node density, which is the main reason that the PDR under these two curves can outperform the k-based curve. The reason that the adjustable d-based curve can surpass the d-based curve is that the adjustable d-based curve uses adaptive power control to adjust the transmission range of sensor nodes, and thus it relieves the communication congestion and achieves the desired PDR. node density of the whole network. Then the packet delivery ratio is evaluated according to the simulation results. The orders of the Hilbert curves selected by each trajectory according to different number of nodes are shown in Table 3. It can be seen that when the number of nodes is set to 400 or larger, our ad-based curve achieved a 23.43%-29.70% improvement in PDR over the k-based curve and a 1.03%-4.21% improvement in PDR over the d-based curve, respectively, in uniform node deployment.
As shown in Figure 8, when the number of nodes is less than 400, the PDR under the d-based curve outperforms the others, since it begins with a 2-order Hilbert curve, while the other two trajectories start from a 1-order Hilbert curve. When the number of nodes rises to 400, the PDR under the adjustable d-based trajectory outperforms the others and remains the best as the number of nodes increases to 1200.
There is no doubt that a higher order Hilbert curve can achieve a better PDR in densely deployed networks. The d-based and the adjustable d-based curves use higher curve orders than that in a k-based curve according to the node density, which is the main reason that the PDR under these two curves can outperform the k-based curve. The reason that the adjustable d-based curve can surpass the d-based curve is that the adjustable d-based curve uses adaptive power control to adjust the transmission range of sensor nodes, and thus it relieves the communication congestion and achieves the desired PDR.

Scenario 2. Sensor Nodes Are Unevenly Deployed in the Network
In Scenario 2, to verify our proposed adjustable trajectory based on node density in specific subareas, sensor nodes are unevenly deployed, whereby some subareas are densely deployed, and the other subareas are sparsely deployed. The number of nodes in the network is set to 800 and there are three kinds of node deployments adopted in this scenario, which are shown in Figure 9a-c, respectively. Figure 10 shows the corresponding k-based, d-based and adjustable d-based trajectories in each kind of node deployment in this scenario, respectively.
In Figure 9a,b, only one or two subareas are densely deployed while the other subareas are sparsely deployed. In Figure 9c, to further verify the flexibility of these three kinds of trajectories, the node densities in C1, C2, C3 are different from each other and C3, C4 are densely deployed.

Scenario 2. Sensor Nodes Are Unevenly Deployed in the Network
In Scenario 2, to verify our proposed adjustable trajectory based on node density in specific subareas, sensor nodes are unevenly deployed, whereby some subareas are densely deployed, and the other subareas are sparsely deployed. The number of nodes in the network is set to 800 and there are three kinds of node deployments adopted in this scenario, which are shown in Figure 9a-c, respectively. Figure 10 shows the corresponding k-based, d-based and adjustable d-based trajectories in each kind of node deployment in this scenario, respectively. In Figure 9a,b, only one or two subareas are densely deployed while the other subareas are sparsely deployed. In Figure 9c, to further verify the flexibility of these three kinds of trajectories, the node densities in C 1 , C 2 , C 3 are different from each other and C 3 , C 4 are densely deployed.   In Figure 9a, it can be seen that nodes in subarea C 3 are densely deployed while in the other three subareas they are sparsely deployed. Since the network is divided into four subareas and C 3 includes 650/800 = 81.25% nodes of the whole network, the PDR in C 3 contributes most to the overall PDR. Similarly, in Figure 9b,c, the PDR in subareas with the largest node density can affect the overall PDR the most.
It can be seen from Figure 11 that the PDR using the d-based curve outperforms the others in subareas C 1 , C 2 and C 4 . However, in subarea C 3 , where most nodes are deployed, the adjustable d-based curve gets much better PDR than the other two curves. Similarly, in Figures 12 and 13, the PDR under the ad-based curve outperforms that under the other two curves in subareas with dense node deployment. Therefore, as shown in Table 4, the adjustable d-based curve achieves the highest overall PDR among these three kinds of trajectories in all three kinds of node deployments. The reason is that the adjustable d-based curve adopts the proper order of the Hilbert curve to adapt to the highly dense deployment subarea, while the other two curves do not. The adaptive power control in an adjustable trajectory based on node density helps relieve the network traffic congestion, thus the adjustable d-based curve can achieve the desired PDR. From the simulation results and detailed analysis above, the ad-based curve outperforms the k-based curve and d-based curve by 21.20% and 12.76% on average in packet delivery ratio in Scenario 2, respectively. In Figure 9a, it can be seen that nodes in subarea C3 are densely deployed while in the other three subareas they are sparsely deployed. Since the network is divided into four subareas and C3 includes 650/800 = 81.25% nodes of the whole network, the PDR in C3 contributes most to the overall PDR. Similarly, in Figure 9b,c, the PDR in subareas with the largest node density can affect the overall PDR the most.
It can be seen from Figure 11 that the PDR using the d-based curve outperforms the others in subareas C1, C2 and C4. However, in subarea C3, where most nodes are deployed, the adjustable d-based curve gets much better PDR than the other two curves. Similarly, in Figures 12 and 13, the PDR under the ad-based curve outperforms that under the other two curves in subareas with dense node deployment. Therefore, as shown in Table 4, the adjustable d-based curve achieves the highest overall PDR among these three kinds of trajectories in all three kinds of node deployments. The reason is that the adjustable d-based curve adopts the proper order of the Hilbert curve to adapt to the highly dense deployment subarea, while the other two curves do not. The adaptive power control in an adjustable trajectory based on node density helps relieve the network traffic congestion, thus the adjustable d-based curve can achieve the desired PDR. From the simulation results and detailed analysis above, the ad-based curve outperforms the k-based curve and d-based curve by 21.20% and 12.76% on average in packet delivery ratio in Scenario 2, respectively.    In Figure 9a, it can be seen that nodes in subarea C3 are densely deployed while in the other three subareas they are sparsely deployed. Since the network is divided into four subareas and C3 includes 650/800 = 81.25% nodes of the whole network, the PDR in C3 contributes most to the overall PDR. Similarly, in Figure 9b,c, the PDR in subareas with the largest node density can affect the overall PDR the most.
It can be seen from Figure 11 that the PDR using the d-based curve outperforms the others in subareas C1, C2 and C4. However, in subarea C3, where most nodes are deployed, the adjustable d-based curve gets much better PDR than the other two curves. Similarly, in Figures 12 and 13, the PDR under the ad-based curve outperforms that under the other two curves in subareas with dense node deployment. Therefore, as shown in Table 4, the adjustable d-based curve achieves the highest overall PDR among these three kinds of trajectories in all three kinds of node deployments. The reason is that the adjustable d-based curve adopts the proper order of the Hilbert curve to adapt to the highly dense deployment subarea, while the other two curves do not. The adaptive power control in an adjustable trajectory based on node density helps relieve the network traffic congestion, thus the adjustable d-based curve can achieve the desired PDR. From the simulation results and detailed analysis above, the ad-based curve outperforms the k-based curve and d-based curve by 21.20% and 12.76% on average in packet delivery ratio in Scenario 2, respectively.

Scenario 3. Sensor Nodes are Uniformly Deployed in the Network
In Scenario 3, the number of nodes is set to 800 and the nodes are deployed uniformly in network. The k-based, d-based and adjustable d-based curves are evaluated in energy consumption. Figure 14 shows the residual energy of the network under these three kinds of trajectories by time. From the simulation results above, it can be seen that the ad-based curve achieves much better results on residual energy than the k-based curve and consumes 23.09% less energy than the d-based curve in uniform node deployment.
Since all the 800 nodes are deployed uniformly in the network, both the d-based curve and adjustable d-based curve use a 3-order Hilbert curve, while the k-based curve uses a 1-order Hilbert curve. It can be seen from Figure 14 that the energy consumption using adjustable d-based curves

Scenario 3. Sensor Nodes are Uniformly Deployed in the Network
In Scenario 3, the number of nodes is set to 800 and the nodes are deployed uniformly in network. The k-based, d-based and adjustable d-based curves are evaluated in energy consumption. Figure 14 shows the residual energy of the network under these three kinds of trajectories by time.

Scenario 3. Sensor Nodes are Uniformly Deployed in the Network
In Scenario 3, the number of nodes is set to 800 and the nodes are deployed uniformly in network. The k-based, d-based and adjustable d-based curves are evaluated in energy consumption. Figure 14 shows the residual energy of the network under these three kinds of trajectories by time. From the simulation results above, it can be seen that the ad-based curve achieves much better results on residual energy than the k-based curve and consumes 23.09% less energy than the d-based curve in uniform node deployment.
Since all the 800 nodes are deployed uniformly in the network, both the d-based curve and adjustable d-based curve use a 3-order Hilbert curve, while the k-based curve uses a 1-order Hilbert curve. It can be seen from Figure 14 that the energy consumption using adjustable d-based curves  From the simulation results above, it can be seen that the ad-based curve achieves much better results on residual energy than the k-based curve and consumes 23.09% less energy than the d-based curve in uniform node deployment.
Since all the 800 nodes are deployed uniformly in the network, both the d-based curve and adjustable d-based curve use a 3-order Hilbert curve, while the k-based curve uses a 1-order Hilbert curve. It can be seen from Figure 14 that the energy consumption using adjustable d-based curves is much less than that with the k-based curve and d-based curve, which makes the network save more energy.
The k-based curve drains the battery much faster than the other two curves due to the high packet transmission rate, while using the other two curves can reduce the packet transmission rate by using a higher order Hilbert curve, thus reducing the energy consumption. The energy consumption with an ad-based curve is even less than that with a d-based curve. In an adjustable d-based curve, the transmission ranges of the sensor nodes to communicate with the mobile sink are reduced by the adaptable power control, which is the main reason that the adjustable d-based curve achieves better performance than d-based curves in energy consumption.

Scenario 4. Sensor Nodes Are Unevenly Deployed in the Network
We want to evaluate the energy consumption of the k-based, d-based and adjustable d-based curves in a scenario with different node densities in specific subareas. Therefore the node deployments used in Scenario 4 are the same as those in Scenario 2. The experimental results of the three kinds of node deployment are shown in Figures 15-17 is much less than that with the k-based curve and d-based curve, which makes the network save more energy. The k-based curve drains the battery much faster than the other two curves due to the high packet transmission rate, while using the other two curves can reduce the packet transmission rate by using a higher order Hilbert curve, thus reducing the energy consumption. The energy consumption with an ad-based curve is even less than that with a d-based curve. In an adjustable d-based curve, the transmission ranges of the sensor nodes to communicate with the mobile sink are reduced by the adaptable power control, which is the main reason that the adjustable d-based curve achieves better performance than d-based curves in energy consumption.

Scenario 4. Sensor Nodes Are Unevenly Deployed in the Network
We want to evaluate the energy consumption of the k-based, d-based and adjustable d-based curves in a scenario with different node densities in specific subareas. Therefore the node deployments used in Scenario 4 are the same as those in Scenario 2. The experimental results of the three kinds of node deployment are shown in Figures 15-17, respectively.  It can be seen from the results above that the ad-based curve consumed 89.02%, 89.02% and 89.12% less energy, respectively, than the d-based curve in the three kinds of uneven node deployment. It is observed that the energy consumption under the k-based curve scenario is much faster than that under the d-based and ad-based curves. By using the adaptable power control scheme and selecting the proper curve order in each subarea, the average energy consumption with the adjustable d-based curve is less than that with the d-based curve. In the simulation, when the mobile sink traverses to a subarea with high node density, the k-based curve continues to use a 1-order Hilbert curve, thus resulting in a high transmission rate and high energy consumption. Similarly, the  is much less than that with the k-based curve and d-based curve, which makes the network save more energy. The k-based curve drains the battery much faster than the other two curves due to the high packet transmission rate, while using the other two curves can reduce the packet transmission rate by using a higher order Hilbert curve, thus reducing the energy consumption. The energy consumption with an ad-based curve is even less than that with a d-based curve. In an adjustable d-based curve, the transmission ranges of the sensor nodes to communicate with the mobile sink are reduced by the adaptable power control, which is the main reason that the adjustable d-based curve achieves better performance than d-based curves in energy consumption.

Scenario 4. Sensor Nodes Are Unevenly Deployed in the Network
We want to evaluate the energy consumption of the k-based, d-based and adjustable d-based curves in a scenario with different node densities in specific subareas. Therefore the node deployments used in Scenario 4 are the same as those in Scenario 2. The experimental results of the three kinds of node deployment are shown in Figures 15-17, respectively.  It can be seen from the results above that the ad-based curve consumed 89.02%, 89.02% and 89.12% less energy, respectively, than the d-based curve in the three kinds of uneven node deployment. It is observed that the energy consumption under the k-based curve scenario is much faster than that under the d-based and ad-based curves. By using the adaptable power control scheme and selecting the proper curve order in each subarea, the average energy consumption with the adjustable d-based curve is less than that with the d-based curve. In the simulation, when the mobile sink traverses to a subarea with high node density, the k-based curve continues to use a 1-order Hilbert curve, thus resulting in a high transmission rate and high energy consumption. Similarly, the  It can be seen from the results above that the ad-based curve consumed 89.02%, 89.02% and 89.12% less energy, respectively, than the d-based curve in the three kinds of uneven node deployment. It is observed that the energy consumption under the k-based curve scenario is much faster than that under the d-based and ad-based curves. By using the adaptable power control scheme and selecting the proper curve order in each subarea, the average energy consumption with the adjustable d-based curve is less than that with the d-based curve. In the simulation, when the mobile sink traverses to a subarea with high node density, the k-based curve continues to use a 1-order Hilbert curve, thus resulting in a high transmission rate and high energy consumption. Similarly, the d-based curve uses a d-order Hilbert curve that is based on the node density of the whole network, so compared with the adjustable d-based curve, it is still not flexible enough to reflect the real node deployment in a specific subarea, while in an adjustable d-based curve, the proper curve order is used to increase the PDR according to the node density in specific subareas and the transmission ranges of the nodes are reduced according to the curve order in this subarea, therefore the ad-based curve achieves the best energy efficiency among these three kinds of trajectories, and we can conclude that it is better to use an ad-based trajectory than a k-based or d-based trajectory in such a network with uneven node deployment.
Sensors 2016, 16,2091 19 of 24 d-based curve uses a d-order Hilbert curve that is based on the node density of the whole network, so compared with the adjustable d-based curve, it is still not flexible enough to reflect the real node deployment in a specific subarea, while in an adjustable d-based curve, the proper curve order is used to increase the PDR according to the node density in specific subareas and the transmission ranges of the nodes are reduced according to the curve order in this subarea, therefore the ad-based curve achieves the best energy efficiency among these three kinds of trajectories, and we can conclude that it is better to use an ad-based trajectory than a k-based or d-based trajectory in such a network with uneven node deployment.

Scenario 5. Sensor Nodes Are Unevenly Deployed in the Network
In this scenario, the number of nodes is set to 800 and the sensor nodes are deployed using the three kinds of node deployments in Scenario 2. Then the PDR for all the three kinds of trajectories which are proposed: ad-based curve in a cluster model, k-based curve and d-based curve are evaluated. The results in these three kinds of node deployments are shown in Figures 18-20, respectively.

Scenario 5. Sensor Nodes Are Unevenly Deployed in the Network
In this scenario, the number of nodes is set to 800 and the sensor nodes are deployed using the three kinds of node deployments in Scenario 2. Then the PDR for all the three kinds of trajectories which are proposed: ad-based curve in a cluster model, k-based curve and d-based curve are evaluated. The results in these three kinds of node deployments are shown in Figures 18-20 d-based curve uses a d-order Hilbert curve that is based on the node density of the whole network, so compared with the adjustable d-based curve, it is still not flexible enough to reflect the real node deployment in a specific subarea, while in an adjustable d-based curve, the proper curve order is used to increase the PDR according to the node density in specific subareas and the transmission ranges of the nodes are reduced according to the curve order in this subarea, therefore the ad-based curve achieves the best energy efficiency among these three kinds of trajectories, and we can conclude that it is better to use an ad-based trajectory than a k-based or d-based trajectory in such a network with uneven node deployment.

Scenario 5. Sensor Nodes Are Unevenly Deployed in the Network
In this scenario, the number of nodes is set to 800 and the sensor nodes are deployed using the three kinds of node deployments in Scenario 2. Then the PDR for all the three kinds of trajectories which are proposed: ad-based curve in a cluster model, k-based curve and d-based curve are evaluated. The results in these three kinds of node deployments are shown in Figures 18-20, respectively.   Table 5 gives the overall PDR of these three trajectories in this scenario. It can be seen from Table 5 that the ad-based curve in the cluster model achieves the desired overall PDR and on average it outperforms the k-based and d-based curves in PDR by 11.40% and 3.64%, respectively, in this scenario.
In a subarea with sparse node deployment, the CHs have to collect all the sensing data in their clusters first, and then send is to the mobile sink, which also means that each CH has to send more sensing data to the mobile sink than a sensor node in the single-hop model, where the sensor nodes can send the sensing data to the mobile sink directly. However, since the time the mobile sink stays in one subarea is the same as that in the single-hop model, such a time period may not be enough for the mobile sink to collect all the sensing data from all CHs, which in return results in the decrease in PDR for this subarea. In a subarea with dense node deployment, the number of sensor nodes in one cluster increases due to the higher node density, thus the CHs have to send even more data to the mobile sink. However, the ad-based curve can dynamically select a higher order Hilbert curve, which results in an increase of staying time of the mobile sink in this subarea, and thus there may be enough    Table 5 gives the overall PDR of these three trajectories in this scenario. It can be seen from Table 5 that the ad-based curve in the cluster model achieves the desired overall PDR and on average it outperforms the k-based and d-based curves in PDR by 11.40% and 3.64%, respectively, in this scenario.
In a subarea with sparse node deployment, the CHs have to collect all the sensing data in their clusters first, and then send is to the mobile sink, which also means that each CH has to send more sensing data to the mobile sink than a sensor node in the single-hop model, where the sensor nodes can send the sensing data to the mobile sink directly. However, since the time the mobile sink stays in one subarea is the same as that in the single-hop model, such a time period may not be enough for the mobile sink to collect all the sensing data from all CHs, which in return results in the decrease in PDR for this subarea. In a subarea with dense node deployment, the number of sensor nodes in one cluster increases due to the higher node density, thus the CHs have to send even more data to the mobile sink. However, the ad-based curve can dynamically select a higher order Hilbert curve, which results in an increase of staying time of the mobile sink in this subarea, and thus there may be enough   Table 5 gives the overall PDR of these three trajectories in this scenario. It can be seen from Table 5 that the ad-based curve in the cluster model achieves the desired overall PDR and on average it outperforms the k-based and d-based curves in PDR by 11.40% and 3.64%, respectively, in this scenario.
In a subarea with sparse node deployment, the CHs have to collect all the sensing data in their clusters first, and then send is to the mobile sink, which also means that each CH has to send more sensing data to the mobile sink than a sensor node in the single-hop model, where the sensor nodes can send the sensing data to the mobile sink directly. However, since the time the mobile sink stays in one subarea is the same as that in the single-hop model, such a time period may not be enough for the mobile sink to collect all the sensing data from all CHs, which in return results in the decrease in PDR for this subarea. In a subarea with dense node deployment, the number of sensor nodes in one cluster increases due to the higher node density, thus the CHs have to send even more data to the mobile sink. However, the ad-based curve can dynamically select a higher order Hilbert curve, which results in an increase of staying time of the mobile sink in this subarea, and thus there may be enough time for the mobile sink to fully collect all the sensing data from all the CHs, therefore, it can result in the increase in PDR for this subarea.
By comparing the overall PDR of the ad-based curve with different communication models, which are the single-hop model in Scenario 2 and the cluster model in this scenario, it can be seen that the ad-based curve in a single-hop model outperforms that in a cluster model in PDR by 9.69% on average. For a cluster model, in the first place, this kind of two-step communication has effects on performance features such as latency, each CH (relay node) incurs additional delays, e.g., for queuing the data. On the other hand, communications over a two-step model may often be less reliable, enhancing the communication time and overhead, since the same data must be transmitted several times (and the limited channel capacity must be shared among the relays for both receiving and transmitting), so the maximum achievable throughput will also suffer. Further, reliability can be affected by having multiple nodes (relays) involved in the communication which increases the risk of disruptions due to link or node failures. Therefore, the PDR for ad-based trajectory in a cluster model is less than that in a single-hop model.

Scenario 6. Sensor Nodes Are Unevenly Deployed in the Network
In this scenario, the number of nodes is set to 800, and nodes are also deployed using the three kinds of node deployments used in Scenario 2. The simulation results are shown in Figures 21-23 time for the mobile sink to fully collect all the sensing data from all the CHs, therefore, it can result in the increase in PDR for this subarea. By comparing the overall PDR of the ad-based curve with different communication models, which are the single-hop model in Scenario 2 and the cluster model in this scenario, it can be seen that the ad-based curve in a single-hop model outperforms that in a cluster model in PDR by 9.69% on average. For a cluster model, in the first place, this kind of two-step communication has effects on performance features such as latency, each CH (relay node) incurs additional delays, e.g., for queuing the data. On the other hand, communications over a two-step model may often be less reliable, enhancing the communication time and overhead, since the same data must be transmitted several times (and the limited channel capacity must be shared among the relays for both receiving and transmitting), so the maximum achievable throughput will also suffer. Further, reliability can be affected by having multiple nodes (relays) involved in the communication which increases the risk of disruptions due to link or node failures. Therefore, the PDR for ad-based trajectory in a cluster model is less than that in a single-hop model.

Scenario 6. Sensor Nodes Are Unevenly Deployed in the Network
In this scenario, the number of nodes is set to 800, and nodes are also deployed using the three kinds of node deployments used in Scenario 2. The simulation results are shown in Figures 21-23, respectively.   time for the mobile sink to fully collect all the sensing data from all the CHs, therefore, it can result in the increase in PDR for this subarea. By comparing the overall PDR of the ad-based curve with different communication models, which are the single-hop model in Scenario 2 and the cluster model in this scenario, it can be seen that the ad-based curve in a single-hop model outperforms that in a cluster model in PDR by 9.69% on average. For a cluster model, in the first place, this kind of two-step communication has effects on performance features such as latency, each CH (relay node) incurs additional delays, e.g., for queuing the data. On the other hand, communications over a two-step model may often be less reliable, enhancing the communication time and overhead, since the same data must be transmitted several times (and the limited channel capacity must be shared among the relays for both receiving and transmitting), so the maximum achievable throughput will also suffer. Further, reliability can be affected by having multiple nodes (relays) involved in the communication which increases the risk of disruptions due to link or node failures. Therefore, the PDR for ad-based trajectory in a cluster model is less than that in a single-hop model.

Scenario 6. Sensor Nodes Are Unevenly Deployed in the Network
In this scenario, the number of nodes is set to 800, and nodes are also deployed using the three kinds of node deployments used in Scenario 2. The simulation results are shown in Figures 21-23, respectively.   It can be seen from the above results that the ad-based curve in the cluster model consumed 94.82%, 94.06% and 94.05% less energy than the d-based curve in the three kinds of uneven node deployment, respectively.
The simulation results show that in Scenario 6, the k-based curve is also the first one to drain its battery. There is no doubt that the high retransmission rate in the k-based curve case results in high energy consumption. By using the cluster model and the adaptive power control, the transmission power of the sensor nodes is minimized while the transmission power of CHs is adjusted according to the curve order of the trajectory in the ad-based curve in the cluster model. Therefore, the ad-based curve in the cluster model achieves the best energy efficiency among these three trajectories.
By comparing the energy consumption for the ad-based curve in the single-hop model in Scenario 4 and the ad-based curve in the cluster model in this scenario, it can be calculated that the ad-based curve in the cluster model consumed 52.85%, 41.08% and 45.35% less energy than that in single-hop model in the three kinds of node deployment, respectively.
By using the cluster model, the data gathering process of the ad-based curve consists of two steps. In the first step, most of the sensor nodes only need to transmit their sensing data to the CHs which are close to them other rather than the mobile sink that is far from them. Therefore, the reduction in transmission distance can ultimately result in an energy consumption decrease based on our energy model. In the second step, the CHs can send the gathered sensing data to the mobile sink using transmission power adjusted by the adaptive power control method, however, due to the increase of the data size and communication distance, the energy consumption for CHs is higher than that in the single-hop model, but it can be known that, in the cluster model, most of the sensor nodes only need to communicate with the CHs over a small distance while only a few nodes (which are CHs) need to communicate with the mobile sink over a long distance, and therefore, the overall energy consumption for the whole network can be reduced dramatically.
From the above work, we can draw the conclusion that, the ad-based curve in single-hop communication model has the highest PDR and the ad-based curve in the cluster model has the highest energy efficiency. Therefore, the communication model can be properly selected to maximize the PDR or the network lifetime, according to the application requirement.

Conclusions
In this paper, an adjustable trajectory design method is developed by using the Hilbert spacefilling curve, in which the full coverage of the network and the desired packet delivery ratio are achieved. By selecting the proper order of the Hilbert curve based on the node density in specific subareas, more sensing data can be gathered and the network performance is improved in densely deployed networks with uneven node deployment. In addition, the proposed trajectory also saves energy and prolongs the network lifetime. Simulation results demonstrate that the proposed trajectory is flexible and can adapt to networks with different node density or node deployment. It is It can be seen from the above results that the ad-based curve in the cluster model consumed 94.82%, 94.06% and 94.05% less energy than the d-based curve in the three kinds of uneven node deployment, respectively.
The simulation results show that in Scenario 6, the k-based curve is also the first one to drain its battery. There is no doubt that the high retransmission rate in the k-based curve case results in high energy consumption. By using the cluster model and the adaptive power control, the transmission power of the sensor nodes is minimized while the transmission power of CHs is adjusted according to the curve order of the trajectory in the ad-based curve in the cluster model. Therefore, the ad-based curve in the cluster model achieves the best energy efficiency among these three trajectories.
By comparing the energy consumption for the ad-based curve in the single-hop model in Scenario 4 and the ad-based curve in the cluster model in this scenario, it can be calculated that the ad-based curve in the cluster model consumed 52.85%, 41.08% and 45.35% less energy than that in single-hop model in the three kinds of node deployment, respectively.
By using the cluster model, the data gathering process of the ad-based curve consists of two steps. In the first step, most of the sensor nodes only need to transmit their sensing data to the CHs which are close to them other rather than the mobile sink that is far from them. Therefore, the reduction in transmission distance can ultimately result in an energy consumption decrease based on our energy model. In the second step, the CHs can send the gathered sensing data to the mobile sink using transmission power adjusted by the adaptive power control method, however, due to the increase of the data size and communication distance, the energy consumption for CHs is higher than that in the single-hop model, but it can be known that, in the cluster model, most of the sensor nodes only need to communicate with the CHs over a small distance while only a few nodes (which are CHs) need to communicate with the mobile sink over a long distance, and therefore, the overall energy consumption for the whole network can be reduced dramatically.
From the above work, we can draw the conclusion that, the ad-based curve in single-hop communication model has the highest PDR and the ad-based curve in the cluster model has the highest energy efficiency. Therefore, the communication model can be properly selected to maximize the PDR or the network lifetime, according to the application requirement.

Conclusions
In this paper, an adjustable trajectory design method is developed by using the Hilbert space-filling curve, in which the full coverage of the network and the desired packet delivery ratio are achieved. By selecting the proper order of the Hilbert curve based on the node density in specific subareas, more sensing data can be gathered and the network performance is improved in densely deployed networks with uneven node deployment. In addition, the proposed trajectory also saves energy and prolongs the network lifetime. Simulation results demonstrate that the proposed trajectory is flexible and can adapt to networks with different node density or node deployment. It is also verified that the proposed trajectory outperforms the existing classic trajectories in the packet delivery ratio and the network energy efficiency with the designed adaptable power control scheme.
One future project is how to design a more flexible method of network partition, so the sensor nodes in a subarea can work cooperatively to collect the sensing data using a smaller transmission range, and we can consider using more sophisticated routing mechanisms, such as opportunistic routing, to deliver the sensing data to the mobile sink, in order to decrease the average packet delay in each round of data gathering, which is very important in event-driven WSNs. Another future direction of this work is how to use multiple mobile sinks to increase the data gathering efficiency, and hoe to apply an energy rechargeable algorithm and energy consumption model considering the energy consumptions of both transmission and computing [24][25][26].