1

I'm testing Kalman library and not sure how to tweak to smooth filter: Tracking a sinusoidal movement I get state measurements including errors because of noisy measurements. Please look at Tracking image.Track In Blue, the original track. In Green, the track incl. errors in location calculation ( Used Least Square Fitting to find minimal error) in Red, I'm testing pykalman filtering to smooth the track.

the current state

Running kf.filter I get very close tracking without smoothing. Why is the filter getting so close to state? How can I change the window time?

kf = KalmanFilter(transition_matrices = F, observation_matrices =H, transition_covariance=Q )
(filtered_state_means, filtered_state_covariances) = kf.filter(track_smooth)

F (9,9) matrix includes position, velocity and acceleration for 3 axes

F=np.array([
[1,1,.5,0,0,0,0,0,0],
[0,1,1,0,0,0,0,0,0],
[0,0,1,0,0,0,0,0,0],
[0,0,0,1,1,.5,0,0,0],
[0,0,0,0,1,1,0,0,0], 

H is an np.eye, and Q is an np.eye(9)*4, the variance of states x,y,z

Michael Foukarakis
  • 39,737
  • 6
  • 87
  • 123
Guido
  • 634
  • 1
  • 8
  • 19
  • Hi @Guido, could you please provide the complete python code used to produce that example plot. I recently answered a question on using the `pykalman` library [here](http://stackoverflow.com/questions/43377626/how-to-use-kalman-filter-in-python-for-location-data/43568887). To get more smoothing you probably want to increase the measurement co-variance (see example in answer to that question for increasing the ammount of smoothing). – kabdulla May 03 '17 at 10:36

0 Answers0