A LabView GUI is used to observe and change parameters for the acoustic systems.
Having known which frequency that we are interested in, we firstly do a band pass filter to remove all components that we are not interested in. For a clean environment, a Butterworth filter is our best choice since it will maintain the same amplitude as the normal signal. However, an Elliptic filter with ability to cut frequency off sharply is also implemented for a noisier environment.
Then, we extract the portion of the sound with the strongest signal and check if the frequency there is in the desired range using FFT library from Labview. If the frequency is correct, we go to the next step where we only extract the very initial portion of the signal where the signal is still clean and the constructive and destructive interference from its reflection is not severe.
To obtain the Time of Arrival, we used the Peak Detection Algorithm to find the position of the first peak of this signal. A threshold is required.
After much experimentation, we realized that the amplitude of filtered noise from the environment and the strength of the sound will fluctuate while the AUV moving, so a static amplitude threshold will not work. Moreover we also find out that the amplitude of noise never exceed a specific range. Hence, a dynamic amplitude threshold algorithm is developed to solve this problem. The dynamic threshold is calculated by finding highest peak of the noise and scale it up. The scaling factor must be chosen to ensure all the other noise is less than the threshold and the first real peak is higher than that threshold.