2024-09-01 03:12 PM
Hi, I am currently evaluating the LSM6DSV16X IMU and I have a few questions regarding the sensor fusion functionalities, particularly the gyroscope bias.
It is not very clear to me when to enable the gyroscope bias, and how to use the data it provides.
Here is my reasoning: at rest, the gyroscope data has a little offset from 0. In order to compensate from that offset, one can average the data received, and subtract that from the gyroscope data.
Am I correct in thinking that the gyroscope bias generated by the SFLP block is an estimation of this offset ?
I intend to record IMU data of a moving object. When the device is moving, does enabling the gyroscope bias functionality automatically correct the output gyroscope data ? Or should I first enable gyroscope bias at rest, save the value it gives me, and then subtract the offset from gyroscope data ?
I believe the latter answer to be correct, could you confirm this please ?
I am basing my code off of the provided examples : https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dsv16x_STdC/examples/lsm6dsv16x_sensor_fusion.c
In the sensor_fusion example for lsm6dsv16x, the lsm6dsv16x_sflp_game_gbias_set() function is used. Will setting the gyroscope bias this way impact the gyroscope and game rotation output ? In my testing, the values I get for gyroscope bias seem to be close to the gyroscope values at rest, but using lsm6dsv16x_sflp_game_gbias_set() did not seem to have much of an impact on the gyroscope output values.
I could subtract the offsets manually when receiving gyroscope data, but I assume this will not be taken into account by the game rotation algorithm ?
Is there a similar correction mechanism needed for the accelerometer data?
Finally, Table 1 of the datasheet specifies sensor fusion performance in three different scenarios: static accuracy, low dynamic accuracy, and high dynamic accuracy.
Do you have more details about what kind of conditions low dynamic and high dynamic accuracy represent please ?
Thanks in advance for your help
Nicolas Goualard
2024-09-03 01:50 AM
Hi @NicolasGoualard ,
-> Am I correct in thinking that the gyroscope bias generated by the SFLP block is an estimation of this offset ?
Yes.
-> When the device is moving, does enabling the gyroscope bias functionality automatically correct the output gyroscope data? Or should I first enable gyroscope bias at rest, save the value it gives me, and then subtract the offset from gyroscope data ?
Gyro bias is calculated automatically only when the device is stationary, no need to take care of reading the bias when the gyroscope is at rest, you can read it at any time. The bias result is not applied automatically to the output data, so you have to do the subtraction.
Take care that if that the device is never stationary after enabling the gyroscope bias, the bias will not be evaluated.
-> I could subtract the offsets manually when receiving gyroscope data, but I assume this will not be taken into account by the game rotation algorithm?
Gyro bias is automatically considered for game rotation vector algorithm, but it is not used to compensate the raw data gyroscope output
-> Is there a similar correction mechanism needed for the accelerometer data?
It is not possible for the sensor to evaluate accelerometer bias since depends on the pcb orientation versus the gravity vector, so it must be implemented at system level.
2024-09-03 09:22 AM - edited 2024-09-03 09:23 AM
Hi @Federica Bossi , thanks for your answer. I have a few follow-up questions if you don't mind.
If I know the sensor will never be stationary after enabling gyroscope bias, can I provide a previously saved gyroscope bias to the sensor with lsm6dsv16x_sflp_game_gbias_set() so that the game rotation algorithm is more precise ?
Regarding accelerometer bias, are the accelerometer offset registers used by the game rotation algorithm to account for PCB orientation in the final device ?
2024-09-04 07:58 AM
Hi @NicolasGoualard ,
Yes, using *_gbias_set() function you can upload stored bias values as you suggest.
Accelerometer offset settings are not used for game rotation vector.