3.5 Kalman Filter: Post-processing

For position estimates returned by TdoaPositioning and KaltoaPMCPositioning, post processing can be applied with a Kalman filter. In this case, KaltoaTrackPositioning will apply a continuous-time correlated random walk (CTCRW; Johnson et al., 2008). This makes use of the positioning error covariances and refines position estimates by making simple assumptions about the animals movement velocity process.

First, you need to set up a KaltoaProcessModel which holds the parameters of the movement model.

# --- Create process model
# Time until velocity correlation falls below 0.05
t_05 = 15# (s)
# Stationary velocity SD
sigma_vel = 0.2# (m/s)
# Setup KaltoaProcessModel object
beta = -log(0.05) / t_05
alpha = sigma_vel * sqrt( 2 * beta )
proc_ctcrw <- KaltoaProcess(type = "ctcrw", alpha = alpha, beta = beta)
plot(proc_ctcrw)

Now we can apply this movement model to our PMC-TOA results via a Kalman filter.

track_pmc <- KaltoaTrackPositioning(
  x = points_pmc, process_model = proc_ctcrw) |> smooth()
plot(track_pmc)
points(positions(toa_ppm), pch = 17, col = 'red')

The smooth function applies a Rauch–Tung–Striebel smoother the the estimates. Filtering utilizes previous measures to update current position estimates, while smoothing uses future measures to refine these estimates ever further.

For the sake of completeness, below is the Kalman filtered and smoothed results from our earlier TDOA positioning model.

track_tdoa <- KaltoaTrackPositioning(
  x = as.KaltoaPointPositions(points_tdoa, sigma_det = 0.002), 
  process_model = proc_ctcrw) |> smooth()
plot(track_tdoa, xlim = c(481420, 481500), ylim = c(6243480, 6243560))
points(positions(toa_ppm), pch = 17, col = 'red')

Considering we’re concerned about the presence of reflected detections — which TDOA positioning can’t take into account — we don’t place much trust in these filtered & smoothed estimates. For Kalman filter post processing, it’s crucial that you have a reasonable degree of trust in the error measures (i.e. covariance matrices) returned by the position estimates.

  • Johnson, D. S., London, J. M., Lea, M.-A., Durban, J. W. 2008. Continuous-Time Correlated Random Walk Model for Animal Telemetry Data. Ecology, 89(5), 1208–1215.