# GPS-based Attitude Determination (Electronics Project)

Get this Project:

Fields with * are mandatory

ABSTRACT

Inertial sensors and magnetometers are often used for attitude determination of moving platforms. This thesis treats an alternative method; GPS-based attitude determination. By using several GPS-antennas, and with carrier phase measurements determining the relative distance between them, the attitude can be calculated.

Algorithms have been implemented in Matlab and tested on real data. Two commercial GPS-based attitude determination systems have also been tested on a mobile platform and compared to a navigation grade Inertial Navigation System (INS). The results from the tests show that GPS-based attitude determination works well in open areas, but would require support from additional sensors in urban and forest environments.

INTRODUCTION TO GPS

Figure 2.1. A simplified block diagram of a carrier tracking loop

The GPS receiver processes the signals in several steps, a thorough description can be found. A simplified block diagram is shown in Figure 2.1. When the signal has been converted to an intermediary frequency and the C/A code has been stripped off then the carrier is removed by using an onboard generated replica of the carrier including the Doppler. It is this replica driven by the onboard oscillator that is adjusted in the loop to attain the phase measurement.

Figure 2.2. Pseudo-trilateration, a 2D-example

As the pseudorange is not a precise measurement an uncertainty is added and the receiver position would instead be known to lie in a thin shell. If three satellites were to be used then the position would be known to lie in a small volume where all three shells intersect, (assuming the clock offset is known). A two dimensional example is plotted in Figure 2.2 where the black area is the intersection where the receiver is known to be within.

ATTITUDE DETERMINATION

Figure 3.1. The phase difference between two antennas

The relative position between the antennas is estimated using carrier phase measurements, as the C/A code measurements are not precise enough. The phase difference between the antennas is used to determine the distance between the antennas in the satellite direction, see Figure 3.1. By combining measurements from several satellites the relative positions can be calculated. The satellites are so far away from the receiving antennas that the incoming wave fronts can be approximated to be planar.

Figure 3.2. Extracting attitude from the baseline

The baseline is calculated in a local frame and is used to determine the attitude, but the baseline does not necessarily coincide with the body frame. A rotation matrix from the body fixed frame to the local frame might be needed to extract the attitude. However determining the attitude for a single baseline that coincides with the body fixed frame is simple. The angles are defined in Figure 3.2.

AMBIGUITY RESOLUTION

Figure 4.1. 2D example of maximum number of integer cycles that fit

The search space for a single ambiguity can be visualized as the two dimensional example in Figure 4.1 where antenna A is held fixed and antenna B, at a distance of the known baseline length, is allowed to rotate. The baseline can be rotated 180 degrees with the integer being negative, and the baseline can also be rotated in such way that the integer could be zero

Figure 4.2. Baseline search space

The guessed baselines should be equally spaced and not farther away from each other than a single integer difference in phase, but also not too close to each other as that would worsen performance. The angle θ between two baselines is the angle that gives at maximum a whole wavelength of phase difference from one baseline to the other for any given satellite direction. In Figure 4.2 baselines 1 and 2 are plotted with antennas at locations a1, b1 and a2, b2.

IMPLEMENTED ALGORITHMS

Based upon the literature study a couple of algorithms were implemented in Matlab, and tested using both collected raw data and data from a simple simulation model.

• Logistics
• Cycle slip detection
• Guessed baseline search
• Primary and secondary sets

EXPERIMENTAL PLATFORM

Figure 6.1. The GPS receivers. Javad JNSGyro-2 to the left and Hemisphere GPS Crescent Vector to the right

Two commercial GPS-attitude systems, displayed in Figure 6.1, have been used for collecting data. Both systems can calculate attitude but only one of them can log raw data from both antennas for post processing. The latter is a Javad Navigation Systems JNSGyro-2 which consists of two high quality dual frequency capable GPS OEM boards that are connected to each other through a serial data interface.

Figure 6.5. The vehicle platform with the large L1 choke ring antennas

Vehicle tests were performed with the INS and GPS antennas mounted on a rigid metal platform. The platform was mounted on the top of a car. Also mounted on the platform was a digital camera synchronized with a GPS receiver. The images from the digital camera were stored in the internal memory card, and used to check the environment for interesting points of the attitude solution. The platform can hold up to four large choke ring antennas with baselines of roughly 69 cm, there are also magnetic mounts for two smaller antennas with either a 50 cm or a 100 cm baseline, as shown in Figure 6.5.

RESULTS

Figure 7.1. Single differences sorted by elevation

The noise level is coupled to the elevation of the satellites. Signals from lower elevation satellites travel longer through the atmosphere and is subject to more disturbances. As can be seen in Figure 7.1 the noise level is higher for the satellites with lower elevation in general; however the three lowest elevation satellites do not follow this exactly.

Figure 7.7. GPS attitude solution availability for mixed environment test drive. GPS aided by inclinometer and low cost heading gyro. GPS fixed integers−green, Gyro-heading only−red, GPS-position−blue

The second system had little trouble in finding an attitude solution. The time to lock was very short, and there were very few places where there was no attitude solution. At some places only the gyro-only heading was available, but the receiver relocked quickly. The availability of the solution was as good as can be seen in Figure 7.7.

CONCLUDING REMARKS

Conclusion

Algorithms and theory for calculating attitude from GPS carrier phase observations have been described. Thus the first goal has been fulfilled. A few of the algorithms have also been implemented and tested on both real and simulated data. The algorithms have been proven to work well on data collected in open environments without too large measurement errors. Two commercial systems have also been tested under harsh conditions and compared to a navigation grade inertial navigation system. Thereby performance from practical tests has been demonstrated.

GPS-based attitude determination works very well in open areas where multipath and signal blockage are infrequent. The tests of the commercial GPS-only system showed that in urban and forest environments the receiver sometimes delivered false attitude output and had slow integer reinitialization. The ambiguity initialization was not instantaneous on other data sets either. A GPS-based attitude system for such environments could benefit from algorithms that search the integers faster. Another enhancement could be to integrate other sensors that can assist the integer search and provide a temporary attitude solution when the GPS signals are blocked, which was showed by the tests with the other commercial system that used an inclinometer and a heading gyro.

Further Work

When large trees covered the roadside it was hard for the GPS-only receiver to keep a lock on the integers and also hard to quickly reinitialize them after temporary signal blockage. It would be interesting to test another commercial GPS-only system under the same conditions to see if there is a difference in performance. The performance of the tested receiver could also be evaluated with different combinations of settings.