Indoor wireless positioning method based on RSSI hybrid filtering and GPRM
By combining the technical means of improved quartile method, Kalman filtering, GPRM and particle swarm optimization algorithm, the problem of indoor wireless positioning is solved in complex environments, and more efficient and accurate indoor wireless positioning is achieved.
Patent Information
- Application Number
- CN202510053967.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-16
AI Technical Summary
Existing indoor wireless positioning technology is difficult to effectively adapt to environmental noise and changes in complex environments, resulting in limited positioning accuracy.
The RSSI data is filtered using a hybrid filtering algorithm combined with an improved quartile method and Kalman filtering, and a distance curve fitting is performed in combination with a Gaussian process regression model, and a weighted least squares algorithm is optimized through a particle swarm optimization algorithm to achieve indoor wireless positioning.
It improves the filtering effect and positioning accuracy of RSSI signals, can better adapt to noise and changes in complex environments, and significantly improves the accuracy of indoor wireless positioning.
Smart Images

Figure CN120018277A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wireless positioning, and relates to an indoor wireless positioning method based on RSSI hybrid filtering and GPRM. Background Art
[0002] Indoor wireless positioning technology, as an indispensable part of modern intelligent systems, has an increasingly wide range of application scenarios, from shopping mall navigation to emergency rescue, which demonstrates the importance of indoor wireless positioning technology. Although the Global Positioning System (GPS) performs well in outdoor environments, the complexity and variability of indoor environments limit the application of GPS and other traditional positioning technologies indoors. Therefore, research and development of high-precision positioning methods suitable for indoor wireless environments has become a current research hotspot.
[0003] Received Signal Strength Indication (RSSI) has become the basis of many studies due to its easy accessibility in indoor wireless positioning. However, RSSI signal strength is easily affected by environmental factors such as obstacle attenuation and multipath effects, resulting in limited positioning accuracy. In recent years, many studies have focused on how to effectively filter and correct RSSI value fluctuations to reduce the impact of environmental interference. Through the adaptive RSSI filtering method, the measured RSSI input value is automatically filtered only when it has a high level of variation, reducing the fluctuation of RSSI readings. Or the state estimation of the Kalman filter algorithm is used to smooth the RSSI value and reduce the measurement error caused by environmental noise. There is also a method based on the Dixon test method to eliminate abnormal data, and the Gaussian mean filter is used to further optimize the RSSI data according to the degree of skewness of the data; a nonlinear dual-set membership filter improves the computational efficiency and reduces the potential inaccuracy in measurement.
[0004] Although these methods have improved the stability of RSSI values to a certain extent, they still cannot effectively adapt to the challenges brought by environmental noise and changes in complex indoor environments. Summary of the invention
[0005] To solve the above problems, the present invention provides an indoor wireless positioning method based on RSSI hybrid filtering and GPRM, comprising the following steps:
[0006] S10, for the collected RSSI data, a hybrid filter combining an improved quartile method and a Kalman filter is used;
[0007] S20, obtaining RSSI training data, using a Gaussian process regression model to perform distance curve fitting, and completing the conversion from RSSI to distance value;
[0008] S30, optimizing the weighted least squares algorithm through a particle swarm optimization algorithm and obtaining a final calculation result.
[0009] Preferably, in S10, an adjustable coefficient β is introduced into the quartile method, and the formula is:
[0010] IQR=Q3-Q1 (1)
[0011] Where IQR is the interquartile range, Q1 is the first quartile, which is the value at the 25% position after all values in the data are arranged from small to large; Q3 is the third quartile, which is the value at the 75% position after all values in the data are arranged from small to large; let the upper and lower bounds of the abnormal RSSI data in the RSSI sample be RSSI ub ,RSSI lb , then the range of outliers is defined as:
[0012] RSSI lb =max(Q1-β*IQR,μ-β*σ) (4)
[0013] RSSI ub =min(Q3+β*IQR,μ-β*σ) (5)
[0014] In the formula, μ represents the average value of RSSI data, and σ represents the standard deviation. By adjusting the β parameter, the judgment criteria of outliers can be adjusted according to the data characteristics and requirements in the specific environment.
[0015] Preferably, the Kalman filter in S10 includes a prediction phase and an update phase, wherein:
[0016] Prediction stage:
[0017]
[0018] In the formula, is the state estimate at time k, predicted by the estimate at the previous time k-1; F k is the state transfer matrix, B k is the control input matrix, u k is the control input, P k|k-1 is the estimation error covariance, Q k is the process noise covariance;
[0019] Update phase:
[0020] K k =P k|k-1 H k T (H k P k|k-1 H kT +R k ) -1 (8)
[0021]
[0022] P k|k =(IK k H k ) k|k-1 (10)
[0023] In the formula, K k is the Kalman gain, H k is the observation matrix, z k is the actual observation at time k, R k is the observation noise covariance, I is the identity matrix;
[0024] Let the state transition matrix F of RSSI value be k =1, B k =0, then the state prediction formula and covariance formula are defined as:
[0025]
[0026] P k|k-1 =P k-1|k-1 +Q k (12)
[0027] in is the predicted RSSI value at time k, is the RSSI value prediction at time k-1;
[0028] In its update phase, H k can be simplified to the identity matrix, then the update equation can be rewritten as:
[0029] K k =P k|k-1 (P k|k-1 +R k ) -1 (13)
[0030]
[0031] P k|k =(1-K k H k ) k|k-1 (15).
[0032] Preferably, the Gaussian process regression model in S20 is specifically to set a regression problem, X represents the input variable, y represents the output variable, and in the Gaussian process regression framework, the distribution of the output variable y with respect to the input variable X is modeled as:
[0033] y=f(X)+ε (19)
[0034] Where f(X) is an unknown function and ε is the observation noise that follows a Gaussian distribution. Assuming f is a Gaussian process, it can be expressed as:
[0035]
[0036] Where m(X) is the mean function; k(X,X') is the covariance function, which is used to describe the similarity between any two data points X and X';
[0037] By using RSSI signal strength as the input X of training data and the corresponding distance as the output y, GPRM is used for training. After the training is completed, the model predicts the new RSSI signal strength RSSI i The corresponding distance d i , to achieve the curve fitting of the relationship between signal and distance, the formula is expressed as:
[0038]
[0039] Preferably, the wireless positioning method based on the weighted least squares algorithm in S30 is specifically:
[0040] Assume that there are n reference points whose positions are known, namely (x1,y1),(x2,y2),...,(x n ,y n ), the coordinates of the unknown point are marked as (x, y), and the distance from the unknown point to the i-th reference point is d i , then there is the following relationship:
[0041]
[0042] Since there are errors in actual measurement, the weighted least squares algorithm is used to solve the optimal position of the unknown point so that the error between the calculated distance and the measured distance is minimized:
[0043] First, square the distance formula:
[0044] d i 2 =(xx i ) 2 +(yy i ) 2 (twenty three)
[0045] Assuming the error is δ, the sum of squares of the minimized error is:
[0046]
[0047] It is linearized and solved using the least squares method by the following steps:
[0048] Linearization:
[0049] Introduce a new variable b i :
[0050] b i =d i 2 -x i 2 -y i 2 (25)
[0051] Rearrange to get:
[0052] x 2 +y 2 -2xx i -2yy i =b i (26)
[0053] Convert to matrix form and introduce matrix A and vector B:
[0054]
[0055] The weighted least squares solution introduces the weight matrix W, which can be a diagonal matrix. The diagonal elements are the weights of each measurement value. The solution is:
[0056] X=(A T WA) -1 A T W.B. (30).
[0057] Preferably, the positioning accuracy is further improved in S30 by using a particle swarm optimization algorithm, including the following steps:
[0058] S31, initialize the particle swarm, assuming that the possible solution of the particle is (x, y);
[0059] S32, calculating the fitness value of each particle;
[0060] S33, updating the individual optimal value and global optimal value of the particle;
[0061] S34, update the velocity and position of the particle;
[0062] S35, repeat S32-S34 until the termination condition is reached.
[0063] Preferably, the improved particle swarm optimization algorithm is adopted in S31, comprising the following steps:
[0064] S311, the dynamic inertia weight w is introduced to gradually decrease linearly during the iteration process, which helps to maintain a wide search range in the early stage of iteration and focus on local detailed search in the later stage.
[0065] S312, speed limit: To prevent particles from moving too fast and missing the optimal solution, an upper limit is set on the particle speed;
[0066] S313, boundary processing: when the particle position exceeds the predefined search space, pull it back to the boundary position;
[0067] S314, initialization strategy: use the result of the weighted least squares algorithm as part of the initial particle swarm to speed up the convergence.
[0068] The beneficial effects of the present invention include at least:
[0069] (1) In view of the shortcomings of existing research, a hybrid filtering algorithm based on the improved quartile method and the Kalman filter algorithm is proposed for RSSI filtering. This hybrid filtering algorithm combines the ability of the quartile method to remove outliers and the advantage of the Kalman filter to smooth data. It can not only effectively process extreme values in RSSI signals, but also dynamically adjust the noise suppression strength, thereby improving the filtering effect, adaptability and accuracy.
[0070] (2) In view of the problem that the traditional RSSI ranging model has poor effect when performing curve fitting and is difficult to effectively capture the complex nonlinear relationship and uncertainty in the data, resulting in low positioning accuracy, the present invention proposes a Gaussian process regression model (GPRM) to perform curve fitting on the RSSI after filtering, which can better capture the variation law of RSSI signals at different distances, thereby improving the positioning accuracy. Finally, the weighted least squares algorithm optimized by the particle swarm algorithm is used to realize indoor wireless positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a flow chart of the steps of the indoor wireless positioning method based on RSSI hybrid filtering and GPRM of the present invention;
[0072] Figure 2 A hybrid filtering result diagram of RSSI data samples of an indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to a specific embodiment of the present invention;
[0073] Figure 3 A distance curve diagram based on GPRM fitting of an indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to a specific embodiment of the present invention;
[0074] Figure 4 A comparison chart of positioning results of an indoor wireless positioning method based on RSSI hybrid filtering and GPRM and different algorithms according to a specific embodiment of the present invention;
[0075] Figure 5 It is a comparison diagram of the local enlarged positioning results of the indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to a specific embodiment of the present invention;
[0076] Figure 6 This is a comparison chart of the errors of the indoor wireless positioning method based on RSSI hybrid filtering and GPRM and different algorithms according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0078] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.
[0079] Received Signal Strength Indication (RSSI);
[0080] Gaussian Process Regression Model (GPRM);
[0081] Weighted Least Squares Method (WLSM);
[0082] Particle swarm optimization (PSO)
[0083] The main process of the present invention is as follows Figure 1 As shown, the following steps are included:
[0084] S10, for the collected RSSI data, a hybrid filter combining an improved quartile method and a Kalman filter is used;
[0085] S20, obtaining RSSI training data, using a Gaussian process regression model to perform distance curve fitting, and completing the conversion from RSSI to distance value;
[0086] S30, optimizing the weighted least squares algorithm through a particle swarm optimization algorithm and obtaining a final calculation result.
[0087] The initial data input consists of two main parts: collecting RSSI data samples and using RSSI training samples. During RSSI data collection, the system uses an adjustable coefficient β for parameter adjustment, and then processes the data using the improved quartile method. The processed data is smoothed using a Kalman filter. At the same time, the system uses the RSSI training samples to train the GPRM model. The two processed data streams are combined in the GPRM curve fitting process to generate a predicted distance value d. This distance value is used in the initialization process of the WLS.
[0088] After initialization, the system enters the particle swarm optimization loop: first, the particle swarm is initialized, and then the dynamic inertia weight calculation is performed. The system calculates the fitness value and updates the position and speed of the particle accordingly. In each iteration, the system performs speed limit and boundary judgment, and checks whether the number of iterations is reached or the accuracy requirements are met. If the conditions are met, the system outputs the coordinates of the positioning point as the final result; if not, it returns to continue the dynamic inertia weight calculation until the termination condition is met.
[0089] Due to the complexity of wireless signal propagation and the variability of the environment, RSSI measurements are often affected by multipath attenuation, interference and noise, which can cause the obtained data to contain a certain degree of outliers or noise. Therefore, filtering the RSSI data to remove outliers is of great significance for improving the accuracy of signal quality assessment and enhancing the accuracy and efficiency of subsequent data processing. In the present invention, a hybrid filtering algorithm composed of an improved quartile method and a Kalman filtering algorithm is used to implement the filtering of RSSI data. In S10, an adjustable coefficient β is introduced in the quartile method, and the formula is:
[0090] IQR=Q3-Q1 (1)
[0091] Where IQR is the interquartile range, Q1 is the first quartile, which is the value at the 25% position after all values in the data are arranged from small to large; Q3 is the third quartile, which is the value at the 75% position after all values in the data are arranged from small to large; let the upper and lower bounds of the abnormal RSSI data in the RSSI sample be RSSI ub ,RSSI lb , then the range of outliers is defined as:
[0092] RSSI lb =max(Q1-β*IQR,μ-β*σ) (4)
[0093] RSSIub =min(Q3+β*IQR,μ-β*σ) (5)
[0094] In the formula, μ represents the average value of RSSI data, and σ represents the standard deviation. By adjusting the β parameter, the judgment criteria of outliers can be adjusted according to the data characteristics and requirements in the specific environment. After filtering the RSSI data using this algorithm, outliers caused by environmental noise and electronic interference can be effectively removed, providing a more accurate and reliable data basis for subsequent data processing and analysis.
[0095] In order to further optimize the smoothness of the data and improve the accuracy of wireless signal processing, Kalman filtering is applied on this basis. Kalman filtering is an efficient recursive filter that can estimate the state of a dynamic system from a series of noisy measurements. Kalman filtering is based on the state space representation of a linear dynamic system. The state of the system can be predicted by a linear equation, and the observation (measurement) is also a linear function of the system state. The Kalman filter in S10 includes a prediction phase and an update phase, in which,
[0096] Prediction stage:
[0097]
[0098] In the formula, is the state estimate at time k, predicted by the estimate at the previous time k-1; F k is the state transfer matrix, B k is the control input matrix, u k is the control input, P k|k-1 is the estimation error covariance, Q k is the process noise covariance;
[0099] Update phase:
[0100] K k =P k|k-1 H k T (H k P k|k-1 H k T +R k ) -1 (8)
[0101]
[0102] P k|k =(IK k H k ) k|k-1 (10)
[0103] In the formula, K kis the Kalman gain, H k is the observation matrix, z k is the actual observation at time k, R k is the observation noise covariance, I is the identity matrix;
[0104] Let the state transition matrix F of RSSI value be k =1, B k =0, then the state prediction formula and covariance formula are defined as:
[0105]
[0106] P k|k-1 =P k-1|k-1 +Q k (12)
[0107] in is the predicted RSSI value at time k, is the RSSI value prediction at time k-1;
[0108] In its update phase, H k can be simplified to the identity matrix, then the update equation can be rewritten as:
[0109] K k =P k|k-1 (P k|k-1 +R k ) -1 (13)
[0110]
[0111] P k|k =(1-K k H k ) k|k-1 (15).
[0112] Based on the above formula, by treating the RSSI value after the improved quartile method filtering as the observation of the system, the Kalman filter can continuously predict and update the RSSI value, thereby smoothing the RSSI data fluctuation.
[0113] The Gaussian process regression model in S20 is specifically a regression problem, where X represents the input variable and y represents the output variable. In the Gaussian process regression framework, the distribution of the output variable y with respect to the input variable X is modeled as:
[0114] y=f(X)+ε (19)
[0115] Where f(X) is an unknown function and ε is the observation noise that follows a Gaussian distribution. Assuming f is a Gaussian process, it can be expressed as:
[0116]
[0117] Where m(X) is the mean function; k(X,X') is the covariance function, which is used to describe the similarity between any two data points X and X'; the choice of covariance function has an important impact on the performance of the model.
[0118] By using RSSI signal strength as the input X of training data and the corresponding distance as the output y, GPRM is used for training. After the training is completed, the model predicts the new RSSI signal strength RSSI i The corresponding distance d i , to achieve the curve fitting of the relationship between signal and distance, the formula is expressed as:
[0119]
[0120] The wireless positioning method based on the weighted least squares algorithm in S30 is specifically:
[0121] Assume that there are n reference points whose positions are known, namely (x1,y1),(x2,y2),...,(x n ,y n ), the coordinates of the unknown point are marked as (x, y), and the distance from the unknown point to the i-th reference point is d i , then there is the following relationship:
[0122]
[0123] Since there are errors in actual measurement, the weighted least squares algorithm is used to solve the optimal position of the unknown point so that the error between the calculated distance and the measured distance is minimized:
[0124] First, square the distance formula:
[0125] d i 2 =(xx i ) 2 +(yy i ) 2 (twenty three)
[0126] Assuming the error is δ, the sum of squares of the minimized error is:
[0127]
[0128] It is linearized and solved using the least squares method by the following steps:
[0129] Linearization:
[0130] Introduce a new variable b i :
[0131] b i =d i 2 -x i 2 -y i 2 (25)
[0132] Rearrange to get:
[0133] x 2 +y 2 -2xx i -2yy i =b i (26)
[0134] Convert to matrix form and introduce matrix A and vector B:
[0135]
[0136] The weighted least squares solution introduces the weight matrix W, which can be a diagonal matrix. The diagonal elements are the weights of each measurement value. The solution is:
[0137] X=(A T WA) -1 A T W.B. (30).
[0138] In practical applications, the weight is usually inversely proportional to the measured distance, so the weight factor is set in the present invention. By introducing the weight, the WLS algorithm can better handle the situation of uneven measurement errors and can provide a more accurate position estimate than the ordinary LS algorithm. Although the WLS algorithm performs well in many cases, it may still fall into a local optimal solution. In order to further improve the positioning accuracy, the present invention introduces the PSO algorithm to optimize the results of WLSM.
[0139] In S30, the positioning accuracy is further improved by using a particle swarm optimization algorithm, including the following steps:
[0140] S31, initialize the particle swarm, assuming that the possible solution of the particle is (x, y);
[0141] S32, calculating the fitness value of each particle;
[0142] S33, updating the individual optimal value and global optimal value of the particle;
[0143] S34, update the velocity and position of the particle;
[0144] S35, repeat S32-S34 until the termination condition is reached.
[0145] In a specific embodiment, the speed and position update formulas in S34 are:
[0146] v t+1 =w·v t +c1·r1·(p best -x t )+c2·r2·(g best -x t ) (31)
[0147] x t+1 =x t +v t+1 (32)
[0148] Where w is the inertia weight, c1 and c2 are learning factors, and p best is the individual optimal position of the particle, g best is the global optimal position of the population, r1 and r2 are random numbers between [0,1]. t+1 and x t Respectively represent the particle positions after and before the update. t+1 The updated speed.
[0149] In the iterative optimization process using the PSO algorithm, the present invention selects the weighted sum of squares of the residuals to measure the fitness of the particles. For the i-th particle, its fitness function f(p i ) can be expressed as
[0150]
[0151] p i =(x i ,y i ) (34)
[0152] In the formula, p i is the coordinate of the ith particle, M is the number of anchor nodes, d j is the actual measured distance from the jth anchor node to the target point, w j is the weight associated with the jth anchor node.
[0153] The improved particle swarm optimization algorithm is adopted in S31, which includes the following steps:
[0154] S311, the dynamic inertia weight w is introduced to gradually decrease linearly during the iteration process, which helps to maintain a wide search range in the early stage of iteration and focus on local detailed search in the later stage.
[0155] S312, speed limit: To prevent particles from moving too fast and missing the optimal solution, an upper limit is set on the particle speed;
[0156] S313, boundary processing: when the particle position exceeds the predefined search space, pull it back to the boundary position;
[0157] S314, initialization strategy: use the result of the weighted least squares algorithm as part of the initial particle swarm to speed up the convergence.
[0158] Experimental results verify:
[0159] The present invention uses the MATLAB2023a experimental platform for simulation testing, and sets a square area with a length and width of about 10 meters for testing the positioning algorithm. Set 4 RSSI receiving reference points, which are respectively distributed at the edges of the square area to receive the RSSI signal strength of the unknown point. Randomly generate 5 unknown points in the positioning area to evaluate and verify the performance of the algorithm. When collecting RSSI, the reference point is collected once at intervals, and a total of 100 RSSI values are collected to ensure the reliability of the data.
[0160] Verification results and error analysis: The RSSI initial value collected from the reference point to one of the unknown points and the RSSI data after using the improved quartile method and Kalman filtering are shown in Figure 2 As shown in Figure 2 As can be seen from the figure, the initial RSSI data will fluctuate to a certain extent due to the presence of environmental noise. There are 5 measurements with abnormally obvious offsets due to the influence of abnormal noise. Figure 2 The RSSI values are marked with a cross. After preliminary filtering using the improved quartile method, these obviously abnormal RSSI data have been eliminated, and the overall RSSI value remains between -80db and -70db. After hybrid filtering using the Kalman filter algorithm, the RSSI signal of a single test point has become smooth, and the RSSI strength value is around -73db, achieving a relatively satisfactory filtering effect.
[0161] For the RSSI data after hybrid filtering, the present invention uses averaging processing and uses the Gaussian process regression model to perform curve fitting to transform the RSSI value after filtering into a distance estimation value. The curve fitted by the Gaussian process regression model is as follows: Figure 3 As shown. Figure 3 As can be seen in the figure, after the input of RSSI training data, the Gaussian process regression model fits an RSSI-d curve. After obtaining the RSSI value at the unknown distance point, the distance to the location point can be solved. Thus, the conversion from RSSI value to distance value is realized.
[0162] In the positioning experiment, four anchor nodes are placed in the positioning area to measure the RSSI values of unknown points, and their coordinates are (0, 0), (10, 0), (0, 10), and (10, 10). Five unknown points are randomly generated to verify the performance of each algorithm. After the anchor nodes collect the RSSI data of each unknown point, they are mixed filtered and then fitted with the Gaussian process regression model. After that, they are substituted into the traditional least squares algorithm, the weighted least squares algorithm, and the weighted least squares algorithm optimized by PSO for position estimation and coordinate positioning. The positioning results of each algorithm are shown in the figure below. Figure 4 As shown in the figure, the local enlarged view of the positioning effect and the positioning error are shown in Figure 5 As shown. Figure 4 and Figure 5 It can be seen that the traditional LS algorithm has the largest error in estimating the coordinates of the five unknown points, followed by the traditional WLS algorithm, while the coordinates estimated by the PSO-WLS algorithm are closest to the true value, and the positioning errors of the five unknown points are the smallest. In other words, PSO-WLS has the best positioning accuracy.
[0163] The real coordinates of the five unknown points and the estimated coordinate data after positioning by each algorithm are shown in Table 1. It can also be seen from Table 1 that the positioning algorithm based on PSO-WLS has the highest positioning accuracy, which further verifies the superiority of this algorithm.
[0164] Table 1 Comparison of positioning coordinates of different algorithms (meters)
[0165]
[0166] The present invention uses the sum of squared errors (SSE) and root mean square error (RMSE) to evaluate the error size of different positioning algorithms, and their respective calculation formulas are as follows:
[0167]
[0168] Among them, is the actual value of the ith sample, is the predicted value of the ith sample, and is the total number of samples.
[0169] The actual error of each positioning algorithm is as follows: Figure 6 As shown in the figure, it can be seen that the SSE and RMSE of the PSO-WLS algorithm are 0.5806 and 0.3408 respectively. Compared with the traditional LS method, the SSE is reduced by about 78% and the RMSE is reduced by about 53%; compared with the WLS method, the SSE is reduced by about 53% and the RMSE is reduced by about 31%. This shows that the PSO-WLS algorithm after PSO optimization has indeed achieved positive results in positioning accuracy, and provides a new idea for further improving the positioning accuracy performance of wireless positioning systems.
[0170] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An indoor wireless positioning method based on RSSI hybrid filtering and GPRM, characterized in that: The following steps are involved: S10, for the collected RSSI data, a hybrid filter combining an improved quartile method and a Kalman filter is used; S20, obtaining RSSI training data, using a Gaussian process regression model to perform distance curve fitting, and completing the conversion from RSSI to distance value; S30, optimizing the weighted least squares algorithm through a particle swarm optimization algorithm and obtaining a final calculation result.
2. According to claim 1, a method for indoor wireless positioning based on RSSI hybrid filtering and GPRM, characterized in that: In S10, an adjustable coefficient β is introduced into the quartile method, and the formula is: IQR=Q3-Q1 (1) Where IQR is the interquartile range, Q1 is the first quartile, which is the value at the 25% position after all values in the data are arranged from small to large; Q3 is the third quartile, which is the value at the 75% position after all values in the data are arranged from small to large; let the upper and lower bounds of the abnormal RSSI data in the RSSI sample be RSSI ub ,RSSI lb , then the range of outliers is defined as: RSSI lb =max(Q1-β*IQR,μ-β*σ) (4) RSSI ub =min(Q3+β*IQR,μ-β*σ) (5) In the formula, μ represents the average value of RSSI data, and σ represents the standard deviation. By adjusting the β parameter, the judgment criteria of outliers can be adjusted according to the data characteristics and requirements in the specific environment.
3. The indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to claim 1 is characterized in that: The Kalman filter in S10 includes a prediction phase and an update phase, wherein: Prediction stage: P k|k-1 =F k P k-1|k-1 F k T +Q k (7) In the formula, is the state estimate at time k, predicted by the estimate at the previous time k-1; F k is the state transfer matrix, B k is the control input matrix, u k is the control input, P k|k-1 is the estimation error covariance, Q k is the process noise covariance; Update phase: K k =P k|k-1 H k T (H k P k|k-1 H k T +R k ) -1 (8) P k|k =(I-K k H k )P k|k-1 (10) In the formula, K k is the Kalman gain, H k is the observation matrix, z k is the actual observation at time k, R k is the observation noise covariance, I is the identity matrix; Let the state transition matrix F of RSSI value be k =1, B k =0, then the state prediction formula and covariance formula are defined as: P k|k-1 =P k-1|k-1 +Q k (12) in is the predicted RSSI value at time k, is the RSSI value prediction at time k-1; In its update phase, H k can be simplified to the identity matrix, then the update equation can be rewritten as: K k =P k|k-1 (P k|k-1 +R k ) -1 (13) P k|k =(1-K k H k )P k|k-1 (15)。 4. The indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to claim 1, characterized in that: The Gaussian process regression model in S20 is specifically to assume a regression problem, where X represents the input variable and y represents the output variable. In the Gaussian process regression framework, the distribution of the output variable y with respect to the input variable X is modeled as: y=f(X)+ε (19) Where f(X) is an unknown function and ε is the observation noise that follows a Gaussian distribution. Assuming f is a Gaussian process, it can be expressed as: Where m(X) is the mean function; k(X,X') is the covariance function, which is used to describe the similarity between any two data points X and X'; By using RSSI signal strength as the input X of training data and the corresponding distance as the output y, GPRM is used for training. After the training is completed, the model predicts the new RSSI signal strength RSSI i The corresponding distance d i , to achieve the curve fitting of the relationship between signal and distance, the formula is expressed as:
5. The indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to claim 1, characterized in that: The wireless positioning method based on the weighted least squares algorithm in S30 is specifically: Assume that there are n reference points whose positions are known, namely (x1,y1),(x2,y2),...,(x n ,y n ), the coordinates of the unknown point are marked as (x, y), and the distance from the unknown point to the i-th reference point is d i , then there is the following relationship: Since there are errors in actual measurement, the weighted least squares algorithm is used to solve the optimal position of the unknown point so that the error between the calculated distance and the measured distance is minimized: First, square the distance formula: d i 2 =(x-x i ) 2 +(y-y i ) 2 (23) Assuming the error is δ, the sum of squares of the minimized error is: It is linearized and solved using the least squares method by the following steps: Linearization: Introduce a new variable b i : b i =d i 2 -x i 2 -y i 2 (25) Rearrange to get: x 2 +y 2 -2xx i -2yy i =b i (26) Convert to matrix form and introduce matrix A and vector B: The weighted least squares solution introduces the weight matrix W, which can be a diagonal matrix. The diagonal elements are the weights of each measurement value. The solution is: X=(A T WA) -1 A T WB (30).
6. The indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to claim 5, characterized in that: In S30, the positioning accuracy is further improved by using a particle swarm optimization algorithm. The following steps are involved: S31, initialize the particle swarm, assuming that the possible solution of the particle is (x, y); S32, calculating the fitness value of each particle; S33, updating the individual optimal value and global optimal value of the particle; S34, update the velocity and position of the particle; S35, repeat S32-S34 until the termination condition is reached.
7. The indoor wireless positioning method based on RSSI hybrid filtering and GPRM according to claim 6, characterized in that: The improved particle swarm optimization algorithm is adopted in S31, comprising the following steps: S311, the dynamic inertia weight w is introduced to gradually decrease linearly during the iteration process, which helps to maintain a wide search range in the early stage of iteration and focus on local detailed search in the later stage. S312, speed limit: To prevent particles from moving too fast and missing the optimal solution, an upper limit is set on the particle speed; S313, boundary processing: when the particle position exceeds the predefined search space, pull it back to the boundary position; S314, initialization strategy: use the result of the weighted least squares algorithm as part of the initial particle swarm to speed up the convergence.