# Research on Shore-Based River Flow Velocity Inversion Model Using GNSS-R Raw Data
## 2 River Flow Velocity Inversion Model
### Signal Open-Loop Tracking Method  
For the shore-based Yangtze River experiment, separated direct and reflecting antennas were used. The receiver provides direct and reflected samples at 20 MHz to GNSS signals and then generates raw IF data of GNSS signals. The direct sampling applies the open-loop tracking method to adjust Doppler frequency and carrier phase by soft receiver (direct carrier replica). The cosine carrier and sine carrier generated by the local carrier numerically controlled oscillator (NCO) can be expressed as follows:  
\[ \begin{split} v_{l}(t)&=\cos(\varphi_{Local}(t)+ \varphi_{l0})\\ v_{Q}(t)&=\sin(\varphi_{Local}(t)+\varphi_{l0}) \end{split}  \tag{1}\]  
where \(\varphi_{Local}(t)\) and \(\varphi_{l0}\) represent the carrier phase and initial phase of the direct signal, respectively. When the tracking loop enters a stable tracking state, the difference between the direct signal carrier and carrier replication frequency is 0, the carrier phase difference is close to 0, and the code phase difference is within 0.01-0.1 code chip [32]. The GNSS signal is a quasi-monochromatic and phase-modulated spherical wave signal [33], whose reflected signal can be expressed as follows:  
\[ \begin{split} u_{r}(t)=C_{r}(t)\cdot D_{r}(t)\cdot A_{r}(t).\cos( \varphi_{Reflect}(t)+\varphi_{r0})\end{split}  \tag{2}\]  
where \(C_{r}(t)\) represents pseudo-random code, \(D_{r}(t)\) is navigation bit, \(A_{r}(t)\) is reflected signal's amplitude, and \(\varphi_{Reflect}(t)\) and \(\varphi_{r0}\) represent the carrier phase and initial phase of the reflected signal, respectively. The correlation operation between sine and cosine carrier replica and the reflected signal can be defined as follows [34]:  
\[ \begin{split} I_{n}&=\frac{1}{\tau_{coh}}\int_{t_{n }}^{t_{n}+T_{coh}}u_{r}(t)\cdot V_{l}(t)+N_{i}\\ \approx\overline{A_{n}}\cdot\text{sinc}(2\pi\overline{M_{n}} \cdot T_{coh})\ \cdot\cos(2\pi\overline{\Delta f_{n}}\cdot T_{coh}+\Delta\phi)+N_{i}\\ Q_{n}&=\frac{1}{\tau_{coh}}\int_{t_{n}}^{t_{n}+T_ {coh}}u_{r}(t)\cdot V_{Q}(t)+N_{q}\\ \approx\overline{A_{n}}\cdot\text{sinc}(2\pi\overline{\Delta f _{n}}\cdot T_{coh})\ \cdot\sin(2\pi\overline{\Delta f_{n}}\cdot T_{coh}+\Delta\phi)+N_{q}\end{split}  \tag{3}\]  
where \(T_{coh}\) (1 ms in this paper) is the coherence integration time and is generally an integer multiple of 1 ms, \(sinc(x)=\sin(x)/x\). \(\overline{\Delta f}=f_{Reflect}-f_{Local}\) refers to the frequency difference between the carrier replica and the input reflected signal in the coherent time, \(\Delta\phi\) is the initial phase difference between the carrier replica and the input reflected signal, and \(N_{i}\) and \(N_{q}\) represent the random noise of \(I\) and \(Q\) components, respectively. The subscript \(n\) is time \(t\), \(t_{n}\)_<\(t\)_<\(t_{n}\)_+\(T_{coh}\). In the derivation of the above equation, the following assumption is made [35]: the coherence integral \(T_{coh}\) is long enough for the high-frequency (replica carrier frequency plus reflected signal carrier frequency) components of \(I\) and \(Q\) to be filtered by the integrator. For this reason, Equations (4) and (5) reasonably omit the sum frequency (high-frequency) component in derivation, and the corresponding, approximately equal, sign appears. Under the circumstances of the shore-based experiment, when signals enter the carrier tracking stage, the frequency difference between input reflected signal and local carrier replica has been very close.