Previously when I have implemented Kalman filters I have used the transformation

$$ \mathbf{A(t)} = \mathcal{L}^{-1} \left( s \mathbf{I} - \mathbf{F} \right) ^{-1} $$

to calculate the state transition matrix $\bf{A}$ from the system dynamics matrix $\bf{F}$.

Where the equation describing the state of the system is

$$ \vec{x_t} = \mathbf{F_t} \vec{x_{t-1}} + \mathbf{B_t} \vec{u_t} + \vec{w_t} $$

and my prediction step calculation is

$$ \vec{x_{k|k-1}} = \mathbf{A} \vec{x_{k-1|k-1}} + B\vec{u_k} $$

For example for simple sinusoidal Kalman filter started from the following equation of motion:

$ \ddot{x} = -\omega^2x $

So my matrix equation of motion was:

$$ \begin{bmatrix} \dot{x} \\ \ddot{x} \\ \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -\omega^2 & 0 \\ \end{bmatrix} . \begin{bmatrix} x \\ \dot{x} \\ \end{bmatrix} $$

and my system dynamics matrix was

$$ F = \begin{bmatrix} 0 & 1 \\ -\omega^2 & 0 \\ \end{bmatrix} $$

I then performed the transformation $ \mathbf{A(t)} = \mathcal{L}^{-1} \left( s \mathbf{I} - \mathbf{F} \right) ^{-1} $ to get the state transition matrix like so:

$$ A(t) = \begin{bmatrix} \cos(\omega t) & \dfrac{\sin(\omega t)}{\omega} \\ -\omega \sin(\omega t) & \cos(\omega t) \\ \end{bmatrix} $$

Where I then replaced $t$ with my sample time $T_s$ where $T_s = \dfrac{1}{F_s}$ where $F_s$ was my sample frequency.

I then used this to extract my sinusoidal signal.

My question is did I need to perform this transformation? And if I did, why did I have to do so?

I was reading the paper linked here where they attempt the explain the Kalman filter in simple way and they did no such transformation.

  • $\begingroup$ It's not clear to me, but I suspect you're doing it because your "equation of motion" is not a discrete-time equation, but you're applying a discrete time state-space system. Perhaps it's a sampling step? The state transition matrix doesn't change like that when starting from a discrete-time state-space equation and applying the KF equations. $\endgroup$
    – Peter K.
    May 18, 2017 at 9:03
  • $\begingroup$ I was following the derivation of a sinusoidal kalman filter in Fundamentals of Kalman filtering : a practical approach 2nd ed. by Paul Zarchan where they perform this operation. I assume this approach is not necessary in general then to take any arbitrary F matrix to an A matrix? $\endgroup$ May 18, 2017 at 9:13
  • $\begingroup$ I don't have the book to hand currently to check if he explains why this step was taken. $\endgroup$ May 18, 2017 at 9:15
  • $\begingroup$ Provided everything is discrete, then the transformation is not needed, yes. $\endgroup$
    – Peter K.
    May 18, 2017 at 9:19
  • $\begingroup$ Are you aware of how this transformation takes you from the continuous-time state-space to the discrete-time state-space? $\endgroup$ May 18, 2017 at 9:29

2 Answers 2


As I said in the comments, there should be no need at all to do such a transformation if all of your equations start in discrete-time.

The equation $$ (s \mathbf{I} - \mathbf{F} )^{-1} $$ is just the Laplace transform of the solution for the state equation: $$ \dot{\vec{x_t}} = \mathbf{F} \vec{x_t} + \vec{w_t} $$

However, I really can't see how $\mathbf{F}$ works in: $$ \vec{x_t} = \mathbf{F_t} \vec{x_{t-1}} + \mathbf{B_t} \vec{u_t} + \vec{w_t} $$ because this is a discrete-time equation, and the equation you're looking at generating the sinewave is continuous-time.

Can you clarify?

  • $\begingroup$ I'll need to check in the book from which I obtained the derivation, I don't have it to hand at the moment, but should have it in 4 hours. If $\left( s \mathbf{I} - \mathbf{F} \right)^{-1}$ is the Laplace transform, which I didn't realise, then the inverse laplace transform performed in $\mathcal{L}^{-1} \left( s \mathbf{I} - \mathbf{F} \right)^{-1}$ of this should bring you back to the original matrix. I presume that there is some trick being used to take it from continuous time to discrete time by Laplace transforming it and then performing the inverse transformation. $\endgroup$ May 18, 2017 at 12:11
  • $\begingroup$ @SomeRandomPhysicist That'd be my guess, but you'd have to check the book to make sense of it. $\endgroup$
    – Peter K.
    May 18, 2017 at 12:35
  • $\begingroup$ The inverse Laplace transform will give you the homogeneous (non-forced) solution to the differential equation --- in this case, a sine wave. $\endgroup$
    – Peter K.
    May 18, 2017 at 13:54
  • $\begingroup$ In the book I worked from, the author states that for a time invariant systems dynamics matrix one can derive the state transition matrix by performing the transformation $\mathcal{L}^{-1}([s\mathbf{I}-\mathbf{F}]^{-1})$ and cites Kalman and Bucy's 1961 paper "New Results in Linear Filtering and Prediction Theory" $\endgroup$ May 18, 2017 at 15:17
  • 1
    $\begingroup$ RIght, so that Python discussion uses equation (8), which makes sense (see under the section The Matrix Exponential). Nice writeup, that! $\endgroup$
    – Peter K.
    May 18, 2017 at 15:50

The Laplace transform you show is equivalent to taking the matrix exponential of $\mathbf{F}$. Think about the properties of a continuous time state transition matrix, $\Psi(t,t)=I $, $$\Psi(t0,t1)\Psi(t1,t3)=\Psi(t0,t3),$$ and also that you can reverse time. $\mathbf{F}$ doesn't have those properties. It doesn't have to be invertible either.

$\mathbf{F}$ defines the continuous time differential equation at time $t$. It isn't the solution of the state at t+tau. One must also include the contribution of the control through $\mathbf{B}$, which is a bit more complicated. The solution is for $t$ doesn't assume that $t$ is evaluated at regular intervals but if we want to convert to discrete time, we evaluate at times corresponding to a discrete times.

If the state is discrete time and things like financial models are intrinsically discrete in time, that aren't derived from a continuous time system. One does not need to take the Laplace transform or matrix exponential. It only comes into play if the system was specified as a continuous time system

There is also the Kalman Bucy filter which is all continuous time.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.