Inertial navigation
From Bob's Basement
Contents |
Issues of relying only on GPS
The signal strength of GPS is not a known factor in any particular location. Rarely, however, is is sufficient to provide navigation on a meter scale.
When navigating on a small scale, relying on GPS accuracy would result in errors and inefficient paths being taken to get a vehicle to its waypoint.
Also, where a path distance being plotted is less than the measured accuracy of a GPS signal, it is impossible to plot a path.
This method is also known as Dead Reckoning
Inertial Tracking System
An intertial tracking system uses forces applied to objects to calculate how far the object has travelled relative to it's start position. There is more info about the concept on wikipedia Inertial Navigation System
The idea is to combine GPS and an Inertial system, by using GPS to calculate the start position, and the end position, and the vector between the two. This may include waypoints betweeen the start and goal positions.
Once the vector has been calculated, the inertial system can be used to track the actual movement of the vehicle, and to detect when the goal has been reached. GPS may then be used to verify this, and to make a new course if required.
Another advantage is that other information may be gathered, such as tilt - or derived, such as drift - and be corrected for appropriately. Tilt is especially important, as it may prevent us from capsizing the boat!!
Hardware
In order to create such a system, we need to have a few sensors. X,Y and Z accelerometers. Something to calculate absolute bearing (compass). From this we can calculate the exact orientation of the boat at any time, relative to the center of the earth. We can also work out the velocity, and as such the position relative to where it was initialised. We will need an ADC with a fairly high sample rate.
We will also need some kind of system to run the software on - either the VMU or a seperate microcontroller system.
Software
Inputs will be from the sensors, software is required to map these readings into movement vectors. See the logic section for more details. Once these readings have been made, the vectors will be in the frame of reference of the boat itself. First transformation will be required to convert it into the reference frame of the Earth.
Logic
Using 3 accelerometers, 1 gyro and 1 electronic compass, we can work out :
- tilt of the boat in components of XZ and YZ
- distance traveled in X and Y (paralell to the ground)
- heading relative to magnetic north
Tilt
We need to take into account tilt before calculating displacement. Using the Z axis, we can find out the angle to the horizontal that it is tilted at, but we cannot determine which direction it is tiling in (and as such the components of the Y and X axis which we need to compensate for). We can calculate this less frequently than displacement, and will probably need to due to the more complex operations involved.
Using a gyroscope , we can work out the effect of tilt in each axis. We'll call this θ
We have a measured X from the accelerometer, but we want to get the plane paralell to the Earth's XY. For example we want to know the distance travelled in the X direction, which is paralell to the ground.
Trig to the rescue!! We have measured:
from the gyro. NOTE this needs to be less than 90. If it is measured greater than 90, simply substract 90 from it, and negate the final answer.
is the effect of gravity on the X axis.
We know:
is
(acceleration of freefall due to gravity)
And also:
We are looking for
. So rearrange the equation:
If the original
was greater than 90, subtract
from 0. If it is greater than 180 (which will only be the case if the ship has inverted!) then subtract 180 from it before going through the same process. Then subtract
from the acceleration reading for the axis in question. Incidentally, if the angle is greater than 90, then the boat is in real trouble!
The H we just calculated, we'll keep, and call it
(to avoid confusion). This is the effect of gravity on X. Now we want to calculate the effect of gravity on Y. We have Z (accelerometer perpandicular the plane XY).
If Z is not equal to g, then there is a tilt. If
, then there is a tilt in the ZY plane. From this point forward the angle we are calculating is called
, i.e. tilt in the ZY plane relative to the horizontal. I have chosen to put the direct measurement of tilt in the ZX plane as this is likely to have the largest tilt (the boat is longer than it is wide, and as such will rock from side to side more than it will back and forth - larger measurements gives smaller errors).
The component of g in Y (Yg) can be calculated, using the following:
To calculate the angle
, we use the following trig:
Rearraging:
We can also read
directly from a gyro. Calculating it and measuring directly allows us to check for inaccuracy in measurement over the sensors.
Displacement
Given the inputs of acceleration (now corrected for tilt and in the reference frame of the XY of the boat parelell to the XY of the Earth), we can perform some operations on that data to calculate position. We will assume constant acceleration between each sample point. The sample rate will need to be high enough, say about 20kHz, to make any inaccuracies produced by this assumption. The calculations are time critical, as they must be completed (once for each axis) before the next sample is taken. All samples will be taken in sync to maximise the time available.
These readings are split into component axes, i.e. X Y and Z.
is the "absolute" distance from the system's origin.
is the time between each acceleration sample.
is the distance travelled since the last sample was taken.
is initial velocity, which will be stored from the previous calculation.
is previous acceleration sample, which will be stored from the previous calculation.
will be measured.
is the change in acceleration from the last sample.
is the sample rate of the ADC
Definitions:
Substituting the above into the equation:
we can calculate the distance travelled in that axis (
)
Then to update the master position:
Then calculate
and store
as
Heading
This can be measured using an electronic compass. No need for gyros here!
Initialisation and Aligning
There are two ways to initialise the system. One is to do a zero velocity initilisation, which means the system must be completely stationary. This is next to impossible on a boat, due to waves. Also, due to Intergration Drift (below) we will need to reset the instruments whilst in motion.
This brings GPS Align in Motion into play, which uses readings from GPS satelites to calculate the velocity. To do this, we simply inject GPS readings into the system instead of accelerometer readings. Since the system is dependant on previous readings to calculate the new readings, we are effectively resetting the system.
Of course, magnetic north isn't going anywhere, and so the heading pre-initialised by the Earth. Thanks, Earth.
Issues
Intergration Drift
Inaccuracies in the sensors will be compounded over time, causing the measurements to go out of alignmnet. One solution is to perform a Zero Velocity Update (by stopping, resetting the instruments, taking a new GPS coordinate and absolute bearing from a compass). However, this means the vehicle would have to stop rather often, given we probably cannot afford very good sensors. I think it may well be possible to reset some of the sensors whilst in motion (GPS Align in Motion).
Complexity of manufacture
We will need to use a strapdown system, to eliminate the need for a gyrostabilised platform. We will need quite a few ADCs, and something to process the data.
Development
External Links
Memsic - place to get accelerometers and such



