cancel
Showing results for 
Search instead for 
Did you mean: 

Fan rack condition monitoring with industrial sensor machine learning core --- 1/2

Eleon BORLINI
ST Employee
This article describes how to use the Machine Learning Core (MLC) configuration in the ST MEMS sensors that can be found on the STWIN evaluation board. This example shows how MLC functionality embedded in ISM330DHCX can be used for fan rack condition monitoring use case.

MLC is a highly configurable and power-efficient hardware logic offered on ST sensors, supporting multiple Decision Tree classifiers. ISM330DHCX is a 6-axis iNemo inertial module that features MLC and can be found in the STWIN.

This example explains the following steps:

  1. How to capture the data log for each class to be classified
  2. How to label each data log
  3. How to design the decision tree classifier
  4. How to configure the MLC to run the generated decision tree
  5. How to check the decision tree output in real-time when it is running in the MLC

0. Preliminary settings
Software Tools
The picture below shows the workflow to implement the five steps above and the different software tools that can be used. For the example discussed here, STM32CubeProgSTBLE Sensor and Unico-GUI software tools will be used.


771.png
 

For more details on the software tools:

  • STBLESensor v4.8.0 (or higher) app for iOS/Android, used to acquire the sensor data, to program the MLC embedded in ISM330DHCX and to check its functionality in real time.
  • Unico-GUI v9.9.0 (or higher), used to generate the ISM330DHCX MLC configuration
  • STM32CubeProg v2.4.0 (or higher) an all-in-one multi-OS software tool for programming STM32 products.


Hardware Tools

In this example we will be using the ISM330DHCX inertial measurement unit (IMU), with an accelerometer and a gyroscope sensor. This sensor is one of the several sensors that are included with STWIN. The same procedure shown in this tutorial also applies to other ST sensors with MLC support.

For more details on the hardware:


1. Capture datalogs

In this example the MLC will be configured to recognize three different classes or scenarios of the fan rack working mode:

Each class to be classified by the decision tree must be characterized by one or more data logs.


Hardware required:

  • STEVAL-STWINKT1B, referenced as STWIN, is a development kit and reference design that simplifies prototyping and testing of advanced industrial IoT applications such as condition monitoring and predictive maintenance.
  • An Android/iOS smartphone that can run STBLESensor App. We will use it to interact with the STWIN during the acquisition phase and the real time test.
  • A fan rack, which is the platform that we want to monitor with MLC in this example. Any fan rack can be used for this demo as long as it is possible to turn it on/off and to apply a small weight on one of the fan blades (e.g. a metal spring paper clip) to emulate a failure.
  • A PC with peripherals for reading the microSD card where STWIN store the data logs.
  • Micro USB cable to connect the STWIN to the PC


Software required:

  • STM32CubeProg to flash the STWIN board with the latest logging firmware.
  • STBLESensor to acquire the sensor data in the three above mentioned conditions of the rack.

The first step of this tutorial will show how to interact with STBLESensor app to log the training data for the decision tree that we will implement in the ISM330DHCX MLC.

Before proceeding with the app, it is necessary to upload the logging firmware on STWIN. To do so, one has to navigate to the FP-SNS-DATALOG1 webpage and download the full package, which also contains the latest firmware version for logging data with STWIN .

To flash the board, one has to launch the STM32CubeProgrammer software, connect the board to the PC and enable the DFU mode.

To enable the DFU mode, the user has to push both USR and RESET button found on STWIN board, then has to release only the RESET button while keeping the USR button pushed. After 5 seconds, the user can also release the USR button and the board will be initialized in DFU mode.
772.png
The user can now open STM32CubeProgrammer, select USB in the top right dropdown list and can click on the "refresh" icon. If a device appears in the "Port" dropdown list then the DFU mode entry has been performed correctly.
773.png

Proceed by clicking "Connect". The software will read the device memory.

Now the user can click on the "Open file" tab, next to device memory, and will select the firmware downloaded in the previous step (default path .../FP-SNS-DATALOG1_V1.0.0/Projects/HSDatalog/Binary/HSDatalog.bin).

When the correct file is selected, one has to click on "Download" to upgrade the board firmware.
774.png

The user can now click the RESET button. The board will boot with the newly installed firmware running.

The user can now connect to STWIN using STBLESensor App (which can be downloaded from Google Play or Apple store). The app uses Bluetooth protocol to interact with the board, so make sure to enable Bluetooth on the phone before starting the app.

Once the app is loaded, the user can click on "Connect to a device" and a device named DTLG100 (default name of the board, it may differ) will show up. The user can select the active board by clicking and the app loads the board configuration.
775.png

In this tab the user can check all the sensors available on STWIN. For the application shown in this readme, any sensor needs to be selected but ISM330DHCX.

Once the user open the ISM330DHCX settings, it is able to select the full scale and the Output Data Rate of both Accelerometer and Gyroscope (referred as XL and Gyro from now-on). Since the goal is to use this data to train the MLC embedded in ISM330DHCX, and the MLC can't run to a frequency higher than 104Hz, the user needs to set both the ODRs to 104Hz. Regarding the full scale, the intensity of the movement that the sensor will acquire is limited so, selecting the lower full scale for both XL and Gyro (thus, 2g and 125dps) the user achieve the best performance.

By clicking on the play button in bottom right corner, the user will move to a different tab of the app. Here it is possible to specify the name of the acquisition and add a brief description of the test. The user can skip the SW_TAG settings. The user is now ready to start three different acquisitions of the sensor, one for every scenario of the fan rack.

Before clicking Start it is necessary to place the STWIN on top of the fan rack and let the fan rack work in three different scenarios. To achieve the best performance, STWIN needs to be double side taped to the fan rack and placed at the center of one of the fans. Once it is placed, we can differentiate the three scenarios as below:

  • Fan_off: obtained by not supplying the fan rack
  • Fan_on: obtained by supplying the fan rack
  • Fan_fault: can be obtained in a disruptive way by breaking one of the fan fins or, in a non disruptive way, by applying a small weight (e.g. a metal spring paper clip) on one of the fins. Once turned on, the fan rack will vibrate in a different way and will tend to move around. A good idea is to use double-sided tape also to attach the fan rack to the table.
776.png
It is now time to log the sensor data. The user needs to create a different log file for every scenario (total of 3). The length of the acquisition should be of ~1 minute per log in order to achieve a good training result. The user has to avoid inducing any other form of vibration to the fan rack while logging; any vibration or movement induced in the sensor by an external source can potentially cause the non validity of the data set.
[continues to Fan rack condition monitoring with industrial sensor machine learning core --- 2/2 ]
Comments
axo.1
Associate

i am also want to know about monitor. i hope this is helpful for me , thanks for sharing this with us. click here to check more about it.

Version history
Last update:
‎2021-07-19 01:40 AM
Updated by: