cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use multiple decision tree with the MLC of a LSM6DSOX

Jmong.1
Associate II

Good afternoon everyone,

I am currently working on a predictive maintenance projet using vibration classification with the MLC of a LSM6DSOX.

I would like to try using several decision tree at the same time (with a maximum of 8 according to the datasheet), 3 for example.

I have some trouble to build my .ucf file.

I tried to do exactly the same than with a single decision tree, but it does not work.

Actually I can build it the .ucf file, but I am getting "0x00" (default value) output in every channels of my MLC, whereas it should not be possible with the configuration I made.

So I think I made a mistake during the configuration step on Unico, but I cannot see it.

Maybe there are requirements I did not follow, or I may have to change my MLC configuration ...

Is there any tutorial that explain how to configure the MLC with several decision tree ?

Or can anyone explain me my possible mistake ?

Thank you,

Have a nice day,

Julien.

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @Jmong.1​ , I believe you already checked the AN5259 p.15 and sgg, especially the:

Note: when using multiple decision trees, all the parameters described in the previous sections (inputs, filters, features computed in the time window, the time window itself, and also the data rates) are common for all the decision trees.

This means that the multiple MLC configurations should be as uniform as possible.

You may also check this registered webinar, if it can be of any help for you.

Btw, could you please share the .ucf file and the decision tree configurations? Do you get an output different from 00h when you change the activity (so that the decision tree output should change accordingly)?

Regards

Jmong.1
Associate II

Hi Eleon,

I tried to classify 5 different viration patterns with a single decision tree but I did not get enough precision, so I wanted to try another approach using 3 decision trees with a strategy 1 vs all for the most critical classes (and a decision tree with the 3 last classes), just to see If the results are better.

I kept all the parameters the same exept for the input data set (I changed the label of the classes depending on the classe I want to classify; Is it a problem ?)

The output of the MLC is always 0x00 for each decision tree whatever I am doing with the accelerometer.

Here are the parameters I choose to configure the MLC :

  • Device : LSM6DSOX
  • MLC ODR : 26 Hz
  • Input : accelerometer only
  • Accelerometer full scale : 2g
  • Accelerometer ODR : 26 Hz
  • Number of decesion tree : 3
  • Window lenght : 130 (5 seconds)
  • Filter : No filter
  • Pre-scale counter value : 0 (for each classes of each decision tree)

I copy past here my 3 decision trees (from Weka) :

Error vs All :

F9_PeakToPeak_on_ACC_Z <= 0.086914: Others (100.0)

F9_PeakToPeak_on_ACC_Z > 0.086914

|  F6_ENERGY_on_ACC_Z <= 133.5625: Error (18.0)

|  F6_ENERGY_on_ACC_Z > 133.5625

|  |  F3_VAR_on_ACC_Z <= 0.016602: Others (5.0)

|  |  F3_VAR_on_ACC_Z > 0.016602: Error (7.0)

Number of Leaves :   4

Size of the tree :   7

Static vs All :

F9_PeakToPeak_on_ACC_Z <= 0.001465: Static (29.0)

F9_PeakToPeak_on_ACC_Z > 0.001465

|  F9_PeakToPeak_on_ACC_Z <= 0.003418

|  |  F4_ENERGY_on_ACC_X <= 0.000773: Others (6.0)

|  |  F4_ENERGY_on_ACC_X > 0.000773: Static (4.0/1.0)

|  F9_PeakToPeak_on_ACC_Z > 0.003418: Others (91.0)

Number of Leaves :   4

Size of the tree :   7

Coffee Steps :

F9_PeakToPeak_on_ACC_Z <= 0.007324

|  F9_PeakToPeak_on_ACC_Z <= 0.003418: Mix (7.0)

|  F9_PeakToPeak_on_ACC_Z > 0.003418

|  |  F6_ENERGY_on_ACC_Z <= 135.1875: Coffee (17.0/2.0)

|  |  F6_ENERGY_on_ACC_Z > 135.1875: Mix (5.0)

F9_PeakToPeak_on_ACC_Z > 0.007324

|  F7_PeakToPeak_on_ACC_X <= 0.012501

|  |  F6_ENERGY_on_ACC_Z <= 132.6875: Milk (3.0)

|  |  F6_ENERGY_on_ACC_Z > 132.6875: Coffee (12.0/1.0)

|  F7_PeakToPeak_on_ACC_X > 0.012501: Milk (21.0/1.0)

Number of Leaves :   6

Size of the tree :   11

I cannot upload .ucf files so I renamed it .txt (it is the same content).

Thank you,

Have a nice day,

Best regards,

Julien