Abstract
The traditional abnormal location algorithm ignores the uncertainty of wireless sensor networks, which is not suitable for practical applications, and has low accuracy of location. To address this problem, a new fuzzy weighted location algorithm for abnormal target in wireless sensor networks is proposed in this paper. For the characteristics of spatiotemporal association and association of non-spatiotemporal attribute, the abnormal target is identified by multi-attribute association algorithm. Considering that Bayesian networks can effectively express dependencies between variables, Bayesian networks are used to establish the dependency model of non-spatiotemporal attribute. The dependence structure of non-spatiotemporal attributes is obtained by structure learning. The parameter learning of each node of the network structure is carried out to obtain the conditional probability table. The confidence degree of attribute association is used to judge whether the attribute association pattern of the point to be detected is an abnormal pattern. The abnormal target location problem is described. The coordinates of sensor node with abnormal target are identified by the weighted location algorithm. The circles with the centers of three points not on a straight line and the diameter of the signal intensity indicator distance are drawn to obtain the abnormal target position. The weights for weighted location are obtained by fuzzy algorithm. Experimental results show that the proposed algorithm has high accuracy of location.
Introduction
Wireless sensor network is a new science and technology network. It is composed of a large number of micro sensor nodes deployed in the monitoring area, which are cheap, with low power, and can be used for information collection, data processing and wireless communication in micro volume [1]. A multi-hop self-organized network system is built by wireless communication. Wireless sensor network integrated sensor technology, embedded computing technology, distributed information processing technology, and network communication technology [2]. It can monitor, perceive, and collect all kinds of environment and monitored object information in the distributed area of network in real-time. The information is processed preliminarily, and the detailed and accurate information is obtained, and then the terminal users are transmitted to achieve complex target detection and tracking in specific range.
Because wireless sensor networks are mostly deployed in unattended environment or even hostile situations, and communicate by using easily eavesdropped wireless signals, the problem of network security is particularly important. Compared with the traditional network, wireless sensor network has its own characteristics, such as the limited resource of nodes, dense distribution, open communication media, and lack of clear network defense boundary [3]. These characteristics make it easier to be invaded than the traditional wired network. Therefore, the design of an effective abnormal target location algorithm is the main challenge of wireless sensor network security.
Abnormal target location algorithm of wireless sensor networks include range-based location algorithm and range-free location algorithm. The range-based location algorithm is used to obtain the distance and angle between nodes by using complex hardware for calculating the location information, such as a location algorithm based on the strength indicator of the received signal, angle of arrival, time of arrival, and time difference of arrival. The range-free location algorithm is to use the network connectivity of WSN to calculate the distance. The used equipment is simple and the costis low.
The universality of the received signal strength indicator to the hardware of the sensor proposed by the literature [4] makes it the most commonly used method of abnormal target location in wireless sensor networks. The strength information of the target signal of the sensor node in the monitoring area is obtained and stored. By the attenuation model in the channel, the signal strength vector in each node can be mapped into a distance vector to judge the abnormal target. In theory, the exact location of the abnormal target can be obtained by the three-point location method. As the presence of noise and uncertainty of the channel, the attenuation model does not reflect the relationship between real signal strength and distance and the mapping has errors. The exact location of the abnormal target cannot be calculated by using the distance information with error.
In the literature [5], target position is estimated by probability weighting. But the binaryzation weight does not reflect the uncertainty of the signal. This method is more favorable for multi abnormal target location, but it is too dependent on the node density.
In the literature [6], according to the empirical model of the signal propagation, the weighting factor is determined by using the influence of the beacon node on the unknown node, and the weighted centroid algorithm is used for location. The accuracy of the algorithm depends on the accuracy of the radio wave signal propagation model. However, in wireless sensor networks, the transmission effect of wireless signals in real situation is different from ideal spherical model. The introduced uncertainty will affect the location accuracy of the algorithm [16].
In the literature [7], the coordinates of the nodes are obtained by using the weighted centroid algorithm, which has high precision for the ideal case. But in practical application, there is great uncertainty due to the difference of wireless sensor antenna and the actual environment, so the algorithm will cause a certain location error.
In order to adapt to the uncertainty of wireless sensor networks, a new fuzzy weighted location algorithm for abnormal target in wireless sensor networks is proposed in this paper. The structure of this paper is as follows.
In Section 1, the background and significance of this research are described, and the research trends of other scholars are analyzed.
In Section 2, based on Bayesian network, a dependency relation model of observation attributes is constructed. The similarity degree between the current reading and the attribute association pattern of sample data is proposed by using attribute association confidence. The abnormal target in wireless sensor networks is identified. On this basis, a fuzzy weighted location algorithm is proposed. The concept of membership degree in fuzzy theory is used to describe the location relationship of the sample point and the node to be located. Weighted centroid location result of the abnormal target is obtained for the uncertainty of wireless sensor networks.
In Section 3, the location accuracy of the proposed fuzzy weighted location algorithm for abnormal target in wireless sensor networks is verified by experiments.
In Section 4, the research results of fuzzy weighted location algorithm for abnormal target in wireless sensor networks are discussed.
Section 5 summarizes the work of the paper and the next research direction is clarified.
Material and methods
Abnormal target recognition for wireless sensor networks
In order to improve the accuracy of abnormal target recognition in wireless sensor networks with multi-attribute and reduce the impact of environmental noise and sensor fault on the recognition results, an abnormal target recognition algorithm based on multi-attribute association is proposed in this paper. Considering that Bayesian networks can effectively represent dependencies among variables [8], the dependency model of non-spatiotemporal attribute based on Bayesian networks is built. The dependence structure of non- spatiotemporal attributes is obtained by structure learning. The parameter learning of each node of the network structure is carried out to obtain the conditional probability table.
In wireless sensor networks, anomaly usually shows the following three characteristics.
For single sensor node, the anomaly will last for a period of time, and the data show a certain degree of similarity. The sensor data produces a corresponding change, showing a particular pattern.
For multiple sensor nodes, when an anomaly occurs, it is certain for the sensor nodes in the abnormal region to show spatial similarity.
When there is an anomaly in the monitoring area, the various sensing attributes of the sensor readings show a certain association, and this association is shown as a certain probability pattern.
Combining probability theory and graph theory, Bayesian network is a directed acyclic graph with probability annotation. It can effectively express the probability dependence between random variables and has a solid foundation of mathematical theory [9]. On the one hand, Bayesian networks use the language of graph theory to describe the structure of the problem intuitively. On the other hand, it utilizes the structure of the problem according to probability theory to reduce the complexity of reasoning computation. In this section, based on Bayesian networks, a dependency model of non-spatiotemporal attributes is built. An attribute dependency model of the sample data is built to compare the similarity between attribute association pattern of the point to be detected and the attribute association pattern of the sample data to find outliers with abnormal attribute association pattern. The proposed method is described as follows.
For sample data attribute set S = (s1, s2, …, s
n
), the node set of Bayesian network structure G is obtained as x = (x1, x2, …, x
n
). The elements of x is instantiated by using the value of the elements of S. The variable x
i
has e
i
possible values (xi1, xi2, …, x
ie
i
). Assume the parent variables set of the variable x
i
is
For each variable x i , only the joint probability in Equation (3) is maximized.
In the initial stage of building the network structure, it is assumed that each node has no parent node. The node that satisfies maximization formula of posterior probability is recursively added to the parent set of each node. When p (G, S) is not increased, the parent node set is stopped adding and the network structure G' is obtained. The structure of G' at this time is the most stable. Therefore, for the current sample attribute set S, G' is the optimal network structure under the Bayes scoring criterion [10–12].
According to the obtained network structure, the parameter learning of each node of the network structure is carried out to obtain the conditional probability table. The conditional probability table contains the probability relation between the variables (Ao et al., 2016). Then the maximum likelihood estimation method is used. Assume (x1, x2, …, x
n
) is a set of sample values. The probability of the random variables (X1, X2, …, X
n
) located in the neighborhood of (x1, x2, …, x
n
) (n-dimensional cube with the side length of (dX1, dX2, …, dX
n
)), where
Next the calculation of attribute association confidence is discussed. In order to measure the similarity of attribute association pattern, the idea of KL divergence is used for reference (Verma Singh & Pathak 2015). In this section, the concept of attribute association confidence is proposed.
Assume
p (X i |π i ) can be calculated by Bayesian network structure and conditional probability table.
The value of the KL divergence is always greater than or equal to 0. When the KL divergence is equal to 0, it means two probabilities are exactly the same. Therefore, for the attribute association confidence γ, the larger γ represents the two joint probability distributions are more similar. γ = 1 represents two probabilities are exactly the same. Because of the randomness of the sensor data distribution, the case of γ = 1 is almost impossible to appear. The smaller the γ, the more the current sensor readings are likely to be abnormal reading. Thus the abnormal target of the wireless sensor network is identified.
After the abnormal target recognition of the wireless sensor network, the location of the abnormal target is carried out. Assume the monitoring area is L × L rectangle A. The plane A is quantized into H × H grid points. n
c
sensors are randomly and uniformly distributed in the monitoring area. When there is an abnormal target in the monitoring area, each sensor receives a certain signal, and the strength of the signal decreases with the distance (Joe & Shin 2016). The theoretical models of wireless signal propagation mainly include free space propagation model, logarithmic distance path loss model, and logarithmic normal distribution model. In this section, free space propagation model is used. The mapping relation is given by
Centroid location algorithm is range-free location algorithm (Anwar et al., 2015). The coordinates of the adjacent beacon nodes is used to calculate the coordinates of the sensor node that recognize the abnormal target. Assume n
x
beacon nodes with the coordinates of (x
i
, y
i
) are distributed around the sensor node that recognize the abnormal target (x
eg
, y
eg
). The beacon node broadcasts its own location information. The sensor nodes that recognize the abnormal target calculate their own coordinates after receiving the location information of each beacon node. The coordinates of the node is calculated by using
The sensor nodes that recognize the abnormal target and anchor nodes are randomly distributed in the two-dimensional space. In order to ensure the higher location precision of the anchor node, the intersection point of the connection line segment between the anchor nodes is used as the sample point for assisted location (Guo Yuan & Han 2017). The number of sample points is determined by the number of anchor nodes. Assume the number of anchor nodes is n
m
, the number of connection line segment between the anchor nodes is
In order to reduce the computation in the location process and avoid the interference of the sample point far from the sensor nodes that recognize abnormal target, a rough estimation of the position coordinates of the sensor node i that recognizes abnormal target by using trilateration location method (Mauris Benoit & Foulloy 2015). The sample points near the roughly estimated position coordinates are selected. The set of these sample points is Y. In Y ={ 1, 2, …, j }, the vector of each sample point is determined by using
For the anchor node n
m
within the communication radius of the sensor node that recognizes abnormal target, the position relationship between the sample point j in the set Y and the sensor node i by using the membership function μ(n) (i, j), given by
Taking the points A, B, and F in Fig. 1 as example, the above equation becomes

Location model.
When
Experimental environment setup
In order to verify the accuracy of the algorithm, experiments were carried out in the actual indoor environment. The experimental site is located on the 10 m×10 m indoor floor. The beacon nodes are located at the positions of A(1,1), B(9,1), C(0,9), and D(9,9), as shown in Fig. 2.

Experimental site.
The wireless sensor node adopts the self-made device. This device includes a TI MSP430G2452 16-bit microprocessor, a TI CC2500 low power 2.5 G RF chip and a wave band antenna. The maximum transmission power of CC2500 is 0 dBm (1 mW) and the receiver sensitivity is -108 dBm at the receiving rate of 2.4 K. The communication range of the node device can reach 50 m, which is suitable for building the wireless sensor network in the laboratory. The wireless sensor node is shown in Fig. 3(a) and the signal concentrator is shown in Fig. 3(b). It is connected to the PC by the USB transmission line. The RSS data received from the node is transmitted to the PC by serial transmission. The system on the PC obtains the weights of the nodes and the beacon nodes by fuzzy reasoning. Finally, the centroid position is obtained by the weighted centroid formula.

Sensor node device.
Experiments are carried out on the Zigbee platform. The sensor nodes are placed in different positions and three abnormal targets shown in Fig. 4(a) is to be located. The location results of the proposed algorithm are shown in Fig. 4(b). The coordinate graph of the two figures is shown in Fig. 4(c). In Fig. 4(c), the black square represents the actual location of the abnormal target, and the black ellipse represents the location result of the proposed algorithm. The location results obtained with the proposed algorithm consistent with the actual results, which verifies the accuracy of the proposedalgorithm.

