EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::Kinematic< Scalar_, Paths > Class Template Reference

A chain of two or more derivatives whose last one is driven by white noise: constant velocity and constant acceleration. More...

#include <EmrysFilter/Models/ProcessModel.h>

Inheritance diagram for Emrys::Kinematic< Scalar_, Paths >:
Emrys::ProcessFunction< internal::KinematicStep< internal::PathTag< std::tuple_element_t< 0, std::tuple< Paths... > > >::FixedValueDimension, internal::PathTag< Paths >... >, internal::ReadsOf< Paths... >, internal::WritesOf< Paths... >, AffineIn< internal::PathTag< Paths >... >, internal::DiscreteNoise< internal::KinematicNoise< internal::PathTag< std::tuple_element_t< 0, std::tuple< Paths... > > >::FixedValueDimension, Scalar_, internal::PathTag< Paths >... > > >

Public Types

using Scalar = Scalar_
 the scalar type of the spectral density
using SpectralDensityMatrix = Eigen::Matrix<Scalar_, Dimension, Dimension>
 The spectral density's type: \( d \times d \) over the last derivative's coordinates.

Public Member Functions

 Kinematic (Scalar_ spectralDensity)
 Spectral density spectralDensity on every axis, independently.
 Kinematic (SpectralDensityMatrix const &spectralDensity)
 Spectral density matrix spectralDensity.
SpectralDensityMatrix const & spectralDensity () const

Static Public Attributes

static constexpr int Order = int(sizeof...(Paths))
 Number of blocks in the chain.
static constexpr int Dimension = First::FixedValueDimension
 Dimension of each block.

Detailed Description

template<RealScalar Scalar_, typename... Paths>
class Emrys::Kinematic< Scalar_, Paths >

A chain of two or more derivatives whose last one is driven by white noise: constant velocity and constant acceleration.

Paths name the chain in order, such as position and then velocity. Each is a tag or a TagPath to a fixed-size block, and all have the same dimension \( d \). A chain adds one block's value to another's, so each block's differences must have the size of its values. A single block is a RandomWalk, which adds nothing and takes any block. Over a step \( \Delta t \), block \( i \) of an \( N \)-block chain moves by \( x_i' = \sum_{j \ge i} \frac{\Delta t^{j-i}}{(j-i)!} x_j \), and the noise is

\[ Q_{ij} = \frac{\Delta t^{k}}{k \, (N-1-i)! \, (N-1-j)!} \, Q_c, \qquad k = 2N - 1 - i - j, \]

the exact discretization of white noise with spectral density \( Q_c \) (a \( d \times d \) matrix) on the last derivative. The model is affine in its blocks and returns its Jacobian, so Linearized predicts it exactly without differentiating.

These are the continuous white noise acceleration and jerk models of Bar-Shalom, Li, and Kirubarajan (2001), for any number of derivatives: the closed form of the exact discretization (as given in Discretization), \( \int_0^{\Delta t} e^{A s} G Q_c G^T e^{A^T s}\,ds \) for the chain's nilpotent \( A \).

Scalar_ is the type of \( Q_c \), and comes before the paths, as a type ending in a pack takes it; the aliases take it last, double by default. The step computes in the scalar of the step it is given, the filter's, converting \( Q_c \) to it where the two differ.

See also
RandomWalk, ConstantVelocity, ConstantAcceleration

Member Function Documentation

◆ spectralDensity()

template<RealScalar Scalar_, typename... Paths>
SpectralDensityMatrix const & Emrys::Kinematic< Scalar_, Paths >::spectralDensity ( ) const
inlinenodiscard
Returns
the spectral density \( Q_c \) of the white noise on the last derivative

The documentation for this class was generated from the following file: