navlie.lib.models.DoubleIntegratorWithBias¶
- class navlie.lib.models.DoubleIntegratorWithBias(Q: ndarray)¶
Bases:
DoubleIntegrator
The double-integrator process model, but with an additional bias on the input.
\[ \begin{align}\begin{aligned}\dot{\mathbf{r}} = \mathbf{v}\\\dot{\mathbf{v}} = \mathbf{u} - \mathbf{b}\\\dot{\mathbf{b}} = \mathbf{w}\end{aligned}\end{align} \]where \(\mathbf{u}\) is the input and \(\mathbf{b}\) is the bias. The bias is assumed to be a random walk with covariance \(\mathbf{Q}\).
- Parameters:
Q (np.ndarray) – Q: Discrete time covariance on the input u.
- Raises:
ValueError – if Q is not an n x n matrix.
- evaluate(x: VectorState, u: VectorInput, dt: float) → VectorState¶
Implementation of \({f}(\mathcal{X}_{k-1}, \mathbf{u}, \Delta t)\).
- jacobian(x, u, dt) → ndarray¶
Implementation of the process model Jacobian with respect to the state.
\[\mathbf{F} = \frac{D {f}(\mathcal{X}_{k-1}, \mathbf{u}, \Delta t)}{D \mathcal{X}_{k-1}}\]
- covariance(x, u, dt) → ndarray¶
Covariance matrix \(\mathbf{Q}_k\) of the additive Gaussian noise \(\mathbf{w}_{k} \sim \mathcal{N}(\mathbf{0}, \mathbf{Q}_k)\). If this method is not overridden, the covariance of the process model error is approximated from the input covariance using a linearization procedure, with the input Jacobian evaluated using finite difference.
- input_jacobian(dt)¶
- evaluate_with_jacobian(x: ~navlie.types.State, u: ~navlie.types.Input, dt: float) -> (<class 'navlie.types.State'>, <class 'numpy.ndarray'>)¶
Evaluates the process model and simultaneously returns the Jacobian as its second output argument. This is useful to override for performance reasons when the model evaluation and Jacobian have a lot of common calculations, and it is more efficient to calculate them in the same function call.
- input_covariance(x: State, u: Input, dt: float) → ndarray¶
Covariance matrix of additive noise on the input.
- input_jacobian_fd(x: State, u: Input, dt: float, step_size=1e-06, *args, **kwargs) → ndarray¶
Calculates the input jacobian with finite difference.