Skip to main content
. 2012 Apr 18;108(2):390–405. doi: 10.1152/jn.00883.2011

Table 3.

Algorithm for our particle filter

Initialization of the particle filter
  1. Generate and initialize N particles.

  2. Generate angular velocity input profile.

  3. Set particle filter gain K(t) to its initial value.

Execution of the particle filter for each period of time
  1. Generate a set of particles for disturbance d(t) by generating a process noise value for each particle and adding the current angular velocity input. The process noise is Gaussian noise with variance Q, which is low-pass filtered for computational stability with a cutoff of 400 Hz.

  2. Apply SCC dynamics to each particle.

  3. Add a unique measurement noise to each particle to generate a set of particles for measurement z(t). Measurement noise is Gaussian noise with variance R, which is low-pass filtered for computational stability with a cutoff of 400 Hz.

  4. For each particle, subtract measurement z(t) from measurement estimate z(t).

  5. For each particle, multiply this error signal by particle filter gain K(t) from the previous time step.

  6. Find the mean of the particles to determine the brain's estimate of angular velocity.

  7. Apply the internal model of SCC dynamics to each particle to generate the state estimate (t) and measurement estimate z(t).

  8. Calculate the estimate of the covariance of the state error, (t) = E([(t) − E[(t)][(t) − E[(t)]T), and divide (t) by the time step Δt to convert to continuous-time covariance.

  9. Calculate the particle filter gain K(t) = (t)CT × R−1. For simulation stability, K(t) is averaged over a 50-ms window to reduce the effects of random perturbations.