Digital twin-assisted imbalanced fault diagnosis framework using subdomain adaptive mechanism and margin-aware regularization

Our operating environment

  • Python 3.8
  • pytorch 1.10.1
  • numpy 1.22.0 (If you get an error when saving data, try lowering your numpy version!)
  • and other necessary libs

Datasets

Guide

  • This repository provides a concise framework for imbalanced fault diagnosis.
  • It includes the pre-processing for the data and the model proposed in the paper.
  • We have also integrated 8 baseline methods including 4 data-level and 4 algorithm-level methods for comparison.
  • train_test.py is the train&test process of our proposed method; train_test_base.py is the train&test process of 8 baseline methods.
  • You need to load the Save dataset in above Datasets link at first, and put them in the data folder.
    Then set --save_dataset (in args_diagnosis.py) to False and run in args_diagnosis.py.
  • You can also choose the modules or adjust the parameters of the model to suit your needs.

Run the code

The proposed method

  • args_diagnosis.py --transfer_task ADAMS_SEU or ADAMS_XJTU; --transfer_loss SAM+MAR; --save_dataset False

data-level methods

  • args_diagnosis.py --transfer_task SEU or XJTU; --SMOTETomek True; --gan False; --gen_data False; --save_dataset False
  • args_diagnosis.py --transfer_task SEU or XJTU; --SMOTETomek False; --gan True; --gen_data True;
    --gan_model ACGAN or VAE_GAN or WGAN_GP; --save_dataset False

algorithm-level methods

args_diagnosis.py --transfer_task SEU or XJTU; --SMOTETomek False; --gan False; --gen_data False; --cost_loss True;
--loss WL or FL or DWBL or CBL; --save_dataset False

Pakages

  • data needs loading the Datasets in above links
  • datasets contians the pre-processing process for the data
  • gans contians three gan models as baselines
  • loss contians four types of loss way
  • models contians the ResNet18 network as the feature extractor
  • utils contians two types of train&test processes

Citation

If our work is useful to you, please cite the following paper, it is the greatest encouragement to our open source work, thank you very much!

@paper{
  title = {Digital twin-assisted imbalanced fault diagnosis framework using subdomain adaptive mechanism and margin-aware regularization},
  author = {Shen Yan, Xiang Zhong, Haidong Shao, Yuhang Ming, Chao Liu},
  journal = {Reliability Engineering and System Safety},
  volume = {239},
  pages = {109522},
  year = {2023},
  doi = {https://doi.org/10.1016/j.ress.2023.109522},
  url = {https://www.sciencedirect.com/science/article/pii/S0951832023004362},
}

Contact