cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSV16X Sensor Fusion (SFLP): Does It Use Filtered or Raw Data?

lynxie
Associate

Hello all,

I am working with the LSM6DSV16X and trying to determine whether the Sensor Fusion Low Power (SFLP) algorithm processes raw or filtered accelerometer and gyroscope data. Specifically, can I adjust filtering settings (e.g., LPF2 bandwidth) before the data is used by SFLP?

What I Have Reviewed

I’ve checked both the LSM6DSV16X datasheet and Application Note AN5763, but I haven’t found a clear answer.

  • The Sensor Fusion section only says it generates "the following data based on the accelerometer and gyroscope data processing," but doesn't specify which accelerometer and gyroscope data it uses.
  • Figure 3 in AN5763 (Accelerometer filtering chain - UI path) outlines filtering stages but does not show where SFLP takes its input.
  • SFLP writes its output to FIFO, but it’s unclear if it takes its input before or after filtering.
  • I understand that SFLP ODR must be ≤ sensor ODR, but does it depend on filtering settings as well?

What I Need to Confirm

  1. Does SFLP process raw or filtered sensor data? If filtered, which filtering settings affect its inputs?
  2. Does Full Scale (FS) impact SFLP calculations, or is it only ODR-dependent?

This should be documented somewhere, so I’d appreciate insights from ST engineers or anyone familiar with the internal data path.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Absolutely agree. I will submit a request to update the online document. Hopefully it will be approved, and the additional information will be added. But there is a constraint to keep it as short as possible, because it is already so large (if you add up the number of pages in the datasheet and all application notes, the total is something around a thousand pages).

For now, you have the answers: SFLP (as MLC/FSM and other embedded functions) take its input from LPF1 in the accelerometer chain, and from LPF2 in the gyroscope chain; their setting will therefore impact SFLP. Higher ODR leads to a more accurate gyroscope integration, but sensor RMS noise will also be higher. Gyroscope saturation should be avoided, accelerometer saturation matters less. Lower full scale will increase the resolution and therefore the accuracy, but the risk of saturation will be higher. It is a delicate balance that is specific to every application.

View solution in original post

3 REPLIES 3
Andrea VITALI
ST Employee

AN5763 figure 3 in paragraph 3.6: advanced functions, aka embedded functions including SFLP, are fed with LPF1 output. For the gyro the info is missing but one can guess by looking at where other embedded blocks such as MLC and FSM take their input: for gyro this is the output of its LPF2.

SFLP is independent of the full-scale but the full-scale will affects its accuracy. Similarly to ODR, SFLP is independent of ODR, but ODR will affects its accuracy.

The higher the ODR, the better and more accurate the gyroscope integration. Select higher ODR for best accuracy (at higher ODR however the sensor noise will be larger because there is less averaging and down-sampling after ADC, assuming high-performance mode is selected).

For the full scale: the lower the full scale, the better the accuracy of accelerometer and gyroscope data. But there is the risk of saturation to be taken into account.

Gyroscope data is most important. A small full-scale would ensure maximum resolution and accuracy but it can saturate more easily during highly dynamic motion (rotations). It is _critical_ for SFLP output to guarantee that gyro does not saturate. When in doubt, select a large full scale to minimize risk of saturation but not so large that the coarser quantization compromise accuracy (example 1000dps can be better than 2000dps, unless at 1000dps you risk saturation).

Accelerometer data is less important. It is given less weight because linear acceleration is added to the gravity vector. For the fusion, the gravity vector is needed to compute roll and pitch, but it is hard/impossible to be sure that the accelerometer is measuring only this, even if norm is 1g (when the norm is not 1g one could be sure of that this is _not_ the gravity vector). Therefore, full scale for the accelerometer matters less. Small full scale would guarantee higher accuracy for the gravity vector but with higher risk of saturation. The lower weight given to the estimate based on accelerometer data makes this less important.

lynxie
Associate

Hi Andrea. Thank you for your response.

I'd previously seen that AN5763 Figure 3 references "Advanced functions," but the note beneath the diagram is the only place I can find "Advanced functions" referenced in the documentation and it states:

“The ‘Advanced functions’ block in the figure above refers to the pedometer, step detector and step counter, significant motion and tilt functions, described in Section 6 Embedded functions, and also includes the finite state machine and the machine learning core.”

Sensor Fusion is not mentioned, making it unclear whether SFLP follows the same data path.

Additionally, as you noted, the documentation does not specify where the gyroscope input to SFLP comes from, requiring us to infer its behavior based on other embedded functions. Developers shouldn’t have to guess about fundamental data paths—this is what documentation is for. Having a clear, definitive statement on this would be extremely helpful.

Could ST confirm whether:

  1. SFLP takes its accelerometer input from LPF1 and its gyroscope input from LPF2?
  2. If so, do the LPF1 and LPF2 settings in the UI path directly impact SFLP calculations, or does SFLP apply an independent internal filtering chain?

Additionally, the insights you shared about the relative importance of gyroscope vs. accelerometer data for fusion accuracy would be useful to have in the documentation. Having this information readily available would help developers make informed decisions without needing to rely on forum discussions.

Since sensor fusion is such a major feature of the LSM6DSV16X, it would be valuable to have the SFLP data path, dependencies, and filtering behavior clarified in future documentation updates.

 

Absolutely agree. I will submit a request to update the online document. Hopefully it will be approved, and the additional information will be added. But there is a constraint to keep it as short as possible, because it is already so large (if you add up the number of pages in the datasheet and all application notes, the total is something around a thousand pages).

For now, you have the answers: SFLP (as MLC/FSM and other embedded functions) take its input from LPF1 in the accelerometer chain, and from LPF2 in the gyroscope chain; their setting will therefore impact SFLP. Higher ODR leads to a more accurate gyroscope integration, but sensor RMS noise will also be higher. Gyroscope saturation should be avoided, accelerometer saturation matters less. Lower full scale will increase the resolution and therefore the accuracy, but the risk of saturation will be higher. It is a delicate balance that is specific to every application.