Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# correctjpda

Correct state and state estimation error covariance using JPDA

## Syntax

``[x_corr,P_corr] = correctjpda(filterObj,z,jp)``
``[x_corr,P_corr] = correctjpda(filterObj,z,jp,varargin)``
``[x_corr,P_corr] = correctjpda(filterObj,z,jp,zcov)``
``[x_corr,P_corr,z_corr] = correctjpda(filterObj,z,jp)``

## Description

````[x_corr,P_corr] = correctjpda(filterObj,z,jp)` returns the correction of state, `x_corr`, and state estimate error covariance, `P_corr`, using a set of measurements `z` and their joint probabilistic data association coefficients `jp`. This syntax supports a filter object, `filterObj`, created by `trackingKF`, `trackingEKF`, `trackingMSCEKF`,`trackingUKF`, `trackingABF`, `trackingCKF`, `trackingGSF`, `trackingPF`,or `trackingIMM`.```
````[x_corr,P_corr] = correctjpda(filterObj,z,jp,varargin)` specifies additional parameters used by the measurement function defined in the `MeasurementFcn` property of the tracking filter object. This syntax supports a filter object, `filterObj`, created by `trackingEKF`, `trackingMSCEKF`,`trackingUKF`, `trackingCKF`, `trackingGSF`, `trackingPF`, or `trackingIMM`.```
````[x_corr,P_corr] = correctjpda(filterObj,z,jp,zcov)` specifies additional measurement covariance `zcov` used in the `MeasuremetNoise` property of a `trackingKF` filter object. This syntax only supports a filter object, `filterObj`, created by `trackingKF`.```
````[x_corr,P_corr,z_corr] = correctjpda(filterObj,z,jp)` also returns the correction of measurements, `z_corr`. This syntax only supports a filter object, `filterObj`, created by `trackingABF`.```

## Input Arguments

collapse all

Tracking filter, specified as an object. For example, you can create a `trackingEKF` object as

`EKF = trackingEKF`
and use `EKF` as the value of `filterObj`.

Measurements, specified as an M-by-N matrix, where M is the dimension of a single measurement, and N is the number of measurements.

Data Types: `single` | `double`

Joint probabilistic data association coefficients, specified as an (N+1)-element vector. The ith (i = 1, …, N) element of `jp` is the joint probability that the ith measurement in `z` is associated with the filter. The last element of `jp` corresponds to the probability that no measurement is associated with the filter. The sum of all elements of `jp` equals 1.

Data Types: `single` | `double`

Measurement covariance matrix, specified as an M-by-M matrix, where M is the dimension of the measurement. The same measurement covariance matrix is assumed for all measurements in `z`.

Data Types: `single` | `double`

Measurement function arguments, specified as a comma-separated list. These arguments are the same ones that are passed into the measurement function specified by the `MeasurementFcn` property of the tracking filter. For example, if you set `MeasurementFcn` to `@cameas`, and then call

`[x_corr,P_corr] = correctjpda(filter,frame,sensorpos,sensorvel)`
The `correctjpda` method will internally call
`meas = cameas(state,frame,sensorpos,sensorvel)`

## Output Arguments

collapse all

Corrected state, returned as a P-element vector, where P is the dimension of the estimated state. The corrected state represents the a posteriori estimate of the state vector, taking into account the current measurements and their association probabilities.

Corrected state error covariance matrix, returned as a positive-definite P-by-P matrix, where P is the dimension of the state estimate. The corrected state covariance matrix represents the a posteriori estimate of the state covariance matrix, taking into account the current measurements and their association probabilities.

Corrected measurements, returned as an M-by-N matrix, where M is the dimension of a single measurement and N is the number of measurements.

collapse all

### JPDA Correction Algorithm for Discrete Extended Kalman Filter

In the measurement update of a regular Kalman filter, the filter usually only needs to update the state and covariance based on one measurement. For instance, the equations for measurement update of a discrete extended Kalman filter can be given as

`$\begin{array}{l}{x}_{k}{}^{+}={x}_{k}{}^{-}+{K}_{k}\left(y-h\left({x}_{k}{}^{-}\right)\right)\\ {P}_{k}{}^{+}={P}_{k}{}^{-}-{K}_{k}{S}_{k}{K}_{k}{}^{T}\end{array}$`

where xk and xk+ are the a priori and a posteriori state estimates, respectively, Kk is the Kalman gain, y is the actual measurement, and h(xk) is the predicted measurement. Pk and Pk+ are the a priori and a posteriori state error covariance matrices, respectively. The innovation matrix Sk is defined as

`${S}_{k}={H}_{k}{P}_{k}{}^{-}{H}_{k}{}^{T}$`

where Hk is the Jacobian matrix for the measurement function h.

In the workflow of a JPDA tracker, the filter needs to process multiple probable measurements yi (i = 1, …, N) with varied probabilities of association βi (i = 0, 1, …, N). Note that β0 is the probability that no measurements is associated with the filter. The measurement update equations for a discrete extended Kalman filter used for a JPDA tracker are

`$\begin{array}{l}{x}_{k}{}^{+}={x}_{k}{}^{-}+{K}_{k}\sum _{i=1}^{N}{\beta }_{i}\left({y}_{i}-h\left({x}_{k}{}^{-}\right)\right)\\ {P}_{k}{}^{+}={P}_{k}{}^{-}-\left(1-{\beta }_{0}\right){K}_{k}{S}_{k}{K}_{k}{}^{T}+{P}_{k}\end{array}$`

where

`${P}_{k}={K}_{k}\sum _{i=1}^{N}\left[{\beta }_{i}\left({y}_{i}-h\left({x}_{k}{}^{-}\right)\right){\left({y}_{i}-h\left({x}_{k}{}^{-}\right)\right)}^{T}-\left(\delta y\right){\left(\delta y\right)}^{T}\right]{K}_{k}{}^{T}$`

and

`$\delta y=\sum _{j=1}^{N}{\beta }_{j}\left({y}_{j}-h\left({x}_{k}{}^{-}\right)\right)$`

Note that these equations only apply to `trackingEKF` and are not the exact equations used in other tracking filters.

## References

[1] Fortmann, T., Y. Bar-Shalom, and M. Scheffe. "Sonar Tracking of Multiple Targets Using Joint Probabilistic Data Association." IEEE Journal of Ocean Engineering. Vol. 8, Number 3, 1983, pp. 173 —184.