Modeling the Connections of Dynamic Sensor Fields Based on BT-Graph

In this article, we propose a new approach to model and optimize the dynamic sensor field for both internal network connections and LEO satellite connection based on BT-Graph. Due to the shift of LEO satellite’s orbit at each revolution, a dynamic sensor field (DSF), which is able to redetermine its gateways, is suitable to improve successful data communications. It is convenient to present a DSF as a BT-Graph that aims to utilize optimization algorithms. Parallel search algorithms are also deployed for more efficient execution time when DSFs consist of a significant large number of nodes. The simulation experiments are performed on an abstract forest fire surveillance network to validate our proposed approach. Received on 02 January, 2016; accepted on 10 February, 2016; published on 09 March, 2016


Introduction
Wireless Sensor Network (WSN) [1] is known as a network of sensors cooperatively operating in order to surveillance or collect the environmental parameters.Although the short transmission range can be compensated by applying a mesh topology, it would be economically infeasible to deploy in large geographic areas or behind obstacles (mountains, oceans, ...).To overcome these disadvantages, satellitebased wireless sensor networks have emerged as a promising technology with various applications.
Because the orbit of a LEO satellite shifts in westward direction around the polar axis at each revolution [12], the meeting points of a gateway on the Earth's surface and the LEO satellite will be changed over time.With a static sensor field, it can be occasionally unsuccessful in communication with the LEO satellite because the meeting time is not enough for data exchange [12].Therefore a dynamic sensor field (DSF) [1], which has the ability to redetermine its gateway to adapt with the * Tuyen Phong Truong.Email: phong-tuyen.truong@univ-brest.frshifts of LEO satellite's paths, is proposed to improve the connection time.
It is necessary to choose proper gateways for the longest length of connection time.Consequently, the connections between a LEO satellite and a dynamic sensor field should be presented by a graph-based model because it is convenient to determine number of neighbors in the satellite's communication range and then apply the optimization algorithms.Moreover, BT-Grap model [2] based on balltree structure is efficiently support not only for searching the range nearest neighbors (RNN) but also finding the shortest path to a given target node [4] [18] [20].In this article, we propose a new approach, namely dynamic sensor field optimization model based on BT-Graph (BT-DYNSEN), to model and optimize the DSF in communication with LEO satellite.
In addition, with the development of Compute Unified Device Architecture (CUDA), general purpose Graphics Processing Unit (GPGPU) is widely used to implement parallel algorithms, which can speed up the large and complex processing tasks [7] [8].Nonetheless, serial graph algorithms are hard to be parallelized on GPUs due to irregular memory access and huge memory-intensive operations.For this reason, we also propose parallel algorithms to improve search speed based on BT-Graph model using NVIDIA CUDA GPUs.In our work, the experimental results were deployed on parallelization of RNN algorithm and Dijkstra's shortest path search algorithm.
The rest of this article is organized as follows.In section 2, we overview related works.Section 3 presents the graph-based model for a DSF based on BT-Graph (BT-DYNSEN).How to optimize the DSF for satellite connection is presented in section 4. Implementation of BT-DYNSEN is described in section 5. Section 6 gives the simulation experiments on an abstract network for forest fire surveillance in Vietnam before a conclusion is drawn.

Related work
The LEO satellite communication can be used in mobile satellite communications, surveillance the Earth surface, geological surveys, so on [1] [16] [19].In the last decade, researches on communication services provided by LEO satellites have focused on several main directions such as optimizing the mechanics, interconnections, electric circuits, power supply.On another approach, many surveys show the research topics in design trajectory, handover traffic and constellation, as well as design protocols, radio frequencies, onboard transceivers and antenna designs [13] [14] [1] [19].However, the direct radio links between sensor fields and LEO satellites are not considered in literature.In recent years, it emerges as an attractive topic because of the current innovation solutions such as LoRa Semtech and solutions from vendors QB50 [11].
Furthermore, graph-based model has emerged as well approach to present the structure and elaborate the performance of wireless sensor networks [3].For example, random geometric graph [20] was used to determine the probability of the whole network being connected.Secure communications between large number of sensor nodes in WSNs can be elaborated on expander graph [25] and finding transmission path in network was performed based on Pascal graph [5].Furthermore, hyper-graph [24] was utilized to support for reducing the transmission energy consumption and improving the fault-tolerant ability of the system.
Additionally, in recent years parallelization on GPU platforms is an emerging strategy to improve significantly performance speed [9].When the graph consisting of a vast number of nodes, it is necessary to process in parallel based on NVIDIA CUDA technology to improve search speed [10].In the next section, we introduce BT-DYNSEN model for optimizing the DSF for the connection with LEO satellite.

BT-DYNSEN modelof DSF
BT-DYNSEN model of a dynamic sensor field (DSF) [1] based on BT-Graph [2] is a graph G(V,E).In this graph, set of vertices V = {v i }, i = 1..n corresponds to sensor nodes and set of edges, E = {e j }, j = 1..m are connections between the nodes with associated weight functions W = {w j }, j = 1..m.The value of each w j is given by Euclidean distance d(v i , v j ), i j.Additionally, R = {r i }, i = 1..n are the radii of the communication ranges of nodes [2] [4] [6].An edge is established if and only if the distance between two nodes is less or equal to the minimum value of their communication radii, d(v i , v j ) ≤ min(r i , r j ), i j.Note that the terms node and vertex are used interchangeably in this article as a matter of convenience.
In Figure 1, for an example, a pair of vertices (v 5 , v 6 ) has communication ranges r 5 and r 6 respectively.Because the distance between v 5 and v 6 is less than r, d(v 5 , v 6 ) < r, so there exists an edge e 5 connecting them as can be seen in Figure 2. Similarly, the others edges

BT-DYNSEN modelof LEO satellite connection
The connections between a LEO satellite and a dynamic sensor field are also described in a BT-Graph.Let V = {v i }, i=1..n, is a set of sensor node coordinates in a DSF.In this scenario, connection time is defined when any sensorset [1] of the DSF under the satellite coverage.
The LEO satellite communication range is considered as a circle whose center is sub-point on the ground (subsatellite point), s.It is noted that sub-satellite point, s, is where on the ground the straight line connecting the center of the Earth and the satellite meets the Earth's surface [12].Furthermore, during the connection time only one sensor node (vertex) of a dynamic sensor field is chosen to connect with the sub-satellite point (center vertex) at one time [1].A number of different nodes could be chosen based on the value of edge weights at different times.To manage the connections, the name of chosen node is kept in Connection vector [1] and the corresponding time is saved in Time vector [1] (as in Table 1).
Table 1 shows that in connection 1, center vertex s connects with v 1 at time t 1 .In a similar way, in connection 2 at time t 2 and connection 3 at time t 3 , v 4 and v 2 are chosen to connect with s respectively.
For instance, Figure 3 shows three graphs of the dynamic sensor field in three different connections with the center vertex s (a sub-satellite point) at different

Computethe connectiontime
In this section, we describe the way to calculate connection time, t ij , between a LEO satellite and a gateway of DSF, v j [1] [12] [15].Similarly, the calculation could be applied for all other nodes.Note that every node of the sensor field is assumed as a gateway for the connection with the satellite in calculating the values of connection time.
First, it is necessary to define the angles and related distances between satellite, a gateway on the ground and the Earth's center.The parameters are indicated on Figure 4.For angular radius of the spherical Earth, ρ i , and the angular radius λ 0 i can be found from relations where R E = 6378.14km is the Earth's radius and H is the altitude of the satellite above the Earth's surface.
With the coordinates of a sub-satellite point, s i (Long s i , Lat s i ) along each satellite's ground track and a sensor node, nodes v j of the DSF (Long v j , Lat v j ), and defining ∆L ij = |Long s i − Long v j |, the azimuth, Φ E ij , measured eastward from north, and angular distance, λ ij , from the sub-satellite point to the sensor node (see Figure 5) are given by where 4), the distance, d ij , between s i and v j can be found using the law of cosines: The connection time, t ij , is given by where P is the orbit period in minutes.From Equations ( 5) and ( 6), the communication duration, t ij , strongly depends on how close the nodes v j is to the sub-satellite points s i , the distances d ij , along the ground track on any given orbit pass [12].

