# Automatic Detection and Unsupervised Clustering-Based Classification of Cetacean Vocal Signals +
## Appendix A  
The automatic detection process mainly contains three steps: initialization, EMD decomposition, and endpoint detection. Firstly, all the audio files are read by MATLAB function \"audioread\", and each sound is framed by Hamming window with 25 ms frame length and 8.5 ms frame step. Then, the dual parameters-dual thresholds endpoint detection method based on EMD is conducted to detect the vocal signals within the PAM data. In this method, the PAM data is decomposed into IMFs by EMD. Then, two adaptive thresholds are computed on the base of IMFs. Finally, the potential vocal signals are extracted. The sea background clutters are removed from the PAM data, while only the vocal signals are left. The EMD is an adaptive signal decomposition algorithm that is good at processing nonlinear and unstable signals by decomposing signals into IMF (intrinsic mode function)components of different scales and a residue in terms of the signal's scale character [56]. The original signal \(x(t)\) is decomposed into \(n\) IMF components and a residue, as follows:  
\[x(t)=\sum_{j=1}^{n}imf_{j}(t)+r_{n}(t), \tag{10}\]  
where \(imf_{j}(t)\) is the \(jth\) IMF components, \(j\) is the index of IMF components, and \(r_{n}(t)\) is the last residual signal. Usually, the first two IMF components and the last residual are useless white noise, so we drop them out and then reserve the signal \(\bar{x}(t)\). To be convenient for operation, \(\bar{x}(t)\) is sampled and segmented into frames \(\bar{x}^{i}(m)\) ( \(i\) is the frame index, \(m\) is the time sequence index, \(m\in[1,M]\)). We perform EMD on each frame signal and obtain the \(L\) IMF components in \(ith\) frame signals, which are denoted as \(imf_{j}^{i}(m)\), (\(j\in[1,L]\)). IMF components reveal the time scale character of the signal and retain the nonlinear and unstable characters of the decomposed signals. Two parameters, TKEO and short-time average ZCR (Zero crossing rate), are considered dual thresholds to confirm the endpoints. TKEO is a nonlinear operator that detects the energy of unstable signals quickly and effectively. TKEO is defined in the discrete time signal by [57]. It only needs three samples to calculate and approximate the instantaneous status. The application of TKEO on a signal containing all these components will produce an output mainly dominated by the energy of the transient signal. TKEO tracks the modulation energy of each IMF decomposed by EMD. We compute the Teager-Kaiser energy of the IMF component at \(m\) time instant as follows:  
\[T[imf_{j}^{i}(m)]=[imf_{j}^{i}(m)]^{2}-imf_{j}^{i}(m+1)\times imf_{j}^{i}(m-1),\ \ \ m=1,2,\ldots,M, \tag{11}\]  
where \(M\) denotes the length of each IMF component, which is the same as the frame length. \(T[imf_{j}^{i}(m)]\) calculates the Teager-Kaiser energy at time instant \(imf_{j}^{i}(m)\) which is based on the three state samples \(imf_{j}^{i}(m-1)\), \(imf_{j}^{i}(m)\), and \(imf_{j}^{i}(m+1)\). So, the average Teager-Kaiser energy for each IMF component is defined by the following equation:  
\[E_{j}^{i}=\frac{1}{M}\sum_{m=1}^{M}T[imf_{j}^{i}(m)], \tag{12}\]  
where \(E_{j}^{i}\) is the average Teager-Kaiser energy of \(jth\) IMF component. We sum up the \(E_{j}^{i}\) of \(ith\) frame and obtain \(TE^{i}\) which denotes the average Teager-Kaiser energy for \(ith\) frame as follows:  
\[TE^{i}=\sum_{j=1}^{L}E_{j}^{i}, \tag{13}\]  
where \(L\) is the total number of IMF components in \(ith\) frame. \(TE^{i}\) is the first threshold for judging the endpoints. The ZCR [58] is the number of times a signal passes through zero per unit of time. The ZCR over a short period is called the short-time average zero crossing rate, where short-time refers to the time of a frame, and a frame contains 256 sampling points [59]. The short-time average ZCR indicates the rate of sign-changes of the signal over zero axis within an audio frame to determine whether a signal is voiced speech or background noise.