基于WiFi的室内定位系统设计与实现

功能演示

基于WiFi的室内定位系统展示

详细代码+论文+部署文档地址icon-default.png?t=N7T8https://mbd.pub/o/bread/ZZ6UmpZw

概要:

       室内定位技术是一种在室内无法使用精确的GPS服务所衍生出来的技术。由于传统的卫星信号到达地面时,信号强度变弱,加上建筑物、室内复杂环境的影响,诸如GPS或者北斗等定位系统不能提供精确的位置服务。然而,人们对于室内定位的需求却日益增加,所以室内定位系统的研究是解决移动服务最后一米的机会。常见的无线定位技术有:WiFi、蓝牙、红外线、超宽带、RFID、ZigBee和超声波等。行人航位推算是通过测量目标的运动方向和运动速度来对目标当前位置进行估计的一种方法。这种方法来源于航海过程中,船员要知道自己目前所在的位置,船员通过起始点进行推算,使用罗盘等工具记录运动的方向和运动的速度,同时也通过标志建筑的纠正,来确定自己的当前位置。本系统就是采用基于Android平台的WiFi指纹技术和行人航位推算技术(PDR)设计实现的。通过WiFi室内定位系统获得目标的起始位置,之后通过PDR技术估算出现有位置,通过这种方式,得到更加精确的位置,弥补传统定位系统的不足。

K近邻算法介绍

        K近邻算法是一种分类算法,它首先获得一个样本训练集,样本训练集中的每一组数据都有自己的标签,通过当前点的特征与样本训练集中数据对应特征进行比较,得到最相似的数据标签,最相似数据一般选用前K个,这就是K近邻算法中K的来源,最后选择相似数据中标签概率最大的,作为新数据的标签。其中衡量相似的标准常用的有:曼哈顿距离、欧氏距离等。

公式中i表示标签,n表示AP的个数

三、行人航位推算法介绍

行人航位推算是通过测量目标的运动方向和运动速度来对目标当前位置进行估计的一种方法。这种方法来源于航海过程中,船员要知道自己目前所在的位置,船员通过起始点进行推算,使用罗盘等工具记录运动的方向和运动的速度,同时也通过标志建筑的纠正,来确定自己的当前位置。行人航位推算是通过测量目标的运动方向和运动速度来对目标当前位置进行估计的一种方法。这种方法来源于航海过程中,船员要知道自己目前所在的位置,船员通过起始点进行推算,使用罗盘等工具记录运动的方向和运动的速度,同时也通过标志建筑的纠正,来确定自己的当前位置。这种方法被推广使用在了室内定位领域中,有着很好的效果。这种方法被推广使用在了室内定位领域中,有着很好的效果。

四、总体设计方案

根据系统需求分析,我们可以将本系统分为四个功能模块,它们分别为数据采集模块、定位模块、轨迹跟踪、查找最短路径模块,相应的层次方框图如图所示:

五、软件使用说明

​ 基于Android的室内定位系统是基于移动端的应用,下面将按照功能模块的划分对使用流程进行说明,具体分为一下模块:数据采集模块、定位模块、轨迹跟踪、查找最短路径模块。

(1)数据采集模块

在使用本模块时首先进入主页面,之后点击信息采集按钮,在信息采集页面填写采集当前采集信号的位置信息,最后点击采集按钮完成WiFi信息采集。在该界面中我们将看到每个参考AP点的信号强度,方便用户感知WiFi信号强度的变化。

(2)定位模块

在使用本模块时首先进入主页面,点击定位按钮,在定位页面中,我们将看到自定义地图,之后点击定位按钮,当前的位置信息将显示在界面上。

(3)轨迹跟踪

​ 本模块和定位模块一起集成在定位页面中

(4)查找最短路径模块

​ 在使用模块中首先进入主页面,点击路径规划按钮,在路径规划页面(图5.4)中,我们首先点击定位按钮,获得当前位置,之后输入想要到达的位置,点击导航按钮,完成查找路径功能。

六、功能测试

​ 本系统测试和使用时不需要知道每个AP点摆放的位置,对室内环境也没有特别要求。在数据采集模块进行前我们首先对室内地图进行绘制如图所示,之后在每个点进行WiFi信号强的的采集,将采集的结果存入数据库中,其结果如图所示

在定位模块中用户点击定位按钮之后,系统将采集当前位置的WiFi信号强度,将信号强度信息传送至服务器,服务器使用定位算法得到位置,将位置信息传送至Android客户端,并在自定义地图上进行显示,其测试结果如图所示。

​在轨迹跟踪模块中,系统首先完成定位功能,之后将调用Android的方向传感器和加速度传感器,获得运动步数以及运动方向,通过轨迹跟踪算法获得轨迹信息,其测试结果如图所示,图中蓝点的位置为用户走过的位置,通过这样的方式我们可以获得实时的动态位置和运动轨迹。

在查找最短路径模块中,系统首先完成定位功能,之后用户在界面上输入想要到达的位置信息,系统将位置信息传送至服务器,服务器通过路径规划算法,获得路径信息,并将路径信息传送至Android客户端,客户端将其绘制在爱定义地图上,其测试结果如图所示。

  • 6
    点赞
  • 57
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
室内定位算法,有助于研究者认清研究方向,给定位算法一个准确的描述,是很好的参考教材。the possibility for the user to be notified by visible and Waveformof Distance audible warnings using buzzer and led ar to Very close to al 1903 Tme「 samples Fig 4 Distance measurement using the RSSi signal The system is used to determine the distance between Fig. 2. Tag4M Data Acquisition System tags and 2, 3, 4 or more APs. The tag scans after the aps ⅣV. EXPERIMENTS and sends the rssi values for each ap to the ap which is associated The system presented above can be used for objects or In order to read the corresponding rSsi values of all people localization in an indoor enviro found access points, a""operation is implemented at Let's suppose a building where several objects are Tag4M level. The time to scan is smaller than few distributed all over milliseconds, because the tag doesnt associate with the all For a better understanding of the system, it is showed an APs. These values are sent to a pC where the localization experiment where the objects are placed only at one floor. algorithm is implemented in LabVIFW20 10 (see Fig. 5) Each of these objects has attached a tag. The devices are Table I presents a scan operation result. In this case used to determine the location of the objects in the four APs(which are placed in the floor building)named building and the distance between tags and APs. To Hawk, Helicopter, Tag4M and WitagServer are detected measure the distance, the RSSI is processed. This method The corresponding rSSi values(in dBm) measured by the is not very accurate and is strong depended to the Tag4M are reported for every AP environment, but is very easy to implement with the TABLE 1. A SEQUENCE OF RESULTS FOR THE SCANOPERATION The Fig 3 presents the experiment environment for one EXFCUTED ON THE TAG4M DEVICE oor where the colored circles represents the APs and the rectangles represents the objects intended to be located This floor is divided in six rooms separated by walls RSSI Scan results: 4 Time Ssid Ch ad-Iloc Sec wps mac Address erp WMM SSI Supported Rates(Mbits, Mandatory) Crypto Suites CW Max/min AP SCAN. llawk. -57 dBm AP SCAN, Helicopter, -50 dBm, AP SCAN, Tag4M.-68 dBm AP SCAN. WitagServer. -45 dBm The Rssi values are converted to distance values using formula(1) The value of the received signal strength is a function of the transmitted power and the distance between the Fig 3. The Experiment Environment sender and the receiver. The received signal strength will decrease when the distance increases as the following First step in finding the location is distance equation shows [23] measurement using the RSSI signal. The experiment for computing the distance is presented in Fig. 4. The RSSI(IOn- logo+A)(1) experimental precisions of measurements are less than 5 meters Where: lal propagation constant al d propagation exponent. d represents the distance from sender, A represents the received signal strength at a distance of one meter worn even by people. The system runs on batterie w sSID having a characteristic life time of a couple of years and 回H offers a platform for sensor measurements. Thus, the system can use any existent infrastructure, with significant decrease of implementation costs REFERENCES [1] H. Liu, H. Darabi, P. Banerjee and J. Liu, ""Survey of wireless Distance 2 Tn] aRch Indoor Positioning Techniques and SystemS", IEEE TRANSACTIONS ON SYSTEMS. MAN. AND CYBERNETICS-PART C: APPLICATIONS AND REVIEWS VOL 37, NO 6, NOVEMBER 2007, pp. 1067-10801 Distance 3[] [2 Want, A. Hopper, V. FalcaO, J. Gibbons, "The Active Budge 4MDastDct v Location System, ACM Transactions on Information Systems vol. 10, no l, January 1992, pp 91-102. Fig. 5. Block Diagram of the localization program [3] Firefly Motion Tracking System User's guide", vcrsion 2.2 December 1999 http://www.gesturecentral.com/firefly/fireflyuserguide.pdf The application compute the distances between the Wi- [4] Northen Digilal Inc. Website, Oplotrak PROseries, 2011 Fi Tags placed on targets and the APs placed in indoor http:/www.ndigital.com/industrial/optotrakproseries-family.php [5] E. Aitenbichler, M. Mhlhuser, An /R Local Positioning System for environment. For this case, three APs are enough but the Smart Items and Devices Proc. 23rd IEEE Internationa number of Aps can be increased for obtaining more Conference on Distributed Computing Systems Workshops accurate position estimation. The distances between the TWSAWC03), 2003 Wi-fiTagsandeachAparerepresentedascirclesasit[6]topaz,2004,http:/www.tadlys.co.il/pAges/productcontent.asp?igi bald=2 can be seen in Fig. 6, having the centre in the AP locations [7 A. Kotanen, M. Hannikainen, H. Leppakoski, and T. D which have previously known coordinates. The target's Hamalaincn, E.cperiments on local positioning with Bluetoothin position is given by the point at the intersection of the Proc. IEEE Int Conf. Inf. Technol. Comput. Commun., Apr 2003 three circles PP.297-303 [8 J. Hallberg, M. Nilsson, and k. Synnes, "Positioning with Bluetooth"in Proc. Ieee 10th Int Conf. Telecommun. Mar. 2003 ol.2,pp.954958 9 Active bat website. 2008 http:/www.cl.cam.ac.uk/research!dtg/attarchive/bat/ [10] Hazas, M, Hopper, A, "A Novel Brucdbund Ultrasonic Locution System for Improved Indoor Positioning IEEE Transactions on mobile Computing. Vol 5, No 5, May 2006 [11 N B Priyantha, The Cricket Indoor Location System", PhD thes MIT.2005 2]SonitorSystemWebsite2011,http://www.sonitor.com/ [13] Minami M, Fukuju Y, Hirasawa K, Yokoyama S, Mizumachi M Aoyama T ,"Dolphin. A practical approach for implementing a fully distributed indoor ultrasonic positioning system", Ubicomp, 2004, 347-365 Fig. 6. Front Panel of the localization program 14]J. Ilightower, R. Want, and G. borriello, SpotON: An indoor 3D cation sensing technology hased on RF signal strength"Univ The simplicity and cost efficiency of the rssi based Washington, Seattle, Tech Rep UW CSE 2000-02-02, Feb. 2000 localization make the proposed system a desired candidate 15]L. M. Ni, Y. Liu, Y. C. Lau, and A. P. Patil,"LANDMARC: Indoor location sensing using active RFID Wireless Netw., vol 10, no 6 for specific applications like tracking and positioning svstems hP.701-70.N0v.200 Zebra Technologies Corporation eb sit http://www.7ebra.com/id/zebra/na/en/index/products/location/isoie c 24730 2html V. CONCLUSION [17 P. Bahl and V. Padmanabhan, "RADAR: An in-building rf based user location and tracking system, Proc. IEEE INFOCOM, voL 2 In this paper, an indoor localization system based on March200,pp.775784 ultra-low power Wi-Fi technology and designed to 18Ekahau2011,http://www.ekahau.com: [19] T. King, S. Kopf, T. Haenselmann, C. Lubberger and w determine location of objects in a closed environment is Effelsberg, "COMPASS: A Probabilistic Indoor Positioning System proposed gILo rOC In the first part of this paper a survey of existing indoor Workshop on Wireless Network Testbeds, Experimental evaluation and Cllaracterization (WiNTECID), Los Angeles, CA, USA positioning systems was made In the second part was presented the way in which an [20] Convert sensor data to web pages using a Cloud Instrument, june object can be localized by using access points and Tag 4M 2011.http://www.tag4m.com devices which may read the rssi values [21Tag4mDatasheet2010,http://test.tag4m.com/wp- content/uploads/20/03/Tag4M Prod Datasheet Revised3. pdf The importance of the proposed system lies in ultra-low [22] Aamodt, K.(2006). CC2431 Location Engine, Application Note power and Wi-Fi transmission capabilities that are An042,fromhttp://focus.tii.co.ip/ip/lit/an/swra095/swra095.pdf embedded in a very small package, why they are suitable 320
基于WIFI定位系统设计主要涉及到以下几个关键部分:WIFI信号接收、定位算法以及数据处理。以下是一个基本的实现步骤: 1. **硬件选择**:首先,你需要一个支持WIFI信号接收的硬件设备,例如一个具有WIFI模块的嵌入式设备或者一个智能手机。此外,你还需要一个能够进行数据处理和存储的设备。 2. **WIFI模块配置**:将WIFI模块与你的硬件设备连接,并配置其工作模式。通常,你需要为模块分配一个SSID和密码,并设置正确的IP地址和其他网络参数。 3. **定位算法设计**:基于WIFI定位系统通常使用到达信号强度(RSSI,Received Signal Strength Indicator)或者到达时间(TDOA,Time Difference of Arrival)等原理进行定位。在实现时,你需要根据具体的原理和你的应用场景选择合适的算法。例如,你可能需要设计一种基于RSSI的定位算法,通过测量不同信号强度的比例来确定距离和位置。 4. **数据处理**:对接收到的WIFI信号进行数据处理,提取出有用的信息。这可能涉及到信号的过滤、增强和解析等步骤。 5. **系统集成与测试**:将上述步骤整合到一个系统中,并进行测试以确保其正常工作。你可能需要模拟一些场景(例如多个用户在不同位置上的移动)来测试系统的准确性。 在实现过程中,你可能需要使用一些开源的库和工具来简化工作,例如用于WIFI信号处理的库和用于定位算法开发的工具。此外,为了确保系统的安全性和稳定性,你可能还需要考虑一些额外的因素,例如防止黑客攻击和确保系统的可靠运行。 请注意,这是一个非常基础的介绍,实际的实现可能会涉及到更多的细节和挑战。在设计基于WIFI定位系统时,你应该根据你的具体需求和应用场景来选择合适的设备和算法。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

helli3657

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值