Adaptive Energy Balanced Routing Strategy for Wireless Rechargeable Sensor Networks

: The network lifetime of wireless rechargeable sensor network (WRSN) is commonly extended through routing strategy or wireless charging technology. In this paper, we propose an optimization algorithm from the aspects of both charging and routing process. To balance the network energy in charging part, node’s charging efficiency is balanced by dynamically planning charging point positions and the charging time is allocated according to the energy consumption rate of nodes. Moreover, the routing method is adapted to the node’s charging efficiency. The adaptive routing strategy assigns more forwarding tasks to nodes that can get more energy during the charging phase, and makes the data packets transmit farther away, thus reducing the average hops and energy consumption of the network. Finally, the simulation results reveal that the proposed algorithm has certain advantages in prolonging the network lifetime, reducing the average hop counts and balancing the energy of each node.


Introduction
With the wide applications of sensor networks, the demand for long-term operation of the networks in various occasions is increasing, which makes the lifetime of wireless sensor networks become an increasingly important research point. A great part of the recent literature [1][2][3][4][5] has focused on this problem from different aspects, such as charging process, efficient routing, dynamic user association, etc. Among them, routing and charging technology are two common ways. Routing energy-saving algorithms [6][7][8][9] are used to reduce nodes' energy consumption by all means. However, the method cannot fundamentally solve the energy constraint problems; that the capacity of sensor battery is always small and needs to be replaced frequently for long-term operation. It is costly to replace battery for nodes in time when they deplete energy, especially for nodes in remote areas. The wireless energy transmission technology, allowing fixed or mobile energy supplier to transfer energy to nodes wirelessly, becomes a significant solution to charge nodes timely. Its high replenishment efficiency and strong controllability guarantee broad application prospects.
In wireless sensor network (WSN), the sensor nodes send packets to the sink node in the form of multi-hop. However, unreasonable routing strategy can easily lead to energy waste or uneven energy consumption, thus shortening the network lifetime. Before the emergence of charging technology, research mainly focused on optimizing routing strategies to reduce network energy consumption and balance network energy [10][11][12][13][14]. Among them, the minimum path algorithm [10] tends to minimize the total energy consumption of network. Distributed energy balanced routing (DEBR) [11], one of the nodes select the next hop node according to their location and charging efficiency. The location of charging points is the same each charging cycle, which leads that nodes' charging efficiency not change. The next hop node of each node is fixed during the data transmission process, and some nodes that remain in a high energy consumption state will die faster.
Based on the above analysis, we propose an energy balanced routing strategy that is adaptive to the charging method in multi-node charging mode. Firstly, the charging efficiency of the node is adjusted by changing the position of the charging points in different cycles, so as to improve the overall replenishment effect. Moreover, the WCV charges for nearby nodes according to their energy consumption rate to ensure the energy balance of network as far as possible. Meanwhile, the node makes different routing choices according to its own charging characteristics to make compromise between single node energy consumption and the whole energy consumption, with the goal to not only reduce the overall network energy consumption but also optimize the average hops.
In Section 2, the system model is formulated in advance. The charging strategy is proposed in Section 3. The routing algorithm adaptive to charging process is presented in Section 4. Implementation guidelines and complexity analysis are discussed in Section 5. Simulation and comparison results are followed in Section 6. Finally, Section 7 highlights the conclusion.

