## 3 Results
### Automated Optimization of Coded Excitation Sequence  
After validation of the simulation model, an automated optimization of the coded excitation signal sequence was conducted. The parameters for the sequences were chosen in a range were the transducer is expected to have linear behavior for the model to be applicable. Sequences with a maximum code length of 48 were generated based on the common waveforms amplitudes ranging from \(-\)1 V to +1 V and minimal pulse width of 25 \(\upmu\)s. In total, 21 simulations were performed. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Waveform** & \multicolumn{3}{c}{**Height of Positive Side Maximum**} & \multicolumn{3}{c}{**Height of Absolute Side Maximum**} \\ \hline  & **Simulation/\%** & **Experiment/\%** & **Delta/pp.** & **Simulation/\%** & **Experiment/\%** & **Delta/pp.** \\ \hline Sine-wave & 89.2 & 88.9 & 0.3 & 96.9 & 96.6 & 0.3 \\ Impulse & 71.0 & 71.0 & 0.0 & 90.0 & 90.0 & 0.0 \\ PN sequence 8 & 69.7 & 56.8 & 13.0 & 89.9 & 87.1 & 2.8 \\ PN sequence 24 & 74.2 & 71.2 & 3.0 & 91.5 & 91.8 & \(-\)0.3 \\ Barker Code 7 & 71.6 & 70.1 & 1.5 & 90.0 & 90.0 & 0.1 \\ Barker Code 11 & 73.2 & 76.9 & \(-\)1.3 & 91.2 & 91.9 & \(-\)0.7 \\ Barker Code 13 & 73.3 & 74.5 & \(-\)1.2 & 87.9 & 90.9 & \(-\)3.0 \\ Linear Chirp Up & 79.6 & 80.1 & \(-\)0.5 & 94.2 & 94.1 & 0.2 \\ Freeq. 1–2 & 78.0 & 77.5 & 0.6 & 93.1 & 92.7 & 0.3 \\ Linear Chirp & 51.4 & 63.3 & \(-\)11.9 & 85.2 & 89.1 & \(-\)3.9 \\ UpDown Freq. 1–4 & 71.2 & 70.0 & 1.3 & 90.0 & 90.7 & \(-\)0.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Correlation factor magnitude of positive and absolute side maximum comparing results from simulation and experiments. The difference between experiments and simulations is expressed in terms of percentage points (pp). Among the tested coded excitation sequences, the sequence with lowest positive and absolute side maximum was further examined (Figure 4a). The analysis of the calculated echo (Figure 4b) resulted in reduced positive and absolute side maxima of 55.5% and 56.2%, respectively (Figure 4c). This is a reduction of 33.7 percentage points for the positive side maximum and 40.4 percentage points for the absolute maximum compared to sine-wave excitation as the reference. In the next step, the above sequence was evaluated on the experimental setup (Figure 4d). Figure 4e shows a comparison of the simulated and experimental echo. The shape of the waveform is comparable, while there are clear deviations in the amplitude. From the cross-correlation function (Figure 4f), the experimental positive and absolute maximum were determined to be 56.6% and 89.3%, respectively. While the positive maximum is in good agreement with the simulations, there is a deviation of 33.1 percentage points for the absolute side maximum. Similar discrepancies were observed in Section 3.2 for the Chirp-Up-Down signal with about 10 percentage points deviation between simulation and experiment for the positive side maximum. The results of the simulations were obtained using the same method as the reference. Figure 4: Automatically optimized sequence from the simulation and comparison to the experimental results: (**a**) best PWM sequence generated by simulation, (**b**) calculated echo, (**c**) normalized ACF, (**d**) experimental ultrasonic echo, (**e**) comparison between the calculated echo and the experimental echo, (**f**) normalized CCF. The * markers highlight the extrema of the CCF and ACF. side maximum. Both coded signals show promising reduction in the side maxima but at the same time lack the predictability through simulations. The large discrepancy indicates that the experimental system is not reacting linearly to the coded excitation and thus the linear model is not able to replicate its reaction. As the best results were obtained when the coded excitation was influenced by nonlinear effects of the piezoelectric transducer, the next chapter leverages these effects to improve the unambiguity and, thereby, robustness of the cross-correlation-based time-of-flight measurement even further.