# Circular Regression Applied to GNSS-R Phase Altimetry
## 3 Linear-Circular Regression Applied to GNSS-R Altimetry
### Log-Likelihood Estimator  
In order to estimate the two parameters \(\alpha\) and \(\beta\), we derive the likelihood function associated with the measurement model. The probability density function \(f(y_{s,k};\alpha,\beta;\kappa_{s})\) is given by:  
\[f(y_{s,k};\alpha,\beta;\kappa_{s})=\frac{1}{2\pi I_{0}(\kappa_{s})}\;\mathrm{ e}^{\kappa_{s}\cos\left(\;y_{s,k}-\left(\alpha+\beta\;x_{s,k}^{el}\right)\; \right)} \tag{15}\]  
Considering \(N\) measurements \(Y=\left\{y_{s,1},\;...,\;y_{s,N}\right\}\), the likelihood function is given by:  
\[L(Y) =f(y_{s,1};\alpha,\beta;\kappa_{s}),...,f(y_{s,N};\alpha,\beta; \kappa_{s})\] \[=\prod_{k=1}^{N}\frac{1}{2\pi I_{0}(\kappa_{s})}\exp\left(\kappa _{s}\cos\left(y_{s,k}-\left(\alpha+\beta x_{s,k}^{el}\right)\right)\right)\] \[=\frac{1}{(2\pi I_{0}(\kappa_{s}))^{N}}\exp\left(\kappa_{s}\sum_ {k=1}^{N}\cos\left(y_{s,k}-\alpha-\beta x_{s,k}^{el}\right)\right) \tag{16}\]  
and the log-likelihood function is:  
\[\ln L(Y)=-N\left(2\pi I_{0}(\kappa_{s})\right)+\kappa_{s}\sum_{k=1}^{N}\cos \left(y_{s,k}-\alpha-\beta x_{s,k}^{el}\right) \tag{17}\]  
With the log-likelihood function, we define the following contrast function:  
\[W\left(Y\right)=\sum_{k=1}^{N}\cos\left(y_{s,k}-\left(\alpha+\beta\;x_{s,k}^{el }\right)\right) \tag{18}\]  
The values of \(\alpha\) and \(\beta\) that maximize the contrast function \(W(Y)\) provide the maximum likelihood estimates \(\hat{\alpha}\) and \(\hat{\beta}\). \(\hat{\alpha}\) is the solution of:  
\[\frac{\partial\;W\left(Y\right)}{\partial\alpha}=0\] \[\Leftrightarrow\sum_{k=1}^{N}\;\sin\left(y_{s,k}-\left(\hat{ \alpha}+\beta\;x_{s,k}^{el}\right)\right)=0\] \[\Leftrightarrow\cos\left(\hat{\alpha}\right)\sum_{k=1}^{N}\sin \left(y_{s,k}-\beta\;x_{s,k}^{el}\right)-\sin\left(\hat{\alpha}\right)\sum_{k= 1}^{N}\cos\left(y_{s,k}-\beta\;x_{s,k}^{el}\right)=0 \tag{19}\]and finally, \(\hat{\alpha}\) is obtained with the following expression:  
\[\hat{\alpha}=\arctan^{*}\left(\frac{\sum_{k=1}^{N}\ \sin\left(\ y_{s,k}-\beta\ x_{s,k}^{el} \right)}{\sum_{k=1}^{N}\ \cos\left(\ y_{s,k}-\beta\ x_{s,k}^{el}\right)}\right) \tag{20}\]  
This expression shows that \(\hat{\alpha}\) can be directly deduced from the estimation of \(\beta\). We conclude that \(\beta\) is the only parameter to estimate to fit the model to the observed data. We propose to use the Newton-Raphson algorithm to estimate the value of the slope \(\beta\) that maximizes \(W(Y)\). The Newton-Raphson algorithm is an iterative procedure based on the second derivative of the loss function \(W(Y)\):  
\[L(Y) =f(y_{s,1};\alpha,\beta;\kappa_{s}),...,f(y_{s,N};\alpha,\beta; \kappa_{s})\]0  
where \(g\) is a step size. The estimate \(\hat{\beta}\) that maximizes the contrast function is obtained iteratively from Equations (18) and (21) with the following relations:  
\[L(Y) =f(y_{s,1};\alpha,\beta;\kappa_{s}),...,f(y_{s,N};\alpha,\beta; \kappa_{s})\]1 \[L(Y) =f(y_{s,1};\alpha,\beta;\kappa_{s}),...,f(y_{s,N};\alpha,\beta; \kappa_{s})\]2  
In this recursive scheme, \(\hat{\beta}^{i}\) converges to a local maximum of the contrast function \(W(Y)\). In the GNSS-R altimetry context, the height is deduced from the estimated value of the slope \(\hat{\beta}\) by:  
\[L(Y) =f(y_{s,1};\alpha,\beta;\kappa_{s}),...,f(y_{s,N};\alpha,\beta; \kappa_{s})\]3  
Assuming that all of the GNSS signal reflections are on the same surface, we can suppose that the slope \(\beta\) is common for all of the phase delay evolutions corresponding to all of the satellites in view. All of the interferometric phase observations can be observed in the same time reference frame, and it is possible to construct a contrast function fusing several GNSS reflections. The contrast function can be modified from Relation (18) in order to take into account the whole set of \(S\) visible satellites. The loss function becomes:  
\[L(Y) =f(y_{s,1};\alpha,\beta;\kappa_{s}),...,f(y_{s,N};\alpha,\beta; \kappa_{s})\]4  
The proposed height estimator is unchanged, replacing the sums from one to \(N\) by sums from one to \(SN\).