A Complete Feasible and Nodes-Grouped Scheduling Algorithm for Wireless Rechargeable Sensor Networks in Tunnels

Limited energy in each node is the major design constraint in wireless sensor networks (WSNs), especially in mine tunnel scenario where the WSNs are required to work perpetually. To overcome this limit, wireless rechargeable sensor networks (WRSNs) have been proposed and studied extensively over the last few years. To keep the sensor nodes working perpetually, one fundamental question is how to design the charging scheme. Considering the special tunnel scenario, this paper proposes a Complete Feasible Charging Strategy (CFCS) to ensure the whole WRSNs is working perpetually. We divide the whole WRSN into several subnetworks and use several mobile chargers (MCs) to charge every subnetwork periodically and orderly. For a subnetwork, we formulate the main problem as a charging time distribution problem. A series of theorems are deduced to restrict the charging configurations, and a group nodes mechanism is proposed to expand the scale of the WRSNs. Finally, we conduct extensive simulations to evaluate the performance of the proposed algorithms. The results demonstrate which of the CFCS boundary theorems is correct and that our proposed CFCS can keep the WRSNs working perpetually. Furthermore, our Nodes-Grouped mechanism can support more nodes in WRSN compared to the state-of-the-art baseline methods.


Introduction
Nowadays, wireless sensor networks (WSNs) are playing a significant role in mine tunnels for monitoring gas, rock pressure, temperature, personnel orientation, etc. However, most of the sensor nodes are powered by batteries with limited capacities. When the batteries run out of energy, the nodes' lifetime ends, thus creating safety hazards. It's difficult to replace batteries for thousands of nodes, especially for the buried ones, such as pressure sensors. Fortunately, wireless charging technology, such as passive energy harvesting [1] or active power transmission [2][3][4][5], provides a promising way to solve this energy limitation problem in WSNs. The WSNs that can be recharged wirelessly are called Wireless Rechargeable Sensor Networks (WRSNs) [6].
Many ground applications have benefitted from WRSNs, such as [7,8]. In mine tunnels, the safety requirements are rigorous, and the sensor nodes are required to continue working, especially for the gas and pressure sensors. Therefore, we adopt active power transmission technologies to provide controllable and stable energy to ensure the WRSNs work perpetually. As others do, we employ several mobile chargers (MCs), traveling along tunnel tracks, to provide energy for WRSNs.
(1) To the best of our knowledge, this is the first attempt to give four theorems that form necessary and sufficient conditions for the complete feasibility of the charging schedule in WRSNs. Using our theorems, the charging configurations can be determined quickly and correctly. (2) We formulate the energy replenishment and nodes grouping problem in a tunnel scenario. The problem is solved by the Complete Feasible and Nodes-Grouped Scheduling Algorithm (CFNGS). (3) We evaluate the proposed algorithms using extensive simulations and study the impact of the multiple charging factors referred to in our theorems. The effectiveness and superiority are verified by the results.
The rest of this paper is organized as follows. Section 2 gives a brief overview of prior methods on the charging strategy of WRSNs. In Section 3, we detail the CFCS problem, boundary conditions, and the algorithm to solve CFCS. Extensive simulations and comparisons are given in Section 4, and we conclude our work in Section 5.

