Next Article in Journal
3D Radiation Pattern Reconfigurable Phased Array for Transmission Angle Sensing in 5G Mobile Communication
Previous Article in Journal
A Collaborative UAV-WSN Network for Monitoring Large Areas
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Above-Threshold Queries of Environmental Conditions Based on Bilinear Interpolation in Wireless Sensor Networks

Beijing Advanced Innovation Center for Materials Genome Engineering, Beijing Engineering and Technology Research Center for Convergence Networks and Ubiquitous Services, School of Computer and Communication Engineering, University of Science and Technology Beijing(USTB), Beijing 100083, China
*
Author to whom correspondence should be addressed.
Sensors 2018, 18(12), 4203; https://doi.org/10.3390/s18124203
Submission received: 23 September 2018 / Revised: 21 November 2018 / Accepted: 23 November 2018 / Published: 30 November 2018
(This article belongs to the Section Sensor Networks)

Abstract

:
Wireless sensor networks can be regarded as sensor database systems, which permit users to query sensor data of interest. Among various spatial database queries, we focus the area-wise aggregate queries in the region where the sensor values are above a predefined threshold, which are summarized as above-threshold queries. In this paper, we propose a novel Bilinear Interpolation-Based (BIB) algorithm, which utilizes the bilinear interpolation to estimate the environmental variables inside a grid with the known sensor values at the vertexes, to support the above-threshold queries for regularly-deployed sensor networks and provide the closed-form solution of the above-threshold ratio. We designate experiments with both the artificially-constructed environment data and the real temperature data. Experiment results manifest that the proposed BIB algorithm shows a good performance in estimating the above-threshold ratios to support the above-threshold queries in an accurate and efficient manner.

1. Introduction

Wireless sensor networks are sharply emerging as one of the most significant technologies to bridge the gap between the physical world and the digital world [1,2,3]. In order to sense spatial natural phenomena in the physical world remotely, wireless sensor networks usually consist of many smart energy-efficient devices, namely sensor nodes that are equipped with inexpensive embedded sensors, processors, memories, radio communication modules, and power supplies to gather environmental conditions, ranging from temperature, precipitation, smoke, soil humidity to atmospheric pressure, to name a few. Wireless sensor networks provide us prolific spatiotemporal environment data and will play important roles in many applications, including environmental monitoring, target tracking, precision agriculture, and so forth [4,5,6,7,8,9].
Since data are constantly being sent from sensors, wireless sensor networks can be regarded as sensor database systems, such as TinyDB [10]. The ability to apply various kinds of data-querying techniques to sensors and process data is highly desirable. Various methods and techniques of data storage and data query have been proposed, which permit users to manage sensor data of interest [11,12].
Spatial database queries, which gather environmental variables, from the perspective of geography, inside a particular geographical region of interest (ROI), have become one of the primary technologies due to the spatial characteristics of the collected environmental conditions [13,14]. As one of the various kinds of spatial database queries, window queries mainly refer to those that retrieve the sensor data inside a specified geographical window, e.g., a two-dimensional rectangular region { ( X , Y ) | X m i n X X m a x , Y m i n Y Y m a x } [15]. Some complicated spatial queries are used to determine the region in which the sensor values satisfy a predefined condition [16,17,18]. For example, in Ref. [19], in order to find out the relationships between the weather and the habitats of animal species, scientists should query the species densities in the rainy regions and those in the sunny regions. Assume that when the humidity function H ( X , Y ) is above the rainy threshold TH humidity , it begins to rain, and vice versa. Thus, the queries should determine the region where the sensor values are above a given threshold from humidity sensors, denoted as { ( X , Y ) | H ( X , Y ) TH humidity } .
Aggregate queries, another critical type of database query, refer to the summaries of the current sensor values by implementing the basic database aggregates such as COUNT, MIN, MAX, SUM, AVERAGE, etc. [20,21]. Queries are often combined with aggregation operations to support complex analysis of environmental data [19,22]. Due to the spatial characteristics of the environmental conditions, queries should support the area-wise aggregate operation. In Ref. [23], Aslan proposed a forest fire detection and monitoring framework. In such a case, we will pay more attention to the total area where the temperature values are above a predefined threshold, i.e., the above-threshold area. An alarm should be triggered, for example, if the area of the hot subregion where the temperature is above 40 C is greater than 5 % of the total region. Here, the query will retrieve the area { ( X , Y ) | T ( X , Y ) 40 C } , and we will run the aggregate query on the spatial region determined by the sensor values, like “SELECT AREA(*) from temperature_table where T > 40 . We summarize such area-wise aggregate queries in the region where the sensor values are above a predefined threshold as above-threshold queries in this paper.
Furthermore, there are two deployment patterns in sensor networks to achieve particular environmental monitoring: random deployment and the regular (deterministic) one [24]. Although the regular deployment scheme is considered to be too ideal to implement in practical applications, it usually has better network coverage and connectivity than the random deployment [24,25,26]. Furthermore, it is practically developed in some applications such as forest fire prevention and high temperature alert [23] and offers us a basis to further our research. Thus, we will only focus on the regular deployment for wireless sensor networks.
For the regular deployment of wireless sensor networks, there are some related techniques to support the above-threshold queries. The Nearest Neighbor (NN) algorithm is a technique to estimate the environmental conditions only by the sensor data provided by the nearest sensors, which leads to a Voronoi diagram [27], to enable the accumulation of the areas of polygons, inside which the estimated environmental conditions are beyond the threshold. The Marching Square (MS) algorithm is a computer graphics algorithm to generate contours for a two-dimensional scalar field, referring to environmental conditions here, and thus also supports the above-threshold queries based on the isobars [28,29]. Both algorithms are extensively studied. However, the NN algorithm, only taking the information about whether the sensor values are greater than the threshold or not into account, is robust, but inaccurate. The MS algorithm performs the linear interpolation to estimate the environmental conditions on the edges based on the sensor values, which usually produces more accurate results. Nevertheless, the MS algorithm determines the above-threshold subregion by a straightforward connection of all the points on the edges by interpolation, and thus, the environmental conditions inside the region are not adequately considered.
In this paper, we propose a novel Bilinear Interpolation-Based (BIB) algorithm to support the above-threshold queries for regularly-deployed sensor networks. We utilize the bilinear interpolation to estimate the environmental variables inside a square with the known sensor values from sensor nodes located at its four vertexes. The information of environmental variables is taken into full consideration by performing interpolation inside the grid. Thus, the area of the above-threshold subregion can be obtained by mathematical formulation, and finally, we propose the closed-form solution of the above-threshold ratio. In order to evaluate the performance of different above-threshold query algorithms, we first use the Kriging interpolation, which can be regarded as the gold standard to compare the interpolation weights of various algorithms. The results of theory analysis show that the proposed BIB above-threshold algorithm is an approximation of the Kriging algorithm, while the NN algorithm has a large calculation error in geographic data analysis. Then, we perform the artificially-constructed environment data experiment and real temperature data experiment to draw the boundaries and check the metrics of False Positives (FP), False Negatives (FN), and Mean Squared Error (MSE). Experiment results show that the proposed BIB algorithm has a good performance in estimating the above-threshold ratios to support the above-threshold queries in an accurate and efficient manner.
The rest of the paper is organized as follows. Section 2 discusses related works on the applications of the regular deployment sensor networks and enumerates the database management techniques for window queries and aggregate queries. Section 3 presents the system model and formulates the problem. Section 4 introduces the bilinear interpolation-based above-threshold query algorithm. Section 5 describes the experiments and discusses the results. Finally, Section 6 concludes this paper.

2. Related Work

