# How to apply a Kalman filter to use both previous and future measurements of a random variable?

I'm trying to estimate the state of a Gaussian random walk with central tendency based on time series measurements with varying uncertainties. My random variable has the following form:

$$\frac{d x}{d t} \equiv F(t) - \alpha x$$

Where F is a Gaussian random variable. I've noticed that this problem is analogous to the velocity of a bubble experiencing Brownian motion. (See for example, F. Reif, Fundamentals of Statistical and Thermal Physics, p. 565). As a result of the $$-\alpha x$$ term, the position has a central tendency (i.e. the variance does not become infinity as time approaches infinity).

Now, like any good physicist, I know that I cannot exactly measure the value $$x$$. The best I can do is to measure it at time $$t_i$$ within some uncertainty, $$\sigma_i$$. Using a Kalman filter, I can estimate the value of $$x$$ from several measurements. Let's call that $$\hat x$$. The approach is as follows. For each measurement, we compute:

$$\delta t = t_i - t_{i-1}$$

$$P(t) = P(t_{i-1}) * e^{-\alpha\, \delta t} + \langle x^2 | \delta t \rangle$$

$$K = {{P}\over{P + \sigma_i}}$$

Our incoming est estimate of $$x_i$$:

$$\hat x_{i-} = \hat x_{i-1} \, e^{-\alpha\,\delta t}$$

$$\hat x_i = \hat x_{i-} + K [x_{obs} - \hat x_{i-}]$$

This works great for propagating our estimates forward in time. My question is: If I have measurements at times that span the time at which I want the best estimate, how do I compute an $$\hat x(t)$$ where $$t_i < t < t_{i+1}$$?

• I'm a bit confused, perhaps by the title. Are you wanting to interpolate between two time points or are you asking about something like smoothing (as opposed to filtering)? – Wayne Feb 24 '11 at 15:12
• @Wayne I'd like to interpolate between the two measurement times, but include information about the future measurement -- not just the previous measurements. – Carl F. Feb 24 '11 at 19:34
• just to clarify, by * you mean the usual product or convolution? – mpiktas Feb 25 '11 at 12:49
• @mpiktas product. One of the hazards of copying from code. :) I've corrected the post for clarity. – Carl F. Feb 26 '11 at 2:39