## 2 Preliminaries
### Generic Particle Filter  
To overcome nonlinearity and non-Gaussianity, the particle filter is applicable to approximate the optimal Bayesian filter utilizing the important sequential Monte Carlo methodology. As a class of simulation filters, the particle filter recursively approximates the filtering random variable by 'particles' with discrete probability mass. In other words, a continuous variable is approximated by a discrete one with random support. These discrete points are viewed as samples. Particle filters treat the discrete support generated by the 'particles' as the true filtering density [28]. It performs filtering, namely, estimating the states (parameters or hidden variables) of a system, as a set of observations becomes available [29]. A complete representation of the posterior distribution of the states is allowed. Therefore, any nonlinearities or distributions can be dealt with using the particle filter. After state estimation, the observation value can be predicted based on the estimated state.  
Consider the dynamic state space model of a statistical nonlinear system as follows:  
\[x_{t} =f(x_{t-1},u_{t-1},v_{t-1}) \tag{1}\] \[y_{t} =h(x_{t},u_{t-1},u_{t}),\]  
where \(f(\cdot)\) is the process model that encodes the evolution of the state sequence, \(h(\cdot)\) is the measurement model associated with the state, \(u_{t}\) is deterministic control input, while the process model noise sequence \(v_{t}\) and measurement noise \(n_{t}\) are independent and identically distributed and comply with any given distribution. The pdf of the initial state \(p(x_{0}|y_{0})\equiv p(x_{0})\) is assumed to be available and subject to Gaussian distribution in this work.  
According to Bayesian theory and the law of large numbers, a particle filter is designed for the estimation of the posterior distribution \(p(x_{t}|y_{1:t})\) via \(N\) weighted samples \(\{x_{t}^{i},w_{t}^{j}\},i=1,\cdots,N\), which are drawn from an importance proposal distribution \(q(\cdot)\). The weight for each sample can be calculated recursively as  
\[\omega_{t}^{i}=\omega_{t}^{i-1}\frac{p(y_{t}\mid x_{t}^{i})p(x_{t}^{i}\mid x_ {t-1}^{i})}{q(x_{t}^{i}\mid x_{t-1}^{i},y_{t})}. \tag{2}\]  
Equation (2) shows the absolute particle weight, where \(p(y_{t}\mid x_{t}^{i})\) is likelihood and \(p(x_{t}^{i}\mid x_{t-1}^{i})\) is prior distribution. Theoretically, the importance proposal distribution \(q(\cdot)\) should be selected as similar as the posterior probability \(p(x_{t}|y_{t})\). However, the closed form of \(p(x_{t}|y_{t})\) is not able to be precisely approached. \(q(x_{t}^{i}\mid x_{t-1}^{i},y_{t})=p(y_{t}\mid x_{t}^{i})\) is selected as the importance proposal distribution in the filter design in this paper. In such a way, Equation (2) is simplified into  
\[\omega_{t}^{i}=\omega_{t}^{i-1}p\Big{(}y_{t}\mid x_{t}^{i}\Big{)}. \tag{3}\]The estimated state \(\hat{x}_{t}\) can be approximated by the sum of \(N\) weighted samples  
\[\hat{x}_{t}=\sum_{i=1}^{N}\hat{\omega}_{t}^{i}x_{t}^{i}, \tag{4}\]  
where \(\hat{\omega}_{t}^{i}\) is the normalized weight,  
\[\hat{\omega}_{t}^{j}=\frac{\omega_{t}^{i}}{\sum_{i=1}^{N}\omega_{t}^{i}}. \tag{5}\]  
After receiving the estimated state value, the measurement \(\hat{y}_{t}\) can be predicted by a substitution of the estimated value of state into the measurement model, as shown in Equation (6).  
\[\hat{y}_{t}=h(\hat{x}_{t},u_{t}) \tag{6}\]  
The particle degeneracy phenomenon is common in a particle filter, where after a few iterations, all but one particle will have a negligible weight. A suitable measure of degeneracy is an estimation of the effective sample size \(N_{eff}\)[30] defined as  
\[\hat{N}_{eff}=\frac{1}{\sum_{i=1}^{N}\left(\hat{\omega}_{t}^{i}\right)^{2}}, \tag{7}\]  
where small \(N_{eff}\) indicates severe degeneracy. When \(N_{eff}\) exceeds the threshold \(N_{threshold}\)-resampling will be performed. After resampling, the weight of each particle will become \(1/N\).