Professional Documents
Culture Documents
2018
第 41 卷第 15 期 Modern Electronics Technique Vol. 41 No. 15
10
DOI:10.16652/j.issn.1004⁃373x.2018.15.003
最小二乘拟合的蒙特卡罗移动定位算法研究
谭 志,梁丽文,夏 磊
(北京建筑大学 电气与信息工程学院,北京 100044)
摘 要:针对传统蒙特卡罗定位算法由于节点采样效率低导致的定位精度低、定位不准确的缺陷,提出一种改进的最
小二乘拟合蒙特卡罗(LSFMCL)定位算法。该算法利用 MBC 算法优化采样空间,并利用最小二乘拟合节点运动轨迹,对节点
位置进行预测,进一步得到最优采样区域,最后提出权值概念并利用预测节点的权值信息计算未知节点的位置。仿真结果
表明,与传统算法相比,优化后的算法提升了节点的采样率,提高了定位精度,对于移动节点的定位具有更加广泛的应用前景。
关键词:蒙特卡罗定位算法;MBC 算法;最小二乘法拟合;移动节点定位;运动轨迹;权值概念
中图分类号:TN911.1⁃34;TP212.9 文献标识码:A 文章编号:1004⁃373X(2018)15⁃0010⁃06
Research on least squares fitting Monte Carlo localization algorithm for mobile nodes
TAN Zhi,LIANG Liwen,XIA Lei
(College of Electrical and Information Engineering,Beijing University of Civil Engineering and Architecture,Beijing 100044,China)
Abstract:The traditional Monte Carlo localization algorithm has the defects of low positioning precision and inaccurate
positioning due to the low efficiency of node sampling. Therefore,an improved least squares fitting Monte Carlo localization
(LSFMCL) algorithm is proposed. The algorithm is adopted to optimize the sampling space by taking advantage of MBC
algorithm,fit the node motion trajectory with least square method to predict the location of nodes,and then obtain the optimal
sampling area. The weight concept is proposed to calculate the location of the unknown node by using the weight information of
the predicted node. The simulation results show that,in comparison with traditional algorithm,the optimized algorithm can
improve the sampling rate of the node and positioning accuracy,and has wider application prospect for the localization of the
mobile nodes.
Keywords:Monte Carlo location algorithm; MBC algorithm; least square fitting; mobile node localization; motion trajectory;
weight concept
收稿日期:2017⁃10⁃17 修回日期:2017⁃11⁃23
基金项目:北京市教育委员会科技发展计划面上项目(KM201110016015);北京市属高等学校人才强教计划项目(PHR201008374)
Project Supported by Science and Technology Development Program of Beijing Education Committee (KM201110016015),Education Strengthening
Program with Talents of Beijing Municipal Higher Education(PHR201008374)
第 15 期 谭 志,等:最小二乘拟合的蒙特卡罗移动定位算法研究 11
(5)
ì 1 , ê ⋮ ú êê ⋮ úú
ï d ( l t | l t - 1 ) < v max ê 2ú
ê 2ú
p ( l t | l t - 1 ) = í πv 2max (1) ë ( xn - x ) + ( yn - y ) û ë rn û
2
î 0, d ( l t | l t - 1 ) ≥ v max
ï
变换得到:
预测阶段得到的集合 R 中的粒子,是从以 l t - 1 为圆
Ax = b (6)
心,以 v max 为半径的圆形区域中随机选择出来的。这时
则 A 与 b 分别为:
的预测结果非常不精确,需要进行滤波。
é 2 ( xn - x1 ) 2 ( yn - y1 ) ù
在滤波阶段,可以依据新的观测信息,滤除掉满足网 ê ú
ê 2 ( xn - x2 ) 2 ( yn - y2 ) ú
A=ê ú (7)
络连通度条件的样本。文献[18]给出了粒子滤波条件: êê ⋮ ⋮ úú
ê ú
filter ( l ) = ∀s ∈ S, d ( l, s ) ≤ r ∧ ∀s ∈ T, r < d ( l, s ) ≤ 2r (2) ë 2 ( x n - xn - 1 ) 2 ( yn - yn - 1 ) û
12 现代电子技术 2018 年第 41 卷
é r 12 - r n2 - x 21 - y 12 + x 2n + y n2 ù ì df ( t ) |
ê ú ï v x = dt |
|t = t
r 22 - r n2 - x 22 - y 22 + x 2n + y n2 ú ï
b= ê
n-1
(8) í (14)
ê ⋮ ú ï v y = dg ( t ) |
|
ê 2 2ú ï dt |t = t
ë rn - 1 - rn - xn - 1 - yn - 1 + xn + yn û
2 2 2 2
î n-1
σ 2 = ∑σ 2 = ∑[ S ∗ ( x i ) - y i ] = ∑[ S ( x i ) - y i ] (11)
m m m
2 2 2
wi = wj j i = 1, 2, …, N (19)
j=1 最差。网络连通度超过一定值时,定位误差趋于稳定。
计算未知节点在 t 时刻的位置为:
ïï x t = ∑w i x i
ì N
i=1
í (20)
∑
n
ïï y t = w y
i i
î i=1
图 3 速度与误差关系图
图 2 扇形纵向扩展示意图 Fig. 3 Relations between velocity and error
Fig. 2 Fan⁃shaped longitudinal extension
4 仿真及结果分析
无线传感器网络连通度可以体现网络鲁棒性的好
坏,是评估网络结构的重要指标 [21]。假设未知节点估计
位置为(x i ,y i),
(X i ,Y i)表示待测节点实际位置,未知节
点总数为 un,定位误差用 error i 表示。
误差 error i 计算公式为:
error i = ( X i - x i )2 + ( Y i - y i )2 (21)
平均定位误差 e 计算公式为:
e=
∑error
(22)
un 图 4 网络连通度与误差关系图
假设节点分布在 200 m×200 m 的区域内,在此区域 Fig. 4 Relations between network connectivity and error
中 均 匀 分 布 锚 节 点 ,节 点 移 动 方 式 按 照 RWM 模 型 进
锚 节 点 与 定 位 误 差 的 关 系 如 图 5 所 示 ,锚 节 点 越
行 ,所 有 节 点 的 通 信 半 径 为 r = 25 m,移 动 节 点 最 大 速
多,定位误差越小,定位精度越高,并且当锚节点数达到
度 v max ≤ 2 m/s ,运 动 方 向 未 知 ,采 样 的 节 点 数 为
一定的值后,定位误差趋于稳定。
N = 200 。考虑到通信半径对定位误差的影响,分别取
通信半径为 r = 25 m 和 r = 20 m,在不同的通信半径下,
所有待测节点的误差图如图 3 所示。节点移动速度影
响定位误差,一般移动速度越大,定位误差越大。
如 图 3 所 示 ,当 速 度 不 同 时 ,LSFMCL 定 位 算 法 与
MCB 算法和传统算法定位误差的比较,LSFMCL 定位算
法 明 显 优 于 其 他 算 法 ,此 外 当 移 动 节 点 运 动 速 度 小 于
一定值时误差随速度增大有减小趋势但变化不大,当移
动节点速度超过一定值时,定位误差逐渐增大。同时,
对 比 不 同 的 通 信 半 径 的 影 响 ,r=20 m 的 误 差 显 然 小 于
图 5 锚节点数与误差关系图
r=25 m 时的平均定位误差。
Fig. 5 Relations between anchor nodes and error
图 4 表现了随着网络连通度的提高,无线传感器网
络定位误差减小。仿真结果表明,在同样的网络连通度 如 图 6 所 示 ,锚 节 点 数 对 样 本 采 样 次 数 的 影 响 很
14 现代电子技术 2018 年第 41 卷
减少,提高了运行效率,节省了运行时间。 (3):88⁃91.
[5] 诸燕平,黄大庆,李勃 . 基于 AOA 的无线传感器网络节点定位
算法[J]. 传感器与微系统,2010,29(1):98⁃101.
ZHU Yanping,HUANG Daqing,LI Bo. AOA based wireless
sensor network node localization algorithm [J]. Sensor and mi⁃
cro system,2010,29(1):98⁃101.
[6] 刘皇保,王涛,彭刚 . 一种改进的质心定位算法[J]. 微型机与应
用,2013,32(11):73⁃75.
LIU Huangbao,WANG Tao,PENG Gang. An improved cen⁃
troid localization algorithm [J]. Microcomputers and applica⁃
tions,2013,32(11):73⁃75.
[7] 卫开夏,田金鹏,王克谦 . 无线传感器网络 DV⁃Hop 定位改进
图 6 算法采样次数关系图 算法[J]. 传感技术学报,2010,23(12):1820⁃1824.
Fig. 6 Correlation graph of sampling times WEI Kaixia,TIAN Jinpeng,WANG Keqian. Improved DV⁃Hop
localization algorithm for wireless sensor networks [J]. Chinese
5 结 语
journal of sensors and actuators,2010,23(12):1820⁃1824.
改进后的算法从传统定位算法误差产生的原因出 [8] NAGPAL R,SHROBE H,BACHRACH J. Organizing a global
发,利用最小二乘拟合的算法预测节点运动趋势,确定 coordinate system from local information on an Ad Hoc sensor
ZHU Haiping,YU Hongcheng,ZHONG Xiaoyong,et al. Im⁃ ZHANG Huimin,CHAI Yi,XU Lei. Weighted centroid rela⁃
proved Monte Carlo localization algorithm for dynamic wire⁃ tive location algorithm in wireless sensor networks [J]. Computer
less sensor networks [J]. Chinese journal of sensors and actua⁃ engineering and applications,2010,46(28):22⁃24.
作者简介:谭 志(1970—),男,山东郓城人,博士后,副教授,研究生导师。主要研究领域为认知无线电网络和宽带通信网等。
梁丽文(1992—),女,山西吕梁人,硕士研究生。主要研究领域为无线传感器的移动节点定位技术。
夏 磊(1989—),男,河南商丘人,硕士研究生。主要研究领域为无线传感器的定位技术。
(上接第 9 页)
作者简介:赵 黎(1981—),女,陕西西安人,博士,副教授。主要从事智能电网、电力线载波通信方向的研究。