Quite extensive distributed database management techniques have been proposed to support the spatial queries, mainly the window queries. Berchtold et al. [30] proposed a pyramid technique to index data in the high-dimensional database system, which is efficient for window queries. In Ref. [31], Ooi et al. presented another tunable index scheme called iMinMaxfor high-dimensional window queries, which was less complex and performed better than the pyramid technique. However, there are two major issues impeding the window queries: the lack of explicit window semantics and the low implementation efficiency. To solve this problem, Li et al. [22] established a window query technique framework by defining window semantics to avoid the intra-operator buffers and the reprocessing tuples. However, the previous works have not yet explored the spatial property in sensor network databases. Xu et al. [32] investigated a framework of spatial window query in dynamic sensor networks. To further simplify the query process, Xu et al. [33] proposed an infrastructure-free window query technique in sensor networks. Ku et al. [34] presented an approach to reduce the access latency of the spatial queries, e.g., window queries, by utilizing the neighbor information in wireless broadcast environments. The geographical location information can guide the window queries due to the spatial correlation, and the inspiration of the spatial-aware approach can also be used in wireless sensor networks. The existing database management techniques mainly focus on the geographical coordinate-type window queries, i.e., the traditional window queries, rather than the spatial region determined by environmental values. The environmental value-determined spatial region was also studied [19,23]. Note that the window queries are not only restricted to the spatial coordinators, but also applied to the environmental conditions. The latter window queries to retrieve the sensor values inside a predefined interval were discussed [16,17,18]. It is obvious that such queries degenerate into above-threshold ones if the lower bound of the query window is the threshold and the upper bound is assigned to the positive infinite.
The spatial queries combined with aggregate operation, which are closely related to the above-threshold query techniques in this paper, have also been studied and used in some environmental monitoring applications. In order to figure out the influence factors of climate changes, Wang et al. [35] established a window query algorithm to support various aggregate queries on three-dimensional time-varying datasets, such as the AVERAGE, MIN, and MAX operations.
The deployment is significant for sensor networks. A regular deployment pattern is important in some scenarios such as disaster alert [24,25,26]. In Ref. [36], Bulusu proposed a GPS (Global Positioning System)-less low-cost outdoor localization model for small devices, e.g., sensors, which are placed in a regular mesh structure. Wang et al. [37] proposed a deployment algorithm in an arbitrarily-shaped region and used the regular sensor patterns in a region with boundaries and obstacles. In Ref. [38], the typical regularly-deployed oilfield with an area of 8 × 8 km required approximately a 50–100 m distance between the sensors in seismic analysis. In Ref. [23], Aslan proposed a forest fire detection and monitoring framework and implemented it in regularly-deployed wireless sensor networks. Two popular layout models—square layout, i.e., temperature sensors are placed at the corners of squares, and hexagonal layout, i.e., sensors are placed at the corners of the hexagons—were adopted.
To estimate the environmental conditions at a given location to support spatial queries, the NN and MS algorithms are usually used. The former estimates the environmental conditions only by the nearest sensors, while the latter generates the isobars by the linear interpolation on the edges. Both are applicable to the above-threshold queries. The NN algorithm is simple, and its computation workload and local communication traffic load are small. The MS algorithm is more accurate by taking the environmental conditions on the edges into account. However, neither adequately exploits the sensor values to better the interpolation of the environmental conditions inside the region.
Thus, the idea to fully exploit the sensor values to better the interpolation inside the region inspires us to propose a novel BIB algorithm for the above-threshold queries. With small incrementation of the computation workload and the local communication traffic, the proposed BIB algorithm performs interpolation inside the region and deduces a closed-form above-threshold query solution. It is not only more accurate than the NN and MS algorithms, but also accordant with the gold standard in the geographical sense.

3. System Model and Problem Formulation

In this section, we present the system model and formulate the problem.

3.1. System Model

Consider a wireless sensor network deployed in a predefined square region R, consisting of N sensor nodes, e 1 , e 2 , , e N . Each sensor node senses and then transfers the environment condition data to the database server. Let f ( x , y ) be the environmental variable at the position with the coordinate ( x , y ) . For a given threshold T, the above-threshold (sub-)region query is used to evaluate the above-threshold region R T , which is defined as:
R T { ( x , y ) | f ( x , y ) T , ( x , y ) R } .
The above-threshold ratio is then defined as:
C T R T R
where X is the cardinality, i.e., the area of the region X.
Suppose that the region R is split into many regular non-overlapping rectangle grids, as depicted in Figure 1. All the rectangle subregions are listed as S = S 1 , S 2 , , S m , where m is the total number of rectangle subregions.
There are four sensor nodes distributed at four vertexes of S i . Sensors can gather environmental variables, which can be used to estimate the above-threshold ratio. Notice that adjacent rectangles may share some sensor nodes.
Then, the area-wise above-threshold ratio is given by:
C T = i = 1 m S T i i = 1 m S i = i = 1 m S T i R
where S T i is defined as
S T i { ( x , y ) | f ( x , y ) T , ( x , y ) S i } .

3.2. Problem Formulation

Our goal is to estimate the above-threshold ratio C T . From Equation (3), we can obtain C T by summing the above-threshold area limited inside each S i . Thus, the next objective is to calculate S T i according to the coordinates and the sensor values of the four vertexes in S i .
Without loss of generality and for the sake of simplicity, we only consider one of the rectangle subregions and rewrite such a region S i as S. The vertex coordinates of rectangle S are A ( x A , y A ) , B ( x B , y B ) , C ( x C , y C ) , and D ( x D , y D ) , and the sensor values at four vertexes are f A , f B , f C , and f D , respectively. Let W and H be the length and the height of S, as shown in Figure 2.
Now, the goal is to calculate the above-threshold area inside S with length W and height H under the condition of known coordinates and the sensor values of four vertexes. The above-threshold region S T in S is defined as:
S T { ( x , y ) | f ( x , y ) T , ( x , y ) S } .

4. Bilinear Interpolation-Based Above-Threshold Query Algorithm

In this section, we propose the bilinear interpolation-based algorithm and describe the nearest neighbor algorithm and the marching square algorithm. Furthermore, we introduce the evaluative metrics of mean squared error, false positive, and false negative.

4.1. Coordinate Transformation and Boundary of the Above-Threshold Region

In order to simplify the calculation, we perform a translation and an affine transformation to convert the coordinate ( x , y ) inside S to ( u = x x A W , v = y y A H ) . Now, the region S is converted into a unit square with u A = 0 and v A = 0 . Thus, we have S = ( u , v ) | 0 u 1 , 0 v 1 . To obtain the original above-threshold area, the result in this subsection should be multiplied by W · H due to the area unit d x · d y = W · H · d u · d v .
We utilize the bilinear interpolation to estimate the environmental variables inside S. Bilinear interpolation is a widespread interpolation algorithm for two variables on a two-dimensional grid. It is an extension of linear interpolation for one variable. The key idea of bilinear interpolation is to perform linear interpolation first in one direction and then again in the other direction. Although each step is linear, the bilinear interpolation as a whole is not linear, but rather, quadratic.
The sensor value at arbitrary point ( u , v ) inside S can be interpolated by the sensor values of four vertexes based on bilinear interpolation. Denote f ^ ( u , v ) as the estimated environmental variable. Thus,
f ^ ( u , 0 ) = ( 1 u ) f A + u f B , f ^ ( u , 1 ) = ( 1 u ) f D + u f C , f ^ ( u , v ) = ( 1 v ) f ^ ( u , 0 ) + v f ^ ( u , 1 ) = a 11 u v + a 10 u + a 01 v + a 00
where:
a 11 = f A + f C f B f D , a 10 = f A + f B , a 01 = f A + f D , a 00 = f A .
For the four-vertex interpolation in S = ( u , v ) | 0 u 1 , 0 v 1 , the estimated sensor value of arbitrary coordinate ( u , v ) in the square is given by:
f ^ ( u , v ) = W T ( u , v ) · f A f B f C f D
where W ( u , v ) is a 4 × 1 matrix, which implies the interpolation weights of four vertexes. We can conclude from Equations (6) and (7) that:
W BIB ( u , v ) = u v u v + 1 u u v u v v u v .
Denote the estimated above-threshold region S ^ T as { ( u , v ) | f ^ ( u , v ) T , ( u , v ) S } and the estimated above-threshold ratio C ^ T as 1 R · i = 1 m S ^ T i . The boundary of S ^ T , which lies between the above-threshold part and the below-threshold one, is given by:
f ^ ( u , v ) = a 11 u v + a 10 u + a 01 v + a 00 = T .
The boundary f ^ ( u , v ) = T is hyperbolic if a 11 0 and is degraded to a straight line if a 11 = 0 . Various situations for the boundaries and the above-threshold regions with the BIB algorithm are shown in Figure 3. The solid black circles on the vertexes represent the above-threshold values, and the hollow ones represent the below-threshold values. The threshold T is assigned as zero. The black lines are the boundaries where f ^ ( u , v ) = T , and the shaded areas are the above-threshold regions where f ^ ( u , v ) T . In such a concrete case, the sensor values at points A, B, C, and D are assigned to ± 3 , ± 2 , ± 4 , and ± 1 , respectively, depending on whether the sensor values are above or below the threshold.

