Motor fault detection and classification

Implementing a fault detection and classification framework in motors is the first step of a predictive maintenance strategy. Predictive maintenance helps reduce production costs by proactively addressing potential motor issues to reduce downtime, avoiding production losses, prolonging the equipment lifespan and driving decision making thanks to actual data. However the detection of faults and their classification comes with several challenges such as data collection, preprocessing and feature engineering as well as Machine Learning model interoperability and optimization.

In this use case, we show how the STM32 AI Ecosystem can help you along this journey, and how AI can provide in-depth and automated signal analysis, giving the maintenance team unparalleled reliability and confidence in managing upcoming events.


By using the ISE OneX test bench setup, we accurately created and recreated multiple kinds of faults including motor rotation unbalance, loose or faulty bearings, and shaft misalignment.

The goal was to use NanoEdge AI Studio to generate a machine learning library able to classify these faults. Here is how we proceeded: 

  • First, we set up the datalogger generator in NanoEdge AI Studio to continuously record motor vibration data using the STEVAL-PROTEUS1 with its built-in always-on ISM330DHCX sensor.
  • We used the recorded vibration data and the Sampling finder tool provided by NanoEdge AI Studio to determine the best combination of signal length and data rate to use for the project. 
  • During the benchmark process, NanoEdge AI Studio identified several libraries capable of classifying the nominal state of the motor and the 4 kinds of faults with a high accuracy. 
  • With the validation step in NanoEdge AI Studio, we selected the library that produced the best results on new datasets generated from our tests. 
  • After compiling the library, we deployed it in the STEVAL-PROTEUS board by Bluetooth using the ST BLE Sensor mobile app

You can also follow the same steps to create a similar AI model able to classify multiple levels of misalignment (0.0, 0.2, 0.4 and 0.6 mm).


3-axis accelerometer featured on the STEVAL-PROTEUS1 wireless smart sensor evaluation board (reference: ISM330DHCX).


5 classes for N-class classification:

  • No fault
  • Rotation unbalance 
  • Loose bearings 
  • Faulty bearings 
  • Misalignment

Signal length: 1536 (512 per axis, 3 axis), approximately 1500 signals per class

Data rate: 1667 Hz, full scale: 8g


Fault classification:
99.80% accuracy, 12.7 Kbytes of RAM, 25.4 Kbytes of Flash memory