UAT 205 Sensors and Instrumentation Systems
Worksheet 2 IMU and compass calibration
Objective
Calibrate the accelerometer in six positions, analyse the gyro with Allan deviation and correct compass hard iron
Equipment and materials
- Flight controller or IMU board and compass board
- Mission Planner or QGroundControl
- Python, AllanTools and module 2 example code
- Steel screwdriver
Safety
- Remove propellers whenever a battery is connected to a drone in the lab
- Bench work only; no flying
Steps
- Run six-position calibration in the software and read offsets and scales
- Record raw six-position readings, compute with Example 1 and compare
- Leave the IMU still for at least an hour and record the gyro
- Compute Allan deviation to find ARW and bias instability
- Rotate the compass board, record mx and my, find hard iron with Example 2
- Place a steel screwdriver near the compass, observe the circle change and record it in the lab notebook
Record of results
| Axis | Reading axis up (m/s²) | Reading axis down (m/s²) | Computed bias (m/s²) | Computed scale factor | Software offset and scale |
|---|---|---|---|---|---|
| Axis | Record length and sample rate | ARW (slope -1/2 line at τ = 1 s) | Bias instability (minimum) | Reading method (AN5087 or IEEE) |
|---|---|---|---|---|
| Condition | mx min and max (µT) | my min and max (µT) | Estimated offset (µT) | Data shape (circle, shifted or ellipse) |
|---|---|---|---|---|
Questions
Without calibration, how many degrees of tilt would the bias your group measured make the flight controller see while the drone sits level, and how would the drone fly?
How far do your own bias and scale-factor results differ from the software's values, and what could cause the difference?
Which method did your group use to read bias instability, how would the value change with the other method, and why must the report state the method?
With the steel screwdriver near the compass, did the data circle shift its centre, stretch into an ellipse, or both? Explain with hard iron and soft iron, and say what this means for mounting a compass on a drone.
Check before you hand in
What to hand in
- Bias and scale-factor comparison table
- Allan deviation plot with ARW and bias instability
- mx/my plots before and after hard-iron correction
- Screwdriver test notes