Joint Power Charging and Routing in Wireless Rechargeable Sensor Networks

The development of wireless power transfer (WPT) technology has inspired the transition from traditional battery-based wireless sensor networks (WSNs) towards wireless rechargeable sensor networks (WRSNs). While extensive efforts have been made to improve charging efficiency, little has been done for routing optimization. In this work, we present a joint optimization model to maximize both charging efficiency and routing structure. By analyzing the structure of the optimization model, we first decompose the problem and propose a heuristic algorithm to find the optimal charging efficiency for the predefined routing tree. Furthermore, by coding the many-to-one communication topology as an individual, we further propose to apply a genetic algorithm (GA) for the joint optimization of both routing and charging. The genetic operations, including tree-based recombination and mutation, are proposed to obtain a fast convergence. Our simulation results show that the heuristic algorithm reduces the number of resident locations and the total moving distance. We also show that our proposed algorithm achieves a higher charging efficiency compared with existing algorithms.


Introduction
Because of the wide applications of wireless sensor networks (WSNs) in environmental monitoring, ecosystem surveillance, and physical hazard prevention, WSNs have attracted a flourish of research efforts from both the industry and academia in the last decade. However, most WSNs still face a limited operating time, as they are powered by battery. In order to prolong the network lifetime, extensive research efforts have been focused on low-power hardware architecture [1], low-complexity software implementation [2], power-efficient wireless communication [3], topology control [4], and dynamic routing techniques [5]. Although these solutions can extend the network lifetime to some extent, the limited battery remains a paramount hurdle to the development of large-scale applications. Some other solutions have resorted to energy harvesting sources, such as solar, wind, hydroelectric, and thermoelectric. However, these harvesting sources are generally expensive and with a large size, requiring an additional energy harvesting component, and they may not always be accessible because of the environment dynamics [6]. For example, the availability of a solar-based harvesting system drastically varies with time and weather, and these cannot provide enough energy for duty-cycle applications [7].
In place of conventional energy harvesting techniques, the recent breakthrough in the area of wireless power transfer (WPT) has opened up a promising alternative to power devices using radio frequency (RF) signals over the air. It was shown in an Intel research report that a wireless identification exists a major difference between battery-based WSNs and WRSNs. In battery-based WSNs, one common objective is to minimize the total energy consumption of those sensors near the sink node, thus prolonging the network lifetime. However, such an energy balance-orientated design is not necessarily optimal for WRSNs, because of the fact that a high power consumption of any sensors in any location can now be replenished by means of WPT via the mobile chargers. This clear difference indicates that the routing techniques in WRSNs should be redesigned to fully take advantage of WPT. Unlike existing works, the aim of this work is to design a joint energy replenishment and routing mechanism for WRSNs. Specifically, given the velocity of the mobile charger, we aim to find the best traveling path corresponding with the optimal routing tree. In this way, we mitigate the gap between the heterogeneous energy consumption among the routing tree and the charging efficiency. To the best of our knowledge, this is the first study on the joint optimization for both energy charging and routing. The main contributions of this paper are summarized as follows: • We present a novel joint optimization model including both charging efficiency and routing, rather than the typical charging optimization problem considering only the predefined data-gathering route.

•
We propose a genetic algorithm (GA)-based optimization framework to find the optimal routing tree, in which the specific many-to-one routing tree is coded as an individual for evolution. We design an efficient individual encoding scheme and effective constraints handling mechanisms to achieve quick convergence.

•
We then propose a heuristic algorithm to find the optimal resident locations with the given routing tree. By calculating the minimum moving distance and total charging time to evaluate the fitness of each individual, the evolution process of the GA is thus guided.

•
We evaluate the proposed algorithms with extensive simulations and study the impact of multiple environmental factors, including the number of sensors and the types of routing tree. Our simulation results have showed that our proposed algorithm achieves a substantial improvement compared with the predefined route.
The remainder of this paper is organized as follows. In Section 2, we present the system model and problem formulation. Section 3 proposes our heuristic algorithm and the GA-based algorithm with computational complexities analysis. Section 4 presents numerical results, and Section 5 highlights our conclusions.

System Model
We consider a WRSN consisting of a single sink node and N sensor nodes, which periodically generate data with a different rate. The sensor nodes are labeled as N = {1, ..., N}. Without loss of generality, each node n ∈ N in the network has an initial energy E n i , a fixed communication radius R c and generates sensing data at a rate r i . After deployment, we assume all the sensors can be accurately localized via existing localization algorithms, either centralized [27] or distributed [28]. The entire network can be represented as a directed topology graph G(N , E ), where e ij ∈ E if d ij ≤ R c , and d ij represents the distance between nodes i and j (i, j ∈ N , i = j). We define the node's dead state by its residual energy being below E min . In this state, although it can still sense data, it cannot send its sensing data to the sink node either directly or indirectly via relay nodes, because of the energy constraint.

Routing Constraints
We assume each sensor node has the same sensing rate λ n (n ∈ N ) and define the real variable f n ij (and f n ji ) as the data flow traveling over link e ij (and over e ji ) for node n, where e ij , e ji ∈ E . We have the following constraints when designing the routing tree: For the source node n, we have For node i, as an intermediate relay node for sensor n, that is, i = n, i = Sink, we have For node n, as the sink node of sensor n, we have On the basis of the above definition, the energy consumption of each sensor i can be calculated as where C r i is the energy consumption per receiving data rate of node i, D r i is the total received rate of node i, C t ij is the energy consumption per transmitting data rate from node i to j, and D t ij is the total transmitted rate from node i to j. In Equation (4), C t ij , D r i and D t ij are given as and where β 1 is a distance-independent constant term, β 2 is a coefficient of the distance-dependent term, and α is the path-loss index.

Energy Charging Cycle
We consider the scenario of a mobile charging vehicle periodically traveling inside the sensor network and charging each sensor node's battery wirelessly.
To prolong the network lifetime, there exists a mobile charger v with a charging radius R v and an initial power P v , which we assume can charge multiple sensors within its charging radius simultaneously. Similarly to [12,13,29], we assume the charging is only concerned with the distance and we ignore the environmental factors for simplicity. We thus define the charging rate of sensor n as We assume this mobile charger charges the network with a fixed schedule S and a predefined traveling path P with a period of τ. The path P consists of a set of resident locations denoted as M = {1, ......, M}. We denote the set of nodes covered by location m as S m , which is given by This should satisfy N = S 1 ∪ S 2 ∪ ... ∪ S M , which means that all sensors should be covered by all resident locations.
The charger starts from the first location and charges those nodes in S 1 with a time τ 1 . Then, it leaves the first location and moves to the second location with a traveling speed v. When it reaches the second location, it remains for time τ 2 to charge the nodes in S 2 . These steps are repeated until all the locations are visited once. After that, the charger returns to the first location to replace its battery and ready itself for the next charging tour. Thus, the cycle time τ can be written as where the first term is the time for charging, the second term is the time for moving, and the third term is the rest time.
For the resident location m ∈ M, the charging time τ m depends on the charger's residual energy and the node's energy consumption rate. In order to ensure that all the nodes are still alive, the amount of charged energy for sensor i ∈ S m must be greater that the amount of consumed energy during the next cycle τ, which is expressed as where P m denotes the charger's residual energy when it reaches the resident location m, which is given as Here, the second term is the consumed energy for the charging nodes from set S 1 to S m−1 , the third term is the consumed energy for moving, and ρ is the energy consumption for a moving unit of meters. One example of the charging model is illustrated in Figure 1 with 16 sensors and 4 resident locations.
The mobile periodically visits each resident location and charges those sensors in its charging radius. How to find the optimal resident locations and the optimal routing tree to achieve the optimal charging efficiency is discussed in the next section.

Rl 3
Rl 4 Figure 1. A mobile charger periodically visits each resident location once and charges those nodes in its charging radius.

Problem Formulation
In this section, we formulate our joint model, including both the charging efficiency and routing optimization.

Charging efficiency problem:
Charging efficiency is conventionally regarded as the ratio between the working time and charging schedule. On the basis of this criterion, the objective of this problem is to maximize the charging efficiency for the networks. This can be achieved by searching the optimal resident locations, the optimal routing tree and the optimal traveling path. This problem is formulated as We note that the constraints of Equations (1)- (7) are the routing constraints, whereas the constraints of Equations (8)- (12) are the charging constraints. Instinctively, both of these two optimization problems are in the form of a non-linear programming (NLP) problem, which are generally non-deterministic polynomial-time hardness (NP-hard) and cannot be solved by traditional optimization methods [30]. In the next section, we develop the bio-inspired GA to solve these two optimization problems.

Optimization Algorithms
In this section, we propose two optimization algorithms to solve the joint charging and routing optimization problem. In both algorithms, we divide the optimization into two problems: the routing and the optimal charging. First, we propose the heuristic algorithm for optimal charging with a predefined routing tree, and then, the routing and charging are optimized in a combined manner. In this algorithm, the optimal tree is obtained by a GA, and the heuristic algorithm is used to evaluate the fitness of each individual in the GA and guide the evolution process.

Heuristic Algorithm for Optimal Charging
In this subsection, We assume the routing tree can be predetermined by some existing approaches, such as the Dijkstra routing algorithm or the minimum spanning tree (MST) routing algorithm. The optimization model can be transformed as the following: From the description of Equation (14), we know that the optimal charging efficiency is related to the resident locations M and the total moving distance v . This total moving distance should be the shortest Hamiltonian cycle among all the resident locations. Otherwise, more time is spent on traveling. In addition, according to Equation (11), as a result of the lower left power, more time is needed to charge the sensors. Thus, the optimal charging efficiency is only related to the resident locations. According to Equations (8)- (12), these resident locations should cover all the sensors within its charging radius. Additionally, the Hamiltonian cycle among these locations should be the smallest. To satisfy these requirements, we therefore propose a heuristic algorithm shown in Algorithm 1 to find the optimal resident locations with the predefined routing tree. In our algorithm, we first introduce the following two definitions: Definition 1. If a node has no neighbor nodes within a circle of radius 2R v , this node is defined as an isolated node.

Definition 2.
If a node has neighbor nodes within a circle of radius 2R v , this node is defined as a non-isolated node.
We design the following two strategies to select the resident location for nodes of a different type. The first strategy is for isolated nodes. We first line an isolated node with the previous selected resident location; then, the location along this line and with a distance of R v to that isolated node is selected as the current resident location. The second strategy is for non-isolated nodes. We first select a node with the maximum distance to this non-isolated node within a distance 2R v . After that, the midpoint between these two nodes is selected as the resident location.

Algorithm 1: Heuristic algorithm for resident location selection
Initialization: Obtain the location of service station {x 0 , y 0 }, the set of uncharged sensors N , and the working period τ. Set the previous resident location Rl p = {x 0 , y 0 }, and set the resident location set M = {Rl p }.
Set the counter for the resident location as m = 1.
Find a sensor i * ∈ N satisfying d i * ,p < d k,p , ∀k ∈ N . Determine the type of sensor i * . if i * is a isolated node then Select resident location Rl m according to the first strategy. else Select resident location Rl m according to the second strategy. As an example, Figure 2 shows how to select the resident location for different types of nodes. First, as shown in Figure 2a, node n 1 is selected as the first node near the service station, by judging its type as non-isolated. Node n 2 is selected, for the reason that n 2 has the maximum distance to n 1 within a distance 2R v . After that, the location in the middle of n 1 and n 2 is chosen and denoted as the first resident location Rl 1 . Similarly to Figure 2a, we further select the second resident location Rl 2 . Because node n 6 is an isolated node, Rl 3 is selected along the line between Rl 2 and n 6 . Additionally, it has a distance of R v to n 6 , as shown in Figure 2c. We therefore give the description of our heuristic algorithm in Algorithm 1 according to the following. In this algorithm, we first select these resident locations to cover all the sensors and calculate the minimum moving distance with the shortest Hamiltonian cycle. Then, with the energy consumption model defined by Equations (5)-(7), and with the charging constraints of Equations (9)-(12), the maximum charging efficiency is obtained. Here we assume that the mobile charger can visit any locations of the target area for simplicity. In fact, it is possible that some locations are hard to arrive at, because of the environmental factors. In this case, the heuristic algorithm should take these environmental factors into account. Additionally, the shortest Hamiltonian cycle among all the resident locations should be redesigned, for the reason that some resident locations cannot be directly connected.

