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