cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Machine Learning with Sensortile.box and Qeexo AutoML for predictive maintenance? --- MEMS&Sensors "On-Life" series

Eleon BORLINI
ST Employee
In industrial environments, it is often important to be able to recognize when a machine needs to be serviced before the machine experiences a critical failure. This type of problem is often called predictive maintenance. In this tutorial, we are solving predictive maintenance problems using a one-class classification model for anomaly detection, where the model can make a monitoring system aware that a machine is running in a manner that is different than its standard operating behavior.


Table of the contents
 

  1. Why it is important to do some predictive maintenance?
  2. Detecting anomalies with Sensortile.box and Qeeexo ML: Project Description
  3. Problem Scenario
  4. Parameter Configuration
  5. Sensor Configuration
  6. Data Collection
  7. Model Training
  8. On Life!

Why it is important to do some predictive maintenance?

In industrial environments, it is often important to be able to recognize when a machine needs to be serviced before the machine experiences a critical failure. This type of problem is often called predictive maintenance. One approach to solving predictive maintenance problems is the use of a one or multi-class classification models for anomaly detection, where the model can make a monitoring system aware that a machine is running in a manner that is different than its standard operating behavior.
 

Detecting anomalies with Sensortile.box and Qeeexo ML: Project Description

This tutorial describes how to program the SensorTile.box through Qeexo AutoML to build a one-class classification model for anomaly detection on machine vibration data. More complex models are available at this link.

Problem Scenario

To detect various normal or anomalous machine operating conditions, a fault simulator is used. It consists of a flywheel driven by a rotational motor that can be configured to spin at various rates and can also be configured to have a number of different attachments, in order to simulate a wrong functioning of the motor. A SensorTile.box board is fixed on the rotor and data are acquired from the onboard accelerometers via USB - VCOM.
811.png
 

Parameter Configuration

Before initializing the project, open Qeexo.com and check if you have installed the QeexoML tool on your PC. You might found more practical information in the "Resource" section, in the Installation and in the User guides. When the hardware is ready, you can start the project from the launch page.
812.png

Sensor Configuration

For any sensor configuration, we need to consider three factors:

  • What type of data will capture the differences between our classes
  • What signal length will capture the differences between our classes
  • What range of sensor values will fully capture the range of our input

For this problem, accelerometer and gyroscope sensors at an ODR of 6667 Hz, with FSRs of +/- 2g and +/- 125 dps, will be selected respectively. This should allow us to accurately capture the high frequency, high precision data typically required for machine vibration classification.
 

813.png

Data Collection

The target of this application is to determine whether the machine is running normally or not. In this case, normal machine behavior is set to be approximately 1500 RPM with no physical attachments.

If just a one-class model is enough, there is only the need to collect data under these “normal” conditions, and we will use the resulting model to determine whether or not the machine is running under these conditions.

For this case, we will collect 200 seconds of continuous “1500 RPM” data. The first 10 seconds of this data is shown in the figure below.
814.png
 

Model Training

After configuring our sensors and collecting our data, we are ready to build an initial model. We will select the collected data from our Training page and press “Start New Training”. It is interesting to check the difference between an automatic an manual selection of the features an

Running a manual build

To build a model using these features on both the accelerometer and gyroscope data in a manual way, select Manual Sensor Selection on the first training settings page, and then we’ll select Manual Feature Selection on the next page, so that all of the feature groups are selected.

815.png
Next, we’ll select the maximum instance length for 6.6kHz data and a similar classification interval307 ms and 250 ms respectively, and we’ll select Local Outlier Factor (LOF)* model type for the build. We will use these same values for instance lengthclassification interval, and model type for all of the builds in this demo.
816.png
 

After all of the configuration parameters have been set, we can launch the build by pressing the “Start Training” button.

After training has completed, the library will be flashed to the connected device and the model results will be available on the Models tab:
817.png

As shown here, the LOF model is already able to achieve very high cross-validation (CV) accuracy with relatively low latency and size. But let's see how the problem can be treated and solved also with the "automatic sensor & feature selection" tool.
 

Running a build with Automatic Sensor & Feature Selection

In this case, most of the same settings from before are used, except we will select the Automatic option in the Sensor Selection pane.
818.png

 

Enabling this option will apply Qeexo’s selection algorithms to find the optimal sensors and features for the given problem, at the expense of increased build time. In this case, the build took about 40% longer than the all-features build.

After the build has completed, the final model will appear at the top of the Models tab:
819.png

 

From the image above, we can see that with AutoML’s sensor and feature selection enabled, we are able to achieve even higher model accuracy than all-features model, while also having similar latency and substantially smaller model size than the all-features model.
 

On Life!

Finally, we will want to flash the compiled binary to our ST.box and check that the classifier is producing the expected output. As shown in the video version of this tutorial, the final model is able run inference on the embedded device and accurately recognize a variety of anomalous states, in real time. Check it out on our website at: https://qeexo.com/video


See this link for reference
See partner page Qeexo.com
 
Version history
Last update:
‎2021-12-03 08:47 AM
Updated by: