# Fast Sound Source Localization Based on SRP-PHAT Using Density Peaks Clustering
## 5 Simulations
### Offline Database Construction  
Voice signals with different reverberation time and SNR were divided into frames. The frame length was 512 points (i.e., 32 ms), and the frame shift was 256 points (i.e., 16 ms). There were 181 frames. Each frame was convoluted with Hanning window, and its short-time energy was calculated, as shown in Figure 4. Corresponding to each sound source position, the first 100 frames with larger short-time energy were chosen to localize the sound source. The sample points with the reverberation time as 300 ms and the SNR as 10 and 30 dB are drawn respectively in Figure 5. The dispersion of sample points was small as the SNR being 30 dB, which indicates that the localization by each frame was acceptably accurate. When the SNR was 10 dB, the large dispersion of sample points indicated that it was unreliable to localize the sound source by a single frame. DPC was used for analyzing the sample points to accurately localize the sound source. In Figure 6, the identified cluster centers (sound sources) are marked as \(a\) with the reverberation time being 300 ms and the SNR being 10 dB and 30 dB respectively. Tables 1 and 2 give out the identified coordinates of cluster centers with the reverberation time as 300 ms corresponding to different SNRs and the SNR as 30 dB under different reverberation durations respectively. It can be seen that the coordinates were completely consistent with the actual location of sound sources when the reverberation time was relatively short, e.g., 20 ms or 300 ms, and the SNR was high, e.g., 25 dB or 30 dB. Even under strong reverberation or heavy noise, e.g., 900 ms or 5 dB, the error did not exceed 2 degrees (see the bold figures). This proved that DPC could efficiently remove the effects of reverberation and noise and locate the sound source accurately. Figure 3: The locations of the microphone array and the seats in the simulations. The influence of the used number of frames on the clustering results was also analyzed. Table 3 lists the identified coordinates of cluster centers using different number of frames with large short-term energy when the reverberation time was 300 ms and the SNR was 30 dB. It can be seen that when the number of frames was 30 or more, the recognition results were stable. While the number of frames was less than 30, the results had certain deviation. So in order to get reliable identification results in practice, the number of frames should be taken as 30 at least and depends on whether the results are stable. The co-ordinates of the centers, i.e., the stable clustering results, were stored in the ODB. Figure 4: Voice signal with SNR as 30 dB and reverberation as 300 ms.  
Figure 5: Sample points obtained by the first 100 frames with different SNR. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**5 db**} & \multicolumn{2}{c}{**10 db**} & \multicolumn{2}{c}{**15 db**} & \multicolumn{2}{c}{**20 db**} & \multicolumn{2}{c}{**25 db**} & \multicolumn{2}{c}{**30 db**} \\ \cline{2-13}
**Node** & \(\mathbf{\theta}\) & \(\mathbf{\varphi}\) & \(\mathbf{\theta}\) & \(\mathbf{\varphi}\) & \(\mathbf{\theta}\) & \(\mathbf{\varphi}\) & \(\mathbf{\theta}\) & \(\mathbf{\varphi}\) & \(\mathbf{\theta}\) & \(\mathbf{\varphi}\) & \(\mathbf{\theta}\) & \(\mathbf{\varphi}\) \\ \hline \(q_{1}\) & 45 & **37** & 45 & **37** & 45 & 38 & 45 & 38 & 45 & 38 & 45 & 38 \\ \(q_{2}\) & 45 & 57 & 45 & 57 & 45 & **56** & 45 & 57 & 45 & 57 & 45 & 57 \\ \(q_{3}\) & 75 & 38 & 75 & 38 & 75 & 38 & 75 & 38 & 75 & 38 & 75 & 38 \\ \(q_{4}\) & 75 & 56 & 75 & **57** & 75 & **57** & 75 & 57 & 75 & 56 & 75 & 56 \\ \(q_{5}\) & 105 & 38 & 105 & 38 & 105 & 38 & 105 & 38 & 105 & 38 & 105 & 38 \\ \(q_{6}\) & 105 & **55** & 105 & 56 & 105 & 56 & 105 & 56 & 105 & 56 & 105 & 56 \\ \(q_{7}\) & **134** & **37** & 135 & **37** & 135 & **37** & 135 & 38 & 135 & 38 & 135 & 38 \\ \(q_{8}\) & 135 & 57 & 135 & 57 & 135 & **58** & 135 & 57 & 135 & 57 & 135 & 57 \\ \hline \hline \end{tabular}
\end{table}