A Useful Role for the ADXL202 Dual-Axis Accelerometer in Speedometer-Independent Car-Navigation Systems

Vehicle navigation using the Global Positioning System (GPS) has been of increasing interest over the past decade; GPS navigation is frequently installed in today's high-end luxury cars and in many commercial vehicles. Because they rely on high-frequency radio signals from satellites, vehicles with GPS navigation systems can travel into situations where they lose the GPS signal for short intervals. With appropriate algorithms, GPS can be integrated with other course-plotting techniques to provide users with continuously accurate navigation information.

Dead-(deductive) reckoning is one method widely used in vehicle navigation. It utilizes three distinct inputs to predict position: a set of starting coordinates, the direction of travel, and the speed of travel. Its accuracy is limited due to its relative positioning scheme; the absolute position error grows in proportion to the distance traveled. Other methods of non-GPS vehicle navigation include map-matching, inertial navigation, and Delta A measurement. Map-matching is based on the principle that if you are traveling near a road or parallel to it, there's a good chance that you are indeed on that road (may not work well in heavily populated areas). Inertial navigation relies on an accelerometer to derive velocity as the integral of acceleration. In Delta A measurement, the GPS signals subsequently recovered from the receiver are correlated with inputs from non-GPS systems. This method can correct for the inaccuracies of an accelerometer, such as noise and zero-g offset over temperature/time. More than one of these techniques can be used in conjunction with the GPS to display the position more accurately.

While it would be helpful to use the car's installed speedometer, certain difficulties arise. In general, speedometer information is unavailable because it is not bussed out to systems outside the engine/ABS/stability control computer(s). Because it is considered "safety-critical" in many cases, the speedometer output will not be connected to anything that could take down the bus. Besides, GPS systems are usually built by third parties who may want to build a generic product with a wide potential market. It is in applications of this sort that the ADXL202 dual-axis accelerometer can be used to develop accurate speed estimates for the navigation system. A digital compass or gyroscope is used in conjunction with an accelerometer to determine the approximate direction of travel. The information is then translated by the navigation system (in conjunction with other methods mentioned above) to determine location relative to the point at which the signal was lost.

The method for determining velocity to be described here uses an accelerometer to sense the time interval for both front and back wheels to encounter a bump in the road (while moving straight ahead). Whether one is driving on a local road or a highway, there will always be imperfections in the road. These imperfections translate into bumps and jolts sensed immediately by the car's wheels, and ultimately by its passengers. In order to track the speed by sensing these bumps, an accelerometer is used to identify their magnitudes and timing. Thus, for a car with a given wheelbase (W), the interval (T1) for both axles to encounter a bump can be used to compute the speed at which the car is traveling, using the following equation: (See Figure 1.)

Speed [mi/hr] = (W [ft]/T1 [s]) * (3600 s/hr)/(5280 ft/mi).
Speed [km/hr] = (W [m]/T1 [s]) * (3600 s/hr)/(1000 m/km).

Sample data log
Mxx = Magnitude of bumps (duty cycle %)
txx = instantaneous time of bumps (sec)
Tx = duration between two correlating bumps (sec)
S0 = previous valid speed (mph)
S1 = current calculated speed (mph)

Figure 1
Figure 1. Event timing for speed measurement.

When logging data during a typical drive on the local roads to develop experimental information, it is not easy for the accelerometer to discriminate between bounces and vibrations in the car's suspension system and the spike-pairs caused by irregularities in the road. Thus a filtering system is needed to isolate the bumps. The ADXL202EB-232 Evaluation Board has internal software that allows data to be smoothed with low-pass filtering. This provides a better chance of recognizing the road bumps and using them in calculations. This problem having been solved, a correlation problem arises—for example, if there are two similar bumps less than a car-length apart, it is difficult to make some sense of the four total bumps experienced by the car within a short time. Hence the necessity of coming up with an algorithm to cleanly translate the data points into valid speedometer readings.

If the accelerometer is placed halfway between the axles with the X-axis parallel to the Earth's surface and aimed straight ahead, and the Y-axis perpendicular to the Earth's surface, the magnitudes of the bump impulses produced by the front and rear wheels are approximately equal (depending somewhat on the vehicle's suspension system). To identify bump pairs, it is necessary to make magnitude comparisons to match the bumps originating with the front and rear axles. At the same time, the current tabulated speed must be compared with the last valid speed to determine whether or not the current calculated speed is feasible. For instance, if a vehicle was going at 25 mph about one second ago, it is extremely unlikely for the current speed to be 45 mph or more. So by using timing and speed comparisons, any outputs that don't make sense will be rationalized or ignored.

Data analysis. The digital outputs of the ADXL202 are duty-cycle modulated; on-time is proportional to acceleration. A 50% duty cycle (square-wave output) represents a nominal 0-g acceleration; the scale factor is ±12.5% duty cycle change per g of acceleration. These nominal values are affected by the initial tolerances of the device, including zero-g offset error and sensitivity error.

In the application described here, a 50% duty cycle output corresponds to a perfectly smooth ride—no bumps or vibration detected by the accelerometer. In general, because of its suspension dynamics, a vehicle is more responsive to bumps at lower speeds. So for lower speeds there needs to be less sensitivity to the magnitude of the bumps (Mxx) and the threshold level can be higher. Magnitudes less than the threshold level will be considered invalid data, while those above the threshold (valid magnitudes) will pass on to the next phase of filtering.

The purpose of the next stage is to block out unfeasible speeds implied by two adjacent bumps that are closer together than the wheelbase of the vehicle. To tackle this problem, if S1 (defined below) is beyond a general acceleration limit of 20 mph/s when compared to S0, the set of data is invalid. However, the configuration of the four bumps can be translated into legitimate speeds by pairing the first and third bumps—and the second and fourth bumps (Figure 2).

Figure 2
Figure 2. X-axis (forward-back), parallel to Earth's surface

A: M01 = 52.41%, t01 = 135.862s
B: M11 = 52.15%, t11 = 135.938s
C: M02 = 53.08%, t02 = 136.179s 
D: M12 = 51.66%, t12 = 136.242s

Figure 2 shows recent data logged with the ADXL202EB in a car traveling at a constant speed of 20 mph. At first glance, it seems that A and B are two correlating bumps, as well as C and D. However, t11 – t01 = 0.076 seconds which translates into a speed of about 81 mph. This would be compared with the last valid speed, using the Delta A measurement method, and would negate the correlation of A & B. Then A and C are paired: t02 – t01 = 0.317 seconds, as are B and D (0.304 s), which translate into respective speeds of about 19.4 mph and 20.2 mph, respectively. From Equation 1 and a 9-foot wheelbase, Tx for 20 mph is equal to 0.307 seconds. The results here show differences of 3.2% and 1% respectively.

This simple solution deals with the most common source of false-readings. But of course there are many other bump configurations that could cause faulty speed-readings. Many of them can be dealt with by increasingly clever algorithms and signal conditioning, but in the end, one must realize that this computation is a part of a system to substitute for temporary loss of GPS signals, intended to maintain reasonable accuracy over short intervals.

Which axis? One can consider using either the X- or the Y-axis (or both) for acceleration data to measure the bumps on the road. The Y- (vertical) axis measures the actual magnitude, as modified—and frequently muddied—by the car's suspension-system dynamics, while the X-axis measures the magnitude of the front-back acceleration component (accelerometer cross-axis) as the car passes over the bump.

The first approach (Figure 3) measures the Y-axis acceleration (perpendicular to Earth's surface). In a no-bump situation the measurement will be 1 g, established by Earth's static gravitational force. This nominal 62.5% output (50% + 12.5%/g) can be offset to read 50%, as a starting point for positive or negative vertical deflection forces.

The second approach (seen in Figure 2) uses the X-axis (parallel to earth's surface) to measure forward-and-back acceleration. In a no-bump situation the measurement will be 0 g. As the car's motion is influenced by the bump, while the accelerometer picks up a Y-axis acceleration spike, strongly filtered by the car's suspension system. At the same time, the X-axis also picks up a smaller but "cleaner" forward component of that acceleration spike due to front-and-back motion induced by the bump (and the accelerometer's cross-axis sensitivity). During trial runs, this latter method (Figure 2) gave better results.

This approach helps in filtering out unwanted noise. Furthermore, one can see in Figure 3 that upon hitting a bump, the vertical component of acceleration tends to show a rather low damping factor. Relying on forward-back motion can overcome these complications.

Figure 3
Figure 3. Y-(vertical) axis, perpendicular to Earth's surface.


The trials described in this article were performed using the ADXL202EB-232 Evaluation Board and Crossbow software on a personal computer. Here is a step-by-step description of the process and its flow chart (Figure 4).

  1. Connect ADXL202EB-232 to serial cable, then to RS-232 port of computer.
  2. Open the software program X-Analyze provided by Crossbow.
  3. Click on "Add a connection" and select 'ADXL202-EB-232A on COM1'.
  4. Click on "Configure a connection"; then click on 'Calibrate'.
  5. To calibrate, hold the board with the XY plane perpendicular to the ground and rotate the board 360 degrees about that plane.
  6. Select update rate to be as fast as possible and the logging rate to be 50 Hz; Select filtering rate to be 1.
  7. Select logging folder; this is where the .txt logged files will be saved.
  8. Click on "Save & Exit".
  9. Mount/Attach board onto vehicle with Y-axis facing either towards the bottom of the vehicle and X-axis straight ahead. Make sure that the board is securely mounted so that it cannot move relative to the car's body when going over bumps.
  10. Click on "Log all connections" when ready to log data.
  11. Once logging data, the same button is used to "Stop logging".
  12. Open .txt files and copy and paste onto Excel to create charts/graphs.
Figure 4
Figure 4. Computation flow-chart.

Об авторах


Peter Shih


Harvey Weinberg