# Domain Adaptation Network with Double Adversarial Mechanism for Intelligent Fault Diagnosis
## 3 Proposed Method
### Domain Discriminator  
Inspired by GAN, the feature extractor and domain discriminator of the DAN-DAM model are adversarial to achieve domain-level alignment. The specific adversarial process is summarized as follows: The feature extractor extracts the features of the source domain data and the target domain data, then sends the extracted features to the domain discriminator. At this time, the main function of the domain discriminator is to distinguish whether the input features are from the source domain or the target domain. However, in order to realize that the unlabeled target domain samples, which are the same as the labeled source domain samples, can also be correctly classified, the feature extractor should be updated so that the extracted features of target domain are close to the source domain, which confuses the domain discriminator and makes it impossible to identify the origin of the samples. In addition, the prerequisite for the realization of the above objective is that the two label classifiers can correctly classify the samples in the source domain. The mathematical expression of label classifier for classification is as follows:  
\[L_{C}=-\sum_{i=1}^{C}\overline{y}_{i}\log y_{i} \tag{11}\]  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Module** & **Layer** & **Kernel Size** & **Stride** & **Channel** & **Pad** & **BN** & **Note** \\ \hline \multirow{4}{*}{Feature extractor F} & Conv-Pool1 & \(64\times 1/2\times 1\) & \(15\times 1/2\times 1\) & 16 & Same & Yes & SELU \\  & Conv-Pool2 & \(32\times 1/2\times 1\) & \(9\times 1/2\times 1\) & 32 & Same & Yes & SELU \\  & Conv-Pool3 & \(16\times 1/2\times 1\) & \(9\times 1/2\times 1\) & 64 & Same & Yes & SELU \\  & Conv-Pool4 & \(3\times 1/2\times 1\) & \(3\times 1/2\times 1\) & 64 & Same & Yes & SELU \\  & Conv-Pool5 & \(3\times 1/1\times 1\) & \(1\times 1/1\times 1\) & 64 & Same & Yes & SELU \\ \hline \multirow{3}{*}{Label classifier1 C1} & FC1 & \(64\times 100\) & / & / & / & / & SELU Dropout 0.5 \\  & FC2 & \(100\times 10\) & / & 1 & / & / & / \\  & Softmax & 10 & / & 1 & / & / & / \\ \hline \multirow{3}{*}{Label classifier2 C2} & FC1 & \(64\times 120\) & / & / & / & / & SELU Dropout 0.5 \\  & FC2 & \(120\times 10\) & / & 1 & / & / & / \\ \cline{1-1}  & Softmax & 10 & / & 1 & / & / & / \\ \hline \multirow{3}{*}{Domain discriminator D} & FC1 & \(64\times 32\) & / & / & / & / & SELU Dropout 0.5 \\  & FC2 & \(32\times 2\) & / & 1 & / & / & / \\ \cline{1-1}  & Softmax & 2 & / & 1 & / & / & / \\ \hline \hline \end{tabular}
\end{table}
Table 1: The parameters configuration of DAN-DAM model.  
Figure 3: Basic frame diagram of DAN-DAM model.  
where \(\overline{y}_{i}\) represents the real label, \(y_{i}\) is the predicted label, \(L_{C}\) denotes the loss of the label classifier and \(C\) represents the fault category.  
The mathematical expression of the domain discriminator is as follows:  
\[L_{D}=-\sum_{j=1}^{2}\overline{y}_{j}\log y_{j} \tag{12}\]  
where \(L_{D}\) represents the loss of the domain discriminator.  
In order to achieve the above objectives, the optimized objective function is as follows:  
\[\text{min}L_{C1}(x^{s})+L_{C2}(x^{s})-L_{D}(x^{s},x^{t})+L_{MMD}(x^{s},x^{t}) \tag{13}\]  
where \(L_{MMD}\) denotes the distribution distance loss between source domain samples and target domain samples in the high-dimensional feature space.  
\[\text{min}L_{C1}(x^{s})+L_{C2}(x^{s})+L_{D}(x^{s},x^{t})+L_{MMD}(x^{s},x^{t}) \tag{14}\]