Indoor Positioning Method and System Based on Residual Connection and Bidirectional Gated Recurrent Unit

By constructing a positioning model based on residual connection and bidirectional gated cycle unit, the problem of error processing in UWB indoor positioning is solved, and high-precision indoor positioning is achieved.

CN117979417BActive Publication Date: 2025-07-11HENAN POLYTECHNIC UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410124138.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2025-07-11
Estimated Expiration
2044-01-30

AI Technical Summary

Technical Problem

When facing complex indoor environments, the existing UWB indoor positioning technology cannot effectively deal with random errors and non-sight line-of-view errors caused by multiple interference factors, resulting in low positioning accuracy.

Method used

The positioning method based on residual connection and bidirectional gating cycle unit is adopted. By constructing a positioning model, the timing characteristics of UWB ranging information are processed using residual connections, and the bidirectional gating cycle unit is used to process past and future information, combining L2 regularization and Adam optimizer to train the model to reduce errors.

Benefits of technology

The average error in three-dimensional positioning is achieved is 12.7cm and the average error in two-dimensional positioning is 6.8cm, which significantly improves the accuracy of indoor positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117979417B_ABST
    Figure CN117979417B_ABST
Patent Text Reader

Abstract

The present invention discloses an indoor positioning method and system based on residual connection and bidirectional gated recurrent unit. The method includes the following steps: preset a positioning area and deploy ultra-wideband base stations, and collect ranging information based on the ultra-wideband base stations; obtain a time series data set based on the ranging information, and divide the time series data set into a training set and a test set; construct a positioning model based on residual connection and bidirectional gated recurrent unit; train the positioning model based on the training set, and test the trained positioning model based on the test set; complete indoor positioning based on the tested positioning model. The present invention can effectively process non-line-of-sight errors and has good application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of UWB (Ultra Wide Band) positioning, and particularly relates to an indoor positioning method and system based on residual connection and bidirectional gated recurrent unit. Background Art

[0002] In today's information age, people's demand for location information is increasing rapidly. Outdoors, the Global Navigation Satellite System (GNSS) can provide us with accurate location services. However, the signals of GNSS will be blocked by walls and cannot be directly used for indoor positioning. Therefore, new technologies need to be explored to provide location services indoors. Compared with outdoor positioning, indoor positioning faces more complex challenges because the indoor environment is more complex. Usually, there are various types of signal interference and obstacles such as walls in the indoor environment, which will greatly reduce the effectiveness of many positioning technologies. For example, WIFI positioning, Bluetooth positioning, radio frequency positioning, etc. These positioning technologies often cannot provide accurate positioning services in the face of a complex indoor environment. Among many positioning technologies, the UWB positioning technology has excellent development prospects in the field of indoor positioning due to its high ranging accuracy, good penetration, fast transmission rate, good ductility, etc.

[0003] At present, there are various positioning algorithms for UWB technology. The Received Signal Strength Indication (RSSI) positioning uses the RSSI strength to determine location information and requires a fingerprint database to be established in advance. The advantage is that it is simple and easy to implement and does not require complex hardware support. However, the disadvantages are that establishing the fingerprint database is time-consuming and it is easily affected by signal attenuation and multipath effects, and usually the positioning accuracy is relatively low. The Angle of Arrival (AOA) positioning determines the location by measuring the incident angle of the signal arriving at the receiver. The advantage is that it does not require precise clock synchronization and is suitable for relatively open environments. The disadvantage is that it is easily affected by the propagation environment and obstacles and is very sensitive to multipath propagation. The Time of Arrival (TOA) positioning determines the distance by measuring the time required for the signal to travel from the transmitter to the receiver. The Time Difference of Arrival (TDOA) positioning determines the location by measuring the difference in the arrival times of the signal at different receivers and is commonly used in multi-base station scenarios. The disadvantage is that the error is large in a multipath propagation environment and multiple base stations need to work in coordination.

[0004] However, no matter which positioning algorithm is used, it cannot cope with the complex indoor environment alone. The fundamental reason is that there are too many interference factors in the indoor environment, which will make the UWB measurement data contain various random errors and non-line-of-sight (NLOS) errors. The reasons for the occurrence of NLOS errors are complex, and the errors caused vary according to the environment. The above algorithms cannot effectively handle NLOS errors. Deep learning can suppress and correct the errors contained in UWB data, making the positioning result more accurate. Summary of the Invention

[0005] The present invention aims to solve the deficiencies of the prior art and proposes an indoor positioning method and system based on residual connection and bidirectional gated recurrent unit to weaken errors and obtain accurate position information.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] An indoor positioning method based on residual connection and bidirectional gated recurrent unit, comprising the following steps:

[0008] Preset a positioning area and install ultra-wideband base stations, and collect ranging information based on the ultra-wideband base stations;

[0009] Based on the ranging information, obtain a time series dataset; and divide the time series dataset into a training set and a test set;

[0010] Construct a positioning model based on residual connection and bidirectional gated recurrent unit;

[0011] Train the positioning model based on the training set, and test the trained positioning model based on the test set; complete indoor positioning based on the tested positioning model.

[0012] Preferably, the data format of the time series dataset is as follows:

[0013] (D 1 AG 、D 1 BG 、D 1 CG 、D 1 DG 、D 1 EG 、D 1 FG ),...,(D 10 AG 、D 10 BG 、D 10 CG 、D 10 DG 、D10 EG , D 10 FG )|(X, Y, Z),

[0014] In the formula, D i AG , D i BG , D i CG , D i DG , D i EG , D i FG respectively represent the distances from base stations A, B, C, D, E, and F to the observation tag G at the i-th moment, where the value of i ranges from 1 to 10; X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment.

[0015] Preferably, the method for constructing the positioning model is as follows:

[0016] Based on the data format of the time series dataset, preset the input end and output end of the positioning model;

[0017] Preset the number of layers of the forward gated recurrent unit and the backward gated recurrent unit and the number of hidden layer nodes to obtain the bidirectional gated recurrent unit;

[0018] Adopt residual connection to connect the input end of the positioning model with the output end of the bidirectional gated recurrent unit;

[0019] Based on the double-layer fully connected layer, connect the output end of the bidirectional gated recurrent unit with the output end of the positioning model to complete the construction of the positioning model.

[0020] Preferably, the method for training the positioning model is as follows:

[0021] Based on the weight matrix and the true coordinates of the observation tag, establish an mse loss function with L2 regularization; where the expression of the mse loss function is as follows:

[0022]

[0023] In the formula, avg is to calculate the average, X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment, X G , Y G , Z G are the calculated coordinates of the observation tag G, λ is the regularization strength, and i, j represent the rows and columns of the weight matrix W;

[0024] Based on the training set, the preset learning rate, the Adam optimizer, and the mse loss function, complete the training of the positioning model.

[0025] The present invention also provides an indoor positioning system based on residual connection and bidirectional gated recurrent unit for implementing the indoor positioning method, including:

[0026] A data acquisition module, configured to preset a positioning area and deploy ultra-wideband base stations, and collect ranging information based on the ultra-wideband base stations;

[0027] A data set construction module, configured to obtain a time series data set based on the ranging information; and divide the time series data set into a training set and a test set;

[0028] A model construction module, configured to construct a positioning model based on residual connection and bidirectional gated recurrent unit;

[0029] An indoor positioning module, configured to train the positioning model based on the training set, and test the trained positioning model based on the test set; and complete indoor positioning based on the tested positioning model.

[0030] Preferably, the data set construction module includes:

[0031] A time series data set acquisition unit, configured to obtain a time series data set based on the ranging information; wherein, the data format of the time series data set is as follows:

