Skip to content
Graphviz (DOT) templates

Kalman Filter Cycle

Predict / update cycle for state estimation.

Template previewGraphviz (DOT)
kf Predict Predict x̂_{k|k-1} = F x̂_{k-1|k-1} P_{k|k-1} = F P F^T + Q Innov Innovation y = z_k − H x̂_{k|k-1} Predict->Innov Gain Kalman gain K = P H^T (H P H^T + R)^{-1} Innov->Gain Update Update x̂_{k|k} = x̂_{k|k-1} + K y P_{k|k} = (I − K H) P Gain->Update Update->Predict

What this template contains

Graph
Directed
Edges
4
Source
10 lines

Make it your own.

digraph kf {
  layout=circo;
  graph [bgcolor=transparent];
  node [shape=box, style="rounded,filled", fontname=Inter, fontsize=10, fillcolor="#dbeafe"];

  Predict [label="Predict\nx̂_{k|k-1} = F x̂_{k-1|k-1}\nP_{k|k-1} = F P F^T + Q", fillcolor="#fef3c7"];
  Innov [label="Innovation\ny = z_k − H x̂_{k|k-1}"];
  Gain [label="Kalman gain\nK = P H^T (H P H^T + R)^{-1}"];
  Update [label="Update\nx̂_{k|k} = x̂_{k|k-1} + K y\nP_{k|k} = (I − K H) P", fillcolor="#dcfce7"];

  Predict -> Innov -> Gain -> Update -> Predict;
}