ms140429/FM4Motor

Foundation model for power electronics

9

stars

202

commits

Python

primary language

May 29, 2026

updated

README

Data-Efficient Motor Condition Monitoring with Time Series Foundation Models

preprint   preprint   huggingface     huggingface huggingface  

Official implemental code for the paper "Data-Efficient Motor Condition Monitoring with Time Series Foundation Models."

Dataset

Falut Diagnosis

The falut diagnosis raw dataset was collected and arranged by the Korea Advanced Institute of Science and Technology, and the adaptation edition used in this work can be found in huggingface

including:  

  • 1.0 kW, 1.5 kW and 3.0kW PMSM

Total 576M and 147M time points for current signal and vibration signal respectively

Total 1.9B observations 

Details   

Parameters1st PMSM (1.0 kW)2nd PMSM (1.5 kW)3rd PMSM (3.0 kW)Unit
Manufacturing companyHigen motorsHigen motorsHigen motors-
Rated power100015003000Watt
Input voltage380380380AC Voltage
Frequency606060Hz
Number of phase333Phase
Number of pole444-
Rated torque3.184.779.55Nm
Rated speed300030003000RPM
Synchronous inductance0.00.00.0H
Magnetic flux400350300mT
Rotor inertia2.077.4814.34Kgm²
Inter-turn resistance value (R_it)0.13850.09580.1087Ohm
Inter-coil resistance value (R_cc)0.04090.30210.1534Ohm

Fault Label  

In 1st PMSM (1.0 kW) as example:

Fault labelFault severity (%)Fault type
00.00inter-coil short circuit
00.00inter-turn short circuit
10.68inter-coil short circuit
20.81inter-coil short circuit
31.01inter-coil short circuit
41.34inter-coil short circuit
52.00inter-coil short circuit
62.26inter-turn short circuit
72.70inter-turn short circuit
83.35inter-turn short circuit
93.93inter-coil short circuit
104.41inter-turn short circuit
116.48inter-turn short circuit
127.56inter-coil short circuit
1312.17inter-turn short circuit
1421.69inter-turn short circuit

Project architecture

FM4FD/
├── README.md                 
├── requirements.txt
├── baseline
├───├── sota.py            # contains state-of-the-art timeseries classification models     
│   └── trad.py            # contains traditional deep learning models
│   └── other items
├── MOMENT  
├───├── zero_shot.py       # use moment as a feature exractor  
│   └── finetune.py        # finetune moment by LoRA or full-finetuning
│   └── classifier.py      # compare zero_shot without feature exraction
│   └── other items
├── Mantis  
├───├── zero_shot.py       # use mantis as a feature exractor  
│   └── finetune.py        # finetune mantis
│   └── other items  
├── 1.0kW  
│   ├── current           
│   └── vibration  
├── 1.5kW  
│   ├── current           
│   └── vibration  
├── 3.0kW  
│   ├── current           
│   └── vibration  
└── checkpoints/   
    ├── baseline             
    └── fm                   

Key Result Comparison  

Here are the results of SOTA deep learning models and fine-tuned foundation models for fault diagnosis.

     

The SOTA models are from tsai:

The foundation models are from MOMENT and Mantis.

Quick Start

First, download the corresponding dataset from the link above.

Then, change the dataset path into yours:

After that, you will be able to run the relevant code directly to see the corresponding results. For example, if you'd like to test the MOMENT feature exraction, you can run this command:

python -u MOMENT/zero_shot.py > /your/path/file/output.log 2>&1 &

Inspired by LogME, I've added scores to the model, you can get the model score when zero_shot happens, higher scores indicate the model is more applicable. 

At the same time, to better monitor the fine-tuning process in real time, I have added tensorboard to the MOMENT fine-tuning code, which allows us to run the following command immediately after the fine-tuning is complete:

tensorboard --logdir=<directory_name> --port=6006

For more steps and details about the implementation, you can check out my tutorial.

Contributors

stevenstage

194 commits

XinyuanLiao

7 commits

ms140429

1 commits

ms140429/FM4Motor

Foundation model for power electronics

9

stars

202

commits

Python

primary language

May 29, 2026

updated

README

Data-Efficient Motor Condition Monitoring with Time Series Foundation Models

preprint   preprint   huggingface     huggingface huggingface  

Official implemental code for the paper "Data-Efficient Motor Condition Monitoring with Time Series Foundation Models."

Dataset

Falut Diagnosis

The falut diagnosis raw dataset was collected and arranged by the Korea Advanced Institute of Science and Technology, and the adaptation edition used in this work can be found in huggingface

including:  

  • 1.0 kW, 1.5 kW and 3.0kW PMSM

Total 576M and 147M time points for current signal and vibration signal respectively

Total 1.9B observations 

Details   

Parameters1st PMSM (1.0 kW)2nd PMSM (1.5 kW)3rd PMSM (3.0 kW)Unit
Manufacturing companyHigen motorsHigen motorsHigen motors-
Rated power100015003000Watt
Input voltage380380380AC Voltage
Frequency606060Hz
Number of phase333Phase
Number of pole444-
Rated torque3.184.779.55Nm
Rated speed300030003000RPM
Synchronous inductance0.00.00.0H
Magnetic flux400350300mT
Rotor inertia2.077.4814.34Kgm²
Inter-turn resistance value (R_it)0.13850.09580.1087Ohm
Inter-coil resistance value (R_cc)0.04090.30210.1534Ohm

Fault Label  

In 1st PMSM (1.0 kW) as example:

Fault labelFault severity (%)Fault type
00.00inter-coil short circuit
00.00inter-turn short circuit
10.68inter-coil short circuit
20.81inter-coil short circuit
31.01inter-coil short circuit
41.34inter-coil short circuit
52.00inter-coil short circuit
62.26inter-turn short circuit
72.70inter-turn short circuit
83.35inter-turn short circuit
93.93inter-coil short circuit
104.41inter-turn short circuit
116.48inter-turn short circuit
127.56inter-coil short circuit
1312.17inter-turn short circuit
1421.69inter-turn short circuit

Project architecture

FM4FD/
├── README.md                 
├── requirements.txt
├── baseline
├───├── sota.py            # contains state-of-the-art timeseries classification models     
│   └── trad.py            # contains traditional deep learning models
│   └── other items
├── MOMENT  
├───├── zero_shot.py       # use moment as a feature exractor  
│   └── finetune.py        # finetune moment by LoRA or full-finetuning
│   └── classifier.py      # compare zero_shot without feature exraction
│   └── other items
├── Mantis  
├───├── zero_shot.py       # use mantis as a feature exractor  
│   └── finetune.py        # finetune mantis
│   └── other items  
├── 1.0kW  
│   ├── current           
│   └── vibration  
├── 1.5kW  
│   ├── current           
│   └── vibration  
├── 3.0kW  
│   ├── current           
│   └── vibration  
└── checkpoints/   
    ├── baseline             
    └── fm                   

Key Result Comparison  

Here are the results of SOTA deep learning models and fine-tuned foundation models for fault diagnosis.

     

The SOTA models are from tsai:

The foundation models are from MOMENT and Mantis.

Quick Start

First, download the corresponding dataset from the link above.

Then, change the dataset path into yours:

After that, you will be able to run the relevant code directly to see the corresponding results. For example, if you'd like to test the MOMENT feature exraction, you can run this command:

python -u MOMENT/zero_shot.py > /your/path/file/output.log 2>&1 &

Inspired by LogME, I've added scores to the model, you can get the model score when zero_shot happens, higher scores indicate the model is more applicable. 

At the same time, to better monitor the fine-tuning process in real time, I have added tensorboard to the MOMENT fine-tuning code, which allows us to run the following command immediately after the fine-tuning is complete:

tensorboard --logdir=<directory_name> --port=6006

For more steps and details about the implementation, you can check out my tutorial.

Contributors

stevenstage

194 commits

XinyuanLiao

7 commits

ms140429

1 commits

Languages

Python

94.3%

Jupyter Notebook

5.7%