Joint Optimization of Routing and Charging
In order to find the best routing tree corresponding to the selected resident location, a straightforward solution is to conduct an exhaustive search by constructing all feasible routing trees. This approach, however, is infeasible for networks with a larger number of sensor nodes. The heuristic algorithm is based on decomposition. However, this approach may be suboptimal because of the fact that the routing tree and charging efficiency interact with each other and the routing and charging should be optimized in a compact form. Therefore, we apply the GA to integrate these two schemes to achieve the interaction between the charging efficiency and the routing tree.
By simulating the process of evolution in the natural system, the GA can be considered as an adaptive heuristic search algorithm that is very suitable for providing a robust, near optimal solution for many real world NP-hard problems, and it is also widely applied for the performance optimization of WSNs, such as in network coverage control for WSNs [31][32][33], the scheduling problem [34,35], the optimal sensor deployment problem [36,37], and topology control [38]. This bio-inspired algorithm imitates the natural evolution of biological organisms to provide a robust, near-optimal solution for various problems. The GA is inherently an evolutionary process that involves individual encoding, selection, crossover, mutation, and replacement operations [39].

Individual Encoding
The GA cannot deal with the solutions of the optimization problem directly. The solutions need to be represented as chromosomes in terms of the data structure. In our optimization problems, a tree-based encoding scheme is proposed to represent the potential solutions.
In our scheme, the routing paths of all the sensors to the sink node are randomly generated, to thus explore the genetic diversity. For each sensor i, its first forward node i 1 f is randomly selected from its neighboring set N i /i. Then, we randomly select the second forward node i 2 f from the neighboring This step is repeated until the data is received by the sink node. In the above path construction, the sensors already in the routing path are excluded, thereby to re-enter the same node. We denote the path of sensor i as P i = {i, i 1 f , i 2 f , ..., sink}, and we can conclude that the maximum length of path P i is less than N − 1 because the total number of sensors is N. After we have found routing paths for the sensors in N , these paths are further combined as a reverse many-to-one multicast routing tree ending at the only sink node. This reverse multicast tree is further mapped as a matrix Γ N * N−1 , where the ith row denotes the routing path of sensor i. Figure 3 illustrates an example of six routing paths and their chromosome representation, where the sink node is denoted as node 0. With this coding scheme, we first generate an initial population R with R matrices.
Additionally, considering that the routing tree obtained by Dijkstra's algorithm is also a sub-optimal solution, we thus take it as a potential individual in the initial population. In this way, the initial population in our algorithm contains R − 1 randomly generated individuals and one existing sub-optimal solution. By doing so, this initialization can converge much faster than that without exploiting the knowledge we already have. The population initialization procedures are described in Algorithm 2. We note that the initialization procedures can generate R different routing trees, and each routing tree satisfies those routing constraints defined by Equations (1)-(7).

Algorithm 2: Population initialization
Replace the first individual by the routing tree generated by Dijkstra's algorithm.

Fitness Functions and Natural Selection
In the GA, the selection operation is applied to choose individuals to participate in reproduction, which has a significant impact on driving the search towards a promising trend and finding optimal solutions in a short time. We adopt the famous roulette wheel selection method to select the individual on the basis of its selection probability, which is proportional to its fitness function. The selection probability of the rth individual is defined as (15) where f (r) is the fitness function of individual r. In this paper, the fitness value is defined as the charging efficiency obtained from Algorithm 1 with the given routing tree.

Crossover and Mutation
The crossover operation is used to mix the individuals to increase their fitness. Considering that the chromosomes are expressed by a tree data structure, a single-point crossover is designed to exchange a partial chromosome. For the two individuals selected to crossover, we first select common nodes between these two trees; then, one common node among them is randomly selected as the crossover point. After that, the subtrees rooted from this node are swapped to generate two new routing trees. We illustrate an example of single-point crossover and the individual repair operation in Figure 4, where the common node is node 11. The crossover between parent A and parent B is performed by switching the subtree rooted at node 3 with that of parent B. After the crossover, the new generated routing tree in child A has a routing loop of 2-3-5. As such, we repair this routing loop by randomly deleting link e 23 . Additionally, nodes 5 and 8 are randomly linked to child B to ensure the feasibility.  In the mutation operation, the elements in both matrices of each individual are randomly altered to diversify the population after the crossover operation, which will pave the way towards global optima. In this paper, once a node (denoted as n) is selected as the mutation point with probability q m , the mutation replaces the path n to the sink node by a randomly generated new path. It is observed that the designed genetic operation still generates routing trees, indicating that routing constraints are still satisfied.

Replacement
After generating a new population through the crossover and mutation operators, an elitist model-based replacement is employed to update a certain number of individuals in the old population with the new generated individuals. The low-quality individuals with low fitness values in the parental population are replaced by their children in the next generation. Now, we have designed the key components of the GA operation, which are the individual encoding, population initialization, selection, crossover, mutation, and replacement operation. The joint optimization of routing and charging based on the GA is depicted in Algorithm 3, where G is the given number of generations, R is the population size, q c is the crossover probability, and q m is the mutation probability.

Algorithm 3: Joint optimization based on genetic algorithm
Set g = 1.
Generate initiation population R using Algorithm 2.
Calculate the fitness value of each individual in R using Algorithm 1. while g ≤ G do Set R = Φ. for i = 1 to R/2 do Select two parents p 1 and p 2 from R using roulette wheel selection method. r 2 * i−1 = p 1 and r 2 * i = p 2 . Cross r 2 * i−1 and r 2 * i using single-point crossover strategy with probability q c , and produce two children r 2 * i−1 and r 2 * i . Repair elements in r 2 * i−1 and r 2 * i if needed. Mutate r 2 * i−1 and r 2 * i using mutation strategy with probability q m . R = R ∪ r 2 * i−1 , r 2 * i . Calculate the fitness value of each individual in R . end Set g = g + 1.
Replace the individuals with low fitness values in population R with the children in offspring R using Algorithm 1. end Return the fittest individual in R.
In the proposed GA-based optimization, the computational complexity is dominated by the complexity in evaluating the fitness of Algorithm 1, which has to be evaluated R times in each iteration. The time complexity for calculating the fitness function of the resident locations is O(N) within an iteration. Aside from this, a GA-based approach also depends on other factors, which are difficult to clearly enumerate, such as strategies to generate a new population, and the tolerance allowable for cumulative changes in the fitness values [40]. Excluding these parameters, the total complexity of our algorithm is O(G(NR + R 2 )). Similarly to that in [12,19,41], our algorithms are performed in an offline manner. We assume the algorithm is executed at the sink node until the optimal routing tree and charging schedule are obtained. After that, the obtained routing tree is sent back to all the sensors via broadcasting, and the resident locations and traveling path are sent to the mobile charger. To run our algorithm, the sink node needs to collect the ID and location of each sensor. After receiving the results, one sensor can quickly find its forward sensor by only exchanging its IDs with its neighbors.

Numerical Results
In this section, we provide numerical results to illustrate the performance of our proposed algorithm. We consider a WRSN with a fixed sink node, and no more than 80 sensor nodes are randomly deployed in a square area with size 500 × 500. We assume the sink node is located in the center of the area, the service station is located at the corner, and the moving speed of the mobile charger is 5 m/s. The details of these parameters are summarized in Table 1 unless otherwise specified. The corresponding simulations were implemented in Matlab 7 using a laptop with an Intel (i5-4300) CPU. All the results were obtained by averaging over 100 simulations. Table 1. Simulation parameters.

