UnscentedTransformation Class Template Reference

Inheritance diagram for UnscentedTransformation:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class T = unsigned int>
class indii::ml::filter::UnscentedTransformation< T >

Unscented transformation.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date
The unscented transformation propagates a Gaussian distributed random variable through a nonlinear function, estimating its new mean and covariance after application of the function. This is achieved by deterministic sampling of a set of sigma points from the distribution, propagation of these points through the function and recalculation of the mean and covariance.

Details

As described in Julier & Uhlmann (1997) and Wan & van der Merwe (2000), let $L$ be the number of dimensions of the input random variable $\mathbf{x}$, with mean $\mathbf{\bar{x}}$ and covariance matrix $P_x$. Let:

\[\lambda = \alpha^2 (L + \kappa) - L\]

$2L + 1$ sigma points $\mathcal{X}_i$ are defined as:

\[ \begin{array}{lcll} \mathcal{X}_0 & = & \mathbf{\bar{x}} \\ \mathcal{X}_i & = & \mathbf{\bar{x}} + \left(\sqrt{(L+\lambda)P_x} \right)_i & i = 1,\ldots,L \\ \mathcal{X}_i & = & \mathbf{\bar{x}} - \left(\sqrt{(L+\lambda)P_x} \right)_{i-L} & i = L+1,\ldots,2L \\ \end{array} \]

where $\left(\sqrt{(L+\lambda)P_x}\right)_i$ is the $i$th column of the matrix square root (Cholesky decomposition).

Mean weights $W^{(m)}_i$ and covariance weights $W^{(c)}_i$ are defined as:

\[ \begin{array}{lclcll} W^{(m)}_0 & = & & & \lambda/(L+\lambda) \\ W^{(c)}_0 & = & & & \lambda/(L+\lambda)+(1-\alpha^2+\beta) \\ W^{(m)}_i & = & W^{(c)}_i & = & 1/\left(2\left(L+\lambda\right)\right) & i = 1,\ldots,2L \\ \end{array} \]

Each sigma point is then propagated through the given function $f$:

\[ \begin{array}{lcll} \mathcal{Y}_i & = & f(\mathcal{X}_i) & i = 0,\ldots,2L \\ \end{array} \]

Finally, the mean and covariance of $f(\mathbf{x})$ are estimated as:

\begin{eqnarray*} \mathbf{\bar{y}} & \approx & \sum_{i=0}^{2L}W^{(m)}_i\mathcal{Y}_i \\ P_y & \approx & \sum_{i=0}^{2L}W^{(c)}_i (\mathcal{Y}_i-\mathbf{\bar{y}})(\mathcal{Y}_i-\mathbf{\bar{y}})^T \\ \end{eqnarray*}

and the cross-correlation matrix $P_{xy}$ as:

\[P_{xy} \approx \sum_{i=0}^{2L}W^{(c)}_i (\mathcal{X}_i-\mathbf{\bar{x}})(\mathcal{Y}_i-\mathbf{\bar{y}})^T\]

Implementation

This particular implementation uses a modified form of the above formulas so that it need not hold the complete set of sigma points in memory, as required in the calculation of $P_y$ above.

First, we rename $\mathbf{\bar{y}}$ to $\mathbf{\bar{y}}_m$; the mean calculated using mean weights $W^{(m)}_0,\ldots,W^{(m)}_{2L}$. We then define a second mean $\mathbf{\bar{y}}_c$ calculated using covariance weights $W^{(c)}_0,\ldots,W^{(c)}_{2L}$:

\begin{eqnarray*} \mathbf{\bar{y}}_c & \approx & \sum_{i=0}^{2L}W^{(c)}_i\mathcal{Y}_i \end{eqnarray*}

Noting that $W^{(c)}_i = W^{(m)}_i$ for $i = 1,\ldots,2L$, the two means need not be calculated independently.

The calculation of the covariance $P_y$ can then be modified to:

