1. Introduction
With the development of the Internet of Things (IoT) and related new information technology, wireless sensor networks (WSNs) are expected to gradually penetrate various industries and applications [
1,
2,
3,
4], influencing all aspects of people’s lives. WSNs connect the material world with the human world. Embedded in various “things”, sensors sense the states of the “things” and transmit collected information to processing terminals via the Internet to achieve monitoring and management in real-time [
5]. The information collected by sensors is meaningful only when combined with location information, which helps the administrators know what, when, and where “things” happened. Therefore, cooperative self-localization and target tracking are two key issues in location-based applications of WSNs.
In WSNs, there are a small number of anchors and thousands of agents. Anchors are equipped with Global Position System (GPS) receivers or other devices with known coordinates, while the agents use a cooperative self-localization algorithm to estimate their own positions. In addition, when a target enters the WSNs, anchors and agents work cooperatively to track and locate it. In static WSNs, anchors and agents are fixed and so their coordinates do not change with time, meaning agents only need to locate themselves once. In mobile WSNs, anchors and agents move with time. Therefore, agents need to locate themselves in a sequential manner. In contrast with static WSNs, mobile WSNs alleviate several issues, such as coverage optimization and target tracking. A plethora of localization systems are proposed in the literature. In [
6], the authors provided a general overview of localization in WSNs and showed the importance of different localization approaches in modern IoT applications. In [
7], the authors focused on mobile WSNs and analyzed localization algorithms in mobile WSNs.
Cooperative self-localization and target tracking are closely related because target tracking can only be carried out when the locations of agents are clear. In recent years, some researches combined self-localization with target tracking and proposed a series of joint location algorithms. In [
8], a simultaneous localization and tracking algorithm was introduced to solve the problem of tracking a non-cooperative target while simultaneously localizing and calibrating the static nodes in the network. In [
9], a Bayesian method based on belief propagation (BP) was proposed for the distributed sequential localization of mobile networks composed of both cooperative agents and non-cooperative targets. This provided a consistent combination of cooperative self-localization and distributed tracking. However, the motion parameters (such as velocity) and the state-transition probability density function (pdf) of each node were assumed to be available. In [
10], a distributed variational filtering was presented to simultaneously localize the detecting sensors and track the target by exploiting a series of measurements generated in the sensors when the target moved through the network field.
Target tracking is divided into two categories, i.e., centralized and distributed. In centralized target tracking, the nodes that detect the target transmit their measurements related to the target to a central processing node in a hop-by-hop communication mode. Then, the central node determines the positioning of the target by uniformly processing all of the measurements. However, the communication overhead of multi-hop data transmission is very large and energy consumption is too high. In distributed target tracking, each node locates the target according to all measurements related to the target. Therefore, the key problem is how to make each node obtain all of the measurements. In [
11], a scheme was proposed in which agents broadcasted their own measurements, identification numbers, and additional information, such as the ID of the target. They also received these from other nodes and updated the information. All of the agents repeated the process until each agent obtained all of the measurement information related to the target. In this way, each agent was a fusion center and could perform tracing tasks. However, much redundant information existed in the network, and the required storage space was also very large. Therefore, this method is suitable for a fully connected network with a large communication radius. Consensus algorithm [
12,
13,
14] provides another way for each agent to communicate observations with the remaining agents engaged in the tracking. Consensus is a distributed iterative algorithm relying on communication links between neighboring nodes and can achieve entire network polymerization (such as sum, average, or maximum). This does not need a routing algorithm and is robust to changes in network topology and unreliable network environments. Therefore, consensus algorithm is widely used in distributed target tracking [
15,
16]. In [
17], each node calculated the mean and variance of the local posterior by weighted sampling. Then, the average consensus algorithm was employed to calculate the approximation of the global posterior to complete distributed target tracking. In [
18], the global likelihood function was approximated to a Gaussian distribution, and each node obtained the approximation through consensus iteration. Furthermore, a consensus algorithm, which is applicable to any exponential likelihood function, was proposed in [
19].
As an implementation of approximate Bayesian inference, messaging passing algorithm is particularly well-suited to distributed calculation and has been applied to cooperative self-localization and tracking of WSNs [
9,
20,
21]. In previous work [
22], we proposed a distributed cooperative self-localization algorithm by employing variational message passing (VMP) on factor graphs for static WSNs. With regard to the non-Gaussian messages caused by the nonlinear ranging model, we approximated them to Gaussian messages by exploiting second-order Taylor expansion, which significantly reduced the computational complexity. Then, we further combined the VMP approach in [
22] with BP and proposed a cooperative self-localization algorithm for mobile WSNs in [
23]. In this paper, we focus on mobile networks with anchors, moving agents, and targets deployed in a two-dimensional plane. In particular, the anchors have perfect location information at all times, while the cooperative agents and the non-cooperative targets are at unknown positions and can move independently. We divide the positioning process into two phases, i.e., a prediction phase and a joint self-location and tracking phase. Firstly, an adaptive prediction model is proposed to calculate the prediction message from the previous time slot. Then, in the joint self-location and tracking phase, the agents locate themselves using the measurements from neighboring nodes (agents and anchors) and the detectable targets, and the average consensus algorithm is employed to achieve distributed positioning of the targets. The simulation results show that the proposed prediction model is more adaptive and accurate than instant prediction, linear prediction, or square prediction, and the proposed joint self-location and tracking algorithm is better than the separate cooperative self-localization and target tracking algorithms.
This paper is organized as follows. In
Section 2, we first describe the system model of cooperative self-localization, and tracking. Then, the corresponding probabilistic model and factor graph are analyzed. In
Section 3, the proposed distributed joint self-location and tracking algorithm are described in detail, including a prediction phase and a joint self-location and tracking phase. The performance of the proposed prediction model and joint localization algorithm are evaluated in
Section 4. Finally, conclusions are drawn in
Section 5.
Notations: Boldface lowercase and uppercase letters denote vectors and matrices, respectively. Superscript ( )T and symbol stand for transposition and Euclidian norm, respectively. The probability density function (pdf) of a 1D Gaussian distribution with mean and variance is represented by while the pdf of a 2D Gaussian distribution with mean vector and covariance matrix is represented by .
2. System Model and Factor Graph
We consider a network with anchors, moving agents, and targets deployed in a two-dimensional plane, which can be defined by a vertices set and an edges set , i.e., . Here, each vertex represents a node in the plane and each edge indicates a neighborhood structure between node i and node j. We divide set into three parts: , where designates all anchors with perfect location information, includes all agents at unknown positions, and represents all non-cooperative targets. Moreover, the number of anchors, agents, and targets are denoted by , , and , respectively.
Time is slotted and we assume that all agents and targets move independently. At the
kth time slot, the position variable of node
is denoted by
. For simplicity of illustration, the communication link between cooperative neighbors is assumed to be symmetric, which means
and
if
, where
R is the communication radius. At the
kth time slot, if
, nodes
i can obtain the current position of node
j and a ranging measurement
with Gaussian noise
. Consequently, the ranging measurement
can be formulated as
and the likelihood function of the position variables of
and
is a Gaussian pdf, i.e.,
For convenience of description, we define ( for anchors and for agents) to represent all nodes who can detect target at the kth time slot. Similarly, let denote all nodes from whom node can implement ranging measurement at the kth time slot. Typically, notation represents all targets that node m can detect at the kth time slot. Moreover, we denote the position variables of all nodes by , the ranging measurements of node by , and the ranging measurements of target by , respectively. Then, let and represent the position variables of all nodes and ranging measurements at the kth time slot, respectively. Furthermore, let denote the position variables of all nodes from the 0th time slot to the kth time slot and denote the ranging measurements from the 1st time slot to the Kth time slot, respectively.
According to Bayesian rules and the assumption that all nodes move independently, the joint a posteriori distribution of
with given observations
can be formulated as
where
is the a prior distribution of node
I, which is assumed to be a Gaussian pdf with mean
and covariance matrix
,
is the likelihood function of node
i and node
j, and
is the probabilistic state-transition function.
For simplicity, we define
and
. Based on the factorization in (1), the joint a posteriori distribution of
can be represented by a factor graph, as shown in
Figure 1. In the factor graph, each variable node represents the position variable
of node
i and is depicted by a circle, while each factor node represents a local function
or
and is drawn by a square. Moreover, if a variable is an argument of a local function, it is connected to the factor node through an edge.
Generally speaking, factor graphs are undirected digraphs, which means the edge between a factor node and a variable node is undirected. However, in
Figure 1, messages only flow forward in time regarding the spatiotemporal constraints of the network. We do not calculate the messages from the present to the past because network connectivity may change and the states of the nodes may be outdated. Furthermore, the variable node of an anchor’s position ignores the messages from its neighbors as anchors’ positions are known.
3. Distributed Joint Self-Location and Tracking Algorithm
As shown in
Figure 1, for the cooperative agent
and the non-cooperative target
, the beliefs of
and
, denoted by
and
, consist of two kinds of message: Prediction messages from the (
k−1)th time slot and cooperative messages from the neighbors. Based on message passing rules, for node
, the belief
can be described as
where
Z is the normalization constant and
and
represent messages from factor node and factor nodes
(
) to variable node
, respectively. Therefore, agent
determines
and
(
) by two phases, i.e., a prediction phase and a joint self-location and tracking phase.
3.1. Adaptive Prediction Model and Prediction Message Calculating
In (1), the probabilistic state-transition function of node i is related to the position prediction model. In this paper, according to the inertia of the motion, we propose an adaptive prediction model by exploiting the correlation of trajectories of node i within a short period.
We denote the trajectory of node
i from the (
k−N)th time slot to the (
k−1)th time slot as
, where
, …,
are the estimated positions of node
i at the (
k−N)th, …, (
k−1)th time slot. Similarly, the trajectory of node
i from the (
k−
N + 1)th time slot to the
kth time slot can be described as
. Then, we formulate the prediction model of node
i as
where
is the prediction matrix of node
i and its dimension is 2
N × 2
N. Obviously, there are only two different elements between
and
, i.e.,
and
. Therefore, the elements from the 3rd to the 2
Nth rows are
According to the inertia of the motion of node
i, we assume that the prediction matrix
is unchanged in a short period. Based on the prediction model in (4), we have
Consequently, it can be formulated as
Based on Equations (3) and (5), we have
Obviously, translational motion will not change the prediction matrix
. Therefore, it can be expressed as
and
satisfies the constraint as follows
where
and its two base vectors are
and
. Then we have
and
.
Assume that each node stores
M (
) estimated positions before the
kth time slot, which constitute
trajectories, i.e.,
,
,…,
. Based on the prediction model in Equation (3), we obtain an equation set which can be expressed as
According to Equations (4) and (10), we have
where
and
are the first and second rows of
. For convenience of description, we define
Then, according to Equations (4), (10), and (11), we have
Consequently,
and
can be determined based on the least square method, i.e.,
Finally, the prediction matrix
Pi is given by Equations (4) and (13). Let
denote the predicted position of node
i. According to the prediction model in Equation (3),
can be given by
Then, we use the predicted position
to formulate the prediction message
as
where the covariance matrixes are
and
.
3.2. Joint Self-Location and Tracking Phase
After calculating the prediction message based on the adaptive prediction model, agent locates itself using ranging measurements, not only from its neighbor anchors and agents , but also from targets that it can detect. Meanwhile, agents and anchors that can detect target O share information with each other based on consensus iteration and determine the position of the target O. Compared with the separate cooperative self-localization and algorithms, agents use the ranging measurements from targets to improve the self-location accuracy, which promotes tracking performance in turn.
3.2.1. Self-Location of Agents Based on Variational Message Passing
At the
kth time slot, agent
obtains its prediction message
based on the adaptive prediction model described in
Section 3. Then, according to VMP update rules, cooperative messages from its neighbors are expressed as follows:
In (16),
is the position of anchor
at the
kth time slot. Consequently, the belief
in Equation (2) can be rewritten as
Considering the communication overhead, the messages passed on in
Figure 1 are restricted to Gaussian distribution. However,
, given by Equation (18), is non-Gaussian because of the nonlinear ranging model. In [
20], we propose a low-complexity approximation method based on second-order Taylor expansion. In this way, the belief
is approximated into a Gaussian function denoted by
, where
and
are as follows:
In Equations (19) and (20), the notations
and
represent the estimated positions of nodes
m and
j in the latest iteration, respectively, notations
and
are the first-order gradient and the Hessian matrix of
at
, respectively, and the notations
and
are the first-order partial derivatives of
and
at (
,
), respectively (please see [
22] for detailed derivation). Consequently, agent
obtains its location based on maximum a posteriori (MAP), i.e.,
.
3.2.2. Target Tracking Based on Average Consensus
At
kth time slot, node
, which can detect target
, computes the prediction message
and the local message
. Then,
is approximated into Gaussian function
using the approximation method in [
22]. Therefore, the Gaussian approximation of
can be expressed as
The mean vector and the covariance matrix are given by and , respectively. Each node can calculate and locally. However, node cannot determine unless all other neighbors of target share their local information with it.
For convenience of discussion, let
,
and
; therefore, we have
In order to locate the target in a distributed manner, we use the average consensus based on Metropolis weights proposed in [
13] to diffuse information across the network. During the process, each node updates its data with a weighted average of its neighbors’ data, which converges to the global average. Let
t denote the iteration index and
represent the number of neighbors of node
i, respectively. The consensus iteration process is as follows.
Step 1: Each node
uses local information to initialize the global average
and
as
while each node
initializes
and
as
Step 2: Each node computes the Metropolis weight matrix, which is defined as
Step 3: Each node broadcasts its global average computed in the latest iteration and collects the information broadcasted by its neighbors. Then, each node updates the global average
and
by
Step 4: If (where is the maximum number of iteration), the consensus process ends. Otherwise, go to Step 2.
After sufficient consensus iterations, all nodes obtain the global average of
and
. Therefore, each node
can compute
and
by
Submitting Equations (27) and (28) to Equations (22) and (23), each node
has
Therefore, each node can determine the position of target based on MAP, i.e., .
3.3. Implementation Scheme of the Joint Self-Location and Tracking Algorithm
The proposed distributed joint self-location and tracking algorithm based on VMP and average consensus is stated as follows.
Algorithm 1: Distributed joint self-location and tracking algorithm |
1 | for (k is the time slot index) |
2 | Each agent updates M historical position information of itself and the targets before the kth time slot. |
3 | Each agent calculates its prediction matrix using Equation (4) and Equation (13), then predicts its position using Equations (14) and obtains its prediction message using Equation (15). |
4 | Each node predicts the position of target using Equation (4), Equation (13), and Equation (14), i.e., . Then, the prediction message is calculated using Equation (15). |
5 | Initialization: Each agent initializes its position as and initializes the position of the target that it detects as . |
6 | for (where q is the iteration index) |
7 | - (1)
Each agent collects ranging measurements from its neighbors and calculates cooperative messages () from neighbor anchors using Equation (16) and () from neighbor agents and targets using Equation (17), respectively. Then, each agent calculates and of using Equations (19) and (20), respectively.
|
8 | - (2)
Each node receives the local message and approximates it into Gaussian function based on the Taylor expansion approximation method in [ 20]. Then the global average is calculated based on average consensus iteration from Step 1 to Step 4, which are depicted in Section 3.2.2. Then, each node computes and using Equations (27)–(30).
|
9 | - (3)
Each agent broadcasts the mean and the covariance matrix of . Each node broadcasts and . At the same time, they collect the information broadcasted by its neighbors.
|
10 | end for q |
11 | Each agent determines its position based on MAP and broadcasts and . Each node determines the position of target O based on based on MAP and broadcast and . |
12 | end for k |
5. Conclusions
In this paper, we built an adaptive prediction model by exploiting the correlation of trajectories and then proposed a joint self-location and tracking algorithm based on VMP and average consensus. Simulation results and analysis illustrated that, compared with instant prediction, linear prediction, and square prediction, the proposed prediction model was more adaptive to the movement of the nodes. The self-location performance of the proposed algorithm is better than the separated cooperative self-localization, and the tracking performance of the proposed algorithm is close to the centralized tracking algorithm with less communication overhead.
The proposed algorithm is suitable for tracking bird migration patterns, monitoring gas diffusion, etc. In these applications, the motion of the targets is random. The following research aimed to apply the proposed approach to practices. In practical networks, delays in data transmission and communication errors are two important issues which affect positioning accuracy and real-time tracking. Future research will focus on the issue of how to deal with the impact of these two issues.