# What should be the prediction step in particle filter?

I am implementing a particle filter using MATLAB. I am implementing it first time. I have written the system model and measurement model. Given below:

%% SYSTEM MODEL
noise1 = sd*randn(1, 1); v_init(i)= (normrnd(mean,sigma));
x_init(i)=(x_init(i-1)*noise1+v_init(i-1)); %p(x_k | x_(k-1))
%% MEASUREMENT MODEL
noise2 = var(wgn(10,1,1)); n_init(i) = (normrnd(mean,sigma));
y_init(i) = noise2*x_init(i)+ n_init(i);    %p(y_k | x_k)


As far as I know, the prediction step involves the following equation:

$$p\left ( x_{k} \right|D_{k-1} ) = \int p\left ( x_{k} \right | x_{k-1} )p\left (x_{k-1} \right|D_{k-1} ) dx_{k-1}$$

I cannot understand, how do I implement it. Kindly guide me what should be my next step?

• I have taken particle's state as feature extracted from the moving image as dot. And write the prediction step in this form: x_predict(i) = x_init(i-1)+dot(i-1)+sin(x_init(i-1)-2); So, is it the correct way to write? Apr 8, 2020 at 8:02