\begin{eqnarray*} P_y & \approx & \sum_{i=0}^{2L}W^{(c)}_i (\mathcal{Y}_i-\mathbf{\bar{y}}_m) (\mathcal{Y}_i-\mathbf{\bar{y}}_m)^T \\ & = & \sum_{i=0}^{2L}W^{(c)}_i (\mathcal{Y}_i\mathcal{Y}_i^T - \mathcal{Y}_i\mathbf{\bar{y}}_m^T - \mathbf{\bar{y}}_m\mathcal{Y}_i^T + \mathbf{\bar{y}}_m\mathbf{\bar{y}}_m^T) \\ & = & \sum_{i=0}^{2L}W^{(c)}_i\mathcal{Y}_i\mathcal{Y}_i^T - \mathbf{\bar{y}}_c\mathbf{\bar{y}}_m^T - \mathbf{\bar{y}}_m\mathbf{\bar{y}}_c^T + \sum_{i=0}^{2L}W^{(c)}_i\mathbf{\bar{y}}_m\mathbf{\bar{y}}_m^T \end{eqnarray*}

References

Julier, S.J. & Uhlmann, J.K. A New Extension of the Kalman Filter to nonlinear Systems The Proceedings of AeroSense: The 11th International Symposium on Aerospace/Defense Sensing, Simulation and Controls, Multi Sensor Fusion, Tracking and Resource Management, 1997.

Wan, E.A. & van der Merwe, R. The Unscented Kalman Filter for Nonlinear Estimation. Proceedings of IEEE Symposium on Adaptive Systems for Signal Processing Communications and Control (AS-SPCC), 2000.

Definition at line 136 of file UnscentedTransformation.hpp.


Public Types

enum  Parameter { ALPHA, BETA, KAPPA }
 Parameter indices. More...

Public Member Functions

 UnscentedTransformation (UnscentedTransformationModel< T > &model)
 Create new transformation with default parameter values.
 ~UnscentedTransformation ()
 Destructor.
indii::ml::aux::GaussianPdf transform (const indii::ml::aux::GaussianPdf &x, T delta=0, indii::ml::aux::matrix *P=NULL)
 Apply the unscented transformation.

Member Enumeration Documentation

enum Parameter

Parameter indices.

Enumerator:
ALPHA  $\alpha$; spread of the sigma points about $\mathbf{\bar{x}}$.

Usually set to a small positive value.

BETA  $\beta$; incorporates prior knowledge of the distribution of $\mathbf{x}$.

Value of 2 is optimal for Gaussian distributions.

KAPPA  $\kappa$; secondary scaling parameter.

Usually set to zero.

Definition at line 141 of file UnscentedTransformation.hpp.


Constructor & Destructor Documentation

UnscentedTransformation ( UnscentedTransformationModel< T > &  model  )  [inline]

Create new transformation with default parameter values.

Default values are obtained from UnscentedTransformationDefaults.

Parameters:
model Model representing the function $f$. Callee claims ownership.

Definition at line 225 of file UnscentedTransformation.hpp.

~UnscentedTransformation (  )  [inline]

Destructor.

Definition at line 234 of file UnscentedTransformation.hpp.


Member Function Documentation

aux::GaussianPdf transform ( const indii::ml::aux::GaussianPdf x,
delta = 0,
indii::ml::aux::matrix P = NULL 
) [inline]

Apply the unscented transformation.

Parameters:
x $P(\mathbf{x})$; distribution over the random variable to propagate through the function.
delta $\Delta t$; length of time through which to propagate the distribution, if relevant.
P If specified, the cross correlation matrix between the input and output of the function is estimated using sigma points and written into this matrix. The matrix should be of size $n \times m$, where $n$ is the dimensionality of the input space and $m$ the dimensionality of the output space.
Returns:
$P(f(\mathbf{x}))$; distribution over the function output.

Definition at line 239 of file UnscentedTransformation.hpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3