# Should the input of a Kalman filter always be a signal and its derivative?

I always see the Kalman filter used with such input data. For example, the inputs are commonly a position and the correspondent velocity:

$$(x, \dfrac{dx}{dt})$$

In my case, I only have 2D positions and angles at each sample time:

$$P_i(x_i, y_i) \qquad \text{and} \qquad (\alpha_1, \alpha_2, \alpha_3)$$

Should I compute velocities for each point and for each angle to be able to fit the Kalman framework?

• I am never an expert of Kalman filter, but I think some answers against next questions may be requied to make some model by yourself. In your case, 2D position of what do you have ? and what are angles you have? Are there any relations among 2D position and the angles? And, what do you want to get by using Kalman filter? Smoothed locus of 2D position or what? Commented Sep 23, 2011 at 17:01
• The positions I have are 3D points projected on the screen of a device. The angles are the gyroscope-mesured Euler angles of the device. The relation between them is kinda complex. What I want is a stabilization of the projected points, reflecting the absence or the low movement of the camera. Hope it can help. Commented Sep 26, 2011 at 9:04

A state variable and its derivative are often included as inputs to a Kalman filter, but this is not required. The essence of the Kalman framework is that the system in question has some internal state that you are trying to estimate. You estimate those state variables based on your measurements of that system's observables over time. In many cases, you can't directly measure the state that you're interested in estimating, but if you know a relationship between your measurements and the internal state variables, you can use the Kalman framework for your problem.

There is a good example of this on the Wikipedia page. In that example, 1-dimensional linear motion of an object is considered. The object's state variables consist of its position versus time and its velocity on the one-dimensional line of movement. The example assumes that the only observable is the object's position versus time; its velocity is not observed directly. Therefore, the filter structure "infers" the velocity estimate based on the position measurements and the known relationship between velocity and position (i.e. $\dot{x_k} \approx \frac{(x_k - x_{k-1})}{\Delta t}$ if acceleration is assumed to be slowly-varying).

• Thanks for the answer. I'm not sure about the relationship between my measurements and the internal state variables, hence my doubts. It's true that the Wikipedia article is informative, but as usual, examples are simple, and I had difficulties to imagine how I could use the Kalman filter in my own case. Commented Sep 23, 2011 at 7:50
• I would encourage you to submit another question with more details of your problem. What do you observe, what are you hoping to estimate, and what kind of noise environment are you in? Commented Sep 23, 2011 at 17:31
• I also have a problem with the measurement model in my Kalman filter. Maybe my question can also help to crarify your problem. dsp.stackexchange.com/questions/2568/… Commented Jun 5, 2012 at 14:53

The yaw rate of the camera may be calculated by dividing the velocity of a 2D position by an image depth (one of the 3D position).

So, basically, you have two types of solutions for the yaw-rate, one is by image position processing, and another is by yaw-rate sensor.

They may be combined with the Kalman filter to refine the yaw rate.

That depends on your system model, if you can model the system with only positions and angles, that is $x=[x_i, y_i, \alpha_1, \alpha_2, \alpha_3]^T$, it's okay you did not compute the velocity, if it's not possible, you may consider the other way.