# Experimental Validation of Ellipsoidal Techniques for State Estimation in Marine Applications
## 4 Modeling of Uncertainty
### Quantification of Measurement Uncertainty: Bounded Measurement Noise
```
initialize the interval bound \([\Delta\phi(t_{k})]\) initialize the interval bounds \([\Delta\tilde{x}_{1}]\) and \([\Delta\tilde{x}_{2}]\) exclude all samples \(k\), where \(0\in\tan(\phi_{\text{m}}(t_{k})+[\Delta\phi(t_{k})])\) exclude all samples \(k\), where \(\tan(\phi_{\text{m}}(t_{k})+[\Delta\phi(t_{k})])==\texttt{NaN}\) include all remaining samples \(k\) in the set \(\mathcal{K}\) while TRUE do  Contractor for \([\Delta\tilde{x}_{1}]\): \(\big{[}\Delta\tilde{x}_{1}^{\prime}\big{]}=\bigcap\limits_{k\in\mathcal{K}} \Big{(}\frac{x_{2m}(t_{k+1})-x_{2m}(t_{k})+[\Delta\tilde{x}_{2}]}{\tan(\phi_{ \text{m}}(t_{k})+[\Delta\phi(t_{k})])}-(x_{1,\text{m}}(t_{k+1})-x_{1,\text{m} }(t_{k}))\Big{)}\cap[\Delta\tilde{x}_{1}]\) generate symmetric bounds \([\Delta\tilde{x}_{1}]:=[-1\;;\;1]\cdot\max(\big{|}\inf(\big{[}\Delta\tilde{x}_ {2}^{\prime}\big{]})\big{|},\big{|}\sup(\big{[}\Delta\tilde{x}_{1}^{\prime} \big{]})\big{|})\) Contractor for \([\Delta\tilde{x}_{2}]\): \([\Delta\tilde{x}_{2}^{\prime}]=\bigcap\limits_{k\in\mathcal{K}} \Bigg{(}(x_{1,\text{m}}(t_{k+1})-x_{1,\text{m}}(t_{k})+[\Delta \tilde{x}_{1}])\cdot\tan(\phi_{\text{m}}(t_{k})+[\Delta\phi(t_{k})])\) \[-(x_{2,\text{m}}(t_{k+1})-x_{2,\text{m}}(t_{k}))\Bigg{)}\cap[ \Delta\tilde{x}_{2}]\]  generate symmetric bounds \([\Delta\tilde{x}_{2}]:=[-1\;;\;1]\cdot\max(|\inf([\Delta\tilde{x}_{2}^{ \prime}])|,|\sup([\Delta\tilde{x}_{2}^{\prime}])|)\) Contractor for \([\Delta\phi(t_{k})]\) for all \(k\in\mathcal{K}\): \([\Delta\phi(t_{k})]:=[\Delta\phi(t_{k})]\) \(\cap(\texttt{atan2}((x_{2,\text{m}}(t_{k+1})-x_{2,\text{m}}(t_{k})+[\Delta \tilde{x}_{2}]),(x_{1,\text{m}}(t_{k+1})-x_{1,\text{m}}(t_{k})))-\phi_{\text{ m}}(t_{k}))\) if\(\texttt{any}([\Delta\phi(t_{k})]==\texttt{NaN})\)then  reset \([\Delta\tilde{x}_{1}]\) and \([\Delta\tilde{x}_{1}]\) to initial bounds  inflate the bounds for \([\Delta\phi(t_{k})]\) elseif no further contractance of interval bounds possible then  break endif endwhile  set \([\Delta x_{1}]:=0.5\cdot[\Delta\tilde{x}_{1}]\) and \([\Delta x_{2}]:=0.5\cdot[\Delta\tilde{x}_{2}]\) return \([\Delta x_{1}]\), \([\Delta x_{2}]\), and \([\Delta\phi(t_{k})]\)
```  
**Algorithm 1**Contractor-based sensor calibration. **Remark 3**. : _This algorithm can be simplified by imposing identical bounds \([\Delta\phi(t_{k})]\) for all time steps \(t_{k}\). In this case, we deactivate the contractor for the angle uncertainty \([\Delta\phi(t_{k})]\) and perform an inflation of this value at all time steps if the condition \(\texttt{any}([\Delta\phi(t_{k})]==\texttt{NaN})\) becomes active._  
**Remark 4**. : _An interval extension of the \(\texttt{atan2}\) function is described in [30]. A straightforward extension of a phase unwrap operation applied individually to all interval bounds of the generalized \(\texttt{atan2}\) function in the case of angles leaving the interval \([-\pi\;;\;\pi]\) allows for determining the depicted enclosures in Figure 5._  
Figure 5 gives a comparison of the reconstructed bounds for the compass-based heading measurements, as well as for the reconstruction of the uncertainty in the heading angle using the GPS-based velocity estimate for both DDboats, without and with the assumption of time-varying uncertainty \(\big{[}\Delta\phi^{(i)}(t_{k})\big{]}\). Table 2 gives an overview of characteristic values for the identified measurement uncertainty in terms of the mean interval radii  
\[0.5\cdot\left(\sup\left(\left[\Delta\phi(t_{k})\right]^{(i)}\right)-\inf\left( \left[\Delta\phi(t_{k})\right]^{(i)}\right)\right) \tag{66}\]  
of the angle estimates for the DDboats \(i\in\{\mathrm{A},\mathrm{B}\}\), both for the compass-based and the GPS-based data, as well as the suprema of the symmetric intervals for the GPS position accuracy.