## 3 Unscented Particle Filter with Adaptive Sample Size
### Adaptive Sample-Size Strategy
In this case, \(t_{\alpha/2}(N_{k}-1)\) can be replaced by \(z_{\alpha/2}\), where \(z_{\alpha/2}\) is the bilateral \(\alpha\) quantile of a standard normal distribution, and the length of interval \(L\) shown in (18) can be expressed as  
\[L=2z_{\alpha/2}\sqrt{\hat{P}_{k}/N_{k}}. \tag{19}\]  
With certain variance \(\hat{P}_{k}\) and confidence coefficient \(\alpha\), as sample size \(N_{k}\) increases, the length of confidence interval \(L\) decreases. Once the confidence coefficient, variance and interval length are determined, the lower bound of the sample size \(N_{k}\) is required to meet the following equation,  
\[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]0  
where \(N_{k}\) is proportional to the state variance \(\hat{P}_{k}\) at time \(k\) and inversely proportional to \(\left(L/2z_{\alpha/2}\right)^{2}\), i.e., given the parameters \(L\) and \(\alpha\), and the state variance of each time step, the lower bound of the sample size can be determined. To verify the effectiveness of adaptive sample-size strategy, it is combined with the PF, and a simple experiment is carried out by the adaptive sample-size particle filter (APF). The detail of general PF is shown in [5]. It is assumed that \(\overline{\mathbf{X}}_{k}=\{\overline{X}_{k}^{(i)},\ \mathbf{w}_{k}^{(i)}\}_{i=1}^{N_{k-1}}\) is the sample set after importance sampling and weight update at time \(k\), \(N_{k-1}\) is the sample size estimated at time \(k-1\), \(\overline{P}_{k}\) is the uncorrected estimated variance of the system state at time \(k\). Next, \(\overline{P}_{k}\) is corrected by introducing the Kalman gain which is calculated as follows,  
\[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]1  
where \(K_{k}\) is the Kalman gain at time \(k\), \(P_{XZ}\) is the cross-covariance between the sample measurements and the sample states, \(P_{ZZ}\) is the auto-covariance of the sample measurements. The detail of the calculation of \(P_{XZ}\) and \(P_{ZZ}\) is shown in [26]. Based on \(K_{k}\), the estimated variance is corrected as follows,  
\[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]2  
With the corrected estimated variance \(\hat{P}_{k}\), the new sample size \(N_{k}\) is obtained by (20), and further the sample set can be resampled to \(\mathbf{X}_{k}=\{X_{k}^{(i)},\mathbf{w}_{k}^{(i)}\}_{i=1}^{N_{k}}\). Based upon the above discussion, the structural diagram of the adaptive sample-size strategy is shown in \[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]3  
\[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]4 Structural diagram of the adaptive sample-size strategy. To compare the performance of APF and general PF, the univariate non-static growth (UNGM) model [5], a common verification model for filtering algorithms, is chosen as the experimental model, where the state transition model is:  
\[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]5  
and the measurement model is:  
\[\overline{X}_{k}\triangleq\int_{\chi}f(X_{k}|X_{k-1})p(X_{k-1})\mathrm{d}X_{k -1}. \tag{11}\]6  
where \(\mathbf{x}_{k}\) is a one-dimensional state variable with no practical physical meaning, which replaces the target state vector \(X_{k}\) to preliminarily verify the effectiveness of the adaptive sample-size strategy. The variance of process noises \(w_{k}\) and measurement noises \(v_{k}\) are set to 20 and 1, respectively, and the simulation duration is 100 s. Both of these two algorithms repeat 100 Monte Carlo simulations, and the algorithm accuracy is defined by the root mean square error (RMSE) [35], which reflects the deviation between the estimated state \(\mathbf{\hat{x}}\) and the real value \(\mathbf{x}\).