# A CSI Fingerprint Method for Indoor Pseudolite Positioning Based on RT-ANN
## 3 Ray Tracing
### Typical Characteristic Parameters  
(1) Received power [37; 38; 39; 40]  
The total received power at the receiving point is:  
\[P_{R}=\sum_{i=1}^{N_{p}}P_{i} \tag{5}\]  
where \(N_{p}\) is the number of paths and \(P_{i}\) is the time-averaged power of the \(i\)th path. \[P_{i}=\frac{\lambda^{2}\beta}{8\pi\eta_{0}}\big{|}E_{\theta,i}g_{\theta}(\theta _{i},\phi_{i})+E_{\phi,i}g_{\phi}(\theta_{i},\phi_{i})\big{|}^{2} \tag{6}\]  
where \(\lambda\) is the wavelength and \(\eta_{0}\) is the impedance of free space (377 \(\Omega\)), \(E_{\theta,i}\) and \(E_{\phi,i}\) are the \(\theta\) and \(\phi\) electric field components of the \(i\)th path at the receiving point, \(\theta_{i}\) and \(\phi_{i}\) indicates the direction of arrival. The direction of arrival of the signal at the receiving point is given by:  
\[g_{\theta}(\theta,\phi)=\sqrt{|G_{\theta}(\theta,\phi)|}e^{i\phi_{\theta}} \tag{7}\]  
where \(G_{\theta}\) is the \(\theta\) component of the receiving antenna gain and \(\phi_{\theta}\) is the relative phase of the \(\theta\) component of the electric field in the far region. \(\beta\) is the overlapping part of the frequency band of the transmitted signal \(S_{T}(f)\) and the frequency band that the receiver \(S_{R}(f)\) can receive:  
\[\beta=\frac{\int_{f^{-}(B_{T}/2)}^{f_{T}+(B_{T}/2)}S_{T}(f)S_{R}(f)df}{\int_{f ^{-}(B_{T}/2)}^{f_{T}+(B_{T}/2)}S_{T}(f)df} \tag{8}\]  
where \(f_{T}\) and \(B_{T}\) are the center frequency and bandwidth of the transmitted waveform, respectively. At present, the narrowband waveforms are assumed to be flatly distributed:  
\[S(f)=\begin{cases}1\,f_{0}-\frac{B}{2}<f<f_{0}+\frac{B}{2}\\ 0\,\,\,\,\,\,\,\,\,\,\inherent errors and inconveniences: (1) There are many obstacles in the indoor environment. The material and thickness of walls, floors, doors and windows have a great impact on the propagation of indoor pseudolite signals, and the process of environmental characterization is more complicated; (2) There are inherent errors that cannot be eliminated by relying only on measured data for model training, such as personal factors of testers, errors of the receiver itself, errors of environmental dynamic changes, etc. (3) Only relying on the actual measurement to establish a fingerprint database, the positioning coverage and positioning accuracy are limited by the collection workload.  
In view of the feasibility of the artificial neural network for channel modeling and the shortcomings of statistical fingerprint input data, a hybrid algorithm of artificial neural network and ray tracing (RT-ANN) is designed in this paper, which uses the characteristic parameters generated by deterministic modeling to improve the original artificial neural network, that is, the location of the receiving point of an indoor scene is jointly trained and predicted by the lower density measurement data set and the higher density simulation data set of the area.  
The \(C/N_{0}\) in the measured data corresponds to the received power in the simulation parameters. The received power at the receiving point is obtained through ray tracing deterministic simulation and then converted to \(C/N_{0}\). The conversion process is as follows.  
The signal-to-noise ratio at the receiving point is expressed as:  
\[SNR=\frac{S}{N_{0}B_{n}} \tag{12}\]  
\[SNR(dB)=\frac{C}{N_{0}(dB\cdot Hz)}-B_{n}(dB) \tag{13}\]  
where \(B_{n}\) is the filter bandwidth of the receiver, \(S\) is the received signal power, \(N_{0}\) is the noise power spectral density. The conversion relationship between \(C/N_{0}\) and received power is as follows:  
\[\frac{C}{N_{0}}=10 lg\bigg{(}\frac{S}{N_{0}B_{n}}\bigg{)}+B_{n}(dB) \tag{14}\]  
As for carrier phase positioning, the distance between satellite S and receiver R can be described by:  
\[\rho=\lambda(\varphi_{S}-\varphi_{R}) \tag{15}\]  
Figure 5: ANN network structure. where \(\rho=c\cdot TOA\), \(c\) is the speed of light, \(\lambda\) is the carrier wavelength, \(\varphi\) is the carrier phase.