3
$\begingroup$

Here is a set of altitude data I collected with an Arduino sensor BMP-180 on a board CanSat

data = {13.15, 13.4, 13.15, 13.31, 13.4, 13.31, 13.15,.....}

how can I use Kalman Filter in Mathematica to do the prediction on that set of data?

$\endgroup$
4
  • 2
    $\begingroup$ Does your question relate to the software Mathematica or to the science of mathematics. If the latter, I suggest that you move your question to Mathematics. $\endgroup$
    – bbgodfrey
    Sep 25, 2015 at 15:42
  • 1
    $\begingroup$ ... or maybe even Signal Processing $\endgroup$
    – sebhofer
    Sep 25, 2015 at 16:03
  • 3
    $\begingroup$ ... and next to data the good old question remains: "What is your model?" Have a look at the documentation for KalmanFilter. $\endgroup$
    – gwr
    Sep 25, 2015 at 16:07
  • $\begingroup$ @gwr ...which is probably much harder to answer than the original question... $\endgroup$
    – sebhofer
    Sep 26, 2015 at 11:33

1 Answer 1

9
$\begingroup$

Something like this perhaps.

tsm = TimeSeriesModelFit[data];
ListLinePlot[{tsm["TemporalData"],
  TimeSeriesForecast[Normal[tsm], data, {6}, Method -> "Kalman"]}]
$\endgroup$
2
  • $\begingroup$ Thanks! May I also know how I can get the position of a certain value through the prediction? $\endgroup$ Sep 27, 2015 at 13:04
  • $\begingroup$ For example: Select[TimeSeriesForecast[Normal[tsm], data, {30}, Method -> "Kalman"]["Path"], Last[#] <= 13 &] $\endgroup$ Sep 27, 2015 at 14:25

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.