4.2. Above-Threshold Area and Above-Threshold Ratio

The above-threshold area | S ^ T | can be discussed for different cases. If the boundary is hyperbolic ( a 11 0 ), the expression of f ^ ( u , v ) can be transformed to:
f ^ ( u , v ) = a 11 u ^ v ^ + Q
where:
u ^ = u + a 01 a 11 ,
v ^ = v + a 10 a 11 ,
Q = a 00 a 11 a 01 a 10 a 11 .
The boundary f ^ ( u , v ) = a 11 u ^ v ^ + Q = T is equivalent to u ^ v ^ = E where E = T Q a 11 . Let G E denote the region u ^ v ^ E , defined as:
G E = ( u ^ , v ^ ) | u ^ v ^ E .
If a 11 > 0 , S ^ T is the intersection of the region G E and the region S ^ , or precisely, S ^ T = S ^ G E . Otherwise, if a 11 < 0 , we have S ^ T = S ^ \ G E . Without loss of generality, we only discuss the case of a 11 > 0 . The illustrations of the boundaries and the above-threshold regions in the u ^ o v ^ plane if a 11 > 0 are shown in Figure 4.
We denote an auxiliary function k ( E , u ^ 0 , v ^ 0 ) as
k ( E , u ^ 0 , v ^ 0 ) = 0 u ^ 0 0 v ^ 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^
where 𝟙 X ( u , v ) is the characteristic function of the set X , which satisfies:
𝟙 X ( u , v ) = 1 i f ( u , v ) X , 0 o t h e r w i s e .
Furthermore, let us define:
U = [ 0 , u ^ 0 ] u ^ 0 0 , [ u ^ 0 , 0 ] u ^ 0 < 0 ,
V = [ 0 , v ^ 0 ] v ^ 0 0 , [ v ^ 0 , 0 ] v ^ 0 < 0 .
Denote the symbol “+” as the positive sign of E, u ^ 0 , or v ^ 0 and the symbol “−” as the negative one. For example, the notation “ + + + ” of the symbol k + + + ( E , u ^ 0 , v ^ 0 ) indicates that all the independent variables E, u ^ 0 , and v ^ 0 are positive.
There are two situations if E > 0 , u ^ 0 > 0 and v ^ 0 > 0 . If u ^ 0 v ^ 0 E , the function value k + + + ( E , u ^ 0 , v ^ 0 ) = | G E ( U × V ) | is the area of the shaded region shown in Figure 5a. Otherwise, the function value k + + + ( E , u ^ 0 , v ^ 0 ) = 0 , as shown in Figure 5b.
Thus, we have:
k + + + ( E , u ^ 0 , v ^ 0 ) = 0 u ^ 0 0 v ^ 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = u ^ 0 v ^ 0 E E l n u ^ 0 v ^ 0 E u ^ 0 v ^ 0 E , 0 u ^ 0 v ^ 0 < E .
Similarly, the result of E > 0 , u ^ 0 < 0 , and v ^ 0 < 0 can be calculated by:
k + ( E , u ^ 0 , v ^ 0 ) = u ^ 0 0 v ^ 0 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = u ^ 0 v ^ 0 E E l n u ^ 0 v ^ 0 E u ^ 0 v ^ 0 E , 0 u ^ 0 v ^ 0 < E .
In the same way, we have:
k + + ( E , u ^ 0 , v ^ 0 ) = 0 ,
k + + ( E , u ^ 0 , v ^ 0 ) = 0 .
So far, all the cases of E > 0 have been taken into consideration.
If E < 0 , u ^ 0 > 0 and v ^ 0 > 0 , we always have u ^ 0 v ^ 0 > E , then:
k + + ( E , u ^ 0 , v ^ 0 ) = u ^ 0 v ^ 0 .
Similarly, if E > 0 , u ^ 0 < 0 and v ^ 0 < 0 , we have:
k ( E , u ^ 0 , v ^ 0 ) = u ^ 0 v ^ 0 .
There are two situations for E < 0 , u ^ 0 < 0 and v ^ 0 > 0 . If u ^ 0 v ^ 0 E , the function value k + ( E , u ^ 0 , v ^ 0 ) = u ^ 0 v ^ 0 , as shown in Figure 6a. Otherwise, the function value k + ( E , u ^ 0 , v ^ 0 ) = | U × V G E | .
Therefore,
k + ( E , u ^ 0 , v ^ 0 ) = 0 u ^ 0 0 v ^ 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = u ^ 0 0 0 v ^ 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = E E l n u ^ 0 v ^ 0 E u ^ 0 v ^ 0 E , u ^ v ^ u ^ 0 v ^ 0 < E .
Similarly, the result of E < 0 , u ^ 0 > 0 , and v ^ 0 < 0 is given by:
k + ( E , u ^ 0 , v ^ 0 ) = 0 u ^ 0 0 v ^ 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = 0 u ^ 0 v ^ 0 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = E E l n u ^ 0 v ^ 0 E u ^ 0 v ^ 0 E , u ^ 0 v ^ 0 u ^ 0 v ^ 0 < E .
If E = 0 , we can see from Figure 4c that k 0 + + ( E , u ^ 0 , v ^ 0 ) = k 0 ( E , u ^ 0 , v ^ 0 ) = u ^ 0 v ^ 0 and k 0 + ( E , u ^ 0 , v ^ 0 ) = k 0 + ( E , u ^ 0 , v ^ 0 ) = 0 .
The function value k ( E , u ^ 0 , v ^ 0 ) in different cases is listed in Table 1. The symbol “∗” can be either “+”, “−”, or “0”, implying the positive or the negative sign of u ^ 0 or v ^ 0 .
In the coordinate system ( u ^ , v ^ ) , the original coordinates of four vertexes are converted into:
A ^ = ( u ^ A , v ^ A ) = a 01 a 11 , a 10 a 11 ,
B ^ = ( u ^ B , v ^ B ) = 1 + a 01 a 11 , a 10 a 11 ,
C ^ = ( u ^ C , v ^ C ) = 1 + a 01 a 11 , 1 + a 10 a 11 ,
D ^ = ( u ^ D , v ^ D ) = a 01 a 11 , 1 + a 10 a 11 .
For similarity, let us define H E ( P ) k ( E , u P , v P ) . When considering various practical situations, no matter where the square S lies, the above-threshold area | S ^ T | is always provided by:
S ^ T = u ^ A u ^ C v ^ A v ^ C 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = u ^ A 0 v ^ A 0 + 0 u ^ C 0 v ^ C + u ^ A 0 0 v ^ C + 0 u ^ C v ^ A 0 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = 0 u ^ A 0 v ^ A 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ + 0 u ^ C 0 v ^ C 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ 0 u ^ A 0 v ^ C 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ 0 u ^ C 0 v ^ A 𝟙 G E ( u ^ , v ^ ) d u ^ d v ^ = H E ( A ^ ) H E ( B ^ ) + H E ( C ^ ) H E ( D ^ ) .
When a 11 < 0 , the above-threshold area | S ^ T | is the total area | S | , subtracting the area | S T | for a 11 > 0 . We have:
S ^ T = 1 H E ( A ^ ) H E ( B ^ ) + H E ( C ^ ) H E ( D ^ ) .
If a 11 = 0 , the boundary is degraded into a straight line and can be transformed to:
f ^ ( u , v ) = a 10 u + a 01 v + a 00 = T .
Then, the above-threshold area | S ^ T | can be calculated according to the following four steps:
Step 1. If f ^ ( u A , v A ) T , add A ( u A , v A ) to the ordered set U.
Step 2. If the edge A B ¯ is intersected with the boundary f ^ ( u , v ) = T at the point F ( u F , v F ) that satisfies f ^ ( u F , v F ) = T , append F ( u F , v F ) to the ordered set U.
Step 3. Similarly, judge if the point B, the intersection between B C ¯ and f ^ ( u , v ) = T , the point C, the intersection between C D ¯ and f ^ ( u , v ) = T , the point D, and the intersection between D A ¯ and f ^ ( u , v ) = T should be added to the ordered set U according to the principles in Step 1 and Step 2.
Step 4. If ordered set U = , | S ^ T | = 0 . Otherwise, | S ^ T | is equal to the area of the polygon of which the vertexes are listed in the ordered set U.
So far, the above-threshold area | S ^ T | inside the subregion S is obtained by the bilinear interpolation for all the cases.
We propose a bilinear interpolation-based algorithm to estimate the above-threshold ratio in a predefined region, as shown in Algorithm 1.
Algorithm 1 BIB algorithm.
Input: Region R, threshold T, the four coordinates ( x A , y A ) , ( x B , y B ) , ( x C , y C ) , and ( x D , y D ) , and the four sensor values f A , f B , f C , and f D of all S i , the heights and the widths of all S i
Output: C ^ T
1:for i 1 , m do
2: S S i .
3: Calculate a 11 , a 10 , a 01 , and a 00 with reference to S.
4:if a 11 0 then
5:   u ^ u + a 01 a 11
6:   v ^ v + a 10 a 11
7:   Q a 00 a 11 a 01 a 10 a 11
8:   E T Q a 11
9:  Calculate H E ( A ^ ) , H E ( B ^ ) , H E ( C ^ ) , H E ( D ^ ) .
10:   S H E ( A ^ ) H E ( B ^ ) + H E ( C ^ ) H E ( D ^ ) .
11:  if a 11 > 0 then
12:    S ^ T W · H · S
13:  else
14:    S ^ T W · H · ( 1 S )
15:  end if
16:else
17:   U { }
18:  for j [ A , A B ¯ , B , B C ¯ , C , C D ¯ , D , D A ¯ ] do
19:   if j in [ A , B , C , D ] then
20:    if f ^ ( u j , v j ) T then
21:     Add j to U.
22:    end if
23:   end if
24:   if j in [ A B ¯ , B C ¯ , C D ¯ , D A ¯ ] then
25:    if j is intersected with the line f ^ ( u , v ) = T then
26:     Add the intersection to the ordered set U.
27:    end if
28:   end if
29:  end for
30:  if U = , | S ^ T | = 0 then
31:    | S ^ T | 0
32:  else
33:    | S ^ T | is equal to the area of the polygon of which the vertexes are listed in set U.
34:  end if
35:end if
36: S ^ T i S ^ T
37:end for
38: C ^ T 1 R · i = 1 m S ^ T i