Constraint
The altitude of a LEO satellite must be in range from 275 km to 1400 km due to atmosphere drag and Van Allen radiation effects [12].Besides, the experimental results were announced by High Altitude Society in United Kingdom that LoRa SemTech transceivers can communicate in distance up to 600 km in environment without any obstacle and 20-40 km in urban area [22].Based on these factors, maximum communication range for all nodes in long range sensor fields is 40 km in this work.LEO's satellites are chosen in our experiments must have the orbit altitude less than 600 km.Furthermore, the satellite's relative speed over a fixed point on the Earth's surface must be around 7.5 -8.0 km/sec [12].The speed of the satellite is calculated by Equation 7 shows that the speed of the satellite in orbit is in inverse proportion of its altitude [12].Where G is universal gravitational constant (G = 6.67x10 −11 Nm 2 /kg 2 ) and m E is the mass of the Earth (m E = 5.98x10 24 kg).With orbit altitude of satellite in range 300-600 km, the speed of satellite on orbit must be in range 7.56-7.73km/sec.

Verify the connectivityof DSF
In this work, top down construction algorithm is chosen in order to build balltree structure for verifying the network connectivity of the DSF.In this manner, the time complexity can be found in O(nlog 2 n) [6].
Algorithm 1 Verify the network connectivity of a DSF Let c is the dimension of greatest spread 7: Let L, R are the set of points lying to 2 subsets 8: Let r is a radius of ball 9: Create B with two children: end if 15: end procedure Top down algorithm to construct the balltree is a recursive process from top to down.The process at each step is to choose the split dimension it and then split the set of values into two subsets.First, it is necessary to choose the point in the ball which is farthest from its center,p 1 , and then choose a second point p 2 that is farthest from p 1 .It is followed by assigning all points in the ball to closest one of two clusters corresponding to p 1 and p 2 .Finally, the centroid of each cluster is calculated and the minimum cluster radius for enclosing all the points are determined.This process is stopped only when the leaf balls contain just two points.Note that D denotes current considered balltree structure and B denotes leaf node defined after each process.

Determinethe sensorsets corresponding to each sub-satellite point
Defining a sensorset [1]  end if 14: end procedure There are two different cases in BT-DYNSEN algorithm as follows.If current considered node is a leaf node and the distance from query point q to B is less than r (d < r), the obtained result is updated by adding B into Q.Otherwise, if B is not a leaf node and the distance from query point q to B is less than the total of r and the radius of B (d < r + B.radius), it is necessary to perform recursive algorithm for the two child nodes of a parent node B: left-child and right-child.

Select the gateways of DSF
If a DSF, V , has n nodes, there are 2 n − 1 connection items, G = {g l }, l=1..(2 n − 1).It is necessary to find out a set of proper nodes which play as gateways of DSF to provide the longest length of time for the connection.To do this, the association analysis algorithm [18] is applied.In this way, a DSF is represented in a binary format, where each row corresponds to a connection item and each column corresponds to a node.A node value is one if the node appears in a connection item and zero otherwise.Weight of a connection item determines how often a connection item is applicable to a set of connection items.The weight of a connection item, g i ∈ G, can be defined as w(g i ) =| {g l | g i ⊆ g l , g l ∈ G} |, where the symbol | .| denotes the number of elements in a set.
The algorithm for selecting the gateways of the DSF is briefly presented in following list.
For example, a DSF with 4 nodes, V = {v 1 , v 2 , v 3 , v 4 } is shown in Figure 6.There are 4 sensorsets for (k=2;Lk.count>0;k++)do 6: for each transaction t ∈ data do 8: Increment count of the candidate sensors in C k+1 that contained in t Write counted frequent of all sensors L k to file 13: end procedure Table 2.The weightsof connectionitemsin a DSF with4 nodes.

Connectionitems Weights
connection is longest.Because the weight of connection item (v 1 , v 3 ) is highest, this connection is chosen.

Find shortest path for data dissemination
The problem of finding shortest path from each sensor node of DSF to the gateway can be solved by a graph search method.The algorithm is presented as Algorithm 4. The algorithm proceeds in three following steps.First, the balltree graph-based model, G, is constructed.At the next step, the weight matrix M for edges connect each pair of vertices (sensor nodes) in V is computed based on their coordinates.For v i , v j are two different vertices in V , in case of v i ≡ v j the edge weight is 0. If v i v j , the edge weight is given by d(v j , v j ) if d(v j , v j ) ≤ r, otherwise it is infinity, ∞.Finally, the shortest path from q to e in the weight matrix is figured out.Note free is an array 7: trace is as array 8: while TRUE do for v ← 0 to n-1 do  end while 29: end procedure that q is starting point (a sensor node) and e is the destination point (the gateway of DSF).

Parallelization of RNN algorithmto determine sensorsets
As mentioned in section 4.2, range nearest neighbors (RNN) search method on BT-Graph can be used to determine the set of nodes in a sensorset associated with each position of satellite along ground track.In this section, a greedy algorithm is proposed to nearest neighbors search running on CUDA (namely RNN-CUDA as shown in Algorithm 5).The process of this greedy algorithm consists of two part.One part is parallel processes on GPU to compute distances from query the point to all nodes of a dynamic sensor field.Another part runs on CPU to sort the obtained distances in ascending order and then pick up k neighbor nodes associated with shortest distance values.

Parallelization of search algorithmto fin the shortest path for data dissemination
To parellelize Dijkstra algorithm, we propose that each edge of BT-Graph is handled by a thread of CUDA. Figure 7 depicts the flow chart of parallel Dijkstra algorithm for searching BT-Graph model in which two procedures, Extract min and Update cost, are performed on NVIDIA GPUs.The parallelization of Dijkstra's algorithm is illustrated in Algorithm 6.

BT-DYNSEN implementation
We have developed the BT-DYNSEN tool in C/C++, that enables to model and optimize the connection time between a dynamic sensor field with a LEO satellite.GPredict [17] is used to provide the information about BEESAT-3 satellite's path.Besides, NetGen tool [21] is utilized to generate the abstract network of a 50-node dynamic sensor field from geographic data provided by Google maps service.The obtained result are the nodes of the DSF which should be configured as gateways for the best connection duration time and the shortest paths for data dissemination from each node to these gateways.-Search for a free vertex u that has the least cost from the starting vertex S to u + If no vertex u is found, either it exists a path or not + Otherwise, from u we continue to consider the other free vertices -Use CUDA to specify the thread for searching the paths between the vertex u and the others 5: Step 5: Copy results from GPUs memory to CPU memory 6: Step 6: Free device memory and host memory

Experiment 1: Verify networkconnectivity
The connectivity of the 50-node dynamic sensor network was verified by applying BT-DYNSEN as shown in Figre 8(a). Figure 8(b) depicts the balltree structure of this DSF in which there are 49 balls with radii from 10.124m to 321.165m.BT-Graph model then was utilized to ensure the full connectivity of all network nodes, the radius 30.497m was then chosen as shown in Figure 8(c).

Experiment 2: Determinethe sensorsets
BT-DYNSEN tool was employed in determining sensorsets corresponding to sub-satellite points during visiting time.The map in Figure 9 shows the sensorset was determined with sub-satellites of BEESAT-3 at (latitude: 14.00, longitude: 102.48) in orbit 12794.Subsatellite and satellite coverage were indicated by solid  red square and red circle repectively.The sensorset consists of 19 sensor nodes which were under the satellite's coverage area (the shadow area).There are four sensorsets were created along the BEESAT-3's ground track in orbit 12794.

Experiment 3: Select the gateways
With each sensorset, a subset of connections is established.The weights of each connection in subset are then computed.A set of connection items is created by combining these subsets.The best connection is chosen based on the weights of connection items.For instance, in Figure 10 node v 36 was chosen as the gateway of the 50-node DSF to connection with BEESAT-3 satellite in orbit 12794 because its weight is highest in sensor nodes.

Experiment 4: Optimizedata dissemination
To ensure sensing data to be collected from all sensor nodes and then sent before the satellite leaving, it is necessary to find the shortest path from each sensor nodes to the gateway.The interconnection weights within the DSF are geographic distances between each pair of nodes that were carried out by applying BT-DYNSEN model.Figure 11, as an example, illustrates the chosen path (the bold blue line) for data dissemination from sensor node v 50 to the gateway node v 36 .

Experiment 5: Parallelization RNN algorithmfor determiningsensorsets
In order to make the comparison between the parallel algorithms and serial ones for searching BT-Graph, we have run the simulations on a computer which is equipped with a INTEL Core i3-3220 3.3GHz processor, 4GB DDR3 SDRAM and a NVIDIA GeForce GTX660 graphic card.In our experiment, a comparison about BT-Graph's search speed is obtained by performing both sequential algorithm on CPU and parallel algorithm on GPUs.On each algorithm with the same input data, which are generated randomly by program, experimental program is executed in 10 times for getting the average value of execution time.
The results is illustrated in Table 3, where N is the amount of initial data points and Q is a number of query points.It shows that the search speed of RNN-CUDA be improved around 2.37 folds compared with that of RNN BT-Graph.From Figure 12, CPU can process efficiently for a small a number of vertices because it not waste extra time copying the data between CPU and GPU memories.Nevertheless, when a number of vertices are increased more than 8000, the duration time required for processing can be reduced significantly by using techniques of parallelism based on CUDA.

