This tutorial demonstrates how-to perform AHRS calibration procedure for CyberAtom X-200 device using Cyber Studio. Calibration procedure for other CyberAtom AHRS models is identical and the only difference might be related with connection type between the device and a PC (USB, UART etc).
Introduction
CyberAtom ARHS devices performs data fusion algorithm that results with estimated spatial orientation based on measurements from on-board sensors measuring: a gravity, device rotation rates and vector of magnetic field of the Earth. In reality, readings from the sensors contains some extra distorting components that negatively contribute to quality of the orientation estimations. These factors typically are:
- non-neglectable misalignment between of the sensor chip in respect to axes related with the host device
- influence of additional than just Earth magnetic fields in the environment impacting on-board magnetic sensor (known as hard- and soft-iron effects)
- internal bias of accelerometer and gyroscope sensors.
CyberAtom AHRS devices can perform a compensation that is capable of reducing impact of these factors when calculating orientation solution. This compensation algorithm uses range of factors internally represented by matrices, and the calibration process is designed to determine optimal elements of those. The range of matrices required can be found in Settings Editor (of Cyber Studio application) and are described in User Manuals.
The calibration has to be performed for each device unit separately.
It is recommended that the calibration is performed for the AHRS device after it has been assembled to the final system (e.g. final PCB or housing) to make sure that all the factors that might influence the readings from AHRS built-in sensors are present.
Things you need
- a PC computer with one of OS'es supported by Cyber Studio.
- downloaded and unpacked (or installed) Cyber Studio application. This tutorial was written for 2.2.0 version of it.
- USB cable
- and off course a CyberAtom X-200 device
The Settings Editor
Device calibration options are available after you've connected to the device itself. To do so, follow:
- Connect your CyberAtom device to PC using USB cable.
- Launch Cyber Studio application.
- From main menu select Studio➞Connect using USB... option.
You should see communication with device established and 3d view responding to device rotations.
- The Settings tool button in Control section will become active.
- Switch to a Settings tab in the device window.
You will see a Setting Editor.
- Click on Load Settings button.
This will cause loading settings from the device to the window and make settings editing possible.
Now, once device settings have been retrieved, it's possible to perform the device calibration.
Gyroscope Calibration
At the moment, Cyber Studio supports simple calibration for gyro bias.
To perform the gyroscope sensor calibration:
- From main menu select Device➞Calibrate Gyrosope... option.
The Gyroscope Calibration wizard will pop-up.
- Click Next.
- Hold the device motionless now. Make sure it stays still, free from any rotation or vibrations.
- Then click Next.
The wizard will collect required data from the device.
- Finally click Next and Finish.
The wizards will calculate bias parameters for the gyro sensor and will update Gyroscope calibration settings to compensate for detected gyroscope bias.
You will be able to see non-zero elements in Settings Editor for gyroscope:
Magnetometer Calibration
To calibrate magnetometer sensor:
- From main menu select Device➞Calibrate Magnetometer... option.
A wizard dialog window will pop-up
- Click Next.
-
Then, keep rotating the sensor at least once by 360 degrees over one of each its axes.
The wizard collects the measurement data and displays black and red dots indicating tip of magnetic vector detected. The two colors represent pre- and post-calibrated magnetic data respectively. When calibrated for the first time, they are result to the same values.
The ideal calibration data set will be visualised as dots forming a large circle (or ellipse) on each of the drawing planes, e.g. like this:
The progress bar on top of the window displays the data collection progress. When this step is complete, the page will re-display a series of red dots representing compensated magnetic vector measurements. They will be forming much more circular shape, centered on the planes.
- Click Next.
- Then click Finish.
The newly calculated calibration matrices for Magnetometer calibration will become visible on the Magnetometer settings page.
You will be able to see non-zero elements in Settings Editor for magnetometer:
Accelerometer Calibration
To calibrate accelerometer sensor:
- From main menu select Device➞Calibrate Accelerometer... option.
A wizard window will open.
- Click Next.
- Now, in you will be asked to orient the device with its local X, Y and Z axis oriented straight up and down, respectively. You will need to perform data captures for each of the six combinations. Follow the instruction and click Next on each page until process is complete.
- When the wizard completes, click Finish
A new accelerometer sensor calibration matrices will be updated.
You will be able to see non-zero elements in Settings Editor for accelometer:
Last But Not Least
Once all calibration steps are performed, you can save the post-calibration settings in the device's RAM memory by selecting Device➞Save Settings to RAM from main menu as well as and later to Flash memory by selecting Device➞Save RAM to Flash option from the same menu. The calibration settings will be available on each reset and power on event from now on.
Summary
The calibration wizards built in Cyber Studio makes basic AHRS calibration a straightforward process.
Still, advanced users can use Cyber Studio to manually manipulate calibration matrices. An example case one can intend to change axes convention of the sensor or use calibration matrices to perform some extra rotation transformation.
Whenever necessary (e.g operational conditions have changed) the re-calibration can be performed at any point in the future using the same steps as described here.