Fitting a Kalman Smoother to Data
Shane T. Barratt, Stephen Boyd · 2020
This paper considers the problem of fitting the parameters in a Kalman smoother to data. We formulate the Kalman smoothing problem with missing measurements as a constrained least squares problem and provide an efficient solution method based on sparse linear algebra. We then introduce the Kalman smoother tuning problem, which seeks to adjust parameters in the Kalman smoother to achieve low prediction error on held out measurements. We derive a Kalman smoother auto-tuning algorithm, which is based on the proximal gradient method, that finds good, if not the best, parameters for a given dataset. Central to our method is the computation of the gradient of the prediction error on the held out measurements with respect to the parameters of the Kalman smoother; we describe how to compute the gradient at little to no additional cost. We demonstrate the method on population migration within the United States as well as data collected from a smartphone's IMU+GPS system while driving.