# Kalman filter for tracking sinusoidal motion

I am wanting to create a Kalman filter that can be used to track an object undergoing sinusoidal (lets assume simple harmonic) motion. I have seen many examples and implemented my own python code for a simple SUVAT equation/projectile motion case however I have been having trouble finding examples where a Kalman filter is used to track an object moving with sinusoidal motion and I have been having trouble working out how to construct the State transition matrix (commonly called A) and the Control matrix (commonly called B) to model such behaviour.

This will eventually be used to track a noisy voltage signal corresponding to the position of an oscillating object such that one can recover it's 'true' motion.

I would appreciate if someone could direct me to some useful resources where I could learn how to do this or explain how I might go about doing this.

Assume that the amplitude remains constant as well as the angular frequency $\omega$. The phase will be predicted using $\phi_k=\phi_{k-1} + \omega T_s$

The measurement matrix usually denoted as H and is the Jacobian matrix or the first derivatives matrix of the model with respect to the state variables. B will be the all zeros matrix.

• Assume that $x(t) = A\sin(wt+\phi)$ and follow my instructions above. Kalman will do the "fitting" inherently. – Nir Regev Dec 1 '16 at 18:15
• See the image I posted. – Nir Regev Dec 1 '16 at 18:29
• The sampling interval. The amount of time in seconds between measurements. – Nir Regev Dec 1 '16 at 18:34
• Youre right it's not. This algorithm is called an extended Kalman filter (EKF) and the Jacobian matrix is used as a first order Taylor approximation. Hence the first derivative. – Nir Regev Dec 1 '16 at 19:03
• @AtulIngle maybe this picture will be more clear. – Nir Regev Dec 2 '16 at 18:35