AutoQuad IMU Calibration
Introduction
One of the most important reasons the AQ flies so well is that it has the ability to estimate its attitude, velocity and position in 3D space using the onboard Inertial Measurement Unit (IMU) together with GPS and air pressure sensors.
But in order for velocity and attitudes to be estimated precisely, the Gyros, accelerometers and magnetometers needs to be calibrated to compensate for manufacturing differences and temperature induced drift in the sensors.
Depending on the type of sensors your AutoQuad board uses – Analog IMU (AIMU) or Digital IMU (DIMU) – there are different methods to calibrate the sensors. But the process focuses on gathering sensor data and using it to calculate sensor offsets and ranges and align the sensor axises to each other.
For the newer DIMU based boards there a simple onboard “level” calibration and compass calibration that can be performed in 5 minutes without connecting to a computer and give you a flyable result. Beyond that there are dynamic and temperature compensated procedures that can be done to further refine IMU calibration.
Note: Consider upgrading to DIMU
Calibration of the older V6 AIMU is somewhat more complicated, so we suggest that you upgrade your V6 board to DIMU. Read more on the DIMU upgrade page.
The digital sensors also performs better, namely the pressure sensor is very good and compass is much less susceptible to magnetic distortion from power distribution.
This is because on a DIMU, the compass is only used to estimate initial heading before takeoff. Once you arm and fly, the compass is no longer contributing to heading estimation and therefore not susceptible to heading distortion caused by magnetic fields in flight. You also get an EEPROM to store IMU params to (never loose IMU params in a update).
So its about time to upgrade that old V6 board to DIMU if you want the best IMU performance and easiest way to calibrate your boards without having to worry about magnetic fields from power distribution in flight.
But AIMU is and will continue to be supported in both Software and ground tools.
Why the calibration?
Every sensor is different, even from the same batch. Ranges, bias and alignment varies from sensor to sensor, and if they are not compensated individually it might not fly or the estimation filters has to work harder to keep it flying. The better data you feed the controller, the better it will be able to estimate the attitude, heading, speed and position of the craft.
Where do I start?
If you have a AQ based around a Digital IMU (DIMU) like the M4 or AQ6 with DIMU, we suggest you start with performing a Tare and onboard compass calibration. This can be done in 5 minutes without connecting to a computer.
Beyond the basic tare there are different methods further refining your IMU calibration data. The different procedures are outlined below.
Onboard tare (level) calibration
The tare function is only available on boards fitted with digital sensors (DIMU). Basically what it does is to zero out all bias for Gyo and Acc. If done with the craft leveled out, it will serve as a quick way to calibrate gyros and accelerometer bias to “level out” the craft.
Tare is a rough and basic way to get flying and it gives good results for most configurations. But it wont calculate scales for Gyro and Acc, so there will be more drift and bias in the rate, acceleration and velocity estimates which the filters will have to correct. So IMU performance can be further improved by running Dynamic or fully temperature compensated calibration methods later.
Onboard compass calibration
Onboard compass calibration is only supported on DIMU. Basically the procedure involves spinning the craft around to subject each of its corners to the local magnetic vector and calculate the bias and scale on-board the craft. The scales and offsets for the 3 compass axises are then calculated on-board the controller and inserted into the memory.
In combination with the Tare function, the onboard compass calibration serves as a quick and simple way to get an acceptably calibrated DIMU in about 5 minutes.
Read more about Onboard IMU calibration.
IMU calibration without temperature compensation
Doing a dynamic calibration without temperature compensation involves doing a “calibration dance” with your board or craft. The log file from this dance is then used to calculate the ranges (scales) and offsets (Bias) of the Gyro and accelerometer. This is then combined with the onboard mag calibration to give improved scales and bias compensation in a short period of time.
The dance takes about 5-8 mins to perform and the calculations is usually done in less than 1 hour on a decent computer. Its a relatively simple method, described in depth in the IMU calibration without temperature compensation page
This process is ONLY supported on DIMU based boards.
Fully temperature compensated IMU
To fully temperature compensate any AQ board, the board is first cooled down (frozen) and then allowed to heat up slowly while sitting absolutely still (static).
Data is logged to the SD card that shows the drift of each sensor. This data is then used to calculate temperature compensation parameters for each sensor together with the dynamic calibration.
This procedure is somewhat involved and time consuming. Its also more prone to error and can require multiple tries to get right. But done right it will yield a extremely well compensated IMU that will perform well over the whole temperature range, including in very low or very high temperatures or in environments where temperature is expected to change significantly during flight.
But for most normal users, operating in temperatures between 10 and 40C, it should be sufficient to just do Dynamic calibration without temperature compensation and allowing some time to let board temp settle before taking off. AutoQuad’s Unscented Kalman Filter is capable of correcting a lot of sensor drift before getting into problems.
You can read more about the process on the Fully temperature compensated IMU page.