Non-default calibration procedures

This section describes non-default procedures to calibrate the MT for magnetic disturbances.

 


Use a previously recorded measurement

For every calibration, the Magnetic Field Mapper software processes a log file which contains the sensor data logged during measurements. The location of these log files is set prior to the measurement in one of the Magnetic Field Mapper dialogs (by default the %temp% folder). These log files have the following name:

MT_XXXXXXXX_SSS.mtb

 

Where XXXXXXXX is the Serial Number of the MT and SSS is the session number of the Magnetic Field Mapping procedure.

 

If it is necessary to use the results of a previously recorded measurement, the Magnetic Field Mapper can process a previously recorded log file. Use the following procedure to accomplish this:

 

  1. Start the Magnetic Field Mapper software and select 'Use Motion Tracker'.

  2. Select 'Process Previously recorded file'

Home screen with "File Processing" selected
 

  1. Load a previously recorded file from a previous MFM procedure. By default, you can find these in the temp folder: type %temp% in the Windows Explorer bar.

Screen allowing to choose the file to be used for the MFM algorithm
 

  1. The rest of the procedure is identical to the default procedure. See Using the Magnetic Field Mapper.

 

Off-line Magnetic Field Mapping

If the Motion Tracker cannot be directly connected to a PC for an on-line measurement, it is possible to 'manually' generate a log file with measurement data. This log file can be processed off-line by the Magnetic Field Mapper software. As the calibration results cannot be directly stored in the memory of the MT, the Magnetic Field Mapper generates a binary result file. This file contains a custom MT message that updates the calibration data of the MT if the message is transmitted to the MT.

 

Generate a log file

To generate a valid Magnetic Field Mapper log file, follow these instructions.

 

  1. Before starting your recording, it is important to reset the magnetometer calibration parameters of your MT to its factory defaults. This step can be skipped if you have not yet performed a magnetic calibration with your device (i.e. if it is still using its factory default calibration parameters). The calibration parameters as well as all configuration settings can be reset to factory defaults by clicking the "Revert" button in MT Manager, or by sending the RestoreFactoryDefaults command using the Xsens Device API or Xbus communication. If resetting the configuration settings (such as baud rate or filter profile) is undesired, then it is also possible to only revert the magnetometer calibration parameters. See #Reverting the calibration results of your MT.

  2. Configure the MT for XDA processing. To do so in MT Manager, navigate to Device Settings -> Output Configuration and select 'XDA Processing' from the preset dropdown menu. Click 'Apply' to save the configuration.

  3. While recording the incoming data into a file, perform the measurements. See Using the Magnetic Field Mapper for guidelines on how to perform a proper calibration trial.

 

 

Process the log file

After generating the log file, the Magnetic Field Mapper software can process this and generate a result file. Follow these steps to generate an MFM result file:

 

  1. Copy the log file to a system on which the Magnetic Field Mapper is installed (or check if it is available using the network).

  2. Start the Magnetic Field Mapper software

  3. Select 'Process a log file into a result file' and press 'Next'

 

Home screen for the off-line procedure
 

  1. Click 'Load' to browse for the log file.

 

Screen to select the file for the off-line procedure

 

  1. Click Start, check the results and if you are satisfied, click 'Write file for selected devices' to generate the MFM results file. This file is stored in the same folder as the input log file.
    The filename of the MFM results file is:
    X_result_DID.bin

    where X is the original file name and DID the Device ID.

 

 

Writing calibration results to your MT

The MFM results file contains a single Xbus message that contains the calibration results. If this message is sent to the MT, it will update the non-volatile memory which holds the calibration values. Follow the next instructions to update the calibration parameters:

 

  1. Copy the MFM results file to the system that has a direct connection to the MT.

  2. Ensure that the MT is powered on.

  3. Make sure that the MT is in Config mode.

  4. Write the binary data message in the MFM results file to the sensor as a single XBus message, using binary communication. In MT Manager, you can test this procedure by opening the Device Data View and pasting the MFM results message into the message field.


Sending an MFM results message using the Device Data View in MT Manager. Indicated are the calibration result message pasted in the Message box, the BusID (0xFF) and the Checksum (0x06).

 

Note:

When communicating with the industrial motion tracker over SPI or I2C interface, the device assumes a reduced Xbus message that starts with a default Preamble and BusID (0xFA 0xFF). See screenshot above. Depending on the Magnetic Field Mapper version, the calibration result message may instead contain an alternative BusID (e.g. 0x00 instead of 0xFF). As a result, the user may need to modify the calibration result message's BusID to 0xFF and update the checksum (CS). When pasting the message into the Device Data View of MT Manager, the correct checksum will automatically be calculated. For more information on the structure of reduced Xbus messages and how to determine a correct checksum, refer to the Low-Level Communication Protocol document (MT0101P).
The industrial motion tracker is unavailable for communication for a short period after the calibration result message has been sent.
  1. Upon receiving the message, the MT will update its non-volatile memory with the new calibration values. In MT Manager, you can verify this by comparing the calibration parameters in the MT Settings window, before and after writing the calibration results. Disconnecting and reconnecting the device is necessary for MT Manager to update the calibration parameters.

 

 

 

