# Indoor Carrier Phase Positioning Technology Based on OFDM System
## 2 Ranging System  
Consider OFDM transmission with \(N\) subcarriers, subcarrier spacing \(\Delta f_{SCS}\) and sampling interval \(T_{S}=1/(N\Delta f_{SCS})\). OFDM transmission is block oriented. Assume \(N\) quadrature-amplitude modulation (QAM) symbols \(X_{k}^{m},k\in\{1,\dots,N\}\) are grouped into a vector \(\mathbf{X}^{m}=\left[X_{1}^{m},\dots,X_{N}^{m}\right]^{T}\) and transmitted in the \(m\)-th OFDM symbol in a slot. A unitary inverse discrete-time Fourier transform (IDFT) on \(\mathbf{X}^{m}\) gives a continuous time representation of the complex envelope of an OFDM symbol of duration \(T=NT_{s}=1/\Delta f_{SCS}\) (note: here \(T\) does not include cyclic prefix).  
\[x^{m}(t)=\frac{1}{\sqrt{N}}\sum_{k=1}^{N}X_{k}^{m}e^{j2\pi(k-1)t/T};0\leq t\leq T, \tag{1}\]  
the time-domain signal \(x^{m}(t)\) is up-converted to the carrier frequency \(f_{c}\) for transmission.  
\[\begin{split} s^{m}(t)&=x^{m}(t)e^{j2\pi f_{c}t}\\ &=\frac{1}{\sqrt{N}}\sum_{k=1}^{N}X_{k}^{m}e^{j2\pi((k-1)/T+f_{c} )t};\quad 0\leq t\leq T.\end{split} \tag{2}\]  
Assume the channel is the quasi-static channel, i.e., the channel does not change during the transmission of one OFDM symbol, the quasi-static channel can then be described by a time discrete CIR \(\mathbf{h}=\left[h_{0}(t),h_{1}(t),\dots,h_{L_{p}-1}(t)\right]^{T}\), multipath channel model can be expressed as:  
\[h(t,\tau)=\sum_{l=1}^{L_{p}}h_{l}(t)\delta(t-\tau_{l}(t))+h_{d}(t,\tau), \tag{3}\]  
\(L_{p}\) is the total number of paths which include one LOS path and \(L_{p}-1\) NOLS paths, \(h_{l}(t)\) is the gain for the \(l\)-th path, \(\delta(t-\tau_{l}(t))\) is the Dirac delta function, \(\tau_{l}(t)\) is the TOA of the \(l\)-th path, \(h_{d}(t,\tau)\) are the diffuse multipath components (DMC) [23], which represent the non-discrete part of the channel. The received signal after passing through the multipath channel can be expressed as:  
\[y^{m}(t)=s^{m}(t)\otimes h(t,\tau)+w_{n}^{m}=\int_{-\infty}^{\infty}s^{m}( \xi)h(t-\xi,\tau)\mathrm{d}\xi+w^{m}, \tag{4}\]  
\(w^{m}\) is the color noise consisting of \(w_{n}^{m}\) and \(s^{m}(t)\otimes h_{d}(t,\tau)\), where \(w_{n}^{m}\sim N(0,\sigma^{2})\) is the complex additive noise with zero mean and \(\sigma^{2}\) variance. If the received signal containscolor noise, it is necessary to consider the use of whitening filters to convert the color noise to white noise [24]. Furthermore, the received \(m\)-th OFDM symbol can be expressed by:  
\[\begin{split} y^{m}(t)&=\frac{1}{\sqrt{N}}\sum_{k=1}^{N }X_{k}^{m}\left[\sum_{l=1}^{L_{p}}h_{l}(t)\mathrm{e}^{-j2\pi\left(f_{c}+\frac{k- 1}{l}\right)\eta_{l}(t)}\right]\mathrm{e}^{j2\pi\left(f_{c}+\frac{k-1}{l} \right)t}+w^{m}\\ &=\frac{1}{\sqrt{N}}\sum_{k=1}^{N}X_{k}^{m}\left[\sum_{l=1}^{L_{p} }h_{l}(t)\mathrm{e}^{-j2\pi\left(f_{c}+\frac{k-1}{l}\right)\eta_{l}(t)}+w_{k}^ {m}\right]\mathrm{e}^{j2\pi\left(f_{c}+\frac{k-1}{l}\right)t}.\end{split} \tag{5}\]  
After down-conversion and removal of the samples of the received signal which belong to the cyclic prefix, the received signal \(y^{m}(t)\) is converted into a discrete time domain signal \(y^{m}[n]\):  
\[y^{m}[n]=\frac{1}{\sqrt{N}}\sum_{k=1}^{N}X_{k}^{m}\left[\sum_{l=1}^{L_{p}}h_{l }[nT_{s}]\mathrm{e}^{-j2\pi\left(f_{c}+\frac{k-1}{l}\right)\eta_{l}[nT_{s}]} +w_{k}^{m}\right]\mathrm{e}^{j2\pi\frac{\eta(k-1)}{N}}. \tag{6}\]