[0032] (D 1 AG 、D 1 BG 、D 1 CG 、D 1 DG 、D 1 EG 、D 1 FG ),...,(D 10 AG 、D 10 BG 、D 10 CG 、D 10 DG 、D 10 EG 、D 10 FG )|(X,Y,Z),

[0033] In the formula, D i AG , D i BG , D iCG , D i DG , D i EG , D i FG respectively represent the distances from base stations A, B, C, D, E, and F to the observation tag G at the i-th moment, where the value of i ranges from 1 to 10; X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment;

[0034] A dataset partitioning unit for partitioning the time-series dataset into a training set and a test set.

[0035] Preferably, the model construction module includes:

[0036] A preset unit for presetting the input end and output end of the positioning model based on the data format of the time-series dataset;

[0037] A bidirectional gated recurrent unit construction unit for presetting the number of layers and the number of hidden layer nodes of the forward gated recurrent unit and the backward gated recurrent unit to obtain the bidirectional gated recurrent unit;

[0038] A residual connection unit for connecting the input end of the positioning model to the output end of the bidirectional gated recurrent unit by using residual connection;

[0039] A fully connected unit for connecting the output end of the bidirectional gated recurrent unit to the output end of the positioning model based on a double-layer fully connected layer to complete the construction of the positioning model.

[0040] Preferably, the indoor positioning module includes:

[0041] A training unit for establishing an mse loss function with L2 regularization based on the weight matrix and the true coordinates of the observation tag; completing the training of the positioning model based on the training set, the preset learning rate, the Adam optimizer, and the mse loss function; where the expression of the mse loss function is as follows:

[0042]

[0043] In the formula, avg is to calculate the average, X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment, X G , Y G , Z G are the calculated coordinates of the observation tag G, λ is the regularization strength, and i, j represent the rows and columns of the weight matrix W;

[0044] A testing unit for testing the trained indoor positioning model based on the test set;

[0045] An indoor positioning unit, configured to complete indoor positioning based on the tested positioning model.

[0046] Compared with the prior art, the beneficial effects of the present invention are as follows: preset a positioning area and install ultra-wideband base stations, collect ranging information based on the ultra-wideband base stations; obtain a time series dataset based on the ranging information; and divide the time series dataset into a training set and a test set; construct a positioning model based on residual connections and bidirectional gated recurrent units. The present invention proposes to establish a bidirectional gated recurrent unit to process the past and future time series features of UWB ranging information, and rely on residual connections to compensate for the lost features during data extraction. Train the positioning model based on the training set, and test the trained positioning model based on the test set; complete indoor positioning based on the tested positioning model. According to the method of the present invention to deal with the random and non-line-of-sight errors encountered in UWB ranging, experiments finally show that the average error of this model is 12.7 cm in three-dimensional positioning and 6.8 cm in two-dimensional positioning. The results show that the present invention can effectively handle non-line-of-sight errors and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the present invention, the following briefly introduces the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0048] Figure 1 Flowchart of the indoor positioning method based on residual connections and bidirectional gated recurrent units according to the embodiment of the present invention;

[0049] Figure 2 Indoor positioning field map based on residual connections and bidirectional gated recurrent units according to the embodiment of the present invention;

[0050] Figure 3 Structural diagram of the positioning model according to the embodiment of the present invention;

[0051] Figure 4 Three-dimensional error analysis diagram according to the embodiment of the present invention;

[0052] Figure 5 Two-dimensional error analysis diagram according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0054] To make the above objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] Embodiment 1

[0056] Deep learning can provide great assistance for UWB positioning. Deep learning can rely on its powerful feature extraction ability to extract important features from UWB data, such as time delay, amplitude, multipath, etc. Deep learning can also suppress and correct the errors contained in UWB data to make the positioning result more accurate.

[0057] As Figure 1 shown, an indoor positioning method based on residual connection and bidirectional gated recurrent unit includes the following steps:

[0058] Preset a positioning area and install ultra-wideband base stations. Based on the ultra-wideband base stations, collect ranging information; when the present invention collects a data set, it relies on a total station to obtain coordinates, so only static measurement can be used, but after the model parameters are determined, it can be applied in a dynamic scenario. In order to verify the positioning accuracy of the algorithm under non-line-of-sight conditions, when performing distance measurement, personnel will block the UWB device. In this way, the obtained UWB ranging information will contain NLOS errors, which is more in line with the actual application situation.

[0059] Based on the ranging information, obtain a time series data set; and divide the time series data set into a training set and a test set;

[0060] Specifically, select a positioning area to install UWB base stations, select a suitable base station as the main base station to connect to a computer to collect data, and make the collected data into a time series data set.

[0061] A further embodiment is that the data format of the time series data set is as follows:

[0062] (D 1 AG 、D 1 BG 、D 1 CG 、D 1 DG 、D 1 EG 、D 1 FG ),...,(D 10 AG 、D 10 BG 、D 10 CG 、D 10 DG 、D10 EG , D 10 FG )|(X, Y, Z)(1)

[0063] where D i AG , D i BG , D i CG , D i DG , D i EG , D i FG respectively represent the distances from base stations A, B, C, D, E, and F to the observation tag G at the i-th moment, where the value range of i is 1 to 10; X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment. Specifically, in this embodiment, base stations are arranged at appropriate positions in the required site. The required number of base stations is 6, which are respectively denoted as base stations A, B, C, D, E, and F. Select base station A as the main base station, and connect a computer to collect data. Select an appropriate position to set up a total station to observe the true position of tag G, and the position of the tag randomly appears in the positioning scene.

[0064] Based on residual connection and bidirectional gated recurrent unit, construct a positioning model;

[0065] A further implementation manner lies in that the method for constructing the positioning model is:

[0066] Based on the data format of the time series dataset, preset the input end and output end of the positioning model; in this embodiment, according to the style of the dataset, the size of the input end is 6 * 10, and the size of the output end is 1 * 3.

[0067] Preset the number of layers of the forward gated recurrent unit and the backward gated recurrent unit and the number of hidden layer nodes to obtain a bidirectional gated recurrent unit; in this embodiment, define the number of nodes in the hidden layer of the forward gated recurrent unit as 128, and define the number of nodes in the hidden layer of the backward gated recurrent unit as 64.

[0068] Adopt residual connection to connect the input end of the positioning model with the output end of the bidirectional gated recurrent unit;

[0069] Based on the double-layer fully connected layer, connect the output end of the bidirectional gated recurrent unit with the output end of the positioning model to complete the construction of the positioning model.

[0070] Regarding the bidirectional gated recurrent unit: It is composed of a forward and a backward gated recurrent unit. The gated recurrent unit integrates the input gate and the forget gate of the long short-term memory neural network into an update gate. The gated recurrent unit includes an update gate, a reset gate, a candidate hidden state, and a new hidden state.

[0071] Update gate calculation:

[0072] z t = σ(W z ·[h t-1 , x t + b z ) (2)

[0073] Where z t represents the update gate, which is used to control the degree of information integration. W z represents the weight matrix of the update gate, h t-1 represents the hidden state of the previous time step, x t represents the input of the current time step, b z represents the bias of the update gate, and σ represents the sigmoid activation function.

[0074] Reset gate calculation:

[0075] r t = σ(W r ·[h t-1 , x t + b r ) (3)

[0076] Where r t represents the reset gate, which is used to control the degree of forgetting past information. W r represents the weight matrix of the reset gate, b r represents the bias of the reset gate.

[0077] Candidate hidden state calculation:

[0078]

[0079] Where represents the candidate hidden state, which is a new candidate value considering the current input and the update gate. W h is the weight matrix of the hidden state, b h is the bias of the hidden state.

[0080] New hidden state calculation:

[0081]

[0082] The bidirectional gated recurrent unit processes past and future information through forward and reverse gated recurrent algorithms, enabling better capture of information between data and improving the accuracy of the model.

[0083]

[0084] Among them represents the hidden state of the forward pass, GRU f represents the calculation process of the forward gated recurrent unit, represents the hidden state of the reverse pass, GRU b represents the calculation process of the reverse gated recurrent unit.

[0085] Train the positioning model based on the training set and test the trained positioning model based on the test set; complete indoor positioning based on the tested positioning model.

[0086] A further implementation manner lies in that the method for training the positioning model is:

[0087] Based on the weight matrix and the true coordinates of the observation labels, establish an mse loss function with L2 regularization;

[0088] Specifically, in this embodiment, define the mse loss function. Assume that the coordinates of the label G calculated by the positioning model are (X G , Y G , Z G ). In actual applications, in most cases, two-dimensional plane coordinates are still needed. Therefore, the weight ratio of X and Y can be increased to improve the accuracy of X and Y. Then the mse loss function can be defined as:

[0089] w_loss = avg((X - X G ) 2 * 2 + (Y - Y G ) 2 * 2 + (Z - Z G ) 2 ) (7)

[0090] where avg represents taking the average.

[0091] Set the learning rate: The learning rate is an important hyperparameter during model training and is used to control the step size adopted for each parameter update of the model. That is, the learning rate controls the adjustment amplitude of the parameters during training. If the learning rate is too large, the model may not converge, and if the learning rate is too small, the model training process may be slow or the model may fall into a local optimum. When setting the learning rate, the initial learning rate is 0.01, and then the learning rate is adjusted for each iteration to make the learning rate decay.

[0092] Methods for reducing overfitting: ① Add a dropout layer after each bidirectional gated recurrent unit. Dropout is a regularization technique that randomly sets some neuron outputs to zero during training to prevent overfitting. ② Add L2 regularization to the loss function. Regularization constrains the complexity of the model by adding the squared norm of the weights to the loss function, which can prevent the model parameters from being too large and avoid the risk of overfitting. The formula for L2 is as follows:

[0093]

[0094] where λ is the regularization strength, a non - negative hyperparameter, and i, j represent the rows and columns of the weight matrix W.

[0095] The loss with L2 regularization can be written as:

[0096] Loss T = w_loss + L2 (9)

[0097] Set the number of iterations: Set it to 3000 times.

[0098] The expression of the mse loss function with L2 regularization is as follows:

[0099]

[0100] In the formula, avg is to calculate the average, X, Y, Z represent the three - dimensional coordinates of the observed label G at the last moment, X G , Y G , Z G are the calculated coordinates of the observed label G, λ is the regularization strength, and i, j represent the rows and columns of the weight matrix W;

[0101] Based on the training set, the preset learning rate, the Adam optimizer, and the mse loss function, complete the training of the positioning model.

[0102] In this embodiment, the optimizer is an algorithm used to update model parameters in deep learning, and its main goal is to minimize the loss function. The Adam optimizer is selected during training. Adam is an optimizer with an adaptive learning rate that combines the first - moment estimate (mean) and second - moment estimate (variance) of the gradient. It usually performs well and is suitable for various deep - learning tasks.

[0103] Select the Adam optimizer, and its specific steps are as follows:

[0104] Initialize the model parameters θ, the learning rate α, the decay coefficients β1, β2, and then calculate the gradient:

[0105] g t =▽J(θ t ) (11)

[0106] Update the first - order moment estimate and the second - order moment estimate:

[0107]

[0108] m t is the first - order moment estimate, and v t is the second - order moment estimate.

[0109] Correct the bias:

[0110]

[0111] where is the corrected first - order moment estimate, is the corrected second - order moment estimate.

[0112] Update the model parameters:

[0113]

[0114] ξ is a small constant added for numerical stability. Repeat the above steps until the stop condition is met.

[0115] The present invention uses a bidirectional gated recurrent unit to process the temporal features in UWB ranging information, and uses a residual connection to make up for the information lost during the training process. Precise positioning can be achieved by relying on this algorithm for positioning.

[0116] Embodiment 2

[0117] The selected site size in this embodiment is 8m * 4m * 2m. Data is collected relying on 6 UWB base stations, a UWB tag, and a total station. Python + tensorflow1.8 is used to write an algorithm based on a residual - based bidirectional gated recurrent unit for training.

[0118] A UWB indoor positioning algorithm based on residual connection and bidirectional gated recurrent unit includes the following steps:

[0119] (1) Place the UWB base stations, select the main base station to collect data, collect distance information through UWB, and collect tag position information according to the total station.

[0120] (2) Establish a positioning model corresponding to the data set.

[0121] (3) Divide the data set, put the training set into the positioning model for training to obtain the final model.

[0122] In this example, the placement positions of the UWB base stations in step (1) are as Figure 2As shown, the position of the tag randomly appears inside the positioning system. The total station measures the coordinates once, and the UWB measures the distance 10 times. According to this idea, 500 groups of data are measured.

[0123] Further, in step (2), a suitable positioning model is established according to the dataset format. The structure diagram of the model is as Figure 3 shown.

[0124] Further, in step (3), the dataset is divided, and the training set is put into the positioning model for training. Define the mse loss function with L2 regularization, set the initial learning rate to 0.01, set the maximum number of iterations to 3000 times, and select the Adam optimizer to solve.

[0125] Experimental result analysis

[0126] The experimental results are the data of the test set. There are 100 point numbers in the test set of this case. According to the results, the three-dimensional positioning error is within 30 cm, the average three-dimensional positioning error is 12.7 cm, the two-dimensional positioning error is within 20 cm, and the average two-dimensional positioning error is 6.8 cm. Among them Figure 4 and Figure 5 respectively show the average error diagrams of three-dimensional positioning and two-dimensional positioning.

[0127] Embodiment 3

[0128] The present invention also provides an indoor positioning system based on residual connection and bidirectional gated recurrent unit for implementing the indoor positioning method, including:

[0129] A data acquisition module for presetting a positioning area and installing ultra-wideband base stations, and collecting ranging information based on the ultra-wideband base stations;

[0130] A dataset construction module for obtaining a time-series dataset based on the ranging information; and dividing the time-series dataset into a training set and a test set;

[0131] A model construction module for constructing a positioning model based on residual connection and bidirectional gated recurrent unit;

[0132] An indoor positioning module for training the positioning model based on the training set and testing the trained positioning model based on the test set; and completing indoor positioning based on the tested positioning model.

[0133] A further implementation manner is that the dataset construction module includes:

[0134] A time-series dataset acquisition unit for obtaining a time-series dataset based on the ranging information; wherein, the data format of the time-series dataset is as follows:

[0135] (D 1 AG 、D1 BG , D 1 CG , D 1 DG , D 1 EG , D 1 FG ),...,(D 10 AG , D 10 BG , D 10 CG , D 10 DG , D 10 EG , D 10 FG )|(X, Y, Z),

[0136] In the formula, D i AG , D i BG , D i CG , D i DG , D i EG , D i FG respectively represent the distances from base stations A, B, C, D, E, and F to the observation tag G at the i-th moment, where the value of i ranges from 1 to 10; X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment;

[0137] The dataset partitioning unit is used to partition the time-series dataset into a training set and a test set.

[0138] A further implementation manner is that the model construction module includes:

[0139] The preset unit is used to preset the input end and output end of the positioning model based on the data format of the time-series dataset;

[0140] The bidirectional gated recurrent unit construction unit is used to preset the number of layers and the number of hidden layer nodes of the forward gated recurrent unit and the backward gated recurrent unit to obtain a bidirectional gated recurrent unit;

[0141] The residual connection unit is used to connect the input end of the positioning model to the output end of the bidirectional gated recurrent unit by using residual connection;

[0142] The fully connected unit is used to connect the output end of the bidirectional gated recurrent unit to the output end of the positioning model based on a double-layer fully connected layer to complete the construction of the positioning model.

[0143] A further implementation manner is that the indoor positioning module includes:

[0144] A training unit, configured to establish an mse loss function with L2 regularization based on the weight matrix and the true coordinates of the observed tag; complete the training of the positioning model based on the training set, a preset learning rate, the Adam optimizer, and the mse loss function; wherein, the expression of the mse loss function is as follows:

[0145]

[0146] In the formula, avg is to calculate the average, X, Y, and Z represent the three-dimensional coordinates of the observed tag G at the last moment, X G ,Y G ,Z G are the calculated coordinates of the observed tag G, λ is the regularization strength, and i, j represent the rows and columns of the weight matrix W;

[0147] A testing unit, configured to test the trained indoor positioning model based on the test set;

[0148] An indoor positioning unit, configured to complete indoor positioning based on the tested positioning model.

[0149] The above-described embodiments are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.

Claims

1. An indoor positioning method based on residual connection and bidirectional gated recurrent unit, characterized in that It includes the following steps: Preset a positioning area and install an ultra-wideband base station, and collect ranging information based on the ultra-wideband base station; Based on the ranging information, obtain a time series data set; And divide the time series data set into a training set and a test set; Based on residual connection and bidirectional gated recurrent unit, construct a positioning model; Train the positioning model based on the training set, and test the trained positioning model based on the test set; Complete indoor positioning based on the tested positioning model; The data format of the time series data set is as follows: (D 1 AG 、D 1 BG 、D 1 CG 、D 1 DG 、D 1 EG 、D 1 FG ),...,(D 10 AG 、D 10 BG 、D 10 CG 、D 10 DG 、D 10 EG 、D 10 FG )|(X,Y,Z), Where D i AG , D i BG , D i CG , D i DG , D i EG , D i FG respectively represent the distances from base stations A, B, C, D, E, and F to the observation tag G at the i-th moment, where the value of i ranges from 1 to 10; X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment; The method for constructing the positioning model is: Based on the data format of the time series data set, preset the input end and output end of the positioning model; Preset the number of layers of the forward gated recurrent unit and the backward gated recurrent unit and the number of hidden layer nodes to obtain the bidirectional gated recurrent unit; Adopt residual connection to connect the input end of the positioning model with the output end of the bidirectional gated recurrent unit; Connect the output end of the bidirectional gated recurrent unit to the output end of the positioning model through a double-layer fully connected layer to complete the construction of the positioning model; Regarding the bidirectional gated recurrent unit: It is composed of a forward and a backward gated recurrent unit. The gated recurrent unit integrates the input gate and forget gate of the long short-term memory neural network into an update gate; The gated recurrent unit includes an update gate, a reset gate, a candidate hidden state, and a new hidden state; Update gate calculation: z t = σ(W z · [h t-1 , x t + b z ) where z t represents the update gate, which is used to control the degree of information integration; W z represents the weight matrix of the update gate, h t-1 represents the hidden state at the previous time step, x t represents the input at the current time step, b z represents the bias of the update gate, and σ represents the sigmoid activation function; Reset gate calculation: r t = σ(W r · [h t-1 , x t + b r ) where r t represents the reset gate, which is used to control the degree of forgetting of past information; W r represents the weight matrix of the reset gate, and b r represents the bias of the reset gate; Candidate hidden state calculation: Among them represents the candidate hidden state, which is the new candidate value considering the current input and the update gate; W h is the weight matrix of the hidden state, and b h is the bias of the hidden state; New hidden state calculation: The bidirectional gated recurrent unit processes past and future information through forward and backward gated recurrent algorithms: Among them represents the hidden state of forward propagation, GRU f represents the calculation process of the forward gated recurrent unit, represents the hidden state of backward propagation, GRU b represents the calculation process of the backward gated recurrent unit.

2. The indoor positioning method based on residual connection and bidirectional gated recurrent unit according to claim 1, wherein The method for training the positioning model is: Based on the weight matrix and the true coordinates of the observation label, establish an mse loss function with L2 regularization; Among them, the expression of the mse loss function is as follows: where avg is for averaging, X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment, X G , Y G , Z G are the calculated coordinates of the observation tag G, λ is the regularization strength, and i, j represent the rows and columns of the weight matrix W; Based on the training set, preset learning rate, Adam optimizer, and the mse loss function, complete the training of the positioning model.

3. An indoor positioning system based on residual connection and bidirectional gated recurrent unit, characterized in that, For implementing the indoor positioning method described in any one of claims 1-2, it includes: A data acquisition module, configured to collect ranging information based on an ultra-wideband base station installed in a preset positioning area; A data set construction module, based on the ranging information, obtain a time series data set; And divide the time series data set into a training set and a test set; A model construction module, configured to construct a positioning model based on residual connection and bidirectional gated recurrent unit; An indoor positioning module, train the positioning model based on the training set, and test the trained positioning model based on the test set; Complete indoor positioning based on the tested positioning model.

4. The indoor positioning system based on residual connection and bidirectional gated recurrent unit according to claim 3, wherein The data set construction module includes: A time series data set acquisition unit, configured to obtain a time series data set based on the ranging information; Among them, the data format of the time series data set is as follows: (D 1 AG , D 1 BG , D 1 CG , D 1 DG , D 1 EG , D 1 FG )...,(D 10 AG , D 10 BG , D 10 CG , D 10 DG , D 10 EG , D 10 FG )|(X, Y, Z), where D i AG , D i BG , D i CG , D i DG , D i EG , D i FG respectively represent the distances from base stations A, B, C, D, E, F to the observation tag G at the i-th moment, where the value of i ranges from 1 to 10; X, Y, Z represent the three-dimensional coordinates of the observation tag G at the last moment; A data set division unit, configured to divide the time series data set into a training set and a test set.

5. The indoor positioning system based on residual connection and bidirectional gated recurrent unit according to claim 4, characterized in that, The model construction module includes: A preset unit, configured to preset the input end and output end of the positioning model based on the data format of the time series data set; A bidirectional gated recurrent construction unit is used to preset the number of layers and the number of hidden layer nodes of the forward gated recurrent unit and the backward gated recurrent unit to obtain the bidirectional gated recurrent unit; A residual connection unit is used to connect the input end of the positioning model to the output end of the bidirectional gated recurrent unit by using residual connection; A fully connected unit is used to connect the output end of the bidirectional gated recurrent unit to the output end of the positioning model through a double-layer fully connected layer to complete the construction of the positioning model.

6. The indoor positioning system based on residual connection and bidirectional gated recurrent unit according to claim 3, characterized in that, The indoor positioning module includes: A training unit is used to establish an mse loss function with L2 regularization based on the weight matrix and the true coordinates of the observation labels; based on the training set, the preset learning rate, the Adam optimizer, and the mse loss function, complete the training of the positioning model; where the expression of the mse loss function is as follows: Where avg is for averaging, X, Y, and Z represent the three-dimensional coordinates of the observation tag G at the last moment, X G , Y G , Z G are the calculated coordinates of the observation tag G, λ is the regularization strength, and i, j represent the rows and columns of the weight matrix W; A testing unit is used to test the trained indoor positioning model based on the test set; An indoor positioning unit is used to complete indoor positioning based on the tested positioning model.

Citation Information

Patent Citations

  • Trajectory prediction method based on fusion inverse reinforcement learning

    CN114445465A

  • Text-video time sequence positioning method based on feature reconstruction

    CN116415034A