-
Notifications
You must be signed in to change notification settings - Fork 5
VMU931 bias drift
Written with VMU931 User Guide 1.3 and firmware 1.0.1.
There are two calibration procedures for VMU931:
- bias calibration command documented in the manual (X and Y axes)
- undocumented magnetometer calibration (essential for Z axis, "heading")
Command estimates the bias of accelerometers and gyroscopes. Performing this type of calibration will give you reasonable drift on X and Y axes.
To send calibration command you can use vmu931-calibrate
example
./vmu931-calibrate /dev/ttyACM0
While powering up the sensor move it around in multiple orientations until the Euler angles indicates 0 degrees while the sensor has its Y axis pointing North. You can do it blindly (not reading data from the device).
As of firmware 1.01:
- the result is not stored
- it is only possible when powering the device on
So you have to repeat it every time you power on the device.
Without magnetometer calibration the device drifts more than 100 degrees per hour on Z axis ("heading")!
- VMU931 firmware version 1.01
- device fixed to flat surface with 2 screws
- surface put on the floor
- results gathered with
vmu931-estimate-bias
for 60 seconds - device calibrated with
vmu931-calibrate
- results gathered again with
vmu931-estimate-bias
for 60 seconds - device powered off, magnetometer calibrated while powering on
- results gathered yet again with
vmu931-estimate-bias
for 60 seconds - result csv files data plotted in R
Absolute deviation in degrees after 60 seconds
condition/axis | X | Y | Z |
---|---|---|---|
not calibrated | -0.003906 | 0.020050 | 2.021255 |
calibrated | 0.058228 | 0.120087 | 2.044922 |
magnetometer calibrated | -0.024506 | 0.003082 | -0.186813 |
Scaled for degrees per hour
condition/axis | X | Y | Z |
---|---|---|---|
not calibrated | -0.234375 | 1.203003 | 121.275330 |
calibrated | 3.493652 | 7.205200 | 122.695312 |
magnetometer calibrated | -1.470337 | 0.184937 | -11.208801 |
Shell instructions to collect data
./vmu931-estimate-bias /dev/ttyACM0 60 > bias.csv
./vmu931-calibrate /dev/ttyACM0
./vmu931-estimate-bias /dev/ttyACM0 60 > calibration-and-bias.csv
Disable device, enable, perform magnetometer calibration
./vmu931-estimate-bias /dev/ttyACM0 60 > magnetometer-calibration-bias.csv
R code used for the plots
bias=read.csv("bias.csv", header=TRUE, sep=";", dec=".")
bias$t=(bias$t-bias$t[1])/1000
cal=read.csv("calibration-and-bias.csv", header=TRUE, sep=";", dec=".")
cal$t=(cal$t-cal$t[1])/1000
mag=read.csv("magnetometer-calibration-bias.csv", header=TRUE, sep=";", dec=".")
mag$t=(mag$t-mag$t[1])/1000
plot(bias$t, bias$z, type="l", xlab="time [s]", ylab="angle [deg]", col="red", ylim=c(0,4), main="Z drift in time")
lines(cal$t, cal$z, col="green")
lines(mag$t, mag$z, col="blue")
legend("topleft", legend=c("before calibration", "after calibration", "magnetometer calibration"), lwd=c(1,1,1), col=c("red", "green", "blue"))
plot(bias$t, bias$x, type="l", xlab="time [s]", ylab="angle [deg]", col="red", ylim=c(0,1.5), main="X drift in time")
lines(cal$t, cal$x, col="green")
lines(mag$t, mag$x, col="blue")
legend("left", legend=c("before calibration", "after calibration", "magnetometer calibration"), lwd=c(1,1,1), col=c("red", "green", "blue"))
plot(bias$t, bias$y, type="l", xlab="time [s]", ylab="angle [deg]", col="red", ylim=c(0,2), main="Y drift in time")
lines(cal$t, cal$y, col="green")
lines(mag$t, mag$y, col="blue")
legend("left", legend=c("before calibration", "after calibration", "magnetometer calibration"), lwd=c(1,1,1), col=c("red", "green", "blue"))