BeagleBone blue heading drift on small AUV

Hi all,

At my work we use the BeagleBone Blue boards to control somewhat small AUVs.
The board is placed in underwater tubes along with batteries, ESCs for thrusters and all other electronics.
We use the in-build magnometer and gyro to calculate the heading for navigating under water.
Testing the beagleboard alone on the desk shows that the heading is fairly stable and correct within reasonable limits.
The problem arises when we do offshore tests with the AUV. Here the heading will start to drift. A controller has been configured for the AUV to follow a reference heading for X amount of time. From the data we can see that the AUV actually do keep a steady heading, but from inspecting the vehicle IRL it becomes obvious that something is wrong as the vehicle will follow an arc instead of a straight line.

So to the AUV actually thinks that it keeps the same heading and actually does this for the first few meters and then starts to turn following an arc while still thinking it is on the same heading.

I know that we introduce quit some noise on the sensors by having the batteries, ESCs and wiring going around the board, but could this really be the course of this? Can anyone of you think of other possibilities? And can anyone suggest a solution to this (other than moving power units and wires to another shielded tube - this is not an option at this moment)?

Best,
Jesper

On Fri, 29 Sep 2017 14:18:01 -0700 (PDT),
jesp.hc@gmail.com declaimed the following:

I know that we introduce quit some noise on the sensors by having the
batteries, ESCs and wiring going around the board, but could this really be
the course of this? Can anyone of you think of other possibilities? And can
anyone suggest a solution to this (other than moving power units and wires
to another shielded tube - this is not an option at this moment)?

  Every device I own using a magnetometer (two handheld GPS units, my
cellphone, and even my 18 year old Jeep) has a calibration mode which
requires making two slow circles [the phone wants full random tumbling] in
order to adjust for localized distortions in the magnetic field. They also
tend to include tables of magnetic declination (the GPS units automatically
pick the value, the Jeep has a cryptic command sequence on the overhead
console to let one specify the declination zone).

  I don't know just what the automated calibration logic entails. cf:
http://www.instructables.com/id/Simple-Manual-Magnetometer-Calibration/
http://diydrones.com/profiles/blogs/advanced-hard-and-soft-iron-magnetometer-calibration-for-dummies
https://github.com/kriswiner/MPU6050/wiki/Simple-and-Effective-Magnetometer-Calibration

  Either or both calibration and declination could be needed -- though
thruster motors may be difficult to compensate for.

Hi all,

At my work we use the BeagleBone Blue boards to control somewhat small AUVs.
The board is placed in underwater tubes along with batteries, ESCs for thrusters and all other electronics.
We use the in-build magnometer and gyro to calculate the heading for navigating under water.
Testing the beagleboard alone on the desk shows that the heading is fairly stable and correct within reasonable limits.
The problem arises when we do offshore tests with the AUV. Here the heading will start to drift. A controller has been configured for the AUV to follow a reference heading for X amount of time. From the data we can see that the AUV actually do keep a steady heading, but from inspecting the vehicle IRL it becomes obvious that something is wrong as the vehicle will follow an arc instead of a straight line.

So to the AUV actually thinks that it keeps the same heading and actually does this for the first few meters and then starts to turn following an arc while still thinking it is on the same heading.

I know that we introduce quit some noise on the sensors by having the batteries, ESCs and wiring going around the board, but could this really be the course of this? Can anyone of you think of other possibilities? And can anyone suggest a solution to this (other than moving power units and wires to another shielded tube - this is not an option at this moment)?

How are you reading the IMU? Are you using any of the filtering of libroboticscape?

I am guessing that the magnetometer / compass can see the electric field generated by your battery system power leads.
You are using a switching power supply to convert battery power to a constant load.
Fully charged batteries drop Voltage quickly when first used, then are constant for a while, then go off a cliff when almost fully discharged.
Your switching power supply is converting this drop in Voltage to an increase in current which is an increase in the interfering magnetic field.

Get the compass/magnetometer sensor as far away from the battery/power system as you can.

— Graham