10
$\begingroup$

Our robot has a circular array of 12 sonar sensors that looks like this:

enter image description here

The sonar sensors themselves are pretty good. We use a low-pass filter to deal with noise, and the readings seem pretty accurate. However, when the robot comes across a flat surface like a wall, something weird happens. The sonars don't show readings that would indicate a wall, instead, it appears like a curved surface.

The plot below was made when the robot was facing a wall. See the curve in the blue lines, as compared to the straight red line. The red line was produced by using a camera to detect the wall, where the blue lines show filtered sonar readings.

enter image description here

We believe this error is due to crosstalk, where one sonar sensor's pulse bounces off the wall at an angle and is received by another sensor. This is a systematic error, so we can't really deal with it like we would with noise. Are there any solutions out there to correct for it?

$\endgroup$
10
$\begingroup$

This is a common problem, and one of a great many. Acoustic sensing is a complicated field of study, a significant part of which is spent guessing what path a sound wave took between sending it and receiving it. As you've noticed, assuming that it went straight out and came straight back will produce odd results in practice.

To really solve it, you'll need to use a system that places a unique frequency and/or tone length on each sensor. This can be taken to significant extremes, e.g. Frequency-Hopping Pseudo-Random Pulse Width Modulation to Eliminate Crosstalk of Sonar Sensors in Mobile Robots.

There is also a low-tech solution, which is fairly straightforward in concept. If you wanted to simply detect the crosstalk, it would be a matter of firing a single sensor's pulse in between the firing of all sensors' pulses. If you detect the return pulse with any other sensor, you know that you are in a crosstalk situation.

In practice, this is fairly wasteful: notice that this effectively halves the number of samples you can take. So you can improve on the implementation by dividing the sensors into groups where each member of the group is far enough from the others that it will not receive crosstalk. The most robust version of this approach is to make the groups themselves be pseudorandom which not only allows the errors to average out over time but aids the detection of crosstalk on an individual sensor basis.

In your particular case, you have the added benefit of a camera sensor that you've shown is returning a more correct value for the ranges. Strategies to combine separate (and possibly conflicting) measurements into a single more accurate estimate is its own very broad topic (called fusion, example 1, example 2), but a very relevant one to what you're doing here.

$\endgroup$
5
$\begingroup$

Some sensors, such as the Maxbotix MB1200 XL-MaxSonar-EZ0, have a daisy chaining system built in where one sensor triggers the next sensor once it has finished its measurement. This way you can have N sensors and ensure that only one is firing at once but that there the next sensor fires as soon as the first has collected its return. This solution is simple but obviously greatly reduces the amount of data you get per unit time. Ian's solutions are far closer to optimal.

$\endgroup$
4
$\begingroup$

Is it possible to use multiple ultrasonic sensors on a single robot? Yes: "Using Multiple Sonar Sensors".

As you have already figured out, one sensor often receives echoes of pings sent by another sensor. There are several ways to deal with cross-sensitivity, roughly in order of simplest first:

  • Ping only one transducer at a time, ignoring all the other transducers while waiting for the "ghost echoes" from the current transducer to die down before pinging the next transducer. This is much faster than mechanically rotating a single transducer. Perhaps this will be fast enough, unless your robot is ramming into things at nearly the speed of sound.
  • Use relatively narrow beam angle transmitters or receivers (or both) per sensor, and increase the angle from one sensor to the next so one sensor can't hear the echo from another (unless the stuff in front of the transducer causes some weird lateral reflections) — sensors angled apart roughly the same as the beam angle. Alas, this leaves "blind spots" between transducers where objects can't be seen by any transducer.
  • Some combination — for example, increase the angle from one sensor to another so one sensor only hears echoes from its 2 neighbors (about half the beam angle); then alternate between pinging the even transducers (ignoring the odd transducers) and pinging the odd transducers (ignoring the even transducers).
  • Each transducer operating at a different frequency. Alas, all the low-cost ultrasonic transducers, with few exceptions, are tuned to resonate at 40 kHz. When listening to a variety of signals, these transducers can only "hear" signals that are within a few kHz of 40 kHz. You'll have to balance (a) The further away from 40 kHz you use on a transducer designed for 40 kHz, the less sensitive it is, so you want a frequency "relatively close" to 40 kHz; and (a) The closer all the frequencies are together, the more difficult it is to discriminate between them, so you want a set of frequencies that are spread "relatively far apart". I don't know if there is a good compromise or not — if not, you're stuck with (c) use more expensive sensors tuned to other frequencies, or more expensive "wide-bandwidth" sensors not tuned to any particular frequency.
  • Use various transmit timings to rule out ghost echoes. Say you transmit from the left, delay 2 ms (not nearly enough to let the echoes die down), then transmit from the right,... after the echoes die down, then transmit from the left, delay 3 ms, then transmit from the right. If the right receiver gets an echo back 5 ms later both times, then you can be pretty sure it's a real echo; if the right receiver gets an echo back 5 ms later the first time, 6 ms later the second time, it's probably a ghost from the left receiver. (There are much more sophisticated "spread spectrum" techniques for separating out many transmitters all using the same frequency at the same time.)
  • Combine the signals from all the receivers. If you have one central transmitter that pings in all directions (or equivalently you have transmitters pointed in every direction, and you ping them all at the same instant), and the first echo you get back hits the left receiver first (then later the right receiver hears an echo), you know that the nearest obstacle is closer to the left side than the right side. (There are more sophisticated "phased array" techniques that combine signals from all the receivers, and even more sophisticated "beamforming" techniques for slightly adjusting the transmit times of all the transmitters.)

P.S.: Have you seen "Infrared vs. Ultrasonic — What You Should Know" ?

(Yes, I've said this all before, at "Multiple Ultrasonic Rangefinder Question".)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.