## 4 Pairwise Clock Synchronization under Exponential Delays
### Joint Estimation of Clock Offset and Skew under Exponential Delays
#### 4.2.2 Direct Joint Estimation of Clock Offset and Skew  
Assuming symmetric exponential delays with a known mean \(\lambda\), [33] addressed the problem of MLEs for clock offset and skew by optimizing over nonlinear constraints iteratively. In terms of the estimates \([d,\theta,f]^{T}\), four different cases were considered: (1) \(d\) and \(\theta\) known, \(f\) unknown; (2) \(\theta\) known, \(d\) and \(f\) unknown; (3) \(d\) known, \(\theta\) and \(f\) unknown; (4) \(d,\theta,f\) unknown. The ultimate goal is to jointly estimate \([d,\theta,f]^{T}\) in the fourth case. However, similar to the derivation of the MLE in [28] when no skew is considered, the MLEs are also determined by exploiting the boundary conditions of the support regions. For Cases 1 and 2, the support regions are 2D, and the discussion of these two cases gives an insight to further analyze Cases 3 and 4, where the support regions admit a 3D visualization.  
[PERSON] and [PERSON] [34] proposed a computationally-simpler algorithm to find the MLEs of clock offset and skew. Asymmetric exponential delays with unknown means were assumed in [34], such that the estimation algorithm can be applied to a more general framework. In this case, the likelihood function resumes as:  
\[\begin{split} p(\mathbf{T}_{i}|d,\theta,f,\lambda_{1},\lambda_{2} )=&\frac{\lambda_{1}^{N}\lambda_{2}^{N}}{f^{2N}}\prod\limits_{i=1 }^{N}\exp\left[-\frac{\lambda_{1}}{f}(T_{i}^{b}-fT_{i}^{a}-\theta-fd)-\frac{ \lambda_{2}}{f}(fT_{i}^{d}-T_{i}^{c}+\theta-fd)\right]\\ &\times I[\min(T_{i}^{b}-fT_{i}^{a}-\theta-fd)\geq 0;\min(fT_{i}^{ d}-T_{i}^{c}+\theta-fd)\geq 0]\end{split} \tag{27}\]  
Re-parameterizing in terms of \(\theta_{1}=\theta+fd\) and \(\theta_{2}=-\theta+fd\) leads to:  
\[\begin{split} p(\mathbf{T}_{i}|f,\theta_{1},\theta_{2},\lambda_{1 },\lambda_{2})=&\frac{\lambda_{1}^{N}\lambda_{2}^{N}}{f^{2N}} \prod\limits_{i=1}^{N}\exp\left[-\frac{\lambda_{1}}{f}(T_{i}^{b}-fT_{i}^{a}- \theta_{1})-\frac{\lambda_{2}}{f}(fT_{i}^{d}-T_{i}^{c}-\theta_{2})\right]\\ &\times I[\min(T_{i}^{b}-fT_{i}^{a}-\theta_{1})\geq 0;\min(fT_{i}^{ d}-T_{i}^{c}-\theta_{2})\geq 0]\end{split} \tag{28}\]  
To find the MLEs for likelihood function Equation (27), or equivalently Equation (28), the concept of profile likelihood function is employed in [34], such that the MLEs can be alternatively found by maximizing the profile likelihoods. In particular, fixing \(f,\theta_{1}\) and \(\theta_{2}\), the conditional MLEs of \(\lambda_{1}\) and \(\lambda_{2}\) are shown to be:  
\[\hat{\lambda}_{1}(f,\theta_{1},\theta_{2})=\frac{fN}{\sum\limits_{i=1}^{n}(T_ {i}^{b}-fT_{i}^{a}-\theta_{1})},\ \ \hat{\lambda}_{2}(f,\theta_{1},\theta_{2})=\frac{fN}{\sum\limits_{i=1}^{n}(T_{i} ^{d}-fT_{i}^{c}-\theta_{2})}\]  
Plugging the above equations into Equation (28) yields the profile likelihood as a function of \(f,\theta_{1}\) and \(\theta_{2}\), which is denoted as \(L_{p}(f,\theta_{1},\theta_{2})\). Following the same procedure with respect to \(L_{p}(f,\theta_{1},\theta_{2})\), the conditional MLEs for \(\theta_{1}\) and \(\theta_{2}\) are expressed as:  
\[\hat{\theta}_{1}(f)=\min(T_{i}^{b}-fT_{i}^{a}),\ \ \hat{\theta}_{2}(f)=\min(fT_{i}^{d}-T_{i}^{c})\]To this end, the original five-dimensional optimization problem Equation (27) is simplified to the maximization of a one-dimensional function \(L_{p}(f,\min(T_{i}^{b}-fT_{i}^{a}),\min(fT_{i}^{d}-T_{i}^{c}))\), whose solution represents the MLE for clock skew, and it is denoted as \(\hat{f}_{JML}\). Additionally, the MLE for clock offset is obtained via:  
\[\hat{\theta}_{JML}=\frac{\min(T_{i}^{b}-\hat{f}_{JML}T_{i}^{a})-\min(\hat{f}_{ JML}T_{i}^{d}-T_{i}^{c})}{2}\]  
since the corresponding estimates of \(\theta_{1}\) and \(\theta_{2}\) are \(\min(T_{i}^{b}-\hat{f}_{JML}T_{i}^{a})\) and \(\min(\hat{f}_{JML}T_{i}^{d}-T_{i}^{c})\), respectively.