cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DUX12 machine learning core advice

LPetr.1
Senior II

Hello. I have LIS2DUX12 accelerometer and have sucessfully ran machine learning example from STMems (activity_recognition_for_mobile) on our custom hardware.

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lis2dux12_STdC/examples/lis2dux12_mlc_activity_mobile.c

For our application, we need to be able to reliably detect when our device is being transported with a car but its not so straightforward. The few difficulties include:

1. The device orientation is not fixed

2. The device may shake gently or move very slowly during its normal application. This is perfectly fine and we should somehow not detect that. 

I have looked at different application_examples :
https://github.com/STMicroelectronics/STMems_Machine_Learning_Core/tree/master/application_examples

but not sure which would work best for us. If we cant find any suitable application example, we can try and train our own model with our own data.

I would appreciate if someone could share their insights and provide any feedback regarding our application. How should we handle different orientation problem and gentle shaking/slow movement?

5 REPLIES 5
Federica Bossi
ST Employee

Hi @LPetr.1 ,

For your application, the LIS2DUX12 MLC is well-suited to detect car transport in an orientation-independent manner and to reject false positives from gentle shaking or slow movement. You should:

  • Use the norm of the accelerometer data and statistical features for orientation independence.
  • Leverage the MLC's false-positive rejection and debounce features.
  • Train your own model if existing examples do not meet your needs, using ST's tools for data collection, feature extraction, and decision tree generation.
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

First of all thanks for your response. Additionally, I forgot to mention that MCU will not be actively sampling the data since it will be in sleep mode. I only want to receive INT from the accelerometer when it detects the correct movement pattern.


Regarding your tips, could you be more precise please?

  • Use the norm of the accelerometer data and statistical features for orientation independence.

Could you elaborate a little bit more about how to achieve orientation independence? What kind of features exactly I should look into and what is "norm of the accelerometer data" ?

 

  • Leverage the MLC's false-positive rejection and debounce features

Could you also elaborate on this a little bit more? What features precisely are you talking about, could you point me in the right direction so I could look into this more on the LIS2DUX12 datasheet. Are there any examples available of these features in STMems example projects so I could look into more?

 

First of all thanks for your response. Additionally, I forgot to mention that MCU will not be actively sampling the data since it will be in sleep mode. I only want to receive INT from the accelerometer when it detects the correct movement pattern.


Regarding your tips, could you be more precise please?

  • Use the norm of the accelerometer data and statistical features for orientation independence.

Could you elaborate a little bit more about how to achieve orientation independence? What kind of features exactly I should look into and what is "norm of the accelerometer data" ?

 

  • Leverage the MLC's false-positive rejection and debounce features

Could you also elaborate on this a little bit more? What features precisely are you talking about, could you point me in the right direction so I could look into this more on the LIS2DUX12 datasheet. 

  • Train your own model if existing examples do not meet your needs, using ST's tools for data collection, feature extraction, and decision tree generation.

I am just curious how would I need to train the data for orientation independance. Would it be enough to train data in one specific orientation and then let the tool handle everything or I would need to train the data in many different orientations? 

 

Additionally, I am concerned if using accelerometer is sufficient enough to reliably detect car movement whilst filtering out gentle shaking and small movement. I have seen some car movement detection examples but they all use accelerometer + gyroscope.

Hi @LPetr.1 ,

Use the norm of the accelerometer data and extract statistical features (mean, variance, energy, peak, zero-crossing) for orientation-independent detection.

Configure the MLC's debounce and false-positive rejection features to avoid spurious interrupts and collect and train data in multiple orientations for robust model performance.

Accelerometer-only detection is possible, but for maximum reliability, a combined accelerometer + gyroscope solution may be preferable.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

It is a little bit more clear but it still seems that you are just spitting random fancy words such as "MLC debounce and false-positive rejection features".

Can you please tell me specifically which features are you referring to and point me to relevant pages in the datasheet, because the LIS2DUX12 MLC datasheet has no mention of words "debounce" or "false-positive rejection"