Jump to content


Magnetometer Bias in an EKF


  • Please log in to reply
3 replies to this topic

#1 Nimski

Nimski

    New Member

  • Members
  • Pip
  • 2 posts
  • Country: flag of Australia Australia

Posted 02 July 2010 - 03:27 AM

Hi Everyone,

I've been following the discussion here for a while and wanted to ask you all about something that I've been thinking about recently. I've implemented an EKF based AHRS using the ADIS16400 sensor. What I found was that there are quite nasty offsets in the 3 axis magnetometer of this sensor, to the point where it's unusable for the calculation of magnetic heading without a lot of calibration. If I were to include magnetometer bias as states in the EKF, how would the update and measurement equations work? Would it be possible as an incremental update system?

Cheers,

Nima.

#2 Haldir

Haldir

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • Country: flag of Germany Germany


Posted 02 July 2010 - 01:43 PM

View PostNimski, on 02 July 2010 - 03:27 AM, said:

If I were to include magnetometer bias as states in the EKF, how would the update and measurement equations work?

Yes you should add the magnetometer bias to the state vector. For the update and measurement equations you should refer to the different papers, e.g. http://www.iasi.cnr....R8008/R8008.pdf which includes a 3-axis magnetometer. the exact equations depend on the frame of reference etc.


Basically it should work like this: magnetometer_vector = RotateMeasurementToYourReferenceFrame(measurement_vector) + bias_vector + noise_vector for the measurement update.

#3 Nimski

Nimski

    New Member

  • Members
  • Pip
  • 2 posts
  • Country: flag of Australia Australia

Posted 02 July 2010 - 02:55 PM

View PostHaldir, on 02 July 2010 - 01:43 PM, said:

Yes you should add the magnetometer bias to the state vector. For the update and measurement equations you should refer to the different papers, e.g. http://www.iasi.cnr....R8008/R8008.pdf which includes a 3-axis magnetometer. the exact equations depend on the frame of reference etc.


Basically it should work like this: magnetometer_vector = RotateMeasurementToYourReferenceFrame(measurement_vector) + bias_vector + noise_vector for the measurement update.

Thanks Haldir, the article is very useful. However I wonder how the filter actually determines the biases. Would these biases still work if the GPS states weren't involved? My Kalman filter does not include GPS states and I do not wish to include them. Would the magnetometer biases still converge without GPS measurements?

#4 Haldir

Haldir

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • Country: flag of Germany Germany


Posted 02 July 2010 - 03:04 PM

View PostNimski, on 02 July 2010 - 02:55 PM, said:

Thanks Haldir, the article is very useful. However I wonder how the filter actually determines the biases. Would these biases still work if the GPS states weren't involved? My Kalman filter does not include GPS states and I do not wish to include them. Would the magnetometer biases still converge without GPS measurements?

Hmm, good point, without gps measurements (or other corrections) your EKF will probably converge, but the state might not be really stable (large rms error), if I remember correctly. Take a look at chapter 7 (should apply to your problem) in http://www.purduehsl...ert_wampler.pdf