3. Overview of magnetic distortion
• Earth’s undistorted magnetic field in a local region will be of constant magnitude
and direction. As shown in the figure.
• However, the local magnetic field often is altered by two types of magnetic
distortion: hard iron distortion and soft iron distortion.
4. Overview of magnetic distortion
• consider a compass comprised of 2 magnetic sensors (X and Y) which are mounted
orthogonally to each other and in a horizontal plane (i.e. a 2-axis compass).
• Each sensor measures the strength (either positive or negative) of the magnetic field
which is parallel to its orientation.
• This is depicted in the figure, where the compass is superimposed over the
magnetic field. The length of the bar represents the strength of the magnetic field
and the color (red or green) represents whether the field is positive or negative.
X
5. Overview of magnetic distortion
• If these orthogonal sensors are now rotated through 360º in the horizontal plane,
the resulting plot of each sensor’s output is shown in the figure.
• For this plot, the X sensor’s reading is shown along the plot’s x axis and the Y
sensor’s reading along the y axis. (The units on this plot are mGauss:
• Earth’s magnetic field strength is nominally 0.5 Gauss, although this is dependent
on where the measurement is taken.)
• In an undistorted field, the resulting plot is a circle, as indicated.
-600
-400
-200
0
200
400
600
-600 -400 -200 0 200 400 600
6. Overview of magnetic distortion
• The X and Y magnetic sensors act as a coordinate system.
• The magentic field acts as a vector, where an angle between the magntic field
vector and the x axis can be thought of as theta, where the magnetic field is
decomposed as cos and sin of the angle.
X
Y
7. Hard Iron Distortion
• Hard iron distortions occur when magnetic dipoles exist on the platform in which
the sensors are mounted.
• For example, a magnetic sensor mounted in the mirror of a car will be affected by
magnetic dipoles throughout the car, such as audio speakers, the engine, fan
motors, DC currents carried in wires, batteries,etc.
• These magnetic dipoles add a constant magnetic vector to Earth’s magnetic field
relative to the X and Y sensors.
-600
-400
-200
0
200
400
600
-600 -400 -200 0 200 400 600 800
8. How to compensate for hard iron distortions
• To compensate for hard iron distortion it is necessary to subtract X and Y offset
values from the sensor readings once these values are established.
• It is relatively straightforward to determine and apply these offset values.
9. Soft iron distortion
• Soft iron distortion is caused by magnetically permeable objects on the compass
platform that attract and distort the local field.
10. Magnetic Compensation Definition: Hard Iron
• Hard Iron: Hard iron materials are materials that retain the magnetic property in
the absence of external magnetic field, such as permanent magents, etc.
• Hard Iron Distortion: Hard iron distortion, is produced by materials that exhibit a
constant additive field to the earth’s magnetic field, thereby generating a constant
additive value to the output of each magnetometer axes.
11. Magnetic Compensation Definition: Soft Iron
• Soft Iron: Materials that lose their magnetic property when the external
magnetic field is removed, e.g. iron, nickel, etc.
• Soft Iron Distortion: Soft iron distortion is the result of material that influnces, or
distort the magnetic field, but does not necessarily generate a magnetic field itself,
and is therefore not additive.
12. Magnetic Compensation Definition: Hard-Iron/Soft-Iron
Compensation
• Hard-Iron Compensation: A process that corrects the hard iron distortion, and
restores the accuracy of the compass. This is usually done in software, and involves
collecting data and subtracting a set of offsets to each of the 3 axes.
• Soft Iron Compensation: A process that corrects for the soft-iron distortion and
restores the accuracy of the compass. Usually implemented in software and
involves collecting data and multiplying a set of scale factors to each of the 3 axes.
13. Magnetic Distortion and Compensation
• If the sensors are too near to ferrous metals, magnetic field distortion results.
• Soft Iron distortions : Unmagnetized metals
• Hard-Iron distortions : Metals that have been magnetized
• Calibration via rotation discorvers Distortions:
– Sof-Iron creates Elliptical XY plots
– Hard-Iron creates Offset circular XY plots
– Both hard and soft-iron distortions can be present.
– Most compasses have hard-iron calibration routines to remove the offsets.
14. Hard Iron Compensation
• Hard-Iron distortions generate a constant additive value to one or more of the 3
axes which makes the circle, or the sphere move by fixed offset.
• Examine the data that is generated from the rotation of the compass
– Determine the “min” and “max” of each axis from the collected X, Y and Z data
– The mean value for each axis are the “offsets”.