An Indoor Positioning Method and Related Devices Based on UWB
By filtering, smoothing and interpolation of UWB data, and correcting the position jitter index, the problem of data jitter error in UWB positioning technology under static conditions is solved, and the positioning accuracy is improved.
Patent Information
- Application Number
- CN202410871689.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2044-07-01
AI Technical Summary
UWB positioning technology has data jitter errors under static conditions, which affects positioning accuracy.
UWB data is filtered, smoothed and interpolated by combining traceless Kalman filtering, exponential smoothing algorithm and cubic spline interpolation, and the position jitter index is used to correct it to reduce data jitter.
Effectively reduce noise interference in UWB data, reduce data jitter, and improve indoor positioning accuracy.
Smart Images

Figure CN118936467B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of indoor positioning, and particularly relates to an indoor positioning method based on UWB and related devices. Background Art
[0002] Indoor positioning technology has a wide range of applications in the fields of Internet of Things, shopping mall navigation, logistics management, smart home, security monitoring, etc. Currently, the main indoor positioning technologies used are: WIFI positioning, Bluetooth positioning, radio frequency identification (RFID) positioning, ultrasonic positioning, optical positioning, inertial navigation, ultra-wideband (UWB) positioning, etc.
[0003] The technical principles, advantages and disadvantages of the several indoor positioning technologies listed above are as follows:
[0004] WIFI positioning: It determines the position of a device indoors by using the strength and signal transmission time of WIFI signals. By scanning the surrounding WIFI signals with a mobile phone or other devices, the position of the device relative to the WIFI router can be determined. Its characteristics are that no additional hardware devices are required, and positioning can be achieved by using the existing WIFI infrastructure, with relatively low costs; however, it is easily affected by signal interference and building structures, resulting in low positioning accuracy.
[0005] Bluetooth positioning: It determines the position of a device indoors by using the strength and transmission time of Bluetooth signals. Bluetooth beacons can be placed at different positions within a building. By detecting the distance and signal strength between the device and the beacon, indoor positioning can be achieved. Its characteristics are relatively high positioning accuracy, low power consumption, and suitability for mobile devices; however, additional Bluetooth beacon devices need to be deployed, the signal transmission distance is limited, and it is not suitable for large-scale indoor positioning.
[0006] RFID positioning: It uses radio frequency identification technology to achieve indoor positioning. By implanting RFID tags on objects or individuals, their positions can be determined by reading the tag information. Its characteristics are having unique identifiers, being able to identify at long distances, being unaffected by the environment, and being able to monitor in real time; however, RFID tags need to be implanted on objects, with relatively high costs, and it is only suitable for specific scenarios.
[0007] Ultrasonic positioning: It uses ultrasonic sensors to emit and receive ultrasonic signals inside a building, and determines the position of a device by calculating the signal propagation time. Its characteristics are relatively high positioning accuracy, suitability for scenarios requiring high-precision positioning, and the ability to achieve real-time positioning; however, it is affected by environmental noise and multipath effects, with weak anti-interference ability, and a large number of ultrasonic sensors need to be deployed.
[0008] Optical positioning: It uses cameras and image processing technologies to achieve indoor positioning. By identifying markers or feature points within a building, it determines the position of a device. Its characteristics include very high positioning accuracy, being particularly suitable for scenarios that require visual information, and enabling automatic identification and positioning by combining image processing technologies. However, it is affected by lighting conditions and occlusion, requires relatively complex equipment and algorithm support, and is not suitable for dark or low-light environments.
[0009] Inertial navigation: It uses sensors such as accelerometers and gyroscopes to detect the motion state of a device, thereby achieving indoor positioning. Its characteristics include enabling real-time positioning and navigation, being unaffected by the external environment, and being suitable for scenarios that require quick response and high-precision positioning. However, there is an error accumulation problem, and long-term use may lead to positioning deviation. Regular calibration and parameter update are required, and it is not suitable for positioning in a long-term stationary state.
[0010] UWB positioning: UWB technology is a wireless communication technology. By transmitting a large number of low-power pulse signals in an extremely short time, it measures the propagation time and signal strength of the signals to determine the position of a device, achieving centimeter-level positioning accuracy (the accuracy of most UWB sensors is around 10 - 30 cm). Its characteristics include very high positioning accuracy, being able to achieve centimeter-level positioning accuracy, and having strong anti-interference ability. However, it requires the deployment of dedicated UWB base stations, and data jitter occurs in the static state.
[0011] Compared with other high-precision indoor positioning technologies, UWB positioning has a lower price, but the typical positioning accuracy can only reach about 10 - 30 cm. Especially in the static condition, the positioning data of UWB will generate irregular data jitter. Summary of the Invention
[0012] This application provides a UWB-based indoor positioning method and related devices, which can reduce the data jitter error existing in UWB positioning data and improve the positioning accuracy.
[0013] In a first aspect, this application provides a UWB-based indoor positioning method, including:
[0014] Collect historical UWB data of a target at multiple historical moments, and calculate the position jitter index of the target according to the historical UWB data;
[0015] Collect real-time UWB data of the target at the current moment, and filter the real-time UWB data using the unscented Kalman filter to obtain the filtered UWB data;
[0016] Perform smoothing processing on the filtered UWB data using the exponential smoothing algorithm to obtain the smoothed UWB data;
[0017] Interpolate the smoothed UWB data using the cubic spline interpolation algorithm to obtain the interpolated UWB data;
[0018] Correct the interpolated UWB data according to the speed and position jitter index of the target at the current moment to obtain the corrected UWB data.
[0019] Optionally, the calculation formula for the position jitter index is:
[0020]
[0021] where MAD represents the position jitter index, N represents the total number of historical moments, i represents the i-th historical moment, j represents the j-th historical moment, x i represents the historical UWB data at the i-th historical moment, x j represents the historical UWB data at the j-th historical moment, i, j = 1, 2,..., N, i ≠ j.
[0022] Optionally, filter the real-time UWB data using the unscented Kalman filter to obtain the filtered UWB data, including:
[0023] Construct the state transition model of the target; the expression of the state transition model is: x k = f(x k-1 , μ k-1 , w k-1) , where x k represents the state vector of the target at time step k, x k-1 represents the state vector of the target at time step k - 1, μ k-1 represents the UWB data of the target at time step k - 1, w k-1 represents the noise of μ k-1 , time step k is the current moment, and time step k - 1 is the previous moment of the current moment;
[0024] Obtain the covariance matrix P k of the target at time step k through the calculation formula P k-1 = FP T F k + Q; where F represents the state transition matrix, Q represents the process noise covariance matrix, and P k-1 represents the covariance matrix of the target at time step k - 1;
[0025] Obtain through the calculation formula
[0026] K = P k H T (HP k H T + R) -1
[0027] x' k = x k + K(z k - Hx k )
[0028] P k = (I - KH)P k
[0029] Obtain the filtered UWB data x' k ; where H represents the observation matrix, R represents the measurement noise covariance matrix, z k represents the observation vector, z k = h(x k , v k ), v k represents the observation noise, h() represents the observation model, and I represents the identity matrix.
[0030] Optionally, use the exponential smoothing algorithm to smooth the filtered UWB data to obtain the smoothed UWB data, including:
[0031] By the calculation formula S t = ax' k + (1 - α)S t-1 , obtain the smoothed UWB data S t , t represents the current time, S t-1 represents the UWB data of the target at time t - 1; where α represents the smoothing coefficient, α ∈ [0, 1].
[0032] Optionally, use the cubic spline interpolation algorithm to interpolate the smoothed UWB data to obtain the interpolated UWB data, including:
[0033] By the calculation formula h t = S t+1 - S t , obtain the distance h t+1 between the position S t of the target at time t + 1 and the position S t of the target at time t;
[0034] Construct the cubic spline polynomial: S t (x t ) = a t + b t (x - x t ) + c t (x - x t ) 2 + d t (x - x t ) 3 ;
[0035] Using the distance h t Solve for the coefficients a t , b t , c t , d t ;
[0036] Substitute the solved coefficients a t , b t , c t , d t into the cubic spline polynomial to obtain the equation of the curve of the interpolated UWB data from time t to time t + 1, and obtain the interpolated UWB data according to the equation of the curve;
[0037] wherein, x t represents the smoothed UWB data, and x represents the data obtained by processing the UWB data of the target at time t + 1 through unscented Kalman filtering and exponential smoothing algorithm in sequence.
[0038] Optionally, correct the interpolated UWB data according to the speed and position jitter index of the target at the current moment to obtain the corrected UWB data, including:
[0039] Use the value of the position jitter index as the speed threshold;
[0040] Determine the current speed of the target at the current moment according to the positions of the target at the current moment and multiple moments after the current moment;
[0041] If the current speed is less than the speed threshold and the absolute value of the position of the target at the current moment minus the position of the previous moment is less than the preset distance threshold, correct the position of the target in the interpolated UWB data to the position of the previous moment of the target at the current moment.
[0042] In a second aspect, the present application provides an indoor positioning device based on UWB, including:
[0043] A data preprocessing module, configured to collect historical UWB data of the target at multiple historical moments and calculate the position jitter index of the target according to the historical UWB data;
[0044] A primary processing module, configured to collect real-time UWB data of the target at the current moment, filter the real-time UWB data by using unscented Kalman filtering to obtain filtered UWB data;
[0045] A secondary processing module, configured to smooth the filtered UWB data by using an exponential smoothing algorithm to obtain smoothed UWB data;
[0046] A tertiary processing module, configured to interpolate the smoothed UWB data by using a cubic spline interpolation algorithm to obtain the interpolated UWB data;
[0047] A data correction module, configured to correct the interpolated UWB data according to the speed and position jitter index of the target at the current moment to obtain the corrected UWB data.
[0048] In a third aspect, the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the indoor positioning method described above is implemented.
[0049] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the indoor positioning method described above is implemented.
[0050] The above solution of the present application has the following beneficial effects:
[0051] The indoor positioning method based on UWB provided by the present application can effectively reduce the noise interference in the UWB data, reduce data jitter, and improve the accuracy of indoor positioning by filtering, smoothing, and interpolating the real-time UWB data at the current moment; by calculating the position jitter index to correct the UWB data, the data jitter error is further reduced, and the accuracy of indoor positioning is improved.
[0052] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0054] Figure 1 It is a flowchart of the indoor positioning method based on UWB provided by an embodiment of the present application;
[0055] Figure 2 It is a schematic structural diagram of the indoor positioning device based on UWB provided by an embodiment of the present application;
[0056] Figure 3 It is a schematic structural diagram of the terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0057] In the following description, specific details such as specific system architectures, technologies, etc. are presented for purposes of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obscuring the description of the present application.
[0058] It should be understood that when used in the specification and claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0059] It should also be understood that the term "and / or" as used in the specification and claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0060] As used in the specification and claims of the present application, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" depending on the context.
[0061] In addition, in the description of the specification and claims of the present application, the terms "first", "second", "third", etc. are only used for differentiating descriptions and cannot be understood as indicating or implying relative importance.
[0062] The reference to "one embodiment" or "some embodiments" or the like described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0063] Regarding the data jitter problem existing in UWB data, the present application provides a UWB-based indoor positioning method. By filtering, smoothing, and interpolating the real-time UWB data at the current moment, it can effectively reduce the noise interference in the UWB data, reduce data jitter, and improve the accuracy of indoor positioning. By calculating the jitter index of the historical UWB data to correct the UWB data, the data jitter error is further reduced, and the accuracy of indoor positioning is improved.
[0064] The following specifically describes the UWB-based indoor positioning method provided by the present application.
[0065] As Figure 1 shown, the UWB-based indoor positioning method includes the following steps:
[0066] Step 11, collect the historical UWB data of the target at multiple historical moments, and calculate the position jitter index of the target according to the historical UWB data.
[0067] It should be understood that in the related art, the UWB positioning technology means that: the tag (i.e., the above-mentioned target) sends a short-pulse UWB signal, and after multiple anchors (i.e., reference points) receive the short-pulse UWB signal, calculate the propagation time of the short-pulse UWB signal, calculate the distance between the tag (target) and the anchor (reference point), and obtain the coordinates of the tag (target) based on this distance. Exemplarily, through geometric algorithms (such as trilateration or multilateration), using the distance data between multiple anchors and the tag, the three-dimensional position of the tag (target) can be deduced. Among them, the tag can send a short-pulse UWB signal through the UWB sensor installed on itself.
[0068] In an embodiment of the present application, the UWB data of the target refers to the position of the target determined based on the UWB positioning technology. It can be understood that the above-mentioned historical UWB data refers to the position of the target at historical moments.
[0069] It should be noted that calculating the position jitter index here is to prepare for eliminating the data jitter of the UWB data subsequently.
[0070] Specifically, the calculation formula of the jitter index is:
[0071]
[0072] where MAD represents the position jitter index, N represents the total number of historical moments, i represents the i-th historical moment, j represents the j-th historical moment, x i represents the historical UWB data at the i-th historical moment, x j represents the historical UWB data at the j-th historical moment, i, j = 1, 2,..., N, i ≠ j.
[0073] Step 12, collect the real-time UWB data of the target at the current moment, and filter the real-time UWB data using the unscented Kalman filter to obtain the filtered UWB data.
[0074] The above real-time UWB data refers to the position of the target at the current moment, which is determined based on the UWB positioning technology.
[0075] The following describes the process of filtering the real-time UWB data using the unscented Kalman filter to obtain the filtered UWB data, including steps 12.1 to 12.3:
[0076] Step 12.1, construct the state transition model of the target.
[0077] The expression of the above state transition model is: x k = f(x k-1 , μ k-1 , w k-1 ), where x k represents the state vector of the target at time step k, x k-1 represents the state vector of the target at time step k-1, μ k-1 represents the UWB data of the target at time step k-1, w k-1 represents the noise of μ k-1 , time step k is the current moment, and time step k-1 is the previous moment of the current moment.
[0078] The above state vector can reflect the motion state of an object (i.e., the target), and it can be composed of multiple state variables (these state variables can be position, velocity, acceleration, etc.). In this application, only the position value is used as the state variable to calculate the state vector.
[0079] Step 12.2, obtain the covariance matrix P k = FP k-1 F T + Q of the target at time step k. k .
[0080] Among them, F represents the state transition matrix, Q represents the process noise covariance matrix, which is a parameter describing the uncertainty of the system model and is used to describe the uncertainty or noise in the system model. P k-1 represents the covariance matrix of the target at time step k-1, Δt is the data update interval, such as 0.02 seconds.
[0081] Step 12.3, through the calculation formula
[0082] K = P kH T (HP k H T +R) -1
[0083] x' k =x k +K(z k -Hx k )
[0084] P k =(I-KH)P k
[0085] Get the filtered UWB data x' k , x' k It can also be understood as a filtered state vector.
[0086] Where H is the observation matrix, which is used to map the state vector of the system to the observation space. R is the measurement noise covariance matrix, which describes the statistical characteristics of the observation noise and reflects the uncertainty or noise level in the observation data. k represents the observation vector, z k =h(x k ,v k ), v k represents observation noise, h() represents the observation model, and I represents the identity matrix.
[0087] Step 13: Smoothing the filtered UWB data using an exponential smoothing algorithm to obtain smoothed UWB data.
[0088] Specifically, the formula S can be used to calculate t =ax' k +(1-α)S t-1 , get the smoothed UWB data S t , t represents the current time, S t-1 represents the UWB data of the target at time t-1; where α represents the smoothing coefficient, α∈[0,1].
[0089] Step 14: interpolate the smoothed UWB data using a cubic spline interpolation algorithm to obtain interpolated UWB data.
[0090] Specifically, the interpolation process includes steps 14.1 to 14.3:
[0091] Step 14.1, calculate the formula h t =S t+1 -S t , get the position S of the target at time t+1 t+1 and the position S of the target at time t tThe distance h between t . Wherein, time t + 1 is the next moment of time t, and time t - 1 is the previous moment of time t.
[0092] It should be noted that since the UWB data of the target at each moment needs to go through three-level processing of filtering, smoothing, and interpolation, when the UWB data at time t enters the interpolation processing, the UWB data at time t + 1 has already undergone smoothing processing. Therefore, the position S of the target at time t + 1 can be calculated t+1 and the position S of the target at time t t The distance h between t .
[0093] Step 14.2, construct a cubic spline polynomial:
[0094] S t (x t ) = a t + b t (x - x t ) + c t (x - x t ) 2 + d t (x - x t ) 3 ; where x t represents the smoothed UWB data (i.e., the data obtained by sequentially performing unscented Kalman filtering and exponential smoothing algorithm on the UWB data of the target at time t), and x represents the data obtained by sequentially performing unscented Kalman filtering and exponential smoothing algorithm on the UWB data of the target at time t + 1.
[0095] It should be noted that the position referred to by the above UWB data is a two-dimensional coordinate position, usually including the abscissa x and the ordinate y. Of course, for the convenience of distinguishing the positions at each moment, corresponding to each moment, the abscissa x and the ordinate y can be distinguished by adding subscripts. For example, the position at time t can be expressed as: the abscissa is x t , and the ordinate is y t .
[0096] It can be understood that the above cubic spline polynomial is constructed according to the interpolation condition and the derivative continuity condition. The interpolation conditions are: S t (x t ) = y t and S t (x t+1 ) = y t+1 ; the derivative continuity conditions are: S t (x t+1 ) = S t+1 (x t+1 ); first-order derivative continuity: S′ t (xt+1 ) = S' t+1 (x t+1 ); Second - derivative continuity: S″ t (x t+1 ) = S″ t+1 (x t+1 ); Boundary conditions (natural boundary, second - derivative is zero at the boundary): S″1(x1) = 0 and S″ t-1 (x t ) = 0. S t (x t+1 ) represents the result of the cubic spline function in the interval t~t + 1 at x = x t+1 . S t+1 (x t+1 ) represents the result of the cubic spline function in the interval t + 1~t + 2 at x = x t+1 . S″ t-1 (x t ) represents the second - derivative of the interval t - 1~t at x = x t . It can be understood that x here represents the independent variable of the cubic spline function.
[0097] Among them, t > 0. When constructing the cubic spline polynomial, for each t (that is, each t when taking different values):
[0098]
[0099] It should be noted that when t = 0, no interpolation is performed, and the exponentially smoothed data is directly output. It can be understood that this filtering system has an initialization process. During initialization, not all filtering algorithms are useful.
[0100] Step 14.3, use the distance h t to solve the coefficients a t , b t , c t , d t of the cubic spline polynomial, and substitute the obtained coefficients a t , b t , c t , d t into the cubic spline polynomial to obtain the equation of the curve of the interpolated UWB data from the t - th moment to the (t + 1) - th moment, and obtain the interpolated UWB data according to the equation of the curve.
[0101] In some embodiments of the present application, the equation of the curve from the t - th moment to the (t + 1) - th moment can be denoted as S t (x t ) = y t . From this, the coordinates (x new , ynew )。Among them, x new represents the abscissa of the interpolation position, and y new represents the ordinate corresponding to this abscissa. x new will take continuous numbers between x t and x t+1 . Specifically, according to different definitions of interpolation points, there will be different results. For example, if x t = 0 and x t+1 = 1, then ten interpolation values can be customarily selected. Then x new can be equal to 0, 0.1, 0.2,..., 0.8, 0.9, 1, and the corresponding y new can be obtained from the curve equation S t (x t ) = y t . Specifically, y new refers to the value of y new corresponding to the abscissa x t . This value of y t is the result of the cubic spline function in the interval t to t + 1 at x = x new .
[0102] In some embodiments of the present application, C can be first solved through the above formula: r :
[0103]
[0104] Then, a t , b t , a t are calculated through the following formula:
[0105] a t = y t
[0106]
[0107]
[0108] Step 15. Correct the interpolated UWB data according to the speed and position jitter index of the target at the current moment to obtain the corrected UWB data.
[0109] In some embodiments of the present application, the interpolated UWB data can be corrected through the following steps:
[0110] Step 15.1. Use the value of the position jitter index as the speed threshold.
[0111] Step 15.2: Determine the current speed of the target at the current moment based on the positions of the target at the current moment and at multiple moments after the current moment.
[0112] Since the position data at a single moment is not highly reliable and there are deviations. Therefore, to improve the accuracy, the target can be controlled to be stationary for a preset time (for example, a time period including the current moment and multiple moments after the current moment), and then the current speed of the target at the current moment can be determined based on the positions of the target at the current moment and at multiple (such as 19) moments after the current moment.
[0113] Specifically, first calculate the average speed of the target between every two adjacent moments based on the positions of the target at the current moment and at multiple (such as 19) moments after the current moment; then take the average value of each average speed as the current speed of the target at the current moment.
[0114] Specifically, the average speed v of the target between the (n + 1)-th and the n-th moments can be obtained through the calculation formula
[0115]
[0116] where (x n , y n ) represents the UWB data of the target at the n-th moment, x n is the abscissa of this UWB data, y n is the ordinate of this UWB data, t n represents the n-th moment, (x n+1 , y n+1 ) represents the UWB data of the target at the (n + 1)-th moment; x n+1 is the abscissa of this UWB data, y n+1 is the ordinate of this UWB data, t n+1 represents the (n + 1)-th moment.
[0117] Step 15.3: If the current speed is less than the speed threshold (such as 0.5 m / s), and the absolute value of the difference between the position of the target at the current moment and the position at the previous moment is less than the preset distance threshold (such as 15 cm), correct the position of the target in the interpolated UWB data to the position of the target at the moment before the current moment (that is, correct the interpolated UWB data to the position of the target at the moment before the current moment); otherwise, there is no need to correct the interpolated UWB data, and this interpolated UWB data is the actual position.
[0118] This measure can eliminate the positioning error caused by data jitter in the UWB data and improve the accuracy of indoor positioning.
[0119] In summary, the indoor positioning method based on UWB provided by this application can effectively reduce the noise interference in UWB data, reduce data jitter, and improve the accuracy of indoor positioning by filtering, smoothing, and interpolating the real-time UWB data at the current moment; by calculating the jitter index and average speed of historical UWB data, the UWB data is corrected, further reducing the data jitter error and improving the accuracy of indoor positioning.
[0120] The indoor positioning device based on UWB provided by this application will be described below by way of example.
[0121] As Figure 2 shown, the indoor positioning device 200 based on UWB includes:
[0122] A data preprocessing module 201, configured to collect historical UWB data of a target at multiple historical moments, and calculate the jitter index of the historical UWB data according to the historical UWB data;
[0123] A primary processing module 202, configured to collect real-time UWB data of a target at the current moment, and filter the real-time UWB data by using an unscented Kalman filter to obtain filtered UWB data;
[0124] A secondary processing module 203, configured to perform smoothing processing on the filtered UWB data by using an exponential smoothing algorithm to obtain smoothed UWB data;
[0125] A tertiary processing module 204, configured to perform interpolation on the smoothed UWB data by using a cubic spline interpolation algorithm to obtain interpolated UWB data;
[0126] A data correction module 205, configured to correct the interpolated UWB data according to the speed and position jitter index of the target at the current moment to obtain corrected UWB data.
[0127] It should be noted that for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiment of this application, their specific functions and the technical effects brought can be specifically referred to in the method embodiment part, and will not be elaborated here.
[0128] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiment and will not be repeated here.
[0129] As Figure 3 shown, an embodiment of the present application provides a terminal device. As Figure 3 shown, the terminal device D10 in this embodiment includes: at least one processor D100 ( Figure 3 only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, it implements the steps in any of the foregoing method embodiments.
[0130] Specifically, when the processor D100 executes the computer program D102, by filtering, smoothing, and interpolating the real-time UWB data at the current moment, it can effectively reduce the noise interference in the UWB data, reduce data jitter, and improve the accuracy of indoor positioning; by calculating the position jitter index to correct the UWB data, the data jitter error is further reduced, and the accuracy of indoor positioning is improved.
[0131] The so-called processor D100 may be a central processing unit (CPU, Central Processing Unit). This processor D100 may also be other general-purpose processors, digital signal processors (DSP, Digital Signal Processor), application specific integrated circuits (ASIC, Application Specific Integrated Circuit), field-programmable gate arrays (FPGA, Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0132] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In some other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device D10. Further, the memory D101 may also include both the internal storage unit and the external storage device of the terminal device D10. The memory D101 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program codes of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0133] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, which when executed by a processor, can implement the steps in the above-mentioned method embodiments.
[0134] An embodiment of the present application provides a computer program product, which when running on a terminal device, enables the terminal device to execute the steps in the above-mentioned method embodiments.
[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the UWB-based indoor positioning device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium may not be an electrical carrier signal and a telecommunication signal.
[0136] In the above embodiments, each embodiment is described with a particular emphasis. For the parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0137] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0138] In the embodiments provided in this application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0139] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0140] The above is the preferred implementation mode of this application. It should be pointed out that for those of ordinary skill in the art of this technology, without departing from the principle described in this application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of this application.
Claims
1. An indoor positioning method based on UWB, characterized in that, Including: Collecting historical UWB data of the target at multiple historical moments, and calculating the position jitter index of the target according to the historical UWB data; Collecting real-time UWB data of the target at the current moment, filtering the real-time UWB data by using unscented Kalman filter to obtain filtered UWB data; Performing smoothing processing on the filtered UWB data by using exponential smoothing algorithm to obtain smoothed UWB data; Performing interpolation on the smoothed UWB data by using cubic spline interpolation algorithm to obtain interpolated UWB data; Correcting the interpolated UWB data according to the speed of the target at the current moment and the position jitter index to obtain corrected UWB data; The calculation formula of the position jitter index is: Among them, MAD represents the position jitter index, N represents the total number of the historical moments, i represents the i-th historical moment, j represents the j-th historical moment, and x i represents the historical UWB data at the i-th historical moment, and x j represents the historical UWB data at the j-th historical moment, where i, j = 1, 2,..., N and i ≠ j; The step of correcting the interpolated UWB data according to the speed of the target at the current moment and the position jitter index to obtain corrected UWB data includes: Taking the value of the position jitter index as the speed threshold; Determining the current speed of the target at the current moment according to the position of the target at the current moment and at multiple moments after the current moment; If the current speed is less than the speed threshold and the absolute value of the difference between the position of the target at the current moment and the position of the previous moment is less than a preset distance threshold, correcting the position of the target in the interpolated UWB data to the position of the previous moment of the target at the current moment.
2. The indoor positioning method according to claim 1, wherein The step of filtering the real-time UWB data by using unscented Kalman filter to obtain filtered UWB data includes: Construct the state transition model of the target; the expression of the state transition model is: x k = f(x k-1 , μ k-1 , w k-1 ), where x k represents the state vector of the target at time step k, x k-1 represents the state vector of the target at time step k - 1, μ k-1 represents the UWB data of the target at time step k - 1, w k-1 represents the noise of μ k-1 , the time step k is the current moment, and the time step k - 1 is the previous moment of the current moment; By calculating the formula P k = FP k-1 F T + Q, the covariance matrix P of the target at time step k is obtained k ; where F represents the state transition matrix, Q represents the process noise covariance matrix, and P k-1 represents the covariance matrix of the target at time step k - 1; Through the calculation formula K = P k H T (HP k H T + R) -1 x' k = x k + K(z k - Hx k ) P k = (I - KH)P k Obtain the filtered UWB data x′ k ; where, H represents the observation matrix, R represents the measurement noise covariance matrix, z k represents the observation vector, z k = h(x k , v k ), v k represents the observation noise, h() represents the observation model, and I represents the identity matrix.
3. The indoor positioning method according to claim 2, wherein, The step of performing smoothing processing on the filtered UWB data by using exponential smoothing algorithm to obtain smoothed UWB data includes: By calculating the formula S t = ax' k + (1 - α)S t-1 , the smoothed UWB data S t is obtained, where t represents the current moment, and S t-1 represents the UWB data of the target at the moment t - 1; among them, α represents the smoothing coefficient, and α ∈ [0, 1].
4. The indoor positioning method according to claim 3, wherein, The step of performing interpolation on the smoothed UWB data by using cubic spline interpolation algorithm to obtain interpolated UWB data includes: By calculating the formula h t = S t+1 - S t , the position S t+1 of the target at time t + 1 and the position S t of the target at time t are obtained, and the distance h t between them; Construct the cubic spline polynomial: S t (x t ) = a t + b t (x - x t ) + c t (x - x t ) 2 + d t (x - x t ) 3 ; Using the distance h t to solve for the coefficients a t , b t , c t , d t ; Substitute the obtained coefficients a t , b t , c t , d t into the cubic spline polynomial to obtain the equation of the curve of the interpolated UWB data from time t to time t + 1, and obtain the interpolated UWB data according to the equation of the curve; Among them, x t represents the smoothed UWB data, and x represents the data obtained by processing the UWB data of the target at time t + 1 through unscented Kalman filtering and exponential smoothing algorithm in sequence.
5. An indoor positioning device based on UWB, characterized in that, Applied to the UWB-based indoor positioning method according to any one of claims 1 to 4, including: A data preprocessing module, configured to collect historical UWB data of the target at multiple historical moments, and calculate the position jitter index of the target according to the historical UWB data; A primary processing module, configured to collect real-time UWB data of the target at the current moment, filter the real-time UWB data by using unscented Kalman filter to obtain filtered UWB data; A secondary processing module, configured to perform smoothing processing on the filtered UWB data by using exponential smoothing algorithm to obtain smoothed UWB data; A tertiary processing module, configured to perform interpolation on the smoothed UWB data by using cubic spline interpolation algorithm to obtain interpolated UWB data; A data correction module, configured to correct the interpolated UWB data according to the speed of the target at the current moment and the position jitter index to obtain corrected UWB data.
6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that When the processor executes the computer program, it implements the indoor positioning method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the indoor positioning method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Indoor cross-region seamless positioning system based on UWB technology
CN110121150A
Spatial real-time positioning method, computer device and computer readable storage medium
CN110657799A