Kalman filter
=============
A discrete Kalman filter: each sample (every step, or sample\_time) it predicts with A, B and u, then corrects with y. Q: process noise, R: measurement noise (a number is that times I).
``kalman`` · control
.. raw:: html
Kalman filterfn
A1
B0
C1
Q0.01
R1
x0
P01
sample_time s0
Inputs
------
.. list-table::
:header-rows: 1
* - Port
- Type
- Unit
- Components
* - ``u``
- numbers
- —
- —
* - ``y``
- numbers
- —
- —
Outputs
-------
.. list-table::
:header-rows: 1
* - Port
- Type
- Unit
- Components
* - ``x_hat``
- numbers
- —
- —
* - ``P_trace``
- signal
- —
- —
* - ``innovation``
- numbers
- —
- —
Parameters
----------
.. list-table::
:header-rows: 1
* - Param
- Type
- Default
- Options or unit
* - ``A``
- text
- ``"1"``
- —
* - ``B``
- text
- ``"0"``
- —
* - ``C``
- text
- ``"1"``
- —
* - ``Q``
- text
- ``"0.01"``
- —
* - ``R``
- text
- ``"1"``
- —
* - ``x0``
- text
- —
- —
* - ``P0``
- number
- ``1.0``
- —
* - ``sample_time``
- number
- ``0.0``
- s