4.3. Nearest Neighbor Algorithm and Marching Square Algorithm

Both the NN and MS algorithm utilize the sensor values of four vertexes in the rectangle subregion.
In the NN algorithm, the sensor value of arbitrary coordinate ( u , v ) in subregion S is determined by that of the nearest vertex, and the interpolation weight W NN ( u , v ) in Equation (8) can be expressed as:
W NN ( u , v ) = 𝟙 [ 0 , 1 2 ] × [ 0 , 1 2 ] ( u , v ) 𝟙 ( 1 2 , 1 ] × [ 0 , 1 2 ] ( u , v ) 𝟙 ( 1 2 , 1 ] × ( 1 2 , 1 ] ( u , v ) 𝟙 [ 0 , 1 2 ] × ( 1 2 , 1 ] ( u , v ) .
The illustrations of the boundaries and the above-threshold regions with the NN algorithm are shown in Figure 7.
The MS algorithm is a computer graphics algorithm, and thus, its interpolation weight does not exist. The illustrations of the boundaries and the above-threshold regions with the MS algorithm are depicted in Figure 8. Note that there are two ambiguous situations for above-threshold calculation and boundary description. The MS algorithm is possibly considered as an approximation of the BIB algorithm, which transforms the hyperbolic boundaries by the BIB algorithm into the straight lines.
Note that in order to estimate the above-threshold coverage ratio in region R, we sum the above-threshold area limited inside each rectangle grid S i for the three algorithms. Thus, the algorithm complexities of the three mentioned algorithms are both O ( M ) , where M is the number of grids.

4.4. Evaluative Metrics

The MSE in mathematical statistics refers to the mean value of the squares of the differences between the estimated values and true values, which is given by:
M S E = 1 N e t = 1 N e ( o b s e r v e d t p r e d i c t e d t ) 2
where o b s e r v e d t represents the exact above-threshold ratio in the tth experiment, p r e d i c t e d t is the estimated above-threshold ratio obtained by different algorithms in the tth experiment, and N e is the number of experiments. A lesser MSE is better.
In statistical hypothesis testing, the FP and FN are known as type I and type II errors, where FP corresponds to the situation when the exact value is false, while the estimated value is true and FN is opposite. True Positive (TP) represents that the exact value and the estimated value are both true, and True Negative (TN) represents both false. In the above-threshold queries, the conditions of FP, FN, TP, and TN are listed in Table 2. The probability of FP and FN in a single experiment can be expressed as:
F P = 1 m i = 1 m ( S S T i ) S ^ T i | S | ,
F N = 1 m t = 1 m | S T i ( S S ^ T i ) | | S | .

5. Experiments and Discussion

In this section, we first testify to the correctness of the proposed algorithm by theory analysis. Then, we describe the experiments with both the artificially-constructed environment data and the real temperature data. All programming and benchmarking were done in Python (Version 3.6) with the Numpy [39] and pyKrige [40] libraries running on a computer with a 2600-MHz Intel processor and 8-gigabyte memories. Furthermore, we illustrate the possible implementation frameworks in wireless sensor network and analyze the algorithm complexity. Finally, we provide the evaluation and the comparison of the NN, MS, and BIB algorithms.

5.1. Theory Analysis

In geography, the Kriging algorithm is one of the most wide-spread interpolation algorithms and can be regarded as the gold standard [41].
We use the local four-point Kriging (Kr4) interpolation to validate the performance of the proposed algorithm. Assume that the Kr4 interpolation is controlled by the four vertexes of the square. The semi-variable function is linear, and the nugget is zero. The interpolation weight W Kr 4 ( u , v ) in Equation (8) can be calculated as:
W Kr 4 ( u , v ) = a 1 b 1 + a 2 b 2 + a 3 b 3 + a 2 b 4 + 1 4 a 2 b 1 + a 1 b 2 + a 2 b 3 + a 3 b 4 + 1 4 a 3 b 1 + a 2 b 2 + a 1 b 3 + a 2 b 4 + 1 4 a 2 b 1 + a 3 b 2 + a 2 b 3 + a 1 b 4 + 1 4
where:
a 1 = 1 4 3 2 8 , a 2 = 1 4 + 2 8 , a 3 = 1 4 + 2 8 , b 1 = u 2 + v 2 , b 2 = ( u 1 ) 2 + v 2 , b 3 = ( u 1 ) 2 + ( v 1 ) 2 , b 4 = u 2 + ( v 1 ) 2 .
We denote the ith elements in W Kr 4 ( u , v ) , W BIB ( u , v ) and W NN ( u , v ) as W Kr 4 i ( u , v ) , W BIB i ( u , v ) , and W NN i ( u , v ) , respectively, and these values are shown in Figure 9 for i = 1 . We can conclude that the weights W Kr 4 1 ( u , v ) and W BIB 1 ( u , v ) are almost identical, while the weight W NN 1 ( u , v ) is quite different from the other two.
The differences of weights, i.e., | W BIB 1 ( u , v ) W Kr 4 1 ( u , v ) | and | W NN 1 ( u , v ) W Kr 4 1 ( u , v ) | , are shown in Figure 10. The largest weight error max u , v | W BIB 1 ( u , v ) W Kr 4 1 ( u , v ) | is less than 0.03 in the BIB algorithm, while max u , v | W NN 1 ( u , v ) W Kr 4 1 ( u , v ) | is more than 0.5 in the NN algorithm. The same conclusion holds for the other weights W Kr 4 i ( u , v ) , W BIB i ( u , v ) , and W NN i ( u , v ) , i = 2 , 3 , 4 . Therefore, the interpolation result of the BIB algorithm almost approximates that of Kr4 algorithm. Note that the above-threshold area is difficult to be obtained by the Kr4 algorithm due to the complex calculation of the integral inside a complex boundary. Moreover, the NN algorithm has a large weight error in geographic data analysis.

5.2. Experiment on Artificially-Constructed Environment Data

In order to evaluate different above-threshold query algorithms, we test them with artificial data generated by the Kriging algorithm. The interpolated values by the Kriging algorithm are modeled as a Gaussian process governed by full prior covariances.
Assume that the Kriging interpolation is controlled by N c points P i , 1 i N c , randomly distributed in R, and the value f at P i is an independent random variable uniformly distributed in the interval [ a , b ] . Typical artificial environmental variables are generated by N c control points inside a 300 × 300 region. We denote the central 100 × 100 region as the ROI in which the sensor values are depicted in Figure 11 in a single experiment. The greater the number of the control points is, the richer the details of the variances of artificial environmental variables are.
To compare different algorithms with the same number of sensors, we assume that there are in total N = ( n + 1 ) × ( n + 1 ) sensors and M = n × n grids.
We performed simulation experiments to contrast the three algorithms, NN, MS, and BIB, to estimate the above-threshold ratios. The simulation configuration is given in Table 3.
The real boundary is shown in Figure 12a, and the boundaries generated by the three algorithms in ROI when n = 3 are drawn in Figure 12b–d. Obviously, the boundaries by the BIB and MS algorithms are more accurate than those by the NN algorithm. Furthermore, the boundaries by the BIB algorithm are smoother than those by the other algorithms.
In order to analyze the three aforementioned algorithms qualitatively, we used the metrics FP, FN, and MSE to evaluate their performance for N e experiments. The average FP, FN, and MSE versus the number of grids M for the three mentioned algorithms are shown in Figure 13.
The threshold T = f max + f min 2 , where f max and f min are the maximum and the minimum of the variables. First, all the FP, FN, and MSE metrics obtained by the three algorithms tend to a definite value, zero, along with the increasing of the number of sensors. This implies all algorithms are feasible and more sensors help to reduce the query error. Second, the NN algorithm performs worse than the others. This is mainly caused by the rough estimating of the variables inside the ROI. Since the proposed BIB algorithm is an approximation of the Kr4 algorithm and the MS algorithm is an approximation of the BIB algorithm, the MS and BIB algorithms both performed well.

5.3. Experiment of Real Temperature Data

WorldClim [42] is a set of gridded global climate data with a spatial resolution from 1–340 km 2 over 30 years, which was created by Steve Fick and Robert Hijmans. WorldClim provides various environmental variables, including minimum temperature ( C ), maximum temperature ( C ), average temperature ( C ), precipitation (mm), solar radiation ( kJ m 2 day 1 ), wind speed ( m s 1 ) and water vapor pressure (kPa). These data can be used for mapping and spatial modeling.
The global average monthly temperature data, that is 12 sets of temperature data, obtained by WorldClim from 1970–2000, were used in the following experiments. We first randomly selected an ROI that did not contain a water surface, ranging from 42– 78 E and from 49– 65 N, to observe the boundaries. The hypsometric map of the ROI is depicted in Figure 14.
Rectangle divisions were done to the ROI, and M = n × n denotes the grid numbers. The real boundary and the boundaries generated by the three algorithms in ROI when n = 20 are depicted in Figure 15.
Obviously, the boundaries by the BIB algorithm are more accurate than those by the NN and MS algorithms. Furthermore, the boundaries by the BIB algorithm are smoother than those by the other algorithms.
Then, we randomly selected 20 ROIs that did not contain a water surface with a length of 10 both in the latitude and longitude direction in Eurasia to demonstrate the universality of the proposed algorithm. We assumed that in the case that the distance between the sampling points was 30 s, i.e., the most precise spatial resolution, the average above-threshold ratio obtained by the NN algorithm was the exact above-threshold ratio. The average FP, FN, and MSE versus the number of grids M for the three mentioned algorithms in 20 ROIs are shown in Figure 16. The threshold T was assigned to the median of the temperature data. Although the effects of the results cannot be favorably compared with those in the artificial experiment due to the discontinuity points such as the mountain segregation, the shapes and the trends of the curves in the real temperature data experiment are the same as those in the artificially-constructed environment data experiment. Above all, the proposed BIB algorithm shows a good performance in estimating the above-threshold ratio and solving the above-threshold query equation within the given ROI.

5.4. Possible Implementation Framework and Computation/Communication Load Analysis

A naive implementation framework to support the aforementioned above-threshold queries with the BIB, NN, or MS algorithms is to collect all the sensor data and then process the data in the center server. All the positions of the nodes were assumed to be obtained with node location techniques. A possible data collection route tree to transfer the sensor data from nodes is shown in Figure 17a. In such a naive implementation, the nodes only send out their data, and the center server needs to execute the query, which is thus named the centralized query framework. The traffic loads in the sensor network of different algorithms were equal. However, the center server needed more computation for the BIB and MS algorithms to perform the interpolation than that for the NN algorithm, which in fact simply counted the number of the data above the threshold.
However, in most practical scenarios, there would be only a small proportion of the sensor values above the threshold. We herein propose a distributed implementation framework to support the aforementioned above-threshold queries.
In this distributed implementation framework to support the NN algorithm, the sensor will transfer its sensor value if and only if it is triggered by the above-threshold event, i.e., its sensor value is beyond the threshold, as shown in Figure 17b. The nodes in the route path from the triggered node to the sink node help to forward the data hop by hop. Therefore, the center server only counted the data from the triggered nodes, and the values of other nodes were assumed to be below the threshold. Now, the network traffic was significantly reduced if the above-threshold events occurred sparsely.
It is more complicated to support the MS and BIB algorithms since both need local co-operation. We first grouped the sensor nodes into overlapped clusters. All four nodes in the vertexes of a square grid make a cluster. One node possibly belongs to a different cluster since it may be shared by neighbor grids. There was a cluster head for each cluster, as shown in Figure 17c. When a node, say, s 1 , is triggered by the above-threshold event, it will send its sensor value to notify the cluster heads of all the clusters to which it belongs. Each cluster head notified, say s 4 , will command its cluster members to submit their sensor values to it. Once the header collects all the sensor values in the cluster, it will perform the computation and transfer the fused result to the sink hop by hop. Therefore, the MS and BIB algorithms needed more local traffic and more computation to exchange their sensor values for the interpolation.

