# Simulating Signal Aberration and Ranging Error for Ultrasonic Indoor Positioning
## 4 Discussion  
In Figure 3, as expected, the pressure peak drops smoothly and rapidly with the increasing angle \(\vartheta\). The behavior of the cross-correlation peak is different, abruptly varying at certain angles. This depends on the shape of the cross-correlation, as shown also in Figure 4.  
In general, note that the pressure values are decreasing as the aperture decreases, since the surface power density in emission is kept constant, while the extension of the emitting surface decreases. Furthermore, since the cross-correlation is also proportional to the amplitude of the received signal, its peak value also decreases with the pressure signal. Note that, as the aperture D decreases, the angle up to which the correct estimate is obtained increases; for D = 25 mm, the largest ranging error is obtained, over 15 mm. Additionally, consider that no noise has been added to show more clearly that the observed phenomenon is due only to the acoustic diffraction that exists regardless of the current SNR level. In Figure 4, the grayscale amplitude of the cross-correlation with variable lag shows that, up to a certain angle \(\vartheta\), the shape of the cross-correlation remains regular, as expected, with only one clearly recognizable peak. In the regions included in the above angles, the correlation-based technique works very well, with errors in the order of the sampling rate of the signal. However, beyond a certain limit angle, the value of which increases as the transducer aperture D decreases, on the other hand, the cross-correlation deforms, with variations in the shape and multiplication of the peaks, with a trend similar to a bifurcation. For angles larger than this limit, it becomes unpractical to identify a peak corresponding to the TOA, simply because it no longer exists; in fact, the peaks of the cross-correlation beyond the limit angle no longer correspond to the correct lag proportional to the TOA, and, therefore, they produce incorrect estimates of the TOA and, as a consequence, of R*. This finally well explains the strange abrupt behavior of the range estimation of Figure 3c. In Figure 5, it is possible to see that, for D = 25 mm, it is possible to appreciate that the single univocal peak of the cross-correlation for \(\vartheta=0^{\circ}\) is not anymore present at angles \(45^{\circ}\) and \(90^{\circ}\), while, for D = 8.5 mm, it is possible to identify the single correlation peak at all angles. Moreover, for D = 8.5 mm, the amplitude relative reduction with respect to the increasing angle is much lower than the reduction for D = 25 mm, due to the much wider emission of the smaller aperture. In Figure 6a-d is displayed a zone with a shape similar to a triangle (similar to a cone in three dimensions), with the vertex corresponding to the center of the transducer, inside which the error is minimal, i.e., of the order of the error quantization due to the signal time sampling 1/f\({}_{\text{S}}\). Therefore, let us define this low error triangular region (conical in three dimensions) as that of the correct operation of the ranging system and \(\varphi\) its angle at the vertex. In Table 1, it is possible to see \(\varphi\) and the maximum error as a function of the increasing aperture D values. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Emitter aperture D (mm)** & **Low Error Cone Vertex Angle \(\varphi\) (\({}^{\circ}\))** & **Range Maximum Error (mm)** \\ \hline
6 & 180 & 3.3 \\
8.5 & 180 & 3.3 \\
13.1 & 93.51 & 13.3 \\
16 & 73.26 & 13.7 \\
20 & 55.84 & 14.2 \\
25 & 44.62 & 14.6 \\ \hline \hline \end{tabular}
\end{table}