Related Works
The design of the charging schedule is one of the core issues in WRSNs [9]. To date, researchers have presented many excellent works to prolong the network lifetime. Although these works involve various aspects, they are mainly divided into two categories: The offline schemes and the online schemes [10].
The offline schemes are designed before charging, are usually periodic, and the MC does not change its charging decision based on a node's information. Most of the charging schemes using MCs belong to this type. Generally, the first step of the schemes was to build the charging path according to the traveling salesman problem (TSP) [6,11], and then an optimal charging schedule would be conducted for the charging path. The number of MCs (multiple MC scheme) depends on the number of charging paths that can cover the whole network [11][12][13].
However, numerous works consider one MC in WRSNs. In [14], Fu et al., used one MC to charge all nodes in a period with the aim of minimizing charging delay. The purpose was realized by minimizing the sum of the charging time of all nodes under the constraint condition that all nodes were charged above their energy threshold. In [15], Shu et al., proposed a near-optimal velocity control strategy for MC in a WRSNs, which was periodic. They first proved the problem to be NP-hard and solved it using novel spatial and temporal discretization. In a charging period, the network lifetime was prolonged by 2.5 times by the velocity control mechanisms. The authors did not analyze the influence of nodes number and charging period, so the mechanisms cannot ensure the network works perpetually in most cases. In [16], Rao et al., considered the influence of the charging distance and angle on charging efficiency. When charging a node, they find the optimal position concerning the distance and angle for MC, which decreases the charging time by more than 50% compared with the baseline scheme. Their work is helpful for certain charging scenarios like tunnels and indoors. Similar work is detailed in [17], but the cover area of MC is further optimized by particle swarm optimization. In [18], Xu et al., proposed a novel charging model in which the nodes were partially charged, so that more sensors would be charged before their energy depletion. In [19], Wang et al., considered the recharge scheduling problem under the constraints of the vehicles' moving energy consumption, limited recharging capacity, energy efficiency, and data latency. They employed one dedicated data gathering vehicle and multiple charging vehicles to balance energy consumption and latency. The number of vehicles was given theoretically.
The online schemes allow the MCs to change the charging behavior according to the nodes' residual energy. In general, the nodes are charged on demand. That is to say, the nodes would not be charged unless their residual energy was below a certain threshold value. This results in the issue that if many nodes need to be charged at the same time, parts of them will stop working before being charged. Compared to the offline schemes, the online schemes have a high complexity due to continuously selecting and judging nodes to charge. However, the energy utilization efficiency of the online schemes is higher than that of the offline schemes.
In [20], He et al., proposed a charging scheme based on the Nearest-Job-Next with Preemption (NJNP) discipline and on-demand charging. The NJNP can reach a high charging efficiency by always selecting the spatially closest requesting node as the next node. In [21], Feng et al., proposed a starvation avoidance mobile energy replenishment scheme (SAMER) to solve the energy starvation problem produced in routine charging schemes, with their charging model being based on energy demand. Before charging, the maximum tolerable latency of each node would be calculated, to avoid the starvation. In [22], Lin et al., developed a Primary and Passer-by Scheduling (P 2 S) algorithm for an on-demand charging architecture for large-scale WRSNs. When choosing the charging nodes, they exploit a local searching algorithm to find primary nodes, and innovatively propose the "drawing circles" method to select passer-nodes along primary nodes. Their strategy has a high survival rate in large-scale WRSNs. In [23], Shu et al., proposed a joint energy replenishment and scheduling mechanism to maximize the network lifetime with strict sensing guarantees in WRSNs. When choosing nodes for energy portioning under the restriction of a given charging capacity of a charger, they take the operation scheduling into consideration. Then they devise an f-approximate scheduling mechanism and get a 39.2% improvement in the network lifetime over the baseline method.
To summarize, most of the charging strategies aim to prolong the network lifetime. When planning the charging strategy, most of them use a loop search method to judge the feasibility, thus leading to a low efficiency. At the same time, some scholars have proposed using massive fixed MCs to cover the interest areas [24,25]. However, this is too expensive.
Compared with the existing research, this paper provides a complete feasible charging strategy, which is constrained by four theoretically derived boundary conditions. Meanwhile, the Node-Group mechanism is put forward to enlarge the scale of the WRSNs.

Problem Description
When referring to the WRSN's problem on the ground, researchers usually consider that the sensor nodes are distributed over a limited square area. However, in our tunnel application scenarios, the nodes present zonal distribution characteristics. Furthermore, the distribution is approximately linear because the nodes are usually fixed on the top of tunnel walls, as shown in Figure 1. In some places, the nodes are distributed sparsely, while in certain interest areas, the nodes are intensive. approximately linear because the nodes are usually fixed on the top of tunnel walls, as shown in Figure 1. In some places, the nodes are distributed sparsely, while in certain interest areas, the nodes are intensive. Under normal circumstances, the length of the tunnel varies from dozens to thousands of meters. For a long tunnel, the number of the sensor nodes will be very large, thus it is difficult to charge the whole network using only one MC for the following two reasons: (1) it is hard to use one MC to satisfy the energy requirement of all nodes since the capacity of MC is limited; (2) when charging the front nodes, the nodes far behind may have already "died". Therefore, in this paper, we divide the whole network into several small subnetworks. Each subnetwork has one MC, and all the MCs travel across each subnetwork one by one periodically and successively to provide power for all nodes, to perpetually prolong the lifetime of the whole network.
For each subnetwork, we consider it as consisting of several rechargeable nodes, one MC, and one service station located at the beginning. The time it takes the MC to move through the subnetwork is T, which is called the charging period. Here we give the definition of the charging period T as follows: Definition of charging period T; For a subnetwork in tunnels, if within a period time T, it can satisfy that; (1) The nodes are charged during the moving of MC from one station to the next.
(2) The energy charged by the MC can ensure that all nodes will not stop working.
Then, the T is called a charging period T.

Description of Node
We assume that all nodes are using the same hardware configuration. In a subnetwork, the set of nodes is , in which n is the node's number. Each node is equipped with a battery with maximum capacity, Emax. The minimum energy level for regular operation is Emin. At the beginning, the initial energy level for all nodes is Emax. i p is denoted as the power consumption of the node i, and i e as the residual energy at the beginning of the charging round. If i e is below Emin, the node i is regarded as having stopped working. In this paper, we neglect the battery degradation [26], so the Emax is set as constant.

Description of MC
A mobile charger, MC, is employed to recharge the sensor nodes. The MC mainly consists of three modules: One energy module for transferring power to nodes wirelessly, one communication module for getting node's information (e.g., node's location, pi, ei), one moving module for controlling the MC to travel along the tunnel. In addition, we assume that the MC foresees the power attenuation rate p  from MC to the nodes and the node rectifier efficiency d  . The moving velocity of MC is v. When charging, the MC will stop at the nearest location of each node for affording the maximal charging power U . Under normal circumstances, the length of the tunnel varies from dozens to thousands of meters. For a long tunnel, the number of the sensor nodes will be very large, thus it is difficult to charge the whole network using only one MC for the following two reasons: (1) it is hard to use one MC to satisfy the energy requirement of all nodes since the capacity of MC is limited; (2) when charging the front nodes, the nodes far behind may have already "died". Therefore, in this paper, we divide the whole network into several small subnetworks. Each subnetwork has one MC, and all the MCs travel across each subnetwork one by one periodically and successively to provide power for all nodes, to perpetually prolong the lifetime of the whole network.
For each subnetwork, we consider it as consisting of several rechargeable nodes, one MC, and one service station located at the beginning. The time it takes the MC to move through the subnetwork is T, which is called the charging period. Here we give the definition of the charging period T as follows: Definition of charging period T; For a subnetwork in tunnels, if within a period time T, it can satisfy that; (1) The nodes are charged during the moving of MC from one station to the next.
(2) The energy charged by the MC can ensure that all nodes will not stop working.
Then, the T is called a charging period T.

Description of Node
We assume that all nodes are using the same hardware configuration. In a subnetwork, the set of nodes is N = {N 1 , N 2 , · · · , N n }, in which n is the node's number. Each node is equipped with a battery with maximum capacity, E max . The minimum energy level for regular operation is E min . At the beginning, the initial energy level for all nodes is E max . p i is denoted as the power consumption of the node i, and e i as the residual energy at the beginning of the charging round. If e i is below E min , the node i is regarded as having stopped working. In this paper, we neglect the battery degradation [26], so the E max is set as constant.

Description of MC
A mobile charger, MC, is employed to recharge the sensor nodes. The MC mainly consists of three modules: One energy module for transferring power to nodes wirelessly, one communication module for getting node's information (e.g., node's location, p i , e i ), one moving module for controlling the MC to travel along the tunnel. In addition, we assume that the MC foresees the power attenuation rate η p from MC to the nodes and the node rectifier efficiency η d . The moving velocity of MC is v. When charging, the MC will stop at the nearest location of each node for affording the maximal charging power U.

Description of Service Station
The server stations (S) which serve as the energy source for the MC are located at the beginning of the subnetworks. At S, the MC's battery is replaced to update its energy. Compared to the node charging time, the MC's energy updating time can be ignored. In certain scenarios, the server stations could be chosen as sink nodes for collecting sensing data. Additionally, an extra S is placed at the end of the last subnetwork to ensure the MC returns to the origin of the tunnel.

Problem Statements
Our purpose is to ensure the perpetual lifetime of the whole WRSN in a tunnel. This problem can be summarized as a completely feasible charging strategy (CFCS). Based on the discussion above, the problem could be concentrated on one subnetwork. If the CFCS satisfies one subnetwork, it can be expanded to the whole network easily.
So for a subnetwork, there are two problems that must be considered: (1) what are the boundary conditions of the CFCS?
(2) how to design the algorithm for the CFCS?

Charging Model
In our wireless charging scenario for one subnetwork, the charging period T is consists of at least two segments, the total charging time of all nodes T c and the moving time of MC through the subnetwork T m .
t i is the respective charging time for each node.
L is the length of the subnetwork and v is the moving velocity of the MC. If the nodes do not need too much energy to be supplemented, the MC can rest at the service station when finishing the charging work. So we can get: During T, the MC must move through the subnetwork. The next round of CFCS using the next MC cannot be interrupted.
In order to make sure all the nodes won't die from energy depletion, we must guarantee that the residual energy of each node is higher than E min at the end of T, U is the charging power of node i and can be calculated by: P t is the transmitting power, η P is the energy transfer efficiency from MC to the sensor node in tunnel, and η d is the node rectifier efficiency. The residual energy e i (t) of each node always reduces when working. The CFCS must ensure that e i (t) is above E min before the MC reaching the node i, that means: where τ is the time that MC reaches node i. T i−1 c is the total charging time of all the front i − 1 nodes before node i. T i m is the total time generated by the moving process of MC from S to node i. (T i−1 c + T i m ) can be calculated by: L i is the distance between the node i and S. We do not need to charge the battery to its full capacity, so, (8) and the charging power to all nodes cannot be larger than E MC , where q is the unit travel cost of MC, and in some application scenarios, q·L is ignored to simplify the analysis. In this paper, we ignore it too, and the Equation (9) is changed to, As the transmitting power P t is limited, our optimal object is to find a set of charging time distribution {t 1 ,t 2 , . . . ,t n }, which satisfies the CFCS. At the same time, we maximize the total energy transferred to all nodes, that means

The Boundary Conditions of CFCS
The boundary conditions satisfying CFCS are the maximum number of nodes, the range of the charging period time, and the minimum energy capacity of MC. Theorem 1. In order to ensure the CFCS, the maximum number of nodes n should meet the relation n < U/p, in which U is the charging power and p is the average power consumption among all nodes.
Proof. We set the average charging time to be τ. To ensure the CFCS, the total charging energy should be greater than or equal to the energy depletion of all n nodes, that is Uτ − npτ ≥ 0. By offsetting the τ and performing the transposition, we can get n ≤ U/p. Due to the existence of MC's moving time T m , it would lead to U · τ − np(τ + T m ) ≥ 0. As long as T m exists, even if very small, the relation can be obtained that U − np > 0, that is n < U/p.

Theorem 2.
In order to ensure the CFCS, the range of the charging period time T should meet the relation (1) We first consider the subnetwork including only one node. The maximum energy the node can be replenished by is U · T c = pT = p(T c + T m ). Generally, the node cannot work when being charged. Therefore, we get U · T c = pT = pT m , that means T c = pT m /U. From the Equation (3), we can get T m + T c = T m + pT m /U ≤ T. Expand the situation to n nodes network, the relation T m + npT m /U ≤ T can be obtained. After extracting the common factor T m , we get the relation (1 + np/U) · T m ≤ T. (2) (E max − E min )/p max is the ultimate working time that can be sustained when the node has the maximum power consumption. Within this time, at least once charging behavior should be implemented, otherwise the node would stop working. Thus, we can easily get that

Proof.
Combining the (1) and (2) discussed above, we obtain the relation (1 Theorem 3. After the determination of T, in order to ensure the CFCS, the minimum E MC should meet the relation E MC ≥ P t T. Proof. The E MC should be greater than or equal to the energy that is transferred to all n nodes within T, that is E MC ≥ P t T. Proof. First we consider there is only one node in the subnetwork and the node's location is at the barycenter of the subnetwork. The time consumed by MC's moving to the node is L/(2v). For this time, the energy consumption of the node is pL/(2v). Therefore, the charging time T c is no more than pL/(2vU). According to Formula (3), we get pL/(2vU) + L/(2v) ≤ T. For the subnetwork with n nodes, it will be n(pL/(2vU) + L/(2v)) ≤ T. After transformation, the result will be v ≥ nL 2T (p/U + 1).
The four theorems give the boundary conditions of CFCS. Setting the parameters through these theorems, the Problem (11) would be solved, and the results could ensure that the subnetwork works perpetually. In the experiments, we use Matlab with the help of the CVX tool to solve the Problem (11).

"Nodes-Grouped" Partition
In the process of charging, the directional antenna with high gain is usually used in MC. Since the antenna has a beam coverage area, we can combine all nodes within it as a group node G. When MC moves to the center of G, all the nodes in G can be charged at one time. As shown in Figure 2, if the three nodes are all in the beam coverage area (CA), they are classified as a group node, G i . When calculating n using Theorem 1, G is treated as one node, so the real node numbers of the network can be larger than n. CA is a circular region and can be obtained using the Pythagorean Theorem, as shown in Figure 2, that is , where d is the shortest distance between the MC and the center of G.  is the charging angle of MC. Because G is treated as one node, a power consumption rate should be assigned to it. In order to make G stratify the CFCS, we assign the maximum power consumption rate of all nodes in G to G, CA is a circular region and can be obtained using the Pythagorean Theorem, as shown in Figure 2, that is CA = πd 2 tan 2 (θ/2), where d is the shortest distance between the MC and the center of G. θ is the charging angle of MC.
Because G is treated as one node, a power consumption rate should be assigned to it. In order to make G stratify the CFCS, we assign the maximum power consumption rate of all nodes in G to G, that is p G = max(p i ∈ G).

Algorithm
Before dividing the whole network of the tunnel into several subnetworks, group nodes should be classified first. After that, the number of sensor nodes will be "reduced". Then divide the subnetworks according to Theorem 1. The method of group nodes classification is simple, perform path traversal with the CA interval along the tunnel. Based on the discussion above, the whole problem can be solved by the Partition of group nodes and the Complete Feasible and Nodes-Grouped Scheduling Algorithm (CFNGS). The two algorithms are shown as below.
The time complexity of Algorithm 1 is O(m). For Algorithm 2, one charging arrangement (line 4-line 13) consists of two parts. One is solving the Semi-Definite Programming Problem (SDP, line 4), whose time complexity is O(n 2 ). The other is the "for" loop (line 5-line 13), whose time complexity is O(n). Therefore, the overall time complexity of Algorithm 2 is O(n 2 ).

Simulations
In this section, we conduct extensive simulations and show the results to analyze the effects of different parameters on charging efficiency.

Simulation Settings
In our tunnel scenario, we set m = 100 sensor nodes which are randomly distributed along a line of 2.5 km. For each sensor node, the energy consumption rate is a value p i (t) ∈ (10 mW, 15 mW) at node i. Regarding the battery capacity, we choose a regular battery with 10.8 KJ [14]. That means E max = 10.8 KJ and we let E min = 0.05 × E max = 540 J.
For the MC, it keeps moving at the speed of v = 5 m/s and the maximum transfer power is P t = 5 W. We assume that the shortest distance between MC and the nodes is d = 1 m. At this distance, we get the maximum η p = 0.2 from experiments in the lab. We let η d = 0.7 using a class-F rectifier [27]. The charging angle is θ = 2π/3, from which we get CA ≈ 9.4 m 2 . In our simulation scenario, we set the tunnel as a line, so we should use the diameter of CA as the coverage area, that is d_CA ≈ 3 m.

Subnetworks Partition and Nodes Grouping
From the parameters given above, the charging power is U = P t η p η d = 0.7 W. According to Theorem 1, we obtain an approximate n < 35. Here we choose n = 34, so at least m/n = 3 interval subnetworks will be divided. Conducting Algorithm 1, the three subnetworks and group nodes are shown in Figure 3. We can see that three intervals are partitioned and group nodes are marked with the color, red. Since there are three subnetworks, at most four service stations are needed to update MC's energy. Two are located at both ends of the whole network, and two at the junctions of intervals, shown as green squares in Figure 3. In subnetwork one, there are 38 nodes. As five groups are classified, we just consider 34 nodes when designing the scheduling strategy. In the real application, we can deploy the nodes artificially, thus forming more group nodes. Then the scale of the subnetwork will be enlarged and the number of intervals may be reduced.

Completely Feasible Strategy
We choose the first subnetwork to simulate Algorithm 2. According to the Theorem 2, the range of the charging period is (1 + 34 * p/U) · L 1 /v = 317 ≤ T ≤ (E max − E min )/p max = 51, 300. Here we set T = 10,000 s, and E mc ≥ 50,000 J according to Theorem 3. Thus far all the charging configurations are obtained as shown in Table 1. At the initiation of charging, an MC stays at station S1 and all the Nodes' capacity are E max . Then we begin to solve Problem (11) using Algorithm 2. An optimal set of charging times T c = {t 1 , t 2 , . . . , t 34 } will be output. Then the MC charges all nodes keeping to T c . When the first period T 1 ends, the next MC from S1 performs the next charging task. The former MC will be used in subnetwork 2 after the energy is renewed in S2. After several T, the residual energies of all nodes reach a balanced condition, on which the charging time T c scarcely changes. The residual energies are plotted intuitively in Figure 4. The normal nodes' residual energy is relatively balanced, and the latter nodes have more energy than the front nodes as they were supplemented recently. It indicates that the subnetwork 1 will work perpetually, and the results of the other two subnetworks are the same since they use the same charging schedule.  In subnetwork 1, each nodes group has two nodes. We marked the group number with a symbol "+". For example, in Table 2, the nodes with number 2 and 2+ are in the same group, and when solving the schedule, they are treated as one node, Number 2. First, we can see that the residual energies of all nodes are more than Emin, which indicates that the network works perpetually. However, at the same time, the group nodes' residual energies are all reaching Emax, which are marked with a red color in Table 2 and Figure 4. This indicates that they are overcharged. The reason for this is simple, as introduced in Section 3.3, we know that With the same charging time, the nodes with low consumption would inevitably obtain more energy than needed, thus resulting in the overcharging phenomenon. If we set   min( ) G i p p G the overcharge will disappear but group nodes with high consumption will "die" as they are not supplemented with enough energy within the same charging time. The overcharge and "dead" phenomenon will appear simultaneously when we are setting   average( ) G i p p G because the energy radiating from MC won't be intelligently distributed to nodes on their demands. In our next paper, we will figure out this problem with beamforming technology.  In subnetwork 1, each nodes group has two nodes. We marked the group number with a symbol "+". For example, in Table 2, the nodes with number 2 and 2+ are in the same group, and when solving the schedule, they are treated as one node, Number 2. First, we can see that the residual energies of all nodes are more than E min , which indicates that the network works perpetually. However, at the same time, the group nodes' residual energies are all reaching E max , which are marked with a red color in Table 2 and Figure 4. This indicates that they are overcharged. The reason for this is simple, as introduced in Section 3.3, we know that p G = max(p i ∈ G). With the same charging time, the nodes with low consumption would inevitably obtain more energy than needed, thus resulting in the overcharging phenomenon. If we set p G = min(p i ∈ G) the overcharge will disappear but group nodes with high consumption will "die" as they are not supplemented with enough energy within the same charging time. The overcharge and "dead" phenomenon will appear simultaneously when we are setting p G = average(p i ∈ G) because the energy radiating from MC won't be intelligently distributed to nodes on their demands. In our next paper, we will figure out this problem with beamforming technology. Although some nodes are overcharged, the purpose of perpetual functioning of the network is realized.

Influence of Parameters
The charging period T must satisfy Theorem 2. Otherwise, the Problem (11) is unsolvable. Even when solvable, after a few charging cycles some nodes also go "dead". The value of T should be based upon actual need in a real application. A smaller T means high frequency charging behavior, and vice versa. T c /T represents the rate of effective charging time, and its varying trend with T is shown in Figure 5. In Figure 5, we set the range of T from 5000 s to 30,000 s. It shows that T c /T initially rises and then descends with increasing T. The segment point is T = 15,000 and at that point, the whole charging system possesses the highest system efficiency. When the T is very large, the MC will rest longer at the service station. based upon actual need in a real application. A smaller T means high frequency charging behavior, and vice versa. Tc/T represents the rate of effective charging time, and its varying trend with T is shown in Figure 5. In Figure 5, we set the range of T from 5000 s to 30,000 s. It shows that Tc/T initially rises and then descends with increasing T. The segment point is T = 15,000 and at that point, the whole charging system possesses the highest system efficiency. When the T is very large, the MC will rest longer at the service station. According to our configuration and Theorem 4, the value of v should satisfy v ≥ 1.48 m/s. When v is set below 1.48 m/s, for example v = 1 m/s, the Problem (11) can still be solved. However, 189 days later, the lifetime of the subnetwork will end. That is to say, the CFCS is invalid. The lifetime of the subnetwork as a function of v is shown in Figure 6, from which we see that the lifetime of the subnetwork is clearly monotone, increasing with v before the boundary point v = 1.48. According to our configuration and Theorem 4, the value of v should satisfy v ≥ 1.48 m/s. When v is set below 1.48 m/s, for example v = 1 m/s, the Problem (11) can still be solved. However, 189 days later, the lifetime of the subnetwork will end. That is to say, the CFCS is invalid. The lifetime of the subnetwork as a function of v is shown in Figure 6, from which we see that the lifetime of the subnetwork is clearly monotone, increasing with v before the boundary point v = 1.48. In order to satisfy CFCS, the nodes number of the subnetwork n should be no more than / U p according to Theorem 1. Indeed, when n is larger than / U p , the Problem (11) may still be solved.
However, after many charging cycles, some nodes will die when the residual energy is below Emin. For example, we use the simulation configuration in Section 4.2, but expand n to 40. After 391 charging cycles, (391 charging cycles mean 391 × T/3600/24 = 45.25 days), the residual energies of all nodes are shown in Figure 7. At the next T, the first node will stop working as its residual energy is below Emin. Therefore, the lifetime of this network comes to an end. From Figure 7, we can see that the residual energy of group nodes is still high, especially the nodes with lower consumption.
Without supplementing the energy, the network can only work for Emax/0.025/3600/24 = 5 days. That is to say, the lifetime of the sensor network has been prolonged a further 40 days (800%), although the charging schedule does not maintain the functioning of the network perpetually. For short-term applications, the constraint of Theorem 1 could be relaxed. In addition, we can replenish the energy of all nodes to Emax again before the 45th day, which can also ensure the network functions perpetually. In some cases, this mechanism can reduce the numbers of subnetworks when partitioning the whole network, thus cutting the charging cost. In order to satisfy CFCS, the nodes number of the subnetwork n should be no more than U/p according to Theorem 1. Indeed, when n is larger than U/p, the Problem (11) may still be solved. However, after many charging cycles, some nodes will die when the residual energy is below E min . For example, we use the simulation configuration in Section 4.2, but expand n to 40. After 391 charging cycles, (391 charging cycles mean 391 × T/3600/24 = 45.25 days), the residual energies of all nodes are shown in Figure 7. At the next T, the first node will stop working as its residual energy is below E min . Therefore, the lifetime of this network comes to an end. From Figure 7, we can see that the residual energy of group nodes is still high, especially the nodes with lower consumption.
Without supplementing the energy, the network can only work for E max /0.025/3600/24 = 5 days. That is to say, the lifetime of the sensor network has been prolonged a further 40 days (800%), although the charging schedule does not maintain the functioning of the network perpetually. For short-term applications, the constraint of Theorem 1 could be relaxed. In addition, we can replenish the energy of all nodes to E max again before the 45th day, which can also ensure the network functions perpetually. In some cases, this mechanism can reduce the numbers of subnetworks when partitioning the whole network, thus cutting the charging cost.
That is to say, the lifetime of the sensor network has been prolonged a further 40 days (800%), although the charging schedule does not maintain the functioning of the network perpetually. For short-term applications, the constraint of Theorem 1 could be relaxed. In addition, we can replenish the energy of all nodes to Emax again before the 45th day, which can also ensure the network functions perpetually. In some cases, this mechanism can reduce the numbers of subnetworks when partitioning the whole network, thus cutting the charging cost. The duration of lifetime is an important performance metric for different algorithms. Here we compare CFNGS with the mechanisms: Charging on demand and charging fully. Charging on demand means the node will not be charged unless it sends a charging request to the MC, at which point, its residual energy is close to Emin. The charging fully mechanism means the MC charges every node to its maximum energy capacity, Emax.
The lifetime of the network, supplemented by different algorithms, as a function of n is shown in Figure 8. The green square markers indicate the maximum nodes numbers that different algorithms can support to ensure CFCS. For example, when n ≤ 39, our CFNGS algorithm could The duration of lifetime is an important performance metric for different algorithms. Here we compare CFNGS with the mechanisms: Charging on demand and charging fully. Charging on demand means the node will not be charged unless it sends a charging request to the MC, at which point, its residual energy is close to E min . The charging fully mechanism means the MC charges every node to its maximum energy capacity, E max .
The lifetime of the network, supplemented by different algorithms, as a function of n is shown in Figure 8. The green square markers indicate the maximum nodes numbers that different algorithms can support to ensure CFCS. For example, when n ≤ 39, our CFNGS algorithm could ensure that the subnetwork functions perpetually. However, the maximum nodes numbers for the charging on-demand mechanism is n ≤ 24, and for the charging fully mechanism is n ≤ 26. It clearly shows that our CFNGS algorithm can support more nodes in a subnetwork than the other two algorithms. Even with the same n, for example n = 50, CFNGS outperforms others.
The reasons for this are: Under the charging on-demand mechanism, if a many of nodes (whose residual energy is close to E min ) send charging requests at the same time, some nodes will "die" before the MC goes to charges them. This mechanism is suitable for environments where the charging requirement is less urgent.
When using the charging fully mechanism, it would cost more time to charge every node to E max . The situation is the same as the charging on-demand mechanism. When lots of nodes need to be charged, the later nodes in the charging queue may "die".
Our CFCS mechanism hardly let the nodes' residual energy approach E min , and does not charge the nodes' energy to E max . As a result, this mechanism can support more nodes and keep the WRSNs working longer. ensure that the subnetwork functions perpetually. However, the maximum nodes numbers for the charging on-demand mechanism is n ≤ 24, and for the charging fully mechanism is n ≤ 26. It clearly shows that our CFNGS algorithm can support more nodes in a subnetwork than the other two algorithms. Even with the same n, for example n = 50, CFNGS outperforms others. The reasons for this are: Under the charging on-demand mechanism, if a many of nodes (whose residual energy is close to Emin) send charging requests at the same time, some nodes will "die" before the MC goes to charges them. This mechanism is suitable for environments where the charging requirement is less urgent.
When using the charging fully mechanism, it would cost more time to charge every node to Emax. The situation is the same as the charging on-demand mechanism. When lots of nodes need to be charged, the later nodes in the charging queue may "die".
Our CFCS mechanism hardly let the nodes' residual energy approach Emin, and does not charge the nodes' energy to Emax. As a result, this mechanism can support more nodes and keep the WRSNs working longer. For the velocity of the MC, it just needs 500 s to travel through the tunnel (L = 2500 m, v = 5 m/s). Upon comparing this with the charging period T, it can be ignored.
For the capacity of the MC, EMC, it must follow the constraint of Theorem 3. If the EMC is large enough to support one more subnetwork, the numbers of the service stations can be reduced accordingly. For the velocity of the MC, it just needs 500 s to travel through the tunnel (L = 2500 m, v = 5 m/s). Upon comparing this with the charging period T, it can be ignored.
For the capacity of the MC, E MC , it must follow the constraint of Theorem 3. If the E MC is large enough to support one more subnetwork, the numbers of the service stations can be reduced accordingly.

Conclusions and Future Work
In this paper, we studied the problem of maintaining a network lifetime perpetually in a tunnel scenario, where several Mobile Chargers (MCs) travel through the tunnel track and charge the sensor nodes in a WRSN. We formulated the main problem as a charging time distribution problem subject to some charging constraints in tunnels. A complete feasible and Nodes-Grouped scheduling algorithm was put forward for this problem and the boundary conditions of CFCS were derived theoretically. We conducted extensive simulations to evaluate the performance of the proposed algorithms. The results demonstrate the correct CFCS boundary conditions and that our proposed CFCS can keep the WRSN functioning perpetually. Furthermore, our Nodes-Grouped mechanism can support more nodes in WRSN compared to some baseline methods. In the future, we will study the beamforming technology to solve the overcharge problem generated by the Nodes-Grouped mechanism.