TLFW: A Three-layer Framework in Wireless Rechargeable Sensor Network with a Mobile Base Station

Wireless sensor networks as the base support for the Internet of things has been a large number of popularity and application. Such as intelligent agriculture, we have to use the sensor network to obtain the growth environmental data of crops, etc.. However, the difficulty of power supply of wireless nodes has seriously hindered the application and development of Internet of things. In order to solve this problem, people use low-power, sleep scheduling and other energy-saving methods on the nodes. Although these methods can prolong the working time of nodes, they will eventually become invalid because of the exhaustion of energy. The use of solar energy, wind energy, and wireless signals in the environment to obtain energy is another way to solve the energy problem of nodes. However, these methods are affected by weather, environment and other factors, and are unstable. Thus, the discontinuity work of the node is caused. In recent years, the development of wireless power transfer (WPT) has brought another solution to this problem. In this paper, a three-layer framework is proposed for mobile station data collection in rechargeable wireless sensor networks to keep the node running forever, named TLFW which includes the sensor layer, cluster head layer, and mobile station layer. And the framework can minimize the total energy consumption of the system. The simulation results show that the scheme can reduce the energy consumption of the entire system, compared with a Mobile Station in a Rechargeable Sensor Network(MSiRSN).


I. Introduction
Internet of things (IoTs) are applied in everywhere now. Wireless sensor networks as the base support for the Internet of things has been a large number of popularity and application. Such as intelligent agriculture, we have to use the sensor network to obtain the growth environmental data of crops, etc.. However, in wireless sensor network, finite battery capacity is a major limitation of untethered nodes. Sensor nodes will operate for a finite duration, only as long as the battery lasts. the difficulty of power supply of wireless nodes has seriously hindered the application and development of Internet of things. In order to solve this problem, there are several solution techniques that have been proposed to maximize the lifetime of wireless sensor network, such as energy-aware routing protocols [1,2], energyefficient MAC protocols [3], redundant development of nodes [4], power management strategies [5,6]. All the above techniques can maximize the lifetime of network. But the lifetime still remains bounded, and they will eventually become invalid because of the exhaustion of energy. The use of solar energy, wind energy, and wireless signals in the environment [7,8] to obtain energy is another way to solve the energy problem of nodes. However, these methods are affected by weather, environment and other factors, and are unstable. Thus, the discontinuity work of the node is caused.
In recent years, the development of wireless power transfer (WPT) [9] has brought another solution to this problem. Wireless power transfer based on magnetic resonant coupling [10,11] has been demonstrated to be a promising technology to address the problem in a wireless sensor network [12][13][14][15]. In paper a Mobile Station in a Rechargeable Sensor Network(MSiRSN) [12], the authors showed how charging vehicle (WCV) can support wireless power transfer by bringing an energy source charge to proximity of sensor nodes and charging their batteries wirelessly, and carry the base station (MBS) to gather data. There is a home service station for the vehicle. The authors addressed the problem of co-locating the MBS on the WCV in a WSN by studying an optimization problem with a focus on the traveling path problem of the WCV, the data flowing routing depending on where the WCV is in the network, stopping points and charging schedule to minimize energy consumption of the entire system while ensuring none of the sensor nodes runs out of energy. In each charge period, WCV travels inside the network and charges every sensor node. In above papers, the traveling time is a little proportion of total time consisting of traveling time, vacation time and charging time. For example, the traveling time equals 1022s, the vacation time equals 10.26 hours and the charging time is 3.41 hours in the solution of simulation [13]. However, as the traveling time increases with the node density and the traveling time is a great part of the total time, traveling and charging every node in a period is improper.
To reduce the traveling time in a period, we propose a tiered system architecture consisting of the sensor layer, cluster head layer, and mobile station layer, as illustrated in Fig.1. The CBW travels all cluster heads at cluster head layer and selects the cluster in which CBW travels all sensor nodes at sensor layer in a sub-period. Several sub-periods form a period in which the sensor nodes in every cluster traveling once. Compared to traveling all nodes in [12,13], the strategy reduces the proportion of the traveling time in total time, leading to reduction of the total energy consumption in the entire system, which includes power used by the CBW and the power consumed for wireless power transfer.

Summary and contribution:
• This paper designs a three-layer framework in rechargeable wireless sensor network with a mobile base station.
• A centralized clustering algorithm is proposed for sensors to organize them into m clusters and it will reduce energy consumption.
• This paper designs an optimization methods for joint charging schedule.

II. OVERVIEW
In this paper we propose a tiered system architecture consisting of the sensor layer, cluster head layer and mobile station layer, to reduce the traveling time in a period. The CBW travels all cluster heads at cluster head layer and selects the cluster in which CBW travels all sensor nodes at sensor layer in a subperiod. Several sub-periods form a period in which the sensor nodes in every cluster traveling once. Compared to other methods, this strategy reduces the proportion of the traveling time in total time, leading to reduction of the total energy consumption in the entire system, which includes power used by the CBW and the power consumed for wireless power transfer.
At the sensor layer, a centralized clustering algorithm is proposed for sensors to organize them into m clusters and the sensor nodes transmit data to the cluster head via a single hop. In contrast to existing clustering methods which balance energy consumption, our scheme generates m cluster heads to minimize the total energy consumption. The single-hop data routing reduces energy consumption through that the sensor turns off the radio when there is no data generated by themselves to transmit.
At cluster head layer, cluster heads can cooperate with each other and the cluster head information is forwarded to CBW (a Car as Mobile bastion with Wireless power transfer) via multihop. The optimal flow routing is solved for a CBW moving trajectory to energy-saving.
At mobile station layer, we study an optimization problem that joints charging schedule for cluster heads and sensors, and flow routing for cluster heads.

III. BACKGROUND
Wireless power transfer based on magnetic resonant coupling [10] has been demonstrated to be a promising technology to address the problem in a wireless sensor network in [12,13]. In MSiRSN [12], the authors showed how charging vehicle (WCV) can support wireless power transfer by bringing an energy source charge to proximity of sensor nodes and charging their batteries wirelessly, and carry the base station (MBS) to gather data. There is a home service station for the vehicle. The authors addressed the problem of co-locating the MBS on the WCV in a WSN by studying an optimization problem with a focus on the traveling path problem [16] of the WCV, the data flowing routing depending on where the WCV is in the network, stopping points and charging schedule to minimize energy consumption of the entire system while ensuring none of the sensor nodes runs out of energy. In each charge period, WCV travels inside the network and charges every sensor node.

IV. LAYERED NETWORK MODEL
In this section, we give an overview of entire framework. As depicted in Fig.1, it consists of three layers: sensor layer, cluster head layer and mobile station layer.
We consider a set of sensor nodes N * distributed over a two dimensional area. Each sensor node has a battery with a capacity of Emax and the initial energy of battery is a random value. Emin is denoted as the minimum level of energy at a battery for it to be operational. Each sensor node i generates sensing date with a rate ri(in b/s),i ∈ N * . Within the sensor network, there is a mobile CBW to charge sensor nodes and gather the entire network information.
In paper [12,13], the authors proposed strategies to keep all nodes running forever using the wireless power transfer. In MSiRSN, the authors studied the problem of co-locating the MBS on the WCV in a WSN to minimize energy consumption of the entire system. The WCV follows a periodic schedule to travel inside the network for charging every sensor node.
However, as the traveling path increases with the number of sensor nodes, the time of traveling all sensor nodes is a large proportion of a period with large of sensor nodes in a wireless network. So traveling all sensor nodes in a period is an unwise strategy.
To address the issue, we introduce a three-layer model, consisting of the sensor layer, cluster head layer, and mobile station layer, as illustrated in Fig.1. The CBW travels all cluster heads N at cluster head layer and selects a cluster in which CBW travels all sensor nodes at sensor layer in a subperiod. Several sub-periods form a period in which the sensor nodes in every cluster traveling once. The schedule shows the cluster heads that with higher energy consumption have higher charging frequency than normal sensor nodes.

V. CLUSTER SELECTION ALGORITHM
Since sensor nodes are energy-constrained, the network's lifetime is a major concern; especially for applications of WSNs in harsh environments. There are several solution techniques proposed, such as energy-aware routing protocols [1], energy-efficient MAC protocols [3], redundant development of nodes [4], power management strategies [5]. To support scalability of large WSN, nodes are often grouped into disjoint and mostly nonoverlapping cluster. The most well-known hierarchical routing protocols are LEACH, HEED, TEEN, PEGASIS [17] etc. Other clustering algorithms in the literature varies in their objectives, such as load balancing [18], fault-tolerance [19], increased connectivity and reduced delay [20,32,33], minimal cluster count [21]. However, the above clustering algorithms are proposed to prolong the lifetime of network. Due to wireless power transfer technology, we can keep nodes running forever. So a cluster selection algorithm as following is proposed in order to minimize the entire energy instead of maximizing network longevity.
We propose a Algorithm to minimize the total communication energy consumption in sensor layer. In order to clearly describe the algorithm, denote N as the number of elements in set N. The input of the algorithm are all node N * locations, communication consumption model parameters β1, β2 and ω, and the number of cluster head m. The output of the algorithm are the m cluster in which there are several normal nodes and a cluster head to minimize the within-cluster sum of communication energy consumption. The algorithm have three step: • First, randomly give initial cluster head set N, and N =m.
• Secondly, we assign each node to a cluster that the node's communication energy consumption to the cluster head is minimum. The strategy yields the least within-cluster sum of communication energy consumption.
• Thirdly, we update the cluster head in a cluster through calculating the new mean to be the centroid of the sensor nodes in a cluster and setting the sensor nodes closest to the centroid as new cluster head in the cluster.
• Alternate second and third step until the centroids of all clusters do not change in range.

A. Static routing
We suppose every node's location is known in the network. By a clustering algorithm in section V, we can get m clusters and two type sensor nodes (normal nodes and cluster head nodes). To conserve the energy, we suppose the normal sensor nodes have not the collaboration capability, only send data to the cluster head via a single hop and do not forward packets coming from other sensor nodes.
The total data rate in cluster i (denoted as Ri) contains two parts, the first is data received from normal sensor nodes in cluster i and the second is the data generated by cluster head node i. Hence Where Si is set of the type 0 nodes in cluster i, ri and rt is the data generation rate of node i and t, respectively. Given that cluster results, we have that Ri is constant.

B. Energy consumption in a cluster
Denote Cti as the energy consumption rate for transmitting one unit of data flow from normal sensor node t to cluster head i. Then Cti (in Joule/bit) can be modeled as [22]: Cti = where Dti is the physical distance between node t and node i, β1 and β2 are constant terms, and ω is the path loss index and typically between 2 ≤ ω ≤ 4 [23].
where (xt,yt) and (xi,yi) are the coordinates of cluster head i and normal sensor node t. Given that all nodes are stationary and the cluster result is stationary, we have that Dti, Cti are all constants.
Denote α (in Joule/bit) as the energy consumption rate for sensing one unit of data. The power consumption of the CPU is not taken into account.
For a normal sensor node t, the total energy consumption rate ct, is where Si is the set of normal nodes within the cluster i. Denote Ci * as the total energy consumption of all normal sensor nodes in a cluster i. Because the normal sensor nodes at a cluster only send data to the cluster head, there is no receiving energy consumption. Then we have Given a cluster solution, the is constant. Cs is denoted as the total energy consumption in the sensor layer, then we have: where m is the number of cluster.

C. Charging model and charging behavior
In this section, we give a charging model and a charing behavior for normal sensor nodes in a cluster.

1)
Charging model: Based on the charging technology [24], the vehicle with a wireless power transfer can charge neighboring nodes as long as they are within its charging range. We denote UtB(p) as the power reception rate at normal sensor node t when the vehicle position is p. Denote the efficiency of wireless charging by µ (DtB(p)) when the node is in charge range. Umax is denoted as the maximum output power for a node and Dδ is denoted as the charging range of wireless power transfer. We assume power reception rate is too low to make magnetic resonant coupling work properly at the node battery, when the distance between the node and the mobile CBW.

2)
Cellular structure and energy charging behavior: We consider all normal sensor nodes in a cluster. We employ the partition strategy in [13]. The two-dimensional plane of a cluster is partitioned into hexagonal cells with side length of D, as illustrated in Fig.2. We optional optimize the cell partition solution by the algorithm which the solution is illustrated in Fig.2.To charge normal sensor nodes in a cell, the mobile CBW only needs to visit the center of a cell. All normal sensor nodes within a hexagonal cell are within a distance of D from the cell center. Denote Qi as the set of all cell center and q * (q ∈ Qi) as a cell. So the power reception rate of t in a cell with a center q is UtB(q) = µ(DtB(q))·Umax(q ∈ Qi,t ∈ q * ), where DtB(q) is the distance between t and the center q. Note given the cell deployment and the t 0 position, the DtB(q) is constant. So we simple DtB(q) into Dt, UtB(q) into Ut. We employ the so-called logical energy consumption rate at a normal sensor node. Denote as the logical energy consumption rate at a cluster.
where τi(p) denotes the aggregate amount of time when the vehicle stays at point p ∈ Pi and pvaci denotes the vehicle leaves the cluster i and is out of cluster i charging period.
Note the mobile CBW only visits the cell center. To minimize the traveling time in a cluster, the mobile CBW must move along the shortest Hamiltonian cycle that connects the cluster head and the centers of cells in which there is at least one normal sensor node. The shortest Hamiltonian cycle can be obtained by solving the well known Traveling Salesman Problem (TSP) [25]. DPi is denoted the solution of the TSP.

E. Energy constrains for normal sensor node
We offer two energy renewable conditions, and show that once they are met, the energy level at normal sensor node never falls below Emin that means the normal sensor can run forever. First, we split energy consumption at normal sensor node t in cluster i into three part: • energy consumed when the CBW do not select the cluster i to charge battery: γt · τvaci.
• energy consumed when the CBW makes stops at all center of cell in which there is at least one normal sensor node: δ γt · ω(p).
• energy consumed when the CBW is moving along Pi that is Hamiltonian cycle that connects the cluster head and the centers of cells in which there is at least one normal sensor node, We employ a cellular structure for normal sensor nodes (in section VI-C2). From (9) and (10), we obtain, where Qi is the set of all cell center in cluster i.

A. Dynamic routing
With a clustering algorithm in section V to minimize the total energy of all sensor nodes, we can get some specific nodes and denote them as cluster heads. Different from normal nodes, the cluster head has collaboration capability.

B. Dynamic flow balance
Due to the mobility of the vehicle, data flow routing is dynamic with routing topology changing over time. Denote fij(p) and fiB(p) as flow rates from cluster head i to cluster head j and to the base station when the vehicle is at location p ∈ P, respectively. Then we have the following flow balance constraint at each cluster head i.
where N is the set of cluster heads gotten by cluster selection algorithm in section V, Ri is determined by equation (1).

C. Energy consumption
Like energy consumption model for normal sensor nodes, the communication energy consumption between two cluster nodes i j can be modeled as: where Dij = (xi − xj)2 + (yi − yj)2, (xi,yi) and (xj,yj) are the coordinates of cluster heads i and j.DiB(p) = (xi − xB)2 + (yi − yB)2, (xi,yi) and (xB,yB) are the coordinates of type 1 node i and vehicle B at p ∈ P. Given that the cluster result and all cluster head are stationary, we have that Dij, Cij are all constants. However DiB(p) and CiB(p) varied with vehicle position p.Denote γ (in Joule/bit) as the energy consumption rate for receiving one unit of data.Then the total energy consumption rate for transmission, reception and sense at cluster head i when the vehicle is at p ∈ P, denoted as ci(p), is where α·ri is denoted as sensing consumption, ρ ·∑ ∈ is denoted as consumption for receiving data from all normal sensor nodes at cluster is denoted as consumption for receiving data from other clusters head, is denotes as consumption for transmitting data to other cluster, and CiB(p)·fiB(p) is denoted as consumption for transmitting data to the mobile CBW. Note the cluster head consumption ci(p) dynamically changes with the position p.

D. Charging model
Like energy charging model for normal sensor nodes in section VI-C1, we use wireless power transfer [24] to charge the rechargeable battery of cluster heads. Different from normal sensor nodes charging schedule, the charging point for every cluster head is located in cluster head, taking account of the distance between any two cluster heads is longer than the charging range of wireless power transfer Dδ , which means it is impossible to charge two cluster head simultaneously. (15) where p is the mobile CBW position, p = i denotes the mobile CBW and cluster head i are at the same position, and p 6= i denotes the mobile CBW and cluster head i are at two different positions. The equation (15). shows the mobile CBW just charges a cluster head while they are at the same position and do not charge battery when it is moving.

E. Traveling period for cluster layer
Like section VI-D, the charge time for cluster heads is: where ω(p) denotes the aggregate amount of time the vehicle stays at point p ∈ P and pvac denotes the location of the home service station. To minimize the traveling time of all cluster head, the mobile CBW must move along the shortest Hamiltonian cycle that connects the server station and all cluster head. Like traveling time at a cluster DP, DP is denoted the solution of the TSP.
Based on the distance between two type 1 nodes is longer than charging range of wireless power transfer Dδ, the points where the vehicle stops for charge cluster heads are in cluster heads position. Then the equation (8) can be written as follows:

F. Energy consumption in a sub-period
We offer two energy renewable conditions, and show that once they are met, the energy level at clusters head never fall below Emin, which means the cluster head can run forever. First, we split energy consumption at normal sensor node t into three parts: • energy consumed when the CBW makes a stop at service station): ci(pvac) · τvac • energy consumed when the CBW makes stops at all cluster head: , • energy consumed when the CBW is moving along P that is Hamiltonian cycle that connects all cluster head and the service station,

VIII. LAYER 3: CHARGING SCHEDULE AT CBW
We consider minimizing energy consumption of the entire system which includes normal sensor nodes and cluster heads. First, we minimize the total transmission energy consumption of all normal nodes in a cluster through a cluster selection strategy and give an optional charge strategy including an approximative optional path and charge time. Secondly, for cluster head layer, we formulate the problem including mobile CBW traveling path, dynamic flow routing and charge time, and solve the problem by CPLEX solver [ [26].

A. Formulation for normal sensor nodes in a cluster
We develop a travel schedule for the mobile CBW, charging schedule among normal sensor nodes so that no normal node never runs out of energy. For the objective function, we consider minimizing energy consumption in sensor layer. We have following optimization problem (OPT-Normal).

s.t. Timeconstraints : (8);
Energyconsumptionmodel : (6),(7); Energyrenewableconstraints : (11), (12); To minimize the traveling time in a cluster, the mobile CBW must move along the shortest Hamiltonian cycle that connects the cluster head and the centers of cells in which there is at least one normal sensor node. So Pi is denoted the solution of this TSP.

B. Formulation for cluster nodes
We develop a travel schedule for the mobile CBW, charging schedule and data flow routing among cluster heads so that no cluster head never runs out of energy. For the objective function, we consider minimizing energy consumption in cluster head layer. We have following optimization problem (OPT-Cluster)

s.t. Timeconstraints : (16);
Energyconsumptionmodel : (14); Energyrenewableconstraints : (17), (18); To minimize the traveling time of all cluster head, the mobile CBW must move along the shortest Hamiltonian cycle that connects the server station and all cluster head. So P is denoted the solution of the TSP.

C. Joint solution
We find solutions to Dtpsi, ratei and tmaxi for a cluster i, τvac, τ and τtsp for cluster head by CPLEX [26]. Denote the tmax as the min(tmaxii ∈ N). To minimize the entire system consumption jointing sensor layer, cluster head layer and mobile bastion station, we study the following problem (OPT-Joint). ; Constraint T ≤ tmax shows the entire period is no greater than the minimum value of maximum lifetime for a cluster in all clusters, which ensures every normal sensor node is not out of energy.
shows the time that the mobile CBW is into a cluster and charges normal sensor nodes do not longer than the τvac that ensures in a sub-period, the mobile CBW can charge all normal sensor nodes. For the fractional objective function , we define . Then we can reformulate above problem as following: The equation shows the ηvac increases with the T. So we can maximize the ηvac via maximizing T with two constraints T ≤ tmax and Γ * i + , where tmax and τvac/T can be calculated in section VIII-A and section VIII-A respectively. So the joint problem can be solved.

IX. PERFORMANCE EVALUATIONS
In this section, we present some numerical results to demonstrate how our solution works to achieve wireless energy transfer and evaluate the performance of the system compared to MSiRSN.

A. Simulation settings
In this section, we evaluate the performance of the system and compared it with the strategy in MSiRSN. The network parameters are set like in MSiRSN. We assume sensor nodes are deployed over a 1×1 square area. The service station is at (0.5,0.5). The traveling speed of the mobile CBW is V = 0.1. The data rate rt, t ∈ N * , from each node is randomly generated within [0. 1,1]. Power consumption coefficients are β1 = 1,β2 = 1,ρ = 1,α = 0 . The path loss index is ω = 4. Suppose that a sensor nodes uses a rechargeable battery with Emax = 10,000, and Emin = 500. For the charging efficiency function µ(DtB(p)) = −40DtB(p) 2 − 4DtB(p) 2 + 1. Letting Umax = 50, Dδ = 0.1 for a maximum distance of effective charing. We consider a 50node network. The normalized location of each node and its data rate is given at Table 1 in MSiRSN.

B. Solution with strategy in MSiRSN
The simulation results in MSiRSN are given as following. The traveling path in a period DPOPT−lb = 4.89 and the traveling time DPOPT−lb/V = 48.9. The cycle time τ = 9414, the vacation time τvac = 6410, and the objective value = 68%. The traveling path is shown in Fig.3. Fig. 4. The layer framework of a network in section IX. Green star represents cluster head, yellow ellipse represents cell center that is stopping point for charging normal nodes in the cell, other four colour circles represent four types normal nodes.

C. Solution with our strategy
With our strategy, we can get a layer framework of the network, shown in Fig.4. We solve optimization problems (OPT-Normal and OPT-Cluster) by CPLEX [26] and get following solutions. Denote τc as the total charging time for cluster heads in a sub-period, τci as the total charging time for normal sensor nodes at cluster i.

X. RELATED WORK
The lifetime of wireless sensor networks is often limited by energy supplies. The problem of node energy supply is also a key problem in the application development of wireless sensor networks. To solve this problem, researchers have explored a wide variety of solutions.
One type of the methods is to save energy by optimizing the hardware and software [27] of the nodes. There are several solution techniques that have been proposed to allow nodes to work as long as possible in a limited amount of energy. Such as energy-aware routing protocols [1], energy-efficient MAC protocols [3], redundant development of nodes [4], power management strategies [5].But no matter how energy-efficient, the battery will eventually be used up. Then the network is invalid.
Another type of the methods is to automatically obtain energy by nodes from the natural environment. Such as wind, solar energy [28], etc.. The energy harvesting techniques referring to har-nessing energy from the environment and converting energy to electrical energy make that a node can be powered perpetually possible, such as [7,8]. Due to uncontrollability and unpredictability of the energy source that refers to the ambient source of energy to be harvested, the techniques can not ensure that nodes run in every moment.
The third type of the methods is to obtain energy using ubiquitous radio signals [29]. However, this technology is still in its initial stage of research, and can obtain very little energy. This is mainly caused by the far distance and the limited transmitting power of the electromagnetic wave. Recently, wireless power transfer based on magnetic resonant coupling [10] has been demonstrated to be a promising technology to address the problem in a wireless sensor network [12-14, 30, 31-40]. In MSiRSN, the authors showed how charging vehicle (WCV) can support wireless power transfer by bringing an energy source charge to proximity of sensor nodes and charging their batteries wirelessly. But the overall energy consumption is higher.
In this paper, we propose a tiered system architecture consisting of the sensor layer, cluster head layer, and mobile station layer to reduce the traveling time in a period. The CBW travels all cluster heads at cluster head layer and selects the cluster in which CBW travels all sensor nodes at sensor layer in a sub-period. Several sub-periods form a period in which the sensor nodes in every cluster traveling once. Compared to traveling all nodes in above methods [12,13], the strategy reduces the proportion of the traveling time in total time, leading to reduction of the total energy consumption in the entire system, which includes power used by the CBW and the power consumed for wireless power transfer.

XI. CONCLUSION
Wireless sensor networks is the main part of IoTs. With the high developing time of IoTs, the difficulty of power supply of wireless nodes has seriously hindered the application and development of IoTs. In this paper, we proposed a threelayer framework consisting of the sensor layer, cluster head layer, and mobile station layer in a rechargeable wireless sensor network. We studied the problem of charge schedule and traveling path of a mobile CBW and a cluster selection algorithm in order to minimize the energy consumption of entire system. The simulation result shows that the scheme can get a smaller the energy consumption of the entire system, compared with MSiRSN.

Data Availability
The data used in this paper can be obtained directly in the sentences and tables of the paper or generated by combining them with the algorithm. The core steps and algorithms of data processing method are introduced in the paper in detail, too.