5.5. Comparison and Discussion

We evaluate and compare the three mentioned algorithms, NN, MS, and BIB, according to various evaluative metrics in Table 4. We can see from Figure 12 and Figure 15 that the curve boundaries by the BIB algorithm are more accurate and smoother than the straight line boundaries by the other two algorithms. We can see from Figure 13 and Figure 16 that all algorithms are feasible and that NN algorithm performed worse than the others. The largest weight error is less than 0.03 in the BIB algorithm, while it is more than 0.5 in the NN algorithm. Therefore, the interpolation result of the BIB algorithm almost approximates that of the Kr4 algorithm. Since the MS algorithm is possibly considered as an approximation of the BIB algorithm, the same conclusion holds for it. Both the BIB and the MS algorithms have small weight errors in geographic data analysis, while the NN algorithm have the larger one. The interpolation weights W B I B ( u , v ) and W N N ( u , v ) are given by Equations (9) and (35), respectively. The MS algorithm is a computer graphics algorithm, and thus, its interpolation weight does not exist. We can see from Figure 8 that there were two ambiguous situations for above-threshold area calculation and boundary description in the MS algorithm. For the distributed implementation framework, once the header collects all the sensor values in the cluster, it will perform the computation and transfer the fused result to the sink hop by hop in the MS and BIB algorithms. The center server only counts the data from the triggered nodes and the values of other nodes were assumed to be below the threshold in NN algorithm. Therefore, the MS and BIB algorithms need more local traffic and more computation to exchange their sensor values for the interpolation. The traffic and computation are modest in the MS and BIB algorithms due to the small above-threshold clusters. Taking all the factors into consideration, the proposed BIB algorithm has an excellent comprehensive performance compared with the other algorithms.

6. Conclusions

Wireless sensor networks can be regarded as sensor database systems, which permit users to query sensor data of interest. In this paper, we proposed a novel Bilinear Interpolation-Based (BIB) algorithm to support the above-threshold queries. It is mainly designed for regularly-deployed sensor networks. We utilize the bilinear interpolation to estimate the environmental variables inside a square with the known sensor values from sensor nodes located at its four vertexes. Thus, the area of the above-threshold subregion can be obtained by mathematical formulation, and finally, we proposed the closed-form solution of the above-threshold ratio.
In order to evaluate the performance of different above-threshold query algorithms, we first used the interpolation weights of Kr4 interpolation, which is commonly used in geometry research, as a golden standard to compare various algorithms. The weights of the proposed BIB algorithm are approximate to those of the Kr4 interpolation, which means BIB is valid from the perspective of geography.
We also described experiments both with the artificially-constructed environment data and with real temperature data. Experiment results manifest that the proposed BIB algorithm shows a good performance in estimating the above-threshold ratio.
In summary, with a closed-form formulation, the proposed BIB algorithm supports the above-threshold queries in an efficient and accurate manner.

Author Contributions

Conceptualization, Y.L. and W.H.; formal analysis, Y.L. and W.H.; investigation, W.H.; methodology, Y.L. and W.H.; software, Y.L. and W.H.; supervision, H.Z. and K.L.; validation, Y.L. and W.H.; visualization, Y.L. and W.H.; writing, original draft, Y.L. and W.H.; writing, review and editing, Y.L., W.H., H.Z., and K.L.

Funding

