cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSOX - Unico feature computation for machine learning

Balázs VARGA
Associate II

Hi,

I am trying to use the Machine Learning Core in the LSM6DSOX sensor. I collected some test data, computed the features using the Unico GUI, but the zero-crossing values don't seem right. I did my own computations with MATLAB and all the other features match nicely.

I attached a screenshot of the problem, including a graph of a segment of my acceleration data. Unico says there are 24 zero-crossings in this segment, when there are clearly only 10. Am I misinterpreting this feature, or is it possible that there is a bug in Unico?

Furthermore, my data is 253 samples long and the window size is set to 52 samples, so the data can be divided into 4 whole segments. However, the ARFF output file generated by Unico contains only 3. Why is the last segment omitted?

Thanks,

Balázs

2 REPLIES 2
Eleon BORLINI
ST Employee

hi Balázs, sorry for the delay in our answer (We usually check the tag MEMS and Sensors). Btw it's quite strange... A couple of questions: the feature “Zero-crossing�? computes the number of times the selected input crosses a selected threshold in the defined time window. Did you configure thresholds different form zero? Do the other two frames give the same ouput if processed in Unico or in Matlab?

About the samples number and the window length, which is the ODR of the sensor? I suppose 26Hz, but just to be sure... regards

Balázs VARGA
Associate II

Hi, thanks for the reply.

"Did you configure thresholds different form zero?"

No, I made sure the threshold was set to zero both in Unico and in MATLAB. I haven't tried any other values.

"Do the other two frames give the same ouput if processed in Unico or in Matlab?"

No, all frames give different results. The values computed by Unico are usually (always?) significantly larger.

"which is the ODR of the sensor? I suppose 26Hz"

It was indeed 26 Hz.

During the few weeks since I posted my original question, I made a custom program that does the data acquisition, computes the features and generates the ARFF file. I implemented the zero-crossing detection the same way I did in MATLAB. Now I only use Unico to generate the configuration file which I can use to program the chip. My prototype project works very nicely, the sensor recognizes the movements I recorded. I think this kind of confirms that the zero-crossings counted by the sensor are in correspondence with the values computed by my program (although my classification did not rely solely on the number of zero-crossings, so I can't say this with 100% certainty).