System Model
As shown in Figure 1, we consider a network with sink node, a WCV and n nodes that are labeled as N = {1, 2, . . . , n}. Nodes are randomly deployed within a circular area of diameter L, and are responsible for sensing and transmitting data to the sink node. The WCV sends wireless signals to nodes through energy transmitting module, and nodes' energy receiving module transforms them into energy. The whole sensing region is divided into different concentric static rings around the sink node. Here, the circumferences with different diameters represent charging paths, and the WCV will stop at the charging points on these paths to charge the nodes in its charging radius of R C . Moreover, the radius of circumference closest to the sink node is d, and each radius of other circumferences increases by d. For the convenience of expression, we marked the charging path of d × v away from sink node as r v .
Appl. Sci. 2019, 9, x FOR PEER REVIEW 3 of 15 select the next hop node according to their location and charging efficiency. The location of charging points is the same each charging cycle, which leads that nodes' charging efficiency not change. The next hop node of each node is fixed during the data transmission process, and some nodes that remain in a high energy consumption state will die faster. Based on the above analysis, we propose an energy balanced routing strategy that is adaptive to the charging method in multi-node charging mode. Firstly, the charging efficiency of the node is adjusted by changing the position of the charging points in different cycles, so as to improve the overall replenishment effect. Moreover, the WCV charges for nearby nodes according to their energy consumption rate to ensure the energy balance of network as far as possible. Meanwhile, the node makes different routing choices according to its own charging characteristics to make compromise between single node energy consumption and the whole energy consumption, with the goal to not only reduce the overall network energy consumption but also optimize the average hops.
In Section 2, the system model is formulated in advance. The charging strategy is proposed in Section 3. The routing algorithm adaptive to charging process is presented in Section 4. Implementation guidelines and complexity analysis are discussed in Section 5. Simulation and comparison results are followed in Section 6. Finally, Section 7 highlights the conclusion.

System Model
As shown in Figure 1, we consider a network with sink node, a WCV and n nodes that are labeled as {1, 2,..., } N n = . Nodes are randomly deployed within a circular area of diameter L, and are responsible for sensing and transmitting data to the sink node. The WCV sends wireless signals to nodes through energy transmitting module, and nodes' energy receiving module transforms them into energy. The whole sensing region is divided into different concentric static rings around the sink node. Here, the circumferences with different diameters represent charging paths, and the WCV will stop at the charging points on these paths to charge the nodes in its charging radius of C R . Moreover, the radius of circumference closest to the sink node is d, and each radius of other circumferences increases by d. For the convenience of expression, we marked the charging path of d v × away from sink node as v r .  To ensure that nodes at any location can be charged, the charging points are evenly distributed on the charging path, and the set of charging points S v is represented as: where |S v | is the number of charging points on the r v , and it meets |S v |= l × v, l ≥ 4 , in which l denotes the difference in the number of charging points between adjacent two paths, and its value also shows the number of charging points on r 1 . When l becomes larger, charging points on the paths will be denser, and the WCV will stay at each charging point for a shorter time when the charging period is fixed. In addition, p v u stands for the u-th charging points on r v . When WCV stays at charging point p v u , it can energize a plurality of sensor nodes within R C . According to Friis propagation model [18,19], the charging efficiency of node I can be calculated by Equation (2): The equation often serves as a basic model for different applications. In WRSN, WCV transmits RF signals through circularly polarized antennas, which have transmit gain G s = 8dBi. Nodes receive the signal via linearly polarized dipole antennas, which have receive gain G r = 2dBi. λ is the wavelength. L p is polarization loss, η can be referred as rectifier efficiency and β is a parameter to adjust the Friis' free space equation for short distance transmission. Moreover, P t is transmitting power and d p v u ,i is the distance between node i and the WCV. When d p v u ,i ≤ R C , the equation is reformulated as [19], where ∂ = 4.32 × 10 −4 , β = 0.2316. According to the charging method described above, it is obvious that the nodes may be charged multiple times in a charging cycle due to the overlapping of the charging areas of different charging points, and the energy of the sensor node after charging is: where E i is the residual energy of node i before charging, t v is the charging time that WCV stays at each charging point on r v , that is, Pr p v u ,i × t v represents the energy that node i receives from the WCV at the u-th charging point on r v . E max is the maximum storage energy threshold of nodes.
In WRSN, node i generates sensing data and then transmits these data to the nodes in its forward region NF(i) [15]-nodes which are closer to sink node than node i and also are in node i's transmitting area. Furthermore, energy consumption occurs when nodes transmit and receive data packets. According to energy loss model [30], the receiving energy consumption is much less than the transmitting energy consumption, thus, it is ignored here.
To ensure the long-term stable operation of the network, it is necessary to optimize both charging and routing process to maximize the network lifetime, that is: Here, min i∈N (Ê i j∈NF(i) C ij f ij ) means the survival time of the first death node in the network, which is generally called network lifetime [31][32][33][34]. The C ij denotes the energy consumption per transmitting data rate from node i to j, and f ij represents the transmission data rate from node i to node j. [35] From this equation, it can be concluded that providing more energy or reducing the energy loss is conducive to prolonging the network lifetime. Since the nodes are randomly deployed in the network, it is necessary to set a reasonable location planning of charging points, in which WCV can supply energy for nodes at any position. The energy consumption state of nodes at different positions differs; thus, it is absolutely essential to allocate the charging time at each charging point reasonably to provide enough energy for nodes. When WCV stays at certain charging point, the power received by the surrounding nodes are different, thus the energy obtained by nodes are also different. The nodes with low charging efficiency may not obtain enough energy to maintain its energy consumption, then their energy gradually decline faster. Therefore, adjusting the node charging efficiency and balancing the node energy can avoid some nodes' energy far less than the average level and lessening the network lifetime. As mentioned above, the charging efficiency, charging time and the energy after charging are different between nodes. If the routing algorithm only considers the current node energy and ignores the other charging characteristics, for some nodes with high residual energy and low charging efficiency, they will be selected as relay nodes with great probability and need to be recharged for a longer period of time to replenish the lost energy, which is unfavorable for the improvement of the overall network energy efficiency. Thus, it is important that selection of the next hop should consider the difference of charging characteristics of nodes.

Charging Strategy
In WRSN, the sensor nodes send packets to the sink node hop-by-hop, and some nodes undertake more data transmission tasks and thus consume energy faster. In case of the early death of such nodes, we allocate charging time at different charging points on the basis of the average energy consumption of nearby nodes, and dynamically plan the location of the charging points to reduce the difference of the charging efficiency of nodes, so that those nodes that consume more energy can obtain more energy in the charging stage. Through this way, we achieve the purpose of balancing the network energy and prolonging the node survival time.
According to Equation (3), the energy that nodes obtain in charging period is positively correlation with charging efficiency and charging time. For the nodes farther away from the charging points, their charging efficiency is lower, so those nodes tend to acquire less energy during the charging cycle. Moreover, the high energy consumption nodes with insufficient charging energy may stay in the low energy state, and then die earlier. Meanwhile, the nodes near the charging points have a high charging efficiency, and they often obtain more energy than average level in each charging cycle, which can easily lead to charging saturation. In order to change the imbalance of charging energy caused by the difference of charging efficiency, the positions of the charging points are changed at the end of each charging cycle, so that the charging efficiency of each node changes in different charging cycles. After several charging cycles, the energy obtained by nodes with the same distance from the charging path will be more balanced, and the charging effect can be improved.
The sum of charging time at each charging points is fixed, which is recorded as the charge cycle T c . After each charge cycle, the angle formed by a new position of charging point to sink node and the last position of charging point to sink node is θ v . Here, it should be noted that the charging points turn back to original position after every nc cycles later. For example, when nc = 2, the position before and after turning is shown in Figure 2. And θ v can be expressed as: Hence, the charging point p u v on r v will rotate to different positions in different charging cycles, and the energy consumptions of the surrounding sensor nodes will be different. Furthermore, we set the charging time of each charging point on the same path r v to be the same, which is recorded as t v . It satisfies: After that, in order to recharge more energy for those nodes with higher energy consumption in the network, the charging time of them should be extended appropriately. Since the charging time on the same charging path is the same, if the average energy consumption rate of the nodes within the charging range of the charging point on r v is faster, the charging time t v should be higher correspondingly. The average energy consumption of all nodes charged by WCV on r v is recorded as: where E 0 is the initial energy of sensor node, E i is the residual energy of node i, M v is the node set charged by the WCV on r v and |M v | is the total number of elements in the set M v .
To ensure that the charging time t v is positively correlated with the average energy consumption of the sensor nodes, the charging time of the charging points on each path satisfies: After that, in order to recharge more energy for those nodes with higher energy consumption in the network, the charging time of them should be extended appropriately. Since the charging time on the same charging path is the same, if the average energy consumption rate of the nodes within the charging range of the charging point on v r is faster, the charging time v t should be higher correspondingly. The average energy consumption of all nodes charged by WCV on v r is recorded as: where 0 E is the initial energy of sensor node, i E is the residual energy of node i, v M is the node set charged by the WCV on v r and v M is the total number of elements in the set v M .
To ensure that the charging time v t is positively correlated with the average energy consumption of the sensor nodes, the charging time of the charging points on each path satisfies:

Routing Strategy
In WRSN, nodes transmit information to sink nodes in the form of multi-hop, during which the WCV provides energy for them. The charging process will change the energy state of nodes, which greatly influences their next hop selection. When the source node i selects the node close to it as the next hop, it is beneficial to avoid the node i consuming too fast. However, the choice may cause a long transmission chain from the source node to sink node, increasing the total energy consumption on the chain. Similarly, if the node i selects the node closer to the sink node, its own energy consumption will increase, but other network performance indicators may be optimized, such as reducing the hop count and total energy consumption. Meanwhile, as shown by Equation (8), nodes that consume energy quickly tend to obtain more charging time. For nodes with high charging efficiency, more charging time means more charging energy; thus, appropriately increasing the energy consumption speed of those nodes is beneficial to utilize the charging energy effectively. Additionally, for nodes with low charging efficiency, the energy they obtained in charging part may not be able to compensate for their energy loss in the routing process. For a long run of high consumption in routing, they will gradually decline residual energy until death. Therefore, the routing strategy needs to be adjusted according to the impact of the charging process. Different routes should be selected based on nodes' residual energy and charging characteristic. For nodes with high charging efficiency, the energy consumption rate can be increased appropriately to improve the network performance. For nodes with low residual energy and low charging efficiency, the energy consumption should be reduced to prolong their lifetime. Based on this, this section proposes a

Routing Strategy
In WRSN, nodes transmit information to sink nodes in the form of multi-hop, during which the WCV provides energy for them. The charging process will change the energy state of nodes, which greatly influences their next hop selection. When the source node i selects the node close to it as the next hop, it is beneficial to avoid the node i consuming too fast. However, the choice may cause a long transmission chain from the source node to sink node, increasing the total energy consumption on the chain. Similarly, if the node i selects the node closer to the sink node, its own energy consumption will increase, but other network performance indicators may be optimized, such as reducing the hop count and total energy consumption. Meanwhile, as shown by Equation (8), nodes that consume energy quickly tend to obtain more charging time. For nodes with high charging efficiency, more charging time means more charging energy; thus, appropriately increasing the energy consumption speed of those nodes is beneficial to utilize the charging energy effectively. Additionally, for nodes with low charging efficiency, the energy they obtained in charging part may not be able to compensate for their energy loss in the routing process. For a long run of high consumption in routing, they will gradually decline residual energy until death. Therefore, the routing strategy needs to be adjusted according to the impact of the charging process. Different routes should be selected based on nodes' residual energy and charging characteristic. For nodes with high charging efficiency, the energy consumption rate can be increased appropriately to improve the network performance. For nodes with low residual energy and low charging efficiency, the energy consumption should be reduced to prolong their lifetime. Based on this, this section proposes a routing strategy adaptive to the node charging characteristics, which takes the energy of node i, j and the relevant charging characteristics as the deciding factors of the routing cost U(i, j). In this strategy, U(i, j) can be calculated as: whereÊ i ,Ê j are the energy of node i, j after being charged, C ij is the energy consumption of node i sending unit data packet to node j, and C js is the forward energy consumption of node j.
Considering from the perspective of node i, C ij is smaller when node j closer to node i is selected, which is beneficial to extend the life of node i. However, the forward energy consumption will be larger for node j. From the point of view of the next hop node j, when node j is closer to sink node, the forward energy consumption will be smaller. It is conducive to prolong the lifetime of node j. However, the long transmission distance from node i to node j will increase the energy consumption of node i. Therefore, the selection of the next hop node needs to adjust the two parts to achieve a balance, reducing the total energy consumption and optimizing the network performance indicators. In WRSN, the node energy is obtained by the joint influence of node energy consumption stage and charging stage. From the previous analysis, the charging energy obtained by nodes with the same distance to the charging path can be adjusted to a basic balance by charging strategy; however, the charging efficiency of the nodes closer to the charging path is still higher than that of the nodes away from the charging path, so that more energy can be obtained by those nodes in the same charging time. For convenience of description, α i is used to characterize how much energy node i gets in a certain charging time. For the node i between charging path r v and charging path r v+1 , α i is: among them, vd ≤ d is ≤ (v + 1)d, d is is the distance from node i to sink node. Equation (10) shows that the closer node i is to the charging path, the smaller α i is, then the more energy can be obtained by node i in the same charging time. For node i with a small value α i , high energy consumption can get node i more energy in the charging cycle to slow down its energy consumption speed; thus, increasing C ij properly will not have a great impact on the lifetime of node i. On the contrary, for node i with a large value α i , the energy obtained through charging stage may not be able to make up for high consumption, which may lead to node's death, thus energy consumption should be reduced as far as possible. Therefore, adjusting the next hop selection through α i can effectively improve the overall performance of the network and prolong the network lifetime. When 0 ≤ α i < 0.5, the energy consumption of node i in the routing phase can be increased appropriately, i.e., the C ij /Ê i increases. In this case, when node i chooses the node j closer to sink node, the overall energy consumption and the number of network hops can be reduced. When 0.5 ≤ α i < 1, choosing a closer node j can extend the network lifetime effectively. Equation (9) shows that when α i is small, α i C ij /Ê i can be adjusted to be small, and the part that affects the U(i, j) value is mainly (1 − α i )C js /Ê j . The node i selecting node j closer to sink node is advantageous for lowering energy consumption of the node j and vice versa. In summary, node i will preferably select the node with smaller U(i, j) as the next hop in NF(i): In routing, node i selects node whose C ij and C js are small to be the next hop, ensuring that the total distance of the route approaches the linear distance from node i to sink node, thereby reducing the route consumption. In addition, the algorithm can adaptively select the next hop node according to the characteristics of different nodes. On the one hand, selecting the node j closer to the sink node for the node i with higher residual energy and better charging character in the charging phase can reduce the overall network average hop count and enhance energy utilization. For nodes with low energy, reducing their transmission distance helps to extend network lifetime. On the other hand, appropriately increasing the energy consumption speed of nodes with better charging character is beneficial to guiding the charging phase to allocate more charging time, thereby improving the replenishing effect of the charging phase.

Implementation Guidelines and Complexity Analysis
Here, we give simple implementation guidelines of our algorithm. As a data aggregation and processing center, sink node has sufficient energy and computing capacity. To lessen the burden of WCV and nodes, some tasks with high computing demands (such as charging plan formulation) can be processed in a centralized computing infrastructure by sink node. As for the routing selection, it is easy for each node to locally execute this process.
In the system, nodes send data packets containing the sensing data and their energy information to sink node, then sink node calculates the positions of charging points and all the M v , nodes set charged by WCV on r v . In the worst case, the positions of charging points can be calculated according to d and l in l × (L/2d) 2 steps. Moreover, considering that there will always be only nc different kinds of charging points distribution, the total complexity of the calculation of charging positions is O(1).
To determine the M v and calculate the average consumption aveE v , there will be totally (L/2d)n steps, so the time complexity is O(n).
Then, the sink node sends the charging scheduling to WCV for the charging cycle. Considering the worst case where each node can be charged by (L/d) charging points, theÊ i can be gained after (L/d) times computation. In this case, the complexity to calculateÊ i for n nodes is O(n).
In the routing part, node i chooses the next hop from the forward neighbor nodes set NF(i). In the worst case, the number of nodes in NF(i) is n − 1. Then, node i chooses j( j ∈ NF(i)) with the minimum value U(i, j) as its next hop node. For all sensor nodes in the network, the operation needs to be repeated n times, so that the time complexity is O(n 2 ).
As a result, we conclude that the worst computing time complexity of the whole algorithm is O(n 2 ).

Simulation and Evaluation
In order to verify the effectiveness of the algorithm, we used MATLAB to analyze the performance of the algorithm through the average values of fifty simulation results. The parameter settings are shown in Table 1. The impacts of network size n and charging duration T c on network lifetime, network balance and average hop count were analyzed, and two other algorithms were compared. Network balance can be seen as the variance of residual energy of nodes when the first node die, which evaluates the charging performance in energy balancing. Average hop count means the hop that each node takes to transmit packets to sink node, and it can signify the efficiency of routing part.

The Impact of Charging Duration on Network Performances
In order to analyze the impact of the charging duration on the network performance, the network size was set to 200, the charging cycle was changed from 0 to 20 with step size of 2 and the number of charging points on r v was 4v, 5v, 6v, 7v, 8v. Figure 3a,b and c are the graphs of network time, network balance and average hops under different charging cycle T c , respectively.
When the charging cycle is longer, nodes can get more energy, which makes their energy closer to the average level. Furthermore, with the energy of the nodes sufficient, the hop distance can be longer and the average hop can be less; thus, the network lifetime is longer. At the same time, with the increase of the number of charging points, those performance indicators gradually become better then weaken after the number of charging points increases to a certain value. When the number of charging points increases from 4v to 6v, the WCV charges nodes more frequently, and the average distance between the charging points and nodes becomes closer. Therefore, average charging efficiency gets improved and nodes gain more energy during the charging stage; thereby, nodes survive longer. While the number of charging points increases from 6v to 8v, increasing the number of charging points can hardly make sensor nodes be charged more times. Besides, as the charging cycle is fixed, the average charging time allocated to each charging point decrease rapidly since the number of points per charging route increases greatly. Nodes obtain less energy and die quicker.
Similarly, in Figure 3b, when the number of charging points increases from 4v to 6v, nodes that consume more energy get more supplement and their residual energy is closer to the average energy level of the network. Thus, the balance is better. From the formula of charging time allocation, the charging time associates with the energy consumption of nodes and the number of charging points per charging paths obtained. When the number of charging points continues to increase, the number of points in the outer paths increases faster than that in the inner paths. The charging time allocated to the nodes with more energy consumption in the inner rings decreases greatly. Thus, the residual energy of the nodes with higher energy consumption is at a lower level and nodes with less energy consumption at a higher level; thus, the network balance decreases.
In Figure 3c, in the process of increasing the number of charging points from 4v to 6v, the routing formula shows that nodes closer to the paths are more likely to be the transfer nodes. And they are more likely to get more energy in charging stage, so their hop distance is farther, which can effectively reduce the average hop of the network. Similarly, in the process of increasing the number of charging points from 6v to 8v, the high energy-consuming nodes obtain relatively less energy, and the average hop count is reduced.

The Impact of Network Size on Network Performances
In Figure 4, 10 Tc = , nodes number varies from 200 to 1000, and the number of charging points on v r is 4v, 5v, 6v, 7v, 8v. As nodes number increases, the network lifetime comes to a maximum value decreases. The increase of nodes number means more routing load, more energy during charging part and more nodes with high charging efficiency. Before nodes number increase to a certain value, such as 400 for v =6 r v, routing load is not that heavy, and node distribution is more uniform, which makes network more balanced. More nodes with high charging efficiency help to lower the average hop number for choosing nodes closer to sink node. However, nodes number continues to increase after the certain value, the heavy routing tasks makes nodes consume energy quickly. Nodes with low charging efficiency, which consume more, will increase hop number and reduce the whole charging efficiency and network balance. Figure 4a shows that the certain number gets larger when v r changes from 4v to 8v. This is due to that the number of nodes needed for uniform distribution around charging points to obtain more nodes with high charging efficiency is larger.

The Impact of Network Size on Network Performances
In Figure 4, Tc = 10, nodes number varies from 200 to 1000, and the number of charging points on r v is 4v, 5v, 6v, 7v, 8v. As nodes number increases, the network lifetime comes to a maximum value decreases. The increase of nodes number means more routing load, more energy during charging part and more nodes with high charging efficiency. Before nodes number increase to a certain value, such as 400 for r v = 6v, routing load is not that heavy, and node distribution is more uniform, which makes network more balanced. More nodes with high charging efficiency help to lower the average hop number for choosing nodes closer to sink node. However, nodes number continues to increase after the certain value, the heavy routing tasks makes nodes consume energy quickly. Nodes with low charging efficiency, which consume more, will increase hop number and reduce the whole charging efficiency and network balance. Figure 4a shows that the certain number gets larger when r v changes from 4v to 8v. This is due to that the number of nodes needed for uniform distribution around charging points to obtain more nodes with high charging efficiency is larger.

Comparison with Two Other Strategies
In order to verify the effectiveness of the proposed algorithm, our charging strategy combined with routing algorithm [11] is used as the comparison algorithm 1 (hereinafter referred to as the DCA algorithm), and the charging strategy [29] combined with routing algorithm [11] is used as the comparison algorithm 2 (hereinafter referred to as the GCA algorithm). The routing strategy DEBR [11] chooses the next hop node according to the location and energy of the node, and achieves a balance between reducing the total energy consumption of the network and reducing the energy consumption of a single node; however, it ignores the impact of charging stage on the routing selection. Therefore, the DCA algorithm is compared with our algorithm to verify the performance of the routing part of the algorithm. The GCA algorithm uses the charging strategy of literature [29] to recharge nodes, so as to balance the energy of the nodes. The route algorithm of [29] only considers the location of nodes to select the next hop node, which ignores the influence of node energy on routing strategy. Thus, the routing path of each node is fixed in each round, which leads to the persistent energy consumption of nodes with high energy consumption and greatly reduces the network lifetime. Moreover, its average hop count is high, and simulation results of algorithm in reference [29] are not conducive to highlighting the performance characteristics of each algorithm. Therefore, the GCA algorithm also uses the DEBR strategy to select the next hop for the nodes, which minimizes the overall energy consumption of the network while taking full account of the differences of node energy. The GCA algorithm and DCA algorithm are compared to verify the performance of our charging strategy. When the network size and charging cycle change, the network lifetime, network balance and average hops are observed and compared. The simulation results are shown in Figures 5 and 6.

Comparison with Two Other Strategies
In order to verify the effectiveness of the proposed algorithm, our charging strategy combined with routing algorithm [11] is used as the comparison algorithm 1 (hereinafter referred to as the DCA algorithm), and the charging strategy [29] combined with routing algorithm [11] is used as the comparison algorithm 2 (hereinafter referred to as the GCA algorithm). The routing strategy DEBR [11] chooses the next hop node according to the location and energy of the node, and achieves a balance between reducing the total energy consumption of the network and reducing the energy consumption of a single node; however, it ignores the impact of charging stage on the routing selection. Therefore, the DCA algorithm is compared with our algorithm to verify the performance of the routing part of the algorithm. The GCA algorithm uses the charging strategy of literature [29] to recharge nodes, so as to balance the energy of the nodes. The route algorithm of [29] only considers the location of nodes to select the next hop node, which ignores the influence of node energy on routing strategy. Thus, the routing path of each node is fixed in each round, which leads to the persistent energy consumption of nodes with high energy consumption and greatly reduces the network lifetime. Moreover, its average hop count is high, and simulation results of algorithm in reference [29] are not conducive to highlighting the performance characteristics of each algorithm. Therefore, the GCA algorithm also uses the DEBR strategy to select the next hop for the nodes, which minimizes the overall energy consumption of the network while taking full account of the differences of node energy. The GCA algorithm and DCA algorithm are compared to verify the performance of our charging strategy. When the network size and charging cycle change, the network lifetime, network balance and average hops are observed and compared. The simulation results are shown in Figures 5 and 6.
In Figure 5, we set Tc = 10, and the network size varies from 200 to 1000 nodes. As shown in Figure 5a, our algorithm shows significant improvements in prolonging network lifetime by an average of 25% compared to DCA and 30% compared to GCA. On the one hand, our routing strategy takes nodes' charging characteristics into consideration, and it makes good use of nodes with high charging efficiency to reduce the routing hop number. It is reasonable that in WRSN our routing performs better than DEBR in reducing the average hop number, which can be seen from the Figure 5c. On the other hand, the charging strategy changes the location of the charging point to improve overall charging efficiency, which makes it perform the best in network balance.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 15 In Figure 5, we set 10 Tc = , and the network size varies from 200 to 1000 nodes. As shown in Figure 5a, our algorithm shows significant improvements in prolonging network lifetime by an average of 25% compared to DCA and 30% compared to GCA. On the one hand, our routing strategy takes nodes' charging characteristics into consideration, and it makes good use of nodes with high charging efficiency to reduce the routing hop number. It is reasonable that in WRSN our routing performs better than DEBR in reducing the average hop number, which can be seen from the Figure  5c. On the other hand, the charging strategy changes the location of the charging point to improve overall charging efficiency, which makes it perform the best in network balance. In Figure 6, we set network size to be 200 nodes. And the charging cycle is changed from 0 to 20 with step size of 2. As the charging cycle prolongs, the advantage of our algorithm gradually emerges. When 20 Tc = , the network lifetime of our algorithm is almost two to three times that of the other two strategies. Compared to DEBR, our routing algorithm pays more attention to reducing energy consumption and hops by making high-charging efficiency nodes undertake more forwarding tasks. This brings problems when the charging cycle is small, as it is unable to allocate more time for those nodes. Furthermore, their low energy state will influence the network balance. Thus, when = 1 ∼ 6, our network balance is a little worse. When Tc becomes larger, our charging strategy can promote the routing effect, and in turn the network balance is better. When 0 Tc = , the performance index is the same in DCA and GCA for the DEBR. Moreover, Figure 6c reflects our routing performance is a little better. When Tc becomes larger, the DCA performs better than GCA, reflecting the efficiency of changing charging points periodically. Additionally, the network lifetime in our algorithm increases rapidly, indicating that the adaptive routing algorithm is suitable for the charging strategy to promote the overall performance. In Figure 6, we set network size to be 200 nodes. And the charging cycle is changed from 0 to 20 with step size of 2. As the charging cycle prolongs, the advantage of our algorithm gradually emerges. When Tc = 20, the network lifetime of our algorithm is almost two to three times that of the other two strategies. Compared to DEBR, our routing algorithm pays more attention to reducing energy consumption and hops by making high-charging efficiency nodes undertake more forwarding tasks. This brings problems when the charging cycle is small, as it is unable to allocate more time for those nodes. Furthermore, their low energy state will influence the network balance. Thus, when Tc = 1 ∼ 6, our network balance is a little worse. When Tc becomes larger, our charging strategy can promote the routing effect, and in turn the network balance is better. When Tc = 0, the performance index is the same in DCA and GCA for the DEBR. Moreover, Figure 6c reflects our routing performance is a little better. When Tc becomes larger, the DCA performs better than GCA, reflecting the efficiency of changing charging points periodically. Additionally, the network lifetime in our algorithm increases rapidly, indicating that the adaptive routing algorithm is suitable for the charging strategy to promote the overall performance.

Conclusions
In this paper, a charging strategy based on network balance and the routing algorithm adapted to the characteristics of node in charging stage are proposed to prolong the network lifetime. The charging part distributes the charging time according to the average energy consumption of the nodes around the charging points and dynamically changes the charging efficiency of the nodes to balance the energy of the nodes after energy replenishment. In the routing stage, the nodes choose the next hop node according to the charging characteristics, which reduces the overall energy consumption of the network and improves the real-time performance of the network. Simulation results show that the algorithm can extend the network lifetime effectively.
In the next step, it is worth further studying and discussing how to improve the charging efficiency of the node by changing the charging points better.

Conclusions
In this paper, a charging strategy based on network balance and the routing algorithm adapted to the characteristics of node in charging stage are proposed to prolong the network lifetime. The charging part distributes the charging time according to the average energy consumption of the nodes around the charging points and dynamically changes the charging efficiency of the nodes to balance the energy of the nodes after energy replenishment. In the routing stage, the nodes choose the next hop node according to the charging characteristics, which reduces the overall energy consumption of the network and improves the real-time performance of the network. Simulation results show that the algorithm can extend the network lifetime effectively.
In the next step, it is worth further studying and discussing how to improve the charging efficiency of the node by changing the charging points better.
Author Contributions: L.T. conceived and designed the experiments; L.T. and Z.C. performed the simulations; Z.C. and J.C. wrote the paper; L.T, H.G., R.W. and J.G. technically reviewed the paper.
Funding: This research was funded by the National Natural Science Foundation of China (No. 51677065).

Conflicts of Interest:
The authors declare no conflict of interest.