# A Robust Tracking Algorithm Based on a Probability Data Association for a Wireless Sensor Network
## 3 Proposed Method
### Model Matching
Furthermore:  
\[S_{2,n}(k)=BP_{2}(k)k-1)B^{T}+\sigma_{G}^{2}\big{(}H_{2,n}^{T}(z_{n})H_{2,n}(z _{n})\big{)}^{-1}, \tag{27}\]  
\[H_{2,n}(z_{n})=\frac{\partial h_{2,n}\big{(}[x,y]^{T}\big{)}}{\partial[x,y]} \bigg{|}_{x=x,y=y}, \tag{28}\]  
where \(S_{2,n}(k)\) is the innovation covariance matrix for the position estimation from subgroup \(n\) at time step \(k\). The number of \(z_{n}(k)\) that falls into the validation region is calculated and is referred to as \(N_{V}(k)(0\leq N_{V}(k)\leq N)\). In order to judge whether \(N_{V}(k)=0\) is continuous or not, we propose the NLOS tracer method, which is used to record \(N_{V}(k)=0\). Therefore, we define:  
\[L(k)= \begin{cases}1&\text{if }N_{V}(k)>0\\ 0&\text{if }N_{V}(k)=0\end{cases} , \tag{29}\]  
When \(N_{V}(k)\) is larger than zero, we need to calculate the association probabilities used to weight the position estimation \(z_{n}(k)\), which are also called the posterior probabilities. The premise of accurately calculating the association probabilities are to determine the threshold value of the validation region, and the selection of the threshold is related to the tracking threshold probability \(P_{G}\). The tracking threshold probability \(P_{G}\) denotes the probability that the position estimation \(z_{n}(k)\) determined from LOS beacon nodes with smallest error covariance falls into the valid region. Furthermore:  
\[\int\limits_{0}^{\gamma}f_{x^{2}(2)}(x)dx=P_{G}=1-P_{FA}, \tag{30}\]  
where \(f_{x^{2}(2)}(\cdot)\) is the chi-square probability density function with two degrees of freedom, and \(P_{FA}\) is the preset false alarm rate. Giving the probability \(P_{G}\), the threshold value \(\gamma\) can be determined using the chi-square distribution table. _Data Association:_ In order to facilitate the calculation of the association probabilities, we define the following association events, following the approach taken in [33]:  
\(\theta_{l}(k)\): [\(z_{l}(k)\) is determined from the LOS beacon nodes with the smallest error covariance, \(l=1,\ldots,N_{V}(k)\)]. \(\theta_{0}(k)\): [none of the position estimates \(z_{l}(k)\) at time step \(k\) stems from the LOS beacon nodes]. The associated probabilities are:  
\[\beta_{l}(k)=\Pr\big{[}\theta_{l}(k)\big{]}Z^{k}\big{]}=\Pr\big{[}\theta_{l}( k)\big{]}Z(k),N_{V}(k),Z^{k-1}\big{]},\ l=1,\ \ldots,\ N_{V}(k), \tag{31}\]where \(Z(k)=\{Z_{l}(k)\}_{l=1}^{N_{V}(k)}\) and \(Z^{k}\) is the cumulative set of the position estimation, i.e., \(Z^{k}=\{Z(i)\}_{i=1}^{k}\). Since the associated probabilities are calculated based on the Bayesian formula, assuming that the innovations \(v_{2,n}(k)\) are independent, Equation (31) can be rewritten as:  
\[\beta_{l}(k)=\frac{1}{c}f\Big{[}Z(k)\Big{|}\theta_{l}(k),N_{V}(k),Z^{k-1}\Big{]} \times\Pr\Big{\{}\theta_{l}(k)\big{|}N_{V}(k),Z^{k-1}\Big{\}},\;l  
Multiplying the probability density function of the position estimates by the prior probabilities gives:  
\[\beta_{l}^{\prime}(k)=\frac{N\Big{(}v_{2,l}(k);0,S_{2,l}(k)\Big{)}}{P_{G}}\Bigg{(} \frac{P_{d}P_{G}}{N_{V}(k)}\Bigg{)}\prod\limits_{i=1}^{N_{V}(k)} \begin{array}{c }V_{i}^{-1}(k),\;l=1,\;\ldots,\;N_{V}(k),\end{array}