Hard and Soft Iron Calibration

Hard and Soft Iron Calibration
VN-100 Hard and Soft Iron Calibration
Application Note
Abstract
This application note is designed to briefly explain typical
magnetic disturbances and mitigation strategies. It also
addresses in detail the type of disturbance typically
denoted by “Hard and Soft Iron”, and methods
recommended for the identification and compensation of
this common error source.
Document Information
Title
VN-100 Hard and Soft Iron Calibration
Subtitle
Overview and Calibration Method
Document Type
Application Note
Document Number
AN012
Document Status
Released
VN-100 Hard & Soft Iron
Application Notes
Page 2 of 10
This application note is designed to briefly explain typical magnetic disturbances and mitigation
strategies. It also address, in detail, the type of disturbance typically denoted by “Hard and Soft
Iron”, and methods recommended for the identification and compensation of this common
error source.
Consider first the magnetometers on-board the VN-100. These sensors measure the magnetic
field(s) present in the background. Magnetic fields are additive and the sensors measure the
sum of the fields at its location. Consider the following equation and definitions:
⃗⃗
(⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ )
⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
The severity of the various components of this equation must be investigated in your
application. This can be done both experimentally and analytically. First consider the proximity
to large structures, re-bar and railroad tracks for example. In this scenario the external
magnetic field will be due to the two components ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ and ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ and the result is a loss of
accuracy of the magnetic field reference vector. This is effectively a drawback to all magnetic
navigation and cannot be directly observed. In order to resolve these two components an
external measurement of North must be referenced separately. Mitigation strategies here are
to avoid the proximity to objects that cause deviations in the Earth’s magnetic field. Alternative
approaches can work by relying on the gyro on a transient timescale by tuning out the magnetic
sensor during the proximity to such objects.
Both terms ⃗⃗⃗⃗⃗⃗⃗⃗⃗ and ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ can effectively be rejected by the aiding of the gyro or by low pass
filtering these signals. However, the AC components must not exceed the saturation limit of the
magnetometers.
VN-100 Hard & Soft Iron
Application Notes
Page 3 of 10
The term ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ is separate from the term ⃗⃗⃗⃗ due to the fact that it is often originated by
electric currents that operate in DC mode. These can occasionally change due to throttling of
motors or activation / de-activation of discrete vehicle subsystems, such as payloads and turn
indicators. If this component is found, it can be compensated for directly by correlating the
effect with the correct control signal. The final term ⃗⃗⃗⃗ is the residual magnetic component in
the sensor frame. This is due to slightly magnetized metallic components and batteries and of
course any magnets in the body. This component is static and can readily be compensated for.
The coefficient matrix is a model of the induced magnetic field due to the externally applied
field.
By re-arranging the above equation it is apparent that a compensation model for the Hard and
Soft Iron components can be found and it is show after the following assumptions have been
made:
1. There are no external fields present except for ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ and any error in this assumption is
negated by requiring the external magnetic field to be uniform over the volume of space that
the magnetometer will traverse during the calibration.
2. The component ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ is static during the calibration. The overall system can be in its powered
on mode and if so the calibration will lump the ⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗ term with the ⃗⃗⃗⃗ term.
⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗⃗
⃗⃗
⃗⃗⃗⃗
VectorNav’s VN-100 FW 1.1 ships with an algorithm on board capable of solving the above
equation for
and ⃗⃗⃗⃗ online. The algorithm operates on the full magnetic vector and as such
requires a fairly well distributed set of measurements. The measurements should be recorded
in a wide variety of device orientations. This is not optimal for either cars or full size aircraft.
The current firmware version 1.1.140 ships with this feature enabled. In cases where the
motion does not yield good observability of the solution it is recommended to disable this
function and use a preprogrammed Hard and Soft Iron (HSI) solution.
By recording the VN-100’s magnetometers while rotating a small vehicle or other object around
each of its principal axes, while in a uniform magnetic field, the following result is typical and
plotted in figure 1. By inspection the deviation from spherical shape is considered soft iron
distortion and the offset from the origin is the hard iron distortion. Additionally, the scalar
found by calculating the norm of each measurement is also a good indicator of the severity of
the disturbances present. By making this calculation and plotting the result for the same data
shown in figure 1 the norm is shown in figure 2.
VN-100 Hard & Soft Iron
Application Notes
Page 4 of 10
The desired solution will circularize and center the magnetic output from the device. The
solution can be found in several ways. Each is described in more detail in a later section.
1. Connect the device to Sensor Explorer and run the HSI wizard.
2. Clear the onboard HSI solution, enable the onboard algorithm then rotate the device thru as
many orientations as possible. Enable the solution and verify that the output is now spherical
and centered on the origin.
3. Disable and clear the on-board HSI system. Manually record the magnetic field readings while
rotating the device. Send the data via e-mail to [email protected] and our engineers will
inspect the data, perform a compensation if possible and return the solution to the user.
Figure 1
VN-100 Hard & Soft Iron
Application Notes
Page 5 of 10
Figure 2
After a successful solution the following is a typical result, here shown in figure 3 and figure 4.
VN-100 Hard & Soft Iron
Application Notes
Page 6 of 10
Figure 3
Figure 4
VN-100 Hard & Soft Iron
Application Notes
Page 7 of 10
Procedure for performing a HSI compensation utilizing Sensor Explorer
1. Establish a connection to your device from Sensor Explorer by selecting File->Connect to
Sensor…
a. Select the appropriate port
b. Set the Baud Rate to “Auto Detect”
c. Check the “Query sensor after connecting” checkbox
d. Hit the “Connect” button
2. Select Commands->Set Magnetometer Calibration Control…
a. For HSI Mode select “OFF”
b. For HSI Output select “CalOff”
c. Hit the OK button
3. Select Tools->Hard/Soft Iron Calibration…
a. At this time the algorithm is ready to start. Prior to hitting the START CALIBRATION
button, make sure that the device is in a uniform magnetic field. Typically several feet
from nearby re-bar, desk, chair, structural steel, etc. Hit the START CALIBRATION button
b. With a calm motion rotate the device around its principal axes, such that as many
orientations as possible is reached. There is a progress indicator in the Wizard. The
algorithm relies on 8 bins to be filled with measurements and the wizard will not
complete before all 8 bins have adequate data.
c. When finished the following dialogue window is displayed here shown in figure 5.
VN-100 Hard & Soft Iron
Application Notes
Page 8 of 10
Figure 5
d. Hit the WRITE PARAMETERS TO CHIP button followed by hitting the Finished button.
4. Select Commands->Set Magnetometer Calibration Control…
a. For HSI Output select “CalManual”
b. Hit the OK button
c. The HSI calibration is now in effect on the device
Procedure for performing a hard and soft iron calibration with the on-board algorithm
In embedded applications it is sometimes difficult or impossible to connect Sensor Explorer
directly. There might be a host system connected such as a micro-controller, a DSP or a small
single board computer. In this event the VN-100 FW 1.1 has an algorithm on-board that can
calculate the HSI parameters for the device. This feature is enabled as a default configuration;
however, there are types of motion and applications where this should not be enabled. For
example if the motion is repetitious and the device does not regularly see a wide range of
orientations or if the disturbances are not primarily due to Hard and Soft Iron.
In this procedure the device is assumed to be in its factory default settings at the onset.
1. Make sure the device is in a magnetically clean environment and ready to be rotated.
VN-100 Hard & Soft Iron
Application Notes
Page 9 of 10
2. Clear the on-board HSI solution by setting Register ID: 44 field HSIMode to the value 2
(HSI_RESET). This clears any existing HSI and resets/restarts the on-board algorithm.
3. With a calm motion rotate the device around its principal axes, such that as many orientations
as possible is reached. Continue this process for at least a complete revolution about every axis
of the vehicle/object.
4. When finished set Register ID: 44 field HSIMode to the value 0 (OFF)
5. The solution that was found is available in Register ID: 47 and can be read from the device.
In the event that this is the desired approach it is useful to implement this procedure in the
HOST system.
Procedure for collecting magnetic data for VectorNavs’ engineers to review and calculate HSI
parameters for return to the user.
In this procedure the device is assumed to be in its factory default settings at the onset.
1. Make sure the device is in a magnetically clean environment and ready to be rotated.
2. Disable any existing HSI calibration on-board by setting Register ID: 44 field HSIOutput to the
value 0 (CAL_OFF)
3. Record the magnetic data coming from the device to a .txt file while rotating the device about
its principal axes. More orientation data is generally better.
4. Send the data to [email protected]
5. After a HSI solution is obtained write this solution to Register ID: 23
6. Enable the manual calibration by setting Register ID 44 field HSIOutput to the value 1
(CAL_MANUAL)
Verification of correct HSI calibration
After the implementation of an on-board HSI compensation it is valuable to record the
magnetic output while rotating the device in as many orientations as possible. After this the
data can be plotted and inspected. Examples were shown in figures 1 and 2 for pre-calibration
and in figures 2 and 4 for the post calibration result. If the norm of the magnetic data is varying
by less than 1% the magnetometers are calibrated to better than 0.5 degrees.
The subject of magnetometer calibration is rich and it is not always easy to achieve the desired
results. If you are confused or not obtaining desired results please don’t hesitate and contact us
for support.
VN-100 Hard & Soft Iron
Application Notes
Page 10 of 10
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement