## 3 The Proposed Method
### Flow of the Recognition Method  
In order to realize online cutting pattern recognition for the shearer, the cutting sound signal is collected as the criterion, and an improved FCM method optimized by FGOA is applied in this paper. The flow of the proposed FCM-FGOA can be shown as follows:  
Step 3.1: Pretreatment on the initial signal. The original sound is divided into \(T\) series, where \(T_{1}\) of them are training samples and the rest \(T_{2}\) are testing samples. In order to extract multiple scale information from the original signal clips, wavelet packet transform is first applied to decompose the sound due to its excellent time-frequency analysis ability [45]. Then, a series of wavelet packet coefficients are obtained, defined as \(d_{i,k}^{j}\), which represents \(k\)-th coefficient of \(i\)-th node in the \(j\)-th layer. As the energy of the wavelet packet node often contains key characteristics and is easy to calculate [46], the feature vector in this paper consists of the energy of nodes, which can be calculated as follows:  
\[e_{i}=\sum_{k}d_{i,k}^{j2}, \tag{13}\]  
where \(e_{i}\) donates the energy of \(i\)-th wavelet packet node. Normalization is conducted subsequently to facilitate computation and training. It was assumed that the value range of all node energy was [\(e_{\text{min}}\), \(e_{\text{max}}\)], and normalized \(e_{i}\) can be shown as follows:  
\[e_{Ni}=\frac{e_{i}-e_{\text{min}}}{e_{\text{max}}-e_{\text{min}}}, \tag{14}\]  
where \(e_{Ni}\) belongs to [0, 1]. For the \(t\)-th sound, a \(2^{j}\)-dimensional vector can be extracted as follows:  
Figure 2: Iterative process of the proposed fruit fly genetic optimization algorithm (FGOA).  
\[e^{t}=\left\{e^{t}_{N1},e^{t}_{N2},...e^{t}_{N2^{j}}\right\}, \tag{15}\]  
where \(j\) is the decomposition level of wavelet packet transform (WPT) and \(e^{t}\) is the feature vector, \(t=1\), 2,..., \(T\).  
Step 3.2: Parameters preset. Key parameters of FCM-FGOA contain: weighted index \(m\), range of category number \(c\), threshold value of the iterative process \(\xi\), maximal iteration number \(N\), random fly distance range \(L\), number of fruit flies \(P\), genetic proportion \(P_{g}\), crossover probability \(P_{c}\) and mutation probability \(P_{m}\) and original clustering center \(v^{(0)}_{p}\), where \(v^{(0)}_{p}\) is composed by \(c\cdot 2^{j}\) elements and can be presented as \(v^{(0)}_{p}=[v^{0}_{11},v^{0}_{12},...,v^{0}_{12},...,v^{0}_{c1},v^{0}_{c2},...,v^{0}_{c2^{j}}]\), \(p=1,2,3,\ldots,P\). \(T_{1}\) training samples are applied to optimize the FCM-FGPOA and the remaining \(T_{2}\) are used to validate the clustering algorithm.  
Step 3.3: Iterative optimization. \(P\) clustering centers are produced and the fitness value of each center is calculated according to Equation (16). When \(J_{m}(U,P)\) reaches its smallest value, the fitness is at its maximum. The iterative process is conducted according to FGOA and a new clustering center is generated in each circulation:  
\[f=\frac{1}{1+J_{m}(U,P)} \tag{16}\]  
Step 3.4: Terminal condition. If the iteration number reaches \(N\) or a center error less than \(\xi\), terminate the iteration process; otherwise, continue the optimization. The flowchart of the FCM-FGOA can be shown in Figure 3.  
Figure 3: Flowchart of the fuzzy C-means (FCM)-FGOA. WPT, wavelet packet transform.