This research is funded by the Joint Foundation of MoE (Ministry of Education) and China Mobile Group (No. MCM20160103).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Fadel, E.; Gungor, V.C.; Nassef, L.; Akkari, N.; Malik, M.A.; Almasri, S.; Akyildiz, I.F. A survey on wireless sensor networks for smart grid. Comput. Commun. 2015, 71, 22–33. [Google Scholar] [CrossRef]
  2. Khan, I.; Belqasmi, F.; Glitho, R.; Crespi, N.; Morrow, M.; Polakos, P. Wireless sensor network virtualization: A survey. IEEE Commun. Surv. Tutor. 2016, 18, 553–576. [Google Scholar] [CrossRef]
  3. Rawat, P.; Singh, K.D.; Chaouchi, H.; Bonnin, J.M. Wireless sensor networks: A survey on recent developments and potential synergies. J. Supercomput. 2014, 68, 1–48. [Google Scholar] [CrossRef]
  4. Aponte-Luis, J.; Gómez-Galán, J.A.; Gómez-Bravo, F.; Sánchez-Raya, M.; Alcina-Espigado, J.; Teixido-Rovira, P.M. An efficient wireless sensor network for industrial monitoring and control. Sensors 2018, 18, 182. [Google Scholar] [CrossRef] [PubMed]
  5. Mainwaring, A.; Culler, D.; Polastre, J.; Szewczyk, R.; Anderson, J. Wireless sensor networks for habitat monitoring. In Proceedings of the 1st ACM International Workshop on Wireless Sensor Networks and Applications, Atlanta, GA, USA, 28 September 2002. [Google Scholar] [CrossRef]
  6. Abbasi, A.Z.; Islam, N.; Shaikh, Z.A. A review of wireless sensors and networks applications in agriculture. Comput. Stand. Interfaces 2014, 36, 263–270. [Google Scholar] [CrossRef]
  7. Noel, A.; Abdaoui, A.; Badawy, A.; Elfouly, T.; Ahmed, M.; Shehata, M. Structural health monitoring using wireless sensor networks: A comprehensive survey. IEEE Commun. Surv. Tutor. 2017, 19, 1403–1423. [Google Scholar] [CrossRef]
  8. Srbinovska, M.; Gavrovski, C.; Dimcev, V.; Krkoleva, A.; Borozan, V. Environmental parameters monitoring in precision agriculture using wireless sensor networks. J. Clean. Prod. 2015, 88, 297–307. [Google Scholar] [CrossRef]
  9. Ueyama, J.; Faiçal, B.S.; Mano, L.Y.; Bayer, G.; Pessin, G.; Gomes, P.H. Enhancing reliability in wireless sensor networks for adaptive river monitoring systems: Reflections on their long-term deployment in Brazil. Comput. Environ. Urban Syst. 2017, 65, 41–52. [Google Scholar] [CrossRef]
  10. Kim, D.O.; Liu, L.; Shin, I.S.; Kim, J.J.; Han, K.J. Spatial TinyDB: A spatial sensor database system for the USN environment. Int. J. Distrib. Sens. Netw. 2013, 9, 512368. [Google Scholar] [CrossRef]
  11. Diallo, O.; Rodrigues, J.J.; Sene, M.; Lloret, J. Distributed database management techniques for wireless sensor networks. IEEE Trans. Parallel Distrib. Syst. 2015, 26, 604–620. [Google Scholar] [CrossRef]
  12. Cheng, S.; Cai, Z.; Li, J. Curve query processing in wireless sensor networks. IEEE Trans. Veh. Technol. 2015, 64, 5198–5209. [Google Scholar] [CrossRef]
  13. Eldawy, A.; Mokbel, M.F. Spatialhadoop: A mapreduce framework for spatial data. In Proceedings of the IEEE 31st International Conference on Data Engineering, Seoul, Korea, 13–17 April 2015. [Google Scholar] [CrossRef]
  14. Tang, J.; Zhang, B.; Zhou, Y.; Wang, L. An energy-aware spatial index tree for multi-region attribute query aggregation processing in wireless sensor networks. IEEE Access 2017, 5, 2080–2095. [Google Scholar] [CrossRef]
  15. Pagel, B.U.; Six, H.W.; Winter, M. Window query–optimal clustering of spatial objects. In Proceedings of the Fourteenth ACM SIGACT–SIGMOD–SIGART Symposium on Principles of Database Systems, San Jose, CA, USA, 22–25 May 1995. [Google Scholar] [CrossRef]
  16. Molina-Pico, A.; Cuesta-Frau, D.; Araujo, A.; Alejandre, J.; Rozas, A. Forest monitoring and wildland early fire detection by a hierarchical wireless sensor network. J. Sens. 2016, 2016, 8325845. [Google Scholar] [CrossRef]
  17. Ferentinos, K.P.; Katsoulas, N.; Tzounis, A.; Bartzanas, T.; Kittas, C. Wireless sensor networks for greenhouse climate and plant condition assessment. Biosyst. Eng. 2017, 153, 70–81. [Google Scholar] [CrossRef]
  18. Ojha, T.; Misra, S.; Raghuwanshi, N.S. Wireless sensor networks for agriculture: The state-of-the-art in practice and future challenges. Comput. Electron. Agric. 2015, 118, 66–84. [Google Scholar] [CrossRef]
  19. Yang, X.; Lim, H.B.; Özsu, T.M.; Tan, K.L. In–network execution of monitoring queries in sensor networks. In Proceedings of the 2007 ACM SIGMOD International Conference on Management of Data, Beijing, China, 11–14 June 2007. [Google Scholar] [CrossRef]
  20. Madden, S.; Szewczyk, R.; Franklin, M.J.; Culler, D. Supporting aggregate queries over ad–hoc wireless sensor networks. In Proceedings of the Fourth IEEE Workshop on Mobile Computing Systems and Applications, Callicoon, NY, USA, 20–21 June 2002. [Google Scholar] [CrossRef]
  21. Li, J.; Cheng, S.; Cai, Z.; Yu, J.; Wang, C.; Li, Y. Approximate holistic aggregation in wireless sensor networks. ACM Trans. Sens. Netw. 2017, 13, 11. [Google Scholar] [CrossRef]
  22. Li, J.; Maier, D.; Tufte, K.; Papadimos, V.; Tucker, P.A. Semantics and evaluation techniques for window aggregates in data streams. In Proceedings of the ACM SIGMOD International Conference on Management of Data, Baltimore, MD, USA, 14–16 June 2005. [Google Scholar] [CrossRef]
  23. Aslan, Y.E.; Korpeoglu, I.; Ulusoy, Ö. A framework for use of wireless sensor networks in forest fire detection and monitoring. Comput. Environ. Urban Syst. 2012, 36, 614–625. [Google Scholar] [CrossRef] [Green Version]
  24. Yun, Z.; Bai, X.; Xuan, D.; Lai, T.H.; Jia, W. Optimal deployment patterns for full coverage and k–connectivity wireless sensor networks. IEEE/ACM Trans. Netw. 2010, 18, 934–947. [Google Scholar] [CrossRef]
  25. Hossain, A.; Biswas, P.K.; Chakrabarti, S. Sensing models and its impact on network coverage in wireless sensor network. In Proceedings of the IEEE Region 10 and the Third international Conference on Industrial and Information Systems, Kharagpur, India, 8–10 December 2008. [Google Scholar] [CrossRef]
  26. Lin, C.Y.; Peng, W.C.; Tseng, Y.C. Efficient in-network moving object tracking in wireless sensor networks. IEEE Trans. Mob. Comput. 2006, 5, 1044–1056. [Google Scholar] [CrossRef]
  27. Aurenhammer, F. Voronoi diagrams: A survey of a fundamental geometric data structure. ACM Comput. Surv. 1991, 23, 345–405. [Google Scholar] [CrossRef]
  28. Maple, C. Geometric design and space planning using the marching squares and marching cube algorithms. In Proceedings of the IEEE International Conference on Geometric Modeling and Graphics, London, UK, 16–18 July 2003. [Google Scholar] [CrossRef]
  29. Mantz, H.; Jacobs, K.; Mecke, K. Utilizing minkowski functionals for image analysis: A marching square algorithm. J. Stat. Mech. Theory Exp. 2008, 2008, 12015. [Google Scholar] [CrossRef]
  30. Berchtold, S.; Böhm, C.; Kriegal, H.P. The pyramid–technique: Towards breaking the curse of dimensionality. In Proceedings of the SIGMOD ’98 Proceedings of the 1998 ACM SIGMOD International Conference on Management of Data, Seattle, WA, USA, 1–4 June 1998. [Google Scholar] [CrossRef]
  31. Ooi, B.C.; Tan, K.L.; Yu, C.; Bressan, S. Indexing the edges—A simple and yet efficient approach to high-dimensional indexing. In Proceedings of the Nineteenth ACM SIGMOD–SIGACT–SIGART Symposium on Principles of Database Systems, Dallas, TX, USA, 15–18 May 2000. [Google Scholar] [CrossRef]
  32. Xu, Y.; Lee, W.C. Window query processing in highly dynamic geosensor networks: Issues and solutions. Geosens. Netw. 2004, 31–52. [Google Scholar] [CrossRef]
  33. Xu, Y.; Lee, W.C.; Xu, J.; Mitchell, G. Processing window queries in wireless sensor networks. In Proceedings of the 22nd International Conference on Data Engineering, Atlanta, GA, USA, 3–7 April 2006. [Google Scholar] [CrossRef]
  34. Ku, W.S.; Zimmermann, R.; Wang, H. Location–based spatial query processing with data sharing in wireless broadcast environments. IEEE Trans. Mob. Comput. 2008, 7, 778–791. [Google Scholar] [CrossRef]
  35. Wang, H.; Deng, J.; Yuan, G. Window query and analysis on massive spatio–temporal data. IERI Procedia 2014, 10, 138–143. [Google Scholar] [CrossRef]
  36. Bulusu, N.; Heidemann, J.; Estrin, D. GPS–less low-cost outdoor localization for very small devices. IEEE Pers. Commun. 2000, 7, 28–34. [Google Scholar] [CrossRef]
  37. Wang, Y.C.; Hu, C.C.; Tseng, Y.C. Efficient deployment algorithms for ensuring coverage and connectivity of wireless sensor networks. In Proceedings of the First International Conference on Wireless Internet, Budapest, Hungary, 10–15 July 2005. [Google Scholar] [CrossRef]
  38. Heidemann, J.; Ye, W.; Wills, J.; Syed, A.; Li, Y. Research challenges and applications for underwater sensor networking. In Proceedings of the Wireless Communications and Networking Conference, Las Vegas, NV, USA, 3–6 April 2006. [Google Scholar] [CrossRef]
  39. Walt, S.V.D.; Colbert, S.C.; Varoquaux, G. The NumPy array: A structure for efficient numerical computation. Comput. Sci. Eng. 2011, 13, 22–30. [Google Scholar] [CrossRef]
  40. Murphy, B.S. PyKrige: Development of a Kriging Toolkit for Python. In Proceedings of the 2014 AGU Fall Meeting, San Francisco, CA, USA, 15–19 December 2014. [Google Scholar]
  41. Meyer, T.H. The discontinuous nature of Kriging interpolation for digital terrain modeling. Cartogr. Geogr. Inf. Sci. 2004, 31, 209–216. [Google Scholar] [CrossRef]
  42. Fick, S.E.; Hijmans, R.J. WorldClim 2: New 1-km spatial resolution climate surfaces for global land areas. Int. J. Climatol. 2017, 37, 4302–4315. [Google Scholar] [CrossRef]
Figure 1. Illustration of the system.
Figure 1. Illustration of the system.
Sensors 18 04203 g001
Figure 2. Illustration of rectangle subregion characteristics.
Figure 2. Illustration of rectangle subregion characteristics.
Sensors 18 04203 g002
Figure 3. Illustrations of the boundaries and the above-threshold regions with the Bilinear Interpolation-Based (BIB) algorithm.
Figure 3. Illustrations of the boundaries and the above-threshold regions with the Bilinear Interpolation-Based (BIB) algorithm.
Sensors 18 04203 g003
Figure 4. Illustrations of the boundaries and the regions G E in the u ^ o v ^ plane if a 11 > 0 .
Figure 4. Illustrations of the boundaries and the regions G E in the u ^ o v ^ plane if a 11 > 0 .
Sensors 18 04203 g004
Figure 5. Illustrations of function values k + + + ( E , u ^ 0 , v ^ 0 ) if E > 0 , u ^ 0 > 0 , and v ^ 0 > 0 .
Figure 5. Illustrations of function values k + + + ( E , u ^ 0 , v ^ 0 ) if E > 0 , u ^ 0 > 0 , and v ^ 0 > 0 .
Sensors 18 04203 g005
Figure 6. Illustrations of function values k + ( E , u ^ 0 , v ^ 0 ) if E < 0 , u ^ 0 < 0 , and v ^ 0 > 0 .
Figure 6. Illustrations of function values k + ( E , u ^ 0 , v ^ 0 ) if E < 0 , u ^ 0 < 0 , and v ^ 0 > 0 .
Sensors 18 04203 g006
Figure 7. Illustrations of the boundaries and the above-threshold regions with the NN algorithm.
Figure 7. Illustrations of the boundaries and the above-threshold regions with the NN algorithm.
Sensors 18 04203 g007
Figure 8. Illustrations of the boundaries and the above-threshold regions with the Marching Square (MS) algorithm.
Figure 8. Illustrations of the boundaries and the above-threshold regions with the Marching Square (MS) algorithm.
Sensors 18 04203 g008
Figure 9. Function images of W Kr 4 1 ( u , v ) , W BIB 1 ( u , v ) , and W NN 1 ( u , v ) .
Figure 9. Function images of W Kr 4 1 ( u , v ) , W BIB 1 ( u , v ) , and W NN 1 ( u , v ) .
Sensors 18 04203 g009
Figure 10. Function images of | W BIB 1 ( u , v ) W Kr 4 1 ( u , v ) | and | W NN 1 ( u , v ) W Kr 4 1 ( u , v ) | .
Figure 10. Function images of | W BIB 1 ( u , v ) W Kr 4 1 ( u , v ) | and | W NN 1 ( u , v ) W Kr 4 1 ( u , v ) | .
Sensors 18 04203 g010
Figure 11. Artificial environmental variables for simulation experiments.
Figure 11. Artificial environmental variables for simulation experiments.
Sensors 18 04203 g011
Figure 12. The real boundary and the boundaries generated by the three mentioned algorithms in ROI when n = 3 in the artificially-constructed environment data experiment. (a) The real boundary. (b) The boundaries by the NN algorithm. (c) The boundaries by the MS algorithm. (d) The boundaries by the BIB algorithm.
Figure 12. The real boundary and the boundaries generated by the three mentioned algorithms in ROI when n = 3 in the artificially-constructed environment data experiment. (a) The real boundary. (b) The boundaries by the NN algorithm. (c) The boundaries by the MS algorithm. (d) The boundaries by the BIB algorithm.
Sensors 18 04203 g012
Figure 13. The average FP, FN, and MSE versus the grid numbers M for the three mentioned algorithms in the artificially-constructed environment data experiment.
Figure 13. The average FP, FN, and MSE versus the grid numbers M for the three mentioned algorithms in the artificially-constructed environment data experiment.
Sensors 18 04203 g013
Figure 14. The hypsometric map of the ROI.
Figure 14. The hypsometric map of the ROI.
Sensors 18 04203 g014
Figure 15. The real boundary and the boundaries generated by the three mentioned algorithms in ROI when n = 20 in the real temperature data experiment.
Figure 15. The real boundary and the boundaries generated by the three mentioned algorithms in ROI when n = 20 in the real temperature data experiment.
Sensors 18 04203 g015
Figure 16. The average FP, FN, and MSE versus the grid numbers M for the three mentioned algorithms in the real temperature data experiment.
Figure 16. The average FP, FN, and MSE versus the grid numbers M for the three mentioned algorithms in the real temperature data experiment.
Sensors 18 04203 g016
Figure 17. Possible implementation frameworks in wireless sensor networks. (a) Centralized query framework. (b) Distributed implementation framework for the NN algorithm. (c) Distributed implementation framework for the MS or BIB algorithm.
Figure 17. Possible implementation frameworks in wireless sensor networks. (a) Centralized query framework. (b) Distributed implementation framework for the NN algorithm. (c) Distributed implementation framework for the MS or BIB algorithm.
Sensors 18 04203 g017
Table 1. The function value k ( E , u ^ 0 , v ^ 0 ) in different cases.
Table 1. The function value k ( E , u ^ 0 , v ^ 0 ) in different cases.
E u ^ 0 v ^ 0 k ( E , u ^ 0 , v ^ 0 )
+++ u ^ 0 v ^ 0 E E l n u ^ 0 v ^ 0 E ( u ^ 0 v ^ 0 E ) 0 ( u ^ 0 v ^ 0 < E )
++0
+ u ^ 0 v ^ 0 E E l n u ^ 0 v ^ 0 E ( u ^ 0 v ^ 0 E ) 0 ( u ^ 0 v ^ 0 < E )
++0
+00
+00
++ u ^ 0 v ^ 0
+ E E l n u ^ 0 v ^ 0 E ( u ^ 0 v ^ 0 E ) u ^ 0 v ^ 0 ( u ^ 0 v ^ 0 < E )
u ^ 0 v ^ 0
+ E E l n u ^ 0 v ^ 0 E ( u ^ 0 v ^ 0 E ) u ^ 0 v ^ 0 ( u ^ 0 v ^ 0 < E )
00
00
0++ u ^ 0 v ^ 0
0+0
0 u ^ 0 v ^ 0
0+0
000
000
Table 2. False positive, false negative, true positive, and true negative.
Table 2. False positive, false negative, true positive, and true negative.
Estimated Sensor ValuePositive (Above T)Negative (Under T)
Exact Sensor Value
Positive (Above T)TPFN
Negative (Under T)FPTN
Table 3. Simulation configuration.
Table 3. Simulation configuration.
ParameterValue
Side length of R100
N c 100
a−20
b20
N e 2000
Table 4. Algorithm comparison.
Table 4. Algorithm comparison.
AlgorithmNNMSBIB
Index
Boundary AccuracyWorseGoodBest
Boundary ContinuityWorseGoodBest
FPWorseGoodGood
FNWorseGoodGood
MSEWorseGoodGood
Geographic InterpretationWorseGoodGood
Closed-form SolutionYesNoYes
AmbiguityNoSometimesNo
Computation WorkloadLittleMediumMedium
Communication TrafficLittleMediumMedium

Share and Cite

MDPI and ACS Style

Liu, Y.; Huangfu, W.; Zhang, H.; Long, K. Above-Threshold Queries of Environmental Conditions Based on Bilinear Interpolation in Wireless Sensor Networks. Sensors 2018, 18, 4203. https://doi.org/10.3390/s18124203

AMA Style

Liu Y, Huangfu W, Zhang H, Long K. Above-Threshold Queries of Environmental Conditions Based on Bilinear Interpolation in Wireless Sensor Networks. Sensors. 2018; 18(12):4203. https://doi.org/10.3390/s18124203

Chicago/Turabian Style

Liu, Yaxi, Wei Huangfu, Haijun Zhang, and Keping Long. 2018. "Above-Threshold Queries of Environmental Conditions Based on Bilinear Interpolation in Wireless Sensor Networks" Sensors 18, no. 12: 4203. https://doi.org/10.3390/s18124203

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop