# Introductory Proposal
GAINS: GPS-Aided Inertial Navigation System

Jamey Sharp ()

Synopsis: I propose to prototype a GPS-Aided Inertial Navigation System (GAINS), which incorporates measurements from several sources -- notably GPS, accelerometers, and gyroscopes -- into a single probabilistic estimate of inertial state.
Community Benefits:
- An open-source real-world application of Kalman filtering techniques
- A prototype of a critical component of the Portland State Aerospace Society's next-generation rocket
Deliverables: A GAINS prototype that can process measurements both from the real sensors of the Portland State Aerospace Society's LV2 rocket, and from a simulator of that rocket. This prototype will output inertial state estimates with greater accuracy than my current prototype, possibly at speeds slower than real-time.
Details: Machines have a difficult time answering the question, "Where am I now and where am I going?" For autonomous vehicles this question is particularly important, as the next question is, "Where should I be and how do I get there?"
The Portland State Aerospace Society (PSAS: ) is an amateur rocketry project at Portland State University with a vision of delivering nano-satellites to orbit. Our rocket has a variety of sensors providing measurements of position, orientation, acceleration, etc. The most notable of these are a GPS receiver and an inertial measurement unit (IMU) composed of accelerometers and gyroscopes. (Ongoing side projects include the development of other sensors, such as a 3D magnetometer.) The challenge that we face is to combine these many measurements into a single estimate of inertial state. In proprietary systems, this kind of data fusion problem is traditionally tackled with Kalman filtering techniques first proposed in the 1960s.
In October 2004 I implemented a prototype of a Kalman filter that would integrate GPS and IMU data. That prototype was simplistic: it produced fairly reasonable output as long as the rocket travelled in a straight line and didn't have too much noise in its IMU measurements. I have since discussed with other PSAS members some simple fixes to solve the immediate problems of that prototype. I also have done more research about practical applications of Kalman filters: I now understand better how to apply them to our specific instance. I want to integrate these new insights into a prototype that is usable for building an actively guided amateur rocket.
Schedule:
- July 1: Built several test data sets, with artificial noise for simulated measurements
- July 8: Implemented and tested simple rotation fix for current prototype
- July 29: Built separate 1-D model: Integrals approximated inside filter matrices, and Z-axis position/velocity/acceleration all modeled
- August 26: Extended 1-D model to 3-D plus orientation and rotational velocity; accounted for resulting non-linearities
- August 30: Final write-up submitted
Future Work:
- Implement dynamic error models (e.g. the computer concludes, "the pressure altimeter doesn't agree with any of the other sensors, so it's probably broken").
- Implement dynamic bias adjustment: The base voltage output by the gyroscopes, for instance, is heavily temperature-dependent.
- Ensure inertial state estimates can be produced as fast as measurements arrive on the 400MHz PowerPC processor that will be on-board the next-generation PSAS rocket.
- Integrate the resulting filter into the flight computer software, making inertial estimates available to all processes executing during flight.
- Revise algorithms detecting flight events, such as launch and apogee, to use inertial estimates. For example, when evaluating launch detect in the current system, components like the GPS, IMU, and pressure altimeter have to mostly agree.
- Integrate more directly with GPS receiver, taking pseudo-ranges as GPS measurements rather than computed position.
- Tie into GPL-GPS () to aid the GPS tracking loop using inertial estimates.
Related Work:
- There are a number of open source Kalman filtering implementations in languages like Matlab.
- Commercial and military avionics systems have the same kinds of data fusion issues. However, as a rule they use more expensive and more accurate sensors than PSAS does, somewhat relaxing the demands on the filters in their control loops.
- Kalman filtering is not the only applicable technique for this problem, although it is provably optimal under certain assumptions, and it is a good technique to try first. Non-linear systems generally require more sophisticated techniques like particle filters, some of which may also be useful for PSAS.
Biography: I am a senior undergraduate Computer Science student at Portland State University. Participating in the cross-disciplinary Portland State Aerospace Society since 1999, I have learned about many topics outside of my field, including control theory and digital signal processing. My direct contributions appear across all software that the group uses.
PSAS, which makes all of its hardware and software designs available under free licenses, is only one of the open source projects I've been heavily involved in. Another is XCB, an X-protocol C Binding () aiming to replace the aging Xlib component used in nearly all X Window System applications. At the urging of Professor Bart Massey of Portland State University and Keith Packard of HP Cambridge Research Labs, I began work on XCB in 2001; in the last year it has acquired several dedicated outside developers and is gaining significant outside interest.
# Work Breakdown Structure
Pull ADC => SI unit conversions out of flight computer code so the filter can operate on raw measurements. (3 days)
Add noise to simulated measurements after statistical analysis of real sensor data. (4 days)
Extend current implementation with Tim's suggestion: rotate its orientation estimate through the angle between: the vector from last position estimate to current GPS coordinate; the vector from last position estimate to current INS position. Test with noisy data. (1 week)
Compute approximated integrals inside the filter. (2.5 weeks)
- May require re-expressing the Kalman filter equations as code with more flexibility, or moving to a language with a convenient implementation of Kalman filters for re-use. (3 days)
- Keep 1-D acceleration, velocity, and position in the state vector and map them to each other with appropriate divisions by delta\_t etc. Incorporate GPS altitude and velocity, pressure altimeter, and Z-axis accelerometer measurements with appropriate weights for state variables not directly measured by a particular instrument. (2 weeks)
Incorporate orientation and rotational velocity into state vector. (3 weeks)
- This makes the problem non-linear and requires that I understand solutions for non-linear systems. EKF may suffice. Need time to read material on this subject, and evaluate whether approximating trig functions like sin(x) with x is good enough. (1 week)
- Implement non-linear filter that rotates IMU measurements into LTP frame of reference based on current orientation estimate. (2 week)
Given 1-D model, add Z-axis accelerometer bias to the state variables.
Given 3-D model with orientation, add all IMU biases (and gains?) to state variables.