CN109738863A - A WiFi Fingerprint Indoor Localization Algorithm and System Based on Confidence - Google Patents
A WiFi Fingerprint Indoor Localization Algorithm and System Based on Confidence Download PDFInfo
- Publication number
- CN109738863A CN109738863A CN201910274242.2A CN201910274242A CN109738863A CN 109738863 A CN109738863 A CN 109738863A CN 201910274242 A CN201910274242 A CN 201910274242A CN 109738863 A CN109738863 A CN 109738863A
- Authority
- CN
- China
- Prior art keywords
- signal strength
- square error
- confidence
- mean square
- reference point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
本发明提出一种融合置信度的WiFi指纹室内定位算法及系统,包括如下步骤:在离线采集阶段使用采集设备采集各个参考点用于定位的多个AP信号强度特征值,并对所述信号强度特征值进行预处理,计算信号强度特征均值及均方差;获取均方差后使用构建的均方差区间与置信度的虚拟映射表来确定置信度,最终与该参考点的序号、信号强度特征均值集、地理位置坐标一起上传到服务器位置指纹数据库中;在在线定位阶段,实时获取的用户待定位点信号强度特征值数据与数据库中特征数据进行欧氏距离匹配计算时加入置信度,可达到优化其距离的效果。本发明使用融合置信度的WiFi指纹室内定位优化算法,可以减少跳变,增加稳定性,提高定位精度。
The present invention proposes a WiFi fingerprint indoor positioning algorithm and system with integrated confidence, which includes the following steps: in the offline collection stage, the collection equipment is used to collect multiple AP signal strength characteristic values used for positioning at each reference point, and the signal strength The eigenvalues are preprocessed to calculate the mean value and mean square error of signal strength characteristics; after obtaining the mean square error, use the constructed virtual mapping table of mean square error interval and confidence degree to determine the confidence degree. , and the geographic location coordinates are uploaded to the server location fingerprint database together; in the online positioning stage, the real-time acquisition of the signal strength characteristic value data of the user to be located point and the characteristic data in the database are added with confidence in the Euclidean distance matching calculation, which can optimize the effect of distance. The invention uses the WiFi fingerprint indoor positioning optimization algorithm of fusion confidence, which can reduce jumping, increase stability and improve positioning accuracy.
Description
技术领域technical field
本发明涉及室内定位技术领域,特别是涉及一种融合置信度的WiFi指纹室内定位算法及系统。The invention relates to the technical field of indoor positioning, in particular to a WiFi fingerprint indoor positioning algorithm and system integrating confidence.
背景技术Background technique
人们大约有80 %以上的时间处于室内环境,但受制于技术、成本等各方面因素,室内定位没有大范围的应用。目前,国内外学者提出了基于无线保真、蓝牙、红外线、射频识别、超声波、超宽带等室内定位技术及应用系统,综合考虑部署成本和定位精度等因素,其中基于WiFi的WLAN室内定位技术应用前景最为广泛。People spend more than 80% of their time in an indoor environment, but due to various factors such as technology and cost, indoor positioning does not have a wide range of applications. At present, scholars at home and abroad have proposed indoor positioning technologies and application systems based on wireless fidelity, Bluetooth, infrared, radio frequency identification, ultrasound, and ultra-wideband, taking into account factors such as deployment cost and positioning accuracy. Among them, the application of WiFi-based WLAN indoor positioning technology The prospects are the broadest.
基于RSS的WLAN室内定位技术是利用RSS值与地理位置坐标之间的关联性从而实现目标的位置估计,该技术具有以下优势:首先,部署成本低且部署简单快捷。该技术利用现有的WLAN系统和用户手中的便携式移动终端,通过定位算法估计用户位置。同时针对因离线采集阶段的高昂成本且为了保证采集的准确度,高质量的离线数据库将是对定位精度起到极大的作用。室内环境复杂、多径效应、射频干扰等因素引起的信号采集不够精准最终导致在线定位误差变大。RSS-based WLAN indoor positioning technology utilizes the correlation between RSS values and geographic location coordinates to achieve target location estimation. This technology has the following advantages: First, the deployment cost is low and the deployment is simple and quick. This technology uses the existing WLAN system and the portable mobile terminal in the user's hand to estimate the user's position through a positioning algorithm. At the same time, due to the high cost of the offline acquisition stage and in order to ensure the accuracy of the acquisition, a high-quality offline database will play a great role in the positioning accuracy. The inaccurate signal acquisition caused by the complex indoor environment, multipath effect, radio frequency interference and other factors will eventually lead to large online positioning errors.
因此设计较为稳定的离线采集步骤极为重要,在离线采集阶段融合置信度的做法可以进一步提升定位精度。Therefore, it is extremely important to design a relatively stable offline acquisition step, and the method of fusing confidence in the offline acquisition stage can further improve the positioning accuracy.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提出一种融合置信度的WiFi指纹室内定位算法及系统,可以减少跳变,增加了稳定性,优化欧氏距离,提高定位精度。The purpose of the present invention is to propose a WiFi fingerprint indoor positioning algorithm and system integrating confidence, which can reduce jumping, increase stability, optimize Euclidean distance, and improve positioning accuracy.
为实现上述目的,本发明实施方式的一方面提供一种融合置信度的WiFi指纹室内定位算法,包括如下步骤:In order to achieve the above object, one aspect of the embodiments of the present invention provides a WiFi fingerprint indoor positioning algorithm fused with confidence, including the following steps:
在离线采集阶段使用采集设备采集各个参考点用于定位的多个AP信号强度特征值,并对所述信号强度特征值进行预处理,计算信号强度特征均值及均方差;In the offline collection stage, the collection device is used to collect multiple AP signal strength characteristic values used for positioning at each reference point, and the signal strength characteristic values are preprocessed to calculate the signal strength characteristic mean value and mean square error;
获取均方差后使用构建的均方差区间与置信度的虚拟映射表来确定置信度,最终与该参考点的序号、信号强度特征均值集、地理位置坐标一起上传到服务器位置指纹数据库中;After obtaining the mean square error, use the constructed virtual mapping table of mean square error interval and confidence level to determine the confidence level, and finally upload it to the server location fingerprint database together with the serial number of the reference point, the signal strength feature mean value set, and the geographic location coordinates;
在在线定位阶段,实时获取的待定位点信号强度特征值数据与数据库中每一组特征数据进行欧氏距离匹配计算时加入置信度,即在计算欧氏距离中进行平方和加之前乘以相对应的AP的置信度的倒数,将欧氏距离最小的参考点所对应的地理位置坐标作为用户待定位点的位置估计,返回给用户,即完成定位。In the online positioning stage, the confidence is added when the Euclidean distance matching calculation is performed between the signal strength characteristic value data of the point to be located in real time and each group of characteristic data in the database, that is, before the square sum is added in the calculation of the Euclidean distance. The reciprocal of the corresponding AP confidence, the geographic location coordinate corresponding to the reference point with the smallest Euclidean distance is used as the position estimate of the user's to-be-located point, and returned to the user, that is, the positioning is completed.
进一步地,所述计算信号强度特征均值的步骤包括:Further, the step of calculating the mean value of the signal strength feature includes:
根据公式对某个参考点单个AP采集n次信号强度特征值进行取均值处理,以得到一AP信号强度平均值;According to the formula A single AP at a certain reference point collects n times of signal strength characteristic values and performs averaging processing to obtain an AP signal strength average value;
其中,为该AP信号强度平均值,为该AP采集n次的信号强度特征值之和。in, is the average signal strength of the AP, The sum of the signal strength eigenvalues collected n times for the AP.
根据公式对每个参考点采集的所有AP的信号强度特征值分别进行取均值处理,得到每个参考点的每个AP的信号强度平均值;According to the formula The signal strength characteristic values of all APs collected at each reference point are respectively averaged to obtain the average value of the signal strength of each AP at each reference point;
其中,为某个参考点第m个AP的信号强度特征均值,为某个参考点第m个AP采集n次的信号强度特征值之和,n为所述采集设备的采集次数,i为自变量,m为AP数量,为单个参考点采集的所有AP分别求信号强度平均值的集合,为单个参考点采集的所有AP分别求信号强度特征值之和的集合。in, is the mean value of the signal strength feature of the mth AP at a certain reference point, is the sum of the signal strength characteristic values of the mth AP of a certain reference point collected n times, n is the collection times of the collection device, i is an independent variable, m is the number of APs, A set of average signal strengths for all APs collected at a single reference point, respectively, A set of sums of signal strength eigenvalues is obtained for all APs collected at a single reference point.
进一步地,所述计算信号强度特征值均方差为:Further, the mean square error of the calculated signal strength eigenvalues is:
在每个参考点接收到各个AP信号强度特征值后进行均值处理的同时计算均方差;After each reference point receives the characteristic value of each AP signal strength, the mean value is processed and the mean square error is calculated at the same time;
均方差公式为 The mean square error formula is
其中,为单个AP第n次采集的信号强度特征值,为该AP信号强度平均值。in, is the characteristic value of the signal strength collected by a single AP for the nth time, is the average signal strength of the AP.
进一步地,所述计算信号强度特征值均方差包括以下步骤:Further, the calculation of the mean square error of the signal strength eigenvalues includes the following steps:
每完成一个参考点的信号强度特征值的采集,所有的AP都单独计算均方差并与阈值比较,阈值为构建的均方差区间与置信度的虚拟映射表中的均方差最大值;Each time the acquisition of the signal strength characteristic value of a reference point is completed, all APs calculate the mean square error separately and compare it with the threshold value.
如果均方差大于阈值,计算均值与采集的信号强度特征值逐一相减取绝对值后降序排序,剔除前三位最大的绝对值对应的信号强度特征值,把剩下的信号强度特征值重新计算均方差并记录,同样判断是否在阈值之内,直至符合为止。If the mean square error is greater than the threshold, the calculated mean value and the collected signal strength eigenvalues are subtracted one by one to obtain the absolute value, and then sorted in descending order, the signal strength eigenvalues corresponding to the first three largest absolute values are eliminated, and the remaining signal strength eigenvalues are recalculated. The mean squared error is recorded, and it is also judged whether it is within the threshold until it meets.
进一步地,所述判断均方差是否在阈值之内,之后还包括:Further, the judging whether the mean square error is within the threshold value further includes:
如某个AP的信号一直不是很稳定的情况下,均方差一直是大于阈值,则重新采样;If the signal of an AP is not very stable, the mean square error is always greater than the threshold, then re-sampling;
如重新采样后还是大于阈值,则在经过计算均值与采集的信号强度特征值逐一相减取绝对值后降序排序,剔除前三位最大的绝对值对应的信号强度特征值,把剩下的信号强度特征值重新计算均方差并记录,直到剩最后三个信号强度特征值后,记录整个过程中最小的均方差及均值。If it is still greater than the threshold after re-sampling, the calculated mean value and the collected signal strength characteristic value are subtracted one by one to obtain the absolute value, and then sorted in descending order, and the signal strength characteristic value corresponding to the first three largest absolute values is eliminated. The mean square error of the intensity eigenvalues is recalculated and recorded until the last three signal intensity characteristic values are left, and the smallest mean square error and mean value in the whole process are recorded.
进一步地,将各个参考点的各个AP得到的均方差根据均方差与置信度映射表进行均方差的转换得到该参考点的该AP置信度;均方差与置信度映射表为虚拟映射表,可在程序中创建,分为均方差区间与置信度两类元素。Further, the mean square error obtained by each AP of each reference point is converted to the mean square error according to the mean square error and confidence level mapping table to obtain the AP confidence level of the reference point; the mean square error and confidence level mapping table is a virtual mapping table, which can be Created in the program, it is divided into two types of elements: mean square error interval and confidence level.
进一步地,将得到的各个参考点的各个AP置信度和该参考点的地理位置坐标、序号、信号强度特征均值集一同上传至服务器位置指纹数据库中,其中数据库中的信号强度特征均值集记为:,N为参考点数量,m为AP的数量。Further, each AP confidence level obtained for each reference point and the geographic location coordinates, serial number, and signal strength feature mean value set of the reference point are uploaded to the server location fingerprint database together, wherein the signal strength feature mean value set in the database is recorded as : , N is the number of reference points, and m is the number of APs.
进一步地,所述在在线定位阶段,在某个待定位点先进行一段时间的信号强度采集,在这个时间段会采集用于定位的所有AP的信号强度特征值,并对所有AP的信号强度特征值分别求均值,会得到一组AP信号强度特征均值集记为:,m为AP的数量,将该均值集上传至服务器中,与数据库中每一组特征数据进行欧氏距离匹配计算时加入置信度,即在计算欧氏距离中进行平方和加之前乘以相对应的AP的置信度的倒数,将欧氏距离最小的参考点所对应的地理位置坐标作为用户待定位点的位置估计,返回给用户,即完成定位。Further, in the online positioning stage, signal strength collection is first performed at a certain point to be positioned for a period of time. During this period of time, the signal strength characteristic values of all APs used for positioning will be collected, and the signal strengths of all APs will be collected. The eigenvalues are averaged respectively, and a set of AP signal strength feature averages will be obtained, which is recorded as: , m is the number of APs, upload the mean set to the server, and add confidence in the Euclidean distance matching calculation with each set of feature data in the database, that is, multiply the relative value before the square and add in the calculation of the Euclidean distance. The reciprocal of the corresponding AP confidence, the geographic location coordinate corresponding to the reference point with the smallest Euclidean distance is used as the position estimate of the point to be located by the user, and returned to the user, that is, the positioning is completed.
原欧氏距离公式为:The original Euclidean distance formula is:
设数据库中第j个参考点下的第k个AP的置信度为,则欧氏距离公式变更为: Let the confidence of the kth AP under the jth reference point in the database be , the Euclidean distance formula is changed to:
其中m为AP的数量,N为数据库中参考点总数,Ak为用户在待定位点测得的第k个AP的信号强度特征值,Bjk为数据库中第j个参考点下的第k个AP的信号强度特征值。Where m is the number of APs, N is the total number of reference points in the database, A k is the signal strength characteristic value of the k-th AP measured by the user at the point to be located, and B jk is the k-th reference point under the j-th reference point in the database The signal strength characteristic value of each AP.
为实现上述目的,本发明实施方式的另一方面还提供一种融合置信度的WiFi指纹室内定位系统,包括移动终端,与移动终端网络通信的云端服务器,所述移动终端包括WiFi获取单元及处理程序,所述云端服务器包括WiFi特征参数存储单元及定位单元。In order to achieve the above object, another aspect of the embodiments of the present invention also provides a WiFi fingerprint indoor positioning system with integrated confidence, including a mobile terminal, a cloud server that communicates with the mobile terminal network, and the mobile terminal includes a WiFi acquisition unit and a processing unit. In the program, the cloud server includes a WiFi characteristic parameter storage unit and a positioning unit.
所述WiFi获取单元及处理程序,用于在离线采集阶段采集各个参考点接收的多个AP信号强度特征值,并对所述信号强度特征值进行均值及均方差处理并记录,其中每个参考点包括多个AP信号强度特征值。The WiFi acquisition unit and processing program are used to collect multiple AP signal strength characteristic values received by each reference point in the offline collection stage, and perform mean value and mean square error processing on the signal strength characteristic values and record, wherein each reference Points include multiple AP signal strength eigenvalues.
所述WiFi特征参数存储单元,用于存储各个AP的MAC地址,置信度,地理位置坐标,各个AP在各参考点的信号强度特征均值及均方差。The WiFi characteristic parameter storage unit is used to store the MAC address, confidence level, geographic location coordinates of each AP, and the characteristic mean value and mean square error of each AP's signal strength at each reference point.
所述定位单元,用于在线定位阶段,实时获取的用户待定位点信号强度特征值数据与数据库中的每一组信号强度特征值数据进行欧氏距离匹配计算时加入置信度,即在计算欧氏距离中进行平方和加之前乘以相对应的AP的置信度的倒数,达到优化其距离的效果。The positioning unit is used in the online positioning stage, and the confidence is added when the Euclidean distance matching calculation is performed between the signal strength characteristic value data of the user to be positioned point acquired in real time and each group of signal strength characteristic value data in the database, that is, when calculating the Euclidean distance. Multiply the reciprocal of the confidence of the corresponding AP before the square and sum in the distance, so as to achieve the effect of optimizing the distance.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:
本发明使用融合置信度的WiFi指纹室内定位优化算法,可以减少跳变,增加稳定性,优化欧氏距离,提高定位精度。融合置信度的WiFi指纹室内定位优化算法主要作用是降低实时采集导致的误差并对小概率到达的参考点设置较低置信度。The invention uses the WiFi fingerprint indoor positioning optimization algorithm fused with confidence, which can reduce jumping, increase stability, optimize Euclidean distance, and improve positioning accuracy. The main function of the WiFi fingerprint indoor positioning optimization algorithm fused with confidence is to reduce the error caused by real-time acquisition and set a lower confidence for the reference point that is reached with a small probability.
附图说明Description of drawings
图1为本发明提出的一种融合置信度的WiFi指纹室内定位方法原理框图;1 is a schematic block diagram of a WiFi fingerprint indoor positioning method of fusion confidence proposed by the present invention;
图2为本发明提出的一种融合置信度的WiFi指纹室内定位方法离线采集流程图;FIG. 2 is a flowchart of offline collection of a WiFi fingerprint indoor positioning method of fusion confidence proposed by the present invention;
图3为本发明提出的一种融合置信度的WiFi指纹室内定位系统流程图;FIG. 3 is a flowchart of a WiFi fingerprint indoor positioning system with fusion confidence proposed by the present invention;
图4为本发明提出的一种融合置信度的WiFi指纹室内定位原理图。FIG. 4 is a schematic diagram of a WiFi fingerprint indoor positioning principle of fusion confidence level proposed by the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。The following describes in detail the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, only used to explain the present invention, and should not be construed as a limitation of the present invention.
参照下面的描述和附图,将清楚本发明的实施例的这些和其他方面。在这些描述和附图中,具体公开了本发明的实施例中的一些特定实施方式,来表示实施本发明的实施例的原理的一些方式,但是应当理解,本发明的实施例的范围不受此限制。相反,本发明的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。These and other aspects of embodiments of the present invention will become apparent with reference to the following description and accompanying drawings. In these descriptions and drawings, some specific implementations of the embodiments of the invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the invention, but it should be understood that the scope of the embodiments of the invention is not limited by this limit. On the contrary, embodiments of the present invention include all changes, modifications and equivalents falling within the spirit and scope of the appended claims.
因室内复杂环境、多径效应、室内固定家具及射频干扰等因素引起的信号采集不够精准最终导致在线定位误差变大。针对该问题,本发明提出一种融合置信度的WiFi指纹室内定位优化算法,可以减少跳变,增加了稳定性,提高定位精度。融合置信度的WiFi指纹室内定位优化算法主要作用是降低实时采集导致的误差并对小概率到达的参考点设置置信度偏低。即在计算定位信号强度特征值时不再只求均值,而是将求均值数据集的均方差也一并进行计算且记录下来,均方差代表了信号质量的好坏。利用均方差与置信度映射表对均方差进行转换,最终与该参考点的序号、信号强度特征均值集、地理位置坐标一起上传到服务器位置指纹数据库中。Inaccurate signal acquisition due to factors such as complex indoor environment, multipath effect, indoor fixed furniture and radio frequency interference will eventually lead to large online positioning errors. Aiming at this problem, the present invention proposes a WiFi fingerprint indoor positioning optimization algorithm fused with confidence, which can reduce jumps, increase stability, and improve positioning accuracy. The main function of the WiFi fingerprint indoor positioning optimization algorithm fused with confidence is to reduce the error caused by real-time acquisition and set a low confidence for the reference point that has a small probability of arrival. That is, when calculating the characteristic value of the positioning signal strength, it is no longer only the mean value, but the mean square error of the mean data set is also calculated and recorded, and the mean square error represents the quality of the signal. The mean square error is converted using the mean square error and confidence level mapping table, and finally uploaded to the server location fingerprint database together with the serial number of the reference point, the signal strength feature mean value set, and the geographic location coordinates.
本发明实施方式的一方面提供一种融合置信度的WiFi指纹室内定位算法,包括如下步骤:One aspect of the embodiments of the present invention provides a WiFi fingerprint indoor positioning algorithm fused with confidence, including the following steps:
S101,在离线采集阶段使用采集设备采集各个参考点用于定位的多个AP信号强度特征值,并对所述信号强度特征值进行预处理,其中包括计算均值及均方差。S101 , in the offline collection stage, use a collection device to collect multiple AP signal strength characteristic values used for positioning at each reference point, and preprocess the signal strength characteristic values, including calculating the mean value and the mean square error.
根据公式对某个参考点单个AP采集n次信号强度特征值进行取均值处理,以得到一AP信号强度平均值。According to the formula A single AP at a certain reference point collects n times of signal strength characteristic values, and performs averaging processing to obtain an AP signal strength average value.
其中,为该AP信号强度平均值,为该AP采集n次的信号强度特征值之和。in, is the average signal strength of the AP, The sum of the signal strength eigenvalues collected n times for the AP.
在本实施例中,采集者使用移动智能手机在已经布设完成的参考点上逐一朝同一方向采集。每个参考点采集的次数为30次,每一次都是采集所有AP的信号强度特征值,时间约为1分半。可通过公式对每个参考点采集的所有AP的信号强度特征值分别进行取均值处理,得到每个参考点的每个AP的信号强度平均值。In this embodiment, the collector uses a mobile smart phone to collect one by one in the same direction on the reference points that have been laid out. Each reference point is collected for 30 times, and each time is to collect the signal strength characteristic values of all APs, and the time is about one and a half minutes. through the formula The signal strength characteristic values of all APs collected at each reference point are respectively averaged to obtain the average value of the signal strength of each AP at each reference point.
其中,为某个参考点第m个AP的信号强度特征均值,为某个参考点第m个AP采集n次的信号强度特征值之和,n为所述采集设备的采集次数,i为自变量,m为AP数量,为单个参考点采集的所有AP分别求信号强度平均值的集合,为单个参考点采集的所有AP分别求信号强度特征值之和的集合。in, is the mean value of the signal strength feature of the mth AP at a certain reference point, is the sum of the signal strength characteristic values of the mth AP of a certain reference point collected n times, n is the collection times of the collection device, i is an independent variable, m is the number of APs, A set of average signal strengths for all APs collected at a single reference point, respectively, A set of sums of signal strength eigenvalues is calculated for all APs collected at a single reference point.
进行均值后再进行均方差处理,可根据均方差公式计算出均方差,为单个AP第n次采集的信号强度特征值,为该AP信号强度平均值。均方差又常称为标准差,是方差的算术平方根。标准差能反映一个数据集的离散程度。平均数相同的两组数据,均方差未必相同。如X组的信号强度特征值为(-95dBm、-85dBm、-75dBm、-65dBm、-55dBm、-45dBm),B组的信号强度特征值为(-73dBm、-72dBm、-71dBm、-69dBm、-68dBm、-67dBm)。这两组的平均值都是-70dBm,但A组的均方差约为17.08dBm,B组的均方差约为2.16dBm,说明B组信号强度特征值要比A组信号强度特征值跳变低、更稳定,所以在进行转换的时候本发明使用均方差。After the mean value is performed, the mean square error processing can be performed according to the mean square error formula. Calculate the mean square error, is the characteristic value of the signal strength collected by a single AP for the nth time, is the average signal strength of the AP. The mean square error, also often called the standard deviation, is the arithmetic square root of the variance. Standard deviation can reflect the degree of dispersion of a data set. Two sets of data with the same mean may not have the same mean squared error. For example, the signal strength characteristic values of group X are (-95dBm, -85dBm, -75dBm, -65dBm, -55dBm, -45dBm), and the signal strength characteristic values of group B are (-73dBm, -72dBm, -71dBm, -69dBm, -68dBm, -67dBm). The average value of these two groups is -70dBm, but the mean square error of group A is about 17.08dBm, and the mean square error of group B is about 2.16dBm, indicating that the signal strength characteristic value of group B has a lower jump than the signal strength characteristic value of group A. , more stable, so the present invention uses the mean square error when converting.
在此需要指出的是,在进行下一个参考点采集时,应在该位置上等待10s,以保证信号的稳定性。It should be pointed out here that when the next reference point acquisition is performed, it should wait at this position for 10s to ensure the stability of the signal.
S102,获得的所有的参考点的AP的均方差与阈值相比较;阈值为本发明构建的均方差区间与置信度的虚拟映射表中的均方差最大值。S102, the obtained mean square error of AP of all reference points is compared with a threshold; the threshold is the maximum mean square error in the virtual mapping table of mean square error interval and confidence level constructed by the present invention.
如果均方差大于阈值,计算均值与采集的信号强度特征值逐一相减取绝对值后降序排序,剔除前三位最大的绝对值对应的信号强度特征值,把剩下的信号强度特征值重新计算均方差并记录,同样判断是否在阈值之内,直至符合为止。If the mean square error is greater than the threshold, the calculated mean value and the collected signal strength eigenvalues are subtracted one by one to obtain the absolute value, and then sorted in descending order, the signal strength eigenvalues corresponding to the first three largest absolute values are eliminated, and the remaining signal strength eigenvalues are recalculated. The mean squared error is recorded, and it is also judged whether it is within the threshold until it meets.
其中,需要特别说明的是,如某个AP的信号一直不是很稳定的情况下,均方差一直是大于阈值,则重新采样。Among them, it should be noted that, if the signal of a certain AP is not very stable all the time, and the mean square error is always greater than the threshold, then re-sampling is performed.
如重新采样后还是大于阈值,则在经过计算均值与采集的信号强度特征值逐一相减取绝对值后降序排序,剔除前三位最大的绝对值对应的信号强度特征值,把剩下的信号强度特征值重新计算均方差并记录,直到剩最后三个信号强度特征值后,记录整个过程中最小的均方差及均值。If it is still greater than the threshold after re-sampling, the calculated mean value and the collected signal strength characteristic value are subtracted one by one to obtain the absolute value, and then sorted in descending order, and the signal strength characteristic value corresponding to the first three largest absolute values is eliminated. The mean square error of the intensity eigenvalues is recalculated and recorded until the last three signal intensity characteristic values are left, and the smallest mean square error and mean value in the whole process are recorded.
其中,对各个参考点的各个AP得到的均方差根据均方差与置信度映射表进行均方差的转换得到该参考点的该AP置信度。Wherein, the mean square error obtained for each AP at each reference point is converted to the mean square error according to the mean square error and confidence level mapping table to obtain the AP confidence level of the reference point.
均方差与置信度映射表为虚拟映射表,可在程序中创建,分为均方差区间与置信度两类元素。The mean square error and confidence level mapping table is a virtual mapping table, which can be created in the program, and is divided into two types of elements: mean square error interval and confidence level.
如下表所示,每个置信度与一个均方差区间进行映射,当求得某AP在某一参考点的信号强度特征值的所得均方差落入下表某个均方差区间时,则此AP在该参考点的信号强度特征值置信度为均方差相对应置信度。As shown in the table below, each confidence level is mapped to a mean square error interval. When the mean square error of the signal strength characteristic value of an AP at a certain reference point falls within a mean square error interval in the following table, the AP The confidence of the signal strength characteristic value at the reference point is the corresponding confidence of the mean square error.
置信度也称可信度,阈值的确定方法为:整个实验区域的参考点为98个,AP为4个,因每个参考点都需采集4个AP的信号强度特征值,即均方差的计算数量为98*4=392个,392个均方差数值利用数据分析工具中的离群点检测算法剔除离群点,剩下的均方差区间为(0.00,50.00),取均方差最大值50.00作为阈值。Confidence is also called credibility. The threshold is determined as follows: there are 98 reference points and 4 APs in the entire experimental area, because each reference point needs to collect the signal strength characteristic values of 4 APs, that is, the mean square error. The number of calculations is 98*4=392, and the 392 mean square deviation values are eliminated by the outlier detection algorithm in the data analysis tool. The remaining mean square error interval is (0.00, 50.00), and the maximum mean square error is 50.00. as the threshold.
均方差区间确定方法:先以数量相同为标准,把均方差区间0.00至50.00划为5个部分,即可以初步确定每个均方差区间。完成之后再根据置信度从100%以10%一次的递减方式递减,同时调整均方差区间。The method of determining the mean square error interval: first, with the same number as the standard, divide the mean square error interval 0.00 to 50.00 into 5 parts, that is, each mean square error interval can be preliminarily determined. After completion, the confidence level is decreased from 100% in 10% increments, and the mean square error interval is adjusted at the same time.
接下来继续以置信度为基准验证均方差区间:如均方差区间为0.00至0.25时,找出均方差在这个区间的参考点,重新采集数据并计算30次均方差后得到的均方差都在这个区间,可信度即为100%也就是置信度为1.00,如若不是则放大均方差区间,直至置信度为1.00为止,其他区间同理,进而确定均方差区间与置信度之间的虚拟映射表。Next, continue to verify the mean square error interval based on the confidence level: if the mean square error interval is 0.00 to 0.25, find the reference point of the mean square error in this interval, re-collect the data and calculate the mean square error 30 times. In this interval, the reliability is 100%, that is, the confidence is 1.00. If not, the mean square error interval is enlarged until the confidence degree is 1.00. The same is true for other intervals, and then the virtual mapping between the mean square error interval and the confidence degree is determined. surface.
确定均方差区间与置信度映射表后,在其他还未采集的区域可使用该映射表确定置信度,无需重复上述过程。如单个AP计算的均方差是0.10,则该参考点的该AP的置信度为1.00。After the mean square error interval and the confidence level mapping table is determined, the mapping table can be used to determine the confidence level in other areas that have not been collected, without repeating the above process. If the mean square error calculated by a single AP is 0.10, the confidence level of the AP at the reference point is 1.00.
通过以上处理后得到各个参考点的各个AP的置信度方可和该参考点的地理位置坐标、信号强度特征均值集、序号一同上传至服务器位置指纹数据库中。其中数据库中的信号强度特征均值集记为:,N为参考点数量,m为AP的数量。After the above processing, the confidence level of each AP of each reference point can be uploaded to the server location fingerprint database together with the geographic location coordinates of the reference point, the signal strength feature mean value set, and the serial number. The mean set of signal strength features in the database is recorded as: , N is the number of reference points, and m is the number of APs.
S103,在定位匹配阶段使用置信度来优化欧氏距离。S103, use the confidence to optimize the Euclidean distance in the positioning matching stage.
用户使用原用于采集的智能移动设备,在某个待定位点先进行一段时间的信号强度采集,在这个时间段会采集用于定位的所有AP的信号强度特征值,并对所有AP的信号强度特征值分别求均值,会得到一组AP信号强度特征均值集记为:,m为AP的数量,将该均值集上传至服务器中,与数据库中每一组特征数据进行欧氏距离匹配计算时加入置信度,即在计算欧氏距离中进行平方和加之前乘以相对应的AP的置信度的倒数,将欧氏距离最小的参考点所对应的地理位置坐标作为用户待定位点的位置估计,返回给用户,即完成定位。The user uses the smart mobile device originally used for acquisition to collect the signal strength of a certain point to be located for a period of time. During this period of time, the signal strength characteristic values of all APs used for positioning will be collected, and the signal strength of all APs will be collected. The strength feature values are averaged respectively, and a set of AP signal strength feature mean values will be obtained, which is recorded as: , m is the number of APs, upload the mean set to the server, and add confidence in the Euclidean distance matching calculation with each group of feature data in the database, that is, multiply the relative value before the square and add in the calculation of the Euclidean distance. The reciprocal of the corresponding AP confidence, the geographic location coordinate corresponding to the reference point with the smallest Euclidean distance is used as the position estimate of the user's to-be-located point, and returned to the user, that is, the positioning is completed.
原欧氏距离公式为:The original Euclidean distance formula is:
设数据库中第j个参考点下的第k个AP的置信度为,则欧氏距离公式变更为: Let the confidence of the kth AP under the jth reference point in the database be , the Euclidean distance formula is changed to:
其中m为AP的数量,N为数据库中参考点总数,Ak为用户在待定位点测得的第k个AP的信号强度特征值,Bjk为数据库中第j个参考点下的第k个AP的信号强度特征值。Where m is the number of APs, N is the total number of reference points in the database, A k is the signal strength characteristic value of the k-th AP measured by the user at the point to be located, and B jk is the k-th reference point in the database under the j-th reference point The signal strength characteristic value of each AP.
本发明实施方式的另一方面还提供一种融合置信度的WiFi指纹室内定位系统,包括移动终端,与移动终端网络通信的云端服务器,所述移动终端包括WiFi获取单元及处理程序,所述云端服务器包括WiFi特征参数存储单元及定位单元。Another aspect of the embodiments of the present invention further provides a WiFi fingerprint indoor positioning system with integrated confidence, including a mobile terminal and a cloud server in network communication with the mobile terminal, wherein the mobile terminal includes a WiFi acquisition unit and a processing program, and the cloud The server includes a WiFi characteristic parameter storage unit and a positioning unit.
所述WiFi获取单元及处理程序,用于在离线采集阶段采集各个参考点接收的多个AP信号强度特征值,并对所述信号强度特征值进行均值及均方差处理并记录,其中每个参考点包括多个AP信号强度特征值。The WiFi acquisition unit and processing program are used to collect multiple AP signal strength characteristic values received by each reference point in the offline collection stage, and perform mean value and mean square error processing on the signal strength characteristic values and record, wherein each reference Points include multiple AP signal strength eigenvalues.
所述WiFi特征参数存储单元,用于存储各个AP的MAC地址,置信度,地理位置坐标,各个AP在各参考点的信号强度特征均值及均方差。The WiFi characteristic parameter storage unit is used to store the MAC address, confidence level, geographic location coordinates of each AP, and the characteristic mean value and mean square error of each AP's signal strength at each reference point.
所述定位单元,用于在线定位阶段,实时获取的用户待定位点信号强度特征值数据与数据库中的每一组信号强度特征值数据进行欧氏距离匹配计算时加入置信度,即在计算欧氏距离中进行平方和加之前乘以相对应的AP的置信度的倒数,可达到优化其距离的效果。The positioning unit is used in the online positioning stage, and the confidence is added when the Euclidean distance matching calculation is performed between the signal strength characteristic value data of the user to be positioned point acquired in real time and each group of signal strength characteristic value data in the database, that is, when calculating the Euclidean distance. Multiplying the inverse of the confidence of the corresponding AP before the square sum and addition in the distance can achieve the effect of optimizing its distance.
以上所述实施例仅表达了本发明的一种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiment only represents an embodiment of the present invention, and its description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can also be made, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910274242.2A CN109738863A (en) | 2019-04-08 | 2019-04-08 | A WiFi Fingerprint Indoor Localization Algorithm and System Based on Confidence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910274242.2A CN109738863A (en) | 2019-04-08 | 2019-04-08 | A WiFi Fingerprint Indoor Localization Algorithm and System Based on Confidence |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109738863A true CN109738863A (en) | 2019-05-10 |
Family
ID=66371409
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910274242.2A Pending CN109738863A (en) | 2019-04-08 | 2019-04-08 | A WiFi Fingerprint Indoor Localization Algorithm and System Based on Confidence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109738863A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110267209A (en) * | 2019-06-28 | 2019-09-20 | 深圳数位传媒科技有限公司 | A kind of indoor orientation method and device based on WiFi longitude and latitude |
CN110456308A (en) * | 2019-07-08 | 2019-11-15 | 广西工业职业技术学院 | A kind of three dimension location method for fast searching |
CN111050275A (en) * | 2019-11-26 | 2020-04-21 | 武汉虹信技术服务有限责任公司 | Bluetooth positioning method based on RSSI characteristic value |
CN113050137A (en) * | 2021-03-09 | 2021-06-29 | 江西师范大学 | Multi-point cooperative measurement spatial information acquisition method |
CN113079466A (en) * | 2020-10-21 | 2021-07-06 | 中移(上海)信息通信科技有限公司 | Fingerprint database construction method, device, equipment and computer storage medium |
CN116800203A (en) * | 2023-06-27 | 2023-09-22 | 深圳市安科讯实业有限公司 | Photovoltaic inverter with operation supervision function based on Internet of things |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103354660A (en) * | 2013-06-21 | 2013-10-16 | 北京邮电大学 | Positioning method and device based on signal intensity in mobile communication network |
CN104135768A (en) * | 2014-08-21 | 2014-11-05 | 哈尔滨工业大学 | Wireless sensor network positioning method based on signal intensity mapping |
CN104703143A (en) * | 2015-03-18 | 2015-06-10 | 北京理工大学 | Indoor positioning method based on WIFI signal strength |
CN104883734A (en) * | 2015-05-12 | 2015-09-02 | 北京邮电大学 | Indoor passive positioning method based on geographic fingerprints |
CN106102163A (en) * | 2016-06-03 | 2016-11-09 | 杭州电子科技大学 | WLAN fingerprint positioning method based on RSS linear correlation Yu secondary weighted centroid algorithm |
US20170079004A1 (en) * | 2013-08-06 | 2017-03-16 | Google Technology Holdings LLC | Method and apparatus for wireless network data collection |
CN107271951A (en) * | 2017-06-06 | 2017-10-20 | 上海工程技术大学 | UAV Navigation System and its air navigation aid based on WiFi fingerprint locations |
CN107333276A (en) * | 2017-05-27 | 2017-11-07 | 南京邮电大学 | WiFi location fingerprint localization methods based on weighted chi-square distance |
CN107948930A (en) * | 2017-12-31 | 2018-04-20 | 电子科技大学 | Indoor positioning optimization method based on location fingerprint algorithm |
-
2019
- 2019-04-08 CN CN201910274242.2A patent/CN109738863A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103354660A (en) * | 2013-06-21 | 2013-10-16 | 北京邮电大学 | Positioning method and device based on signal intensity in mobile communication network |
US20170079004A1 (en) * | 2013-08-06 | 2017-03-16 | Google Technology Holdings LLC | Method and apparatus for wireless network data collection |
CN104135768A (en) * | 2014-08-21 | 2014-11-05 | 哈尔滨工业大学 | Wireless sensor network positioning method based on signal intensity mapping |
CN104703143A (en) * | 2015-03-18 | 2015-06-10 | 北京理工大学 | Indoor positioning method based on WIFI signal strength |
CN104883734A (en) * | 2015-05-12 | 2015-09-02 | 北京邮电大学 | Indoor passive positioning method based on geographic fingerprints |
CN106102163A (en) * | 2016-06-03 | 2016-11-09 | 杭州电子科技大学 | WLAN fingerprint positioning method based on RSS linear correlation Yu secondary weighted centroid algorithm |
CN107333276A (en) * | 2017-05-27 | 2017-11-07 | 南京邮电大学 | WiFi location fingerprint localization methods based on weighted chi-square distance |
CN107271951A (en) * | 2017-06-06 | 2017-10-20 | 上海工程技术大学 | UAV Navigation System and its air navigation aid based on WiFi fingerprint locations |
CN107948930A (en) * | 2017-12-31 | 2018-04-20 | 电子科技大学 | Indoor positioning optimization method based on location fingerprint algorithm |
Non-Patent Citations (2)
Title |
---|
毛永毅等: "基于WiFi的一种改进的室内定位算法", 《测控技术》 * |
王佳: "基于迭代匹配与置信度的室内定位算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110267209A (en) * | 2019-06-28 | 2019-09-20 | 深圳数位传媒科技有限公司 | A kind of indoor orientation method and device based on WiFi longitude and latitude |
CN110267209B (en) * | 2019-06-28 | 2021-09-10 | 深圳数位传媒科技有限公司 | Indoor positioning method and device based on WiFi longitude and latitude |
CN110456308A (en) * | 2019-07-08 | 2019-11-15 | 广西工业职业技术学院 | A kind of three dimension location method for fast searching |
CN111050275A (en) * | 2019-11-26 | 2020-04-21 | 武汉虹信技术服务有限责任公司 | Bluetooth positioning method based on RSSI characteristic value |
CN113079466A (en) * | 2020-10-21 | 2021-07-06 | 中移(上海)信息通信科技有限公司 | Fingerprint database construction method, device, equipment and computer storage medium |
CN113079466B (en) * | 2020-10-21 | 2022-04-26 | 中移(上海)信息通信科技有限公司 | Fingerprint database construction method, device, equipment and computer storage medium |
CN113050137A (en) * | 2021-03-09 | 2021-06-29 | 江西师范大学 | Multi-point cooperative measurement spatial information acquisition method |
CN113050137B (en) * | 2021-03-09 | 2022-04-26 | 江西师范大学 | A spatial information acquisition method for multi-point co-measurement |
CN116800203A (en) * | 2023-06-27 | 2023-09-22 | 深圳市安科讯实业有限公司 | Photovoltaic inverter with operation supervision function based on Internet of things |
CN116800203B (en) * | 2023-06-27 | 2024-06-04 | 深圳市安科讯实业有限公司 | Photovoltaic inverter with operation supervision function based on Internet of things |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109738863A (en) | A WiFi Fingerprint Indoor Localization Algorithm and System Based on Confidence | |
CN105137390B (en) | A kind of indoor orientation method based on adjustable transmission power AP | |
CN106851573B (en) | Log path loss model-based joint weighting K nearest neighbor indoor positioning method | |
CN106793082B (en) | A mobile device positioning method in WLAN/Bluetooth heterogeneous network environment | |
CN108174343B (en) | Wireless positioning method and system for power indoor communication operation and maintenance scene | |
CN105898692B (en) | A kind of indoor orientation method and device | |
CN102098780B (en) | Positioning method and device | |
CN105101406B (en) | A kind of indoor orientation method and system based on wireless strengths | |
CN108307301B (en) | Indoor positioning method based on RSSI ranging and trajectory similarity | |
CN105491661B (en) | Indoor positioning system and method based on improved Kalman filter algorithm | |
CN103945332B (en) | A kind of received signal strength and multi-path information united NNs indoor orientation method | |
CN105704652B (en) | Fingerprint base acquisition and optimization method in a kind of positioning of WLAN/ bluetooth | |
CN105044662A (en) | Fingerprint clustering multi-point joint indoor positioning method based on WIFI signal intensity | |
CN103209478A (en) | Indoor positioning method based on classified thresholds and signal strength weight | |
CN102695272B (en) | Matching location method and mobile terminal | |
CN104796980A (en) | WLAN indoor positioning calibration method suitable for different types of intelligent terminals | |
CN104540219B (en) | A kind of Wi-Fi fingerprint indoor orientation methods of low complex degree | |
CN103581831A (en) | Indoor locating algorithm based on WiFi and mobile terminal | |
CN105554879A (en) | Method and system for positioning and optimizing indoor area | |
CN105652235A (en) | Linear regression algorithm-based WLAN indoor positioning multi-user RSS (Received Signal Strength) fusion method | |
CN108712714A (en) | The selection method and device of AP in a kind of interior WLAN fingerprint locations | |
CN112714493B (en) | Object position positioning method and positioning system | |
CN103888979B (en) | Indoor positioning method based on wireless local area network | |
CN107801242A (en) | A kind of indoor orientation method based on adaptive Kalman filter | |
CN113759311A (en) | Positioning method, positioning device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190510 |
|
RJ01 | Rejection of invention patent application after publication |