Monitoring Traffic Using Distance Sensors

According to the United Nations1, by 2050 the worldwide population will increase by up to 9.6 billion. Out of this amount, 6.3 billion will live in urban areas. As cities become more complex and so their resources management becomes more challenging, sustainable and smart approaches will be needed in order to keep cities efficient and habitable.

Transport optimization will be enabled by digital technology and the Internet of Things2, among which we can see smart street lamps or real-time traffic data as just two examples. Due to their unique characteristics of speed, weight, and size, TeraRanger sensors can play a key part in making smart cities a reality by contributing to traffic monitoring for example.

Experimental Setup

Experimental setup

Figure 1. Experimental setup

As shown in Figure 2.1, a TeraRanger One Type B sensor was attached to the end of a pole and suspended from a bridge over a highway at an approximate distance of 7.5 m from the ground.

In order to confirm the height of the bridge a laser pointer was utilized. The duration of the experiment was timed with a mobile application stopwatch. Distances were observed with a TeraRanger One for sequences of eleven vehicles passing through the field of view of the sensor.

For further analysis, the data value stream was recorded using a MacBook Air and Arduino software with a 115200 baud configuration. The experiments were performed in sunny conditions at an irradiance of 250 W/cm2, between 5:20 pm and 5:40 pm, and a temperature of 22.2 °C.


The raw data which was gathered from the TeraRanger One sensor was treated to analyze the evolution of vehicle height as a function of time. This consisted of removing outliers and setting the distance value to 7.5 m when the sensor reached its detection limit, as the limit and the height of the bridge were very similar in these particular testing conditions (tarmac).

So, the height ℎ measured from the ground was acquired by utilizing the distance d gathered by the TeraRanger One sensor:


To deliver optimal results depending on the external conditions, data acquisition frequency of TeraRanger One Type B sensors self-adjusts, so the average reading frequency can be approximated by utilizing the elapsed time of the experiment and the number of data values streamed. This information has been used to create the graphs in section 4.


Using the TeraRanger One sensor, two sequences were recorded. For each experiment the height measured from the ground plus some examples of the corresponding vehicle are shown in Figures 4.1 and 4.2. There is a clear correspondence between the peaks in the graphs and the passing through of each vehicle.

Two very sharp peaks which cannot be assessed as noise do not find a correspondence with any vehicle, and should be associated with the detection limit of the sensor. The average TeraRanger One sensor data acquisition frequency ƒ, the average vehicle height and the average vehicle frequency across the bridge ƒ vehicle, are shown in table 4.1.

Table 4.1​: Summary of average values obtained during both experimental sequences.

. .
ƒ TeraRanger One (Hz) 10.4 ±1.6
ℎ vehicle (m) 1.58 ± 0.23
ƒ vehicle (vehicles / min) 21

Height from the ground as a function of time for sequence #1. A total of eleven vehicles were recorded.

​Figure 2. ​ Height from the ground as a function of time for sequence #1. A total of eleven vehicles were recorded.

Height from the ground as a function of time for sequence #2. A total of eleven vehicles were recorded.

Figure 3. Height from the ground as a function of time for sequence #2. A total of eleven vehicles were recorded.

Applications in Traffic Monitoring

TeraRanger One sensors can be employed in applications aimed at monitoring traffic flow at traffic lights, bridges, or intersections, by assessing the amount of detected vehicles during a given period. The potential to stream the data would supply real-time traffic data and height information of vehicle size statistics which could influence road maintenance planning.

In addition, two aligned TeraRanger sensors which are placed a known distance apart could be utilized for speed estimation, as their signals could be synchronized a known amount by utilizing a TeraRanger Hub. The time difference between detection could be employed to determine the speed of the vehicle using this simple method.


Placed on a bridge at 7.5 m height from the ground, a TeraRanger One was able to clearly detect individual vehicles traveling on a highway (legal speed limit of 110 kph) underneath. This validates the utilization of TeraRanger One sensors in traffic monitoring applications.



This information has been sourced, reviewed and adapted from materials provided by Terabee.

For more information on this source, please visit Terabee.


Please use one of the following formats to cite this article in your essay, paper or report:

  • APA

    Terabee. (2019, October 15). Monitoring Traffic Using Distance Sensors. AZoSensors. Retrieved on December 09, 2022 from

  • MLA

    Terabee. "Monitoring Traffic Using Distance Sensors". AZoSensors. 09 December 2022. <>.

  • Chicago

    Terabee. "Monitoring Traffic Using Distance Sensors". AZoSensors. (accessed December 09, 2022).

  • Harvard

    Terabee. 2019. Monitoring Traffic Using Distance Sensors. AZoSensors, viewed 09 December 2022,

Ask A Question

Do you have a question you'd like to ask regarding this article?

Leave your feedback
Your comment type