Anomaly detection in an electric motor

Motors are used for various applications and are becoming increasingly performant. They can be monitored in a very precise way thanks to the data they provide during operation. This data can also be used to enhance the application using Predictive Maintenance techniques.  

Predictive maintenance consists in optimizing maintenance strategy by automatically detecting aging or predicting anomalies. Machine learning help making the data generated by the system into meaningful data for Humans. We have added AI solution directly next to the Motor Control algorithm to run both anomaly detection & classification and motor control on the same microcontroller, reducing cost of system and optimizing resources. This approach an easily be adapted to many motors and for various applications. 


  • By measuring the current consumption instead of the vibration emitted by the motor, we only need the X-NUCLEO-IHM16M1 board, no additional sensor 
  • Each phase of the GBM2804H-100T three-Phase Motor contains the same information. For smaller signals we measured only one of them 
  • We created a dataset of 500 signals for both normal and abnormal behaviors. We changed the speed of the motor to simulate abnormal behaviors 
  • We created an ‘Anomaly Detection’ dynamic model in NanoEdge AI studio
  • We trained it directly on the edge on the P-NUCLEO-IHM03 kit (NUCLEO-G431RB + X-NUCLEO-IHM16M1 + GBM2804H-100T motor) and tested it live 


Current senor: X-NUCLEO-IHM16M1 (STM32Nucleo expansion board for current sensing)


Regular and Abnormal signals:
– Regular signals: Normal functioning
– Abnormal signals: Different speeds 
Signals length: 512 (1 axis)
Data rate: 24 kHz


Anomaly detection:
100 % accuracy, 0.6 KB RAM, 2.8 KB Flash

Blue points correspond to normal signals, red points to abnormal ones. 
The signal numbers are on the abscissa and the confidence of the prediction is on the ordinate