Skip to main content
. 2016 May 13;16(5):692. doi: 10.3390/s16050692
Algorithm 1 Non-Gaussian Delayed Particle Smoother (nGDPS) for Vehicle Localization
% Initialization:
At time k=0:
Set X0=[pos0,v0,a0], the state vector representing the initial information of vehicle where pos0 , v0, and a0 are position, velocity, and acceleration respectively;
Select initial covariance matrices R0 and Q0 related to the measurement and process noises respectively;
Draw M particles and set the weight w0(X0i)=1M, i=1,,M given that the prior knowledge X0i~p(X0i);
Set the fixed-delay size L and sample time K.
For each time instant k=1,,K do
For each particle i=1,,M do
  • % Importance sampling:

  • Compute the state of Λ particles where Λ is the subset of particles around the vehicle state Xk+L at time k+L (i.e., ΛM);

  • {Xk+L1i}j=1ΛXk+Lj,i~qEnKF(Xk+Lj,i,Xk+Li|Xk+L1i,Yk+L), where qEnKF() stands for the importance function defined using EnKF according to Equation (13);

  • For each l=0,,L do
    • Update the process and measurement noise densities based on Equations (2a) and (2b)
    • The definite scale matrices in terms of the associated covariance matrices are given by Dk+li=ν2νRk+li and Gk+li=ν2νQk+li, (ν0) respectively.
    • % Importance weight update:
    • Compute new weight according to Equation (14);
  • End For 

  • % Normalization: 

  • The normalized weight is given by w˜k+Liwk+Li(j=1Λwk+Lj)1, and the state of the vehicle at time k + L is provided by: Xk+LXk+L+Xk+Li*w˜k+Li.

  • % Resampling: 

  • Compute the effective sample size λ^e as defined in [46];

  • If λ^e<λ¯=2Λ3 (the predefined threshold) then

  • Resample using the Delayed Gibbs sampling (DGS) method, otherwise,
    • % Output the smoothed estimation 
    • Compute the smoothed state estimates of the vehicle: Xk+L
  • End If 

End For
End For