CN117222003A - Wi-Fi and Bluetooth signal fusion method applied to indoor positioning - Google Patents
Wi-Fi and Bluetooth signal fusion method applied to indoor positioning Download PDFInfo
- Publication number
- CN117222003A CN117222003A CN202311237647.1A CN202311237647A CN117222003A CN 117222003 A CN117222003 A CN 117222003A CN 202311237647 A CN202311237647 A CN 202311237647A CN 117222003 A CN117222003 A CN 117222003A
- Authority
- CN
- China
- Prior art keywords
- signal
- value
- signals
- bluetooth
- data
- 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
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
本发明属于室内定位领域,公开了一种应用于室内定位的Wi‑Fi和蓝牙信号融合方法,主要围绕Wi‑Fi和蓝牙信号的深度特征进行提取与融合。该方法针对收集到的信号中部分信号缺失的问题,使用卡尔曼滤波算法进行缺失值补偿;通过长短期记忆网络针对Wi‑Fi和蓝牙信号进行特征提取,捕捉信号的时间序列依赖性;引入了多头自注意力模型,捕捉信号特征之间的关系,为各信号特征分配权重,并与原始输入进行结合,获得加权后的特征表示;采用了级联策略来高效融合加权的Wi‑Fi和蓝牙信号特征。本发明为Wi‑Fi和蓝牙信号提供了一种新的融合策略,目的是更有效地捕获其关键信息,从而在经济高效的定位方案中实现误差的减小。
The invention belongs to the field of indoor positioning and discloses a Wi-Fi and Bluetooth signal fusion method applied to indoor positioning, which mainly focuses on extracting and merging the deep features of Wi-Fi and Bluetooth signals. This method aims at the problem of missing signals in part of the collected signals. It uses the Kalman filter algorithm to compensate for missing values; it uses the long short-term memory network to extract features of Wi‑Fi and Bluetooth signals to capture the time series dependence of the signals; it introduces The multi-head self-attention model captures the relationship between signal features, assigns weights to each signal feature, and combines it with the original input to obtain a weighted feature representation; a cascade strategy is used to efficiently integrate weighted Wi‑Fi and Bluetooth signal characteristics. The present invention provides a new fusion strategy for Wi-Fi and Bluetooth signals, with the purpose of capturing their key information more effectively, thereby achieving error reduction in a cost-effective positioning solution.
Description
技术领域Technical field
本发明属于室内定位领域,尤其涉及一种应用于室内定位的Wi-Fi和蓝牙信号融合方法。The invention belongs to the field of indoor positioning, and in particular relates to a Wi-Fi and Bluetooth signal fusion method applied to indoor positioning.
背景技术Background technique
基于位置的服务(Location-Based Services,LBS)在确定物体或人员的精确位置方面具有显著的社会和商业意义,并已逐渐成为学术界和工业界的关注焦点。尽管基于卫星信号的导航定位技术在室外定位中取得了显著成功,但在室内环境,卫星信号因严重的衰减和多径效应的缘故,其定位效果还无法让人满意。Location-Based Services (LBS) have significant social and commercial significance in determining the precise location of objects or people, and have gradually become the focus of academia and industry. Although navigation and positioning technology based on satellite signals has achieved significant success in outdoor positioning, in indoor environments, the positioning effect of satellite signals is still unsatisfactory due to severe attenuation and multipath effects.
为了提高室内定位的精度,研究者开始探究使用其他信号的室内定位技术。例如Wi-Fi和行人航位推算。Wi-Fi定位主要依赖于现有的无线局域网络基础设施,通过测量信号强度或传播时延进行三角定位。行人航位推算主要依赖于基于穿戴的传感器,如加速度计和陀螺仪,来检测和估计行人的步伐和行走方向实现定位。尽管这些定位技术各自有其独特的优势,但它们也都存在一些常见的局限性。例如,Wi-Fi定位可能会因为信号遮挡或反射而产生误差,Wi-Fi信号由于不稳定在数据收集过程中出现部分信号缺失;行人航位推算的准确性会随时间逐渐累积误差。为了克服这些局限性,许多研究者正努力探索融合多种信号的方法,希望通过这种融合提高室内定位的准确性和鲁棒性。例如,融合Wi-Fi、地磁与行人航位推算的技术,融合Wi-Fi与图像的技术等,都已经在实验中展现出了良好的定位效果。In order to improve the accuracy of indoor positioning, researchers began to explore indoor positioning technology using other signals. Examples include Wi-Fi and pedestrian dead reckoning. Wi-Fi positioning mainly relies on the existing wireless local area network infrastructure and performs triangulation positioning by measuring signal strength or propagation delay. Pedestrian dead reckoning mainly relies on wearable sensors, such as accelerometers and gyroscopes, to detect and estimate pedestrians' steps and walking directions to achieve positioning. While each of these positioning technologies has unique advantages, they also suffer from some common limitations. For example, Wi-Fi positioning may cause errors due to signal obstruction or reflection. Due to instability of Wi-Fi signals, some signals may be missing during the data collection process. The accuracy of pedestrian dead reckoning will gradually accumulate errors over time. In order to overcome these limitations, many researchers are working hard to explore methods to fuse multiple signals, hoping to improve the accuracy and robustness of indoor positioning through this fusion. For example, technologies that integrate Wi-Fi, geomagnetism and pedestrian dead reckoning, and technologies that integrate Wi-Fi and images have all shown good positioning effects in experiments.
融合多种信号源的定位技术在一定程度上降低了室内定位的误差。然而这些融合方案往往涉及多种硬件和软件组件的集成,整体的部署和维护成本较高。在商业应用和日常生活中,这种成本的增加可能会限制其广泛应用。Positioning technology that integrates multiple signal sources reduces indoor positioning errors to a certain extent. However, these convergence solutions often involve the integration of multiple hardware and software components, and the overall deployment and maintenance costs are high. This increase in cost may limit its widespread use in commercial applications and daily life.
发明内容Contents of the invention
本发明目的在于提供一种应用于室内定位的Wi-Fi和蓝牙信号融合方法,以解决融合多种信号源的定位技术的部署和维护成本较高的技术问题。The purpose of the present invention is to provide a Wi-Fi and Bluetooth signal fusion method for indoor positioning to solve the technical problem of high deployment and maintenance costs of positioning technology that integrates multiple signal sources.
为解决上述技术问题,本发明的旨在提出一种新的融合Wi-Fi和蓝牙信号的定位方案。这种方案的目标是在确保定位系统精度的同时,降低其部署成本,从而实现经济、高效且鲁棒的室内定位。本发明的的具体技术方案如下:In order to solve the above technical problems, the present invention aims to propose a new positioning solution that integrates Wi-Fi and Bluetooth signals. The goal of this solution is to reduce the deployment cost while ensuring the accuracy of the positioning system, thereby achieving economical, efficient and robust indoor positioning. The specific technical solutions of the present invention are as follows:
一种应用于室内定位的Wi-Fi和蓝牙信号融合方法,包括如下步骤:A Wi-Fi and Bluetooth signal fusion method applied to indoor positioning, including the following steps:
步骤一:按照一定的规律设置参考点,在预定的采集点上,分别对Wi-Fi信号和蓝牙信号进行收集;将采集的数据按照时间顺序整理;Step 1: Set reference points according to certain rules, and collect Wi-Fi signals and Bluetooth signals at predetermined collection points; organize the collected data in chronological order;
步骤二:对于数据中的信号缺失问题,使用卡尔曼滤波算法,通过预测步骤和更新步骤的迭代计算出信号缺失值;Step 2: For the signal missing problem in the data, use the Kalman filter algorithm to calculate the missing signal value through the iteration of the prediction step and the update step;
步骤三:对于填补缺失值后的信号,找出每一列数据中的最大值和最小值,使用最大最小归一化方法对每个元素进行归一化计算;Step 3: For the signal after filling in missing values, find the maximum and minimum values in each column of data, and use the maximum and minimum normalization method to normalize each element;
步骤四:使用两个长短期记忆网络分别提取两种数据的特征,即为每种类型的数据分别创建一个单独的长短期记忆网络,一个网络用于处理Wi-Fi信号,另一个网络用于处理蓝牙信号,最终输出提取后的特征;Step 4: Use two long short-term memory networks to extract the features of the two types of data respectively, that is, create a separate long short-term memory network for each type of data, one network is used to process Wi-Fi signals, and the other network is used to Process the Bluetooth signal and finally output the extracted features;
步骤五:每个长短期记忆网络的输出将进一步传入一个多头自注意力模型,根据序列内部的相似性,为每个元素计算相应的注意力权重;Step 5: The output of each long short-term memory network will be further passed into a multi-head self-attention model, and the corresponding attention weight will be calculated for each element based on the similarity within the sequence;
步骤六:将加权后的Wi-Fi和蓝牙信号通过级联的方式进行融合,从而得到一个全面和丰富的特征表示。Step 6: Fusion of the weighted Wi-Fi and Bluetooth signals through cascade to obtain a comprehensive and rich feature representation.
进一步地,所述步骤一包括如下步骤:Further, the step one includes the following steps:
选择一个空间作为实验区域,将此空间划分为二维平面网格,每个网格为边长0.6米的正方形,网格的交点为信号采集点,相邻两个采集点间隔1.2米。Select a space as the experimental area and divide the space into a two-dimensional plane grid. Each grid is a square with a side length of 0.6 meters. The intersection of the grid is the signal collection point, and the distance between two adjacent collection points is 1.2 meters.
进一步地,所述步骤二的卡尔曼滤波是一种递归估计算法,由预测步骤和更新步骤组成,采集的数据为时间序列,缺失值的位置留空,算法会基于前一时刻的状态进行预测,得到当前时刻的信号强度的预测值,然后通过实际的信号强度测量值与预测值进行比较,进而对预测值进行修正,经过反复的迭代,算法最终预测出缺失信号的预测值,确保其接近真实的信号强度。Furthermore, the Kalman filter in step 2 is a recursive estimation algorithm, which consists of a prediction step and an update step. The collected data is a time series, and the position of the missing value is left blank. The algorithm will predict based on the state of the previous moment. , get the predicted value of the signal strength at the current moment, and then compare the actual signal strength measurement value with the predicted value, and then correct the predicted value. After repeated iterations, the algorithm finally predicts the predicted value of the missing signal, ensuring that it is close to True signal strength.
进一步地,所述步骤二的具体步骤如下:Further, the specific steps of step two are as follows:
令xy表示第y个位置的信号强度,令F表示状态转移矩阵,wy-1表示过程噪声,则得到状态转移模型:Let x y represent the signal strength at the y-th position, let F represent the state transition matrix, and w y-1 represent the process noise, then the state transition model is obtained:
xy=Fxy-1+wy-1(1)x y =Fx y-1 +w y-1 (1)
令zy表示第y个位置信号强度值的观察值,H表示观测矩阵,uy表示观察噪声,则得到观测模型:Let z y represent the observed value of the signal strength value at the y-th position, H represent the observation matrix, and u y represent the observation noise, then the observation model is obtained:
zy=Hxy+uy(2)z y =Hx y +u y (2)
初始化卡尔曼滤波参数,x0|0为初始状态估计,P0|0为初始状态估计的误差协方差,O过程噪声协方差,R观测噪声协方差。Initialize the Kalman filter parameters, x 0|0 is the initial state estimate, P 0|0 is the error covariance of the initial state estimate, O process noise covariance, and R observation noise covariance.
预测下一个信号强度值:Predict the next signal strength value:
xy|y-1=Fxy-1|y-1(3)x y|y-1 =Fx y-1|y-1 (3)
令FT表示状态转移矩阵的转置,误差协方差预测为:Let F T represent the transpose of the state transition matrix, and the error covariance prediction is:
Py|y-1=FPy-1|y-1FT+O(4)P y|y-1 =FP y-1|y-1 F T +O(4)
令HT表示观察矩阵的转置,卡尔曼增益为:Let H T represent the transpose of the observation matrix, and the Kalman gain is:
Yy=Py|y-1HT(HPy|y-1HT+R)-1(5)Y y =P y|y-1 H T (HP y|y-1 H T +R) -1 (5)
更新信号强度值,状态更新方程为:Update the signal strength value, and the status update equation is:
xy|y=xy|y-1+Yy(zy-Hxy|y-1)(6)x y|y =x y|y-1 +Y y (z y -Hx y|y-1 )(6)
令其中I为单位矩阵,误差协方差更新方程为:Let I be the identity matrix, and the error covariance update equation is:
Py|y=(I-HYy)Py|y-1(7)P y|y =(I-HY y )P y|y-1 (7)
使用以上公式进行计算,xy|y-1将填补缺失位置的信号值。Using the above formula to calculate, x y|y-1 will fill in the signal value at the missing position.
进一步地,所述步骤三的具体步骤如下:Further, the specific steps of step three are as follows:
对于Wi-Fi信号的归一化,首先对于每一列数据,找出其中的最大值xmax和最小值xmin,并使用它们对该列中每个数据xi,通过公式(8)进行归一化:For the normalization of Wi-Fi signals, first find the maximum value x max and the minimum value x min for each column of data, and use them to normalize each data x i in the column through formula (8) Unification:
其中,xi ′为归一化后的数据;Among them, x i ′ is the normalized data;
蓝牙信号的归一化同理,将其归一化到[0,1]的范围内。The normalization of Bluetooth signals is the same, normalizing it to the range of [0,1].
进一步地,所述步骤四的具体步骤如下:Further, the specific steps of step four are as follows:
一个网络用于处理Wi-Fi信号,另一个网络用于处理蓝牙信号,两种数据在长短期记忆网络中,数据经历了一个复杂的内部结构过程,经过输入门、遗忘门的筛选和单元状态的更新,使得该网络能够学习并记忆长期和短期的依赖关系,最终得到有意义的隐藏状态和输出提取后的特征。One network is used to process Wi-Fi signals, and the other network is used to process Bluetooth signals. The two types of data are in the long short-term memory network. The data undergoes a complex internal structure process, filtering through input gates, forgetting gates, and unit states. The update enables the network to learn and remember long-term and short-term dependencies, and finally obtains meaningful hidden states and outputs extracted features.
进一步地,所述步骤五的多头自注意力模型初始化三个权重参数矩阵wQ,wK,wV∈Rd×d,与输入相乘分别得到Q,K,V∈Rd×d,其中Q,K,V分别表示查询(Query)矩阵、键(Key)矩阵和值(Value)矩阵,注意力模块通过Q-K-V迭代地从特征向量序列中捕获不同特征之间的依赖关系,然后获得不同注意力权重,通过多头机制,确保每个头关注的是不同的信息,最终,这些注意力权重与原始长短期记忆网络的输出相结合,得到加权的输出,该输出反映了序列中的各种内部依赖关系。Further, the multi-head self-attention model in step 5 initializes three weight parameter matrices w Q , w K , w V ∈R d×d , and multiplies them with the input to obtain Q, K, V∈R d×d respectively. Among them, Q, K and V respectively represent the query matrix, key matrix and value matrix. The attention module uses QKV to iteratively capture the dependencies between different features from the feature vector sequence, and then obtain different Attention weights, through a multi-head mechanism, ensure that each head focuses on different information. Finally, these attention weights are combined with the output of the original long short-term memory network to obtain a weighted output that reflects the various internal aspects of the sequence. Dependencies.
进一步地,所述步骤五的具体步骤如下:Further, the specific steps of step five are as follows:
使用Softmax函数计算注意力权重:Use the Softmax function to calculate the attention weight:
其中,Q是查询矩阵,K是键矩阵,V是值矩阵,dk是键矩阵的维度,A(Q,K,V)是计算后的结果。Among them, Q is the query matrix, K is the key matrix, V is the value matrix, d k is the dimension of the key matrix, and A(Q,K,V) is the calculated result.
进一步地,所述步骤六的具体步骤如下:Further, the specific steps of step six are as follows:
新的、融合后的数据集包含了两个数据源的所有关键信息:The new, fused data set contains all key information from both data sources:
其中,经过多头注意力计算后,表示Wi-Fi信号的特征向量,/>表示蓝牙信号的特征向量,[·;·]表示特征级联。Among them, after calculating the multi-head attention, Represents the eigenvector of the Wi-Fi signal, /> Represents the feature vector of Bluetooth signal, [·;·] indicates feature cascade.
本发明的一种应用于室内定位的Wi-Fi和蓝牙信号融合方法具有以下优点:A Wi-Fi and Bluetooth signal fusion method applied to indoor positioning of the present invention has the following advantages:
1、采用卡尔曼滤波处理数据,能有效地针对数据中存在的噪声和不确定性进行状态估计,进而填补缺失值并提供更为准确的数据表示。通过这种方法,数据的噪声、不确定性和动态变化都由卡尔曼滤波器捕获和修正,确保数据得到精确和稳定的处理,而不受其他可能的数据干扰,从而补充缺失值,优化数据完整性和质量。1. Using Kalman filtering to process data can effectively estimate the state of the noise and uncertainty existing in the data, thereby filling in missing values and providing a more accurate data representation. Through this method, the noise, uncertainty and dynamic changes of the data are captured and corrected by the Kalman filter, ensuring that the data is processed accurately and stably without interference from other possible data, thus supplementing missing values and optimizing the data Integrity and quality.
2、使用两个长短期记忆网络分别提取两种数据的特征,能有效应对每种类型的数据都有其独特的特性和结构,捕获其内在的信息。在这种策略中,Wi-Fi信号的所有特性和规律都由第一个长短期记忆网络进行学习和提取,而不会受到蓝牙信号的任何干扰。同样,蓝牙信号也由第二个专门的长短期记忆网络进行处理,以确保其独特性得到充分的挖掘。2. Use two long short-term memory networks to extract the characteristics of two types of data respectively, which can effectively deal with each type of data having its own unique characteristics and structure, and capture its inherent information. In this strategy, all characteristics and patterns of Wi-Fi signals are learned and extracted by the first long short-term memory network without any interference from Bluetooth signals. Likewise, the Bluetooth signal is processed by a second dedicated long-short-term memory network to ensure its unique characteristics are fully exploited.
3、采用多头自注意力机制融合两种数据的特征,进一步优化这种策略。给予那些重要的特征更高的权重,而降低那些不重要的特征的权重。这种方法可以让模型更好地捕捉数据的内部结构和关系,并且可以自动地选择那些重要的特征。这样,除了各自捕获各自数据的特性之外,还可以学习两种数据之间的关联性。3. Use a multi-head self-attention mechanism to fuse the characteristics of the two data to further optimize this strategy. Give higher weight to those features that are important and lower the weight to those features that are not important. This approach allows the model to better capture the internal structure and relationships of the data and automatically select those important features. In this way, in addition to each capturing the characteristics of their respective data, the correlation between the two data can also be learned.
附图说明Description of drawings
图1为本发明的应用于室内定位的Wi-Fi和蓝牙信号融合方法流程图;Figure 1 is a flow chart of the Wi-Fi and Bluetooth signal fusion method applied to indoor positioning according to the present invention;
图2为本发明的二维平面网格划分示意图。Figure 2 is a schematic diagram of the two-dimensional plane mesh division of the present invention.
具体实施方式Detailed ways
为了更好地了解本发明的目的、结构及功能,下面结合附图,对本发明一种应用于室内定位的Wi-Fi和蓝牙信号融合方法做进一步详细的描述。In order to better understand the purpose, structure and function of the present invention, a Wi-Fi and Bluetooth signal fusion method for indoor positioning of the present invention will be described in further detail below with reference to the accompanying drawings.
如图1所示,本发明的一种应用于室内定位的Wi-Fi和蓝牙信号融合方法,包括如下步骤:As shown in Figure 1, a Wi-Fi and Bluetooth signal fusion method for indoor positioning of the present invention includes the following steps:
步骤一:根据研究需求和室内环境的特点,为了确保能够全面、系统地采集到Wi-Fi信号和蓝牙信号,所以需要按照一定的规律设置参考点,在预定的采集点上,分别对Wi-Fi信号和蓝牙信号进行收集;将采集的数据按照时间顺序整理。本实施例选择一个教室作为实验区域,如图2,将此空间划分为二维平面网格,每个网格为边长0.6米的正方形,网格的交点为信号采集点。图2中圆形表示信号采集点,相邻两个采集点间隔1.2米。Step 1: According to the research needs and the characteristics of the indoor environment, in order to ensure that Wi-Fi signals and Bluetooth signals can be collected comprehensively and systematically, it is necessary to set reference points according to certain rules, and measure Wi-Fi signals at predetermined collection points. Collect Fi signals and Bluetooth signals; organize the collected data in chronological order. In this embodiment, a classroom is selected as the experimental area, as shown in Figure 2. This space is divided into two-dimensional plane grids. Each grid is a square with a side length of 0.6 meters, and the intersection points of the grids are signal collection points. The circles in Figure 2 represent signal collection points, and the distance between two adjacent collection points is 1.2 meters.
步骤二:对于数据中的信号缺失问题,使用卡尔曼滤波算法,通过预测步骤和更新步骤的迭代计算出信号缺失值。卡尔曼滤波是一种递归估计算法,由预测步骤和更新步骤组成。采集的数据为时间序列,缺失值的位置留空。算法会基于前一时刻的状态进行预测,得到当前时刻的信号强度的预测值。然后通过实际的信号强度测量值与预测值进行比较,进而对预测值进行修正。经过反复的迭代,算法最终预测出缺失信号的预测值,确保其接近真实的信号强度,具体步骤如下:Step 2: For the signal missing problem in the data, use the Kalman filter algorithm to calculate the missing signal value through the iteration of the prediction step and the update step. Kalman filtering is a recursive estimation algorithm consisting of a prediction step and an update step. The collected data is a time series, and the positions of missing values are left blank. The algorithm will predict based on the status of the previous moment and obtain the predicted value of the signal strength at the current moment. The actual signal strength measurement value is then compared with the predicted value, and then the predicted value is corrected. After repeated iterations, the algorithm finally predicts the predicted value of the missing signal to ensure that it is close to the true signal strength. The specific steps are as follows:
令xy表示第y个位置的信号强度,令F表示状态转移矩阵(稳定环境中通常为1),wy-1表示过程噪声,则得到状态转移模型:Let x y represent the signal strength at the y-th position, let F represent the state transition matrix (usually 1 in a stable environment), and w y-1 represent the process noise, then the state transition model is obtained:
xy=Fxy-1+wy-1(1)x y =Fx y-1 +w y-1 (1)
令zy表示第y个位置信号强度值的观察值,H表示观测矩阵,uy表示观察噪声,则得到观测模型:Let z y represent the observed value of the signal strength value at the y-th position, H represent the observation matrix, and u y represent the observation noise, then the observation model is obtained:
zy=Hxy+uy(2)z y =Hx y +u y (2)
初始化卡尔曼滤波参数,x0|0为初始状态估计,P0|0为初始状态估计的误差协方差,O过程噪声协方差,R观测噪声协方差。Initialize the Kalman filter parameters, x 0|0 is the initial state estimate, P 0|0 is the error covariance of the initial state estimate, O process noise covariance, and R observation noise covariance.
预测下一个信号强度值:Predict the next signal strength value:
xy|y-1=Fxy-1|y-1(3)x y|y-1 =Fx y-1|y-1 (3)
令FT表示状态转移矩阵的转置,误差协方差预测为:Let F T represent the transpose of the state transition matrix, and the error covariance prediction is:
Py|y-1=FPy-1|y-1FT+O(4)P y|y-1 =FP y-1|y-1 F T +O(4)
令HT表示观察矩阵的转置,卡尔曼增益为:Let H T represent the transpose of the observation matrix, and the Kalman gain is:
Yy=Py|y-1HT(HPy|y-1HT+R)-1(5)Y y =P y|y-1 H T (HP y|y-1 H T +R) -1 (5)
更新信号强度值,状态更新方程为:Update the signal strength value, and the status update equation is:
xy|y=xy|y-1+Yy(zy-Hxy|y-1)(6)x y|y =x y|y-1 +Y y (z y -Hx y|y-1 )(6)
令其中I为单位矩阵,误差协方差更新方程为:Let I be the identity matrix, and the error covariance update equation is:
Py|y=(I-HYy)Py|y-1(7)P y|y =(I-HY y )P y|y-1 (7)
使用以上公式进行计算,xy|y-1将填补缺失位置的信号值。Using the above formula to calculate, x y|y-1 will fill in the signal value at the missing position.
步骤三:对于填补缺失值后的信号,找出每一列数据中的最大值和最小值,使用最大最小归一化方法对每个元素进行归一化计算。最大最小归一化方法,通常简称为归一化,是一种将数据重新缩放到一个固定区间(通常是[0,1])的技术。它能够在保持数据结构和关系不变的前提下,确保数据在统一的尺度上,从而有助于提高算法的性能。Step 3: For the signal after filling in missing values, find the maximum and minimum values in each column of data, and use the maximum and minimum normalization method to normalize each element. The max-min normalization method, often referred to as normalization, is a technique that rescales data to a fixed interval (usually [0,1]). It can ensure that the data is on a unified scale while keeping the data structure and relationships unchanged, thus helping to improve the performance of the algorithm.
对于Wi-Fi信号的归一化,首先对于每一列数据,找出其中的最大值xmax和最小值xmin,并使用它们对该列中每个数据xi,通过公式(8)进行归一化:For the normalization of Wi-Fi signals, first find the maximum value x max and the minimum value x min for each column of data, and use them to normalize each data x i in the column through formula (8) Unification:
其中,xi ′为归一化后的数据。Among them, x i ′ is the normalized data.
蓝牙信号的归一化同理,将其归一化到[0,1]的范围内。The normalization of Bluetooth signals is the same, normalizing it to the range of [0,1].
步骤四:使用两个长短期记忆网络分别提取两种数据的特征,即为每种类型的数据分别创建一个单独的长短期记忆网络,这种策略能够使得网络更专注于学习每种类型数据的特异性。一个网络用于处理Wi-Fi信号,另一个网络用于处理蓝牙信号,两种数据在长短期记忆网络中,数据经历了一个复杂的内部结构过程,经过输入门、遗忘门等的筛选和单元状态的更新,使得该网络能够学习并记忆长期和短期的依赖关系,以最终得到有意义的隐藏状态和输出提取后的特征。Step 4: Use two long-short-term memory networks to extract the features of the two types of data respectively, that is, create a separate long-short-term memory network for each type of data. This strategy allows the network to focus more on learning the characteristics of each type of data. Specificity. One network is used to process Wi-Fi signals, and the other network is used to process Bluetooth signals. The two kinds of data are in the long short-term memory network. The data undergoes a complex internal structure process, and passes through the filtering and units of input gates, forgetting gates, etc. The update of the state enables the network to learn and remember long-term and short-term dependencies to ultimately obtain meaningful hidden states and output extracted features.
步骤五:每个长短期记忆网络的输出将进一步传入一个多头自注意力模型,根据序列内部的相似性,为每个元素计算相应的注意力权重。该模型初始化三个权重参数矩阵wQ,wK,wV∈Rd×d,与输入相乘分别得到Q,K,V∈Rd×d,其中Q,K,V分别表示查询(Query)矩阵、键(Key)矩阵和值(Value)矩阵。注意力模块通过Q-K-V迭代地从特征向量序列中捕获不同特征之间的依赖关系,然后获得不同注意力权重。通过多头机制,确保每个头关注的是不同的信息,这进一步增强了模型的表示能力。最终,这些注意力权重与原始长短期记忆网络的输出相结合,得到加权的输出,该输出更好地反映了序列中的各种内部依赖关系。Step 5: The output of each long short-term memory network will be further passed into a multi-head self-attention model, and the corresponding attention weight will be calculated for each element based on the similarity within the sequence. The model initializes three weight parameter matrices w Q , w K , w V ∈R d×d , and multiplies them with the input to obtain Q, K, V∈R d×d respectively, where Q, K, and V respectively represent the query (Query ) matrix, key matrix and value matrix. The attention module iteratively captures the dependencies between different features from the feature vector sequence through QKV, and then obtains different attention weights. Through the multi-head mechanism, it is ensured that each head focuses on different information, which further enhances the representation ability of the model. Finally, these attention weights are combined with the output of the original long short-term memory network to obtain a weighted output that better reflects the various internal dependencies in the sequence.
使用Softmax函数计算注意力权重:Use the Softmax function to calculate the attention weight:
其中,Q是查询矩阵,K是键矩阵,V是值矩阵,dk是键矩阵的维度,A(Q,K,V)是计算后的结果。Among them, Q is the query matrix, K is the key matrix, V is the value matrix, d k is the dimension of the key matrix, and A(Q,K,V) is the calculated result.
步骤六:将加权后的Wi-Fi和蓝牙信号通过级联的方式进行融合,从而得到一个全面和丰富的特征表示。新的、融合后的数据集包含了两个数据源的所有关键信息。Step 6: Fusion of the weighted Wi-Fi and Bluetooth signals through cascade to obtain a comprehensive and rich feature representation. The new, fused data set contains all key information from both data sources.
其中,经过多头注意力计算后,表示Wi-Fi信号的特征向量,/>表示蓝牙信号的特征向量,[·;·]表示特征级联。Among them, after calculating the multi-head attention, Represents the eigenvector of the Wi-Fi signal, /> Represents the feature vector of Bluetooth signal, [·;·] indicates feature cascade.
本发明采用循环神经网络对原始数据和融合数据进行室内定位,从而预测坐标位置。为了评估模型的性能,本发明使用欧式距离作为评价指标,衡量预测坐标与真实坐标之间的误差。欧式距离是一种衡量两点间距离的常用计算方法,能有效地反映预测值与真实值之间的差距。通过比较融合数据的定位效果与单独使用Wi-Fi和蓝牙信号的效果,可以进一步评估融合策略的优越性。实验的详细定位误差结果如表1所示。The present invention uses a recurrent neural network to perform indoor positioning on original data and fused data, thereby predicting coordinate positions. In order to evaluate the performance of the model, the present invention uses Euclidean distance as an evaluation index to measure the error between predicted coordinates and real coordinates. Euclidean distance is a commonly used calculation method to measure the distance between two points, which can effectively reflect the gap between the predicted value and the true value. By comparing the positioning effect of fused data with the effect of using Wi-Fi and Bluetooth signals alone, the superiority of the fusion strategy can be further evaluated. The detailed positioning error results of the experiment are shown in Table 1.
表1三种数据的定位误差结果Table 1 Positioning error results of three types of data
从实验结果可以看出,融合后的数据,其定位误差明显小于单一数据的定位误差,说明融合方法可以实现更高准确度的位置定位。It can be seen from the experimental results that the positioning error of the fused data is significantly smaller than the positioning error of single data, indicating that the fusion method can achieve higher accuracy positioning.
可以理解,本发明是通过一些实施例进行描述的,本领域技术人员知悉的,在不脱离本发明的精神和范围的情况下,可以对这些特征和实施例进行各种改变或等效替换。另外,在本发明的教导下,可以对这些特征和实施例进行修改以适应具体的情况及材料而不会脱离本发明的精神和范围。因此,本发明不受此处所公开的具体实施例的限制,所有落入本申请的权利要求范围内的实施例都属于本发明所保护的范围内。It is understood that the present invention has been described through some embodiments. Those skilled in the art know that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, the features and embodiments may be modified to adapt a particular situation and material to the teachings of the invention without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed here, and all embodiments falling within the scope of the claims of the present application are within the scope of protection of the present invention.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311237647.1A CN117222003A (en) | 2023-09-25 | 2023-09-25 | Wi-Fi and Bluetooth signal fusion method applied to indoor positioning |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311237647.1A CN117222003A (en) | 2023-09-25 | 2023-09-25 | Wi-Fi and Bluetooth signal fusion method applied to indoor positioning |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117222003A true CN117222003A (en) | 2023-12-12 |
Family
ID=89049254
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311237647.1A Pending CN117222003A (en) | 2023-09-25 | 2023-09-25 | Wi-Fi and Bluetooth signal fusion method applied to indoor positioning |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117222003A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118900397A (en) * | 2024-08-26 | 2024-11-05 | 天津大学合肥创新发展研究院 | A feature compensation and passive positioning method and system |
-
2023
- 2023-09-25 CN CN202311237647.1A patent/CN117222003A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118900397A (en) * | 2024-08-26 | 2024-11-05 | 天津大学合肥创新发展研究院 | A feature compensation and passive positioning method and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110012428B (en) | A WiFi-based indoor positioning method | |
| CN106714110B (en) | Wi-Fi position fingerprint map automatic construction method and system | |
| CN113077097A (en) | Air quality prediction method based on deep space-time similarity | |
| Dong et al. | A wifi fingerprint augmentation method for 3-d crowdsourced indoor positioning systems | |
| CN117849760B (en) | A laser radar point cloud data processing method | |
| CN112040405A (en) | An indoor localization method based on kernel extreme learning machine and particle filter | |
| Lian et al. | Improved Indoor positioning algorithm using KPCA and ELM | |
| CN115712847A (en) | High arch dam modal parameter automatic identification method based on strong earthquake monitoring data | |
| Jia et al. | A fingerprint-based localization algorithm based on LSTM and data expansion method for sparse samples | |
| CN119441613A (en) | Intelligent recommendation system for urban monitoring points based on spatiotemporal collaborative analysis of meteorological data | |
| CN117222003A (en) | Wi-Fi and Bluetooth signal fusion method applied to indoor positioning | |
| CN110580552B (en) | A Universal Mobile Perception and Prediction Method for Regional Environmental Information | |
| CN114679683B (en) | Indoor intelligent positioning method based on derived fingerprint migration | |
| CN116437439A (en) | Accurate indoor positioning method combining convolutional neural network and WKNN | |
| Kakisim et al. | Multi-channel convolutional neural network with attention mechanism using dual-band WiFi signals for indoor positioning systems in smart buildings | |
| CN118467857B (en) | A method and system for constructing a land use intelligent engine | |
| CN114916059A (en) | WiFi fingerprint sparse map extension method based on interval random logarithm shadow model | |
| Chen et al. | Combining random forest and graph wavenet for spatial-temporal data prediction | |
| CN118938145A (en) | A radar tracking performance estimation method based on graph neural network | |
| CN114880954A (en) | A method for evaluating landslide susceptibility based on machine learning | |
| Kässinger et al. | GreenMap: Approximated filtering towards energy-aware crowdsensing for indoor mapping | |
| KR20220147315A (en) | IoT Missing Data Imputation Management and Control in Edge Computing Environment | |
| Qi et al. | Signal recovery for incomplete ocean data via graph signal processing | |
| Ping et al. | Particle filter based time series prediction of daily sales of an online retailer | |
| CN120561665B (en) | Ecological environment restoration evaluation method based on deep learning |
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 |