# Intelligent Diagnosis of Compound Faults of Gearboxes Based on Periodical Group Sparse Model
## 2 Materials and Methods
### Theoretical Methods
#### 2.1.2 Label Consistency Dictionary Classification Algorithm  
Since the traditional dictionary learning algorithm does not contain discriminative information, i.e., it cannot find an explicit correspondence between dictionary atoms and fault categories labels. To solve this problem, [PERSON] et al. [7] proposed a label consistent KSVD(LC-KSVD) dictionary learning algorithm. The algorithm adds label consistency discriminative sparse coding terms and optimal classification error terms to the objective function, so that dictionary atoms and fault categories are associated. The dictionary is  
Figure 2: Sparse effect of different sparse models. forced to make the sparse coefficients distinctive during the learning process through the discriminative sparse encoding matrix, i.e., the same class of signals produces similar sparse encoding. The dictionary reconfigurability and discriminability are maintained while integrating the advantages of traditional dictionaries. This algorithm has been widely used in face recognition and other fields. The objective function of LC-KSVD as follows:  
\[ \begin{split}\langle D,A,W,X\rangle=\underset{D,A,W,X}{\text{ argmin}}&\|Y-DX\|_{2}^{2}+\alpha\|Q-AX\|_{2}^{2}+\beta\|H-WX\|_{2}^{2}\\ & s.t.\ \forall i,\|s_{i}\|_{0}\leq T\end{split}  \tag{5}\]  
where \(\|Y-DX\|_{F}^{2}\) is the sparse fidelity term, i.e., denotes the reconstruction error. Where \(Y=[y_{1},\ldots y_{N}]\in R^{n\times N}\) is the set of \(N\) and n-dimensional training signals an \(D=[d_{1},\ldots d_{K}]\in R^{n\times K}\) is an overcomplete dictionary composed of \(K\) atoms. \(X=[x_{1},\ldots x_{N}]\in R^{K\times N}\) is the coefficient of the training signal after sparse decomposition. \(\|Q-AX\|_{F}^{2}\) denotes the discriminative sparse coding error, i.e., the label agreement term, which aims to constrain samples of the same class to produce similar sparse coding, and \(A\in R^{K\times K}\) denotes the linear transformation matrix, with \(Q=[q_{1},\ldots,q_{N}]\in R^{K\times N}\) denoting the discriminative sparse coding. \(\|H-WX\|_{F}^{2}\) denotes the classification error term of the classifier model, which helps to obtain \(H\in R^{L\times N}\), which denotes the category label matrix of the training samples and \(W\in R^{L\times K}\) denotes the linear classifier parameters. \(\alpha\) and \(\beta\) are the weighting coefficients between the control correlation terms. As shown in Figure 3, discriminative sparse coding is used to obtain the best classification results. Assume that the training sample matrix contains three classes of training signals \(Y=[Y_{1},Y_{2},Y_{3}]\), where \(Y_{1}\) contains two samples \(y_{1}\) and \(y_{2}\). \(Y_{2}\) contains three samples \(y_{3}\), \(y_{4}\), \(y_{5}\),\(Y_{3}\) contains four samples \(y_{6}\), \(y_{7}\), \(y_{8}\), \(y_{9}\). The dictionary \(D\) contains three sub-dictionaries of the three categories, and each sub-dictionary \(D_{i}(i=1,2,3)\) has three atoms, thus obtaining the ideal discriminative sparse coding matrix. To facilitate the solution, Equation (5) is rewritten in the following form:  
\[ \begin{split}\langle D,A,W,X\rangle=\underset{D,A,W,X}{\text{ argmin}}&\left\|\left(\begin{array}{c}Y\\ \sqrt{\alpha}Q\\ \sqrt{\beta}H\end{array}\right)-\left(\begin{array}{c}D\\ \sqrt{\alpha}A\\ \sqrt{\beta}W\end{array}\right)X\right\|_{F}^{2}\\ & s.t.\forall i,\|x_{i}\|_{0}\leq T\\ &\widetilde{Y}_{new}=\left(Y^{T},\sqrt{\alpha}Q^{T},\sqrt{\beta}H^{T} \right)^{T}\\ &\widetilde{D}_{new}=\left(D^{T},\sqrt{\alpha}A^{T},\sqrt{\beta}W^{T} \right)^{T}\end{split}  \tag{6}\]  
Figure 3: Using discriminative sparse coding to obtain the best classification results.