# A New Hybrid Positioning Method by Fusion of BDS and 5G Signal Using the Particle Swarm Method
## 2 System Model  
The BDS is based on the satellite receiver receiving the satellite position and the pseudorange for the operation to determine the user's position. In general, three formulas based on the distance between satellite stations can be formed using three satellites, and the spatial position of the user observation station can be calculated by forming an equation. In the process of real positioning, there is also a deviation between the satellite clock and the receiver clock. It is necessary to introduce the error into the equation group as an unknown quantity and calculate it together. Therefore, the pseudorange value \(\rho\) received by the BDS receiver (which corrects the measured range value of the process and ionospheric delay) is equal to the true range value \(r\) plus the error value caused by the receiver clock error \(\delta\), with \(\rho=r+\delta+\varepsilon\), \(r\) as the Euclidean distance between the receiver position \((x,y,z)\) and the satellite position \((x_{s},y_{s},z_{s})\), and \(\varepsilon\) as the pseudorange measurement error, which determines the variance of the positioning error [30]. Thus, there is the following Formula (1):  
Figure 1: The overall algorithm flow. \[\left\{ \begin{aligned} \rho_{1}&=\sqrt{\left(x_{s1}-x\right)^{2}+ \left(y_{s1}-y\right)^{2}+\left(z_{s1}-z\right)^{2}}+\delta+\varepsilon_{s1} \\ \rho_{2}&=\sqrt{\left(x_{s2}-x\right)^{2}+\left(y_{s2}-y \right)^{2}+\left(z_{s2}-z\right)^{2}}+\delta+\varepsilon_{s2}\\ \rho_{3}&=\sqrt{\left(x_{s3}-x\right)^{2}+\left(y_{s3}-y \right)^{2}+\left(z_{s3}-z\right)^{2}}+\delta+\varepsilon_{s3}\\ &\vdots\\ \rho_{n}&=\sqrt{\left(x_{m}-x\right)^{2}+\left(y_{sn}-y \right)^{2}+\left(z_{sn}-z\right)^{2}}+\delta+\varepsilon_{sn}\end{aligned} \right. \tag{1}\]  
where \(\rho_{i}\) is the space pseudorang from the satellite to the receiver; \((x,y,z)\) is the coordinate of the satellite receiver to be obtained; \(\delta\) is the product of the error and speed between the satellite clock and the receiver clock; \((x_{si},y_{si},z_{si})\) is the spatial coordinate of the BDS satellite; and \(i\) is the serial number of the observed satellite. In 5G positioning theory, the TDOA measurement method is often used to locate users. The TDOA-based positioning method, also known as hyperbolic positioning, is based on the principle of measuring the difference in the propagation time of the signal from the tag to the two base stations to obtain the fixed distance difference between the label and the two base stations. The TDOA algorithm is an improvement of the TOA algorithm, which does not directly use the signal arrival time but uses the time difference between the signals received by multiple base stations to determine the location of the moving target. Therefore, compared with TOA, there is no need to add a unique timestamp for clock synchronization, and the positioning accuracy is relatively improved. Assuming that base station 1 is taken as the benchmark and the distance between the receiver and base station 1 is \(d_{1}\), there is  
\[\left\{\begin{aligned} \begin{aligned} d_{1}&=\sqrt{ \left(x_{b1}-x\right)^{2}+\left(y_{b1}-y\right)^{2}+\left(z_{b1}-z\right)^{2} }+\varepsilon_{b1}\\ d_{2}-d_{1}&=\sqrt{\left(x_{b2}-x\right)^{2}+\left(y_{ b2}-y\right)^{2}+\left(z_{b2}-z\right)^{2}}-d_{1}+\varepsilon_{b2}\\ d3-d_{1}&=\sqrt{\left(x_{b3}-x\right)^{2}+\left(y_{ b3}-y\right)^{2}+\left(z_{b3}-z\right)^{2}}-d_{1}+\varepsilon_{b3}\\ &\vdots\\ d_{n}-d_{1}&=\sqrt{\left(x_{bn}-x\right)^{2}+\left(y_{ bn}-y\right)^{2}+\left(z_{bn}-z\right)^{2}}-d_{1}+\varepsilon_{bn}\end{aligned} \right. \tag{2}\]  
where \(d_{k}(k=1,2\ldots,n)\) represents the distance from the receiver to base station \(k\), \((x_{bk},y_{bk},z_{bk})\) represents the position coordinate of base station \(k\), \((x,y,z)\) represents the position of the receiver, and \(\varepsilon_{bi}\) is the measurement error. The measurement error is a random variable whose value affects the variance of the positioning result, which is temporarily not considered in the model analysis.