Research on Distance and Proximity Sensors
For our platooning demonstrator, we need a sensor to measure the distance to the front car. In this blog post, we evaluate the performance of common Ultrasonic and ToF sensors according to update rate and accuracy.
In the next section, we empirically evaluate the following sensors:
Name | Type | Datasheet | Field of View | Minimum Distance | Maximum Distance | Accuracy Below One Meter | Update Rate | Current | Interface |
---|---|---|---|---|---|---|---|---|---|
HC-SR04 | Ultrasonic | Link | 15° | 2 cm | 4 m | +- 3 mm | 60 ms | 2 mA | GPIO |
VL53L0X | ToF-Laser | Link | 25° | 50 mm | 2 m | 7 % | at least 20 ms | 19 mA | I2C |
VL53L1X | ToF-Laser | Link | 27° | 4 cm | 4 m | +-20mm | at least 20 ms | I2C |
Evaluation
Given a ground-truth distance, we evaluate
- the statistics of the measured distances and
- the time duration per measurement (t).
The statistics include
- standard deviation (STD) and
- difference between minimum/maximum measured distance to the mean (min-mean and max-mean, respecitvely).
The measurement is performed against a conrete wall or a wooden plate. The signal arrival is perpendicular. For calculating the statistical properties, we take 100 measurements.
HC-SR04¶
Results are shown in the following table:
Actual Distance (cm) | Measured Distance (cm) | STD (cm) | t (ms) | min-mean (cm) | max-mean (cm) |
---|---|---|---|---|---|
60 | 60.00 | 0.14 | 3.97 | -1.00 | 1.00 |
50 | 49.94 | 0.28 | 3.40 | -0.94 | 1.06 |
40 | 39.80 | 0.41 | 1.96 | -39.80 | 0.20 |
30 | 29.90 | 0.30 | 2.25 | -0.90 | 0.10 |
20 | 20.85 | 0.36 | 1.73 | -0.85 | 0.15 |
15 | 15.39 | 0.51 | 1.43 | -1.39 | 0.61 |
10 | 8.94 | 0.24 | 1.05 | -0.94 | 0.06 |
5 | 4.57 | 0.82 | 0.81 | -1.57 | 1.43 |
We receive the following plots:
We can see that the accuracy is very good due to the low standard deviation. Further, we obtain stable measurements because of the linear behavior. Provided a short distance, the time duration to obtain the measurement is low. Therefore, the update rate is high for short distances.
Because of the small field-of-view of 15° however, measurements can be missed if the signal is not perpendicular to the wall. Besides, multiple sensors would interfere with each other as they share the same carrier frequency.
VL53L0X
We obtain the following results:
Actual Distance (cm) | Measured Distance (cm) | Standard Deviation (cm) | Measurement Duration (ms) | min-mean (ms) | max-mean (ms) |
---|---|---|---|---|---|
60 | 35.06 | 0.34 | 31.33 | -1.06 | 0.94 |
50 | 39.48 | 0.50 | 31.36 | -0.48 | 0.52 |
40 | 43.93 | 1.05 | 31.33 | -3.93 | 1.07 |
30 | 34.01 | 0.10 | 31.33 | -0.01 | 0.99 |
20 | 25.12 | 0.33 | 31.33 | -0.12 | 0.88 |
15 | 20.91 | 0.29 | 31.32 | -0.91 | 0.09 |
10 | 15.17 | 0.51 | 31.25 | -1.17 | 0.83 |
5 | 10.01 | 0.10 | 31.19 | -0.01 | 0.99 |
The update rate is very slow, the measurement duration being approcimately 30ms. The accuarcy is bad, too. Although the driver of the sensor can be improved for better accuracy, this would alleviate the problem of the high measurement duration. Since we require a high update rate, this compromise is not acceptable.
VL53L1X
The results are summarized in the following:
Actual Distance (cm) | Measured Distance (cm) | Standard Deviation (cm) | Measurement Duration (ms) | min-mean (ms) | max-mean (ms) |
---|---|---|---|---|---|
60 | 53.32 | 0.47 | 18.51 | -0.32 | 0.68 |
50 | 48.12 | 0.33 | 18.56 | -0.12 | 0.88 |
40 | 39.02 | 0.14 | 18.45 | -0.02 | 0.98 |
30 | 29.11 | 0.31 | 18.42 | -0.11 | 0.89 |
20 | 20.35 | 0.48 | 18.55 | -0.35 | 0.65 |
15 | 15.20 | 0.40 | 18.54 | -0.20 | 0.80 |
10 | 10.60 | 0.49 | 18.58 | -0.60 | 0.40 |
5 | 4.11 | 0.31 | 18.43 | -0.11 | 0.89 |
Accuracy and measurement duration are better compared to VL53L0X, but worse than the HC-SR04.
Summary
We compare the results in the following plot:
The HC-SR04 has the lowest update rate. Besides, the measured distances show a linear behavior with the actual distance. Therefore, we choose this sensor. On the downside, interference mitigating technologies need to be investigated.
The code can be found in our GitHub reposity.