Location results of three targets.
In order to verify the validity of the proposed algorithm, comparison of the literature [5] algorithm and the literature [7] algorithm is carried out for location of six abnormal targets. The results are shown in Fig. 5.

Location results of six abnormal targets obtained with three algorithms.
From Fig. 5, it can be seen that, the location results of the proposed algorithm are basically consistent with the actual results, while there is a great difference between the location results of the literature [5] algorithm and the literature [7] algorithm and the actual results. The comparison results show that the proposed algorithm is better than the otheralgorithms.
To verify the location performance of the proposed algorithm, the average location error is taken as evaluation index. The error between the actual position and the estimated position of the abnormal target is calculated by using
For the unknown node, the average location error is given by
Assume there are 60 abnormal targets in the research region, location of these abnormal targets are carried out with the three algorithms. The location results are shown in Fig. 6.

Comparisons of location error of three algorithms.
From Fig. 6, it can be seen that, the location error of the proposed algorithm is much lower than the literature [5] algorithm and the literature [7] algorithm, which shows that the location of the proposed algorithm is more accurate and the location error is smaller.
Usually, the attributes in the sensor readings contain time information, sensor topology information, and other non-spatiotemporal attributes directly sensed by the sensor. When abnormal events occur in wireless sensor networks, events often show time association, spatial association, and association of non-spatiotemporal attribute. In most cases, the result of the event detection only considering the spatiotemporal association of the data is easily affected by sensor failure and ambient noise. For non-spatiotemporal attributes, it is not possible to determine whether an event occurs by the threshold comparison of single attribute.
Abnormal target location technology is one of the key supporting technologies for wireless sensor network applications. The range-based location algorithm and range-free location algorithm have always been the focus of attention. The range-based location algorithm uses the information of distance and angle, which can obtain good location precision in the ideal state. However, the hardware requirement of wireless sensor node is higher, and the location precision of wireless sensor networks with high uncertainty is low. The range-free location algorithm uses the estimated distance between nodes, which reduce the hardware requirement for node. But the algorithm is entirely dependent on the connectivity of wireless sensor networks, which belongs to the location with estimation, so the location error is large and the accuracy is not high.
In order not to increase the number and cost of WSN beacon nodes, improve location accuracy, reduce location error, and ensure the algorithm is simple and easy to implement, a fuzzy weighted location algorithm for outlier is proposed in this paper.
Conclusions
Many applications of wireless sensor networks depend on the safe operation of the network. Once the wireless sensor network is attacked or destroyed, it may lead to disastrous consequences. It is a key problem to create a relatively safe working environment for wireless sensor networks in the face of uncertain wireless sensor networks. In this paper, a new fuzzy weighted location algorithm of abnormal target is proposed for the uncertainty of wireless sensor networks. First, the abnormal target of the wireless sensor network is identified, and then the fuzzy weighted location algorithm is designed to locate the abnormal target. Experimental results show that the proposed algorithm has high location precision.
The abnormal target location algorithm in wireless sensor networks has become a hot spot in the field of abnormal detection. The adopted solution must take into account the actual application requirements and ensure that the location process does not interfere with the normal operation of the network. In practical applications, the selection of abnormal target location technology depends on computing of the sensor, communication resources, pre-understanding of the basic data distribution, and the stability of the network environment. One of the challenges of future research is how to apply the fusion technology to the network, which can make the node have enough computing power. Moreover, sensor networks may contain various nodes with different resources and capabilities, and how to allocate and arrange these heterogeneous nodes during the anomaly detection process is considered to achieve the overall goal of energy consumption and accuracy. Another research subject is how to minimize damage once the anomaly occurs. In addition, the distributed method also brings new challenges to the cooperation between nodes.
Footnotes
Acknowledgments
Outstanding youth project of Hunan Education Department Energy cost based energy void avoidance in Wireless Sensor Networks (15B030).
