Calibration

The Calibration Procedure

Before each recording session, a short and easy-to-use calibration procedure was conducted. Its aim is to find the values of:

• Gyroscope bias
• Magnetometer bias
• Magnetometer scaling

The procedure consists of two steps:

1. The motionless state: The pen is lying stationary on the table for a couple of seconds. Knowing that the gyroscope values are supposed to be zero in this period of time, the sensor’s bias can be computed for each axis. The results are stored as bgx, bgy and bgz in the calibration file.
2. The moving state: The pen is rotated in all directions with the aim of painting a sphere from within. This creates a cloud of magnetometer points that enables the calculation of the sensor’s bias (corresponding to the sphere’s center) and its scaling factor (the sphere’s radii). Visualization here. The results are stored as bmx, bmy, bmz, smx, smy, smz in the calibration file.

The Calibration File

The calibration file consists of the biases and scaling factors of the two accelerometers, the gyroscope and the magnetometer. All of them originate from the sensors’ default datasheet calibration values and some of them, see above, are improved using a short calibration procedure.

• smx, smy, smz: The scaling factors of the magnetometer obtained from the calibration procedure.
• bmx, bmy, bmz: The bias values of the magnetometer obtained from the calibration procedure.
• bgx, bgy, bgz: The bias values of the gyroscope obtained from the calibration procedure

You can, but you don’t have to use this calibration file in your algorithms. More info on how to apply these values can be found here.

The Ideal Calibration

Ideally, calibration would include these parameters, separately for all sensors:

• Zero-point offset, independent for all three main axes. This is a three element vector for each sensor.
• Scaling, independent for all three main axes. This is a three element vector for each sensor.
• Alignment corrections for all three axes (crosstalk). This is a nine element matrix for each sensor.

We are working to improve the calibration process and welcome suggestions. Without precise alignment of the pen, it is tricky to precisely measure the zero point of the accelerometers and for the correct accelerometer scaling value the precise gravitational acceleration at the point of intended use must be known.

For an example how to calibrate the magnetic sensors using a three-dimensional ellipsoid, please see here.