• Praktische Grundlagen der Informatik
  • Algorithmen und Datenstrukturen
  • Foundations for Robotic and AI
  • Übersicht Data Science:
  • Data Science / Machine Learning
  • Projekt: Deep Teaching
  • Alte Veranstaltungen:
  • Grundlagen der Informatik (NF)
  • Octave/Matlab Tutorial
  • Game Physik
  • Home
  • Lehre
  • Publikationen
  • Kontakt/Impressum

State-Space Model: From 1D-Kinematics to Matrices¶

The Kalman Filter requires the system's dynamics (kinematics) to be expressed in a discrete, linear matrix form called the State-Space Model.

For our example, we combine the position and velocity into a single State Vector and define a State Transition Matrix that moves the state forward in time.

State Vector and the Control Input¶

We define the state of the system ($\mathbf{x}$) at any time step $k$ as a vector containing all the variables we wish to track: position ($p$) and velocity ($v$).

$$\mathbf{x}_k = \begin{bmatrix} p \\ v \end{bmatrix}_k$$

The control input is the acceleration, i.e. the acceleration $a_{k}$ is the external "drive" of the system:

$$\mathbf{u}_k = \begin{bmatrix} a \end{bmatrix}_k$$

Discrete State-Space Prediction Equation¶

The discrete State-Space Prediction Equation with State Transition Matrix $\mathbf{F}$ and the Control Matrix $\mathbf{G}$ is:

$$\mathbf{x}_k = \mathbf{F}_{k-1} \mathbf{x}_{k-1} + \mathbf{G}_{k-1} \mathbf{u}_{k-1}$$

Where:

  • $\mathbf{x}_k$: The predicted state vector at time $k$.
  • $\mathbf{F}_{k-1}$: The State Transition Matrix.
  • $\mathbf{x}_{k-1}$: The prior state vector at time $k-1$.
  • $\mathbf{G}_{k-1}$: The Control Input Matrix.
  • $\mathbf{u}_{k-1}$: The Control Input Vector (or Input Vector).

Prediction Equation¶

The integrated kinematic equations (assuming constant acceleration $a_{k-1}$ over the interval $\Delta t = t_k - t_{k-1}$) are:

$$\begin{aligned} p_k &= p_{k-1} + v_{k-1} \Delta t + \frac{1}{2} a_{k-1} (\Delta t)^2 \\ v_k &= v_{k-1} + a_{k-1} \Delta t \end{aligned}$$

These equations can be written in a equation with maches the general form of the Discrete State-Space Prediction Equation: $$\underbrace{\begin{bmatrix} p \\ v \end{bmatrix}_k}_{\mathbf{x}_k} = \underbrace{\begin{bmatrix} 1 & \Delta t \\ 0 & 1 \end{bmatrix}}_{\mathbf{F}} \underbrace{\begin{bmatrix} p \\ v \end{bmatrix}_{k-1}}_{\mathbf{x}_{k-1}} + \underbrace{\begin{bmatrix} \frac{1}{2}\Delta t^2 \\ \Delta t \end{bmatrix}}_{\mathbf{G}} \underbrace{\begin{bmatrix} a \end{bmatrix}_{k-1}}_{ \mathbf{u}_{k-1}}$$

$\mathbf{F}$ and $\mathbf{G}$ are here time independent. Therefore, we can skip the index $k-1$.

  • The State Transition Matrix ($\mathbf{F}$): The matrix $\mathbf{F}$ maps the previous state $\mathbf{x}_{k-1}$ to the new state $\mathbf{x}_k$, assuming zero acceleration ($a=0$): $$\mathbf{F} = \begin{bmatrix} 1 & \Delta t \\ 0 & 1 \end{bmatrix}$$
    • Row 1 (Position $p$): $p_k$ depends on $1 \cdot p_{k-1}$ and $\Delta t \cdot v_{k-1}$.
    • Row 2 (Velocity $v$): $v_k$ depends on $0 \cdot p_{k-1}$ and $1 \cdot v_{k-1}$.
  • The Control Input Matrix ($\mathbf{G}$): This matrix maps the scalar acceleration into the changes in position and velocity: $$\mathbf{G} = \begin{bmatrix} \frac{1}{2}(\Delta t)^2 \\ \Delta t \end{bmatrix}$$

Summary: Full Discrete State-Space Model¶

Full linear prediction for 1D motion under constant acceleration:

$$\underbrace{\begin{bmatrix} p \\ v \end{bmatrix}_k}_{\mathbf{x}_k} = \underbrace{\begin{bmatrix} 1 & \Delta t \\ 0 & 1 \end{bmatrix}}_{\mathbf{F}} \underbrace{\begin{bmatrix} p \\ v \end{bmatrix}_{k-1}}_{\mathbf{x}_{k-1}} + \underbrace{\begin{bmatrix} \frac{1}{2}\Delta t^2 \\ \Delta t \end{bmatrix}}_{\mathbf{G}} \underbrace{\begin{bmatrix} a \end{bmatrix}_{k-1}}_{ \mathbf{u}_{k-1}}$$

This matrix form matches the formal structure:

$$\mathbf{x}_k = \mathbf{F} \mathbf{x}_{k-1} + \mathbf{G} \mathbf{u}_{k-1}$$

Kontakt/Impressum