# A GNSS/5G Integrated Three-Dimensional Positioning Scheme Based on D2D Communication
## 2 Methods
### GNSS/5G Integrated Three-Dimensional Positioning Scheme
#### 2.3.2 GNSS/5G Integrated Three-Dimensional Positioning Based on PF  
PF is appropriate for the heterogeneous positioning methods with various noise, which forms a non-linear problem. Hence, based on the positions obtained from the DBSCAN algorithm, we further exploit PF to improve the accuracy of the positions of the requesting nodes. We firstly describe the concept of PF, and then, the GNSS/5G integrated three-dimensional positioning algorithm based on PF is proposed. * PF  
PF is a probability-based estimator, which originates from the sequential Monte Carlo estimation method [36]. The main idea of PF is that the probability density is described in terms of the random samples, known as the particles, together with their corresponding normalized weights. PF is well suited to the nonlinear problems with respect to state-transition models and observation models, since the sample-based method can describe the general probability density [37]. The purpose of filtering is to recursively estimate the posterior probability density \(P(X_{k}|Z_{1:k})\) at time slot \(k\), which is approximated by a set of particles and the corresponding normalized weights in the form  
\[P(X_{k}|Z_{1:k})\approx\sum_{f=1}^{N_{p}}\omega_{k}(f)\delta(X_{k}-PX_{k}(f)) \tag{21}\]  
where \(X_{k}\) is the state, and \(Z_{1:k}\) is the observation. \(PX_{k}(f)\) is the \(f\)th particle, and \(\omega_{k}(f)\) is the corresponding normalized weight. \(\delta(\cdot)\) is the Dirac delta function. \(N_{p}\) is the total number of particles. Here, the sequential importance sampling (SIS) is exploited. Indeed, it is difficult to sample the posterior probability density \(P(X_{k}|Z_{1:k})\). According to the SIS, a known distribution \(q(X_{k}|Z_{1:k})\) called importance distribution is introduced for sampling which approximates \(P(X_{k}|Z_{1:k})\). Besides, the SIS can realize the recursive estimation of the weights. Then, based on the sequential Bayes theory, we have [38]  
\[P(X_{1:k}|Z_{1:k})=\frac{P(Z_{k}|X_{k})P(X_{k}|X_{k-1})}{P(Z_{k}|Z_{1:k-1})}P(X_{ 1:k-1}|Z_{1:k-1}) \tag{22}\]  
and the importance distribution is shown as  
\[q(X_{1:k}|Z_{1:k})=q(X_{k}|X_{1:k-1},Z_{1:k})q(X_{1:k-1}|Z_{1:k-1}) \tag{23}\]  
Thus, the weights of the particles are obtained:  
\[\omega_{k}(f)=\frac{P(X_{1:k}|Z_{1:k})}{q(X_{1:k}|Z_{1:k})}\propto\frac{P(Z_{ k}|X_{k})P(X_{k}|X_{k-1})}{q(X_{k}|X_{1:k-1},Z_{1:k})}\omega_{k-1}(f) \tag{24}\]  
For simplicity, \(q(X_{k}|X_{1:k-1},Z_{1:k})=P(X_{k}|X_{k-1})\) is chosen in the SIS. Thus, (24) is written as:  
\[\omega_{k}(f)\propto P(Z_{k}|X_{k})\omega_{k-1}(f) \tag{25}\]  
Nevertheless, the variation among the weights will increase with the time, which is the particle degeneracy phenomenon. After several recursions, the weights of most particles tend to be 0 while the remaining tend to be 1. It means that most of the sample points have to be discarded. To avoid this phenomenon, we adopt resampling to sample the high weight particles repeatedly and delete the low weight particles. In essence, the resampling maps the original particles into the updated particles distributed uniformly. In other words, the weight of each updated particle is equal, i.e., \(\frac{1}{N_{p}}\). Therefore, the state estimation after the resampling is  
\[\hat{X}_{k}=\frac{1}{N_{p}}\sum_{f=1}^{N_{p}}PX_{k}(f) \tag{26}\]  
* GNSS/5G Integrated Three-Dimensional Positioning Algorithm Based on PF  
Here, we consider the requesting nodes in \(\mathcal{NR}\). The BS in \(\mathcal{M}\) and the cooperative nodes in \(\mathcal{NC}\) are the potential reference nodes. In practice, the reference nodes are not all visible to the requesting nodes as mentioned above. Without loss of generality, we concentrate on MU \(i\) in \(\mathcal{N}\mathcal{R}\). According to the distance constraint, the visible reference nodes constitute a set denoted as \(\mathcal{R}^{i}\). We denote \(\psi=\{t,r\}\) as the TOA and RSS measurements, where \(t\) represents the TOA measurements, and \(r\) represents the other.