Reverting the calibration results of your MT

Please note that clicking the Revert button in MT Manager or sending the RestoreFactoryDef low-level command will restore factory defaults, including a revert of the magnetic calibration parameters to those determined during factory calibration. This provides a way to undo a magnetic calibration. In addition, it means that anytime the sensor is reverted to factory defaults, any new calibration values desired must be re-sent to the device. Reverting only the magnetometer calibration parameters (without reverting other configuration settings) can be done by following the procedure #Writing calibration results to your MT, and sending the following binary command:

FA FF DE 01 00 22

 

 

Magnetic Field Mapping SDK

The Magnetic Field Mapping algorithm is also available in the Software Development Kit. This makes it possible to embed the Magnetic Field Mapping in 3rd party programs or to use MATLAB or C/C++/C#. The MFM SDK has the following components:

 

 

Structure of the MFM SDK

 

Note: Extensive HTML documentation for the MFM SDK is included in the SDK. See the Xsens folder (e.g. C:/Program Files/Xsens/MT Software Suite x.x/Documentation/MFM SDK)

 

 

 

In-Run Compass Calibration (ICC) and Representative Motion (RepMo)

 

Disclaimer: ICC and RepMo are currently still in beta for all MT devices. These features are not available for MTw devices.

 

Representative Motion (RepMo)

Similar to the Magnetic Field Mapper, Representative Motion (RepMo) provides a solution to calibrate the sensor for magnetic distortions caused by objects that move with the MT. However, in contrast to the Magnetic Field Mapper, RepMo is a calibration tool that can run in the background of the onboard filters of the MT. A connection to a host computer is therefore not required.

 

When using "RepMo" the user should be careful that the calibration motion is performed in a homogeneous field (ideally, only the object attached to the sensor should distort the magnetic field). Exploiting the knowledge that the sensor is in a homogeneous environment, all magnetometer sensor data will be used for the calibration without any disturbance checks, speeding up the calibration process. Based on the sensor mounting, environment and application platform, the accuracy might vary. Users are encouraged to try this feature if they are aware of typical application dynamics and have a good knowledge of the environment of operation. This might be a valid option for trials that do not encounter any distortions in the environment such as (but not only) ships and airplanes.

 

How to enable Representative Motion

RepMo is disabled by default. The user can enable RepMo in various ways:

 

 

MT Manager

In MT Manager, it is possible to stop and start the RepMo mode with this button: 

 

After stopping the RepMo trial, if the calibration parameters are satisfactory, the newly generated ICC results can be stored to MT memory by clicking the corresponding icon:

Low Level Communication

Both Starting/Stopping the RepMo mode and storing the ICC results can be done using IccCommand. Refer to the MT Low Level Communication Protocol Documentation for more information.

 

XDA

Start and Stop RepMo mode using startRepresentativeMotion and stopRepresentativeMotion. Store the ICC results using storeIccResults. Refer to the XDA library for more information:

C:Program FilesXsensMT Software Suite x.xDocumentationMT SDK

 

 

During the RepMo mode, the RepMo status bit in the Status Word will be 1. After stopping RepMo mode, an info dialog will come up (in MT Manager) or a feedback message will be sent by the filter (low-level communication and XDA), informing you about the results. It will tell you whether a 2D or 3D calibration was performed. For some applications, such as Ground Vehicles, a planar 2D calibration suffices. In addition, a score of the "Estimated distortion level" or 'ddt value' is returned. This value indicates how homogenous the magnetic environment was during the calibration. The closer the score is to 1, the better. Try performing multiple calibrations at different locations to see whether your results can be improved. 

 

Although RepMo is designed to be used without a PC, we will demonstrate the use of RepMo using MT Manager in the following example.

 

The results of an MTi 1-series attached to a battery are shown in the figure below. It is important to note that the magnetic norm (black line in the middle graph) should be constant if the sensor is properly calibrated and it is moving in a magnetically homogeneous environment. This is clearly not the case for the first part of the magnetometer signal. After the initial period of 13 seconds, Representation Motion is switched on for ~25 seconds.  This is indicated by the (violet) status bit flag. The user then clicks the "Store In-Run Compass Calibration results" button in MT Manager to write the calibration results to the device's memory. Once the results are written to the non-volatile memory, the magnetic calibration is applied and the magnetic field norm is nearly constant, showing a meaningful calibration done (for sensor-fixed distortions).

 

 