Conclusion
Based on BT-Graph, we have described a new approach in order to model and optimize the dynamic sensor field for LEO satellite connections.The distances between the sub-satellite points and each node of the sensor field is utilized as a key factor to find out the proper gateways for the longest connection time.The experimental results were obtained by applying several appreciate algorithms on BT-DYNSEN model to verify the connectivity of network, determine sensorsets at visiting time, choose set of gateway nodes and find shortest path for data dissemination in DSF.In order to improve the execution time, we implemented the corresponding parallel algorithms with CUDA on GPU, and analyzed its performance.The results show that the parallel algorithm on GPU is considerably superior to the serial one on CPU when BT-Graphs comprising more than 8000 vertices.Thus, our proposed graphbased model helps to increase the amount of time for data communications in long-range sensor field applications using satellite connections.

Figure 1 .
Figure 1.A dynamic sensor fiel in which the communication ranges of sensor nodes are indicated by the radii of balls.

of this graph namely e 1 =
e(v 1 , v 2 ), e 2 = e(v 1 , v 3 ), e 3 = e(v 2 , v 3 ), e 4 = e(v 3 , v 4 ) could be established.There are 2 n − 5 edges between a pair of nodes of this graph that are not existed due to inadequacy of the condition.The vertex v 7 is isolated because all distance values between it and the other nodes are inadequate to the condition.
The associated BT-Graph consists of n + 1 vertices P = {V , s} = {v 1 , v 2 , ..., v n , s}.If a node is within the communication range of the satellite, there exists an edge with weight given by the Euclidean distance between them.Otherwise edge weight is set to infinity.Consequently, the number edges of the graph are m + n by adding n new edges C = {c 1 , c 2 , ..., c n } with c i = c(s, v i ), i = 1..n.The weights of the n new edges are denoted by Z = {z 1 , z 2 , ..., z n }.In this case the set of edges is R = {E, C} = {e 1 , e 2 , ..., e m , c 1 , c 2 , ..., c n } and the set of corresponding weights is Q = {W , Z} = {{w k }, {z i }} with k = 1..m, i = 1..n.Hence the BT-DYNSEN model for LEO satellite connections is presented by a graph G(P,R) with weight functions Q.

Figure 3 .
Figure 3.The BT-Graph of a dynamicsensor fiel in three di˙erent connections(solid red lines) at times t 1 , t 2 and t 3 .

: procedure selectGateway 4 :L 1 ←
4 } and A 4 = {v 3 , v 4 }.The weights of connection items are presented in Table 2.The connection with the highest weight corresponds to the least number of times required to change the gateways.It leads to the connection duration time of the Algorithm 3 Select the gateways of a DSF Input: list of sensorsets Output: gateways of DSF 1: C k : candidate sensors (size k) 2: L k : set of selected gateways (size k) 3{weight1 − sensorsets} 5:

Figure 6 .
Figure 6.The connectionsbetween a 4-node DSF with a LEO satellite.

Algorithm 4
on Context-aware Systems and Applications 02 -03 2016 | Volume 3 | Issue 8 | e Tuyen Phong Truong, et al.Find shortest path from each sensor node of DSF to the gateway 1:

Figure 10 .
Figure 10.Select a set of nodes whichplay as gateways of the DSF accordingto the weights of connections.
based on BT-DYNSEN is to find k nearest sensor nodes (neighbors) under the satellite's coverage area at each sub-satellite.It is a depth-first traversal algorithm for traversing tree or graph data structures, starting with the root node.The value of Q 4 EAI European Alliance for Innovation EAI Endorsed Transactions on Context-aware Systems and Applications 02 -03 2016 | Volume 3 | Issue 8 | e is updated during search process.At each considered node B, Q obtains k points which are nearest query q as following algorithm.if d < (query.range+ radiusNode) then

Table 3 .
The shortest path for data disseminationfromnode v 50 to gateway node v 36 .Comparisonon the executiontime of RNN BT-Graph and RNN-CUD A.