# Long Distance Moving Vehicle Tracking with a Multirotor Based on IMM-Directional Track Association
## 3 Multiple Target Tracking
### Directional Track-to-Track Association  
If multiple measurements on a single target are continuously detected, multiple tracks can be created for the target. The track association scheme was developed to eliminate redundant tracks when the Kalman filter is applied in [21]. In the paper, the track association method is improved by considering the moving direction of the target in the IMM framework. The multiple tracks on the same target have the error dependencies on each other, thus the following track-association hypothesis testing [18] is preceded as:  
\[ \begin{split}\big{[}\hat{\mathbf{x}}^{s}(k|k)-\hat{\mathbf{x}}^{t}(k|k) \big{]}^{T}[T^{st}(k)]^{-1}\big{[}\hat{\mathbf{x}}^{s}(k|k)-\hat{\mathbf{x}}^{t}(k|k) \big{]}^{T}\leq\gamma_{g},\\ s,t=1,\ldots,N_{T}(k),s\
eq t\end{split}  \tag{28}\]  
\[T^{st}(k)=P^{s}(k|k)+P^{t}(k|k)-P^{st}(k|k)-P^{ts}(k|k) \tag{29}\]  
\[P^{st}(k|k)=[I-b^{s}(k)W^{s}(k)H]\Big{[}FP^{st}(k-1|k-1)F^{T}+Q\Big{]}\big{[}I -b^{t}(k)W^{t}(k)H\big{]}, \tag{30}\]  
where \(\hat{\mathbf{x}}^{s}(k|k)\) and \(\hat{\mathbf{x}}^{t}(k|k)\) are the state vector of track \(s\) and \(t\), respectively, at frame \(k\), \(P^{s}(k|k)\) and \(P^{t}(k|k)\) are the covariance matrix of track \(s\) and \(t\), respectively, at frame \(k\), \(\gamma_{g}\) is the gate threshold for track association, \(b^{s}(k)\) and \(b^{t}(k)\) are binary numbers that become one when track \(s\) or \(t\) is associated with a measurement, otherwise they are zero. It is noted that \(T^{st}(k)\) in Equation (29) is meaningless if its determinant is not positive. The fused covariance in Equation (30) is a linear recursion and its initial condition is set at \(P^{st}(0\big{|}0)=\big{[}0\big{]}_{6\times 6}\), and \(W^{t}(k|k)\) is obtained as the combined filter gain of track \(t\) as:  
\[W^{t}(k|k)=\sum_{j=1}^{M}W_{j}^{t}(k|k)\mu_{j}^{t}(k). \tag{31}\]  
The directional gating process is newly developed for the directional track association. It tests the maximum deviation in the directions of velocity of tracks and the direction of a displacement vector between the positions of two tracks as:  
\[max\Bigg{(}\cos^{-1}\frac{<\hat{\mathbf{x}}^{st}(k|k),\ \hat{\mathbf{v}}^{s}(k|k)>}{\|\hat{\mathbf{x}}^{ st}(k|k)\|\|\hat{\mathbf{v}}^{s}(k|k)\|},\ \cos^{-1}\frac{<\hat{\mathbf{x}}^{st}(k|k),\ \hat{\mathbf{v}}^{t}(k|k)>}{\|\hat{\mathbf{x}}^{ st}(k|k)\|\|\hat{\mathbf{v}}^{t}(k|k)\|}\Bigg{)}\leq\theta_{g}, \tag{32}\]  
\[\hat{\mathbf{x}}^{st}(k|k)=\left[ \begin{array}{c}\hat{\mathbf{x}}^{s}(k)-\hat{\mathbf{x }}^{t}(k)\\ \hat{\mathbf{y}}^{s}(k)-\hat{\mathbf{y}}^{t}(k)\end{array} \right],\ \hat{\mathbf{v}}^{s}(k|k)=\left[ \begin{array}{c}\hat{\mathbf{v}}^{sx}(k)\\ \hat{\mathbf{v}}^{sy}(k)\end{array} \right]\hat{\mathbf{v}}^{t}(k|k)=\left[ \begin{array} []{c}\hat{\mathbf{v}}^{tx}(k)\\ \hat{\mathbf{v}}^{sy}(k)\end{array} \right], \tag{33}\]  
where \(<\cdot>\) denotes the inner product operation, \(\theta_{g}\) is the maximum deviation angle, \(\hat{\mathbf{x}}^{st}\) is a displacement vector between tracks \(s\) and \(t\), and \(\hat{\mathbf{v}}^{s}(k|k)\) and \(\hat{\mathbf{v}}^{t}(k|k)\) are the velocity vectors of tracks \(s\) and \(t\), respectively. The directional gating process is illustrated in Figure 4. Two tracks \(s\) and \(t\) are set in one target and a track \(u\) is set in another target. The angles between \(\hat{\mathbf{x}}^{st}(k|k)\) and \(\hat{\mathbf{v}}^{s}(k|k)\), and \(\hat{\mathbf{x}}^{st}(k|k)\) and \(\hat{\mathbf{v}}^{t}(k|k)\) are almost zero degree, while the angles between \(\hat{\mathbf{x}}^{tu}(k|k)\) and \(\hat{\mathbf{v}}^{t}(k|k)\), and \(\hat{\mathbf{x}}^{tu}(k|k)\) and \(\hat{\mathbf{v}}^{u}(k|k)\When the track association hypothesis and the directional gating process are satisfied, the most accurate track is selected, then the current state of the selected track is replaced with a fused estimate, and the non-selected track is immediately terminated. The selection process is based on the determinant of the covariance matrix because the more accurate track has less error (covariance).