Discussion on dynamic calibration problems of lsm303agrtr magnetometer and impact of accelerometer interference

Problem background

I'm developing a lsm303agrtr based on (integrated accelerometer + magnetometer)based on Understanding the LSM303AGRTR Sensor Features

  • Calibration process: Complete hard magnetic calibration (through the ellipse fitting algorithm) (complete hard magnetic calibration (through the ellipse fitting algorithm)

  • Parameter settings: magnetometer odr = 30Hz±50µT; accelerometer odr = 100Hz, range ±4g

  • Temperature compensation: Enable the built-in temperature sensor, sampling interval 10 seconds

Specific problem description

1. The magnetometer heading angle drifts during high-speed movement

When the drone performs pitch/rolling action (angular velocity > 200°/s), the magnetometer heading angle error accumulates to ±25° within 5 seconds (the error is < ±3° in static environment)

Try solutions:

Adjust the sensor fusion algorithm (complementary filtering + extended Kalman filtering)

Reduce magnetometer ODR to 10Hz to reduce motion interference

Turn off the accelerometer power supply in magnetometer data update gap (POWER_DOWN mode via CTRL1_REG)

doubt:

Section 7.3 of the data sheet mentions "dynamic accuracy is not defined", does this mean that the sensor is not suitable for high-speed motion scenarios?

Are there hidden registers (such as undisclosed HPF filtering configurations) that improve dynamic response?

2. Effect of accelerometer vibration on magnetometer Z-axis

When the accelerometer detects high-frequency vibration (such as motor vibration, frequency > 80Hz), step noise of ±15µT appears in the Z-axis axis of the magnetometer, resulting in the failure of the heading algorithm that is highly dependent on Z-axis data.

Comparative test:

When using an independent BMM150 magnetometer + LSM6DSO accelerometer combination, the Z-axis noise is <±3µT under the same vibration environment.

After disabling the LSM303AGRTR accelerometer, the Z-axis noise of the magnetometer returns to normal level

doubt:

Is this related to mechanically coupled interference in the sensor package? Does "Cross-Axis Sensitivity" in Section 9.2 of the Datasheet contain such situations?

Are there any recommended hardware layout improvements (such as power isolation or mechanical decoupling)?

1 reply