Home > Electronic Compass > Application Notes > Principles of calibration software

Principles of calibration software

Although the calibration method using the standard magnetic field generator is straightforward in concept, preparing the generator is sometimes cumbersome.

As an alternative method, rather than use a magnetic field generator, the principles of software that semi-automatically and easily calibrates the electric compass are introduced below.

(1) Foundational Principles

Consider a case in 2 dimensions.

When you rotate a magnetic sensor one complete revolution in the earth's magnetic field while level, the sensor's measured values draw a circular path.

When you look at the path data, you can see the values for the x-axis sensor's greatest and smallest points as well as the same for the y-axis sensor. (Total 4 points)

In the same way as in basic calibration (Link), sensitivity and origin can be calculated using the below equation.

Sensitivity = (Greatest value - smallest value) /(earth’s magnetic field level amount ×2)

Origin = (greatest value + smallest value) / 2

(※For the earth's magnetic field's horizontal component, you can use an already-known value measured by another sensor or else look up the values in scientific chronology tables)

Next, consider the case of 3 dimensions.

In the case of 3 dimensions, if you rotate it one revolution level and then perpendicular, calibration on 3 axes is possible.

However in practice, when you rotate the sensor without using a existing level plane, it is difficult to rotate it exactly on a level surface only by hand.

When comparing the measured data between the case of rotating it freehand in the air to rotating it on a table, the freehand circle will be more elliptical.

To overcome this, don't only rotate it once but take the average of 2 or more rotations or else rotate freely and calibrate using the calibration software.

(2) Principles of calibration software

In the case of 2 dimensions, the path of the magnetic field's recorded data is circular. In the case of 3 dimensions, the path of the magnetic field's recorded data will be spherical.

Suppose that the sensitivity is correctly known. If recorded data for any 4 points on the sphere are available, you can find the sphere's center, in other words, the origin of the sphere, by solving the sphere equation.

However, not just any 4 points will do. If the points are not scattered as close as possible to the surface of the sphere, errors may result when the equation for the sphere is solved.

If the sensor is waved in a figure 8 (or ∞), the path will appear as shown in the picture, and they can be spread across a broad area.

In practice, the sensitivity is not always correctly set, so it will end up being an ellipsoid instead of a sphere.

In this case, by getting sufficient points (approximately 18 from our experience), the ellipsoid's equation can be solved by the least squares method and the sensitivity and origin can be found.

We offer this type of calibration software.