文章快速检索 高级检索

A particle filtering algorithm based on the BP neural network
WANG Ershen , LI Xingkai , PANG Tao
School of Electronic and Information Engineering, Shenyang Aerospace University, Shenyang 110136, China
Abstract: Aiming at the particle degeneracy phenomena in particle filtering algorithms, a particle filtering algorithm based on the BP neural network is presented for improving the diversity of particles. This algorithm utilizes the nonlinear mapping function of the BP neural network. First of all, to sample particles from the importance density function of particle weight division, the weighted particle is split into two small weight particles. Next, the weight of very small particles is abandoned and the particles with smaller weight are adjusted using the neural network. The state of the remaining small weight particles is used as the input of neural network. The weights of particles are treated as the weights of neural network by using the observed value as the target signal of the neural network. The weights of many small particles can be increased through many times' trainings, thereby increasing the diversity of particle samples in the particle filter algorithm. Simulation results showed that the particle filter algorithm based on BP neural network can increase the number of effective particles, reduce the mean square error, and the filtering precision performance is improved. It is proven that this particle filter algorithm based on BP neural network is reliable and effective.
Key words: particle filter     particle degeneracy     resampling     BP neural network

1 基本粒子滤波算法

Gordon提出基于蒙特卡罗方法的序贯重要性重采样粒子滤波算法以来，粒子滤波成为非线性非高斯系统状态估计问题的一个研究热点[9]

 ${{X}_{k}}={{f}_{k}}\left( {{X}_{k}}_{-1},{{v}_{k-i}} \right)Zk={{h}_{k}}\left( {{X}_{k}},{{n}_{k}} \right)$

 $\left\{ {{x_{k - 1}}\left( i \right),{\omega _{k - 1}}\left( i \right);i = 1,2, \ldots ,N} \right\}$

1) 粒子集初始化，k=0。

2) 当k=1，2，…时，执行以下步骤：

① 状态预测。根据系统的状态方程抽取k时刻的先验粒子：

 $\left\{ {{X}_{k|k-1}}\left( i \right);i=1,2,\ldots ,N \right\}\sim p\left( {{X}_{k}}|{{X}_{k-1}} \right)$

② 更新。首先，进行权值更新。在获得测量值之后，根据系统的观测方程计算粒子的权值ωk(j)

 ${\omega _k}^{(j)}:{\omega _k}^{(i)} = {\omega _{k - 1}}^{(i)}p\left( {{Z_k}|{X_k}^{(i)}} \right),i = 1,2, \ldots ,N$

 ${\tilde \omega _k}^{\left( i \right)} = {{{\omega _k}^{\left( i \right)}} \over {\sum\nolimits_{i = 1}^N {{w_k}^{\left( i \right)}} }},\sum\limits_{i = 1}^N {{{\tilde \omega }_k}^{\left( i \right)}} = 1$

③ 估计。计算当前时刻系统的状态估计值：

 ${{\hat X}_k}{\rm{ = }}\sum\limits_{i = 1}^N {{X_k}{|_k}{{_{ - 1}}^{\left( {\rm{i}} \right)}}} {{\tilde \omega }_k}^{\left( i \right)}$

2 BP神经网络辅助的粒子滤波算法

BP神经网络是一种有教师信号的按误差逆传播算法训练的多层前馈网络。它的学习规则使用最速下降法，通过反向传播来不断调整网络的权值和阈值，使网络的误差平方和最小。BP神经网络模型拓扑结构包括输入层、隐层和输出层，如图 1所示。

 图 1 BP神经网络结构示意图 Fig. 1 Diagram of BP neural network

 $E = \frac{1}{2}\mathop \sum \limits_{k = 1}^p {\left( {{d_k} - {y_k}} \right)^2}$

 $\Delta {w_{jk}} = - |\eta \frac{{\partial E}}{{\partial {w_{jk}}}}$

1) 粒子集初始化，k=0。

2) 当k=1，2，…时，执行以下步骤：

① 状态预测。根据系统的状态方程抽取k时刻的先验粒子：

 $\left\{ {{X}_{k|k-1}}\left( i \right);i=1,2,\ldots ,N \right\}\sim p\left( {{X}_{k}}|{{X}_{k-1}} \right)$

② 进行权值更新。在获得测量值之后，根据系统的观测方程并计算粒子的权值ωk(j)

 ${\omega _k}^{(j)}:{\rm{ }}{\omega _k}^{(i)} = {\omega _{k - 1}}^{(i)}p\left( {{Z_k}|{X_k}^{(i)}} \right),i = 1,2, \ldots ,N$

 ${{{\tilde{\omega }}}_{k}}^{\left( i \right)}=\frac{{{\omega }_{k}}^{\left( i \right)}}{\mathop{\sum }^{}\overset{N}{\mathop{_{i=1}}}\,{{\omega }_{k}}^{\left( i \right)}},\underset{i=1}{\overset{N}{\mathop{\mathop{\sum }^{}}}}\,{{{\tilde{\omega }}}_{k}}^{\left( i \right)}=1$

③ 粒子分裂。将粒子矩阵按权值大小排序，分为高权值矩阵和低权值矩阵，将高权值矩阵中q个权值大的粒子分裂为2个小的、权值减半的粒子，同时将低权值矩阵中的q个权值最小的粒子舍弃。

④ 权值调整。将③的粒子权值矩阵进行降序排列，取其中最小的q个粒子，利用BP神经网络调整粒子的权值。

 $\varepsilon = \frac{1}{2}\mathop \sum \limits_{i = 1}^q {\left( {{z_k} - {y_k}} \right)^2}\frac{1}{2}\mathop \sum \limits_{k = 1}^q e\mathop {_k}\limits^2$

 ${{{\tilde{\omega }}}_{k}}^{\left( i \right)}=\frac{{{\omega }_{k}}^{\left( i \right)}}{\mathop{\sum }^{}\overset{N}{\mathop{_{i=1}}}\,{{\omega }_{k}}^{\left( i \right)}},\underset{i=1}{\overset{N}{\mathop{\mathop{\sum }^{}}}}\,{{{\tilde{\omega }}}_{k}}^{\left( i \right)}=1$

⑤ 重采样。计算有效粒子数N^eff，并与设定的有效粒子数阈值Nthresthres进行比较；如果N^effNthres，则进行重采样。将原来的带权样本{x(i)0:k,w(i)k}Ni=1映射为等权样本{x(i)0:k,N－1}Ni=1。否则，执行⑥。

⑥ 估计。计算当前时刻系统的状态估计值：

 ${{{\hat{X}}}_{k}}=\underset{i=1}{\overset{N}{\mathop{\mathop{\sum }^{}}}}\,{{X}_{k|k}}{{_{-1}}^{\left( i \right)}}{{{\tilde{\omega }}}_{k}}^{\left( i \right)}$

⑦ 时刻k=k+1，继续计算。

3 实验仿真与结果分析 31 实验模型

 ${x_{k + 1}} = 0.5x + \frac{{25x}}{{1 + {x^2}}} + 8\cos 1.2\left( {k - 1} \right) + {w_k}$
 ${y_k} = \frac{{{x_k}^2}}{{20}} + {v_k}$

3.2 实验结果性能分析

 图 2 粒子数为50时算法结果对比情况 Fig. 2 Comparison of the algorithms under the condition of 50 particles
 图 3 粒子数为50时误差对比情况 Fig. 3 Error comparison under the condition of 50 particles
 图 4 粒子数为100时算法结果对比情况 Fig. 4 Comparison of the algorithms under the condition of 100 particles
 图 5 粒子数为100时误差对比情况 Fig. 5 Error comparison under the condition of 100 particles
 图 6 粒子数为150时算法结果对比情况 Fig. 6 Comparison of the algorithms under the condition of 150 particles
 图 7 粒子数为150时误差对比情况 Fig. 7 Error comparison under the condition of 150 particles

 算法 粒子数 平均有效样本 RMSE PF 50 22.865 0 3.816 3 NNWA-PF 50 30.415 5 3.539 9 PF 100 41.841 4 3.517 8 NNWA-PF 100 48.120 9 3.175 0 PF 150 64.551 9 3.332 1 NNWA-PF 150 71.265 0 3.111 8

 图 8 粒子滤波算法运行时间与粒子数目的关系 Fig. 8 Relation of PF running time and number of particle

 图 9 NNWA-PF算法运行时间与粒子数目的关系 Fig. 9 Relation of NNWA-PF running time and number of particle
4 结束语

 [1] 程水英, 张剑云. 粒子滤波评述[J]. 宇航学报,2008, 29 (4) : 1099 –1111. [2] LI P, KADIRKAMANATHAN V. Particle filtering based likelihood ratio approach to fault diagnosis in nonlinear stochastic systems[J]. IEEE Trans Syst, Man, Cybern C,2001, 31 (3) : 337 –343. [3] GUSTAFSSON F, FREDRIK G. Particle filters for positioning, navigation, and tracking[J]. IEEE Transactions on Signal Processing,2002, 50 (2) : 425 –437. [4] QING Ming, JO K H. A novel particle filter implementation for a multiple-vehicle detection and tracking system using tail light segmentation[J]. International Journal of Control, Automation and Systems,2013, 11 (3) : 577 –585. [5] CHEN Zhimin, BO Yuming, WU Panlong, et al. Novel particle filter algorithm based on adaptive particle swarm optimization and its application to radar target tracking[J]. Control and Decision,2013, 28 (2) : 193 –200. [6] 夏楠, 邱天爽, 李景春, 等. 一种卡尔曼滤波与粒子滤波相结合的非线性滤波算法[J]. 电子学报,2013, 41 (1) : 148 –152. [7] 陈养平, 王来雄, 黄士坦. 基于粒子滤波的神经网络学习算法[J]. 武汉大学学报:工学版,2006, 39 (6) : 86 –88. [8] 程洪炳, 黄国荣, 倪世宏, 等. 基于粒子滤波的自组织模糊神经网络算法研究[J]. 仪器仪表学报,2011, 32 (3) : 634 –639. [9] ARULAMPALAM M S, MASKELL S, GORDON N, et al. A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking[J]. IEEE Transactions on Signal Processing,2002, 50 (2) : 174 –188. [10] 冯驰, 赵娜. 有效粒子数MCMC粒子滤波算法研究[J]. 应用科技,2009, 36 (4) : 19 –22.
DOI: 10.3969/j.issn.1673-4785.201310057

0

#### 文章信息

WANG Ershen, LI Xingkai, PANG Tao

A particle filtering algorithm based on the BP neural network

CAAI Transactions on Intelligent Systems, 2014, 9(6): 709-713
http://dx.doi.org/10.3969/j.issn.1673-4785.201310057