[0054] Specific embodiment 1. Static experiment in line-of-sight environment
[0055] The preferred ultra-wideband indoor positioning hardware chip of the present invention is DWM1000, the device has the function of receiving and sending ultra-wideband signals, can realize wireless data transmission in the process of signal exchange, and can provide receiving time stamps and sending time stamps, time resolution is 1/(128×499.2×10 6 )second.
[0056] The number of base stations is preferably 4 or more.
[0057] The specific implementation steps of the method of the present invention are as follows:
[0058] Step 1: First, establish a spatial Cartesian coordinate system indoors. Arrange 4 base stations in indoor fixed positions so that the 4 base stations are not coplanar. The base station close to the indoor center is selected as the main base station, denoted as base station 1, and the other base stations are respectively denoted as base station 2 to base station 4, measure and record the coordinates of each base station, measure and record the distance from base station 1 to other base stations, and the specific layout like figure 2 shown.
[0059] Step 2: Fix the positioning device at a test point to construct static experimental conditions, measure and record the distance from the positioning device to each base station; let the base station and the positioning device work for an hour to make the system fully stable.
[0060] Step 3: The base station transmits the indoor positioning signal according to the signal exchange mechanism, the indoor positioning device receives the indoor positioning signal, and uses the Kalman filter combined with the indoor positioning model to perform clock offset compensation.
[0061] Ideal clock synchronization means that the base station and the positioning device use the same clock signal as the clock source, but this method is difficult to achieve. In practical applications, each device in the system has its own set of clock systems, which are independent of each other. . In order to establish a unified clock system, the present invention takes the real time that elapses evenly in reality as the system time, and the clock of each device is a reflection of each moment in reality, which is defined as the device time, so the device time and the real time Time has a one-to-one correspondence, and the starting points of the clocks of the four base stations and the positioning device are set to be t respectively. 01 , t 02 , t 03 , t 04 , t 05 , the clock frequency is λ 1 (t), λ 2 (t), λ 3 (t), λ 4 (t), λ 5 (t). So for any device i (i=1,2,...,5) in the system, the device time t device and the corresponding real time t′ real Satisfy the following relationship:
[0062]
[0063] The system transmits signals such as image 3 shown, assuming that device i is at the device time t send transmits a ranging signal, and the device responds to t send The measured value is After a fixed system time offset Δt i1 After the signal at real time t' send Leaving the antenna, the process of transmitting a signal satisfies the following relationship:
[0064]
[0065]
[0066] In formula (3), is the measurement error of device i measuring the sent timestamp, zero-mean Gaussian white noise.
[0067] The process of receiving the signal by the system is as follows: Figure 4 shown, assuming a ranging signal at real time t' receive reaching the antenna of device i, after a fixed system time offset Δt i2 After that, at the device time t receive receives this signal, and the device responds to t receive The measured value is The process of receiving a signal satisfies the following relationship:
[0068]
[0069]
[0070] In formula (5), φ i The measurement error of the transmitted timestamp for device i is measured with zero mean Gaussian white noise.
[0071] Signal exchange mechanisms such as Figure 5 As shown, the system includes 4 base stations. Base station 1 is the master station, and its role is to coordinate the system signal exchange mechanism, and at the same time send ranging signals and provide time information to all other base stations and positioning equipment. Base station 2 to base station 4 are secondary stations, and under the control of base station 1, send ranging signals and provide time information to the positioning device and base station 1 respectively. The positioning device is a user that needs to be located in practice, and completes the positioning by receiving ranging signals from base stations 1 to 4 and using the time information of base stations 1 to 4 and itself. The system signaling exchange mechanism conducts signaling in groups. Base station 1 sends a ranging signal. After base station 2 and the positioning device respectively receive the signal from base station 1, base station 2 sends another ranging signal after a certain delay, and then base station 1 and the positioning device receive the signal from base station 2 respectively. A set of signal exchanges, such as Image 6 shown. The other two sets of signals communicate similarly. The three groups of signal exchange sequences constitute one cycle of the system signal exchange mechanism. It can be seen from the system signal exchange mechanism that the positioning device only passively receives ranging signals from the base station, and does not conduct two-way information exchange with the base station. And its own time information to complete the positioning, so the system breaks the limit of the system user capacity, and theoretically can locate an unlimited number of users at the same time. In addition, the change of the number of users does not affect the signal exchange sequence between the base stations of the system, so the system has a high degree of flexibility and practicability.
[0072] According to Equation (2) and Equation (4), the following mathematical relationship can be established for the first group of signal exchange sequence in one cycle of the signal exchange mechanism:
[0073]
[0074]
[0075]
[0076]
[0077] In formula (6)(7)(8)(9), t 11 represents the transmission timestamp of base station 1, and the ranging signal is at the real time t' 11 away from the antenna; t 12 represents the reception timestamp of base station 1 and the ranging signal at real time t' 12 reaching the antenna; t 51 and t 52 represents the receiving timestamp of the positioning device, and the ranging signal is respectively at the real time t' 51 and t' 52 reaching the antenna; Δt 11 and Δt 12 Respectively represent the fixed time delay of base station 1 transmitting and receiving signals; Δt 52 Represents a fixed time delay in the receiving of the signal by the positioning device.
[0078] In practice, the duration of one cycle of the signal exchange sequence is quite short, usually on the order of milliseconds, and the moving speed of indoor users is usually relatively slow, so it can be considered that the user is stationary within a cycle. In a non-line-of-sight environment, the time the signal travels between nodes will be larger than in a line-of-sight environment. Since base station 1 to base station 4 are installed in fixed positions, the influence of the environment on the signal exchange between base stations is fixed, while the position of the positioning device is mobile, so the influence of the environment on the signal exchange between the base station and the positioning device varies with The location of the positioning device changes. Therefore, the signal propagation time and the actual distance between nodes satisfy the following relationship:
[0079] d 15 =c(t' 51 -t' 11 -Δt' 15 (P)) (10)
[0080] d 12 =c(t 12 '-t 22 '-Δt' 21 ) (11)
[0081] d 25 =c(t' 52 -t' 22 -Δt' 25 (P)) (12)
[0082] In equations (10) (11) (12), P represents the position of the positioning device; Δt′ 21 Represents the propagation time error caused by the environment to the signal propagating from base station 2 to base station 1; Δt' 15 (P) and Δt′ 25 (P) represents the propagation time error caused by the environment to the signal propagating from the base station 1 to the positioning device and the base station 2 to the positioning device, respectively; d 12 , d 15 , d 25 Respectively represent the distance from base station 1 to base station 2, the distance from base station 1 to the positioning device, and the distance from base station 2 to the positioning device; c represents the speed of light.
[0083] From formula (10)(11)(12), we can get:
[0084] c(t' 12 -t' 11 )-c(t' 52 -t' 51 )=d 1 -Δd 1 (13)
[0085] in:
[0086] d 1 =d 12 +d 15 -d 25 (14)
[0087] Δd 1 =c(Δt' 25 (P)-Δt′ 15 (P)-Δt′ 21 ) (15)
[0088] In the formula, d 1 and Δd 1 respectively represent the distance between the actual nodes and the distance error caused by the environment. From equations (6)(7)(8)(9) and the median theorem, we can get:
[0089]
[0090]
[0091] In the formula, ξ 5 and ξ 1 respectively represent the interval (t' 51 +Δt 52 ,t′ 52 +Δt 52 ) and (t′ 11 -Δt 11 ,t′ 12 +Δt 12 ) in a constant. From formula (13)(16)(17), we can get:
[0092] c[k 1 (t 12 -t 11 )-k 5 (t 52 -t 51 )]-Δd=d 1 -Δd 1 (18)
[0093] in:
[0094]
[0095]
[0096] Δd=c(Δt 12 +Δt 11 ) (twenty one)
[0097] In the formula, k 1 and k 5 respectively represent the time resolution of the base station 1 and the positioning device; Δd represents the distance constant caused by the fixed time offset of the base station 1 in the process of transmitting and receiving signals. The other two groups in one cycle are pushed to a similar process, which will not be described in detail in the present invention. Since the time resolution of the device does not change or changes very little in a short period of time, the time resolution of the device is considered to be constant within one cycle. By deriving the other two sets of equations, the system positioning model can be obtained as:
[0098]
[0099] The clock offset compensation method mainly includes the following five steps:
[0100] 1) Separate a group of signal exchange processes from the signal exchange mechanism, and use the received signal and the transmitted signal model to establish a mathematical model of time;
[0101] 2) Combine the location information of the base station and the positioning device to establish a mathematical model of time and distance;
[0102] 3) Calculate the observation value of the clock offset compensation coefficient, that is, the time resolution ratio between the positioning device and the base station;
[0103] 4) Establish the state equation and the observation equation of the clock offset compensation, perform the Kalman filter calculation, and obtain the estimated value of the clock offset compensation coefficient;
[0104] 5) By judging whether the difference between the observed value of the clock offset compensation coefficient and the estimated value of the clock offset compensation coefficient exceeds the threshold value, remove the outliers in the observed data, and obtain the result after clock offset compensation.
[0105] Figure 5 The signal exchange mechanism given in satisfies the following relationship:
[0106]
[0107]
[0108]
[0109]
[0110] The positioning device is at t' 5,n The time position is P n , the positioning device is at t′ 5,n+1 The time position is P n+1 , the distance between the two positions is The average speed of the positioning device between the two times is v n , the actual position relationship, such as Figure 7 shown. have to:
[0111]
[0112]
[0113]
[0114] According to formula (23)(24)(25)(26)(27)(28)(29), we can get:
[0115]
[0116] In (30),
[0117]
[0118]
[0119]
[0120] In formula (31), and respectively represent the time resolution of the positioning device and the current moment of base station 1; x n Indicates the clock skew compensation coefficient.
[0121] When the positioning device is in a static state, the values of parameters a and b are 0; when the positioning device is in a moving state, since the value of parameter a is extremely small, the value of a is still treated as 0. For short-distance movement of the positioning device, the channel of the signal propagating from the base station 1 to the positioning device usually does not change suddenly, so the influence of the environment on the signal is basically unchanged. In this case, the value of b can also be treated as 0. However, if the channel in which the signal propagates changes, b will increase or decrease significantly, and the group of data can be discarded by judging whether the deviation between the measured value and the estimated value exceeds a certain set threshold value.
[0122] Since the clock sources of the devices in the system have high stability, the clock offset compensation coefficient is stable and is affected by zero-mean Gaussian white noise. The system state equation of the clock offset compensation model is:
[0123] x n+1 =x n +η (34)
[0124] In the formula, η is a zero-mean Gaussian white noise sequence, which represents the deviation caused by the drift of the system clock itself. By formula (30), and making the values of a and b 0, we can get:
[0125]
[0126] The measured value of the system is represented by w, then take:
[0127]
[0128] Due to the random noise bias of the system's measurements of timestamps:
[0129]
[0130] where ε can be approximated as white Gaussian noise with zero mean.
[0131] From equations (35) (36) (37), the measurement equation of the clock offset compensation model can be obtained as:
[0132] w n =x n +ε (38)
[0133] According to equations (34) and (38), the Kalman filter algorithm can be expressed as:
[0134]
[0135] The system is a linear time-invariant system, and the Kalman filter algorithm can be preferably the limit Kalman filter algorithm, because when the linear system changes slowly, it can be proved that {G n} is convergent.
[0136] Pick:
[0137]
[0138] The limit Kalman filter algorithm is:
[0139]
[0140] In summary, the clock offset compensation expression is,
[0141]
[0142] Step 4: Use the Taylor iteration method to estimate the equipment space coordinates;
[0143] Record the coordinates of the four base stations as BS1(x 1 ,y 1 ,z 1 ), BS2(x 2 ,y 2 ,z 2 ), BS3(x 3 ,y 3 ,z 3 ), BS4(x 4 ,y 4 ,z 4 ); set the coordinates of the positioning device to be positioned as (x, y, z); set the distance between the positioning device and the four base stations to be r respectively 1 , r 2 , r 3 , r 4 , then there are:
[0144]
[0145] It is difficult to directly solve the coordinates (x, y, z) of the positioning device for the above equation. The equation can be expanded by Taylor binomial, and then all terms other than the first two terms can be omitted. The Taylor expansion becomes a linear formula, and the final solution can be obtained by solving this linear formula.
[0146] The Taylor iteration method requires an estimate, assuming (x R ,y R ,z R ) represents the estimated position of the positioning device, then a deviation equation can be obtained:
[0147]
[0148] In the formula, Δx, Δy, and Δz represent the deviation between the estimated and actual positions.
[0149] The Taylor iteration method uses the initial value to perform the estimation operation, and each operation can obtain a more optimal value, so as to iterate until the optimal value is obtained. Calculate the deviation (Δx, Δy, Δz) of the positioning node to get:
[0150]
[0151] In formula (45), Q represents the covariance of the measured value based on the time difference of arrival positioning method.
[0152]
[0153]
[0154] In the formula, r 1R , r 2R , r 3R , r 4R They represent the distances from the estimated position of the positioning device to base station 1 to base station 4, respectively. A set of (Δx, Δy, Δz) is obtained by calculation, and a new coordinate point is solved by using formula (44), and the coordinate point is used as a new positioning device estimation point for the next iteration.
[0155] Step 5: Repeat step 3 and step 4, and perform iterative calculation until Δx, Δy, and Δz are small enough to reach the threshold ε, that is, Δx 2 +Δy 2 +Δz 2 2 , the system works for an hour, collects the measurement data of the time stamp by the system, and then stops the iteration to obtain the coordinate value (x, y, z) of the positioning node, and completes the indoor positioning of a single point.
[0156] In order to verify the indoor positioning accuracy under static conditions, the position of the positioning equipment was changed, and a total of 15 points were tested.
[0157] MATLAB software is used to simulate the clock offset compensation algorithm with the measured data. The simulation results of 4 groups of 15 groups of experiments are as follows: Figure 8Aa , Figure 8Ab , Figure 8Ba , Figure 8Bb , Figure 8Ca , Figure 8Cb , Figure 8Da , Figure 8Db, shown. The results show that the clock offset compensation algorithm can effectively filter out the noise and estimate the clock offset compensation coefficient from the observation data in real time.
[0158] Using MATLAB software to simulate the system output time data, the simulation results are as follows Figure 9a , Figure 9b The results show that each step represents a set of time data of a sampling point, and the time data output by the system has excellent stability.
[0159] 45 discrete points consisting of time data and recorded distance data were simulated with MATLAB software, and the simulation results were as follows Figure 10 The results show that the time data and the distance data have a good linear relationship.
[0160] Use the least squares method to estimate the coefficients to determine the linear model, calculate the distance through the system model, and use the MATLAB software to simulate the difference between the calculated distance and the experimentally recorded distance. The simulation results are as follows: Figure 11 As shown, the results show that the distance calculated by the model deviates from the true distance by 229mm (RMS).
[0161] In the indoor static positioning experiment, in a plane 1500mm from the ground, 15 suitable test points were selected to fix the positioning equipment for positioning. The test point location plan is as follows Figure 12 shown. The indoor static experiment positioning results are as follows: Figure 13a , Figure 13b , Figure 13c shown. The results show that when the positioning device is in a static state, the system positioning coordinate value has better stability. Positioning errors such as Figure 14a , Figure 14b , Figure 14c shown. The results show that the positioning error of the system in the X-axis and Y-axis is 166mm (RMS) and 119mm (RMS) respectively, and the positioning error of the Z-axis is 483mm (RMS), which has a high positioning accuracy.