FAQ: Hard & Soft Iron Correction for Magnetometers II

Document created by NevadaMark Employee on Dec 3, 2013Last modified by NevadaMark Employee on Dec 10, 2013
Version 4Show Document
  • View in full screen mode


Do you have any further insights on how to observe and correct for hard and soft iron behaviors?



The first version of the "Hard & Soft Iron Correction for Magnetometer Measurements" post offered some insights on how one might approach developing their own correction process. Since posting this, we have received a great deal of feedback and have updated a few things that might be helpful and also are working on a weakness that was identified during this process (more on that below). 


Here are the three things that we have done, in order to offer additional help for those who are looking to develop their own hard/soft iron correction approaches:

  1. Updated the Hard and Soft Iron Computation Spreadsheet (Magnetometer_HardandSoftIron_CalculationSpreadsheet.xlsx) to a format that is more suitable for copying data directly into it.  In other words, all "simulation inputs" have been removed and the area for copying data to is more clearly marked.
  2. Automated the register value computation, based on the correction matrix calculations.
  3. Tested this method in a number of scenarios with an ADIS16480 to validate the final register values
  4. Identified a weakness in the soft-iron correction formulas, which happens when the x and y scale factors are very close to each other.
  5. Offer a short-term approach for managing this weakness.


The Method

  1. Start with the ADIS16488 (or ADIS16480) in an orientation where the x-axis magnetometer reading will be at its maximum and the y-axis reading will be equal to zero, when all errors have been removed.
  2. Measure x-axis and y-axis magnetometer outputs at this position.
  3. Rotation the platform in a counter-clockwise direction, by 10 degrees.
  4. Measure x-axis and y-axis magnetometer outputs at this position.
  5. Repeat steps 2 and 3 through the 350 degree rotation point.
  6. Copy the data at all 36 angles, into Cells C16:D52 in the "2 Dimensional Model" sheet, located in the Magnetometer_HardandSoftIron_CalculationSpreadsheet.xlsx file (see attachment).
  7. Observe the 2x2 soft iron correction matrix in cells O12:P13
  8. Observe the hard iron correction factors in Q12:Q13
  9. Observed the "compensated" and "uncompensated" graphs in the spreadsheet
  10. Write the register values from the "Register_Worksheet" sheet from the same file into the device's registers to apply the correction factors.


The Examples

The second file attachment (FAQ-HardSoftIron_UseExamples.xls) contains some trial runs of this calibration process. In this file, each sheet corresponds to a specific run of x-y data.

Initial = Calibrated ADIS16480 magnetometer outputs

Mag Field = Magnet was placed in close proximity of the ADIS16480

Mag Field Comp = Post-compensation of the response, with the magnetic still in the same location

Metal Blade = A metal saw blade was placed in close proximity to the ADIS16480

Metal Blade Comp = Post-compensation response, with the saw blade still in place.


The Videos

The following three videos show the X-Y rotational sweep for the three conditions described in the FAQ-HardSoftIron_UseExamples.xls file.


Initial Sweep


Magnetic Field Error (Notice the hand-clipped magnet attached the the disk-shaped PCB)


Metal Blade Error (Notice the thin saw blade resting on top of the ADIS16480) 


The Weakness

When the x-axis and y-axis scale factors are very close to each other, the eigenvalue calculation method is prone to introducing angle errors.  We are in the process of experimenting with some more automated approaches to this issue, but for now, overcoming this will require an additional correction matrix. For starters, one can observe this error by using compensated and uncompensated x,y values at a particular measurement point.



After identifying the skew angle, one can develop a 2x2 correction matrix for removing it. 


NOTE: While waiting for this example, please see the following link: