2026-03-29 9:02 AM
Dear all,
I am struggling with getting a good SFLP result, that does not drift too much and does not appear jittery.
I went trough most of the posts here but I am still not able to get good results (approx. factor 10 higher drift then according to the data sheet).
in one of the posts I found the explanation about the chain of the SPFL:
that was the one im ent: 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. Post in forum
According to this, I have then tried to configure my sensor the following way:
ret = lsm6dsv_sw_reset(&dev->ctx);
ret += lsm6dsv_block_data_update_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_auto_increment_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_xl_mode_set(&dev->ctx, LSM6DSV_XL_HIGH_PERFORMANCE_MD);
ret += lsm6dsv_gy_mode_set(&dev->ctx, LSM6DSV_GY_HIGH_PERFORMANCE_MD);
ret += lsm6dsv_xl_full_scale_set(&dev->ctx, LSM6DSV_2g);
ret += lsm6dsv_gy_full_scale_set(&dev->ctx, LSM6DSV_1000dps);
ret += lsm6dsv_filt_xl_lp2_bandwidth_set(&dev->ctx, LSM6DSV_XL_VERY_LIGHT);
ret += lsm6dsv_filt_xl_lp2_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_filt_gy_lp1_bandwidth_set(&dev->ctx, LSM6DSV_GY_VERY_LIGHT);
ret += lsm6dsv_filt_gy_lp1_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_xl_data_rate_set(&dev->ctx, LSM6DSV_ODR_AT_60Hz);
ret += lsm6dsv_gy_data_rate_set(&dev->ctx, LSM6DSV_ODR_AT_60Hz);
ret += lsm6dsv_fifo_watermark_set(&dev->ctx, 1);
ret += lsm6dsv_fifo_stop_on_wtm_set(&dev->ctx, LSM6DSV_FIFO_EV_WTM);
ret += lsm6dsv_fifo_mode_set(&dev->ctx, LSM6DSV_STREAM_MODE);
if (ret != 0) {
return lsm6dsv_from_st_ret(ret);
}given following blocks from the the datasheet
I would assume that the LPF1 and LPF2 would directly feed into the SFLP at 60HZ each
in static setup the readings seem fairly good with low drift.
However, as soon as I move the IMU a bit and try to come back to the original pose the drift seems much more significant. much more then inaccuracy from placing it correctly again, also there seems to be some jitter in the readings aswell, where the orientation jumps back and forth.
I assume that the way I setup the filter is causing this jitter, as when I run the sensor without the filter it seems more stable.
Best regards,
Frabu
2026-03-29 8:55 AM
Dear all,
I am struggling with getting a good SFLP result, that does not drift too much and does not appear jittery.
I went trough most of the posts here but I am still not able to get good results (approx. factor 10 higher drift then according to the data sheet).
in one of the posts I found the explanation about the chain of the SPFL:
that was the one im ent: 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. Post in forum
According to this, I have then tried to configure my sensor the following way:
ret = lsm6dsv_sw_reset(&dev->ctx);
ret += lsm6dsv_block_data_update_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_auto_increment_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_xl_mode_set(&dev->ctx, LSM6DSV_XL_HIGH_PERFORMANCE_MD);
ret += lsm6dsv_gy_mode_set(&dev->ctx, LSM6DSV_GY_HIGH_PERFORMANCE_MD);
ret += lsm6dsv_xl_full_scale_set(&dev->ctx, LSM6DSV_2g);
ret += lsm6dsv_gy_full_scale_set(&dev->ctx, LSM6DSV_1000dps);
ret += lsm6dsv_filt_xl_lp2_bandwidth_set(&dev->ctx, LSM6DSV_XL_VERY_LIGHT);
ret += lsm6dsv_filt_xl_lp2_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_filt_gy_lp1_bandwidth_set(&dev->ctx, LSM6DSV_GY_VERY_LIGHT);
ret += lsm6dsv_filt_gy_lp1_set(&dev->ctx, PROPERTY_ENABLE);
ret += lsm6dsv_xl_data_rate_set(&dev->ctx, LSM6DSV_ODR_AT_60Hz);
ret += lsm6dsv_gy_data_rate_set(&dev->ctx, LSM6DSV_ODR_AT_60Hz);
ret += lsm6dsv_fifo_watermark_set(&dev->ctx, 1);
ret += lsm6dsv_fifo_stop_on_wtm_set(&dev->ctx, LSM6DSV_FIFO_EV_WTM);
ret += lsm6dsv_fifo_mode_set(&dev->ctx, LSM6DSV_STREAM_MODE);
if (ret != 0) {
return lsm6dsv_from_st_ret(ret);
}
given following blocks from the the datasheet
I would assume that the LPF1 and LPF2 would directly feed into the SFLP at 60HZ each
in static setup the readings seem fairly good with low drift.
However, as soon as I move the IMU a bit and try to come back to the original pose the drift seems much more significant. much more then inaccuracy from placing it correctly again, also there seems to be some jitter in the readings aswell, where the orientation jumps back and forth.
I assume that the way I setup the filter is causing this jitter, as when I run the sensor without the filter it seems more stable.
Best regards,
Frabu
2026-03-29 9:06 AM
I m sorry, I just realized that I uploaded this to the wrong forum, and now I don t know how to delete it.