Sensor fusion indoor positioning method and system based on particle filter algorithm
Through the particle filtering algorithm combined with the information fusion of UWB base station and inertial sensors, the problem that signals are susceptible to noise in indoor positioning is solved, and more accurate and robust positioning results are achieved, with stronger adaptability and flexibility.
Patent Information
- Application Number
- CN202310364181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-04-07
AI Technical Summary
The existing indoor positioning technology has problems such as signals being easily affected by external environmental noise, insufficient positioning accuracy, and high cost. Single source positioning cannot meet the needs.
The particle filtering algorithm is used to combine the UWB base station and inertial sensor, and the three-sided positioning model and adaptive fusion algorithm are used to fusion information using the distance between the UWB base station and the mobile smart terminal and the displacement vector of the inertial sensor to perform time updates and weight calculations of the positioning results to realize multi-source information fusion.
It improves positioning accuracy and robustness, reduces sensitivity to external interference, enhances the portability and scalability of the algorithm, and overcomes the defects of a single source.
Smart Images

Figure CN116567531B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of signal detection and wireless positioning, and in particular to a sensor fusion indoor positioning method and system based on a particle filter algorithm. Background Art
[0002] Indoor positioning technology has garnered widespread attention in specific contexts. Indoors, satellite signals severely fade, rendering GPS nearly unusable. Therefore, special research is needed. In recent years, with the rapid proliferation of mobile smart devices, indoor positioning technology based on these devices has become a research hotspot due to its high practicality and ease of adoption.
[0003] Indoor positioning technologies are categorized as those based on external signal sources and those based on natural signal sources. External signal-based technologies rely on external signal sources, proactively deploying information such as base station tags, and leverage proactive system interaction to achieve positioning. Natural signal-based technologies rely solely on terminal sensors, utilizing information collected from the surrounding environment to achieve positioning.
[0004] Existing positioning technologies based on external signal sources primarily utilize signals in the form of Wi-Fi, Bluetooth, UltraWide Band (UWB), and acoustic waves. Most Wi-Fi-based positioning systems employ the Received Signal Strength Indication (RSSI) fingerprinting method. The RSSIs received from multiple Wi-Fi access points at a given location are used as location fingerprints. Fingerprints from multiple known locations are first collected to build a fingerprint database. When positioning is required, the currently acquired location fingerprint is matched against the fingerprint database, and the fingerprint in the database that matches the current fingerprint is selected as the location result. The fingerprint database construction process is complex and lacks portability. Typically, a new location fingerprint database must be built for each new environment, resulting in unnecessary manpower and material costs. Bluetooth-based positioning systems establish a path loss model based on Bluetooth RSSI and propagation distance, using RSSI ranging for positioning. However, Bluetooth communication range is short, and positioning systems require a dense deployment of Bluetooth nodes, making system deployment complex and impractical. Most acoustic positioning systems use the arrival time or arrival time difference of acoustic waves for positioning. The base station transmits acoustic signals at regular intervals, and the mobile terminal obtains the arrival time of the acoustic signals, completing positioning through geometric relationships. This method causes the acoustic signals emitted by the base station to be heard by people nearby, causing acoustic pollution. Furthermore, in noisy areas, the system is also susceptible to the influence of ambient noise. UWB-based positioning systems typically use two-way ranging (TWR) to measure the flight time of the signal from a base station pre-deployed in a specific environment to the mobile terminal. The system then establishes a geometric relationship between the mobile terminal and the base station to calculate the mobile node's position, achieving centimeter-level positioning accuracy. However, the deployment cost of UWB base station systems is relatively high. To ensure positioning accuracy, the system generally requires the deployment of a large number of positioning base stations, which further increases system costs and limits the promotion of this method.
[0005] Existing positioning technologies based on natural signal sources include geomagnetic navigation and inertial navigation. Geomagnetic navigation uses a fingerprint matching method. By pre-collecting and accurately constructing a geomagnetic fingerprint database, sensors are used to obtain magnetic field data at the current location of the positioning target. This real-time data is then accurately matched with the geomagnetic fingerprint database to determine the current location of the positioning target. Positioning methods based on position fingerprint matching require significant human and material resources to build the fingerprint database, and the database is not universally applicable, requiring a new fingerprint database to complete positioning in new environments. Inertial navigation technology uses inertial sensors to detect the motion state of the positioning target. Using relevant algorithms, the previous position information is processed to determine the current relative position. This positioning technology offers strong autonomy and very high short-term positioning accuracy and continuity. However, positioning errors accumulate over time, resulting in significant errors over long periods of time.
[0006] Positioning technologies that use external signal sources have inherent drawbacks. For example, the signal propagation process between the preset base station and the positioning target is easily affected by external noise, resulting in inaccurate signal propagation time and even partial inaccuracy of base station information, ultimately affecting positioning accuracy. Positioning technologies that use natural signal sources are more robust to external noise, but both approaches have their own drawbacks. Therefore, neither natural signal source nor external signal source positioning alone can meet the needs of indoor positioning. Summary of the Invention
[0007] The purpose of the embodiments of the present application is to provide a sensor fusion indoor positioning method and system based on a particle filter algorithm to solve the problem in traditional positioning methods that single-source positioning cannot meet indoor positioning requirements due to its own performance defects.
[0008] According to a first aspect of an embodiment of the present application, a sensor fusion indoor positioning method based on a particle filter algorithm is provided, which is applied to a cloud server, including:
[0009] S1: Controls the UWB base station to exchange information with the mobile smart terminal, obtains the distance between each UWB base station and the mobile smart terminal, and can be used to integrate the number of effective base stations for the positioning algorithm;
[0010] S2: Obtain the relative displacement vector generated by the user within a period of time from the mobile smart terminal;
[0011] S3: Using the distances between the base stations and the smart terminal, a three-sided positioning model is constructed, and the three-sided positioning model is solved by the least squares method to obtain the UWB positioning result of the user at the current moment;
[0012] S4: Calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as an input quantity for time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0013] S5: Calculate the user's walking speed information based on the fused positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity for the time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0014] S6: Using the relative displacement vector and the UWB positioning result, select one between the first input and the second input according to a speed selection algorithm as an input for time update, and complete the time update step;
[0015] S7: using the number of valid base stations and an adaptive weight update algorithm, determining the distance between the base station and the intelligent terminal and the proportion of the displacement vector in the measurement update of the fusion filter algorithm, and obtaining the weight of the particle in the fusion algorithm;
[0016] S8: Using the weights of the particles, the distribution result of the particles at the current moment is obtained, and the expectation of the current particle distribution is calculated as the positioning result of the fusion filtering algorithm.
[0017] Furthermore, the UWB base station is controlled to exchange information with the mobile intelligent terminal, and the distance between each UWB base station and the mobile intelligent terminal is obtained. The number of effective base stations that can be used to integrate the positioning algorithm includes:
[0018] The smart terminal sends information exchange requests to the cloud server at fixed intervals, and the cloud server then allocates working time slots to each UWB base station;
[0019] Each UWB base station sends UWB ranging signals to the smart terminal in turn in its own working time slot according to its own number;
[0020] The UWB base station and the smart terminal will complete the information exchange. After the information exchange is completed, the smart terminal obtains the UWB ranging timestamp data and the channel impulse response information of the physical layer of the UWB base station;
[0021] The smart terminal calculates the distance between each UWB base station and the smart terminal using a bilateral two-way ranging algorithm based on the UWB ranging timestamp data obtained through information exchange;
[0022] According to the channel impulse response information of the physical layer of the UWB base station, LOS and NLOS are identified to determine the number of effective base stations used for the fusion positioning algorithm.
[0023] Furthermore, the relative displacement vector generated by the user within a period of time is obtained from the mobile intelligent terminal, including:
[0024] The pedestrian dead reckoning algorithm is used to perform peak detection on the data collected by the accelerometer in the inertial sensor unit to determine whether the pedestrian has taken a step;
[0025] The pedestrian's heading is determined using data collected by the gyroscope and magnetometer in the inertial sensor unit;
[0026] After a pedestrian takes a step, the pendulum model is used to calculate the pedestrian's step length and record the pedestrian's heading at that time.
[0027] Calculating the step length information and heading information obtained after the pedestrian takes a step, and calculating the coordinate transformation after the pedestrian takes a step, the coordinate transformation is the relative displacement vector;
[0028] Furthermore, using the relative displacement vector and the UWB positioning result, selecting one between the first input and the second input as an input for time update according to a speed selection algorithm, and completing the time update step, includes:
[0029] Determining the current walking state of the user using the relative displacement vector;
[0030] Determine whether the current walking state has a sudden change. If a sudden change has occurred, directly use the input value 1 as the input value for time update; otherwise, proceed to the next step;
[0031] A fixed time window is set, and the relative displacement vector and the UWB positioning result within the fixed time window are used to jointly determine an input amount for time update.
[0032] Furthermore, the number of valid base stations is used to determine the distance between the base station and the intelligent terminal and the proportion of the displacement vector in the measurement update of the fusion filtering algorithm according to the adaptive weight update algorithm, and the weight of the particle in the fusion algorithm is obtained, including:
[0033] Using the distance measurement result between the UWB base station and the mobile intelligent terminal, calculating the conditional probability of obtaining the distance between the UWB base station and the mobile intelligent terminal under the prior condition of the current particle distribution;
[0034] Utilizing the displacement vector, calculating the conditional probability of the displacement vector under the prior condition of the current particle distribution;
[0035] Using the number of valid base stations and feedback information from historical measurement records at previous moments, a weighted adaptive update algorithm is used to obtain the proportion of the conditional probability of the distance between the UWB base station and the mobile intelligent terminal and the conditional probability of the displacement vector in the particle update, and the conditional probability of the current measurement situation is calculated;
[0036] The a priori condition of the particle distribution and the conditional probability of the current measurement situation are used to calculate the posterior probability of the particle distribution situation according to Bayesian theory.
[0037] According to a second aspect of an embodiment of the present application, a sensor fusion indoor positioning system based on a particle filter algorithm is provided, which is applied to a cloud server, including:
[0038] The control acquisition module is used to control the information exchange between the UWB base station and the mobile intelligent terminal, obtain the distance between each UWB base station and the mobile intelligent terminal, and can be used to integrate the number of effective base stations in the positioning algorithm;
[0039] An acquisition module is used to acquire the relative displacement vector generated by the user within a period of time from the mobile smart terminal;
[0040] A modeling and solving module is used to construct a three-sided positioning model using the distance between each base station and the smart terminal, and solve the three-sided positioning model using the least squares method to obtain the UWB positioning result of the user at the current moment;
[0041] A first calculation module is configured to calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as an input quantity for time updating of the adaptive fusion algorithm based on the particle filter algorithm;
[0042] The second calculation module is used to calculate the user's walking speed information based on the fusion positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity of the time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0043] An updating module, configured to use the relative displacement vector and the UWB positioning result to select one between the first input and the second input according to a speed selection algorithm as an input for time update, and complete a time updating step;
[0044] A weight calculation module is used to use the number of valid base stations and, according to an adaptive weight update algorithm, determine the distance between the base station and the intelligent terminal and the proportion of the displacement vector in the measurement update of the fusion filter algorithm, and obtain the weight of the particle in the fusion algorithm;
[0045] The third calculation module is used to obtain the distribution result of the particles at the current moment by using the weight of the particles, and calculate the expectation of the current particle distribution as the positioning result of the fusion filtering algorithm.
[0046] According to a third aspect of the embodiments of the present application, there is provided an electronic device, including:
[0047] one or more processors;
[0048] a memory for storing one or more programs;
[0049] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.
[0050] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored, characterized in that when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0051] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0052] (1) This application uses a natural signal source and an external signal source information fusion method for indoor positioning, overcoming the problem that the use of a single external signal source is susceptible to external environmental noise and the positioning error accumulates over time when using an inertial sensor alone, thereby making the positioning result more accurate and more robust to external interference.
[0053] (2) The present application adopts a speed selection algorithm to select one of the two time update control inputs for time update, thereby overcoming the problem that the UWB positioning result is interfered with by environmental noise and produces a large positioning error. At the same time, it also solves the problem that the positioning error increases when the time state update is completed only by using historical positioning information when encountering a sudden change in the pedestrian's walking state. As a result, the algorithm of the present application has greater robustness to both the pedestrian's walking state and environmental noise interference.
[0054] (3) This application uses the UWB physical layer channel impulse response to perform LOS and NLOS identification, and applies the identification results to the fusion positioning algorithm, making the fusion positioning algorithm of this application highly resistant to positioning errors caused by non-line-of-sight propagation of signals;
[0055] (4) This application uses a weight update algorithm to calculate the proportion of displacement vector and UWB distance measurement in particle weight calculation, making the fusion algorithm of this application more portable and scalable.
[0056] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 The present invention is a flowchart of a sensor fusion indoor positioning method based on a particle filter algorithm according to an exemplary embodiment.
[0059] Figure 2 The diagram is a schematic diagram showing a principle of calculating the signal flight time according to the DS-TWR algorithm according to an exemplary embodiment.
[0060] Figure 3 The present invention is a structural block diagram of hardware involved in a sensor fusion indoor positioning method based on a particle filter algorithm according to an exemplary embodiment.
[0061] Figure 4 The figure is a schematic diagram showing a sensor fusion indoor positioning method based on a particle filter algorithm according to an exemplary embodiment.
[0062] Figure 5 The present invention is a block diagram of a sensor fusion indoor positioning system based on an adaptive particle filter algorithm according to an exemplary embodiment. DETAILED DESCRIPTION
[0063] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0064] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0065] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0066] Figure 1 FIG. 1 is a flow chart of a sensor indoor positioning method based on an adaptive particle filter algorithm according to an exemplary embodiment. Figure 1 As shown, the method is applied in a terminal and may include the following steps:
[0067] Step S1: Control the UWB base station to exchange information with the mobile intelligent terminal, obtain the distance between each UWB base station and the mobile intelligent terminal, and the number of effective base stations that can be used for the fusion positioning algorithm;
[0068] Step S2: Obtaining the relative displacement vector generated by the user within a period of time from the mobile intelligent terminal;
[0069] Step S3: constructing a three-sided positioning model using the distances between the base stations and the smart terminal, and solving the three-sided positioning model using the least squares method to obtain the UWB positioning result of the user at the current moment;
[0070] Step S4: Calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as the input quantity for the time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0071] Step S5: Calculate the user's walking speed information based on the fusion positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity for the time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0072] Step S6: using the relative displacement vector and the UWB positioning result, selecting one between the first input and the second input as an input for time update according to a speed selection algorithm, and completing the time update step;
[0073] Step S7: using the number of valid base stations, according to the adaptive weight update algorithm, to determine the distance between the base station and the intelligent terminal and the proportion of the displacement vector in the measurement update of the fusion filter algorithm, and to obtain the weight of the particle in the fusion algorithm;
[0074] Step S8: using the weights of the particles, obtaining the distribution results of the particles at the current moment, and calculating the expectation of the current particle distribution as the positioning result of the fusion filtering algorithm.
[0075] This application uses a natural signal source and an external signal source information fusion method to perform indoor positioning, overcoming the problem that using a single external signal source is susceptible to external environmental noise and using an inertial sensor alone will cause positioning errors to accumulate over time, thereby making the positioning results more accurate and more robust to external interference.
[0076] The present application adopts a speed selection algorithm to select one of the two time update control inputs for time update, which overcomes the problem that the UWB positioning results are interfered with by environmental noise and produce large positioning errors. At the same time, it also solves the problem that the positioning error increases when the time state update is completed only by using historical positioning information when encountering a sudden change in the pedestrian's walking state. As a result, the algorithm of the present application has greater robustness to both pedestrian walking state and environmental noise interference.
[0077] This application uses the UWB physical layer channel impulse response to identify LOS and NLOS, and applies the identification results to the fusion positioning algorithm, making the fusion positioning algorithm of this application highly resistant to positioning errors caused by non-line-of-sight propagation of signals;
[0078] This application uses a weight update algorithm to calculate the proportion of displacement vector and UWB distance measurement in particle weight calculation, making the fusion algorithm of this application more portable and scalable.
[0079] In the above step S1, the UWB base station is controlled to exchange information with the mobile intelligent terminal to obtain the distance between each UWB base station and the mobile intelligent terminal, which can be used to integrate the number of effective base stations in the positioning algorithm. This step may include the following sub-steps:
[0080] S11: The smart terminal sends a request for information exchange to the cloud server at fixed intervals, and the cloud server then allocates working time slots to each UWB base station;
[0081] Specifically, the mobile smart terminal sends a ranging request to the cloud control center of the cloud server. Upon receiving the positioning request, the cloud control center allocates a working time slot to the UWB positioning base station according to the UWB base station number. Based on the information processing speed of the UWB base station module, a 20ms working time slot is selected. This avoids signal conflicts caused by different UWB base station modules sending ranging information simultaneously, and allows ranging to be completed in a shorter time.
[0082] S12: Each UWB base station sends a UWB ranging signal to the smart terminal in turn in its own working time slot according to its own number;
[0083] Specifically, each UWB base station is in a low-power mode when there is no ranging task. During its respective working time slots, first, each UWB base station wakes up its own UWB transceiver module; then, it sends a UWB ranging signal to the mobile intelligent terminal; after ranging is completed, each UWB positioning base station operates in a low-power mode, which can reduce the power consumption during the operation of the base station.
[0084] S13: Information exchange between the UWB base station and the intelligent terminal will be completed. After the information exchange is completed, the intelligent terminal obtains the timestamp data of UWB ranging and the channel impulse response information of the physical layer of the UWB base station;
[0085] Specifically, when obtaining the UWB timestamp, information of the PHY layer of the UWB signal can be obtained. According to the CIR data of the PHY layer, LOS channels and NLOS channels can be identified. The specific algorithm is as follows: The UWB receiver measures the direct-path received signal strength FSL and the strength of the multipath received signal RSL through the preamble CIR observed at the PHY layer. The difference between FSL and RSL in the LOS channel is relatively small; in the NLOS channel, due to the presence of obstacles, the FSL signal attenuates or even disappears, resulting in an increase in the difference between the two. Calculate the difference GAP between RSL and FSL. If GAP > 10, it is judged as the NLOS situation; otherwise, judge the magnitudes of the average RSL and RSL. If the average RSL < RSL, it is the LOS situation, otherwise it is the NLOS situation. Eliminate the measurement results of the NLOS channel, and the remaining are valid data. Using this method to complete the identification of LOS and NLOS, the calculation process is simple and no additional parameter calculation is required.
[0086] S14: The intelligent terminal calculates the distances between each UWB base station and the intelligent terminal by using the two-way two-way ranging algorithm according to the timestamp data of the UWB ranging obtained from the information exchange;
[0087] Specifically, the ranging principle of a single base station is as shown in Figure 2 (a). The base station sends Initialmsg to the tag to be located. After the tag to be located receives the Initial msg, it replies with Reply msg to the base station after a period of processing time. After the base station receives the information, it finally makes another information reply. Timestamps are marked respectively when the information is sent and received. Thus, two time intervals are generated on both the base station side and the tag to be located side. According to these two time intervals, the flight time T of the signal can be obtained f :
[0088]
[0089] The ranging principle of multi-base station DS-TWR is as shown in Figure 2As shown in (b), after the base station receives the start positioning instruction sent by the cloud control center, each base station follows its own number and intervals T p , the order of sending Initial msg, the time for base station i to send the initial positioning signal is:
[0090] t=(i-1)T p
[0091] S15: Based on the channel impulse response information of the physical layer of the UWB base station, LOS and NLOS are identified to determine the number of valid base stations used for the fusion positioning algorithm.
[0092] S2: Obtaining the relative displacement vector generated by the user within a period of time from the mobile smart terminal; this step may include the following sub-steps:
[0093] S21: using a pedestrian dead reckoning algorithm to perform peak detection on the data collected by the accelerometer in the inertial sensor unit to determine whether the pedestrian has taken a step;
[0094] S22: Determine the pedestrian's heading using data collected by the gyroscope and magnetometer sensors in the inertial sensor unit;
[0095] S23: After determining that the pedestrian has taken a step, the pedestrian's step length information is calculated using the pendulum model, and the pedestrian's heading information at that time is recorded;
[0096] S24: Calculating the step length information and heading information obtained after the pedestrian takes one step to obtain a coordinate transformation after the pedestrian takes one step, where the coordinate transformation is the relative displacement vector;
[0097] S3: Using the distances between the base stations and the smart terminal, a three-sided positioning model is constructed, and the three-sided positioning model is solved by the least squares method to obtain the UWB positioning result of the user at the current moment;
[0098] S4: Calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as an input quantity for time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0099] Specifically, assuming that there is a tag to be located and a set of UWB positioning base stations with known coordinates in the indoor positioning system, let x k =[x k ,y k ] T , v k =[v x,k ,v y,k ] TDenote the coordinates and velocity of the tag to be located, respectively, and the subscript k denotes the kth moment. First, consider the case where the velocity is unknown in the dynamic model. In this case, the velocity v k is usually included in the state vector. Therefore, the state vector is X k =[x k ,y k ,v x,k ,v y,k ] T The dynamic model at this time can be expressed as:
[0100] X k =FX k-1 +Gw k-1
[0101] in, represents the state transition matrix; represents the noise driving matrix, I=diag(1,1); w k-1 represents the noise vector in the state transition process, whose covariance matrix is Q; ΔT is the sampling time interval.
[0102] The above formula shows the standard particle filter dynamic model used in indoor positioning systems. However, including velocity in the state vector will cause some problems, the most typical of which is the "curse of dimensionality", that is, the increase in the dimension of the state vector will require more particles to complete the filtering. One solution to this problem is to use the Rao-Blackwellized particle filter. This filter divides the state vector into nonlinear state variables and linear state variables, that is, represents the nonlinear part in the state vector, Represents the linear part of the state vector. At this point, the dynamic model is divided into two sub-models:
[0103]
[0104]
[0105] in:
[0106] C=A l =I
[0107] A n =G l =ΔT×I
[0108]
[0109] For the first sub-model of the above formula, a particle filter can be used for estimation; for the second sub-model, linear variables can be estimated using linear estimators such as Kalman filters. Therefore, the dynamic model estimated by the particle filter becomes:
[0110] x k =Fx k-1 +Bu k-1 +Gw k-1
[0111] Among them, F = diag (1, 1), B = diag (ΔT, ΔT) represents the driving matrix of the control vector, u k-1 =v k represents the control vector,
[0112] The position calculation algorithm is used to first calculate the position at the k+1th moment, and then the speed at the current moment is calculated as the control variable, that is,
[0113]
[0114] Among them, x uwb ,y uwb Represents the coordinates of the tag to be located obtained by the secondary verification algorithm. Since the covariance of the estimated velocity can be determined by the nature of noise propagation, this method can be used to adaptively set the noise during the motion process. Assume x uwb,k and x uwb,k+1 The covariance matrices are Q uwb,k and Q uwb,k+1 , and they are independent of each other, then v k The covariance matrix of
[0115]
[0116] In this case, there is no need to set the motion process noise because the algorithm can already adaptively determine the motion process noise.
[0117] S5: Calculate the user's walking speed information based on the fused positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity for the time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0118] Specifically, the speed at the previous moment is used as the input control quantity, that is,
[0119]
[0120] in, represents the velocity estimate at sampling time k, x PF ,yPF represents the estimated position coordinates obtained using the particle filter. In actual calculations, the velocity at time k-1 is used as the state input control variable to complete the state transition at time k. At this time, since the input variable for the state transition from k = 1 to k = 2 is unknown, the initial value of the velocity needs to be set to 0.
[0121] S6: Using the relative displacement vector and the UWB positioning result, select one between the first input and the second input according to a speed selection algorithm as an input for time update, and complete the time update step; this step may include the following sub-steps:
[0122] Specifically, the speed selection algorithm selects one of the two speed estimation algorithms mentioned above as the control input for the particle filter time update. In different scenarios, the errors in the estimated results obtained by calculating the control input to the particle filter using Method 1 and Method 2 for calculating the speed are different. In principle, the solution with the smaller error is selected as the control input when calculating speed. Research has found that the estimation error of Method 1 is mainly related to the walking posture, while the estimation error of Method 2 is related to the inherent error of the secondary verification algorithm. Therefore, in the speed selection algorithm, the solution with the smaller error is selected based on the IMU solution and the error of the secondary verification algorithm.
[0123] The speed selection algorithm is based on the following rules when people walk:
[0124] x uw,b,k First, while walking, mode changes occur, but these transitions don't occur instantly. Instead, there are transitional periods, such as acceleration and deceleration. This is due to several reasons: First, the power provided by the human leg is limited, making it difficult to achieve significant acceleration within a single step. Second, in indoor scenarios, compared to the explosive acceleration of athletes when running, people tend to walk in a natural, even manner. In this case, the acceleration during walking is not very high.
[0125] Second, in indoor scenes, people are likely to turn or stop suddenly while walking, which can cause a sudden change in acceleration in a certain direction.
[0126] Therefore, when selecting a speed calculation scheme, the heading angle estimation result obtained by PDR solution can be used as the error judgment basis of method one.
[0127] Assume that the current position x of the tag to be located is obtained using the UWB positioning result. UWB,k The result of the PDR algorithm using the IMU is the relative displacement ΔS and the heading angle estimation ψ. The absolute position at the current moment obtained by the IMU is:
[0128]
[0129] In the coordinate system established in this article, the heading angle calculated by the PDR algorithm is the angle between the Earth's magnetic north and the Earth's magnetic north direction, and its value range is [0,360]. First, we need to calculate the change in heading angle compared to the previous moment:
[0130] Δψ=ψ k -ψ k-1
[0131] If the heading angle change is close to 0 within the allowable error range α, it indicates that the heading has not changed compared to the previous moment; otherwise, it indicates that the heading has changed. If the heading has changed, the second method is used to calculate the velocity first. If the heading has not changed, the result of the secondary verification algorithm is compared with the absolute position result calculated by the IMU to obtain the final velocity calculation method.
[0132] First, set a suitable sampling time window N, starting from the current time k and ending at time k-(N-1), and calculate the distance between the IMU solution result and the secondary verification solution result within the time window:
[0133] Δx i =||x IMU,k-i -x UWB,k-i ||,
[0134] i=0,1,2,...,N-1
[0135] Next, we need to calculate the mean of the Δx sequence and variance δ 2 Finally, the selection result is:
[0136]
[0137] S61: Determine the current walking state of the user using the relative displacement vector;
[0138] S62: Determine whether the current walking state has a sudden change. If a sudden change has occurred, directly use the input value 1 as the input value for time update; otherwise, proceed to the next step.
[0139] S63: Setting a fixed time window, and using the relative displacement vector and the UWB positioning result within the fixed time window to jointly determine an input amount for time update.
[0140] S7: Using the number of valid base stations, according to the adaptive weight update algorithm, determine the distance between the base station and the intelligent terminal and the proportion of the displacement vector in the measurement update of the fusion filter algorithm, and obtain the weight of the particle in the fusion algorithm; this step may include the following sub-steps:
[0141] Specifically, in the particle filter algorithm, the measurement update step is related to the current measurement results and the historical status:
[0142]
[0143] in, represents the weight of particle i at the kth moment; y k Represents the observation vector at the kth moment. The measurement results of IMU and UWB are used as the basis for measurement update through weighted calculation. It consists of two parts: UWB measurement results and IMU measurement results. and
[0144]
[0145]
[0146] in,
[0147]
[0148]
[0149]
[0150] What we finally get The result is:
[0151]
[0152] Next, we calculate the weights of the two measurements. Assume that the proportion of UWB in the particle weight calculation is α. After research, we can get:
[0153]
[0154] Where N is the number of valid base stations; start represents the starting value of the UWB weight; step represents the reduction of the UWB weight in the particle weight calculation; g represents the threshold at which the number of base stations is reduced to the point where accurate positioning results cannot be obtained.
[0155] S71: Using the distance measurement result between the UWB base station and the mobile intelligent terminal, calculate the conditional probability of the distance between the UWB base station and the mobile intelligent terminal under the prior condition of the current particle distribution;
[0156] S72: Using the displacement vector, calculate the conditional probability of the displacement vector under the prior condition of the current particle distribution;
[0157] S73: Using the number of valid base stations and feedback information from historical measurement records at previous moments, a weighted adaptive update algorithm is used to obtain the proportion of the conditional probability of the distance between the UWB base station and the mobile intelligent terminal and the conditional probability of the displacement vector in the particle update, and the conditional probability of the current measurement situation is calculated;
[0158] S74: Calculate the posterior probability of the particle distribution according to Bayesian theory using the prior conditions of the particle distribution and the conditional probability of the current measurement situation.
[0159] S8: Using the weights of the particles, the distribution result of the particles at the current moment is obtained, and the expectation of the current particle distribution is calculated as the positioning result of the fusion filtering algorithm.
[0160] In the present invention, reference Figure 3 The position of the UWB base station is fixed and known, and it includes two sub-modules: a UWB transceiver and a WiFi. The mobile intelligent terminal includes three main working sub-modules: a UWB transceiver, an inertial sensor unit, and WiFi: the UWB transceiver is responsible for exchanging information with the positioning base station and measuring the distance between the base station and the mobile intelligent terminal; the inertial sensor unit is responsible for collecting data from the user during movement; WiFi provides a physical interface for network communication, and uses the network communication protocol to establish a TCP client on the mobile intelligent terminal to exchange information with the server where the cloud control center is located. The cloud server consists of two parts: a cloud computing center and a cloud control center: the cloud computing center is responsible for fusing the collected data and solving the position calculation using the corresponding algorithm; the cloud control center is responsible for coordinating the work flow of the lower computer, collecting the corresponding data, and reporting it to the cloud computing center. This invention fully considers the impact of complex indoor environments on UWB channels, utilizing displacement vectors measured by inertial sensors and distance measurements from UWB to achieve information fusion positioning. Compared to single-source positioning, this method is more robust to changes in the external environment, has higher positioning accuracy, and is more practical. Compared to traditional multi-source fusion algorithms, it is more flexible and portable, and more adaptable to different noise environments. Furthermore, the core computing and control center cloud server of this invention utilizes a distributed design, allowing the two sub-servers to perform their respective functions. This reduces computing pressure and increases computing speed compared to a single centralized server design.
[0161] Figure 4 This is a schematic diagram illustrating a sensor fusion indoor positioning method based on a particle filter algorithm, according to an exemplary embodiment. When a user is within the coverage area of a base station signal and needs to locate their location, the handheld smart mobile terminal clicks the Start Positioning button, connects to the cloud control center, and sends positioning requests to the cloud control center at regular intervals T. Simultaneously, the mobile terminal's built-in inertial sensor unit begins operating. The initial positioning request does not require the displacement vector obtained through pedestrian dead reckoning using data collected by the inertial sensor unit; initial data calibration is sufficient. The displacement vector is required for all other positioning requests. Upon receiving the positioning request, the cloud control center simultaneously sends a positioning instruction to all UWB positioning base stations. After receiving the positioning instruction, the UWB base station exchanges information with the tag according to its own base station number and performs DS-TWR data solution to obtain the distance between the UWB base station and the smart mobile terminal. Finally, this information is reported to the cloud control center. The cloud control center integrates all positioning-related information received at the current moment and packages the data for upload to the cloud computing center for position solution. Once the data solution is complete, the user's location change is updated on the smart terminal and front-end display. The positioning method of the present invention overcomes the lack of flexibility in traditional fusion filter algorithm architectures, and can achieve highly accurate positioning results even when encountering large deviations in the displacement vector or when UWB ranging is subject to large deviations due to environmental influences. Furthermore, the positioning method of the present invention is highly convenient for changing sensor types or expanding to include more sensors. Simply accessing sensor data separately and changing the weight calculation method for each sensor is sufficient. Furthermore, the positioning method of the present invention offers high positioning accuracy, strong practicality, and can achieve real-time positioning of pedestrians.
[0162] Corresponding to the aforementioned embodiment of a sensor fusion indoor positioning method based on a particle filter algorithm, the present application also provides an embodiment of a sensor fusion indoor positioning system based on a particle filter algorithm.
[0163] Figure 5 FIG1 is a block diagram of a sensor fusion indoor positioning system based on a particle filter algorithm according to an exemplary embodiment. Figure 5 ,The system is applied to the cloud server and includes:
[0164] Control acquisition module 1 is used to control the UWB base station to exchange information with the mobile intelligent terminal, obtain the distance between each UWB base station and the mobile intelligent terminal, and the number of effective base stations that can be used to integrate the positioning algorithm;
[0165] Acquisition module 2, used to acquire the relative displacement vector generated by the user within a period of time from the mobile intelligent terminal;
[0166] Modeling and solving module 3 is used to build a three-sided positioning model using the distance between each base station and the smart terminal, and solve the three-sided positioning model by least squares method to obtain the UWB positioning result of the user at the current moment;
[0167] A first calculation module 4 is configured to calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as an input quantity 1 for time updating of the adaptive fusion algorithm based on the particle filter algorithm;
[0168] The second calculation module 5 is used to calculate the user's walking speed information based on the fusion positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity of the time update of the adaptive fusion algorithm based on the particle filter algorithm;
[0169] An updating module 6 is configured to use the relative displacement vector and the UWB positioning result to select one of the input quantities 1 and 2 as an input quantity for time update according to a speed selection algorithm, and complete a time update step;
[0170] A weight calculation module 7 is used to use the number of valid base stations to determine the distance between the base station and the intelligent terminal and the proportion of the displacement vector in the measurement update of the fusion filter algorithm according to the adaptive weight update algorithm, and obtain the weight of the particle in the fusion algorithm;
[0171] The third calculation module 8 is used to obtain the distribution result of the particles at the current moment by using the weights of the particles, and calculate the expectation of the current particle distribution as the positioning result of the fusion filtering algorithm.
[0172] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0173] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0174] Accordingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement a sensor fusion indoor positioning method based on a particle filter algorithm as described above.
[0175] Accordingly, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implements the above-mentioned sensor fusion indoor positioning method based on the particle filter algorithm.
[0176] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the claims.
[0177] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A sensor fusion indoor positioning method based on particle filter algorithm, characterized in that: Applicable to cloud servers, including: S1: Control the UWB base station and the smart terminal to exchange information, obtain the distance between each UWB base station and the smart terminal, and determine the number of effective base stations used for the fusion positioning algorithm; S2: Obtain the relative displacement vector generated by the user within a period of time from the smart terminal; S3: Using the distances between each UWB base station and the smart terminal, a three-sided positioning model is constructed, and the three-sided positioning model is solved by the least squares method to obtain the UWB positioning result of the user at the current moment; S4: Calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as an input quantity for time update of the adaptive fusion algorithm based on the particle filter algorithm; S5: Calculate the user's walking speed information based on the fused positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity for the time update of the adaptive fusion algorithm based on the particle filter algorithm; S6: Using the relative displacement vector and the UWB positioning result, select one between the first input and the second input according to a speed selection algorithm as an input for time update, and complete the time update step; S7: Using the number of valid base stations, according to an adaptive weight update algorithm, determine the distance between the valid base station and the intelligent terminal and the proportion of the relative displacement vector in the measurement update of the fusion filter algorithm, and obtain the weight of the particle in the adaptive fusion algorithm based on the particle filter algorithm; S8: Using the weights of the particles, the distribution result of the particles at the current moment is obtained, and the expectation of the current particle distribution is calculated as the positioning result of the fusion filtering algorithm.
2. The method according to claim 1, characterized in that Control the information exchange between the UWB base station and the smart terminal, obtain the distance between each UWB base station and the smart terminal, and determine the number of valid base stations for the fusion positioning algorithm, including: The smart terminal sends information exchange requests to the cloud server at fixed intervals, and the cloud server then allocates working time slots to each UWB base station; Each UWB base station sends UWB ranging signals to the smart terminal in turn in its own working time slot according to its own number; The UWB base station and the smart terminal will complete the information exchange. After the information exchange is completed, the smart terminal obtains the UWB ranging timestamp data and the channel impulse response information of the physical layer of the UWB base station; The smart terminal calculates the distance between each UWB base station and the smart terminal using a bilateral two-way ranging algorithm based on the UWB ranging timestamp data obtained through information exchange; According to the channel impulse response information of the physical layer of the UWB base station, LOS and NLOS are identified to determine the number of effective base stations used for the fusion positioning algorithm.
3. The method according to claim 1, characterized in that The relative displacement vector generated by the user over a period of time is obtained from the smart terminal, including: The user dead reckoning algorithm is used to perform peak detection on the data collected by the accelerometer in the inertial sensor unit to determine whether the user has taken a step; The user's heading is determined using data collected by the gyroscope and magnetometer in the inertial sensor unit; After determining that the user has taken a step, the pendulum model is used to calculate the user's step length information and record the user's heading information at that time; The step length information and heading information obtained after the user takes a step are calculated to obtain the coordinate transformation after the user takes a step. The coordinate transformation is the relative displacement vector.
4. The method according to claim 1, wherein Using the relative displacement vector and the UWB positioning result, selecting one between the first input and the second input as an input for time update according to a speed selection algorithm, and completing the time update step, including: Determining the current walking state of the user using the relative displacement vector; Determine whether the current walking state has a sudden change. If a sudden change has occurred, directly use the input value 1 as the input value for time update; otherwise, proceed to the next step; A fixed time window is set, and the relative displacement vector and the UWB positioning result within the fixed time window are used to jointly determine an input amount for time update.
5. The method according to claim 1, wherein Using the number of valid base stations, according to the adaptive weight update algorithm, the distance between the valid base station and the intelligent terminal and the proportion of the relative displacement vector in the measurement update of the fusion filter algorithm are determined, and the weight of the particle in the adaptive fusion algorithm based on the particle filter algorithm is obtained, including: Using the distance measurement result between the UWB base station and the smart terminal, calculating the conditional probability of obtaining the distance between the UWB base station and the smart terminal under the prior condition of the current particle distribution; Utilizing the relative displacement vector, calculating the conditional probability of the relative displacement vector under the prior condition of the current particle distribution; Using the number of valid base stations and feedback information from historical measurement records at previous moments, a weighted adaptive update algorithm is used to obtain the proportion of the conditional probability of the distance between the UWB base station and the smart terminal and the conditional probability of the relative displacement vector in the particle update, and the conditional probability of the current measurement situation is calculated; The a priori condition of the particle distribution and the conditional probability of the current measurement situation are used to calculate the posterior probability of the particle distribution situation according to Bayesian theory.
6. A sensor fusion indoor positioning system based on particle filter algorithm, characterized in that: Applicable to cloud servers, including: The control acquisition module is used to control the information exchange between the UWB base station and the smart terminal, obtain the distance between each UWB base station and the smart terminal, and determine the number of valid base stations used for the fusion positioning algorithm; An acquisition module is used to obtain the relative displacement vector generated by the user within a period of time from the smart terminal; The modeling and solving module is used to construct a three-sided positioning model using the distance between each UWB base station and the smart terminal, and solve the three-sided positioning model using the least squares method to obtain the UWB positioning result of the user at the current moment; A first calculation module is configured to calculate the user's walking speed information based on the UWB positioning result at the current moment, the fusion positioning result at the previous moment, and the sampling time interval information, and use the walking speed information as an input quantity for time updating of the adaptive fusion algorithm based on the particle filter algorithm; The second calculation module is used to calculate the user's walking speed information based on the fusion positioning results of the previous two moments and the sampling time interval information, and use the walking speed information as the second input quantity of the time update of the adaptive fusion algorithm based on the particle filter algorithm; An updating module, configured to use the relative displacement vector and the UWB positioning result to select one between the first input and the second input according to a speed selection algorithm as an input for time update, and complete a time updating step; A weight calculation module is used to use the number of valid base stations and, according to an adaptive weight update algorithm, determine the distance between the valid base station and the intelligent terminal and the proportion of the relative displacement vector in the measurement update of the fusion filter algorithm, and obtain the weight of the particle in the adaptive fusion algorithm based on the particle filter algorithm; The third calculation module is used to obtain the distribution result of the particles at the current moment by using the weights of the particles, and calculate the expectation of the current particle distribution as the positioning result of the fusion filtering algorithm.
7. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.