Effects of Representative Motion on magnetic field measurements.

 

In-Run Compass Calibration (ICC)

Similar to the Magnetic Field Mapper and Representative Motion, In-run Compass Calibration (ICC) provides a solution to calibrate the sensor for magnetic distortions caused by objects that move with the industrial motion tracker. However, in contrast to the (single-run) Magnetic Field Mapper and Representative Motion, ICC is a feature that is continuously running in the background of the onboard filters of the industrial motion tracker in order to improve magnetometer calibration for hard and soft iron effects.

 

ICC can be used as an alternative for, or in addition to, a calibration performed by the Magnetic Field Mapper and Representative Motion. It results in a solution that can run embedded (leaving out the need for a host processor like a PC) and relies less on specific user input. The Magnetic Field Mapper, which does require a host processor, is, however, still recommended over or in addition to the ICC. The ICC feature is aimed at:

 

As a use case example, consider a scenario in which the sensor is rigidly mounted on a car. The user can perform an MFM in a homogeneous environment by performing a circle with the car. Probably it would result in an almost 2D path (e.g. roll and pitch values < 10°). After that, the user can exploit the ICC feature to improve the calibration during the application. In this case, when the industrial motion tracker reaches orientations that were not yet reached during the MFM (e.g. roll and pitch values > 10°), ICC will use this data to improve the magnetometer calibration. 

 

How to enable ICC

ICC is disabled by default. The user can enable ICC in various ways:

 

MT Manager

  • Go to Device Settings -> Device Settings.

  • Tick "In-Run Compass Calibration (ICC)".

  • Click "Write To MT".

 

ICC is now continuously active in the background. After some time (several minutes minimum), the newly generated ICC results can be stored to MT memory by clicking the corresponding icon:

Low Level Communication

Configure the device using the SetOptionFlags command. Store the ICC results using IccCommand. Refer to the MT Low Level Communication Protocol Documentation for more information.

 

XDA

Configure the device using setDeviceOptionFlags. Store the ICC results using storeIccResults. Refer to the XDA library for more information:

C:/Program Files/Xsens/MT Software Suite x.x/Documentation/MT SDK

 

 

Storing the ICC/RepMo parameters

Once the ICC parameters are estimated, either in RepMo mode or when ICC is running in the background, the calibration parameters can be stored to MT memory using the commands described in the previous paragraphs.

 

As soon as the command for storing the ICC results is sent to the industrial motion tracker, the ICC/RepMo parameters and magnetometer calibration parameters will be copied from the RAM memory to the non-volatile memory where the previous calibration parameters will be updated. Note that if the connection with the industrial motion tracker is lost before the calibration parameters are stored (e.g. by power cycling the industrial motion tracker or rescanning in MT Manager), the updated calibration parameters will be lost

 

The calibration parameters are estimated in the background. The magnetometer readings shown in MT Manager are not compensated by the ICC/RepMo calibration results, unless these are stored in non-volatile memory. See image below.

 

Data from the sensors (magnetometer and inertial sensors) are calibrated with the calibration parameters in the eMTS. The initial calibration parameters are a result of the factory calibration by Xsens. If ICC or the Representative Motion feature is on, filter states and compensation parameters are available in the RAM-memory. The magnetic field data (data output as shown in MT Manager) are not influenced by parameters in the RAM-memory.

 

Once stored (see image below), the magnetometer measurements, calibrated with the new calibration parameters obtained by ICC/RepMo, can be observed in MT Manager. 

 

 

Once the command is given by the user to store the ICC calibration parameters, the industrial motion tracker will write the parameters to the eMTS on the non-volatile memory. This way, the magnetometer sensor readings are calibrated with the ICC parameters before they are fed into the sensor fusion algorithm. Also, the magnetic field data will be outputted using the new calibration parameters.

 

ICC and RepMo are designed to be used embedded. However, it is possible to apply ICC when processing log files offline. The ICC can be enabled in the industrial motion tracker interface when opening an ".mtb'' file.

 

Conclusion

The ICC/RepMo features are a useful alternative for calibrating for hard and soft iron effects when using the Magnetic Field Mapper (MFM) tool is not possible. When using ICC/RepMo, the newly obtained calibration measurements are immediately used in the sensor fusion algorithm. Once the calibration data are stored in non-volatile memory as well, the factory magnetometer calibration parameters will be overwritten, and magnetometer readings will be processed by the new calibration parameters. After storing calibration parameters, ICC can remain enabled to run in the background and further improve parameter estimation. 

 

 

 

Create your own Knowledge Base