Parameters Value
The initial energy of sensor n, E n i 10,800 J The minimum energy for working, E min 540 J The mobile speed, V 5 m/s The full charging ratio, u Full 5 W The minimum charging ratio, U min 1 J The charging radius, R v 2.7 m The sensing ratio of node, n λ n 1∼10 kbps The number of sensors, N 20∼80 Distance-independent constant term, β 1 50 × 10 −9 J/b Coefficient of distance-dependent constant term, β 2 0.0013 × 10 −12 J/(bm 4 ) Pass-loss index , α 4 Energy consumption for receiving per data rate, C r i 50 × 10 −9 J/b

Convergence Behavior
In the GA, the convergence behavior is affected by many control parameters, such as the initial population, the mutation probability and the crossover mechanism. To the best of our knowledge, the conditions for GAs to converge have been proved only for binary encoding with Markov chain models [42]. However, for the GA algorithm with integer encoding, the convergence is still an open problem [43]. In this paper, rather than using an analytical approach, extensive simulations are employed to investigate the convergence issue. In our simulations, we set the maximum number of generations as 500. In fast, the number of generations depends on the number of individuals. For instance, more generations are needed for a greater number of sensors. Figure 5 plots the convergence behavior of the charging efficiency with the number of generations, and we can observe that the algorithm converges after approximately 300 generations for various numbers of sensors. It takes 50 s to converge for N = 70 sensors. This is sufficient for many applications. If we use a more powerful computer, it is expected that it can converge much faster. For our optimization problem, the charging efficiency with a random generated routing tree at the initialization is 72.9%, while the final obtained value after optimization with the GA is 99.5%, which showcases that the GA achieves a nearly 50% greater charging efficiency compared with that of the random routing tree. This also indicates that it is important to design a joint optimization including both routing and charging. Additionally, it is revealed that the converge speed can be substantially increased with a reduced number of sensors.  We also compare this with using the hexagon algorithm in [12] and the anchor point selection (APS) algorithm proposed in [17]. We observe that the number of resident locations increases by increasing the number of sensors. More importantly, our algorithm obtains fewer resident locations than the other two algorithms. This can be explained by the fact that resident locations with the hexagon algorithm are selected in the adjacent hexagons one by one, and the number of sensors covered by each resident location is random. In APS, the resident location is always selected as the location of the sensor node, while in our approach, we always aim to charge the largest number of sensors in one resident location; therefore, few resident locations are needed to cover all the sensors. Figure 7 further plots the total traveling distance versus a different number of sensors. As expected, we observe that our approach obtains fewer traveling distances than the other two algorithms. Another observation is that the total traveling distance increases with an increasing number of sensors.   Figure 8 plots the comparison of the charging efficiency with different algorithms. Here, LB is the low latency based routing algorithm proposed in [25], where the sensor with the maximum residual energy in the next forward ring is selected as the forwarder. EE-ABB is an energy-efficient routing protocol based on an artificial bee colony algorithm [44], where an intelligent clustering algorithm is applied to improve the performance of LEACH (low-energy adaptive clustering hierarchy protocol) [45]. It is observed that the charging efficiency decreases with an increasing number of sensor nodes. We can also observe that our algorithm achieves the best performance compared with other algorithms. Figure 9 plots the average received power comparison of these algorithms. We can observe the same trend as in Figure 8. Additionally, we can observe that the LB algorithm achieves a better performance than the clustering algorithm, which is mainly because of the higher energy consumption of the cluster node, and more charging time being spent on those cluster nodes. We can also observe that the substantial improvement in the charging efficiency is achieved by jointly optimizing both charging and routing in our algorithm, which also demonstrates the effectiveness of our algorithm.

Conclusions
In this paper, we have presented the joint optimization model, including both the charging efficiency and routing for WRSNs. We have developed a heuristic algorithm to obtain the optimal charging efficiency with the predefined routing tree. We have also proposed an efficient GA-based algorithm for the joint optimization of routing efficiency and charging efficiency. The number of resident locations and total traveling distance can be improved by choosing the optimal resident locations with the proposed heuristic algorithm. Jointly optimizing both charging and routing can further improve the charging efficiency compared with the existing routing algorithms.