Autonomous Wireless Sensor System for Emergency Monitoring Roads with Low Communication Coverage

: Rural areas often face communication challenges due to limited mobile coverage on remote roads, posing signiﬁcant difﬁculties in reporting emergencies and accidents. This study presented an autonomous vehicle tracking system using low-cost radar sensors to detect possible emergencies in the sections of roads with low cell coverage. The radar sensor system could determine the number of vehicles that passed through the nodes and classify them based on the vehicle type. Each node within the system is equipped with ten radars, a processor unit, and a radio transmitter to communicate with the network in real-time, achieving a rapid response time of just 0.2 s. To ensure seamless connectivity, two distinct wireless communication networks are employed, one for the connection between the towers in the same node and the other for the connection between nodes and a center with cellular coverage. The results of this study can be useful in conveying emergency messages, as well as trafﬁc management.


Introduction
Despite the development of mobile communication and the efforts made by stakeholders to enable full coverage in rural areas and on main roads in particular, wide coverage is still impossible in many cases, owing to the geographical landscape.Reporting accidents on such roads with low communication coverage is impossible in many cases, as a fast response time to emergency situations and traffic accidents is required.This is a major problem, particularly in cases involving the loss of human lives [1,2].According to reference [3], improving response efficiency plays a central role in the emergency management of traffic accidents through the optimization of rescue information.
Currently, researchers are accelerating research in this area, as is the case with the authors of [4,5].One of the authors proposes the implementation of the Internet of Things (IoT) in the QARS (Quick Accident Response System) that helps to detect an accident using a multifunctional accelerometer and ultrasonic/proximity sensors, while the other author proposes an emergency alert system based on computer vision which is built using object tracking techniques to detect the occurrence of accidents.
Also worth noting is the existence of the hybrid wireless network, reviewed in [5], which is installed at the roadside to detect passing vehicles and recognize their classes, which is another measure sketched for real-time data collection.The vehicle detection and classification tasks are performed by analyzing the strength of a radio signal received from Bluetooth beacons installed in the mobile devices, with an error rate of 4.36 and low power consumption for the use of machine learning algorithms.The virtues of the system are its cost-effectiveness, ease of installation and the ability to be used for a long time without an external power supply external power supply.An energy-aware algorithm is proposed, which utilizes a scheduling mechanism to manage wireless nodes that mechanism to manage wireless nodes that can act as BLE beacons (in low energy mode) or receivers low energy mode) or receivers.
Other techniques that are currently used to detect accidents are wireless sensor networks.Sherif with others [6] have published an article creating a Real Time Traffic Accident Detection System (RTTADS) using Wireless Sensor Network (WSN) and Radio-Frequency Identification (RFID) technologies for motorway accidents.
Currently, road accidents are detected using the well-known vehicular ad-hoc network known as VANET, which comprises groups of moving vehicles connected via a wireless network [7,8].This network must provide each vehicle with a device.These devices connect to other vehicles or a base station on the road.These connected devices send an alarm to the base station in the case of an emergency.However, not all vehicles have this device.Additionally, a large network infrastructure or an infrastructure with long-term-evolution mobile coverage is required, as described in [9].
Similarly, there are methods aimed at simplifying the infrastructure, as demonstrated in the case of vehicular fog, as explained in [10].This involves inter-vehicular communication in which vehicle communication monitoring occurs within assisted platoons (VCF).These platoons, in turn, distribute multiple tasks among random vehicles that enter and exit the detection area, which is originally intended for a single unit.The main challenge associated with this method is the requirement for a constant presence of vehicles, a hurdle that needs to be addressed by those employing this technology.On the other hand, DQN technology, elaborated upon in [11], relies on vehicle-to-infrastructure (V2I) communications utilizing a minimum contention window (MCW).The MCW serves as a time window during which a node synchronizes with the vehicles through Wi-Fi 802.11.This approach is further enhanced by the possibility of optimizing the MCW through the learning and prediction algorithm provided within the same study, effectively addressing the potential gaps in vehicle connectivity.
Other techniques can be used with other types of sensors, such as radar.Radar sensors can detect vehicles [12] and report a possible emergency situation.Light detection and ranging (LiDAR) sensors are also used for vehicle detection.This is a remote sensing method that uses light in the form of a pulsed laser beam to detect objects or special vehicles.Previous studies [13] have employed LiDAR technology and a video camera for accident reports.
In the case of an emergency, accurate knowledge of the exact position is required, as well as the environmental conditions, such as rain and snow, as proposed in [14,15].Many lives could be saved if the emergency services received accident information in time and could act quickly and treat the accident victims as soon as possible.
This study proposes a vehicle detection system that uses low-cost radars configured in a wireless network that includes environmental sensors.The ultimate goal of the system is to independently detect accidents in areas with low communication coverage, such as that shown in Figure 1, which we have used for a case study.This area is located more than 4000 m above sea level.
In the proposed system, the vehicles do not require a dedicated device for reporting accidents.The network monitors the passage of vehicles through each node.The nodes are connected with a linear multi-hop network.If a particular vehicle does not pass through all the nodes, it is interpreted as a problem and the system will send an alarm along with the environmental data.This alarm is sent as a message to the police or the nearby Red Cross facility, where mobile coverage is available.In the proposed system, the vehicles do not require a dedicated device for reportin accidents.The network monitors the passage of vehicles through each node.The node are connected with a linear multi-hop network.If a particular vehicle does not pas through all the nodes, it is interpreted as a problem and the system will send an alarm along with the environmental data.This alarm is sent as a message to the police or th nearby Red Cross facility, where mobile coverage is available.
This paper is organized as follows.Section 2 outlines the methods and materials used and describes the detection algorithm.Section 3 presents the results and analysis.Finally Section 4 provides the conclusions.

Wireless Sensor Nodes
The wireless sensor nodes were employed on the ESP32-WROOM-32D microcontrol lers, from Espressif Systems company and buy in Peru, which are powerful devices wit generic Wi-Fi and Bluetooth modules targeting various applications.The ESP32 WROOM-32D is a low-power microcontroller designed to be scalable and adaptive.Th ESP32-WROOM-32D has a rich set of peripherals, such as capacitive touch sensors and a SD card interface, along with Ethernet, high-speed SPI, UART, I2S, and I2C ports.
The MH-ET LIVE HB100 X 10.525 GHz and the RCWL-0516 Doppler radar micro wave motion sensors, from TZT company and buy in Peru, were used in this study.Th MH-ET LIVE HB100 X 10.525 GHz is a moving object microwave detector designed usin the Doppler radar principle.This sensor detects moving objects by detecting the micro waves reflected from the object.Further, this sensor is not influenced by the ambient tem perature, has a long detection range and high sensitivity, and is widely used in vehicl speed sensing.
The RCWL-0516 is a Doppler radar microwave motion sensor module used to detec moving objects.This sensor has a high sensitivity, induction distance, and reliability along with a large induction angle.The RCWL-0516 is widely used in all forms of huma body induction lighting and burglar alarms.
The configuration of a detection node, which is built with two ESP32-WROOM-32D microcontrollers and equipped with the MH-ET LIVE HB100 X and the RCWL-0516 ra dars, is shown in Figure 2. Similarly, a temperature and humidity sensor is connected t provide information on the weather conditions at certain parts of the road.The 802.11 (Wi Fi) protocol was used for intranodal communication, whereas the DigiMesh protocol wa used for internode communication.This paper is organized as follows.Section 2 outlines the methods and materials used and describes the detection algorithm.Section 3 presents the results and analysis.Finally, Section 4 provides the conclusions.

Wireless Sensor Nodes
The wireless sensor nodes were employed on the ESP32-WROOM-32D microcontrollers, from Espressif Systems company and buy in Peru, which are powerful devices with generic Wi-Fi and Bluetooth modules targeting various applications.The ESP32-WROOM-32D is a low-power microcontroller designed to be scalable and adaptive.The ESP32-WROOM-32D has a rich set of peripherals, such as capacitive touch sensors and an SD card interface, along with Ethernet, high-speed SPI, UART, I2S, and I2C ports.
The MH-ET LIVE HB100 X 10.525 GHz and the RCWL-0516 Doppler radar microwave motion sensors, from TZT company and buy in Peru, were used in this study.The MH-ET LIVE HB100 X 10.525 GHz is a moving object microwave detector designed using the Doppler radar principle.This sensor detects moving objects by detecting the microwaves reflected from the object.Further, this sensor is not influenced by the ambient temperature, has a long detection range and high sensitivity, and is widely used in vehicle speed sensing.
The RCWL-0516 is a Doppler radar microwave motion sensor module used to detect moving objects.This sensor has a high sensitivity, induction distance, and reliability, along with a large induction angle.The RCWL-0516 is widely used in all forms of human body induction lighting and burglar alarms.
The configuration of a detection node, which is built with two ESP32-WROOM-32D microcontrollers and equipped with the MH-ET LIVE HB100 X and the RCWL-0516 radars, is shown in Figure 2. Similarly, a temperature and humidity sensor is connected to provide information on the weather conditions at certain parts of the road.The 802.11 (Wi-Fi) protocol was used for intranodal communication, whereas the DigiMesh protocol was used for internode communication.
The prototype for each node is presented in the upper part of Figure 3, which depicts modules mounted with five radars on each tower.These radars have a defined orientation.The back part of the prototype is shown in the lower part of Figure 3.The prototype for each node is presented in the upper part of Figure 3, which depicts modules mounted with five radars on each tower.These radars have a defined orientation.The back part of the prototype is shown in the lower part of Figure 3.Each detection tower has five sensors.The sensors are distributed to provide redundancy in the area of the road of primary concern.Sensors with redundancy are those that accompany the main sensor (umbrella sensor), which is identified by the number 5 in Figure 3. Sensors 1 to 4 are redundant sensors and sensors 1 and 3 are oriented in the opposite direction to sensors 2 and 4.These redundant sensors detect the vehicles that pass through the detection tower before the umbrella sensor does.The green rectangles in Figure 4 represent the detection area of the redundant sensors.
Additionally, the detection area of the umbrella sensor is represented by a yellow circle.Its main function is to validate the presence of a vehicle, relying on the information from the redundant sensors.The prototype for each node is presented in the upper part of Figure 3, which depicts modules mounted with five radars on each tower.These radars have a defined orientation.The back part of the prototype is shown in the lower part of Figure 3.Each detection tower has five sensors.The sensors are distributed to provide redundancy in the area of the road of primary concern.Sensors with redundancy are those that accompany the main sensor (umbrella sensor), which is identified by the number 5 in Figure 3. Sensors 1 to 4 are redundant sensors and sensors 1 and 3 are oriented in the opposite direction to sensors 2 and 4.These redundant sensors detect the vehicles that pass through the detection tower before the umbrella sensor does.The green rectangles in Figure 4 represent the detection area of the redundant sensors.
Additionally, the detection area of the umbrella sensor is represented by a yellow circle.Its main function is to validate the presence of a vehicle, relying on the information from the redundant sensors.Each detection tower has five sensors.The sensors are distributed to provide redundancy in the area of the road of primary concern.Sensors with redundancy are those that accompany the main sensor (umbrella sensor), which is identified by the number 5 in Figure 3. Sensors 1 to 4 are redundant sensors and sensors 1 and 3 are oriented in the opposite direction to sensors 2 and 4.These redundant sensors detect the vehicles that pass through the detection tower before the umbrella sensor does.The green rectangles in Figure 4 represent the detection area of the redundant sensors.The prototype for each node is presented in the upper part of Figure 3, which depicts modules mounted with five radars on each tower.These radars have a defined orientation.The back part of the prototype is shown in the lower part of Figure 3.Each detection tower has five sensors.The sensors are distributed to provide redundancy in the area of the road of primary concern.Sensors with redundancy are those that accompany the main sensor (umbrella sensor), which is identified by the number 5 in Figure 3. Sensors 1 to 4 are redundant sensors and sensors 1 and 3 are oriented in the opposite direction to sensors 2 and 4.These redundant sensors detect the vehicles that pass through the detection tower before the umbrella sensor does.The green rectangles in Figure 4 represent the detection area of the redundant sensors.
Additionally, the detection area of the umbrella sensor is represented by a yellow circle.Its main function is to validate the presence of a vehicle, relying on the information from the redundant sensors.Additionally, the detection area of the umbrella sensor is represented by a yellow circle.Its main function is to validate the presence of a vehicle, relying on the information from the redundant sensors.
The distribution of redundant sensors aids in detecting the direction of a vehicle when it travels through a lane.To achieve this, the following logic is followed: Suppose the vehicle travels from right to left.In that case, the first sensors to detect the vehicle are those that cover detection area number 1.The main sensor that covers area 2 will be activated, followed by those that cover area 3. Suppose the vehicle travels in the opposite direction.In that case, the activation order of the sensors will be reversed.The graphical representation of these scenarios is shown in Figure 4.
The premise here is that increasing the number of nodes results in a higher resolution of situations within the system's deployment area.It is considered optimal to maintain a maximum distance of 2 km between the nodes, as this aligns with the road's maximum speed limit of 80 km/h.Under these conditions, a vehicle traveling the speed limit will traverse a 2 km interval approximately every 1.5 min.This timeframe is deemed suitable for traffic analysis, providing up to a 3 min margin for the algorithm to detect a potential emergency under the described conditions.Furthermore, it is essential to note that the intra-node detection towers are positioned at a distance of 1.30 m from the road's edge, creating three distinct detection zones.
The total cost of the developed prototype is listed in Table 1.There are three nodes for the 30 km section of highway in the chosen scenario.The total cost is USD 726.30 which stands in stark contrast to the expenses associated with alternative technologies and solutions.Comparing our solution to VANET [8,16], which involves additional charges for implementing On-Board Unit (OBU) modules in each vehicle, highlights our approach as a more cost-effective choice.Similarly, in contrast to Lidar technology [6], which is frequently augmented with camera tracking systems and wireless sensor networks that result in higher overall costs, our approach remains significantly more economical.As previously described, the system consists of two towers, one located on each side of the road, forming an operational node.Each tower is equipped with 4 RCWL-0516 sensors and a MH-ET LIVE HB100 radar.This distribution ensures that there are 2 sensors in areas 1 and 3, which record the entry and exit of the vehicles in conjunction with the main radar.This configuration increases the reliability of the readings by eliminating false positives or negatives caused by overtaking, or false positives detected by any of these sensors.To classify a vehicle as a valid detection, least 3 of the 5 sensors must register its presence.This is achieved by strategically placing sensors in areas 1 and 3, allowing the system to determine if the vehicle is moving in the correct direction within its lane.The use of these numbered areas (1, 3) helps the system make this determination.An algorithm provides a time window that contributes to the robustness of the system.In cases where a vehicle is not correctly detected by one tower within a node, the system offers the possibility that an adjacent node can detect it without the need to issue an alert.
The proposed linear node distribution topology is shown in Figure 5.The nodes are represented by blue circles; the arrows indicate the wireless connection that exists between the nodes via the DIGIMESH protocol.The readings of each node are fed to the neighboring node.This process continues until it reaches the zink node (the coordinator of the entire network).
Electronics 2023, 12, x FOR PEER REVIEW 6 of 14 As previously described, the system consists of two towers, one located on each side of the road, forming an operational node.Each tower is equipped with 4 RCWL-0516 sensors and a MH-ET LIVE HB100 radar.This distribution ensures that there are 2 sensors in areas 1 and 3, which record the entry and exit of the vehicles in conjunction with the main radar.This configuration increases the reliability of the readings by eliminating false positives or negatives caused by overtaking, or false positives detected by any of these sensors.To classify a vehicle as a valid detection, at least 3 of the 5 sensors must register its presence.This is achieved by strategically placing sensors in areas 1 and 3, allowing the system to determine if the vehicle is moving in the correct direction within its lane.The use of these numbered areas (1, 3) helps the system make this determination.An algorithm provides a time window that contributes to the robustness of the system.In cases where a vehicle is not correctly detected by one tower within a node, the system offers the possibility that an adjacent node can detect it without the need to issue an alert.
The proposed linear node distribution topology is shown in Figure 5.The nodes are represented by blue circles; the arrows indicate the wireless connection that exists between the nodes via the DIGIMESH protocol.The readings of each node are fed to the neighboring node.This process continues until it reaches the zink node (the coordinator of the entire network).Communication between the nodes requires radio frequency technology that can cover long distances.Additionally, the current and voltage limits are 300 mA and 5 V, respectively.Consequently, the DIGI XBEE Pro S3B modules and Wi-Fi were used.
In our project, we made the deliberate choice of prioritizing 802.11 communications over C-V2X, an inter-vehicular detection technology reliant on cellular communication infrastructure.Our system features short-range radio links, covering distances of up to 2000 m, with a consistent line of sight or the option of utilizing third-party repeaters to ensure continuous network communication.This design is specifically tailored for road environments with limited communication coverage, resulting in minimal electromagnetic interference typically associated with unlicensed frequency bands.Leveraging the 802.11protocol and employing the IP protocol for intra-node communication, we have implemented an acknowledgment of receipt (ACK) mechanism, a feature also found in Xbee long-range radio devices utilizing FHSS spread spectrum technology.

Detection Algorithm
The processing units of the towers are programmable and function with a real-time operating system, which allows for the multi-processing of tasks.In this study, C++ was adopted as the programming language in the tower.
The detection algorithm is based on the flowchart in Figure 6, demonstrating that an infinite loop exists.This means that as long as no vehicle is detected, information will continue to be requested from the sensors.Thus, when the sensors detect a vehicle, the context in which the detection has been made is determined directly.This is performed by counting the number of pulses produced by the vehicle and the direction in which the vehicle is traveling.Communication between the nodes requires radio frequency technology that can cover long distances.Additionally, the current and voltage limits are 300 mA and 5 V, respectively.Consequently, the DIGI XBEE Pro S3B modules and Wi-Fi were used.
In our project, we made the deliberate choice of prioritizing 802.11 communications over C-V2X, an inter-vehicular detection technology reliant on cellular communication infrastructure.Our system features short-range radio links, covering distances of up to 2000 m, with a consistent line of sight or the option of utilizing third-party repeaters to ensure continuous network communication.This design is specifically tailored for road environments with limited communication coverage, resulting in minimal electromagnetic interference typically associated with unlicensed frequency bands.Leveraging the 802.11protocol and employing the IP protocol for intra-node communication, we have implemented an acknowledgment of receipt (ACK) mechanism, a feature also found in Xbee long-range radio devices utilizing FHSS spread spectrum technology.

Detection Algorithm
The processing units of the towers are programmable and function with a real-time operating system, which allows for the multi-processing of tasks.In this study, C++ was adopted as the programming language in the tower.
The detection algorithm is based on the flowchart in Figure 6, demonstrating that an infinite loop exists.This means that as long as no vehicle is detected, information will continue to be requested from the sensors.Thus, when the sensors detect a vehicle, the context in which the detection has been made is determined directly.This is performed by counting the number of pulses produced by the vehicle and the direction in which the vehicle is traveling.
Furthermore, vehicles generally travel in two directions: from left to right and from right to left.These directions of motion are related to the direction of the lane in which the vehicles travel.

Frame Format
All the detection towers communicate using the frame format shown in Figure 7, such that when a tower detects a vehicle, it sends a string of values separated by commas.The meaning of each value is explained as follows.ID: Identification of the tower.Each tower has an identification number, which enables us to determine with certainty the area or section of the road from which the readings come from.This provides a more precise location along the road.The ID value depends on the number of installed nodes and the preferred numbering style chosen by the user for identification.
Pulses: This is the number of pulses emitted per execution cycle.It is the number of pulses generated for each cycle that executes the main sensor code.These pulses serve to identify the type or class of vehicle being detected.The possible values range from 0 to 65,535.
Direction: This denotes the direction in which the vehicle has traveled.The typical values are 1 and 0. The value of the field is 1 when the vehicle is detected in the opposite direction.
REF: In the case of precipitation, this field marks the intensity with values from 0 to 4092.Temperature: Indicates the ambient temperature at the node.Humidity: Indicates the percentage of humidity (% RH).
Rain ID: The value of this field changes from 0 to 1 in the event of rainfall.When one or several intermediate nodes along the highway do not detect a vehicle, the scenario can be presumed to be an emergency.Furthermore, vehicles generally travel in two directions: from left to right and from right to left.These directions of motion are related to the direction of the lane in which the vehicles travel.

Frame Format
All the detection towers communicate using the frame format shown in Figure 7, such that when a tower detects a vehicle, it sends a string of values separated by commas.The meaning of each value is explained as follows.
Electronics 2023, 12, x FOR PEER REVIEW 7 of 14 Furthermore, vehicles generally travel in two directions: from left to right and from right to left.These directions of motion are related to the direction of the lane in which the vehicles travel.

Frame Format
All the detection towers communicate using the frame format shown in Figure 7, such that when a tower detects a vehicle, it sends a string of values separated by commas.The meaning of each value is explained as follows.ID: Identification of the tower.Each tower has an identification number, which enables us to determine with certainty the area or section of the road from which the readings come from.This provides a more precise location along the road.The ID value depends on the number of installed nodes and the preferred numbering style chosen by the user for identification.
Pulses: This is the number of pulses emitted per execution cycle.It is the number of pulses generated for each cycle that executes the main sensor code.These pulses serve to identify the type or class of vehicle being detected.The possible values range from 0 to 65,535.
Direction: This denotes the direction in which the vehicle has traveled.The typical values are 1 and 0. The value of the field is 1 when the vehicle is detected in the opposite direction.
REF: In the case of precipitation, this field marks the intensity with values from 0 to 4092.Temperature: Indicates the ambient temperature at the node.Humidity: Indicates the percentage of humidity (% RH).
Rain ID: The value of this field changes from 0 to 1 in the event of rainfall.When one or several intermediate nodes along the highway do not detect a vehicle, the scenario can be presumed to be an emergency.ID: Identification of the tower.Each tower has an identification number, which enables us to determine with certainty the area or section of the road from which the readings come from.This provides a more precise location along the road.The ID value depends on the number of installed nodes and the preferred numbering style chosen by the user for identification.
Pulses: This is the number of pulses emitted per execution cycle.It is the number of pulses generated for each cycle that executes the main sensor code.These pulses serve to identify the type or class of vehicle being detected.The possible values range from 0 to 65,535.
Direction: This denotes the direction in which the vehicle has traveled.The typical values are 1 and 0. The value of the field is 1 when the vehicle is detected in the opposite direction.
REF: In the case of precipitation, this field marks the intensity with values from 0 to 4092.
Temperature: Indicates the ambient temperature at the node.Humidity: Indicates the percentage of humidity (% RH).
Rain ID: The value of this field changes from 0 to 1 in the event of rainfall.When one or several intermediate nodes along the highway do not detect a vehicle, the scenario can be presumed to be an emergency.
In the event of a false detection by the proposed system, a mechanism is in place to prevent the unnecessary dispatch of a rescue team.The emergency algorithm continually checks the time recorded by each vehicle upon entering the network at 10-s intervals.If a vehicle is not detected within the expected time, the algorithm gradually extends the waiting period, incrementally reaching up to 100% of the average time recorded by adjacent towers.This adjustment is applied individually to each vehicle, with their respective time records considered.This analysis is performed for every vehicle within the sensor network, taking into account factors such as overtaking detection.
The collection and transmission of vehicle data raise important concerns related to privacy and security.Within the framework of transmitting the node readings through the multi-hop network to the processing unit, the long-range radio devices equipped on the nodes offer the capability to encrypt traffic using AES-128 encryption.Additionally, for intranodal communication, while utilizing the 802.11protocol in conjunction with the ESP32 Microcontroller, we have incorporated the option to include encryption keys to safeguard personal data and enhance overall system security.

Scenario
The chosen scenario employed a 30 km section of the high Andean highway from Arequipa to Puno, between 140 and 170 km.This section satisfies the necessary characteristics to represent all possible weather scenarios found on the high Andean highway.The section is 4440 m above sea level, making it the highest section of the entire Arequipa-Puno highway.Owing to its geography, it does not have cellular coverage.The profile of the section of the road that enables a signal from a nearby cellular base station to reach this section is shown in Figure 8.The cellular coverage map of the towns surrounding the road is shown in Figure 9.The white dots represent the towns without coverage, whereas the yellow and orange dots represent the towns with coverage.The chosen area is framed by a red rectangle.
Electronics 2023, 12, x FOR PEER REVIEW 8 of 14 In the event of a false detection by the proposed system, a mechanism is in place to prevent the unnecessary dispatch of a rescue team.The emergency algorithm continually checks the time recorded by each vehicle upon entering the network at 10-s intervals.If a vehicle is not detected within the expected time, the algorithm gradually extends the waiting period, incrementally reaching up to 100% of the average time recorded by adjacent towers.This adjustment is applied individually to each vehicle, with their respective time records considered.This analysis is performed for every vehicle within the sensor network, taking into account factors such as overtaking detection.
The collection and transmission of vehicle data raise important concerns related to privacy and security.Within the framework of transmitting the node readings through the multi-hop network to the processing unit, the long-range radio devices equipped on the nodes offer the capability to encrypt traffic using AES-128 encryption.Additionally, for intranodal communication, while utilizing the 802.11protocol in conjunction with the ESP32 Microcontroller, we have incorporated the option to include encryption keys to safeguard personal data and enhance overall system security.

Scenario
The chosen scenario employed a 30 km section of the high Andean highway from Arequipa to Puno, between 140 and 170 km.This section satisfies the necessary characteristics to represent all possible weather scenarios found on the high Andean highway.The section is 4440 m above sea level, making it the highest section of the entire Arequipa-Puno highway.Owing to its geography, it does not have cellular coverage.The profile of the section of the road that enables a signal from a nearby cellular base station to reach this section is shown in Figure 8.The cellular coverage map of the towns surrounding the road is shown in Figure 9.The white dots represent the towns without coverage, whereas the yellow and orange dots represent the towns with coverage.The chosen area is framed by a red rectangle.

Testing
Initially, calibration was performed in a scenario in which the speed of the reference vehicle, the number of times the vehicle passed through the selected section, and the manner in which the vehicle moved through the areas where the detection towers interfered were controlled.
Calibrating the detection system involved a series of iterative tests to ensure accurate

Testing
Initially, calibration was performed in a scenario in which the speed of the reference vehicle, the number of times the vehicle passed through the selected section, and the manner in which the vehicle moved through the areas where the detection towers interfered were controlled.
Calibrating the detection system involved a series of iterative tests to ensure accurate lane tracking within the system's deployment area.These tests utilized vehicles to assess the detection range of the five sensors, adhering to the specified track parameters.Whenever a vehicle was detected outside of its designated zone on the lane, the angle of depression of the detectors was adjusted downward.Conversely, it was increased until the desired measurements were achieved.This calibration process was replicated across all towers.Despite each tower's unique monitoring scenarios, it was observed that their operation exhibited consistent performance.
Figure 10 shows the calibration of the coverage of the sensors of both towers and the real scenario, comprising a track that has the two towers where the calibration tests were performed.

Testing
Initially, calibration was performed in a scenario in which the speed of the reference vehicle, the number of times the vehicle passed through the selected section, and the manner in which the vehicle moved through the areas where the detection towers interfered were controlled.
Calibrating the detection system involved a series of iterative tests to ensure accurate lane tracking within the system's deployment area.These tests utilized vehicles to assess the detection range of the five sensors, adhering to the specified track parameters.Whenever a vehicle was detected outside of its designated zone on the lane, the angle of depression of the detectors was adjusted downward.Conversely, it was increased until the desired measurements were achieved.This calibration process was replicated across all towers.Despite each tower's unique monitoring scenarios, it was observed that their operation exhibited consistent performance.
Figure 10 shows the calibration of the coverage of the sensors of both towers and the real scenario, comprising a track that has the two towers where the calibration tests were performed.Subsequently, tests were performed on roads with heavy traffic, whose average speed was 55 km/h.The results are shown in Figure 11.The sensors (radars) sent pulses, and based on the number of pulses, an analysis was performed to determine the speed and the vehicle class.This class was determined by the length of the vehicle (a car, van, truck, or bus).The results of the analysis are listed in Table 2.The sensors (radars) sent pulses, and based on the number of pulses, an analysis was performed to determine the speed and the vehicle class.This class was determined by the length of the vehicle (a car, van, truck, or bus).The results of the analysis are listed in Table 2.

Number of Pulses Generated Information They Represent
Pulses < to 10 units 30 km/h < Speed < 60 km/h Pulses < to 10 units Length vehicles < to 10 m Pulses < to 10 units > 20 units 25 km/h < Speed > 40 km/h Pulses < to 10 units > 20 units Length vehicles > to 10 m Pulses < to 10 units > 20 units Length vehicles < 10 m, and speed less than 30 km/h Pulses < to 10 units Length vehicles > 10 m, and speed less than 30 km/h Out of the 373 vehicles analyzed, five readings corresponded to heavy or slow vehicles.The vehicles with pulse readings that exceeded 13 units were categorized as slow or oversized.It was observed that the majority of vehicles traveling on this road were smaller vehicles, or those exceeding 35 km/h in speed.The procedure for calculating a vehicle's speed was as follows: Two towers were placed 100 m apart on the highway.With the assistance of two collaborators who synchronized their watches, each collaborator positioned themselves at one of the towers to record the time of each vehicle passing through.After manually registering the vehicles and completing the tests, we proceeded to calculate the approximate speed of each vehicle.Ultimately, the readings obtained from the towers were compared to the manually recorded readings and yielded consistent results.

Discussion
From the analysis of the results obtained, the following could be identified: The speed at which a vehicle moves is directly related to the number of pulses.Moreover, the number of pulses generated is related to the volume or refractive area of the vehicle, as shown in Figure 12.Similarly, the proportion of traffic in each lane at certain hours could be determined in real-time, as shown in Figure 13.This enhances future applications of our system with vehicular traffic management objectives.Similarly, the proportion of traffic in each lane at certain hours could be determined in real-time, as shown in Figure 13.This enhances future applications of our system with vehicular traffic management objectives.Similarly, the proportion of traffic in each lane at certain hours could be determined in real-time, as shown in Figure 13.This enhances future applications of our system with vehicular traffic management objectives.Scenarios of overtaking were also identified, wherein a vehicle passed through the other lane that was supposed to be for traffic from the opposite direction.The proportion of registered traffic in both lanes is depicted graphically in Figure 14.The vehicles staying in their respective lanes are marked in blue, while those that have overtaken are highlighted in orange.To explain this case, it is necessary to remember that one of the towers within a node has the capability to communicate with the entire network of nodes, while the other tower within the same node handles local communication.Therefore, in the event of an overtaking incident, the tower that detects the vehicle traveling in the opposite direction is responsible for transmitting its detection to the master tower.The master tower then evaluates the arrival time of the reading from the slave tower in comparison to its own reading.If the time difference is less than or equal to 450 ms, the master tower will determine that an overtaking event has occurred.Consequently, it proceeds to report both readings as belonging to the same direction.As a result, the vehicle engaged in overtaking is not considered within the counters of the lane it is overtaking, but rather it is included in the counters for the lane in which it is traveling normally.Scenarios of overtaking were also identified, wherein a vehicle passed through the other lane that was supposed to be for traffic from the opposite direction.The proportion of registered traffic in both lanes is depicted graphically in Figure 14.The vehicles staying in their respective lanes are marked in blue, while those that have overtaken are highlighted in orange.To explain this case, it is necessary to remember that one of the towers within a node has the capability to communicate with the entire network of nodes, while the other tower within the same node handles local communication.Therefore, in the event of an overtaking incident, the tower that detects the vehicle traveling in the opposite direction is responsible for transmitting its detection to the master tower.The master tower then evaluates the arrival time of the reading from the slave tower in comparison to its own reading.If the time difference is less than or equal to 450 ms, the master tower will determine that an overtaking event has occurred.Consequently, it proceeds to report both readings as belonging to the same direction.As a result, the vehicle engaged in overtaking is not considered within the counters of the lane it is overtaking, but rather it is included in the counters for the lane in which it is traveling normally.The information regarding the use of AM 2330 temperature and humidity sensors, in conjunction with the MH-RD rain sensor, holds paramount importance for the personnel responsible for monitoring roads, particularly during emergency alert situations.These sensors play a vital role in assessing and responding to adverse weather conditions and their impact on road safety.The AM 2330 sensors, of WRDXC in CN buy from Peru provide real-time data on temperature and humidity levels, which is indispensable for predicting weather-related hazards such as ice formation on road surfaces or foggy conditions.Additionally, the MH-RD rain sensor supplies data on precipitation levels and rainfall intensity.Monitoring this data is essential for detecting heavy rainfall or storms that can lead to flooding, reduced visibility, and slippery road conditions.
In Figure 15, the blue dotted lines indicate the temperature reports sent by the nodes.The variations are negligible since only three nodes were tested in a particular geograph- The information regarding the use of AM 2330 temperature and humidity sensors, in conjunction with the MH-RD rain sensor, holds paramount importance for the personnel responsible for monitoring roads, particularly during emergency alert situations.These sensors play a vital role in assessing and responding to adverse weather conditions and their impact on road safety.The AM 2330 sensors, of WRDXC in CN buy from Peru provide real-time data on temperature and humidity levels, which is indispensable for predicting weather-related hazards such as ice formation on road surfaces or foggy conditions.Additionally, the MH-RD rain sensor supplies data on precipitation levels and rainfall intensity.
Monitoring this data is essential for detecting heavy rainfall or storms that can lead to flooding, reduced visibility, and slippery road conditions.
In Figure 15, the blue dotted lines indicate the temperature reports sent by the nodes.The variations are negligible since only three nodes were tested in a particular geographical region.The humidity readings are denoted in orange.Because the climate in which the tests were performed was sunny and dry, no considerable variations for further analyses were observed.
conjunction with the MH-RD rain sensor, holds paramount importance for the personnel responsible for monitoring roads, particularly during emergency alert situations.These sensors play a vital role in assessing and responding to adverse weather conditions and their impact on road safety.The AM 2330 sensors, of WRDXC in CN buy from Peru provide real-time data on temperature and humidity levels, which is indispensable for predicting weather-related hazards such as ice formation on road surfaces or foggy conditions.Additionally, the MH-RD rain sensor supplies data on precipitation levels and rainfall intensity.Monitoring this data is essential for detecting heavy rainfall or storms that can lead to flooding, reduced visibility, and slippery road conditions.
In Figure 15, the blue dotted lines indicate the temperature reports sent by the nodes.The variations are negligible since only three nodes were tested in a particular geographical region.The humidity readings are denoted in orange.Because the climate in which the tests were performed was sunny and dry, no considerable variations for further analyses were observed.

Conclusions
This study presented an autonomous vehicle tracking system using low-cost radars to detect possible emergencies in the sections of roads with low cell coverage.We used an intelligent computational algorithm that could determine the number of vehicles that passed through the nodes and identify the vehicle class; that is, whether the vehicle was a car, van, truck, or bus.The system could also identify the overtaking of vehicles that passed through the coverage area of the nodes.For interconnection, two wireless communications networks were used: one for the connection between the towers in the same node

Conclusions
This study presented an autonomous vehicle tracking system using low-cost radars to detect possible emergencies in the sections of roads with low cell coverage.We used an intelligent computational algorithm that could determine the number of vehicles that passed through the nodes and identify the vehicle class; that is, whether the vehicle was a car, van, truck, or bus.The system could also identify the overtaking of vehicles that passed through the coverage area of the nodes.For interconnection, two wireless communications networks were used: one for the connection between the towers in the same node and the other for the connection between nodes and a center with cellular coverage.The center with cellular coverage sent messages in the event of a possible emergency so that the competent authorities could act accordingly.

3 of 13 1 Figure 1 .
Figure 1.Photograph of an area with low mobile communication coverage.

Figure 1 .
Figure 1.Photograph of an area with low mobile communication coverage.

Figure 2 .
Figure 2. Wireless sensor node located on the highway.

Figure 4 .
Figure 4. Approximate detection areas and sensor distribution on the highway.

Figure 2 .
Figure 2. Wireless sensor node located on the highway.

Figure 2 .
Figure 2. Wireless sensor node located on the highway.

Figure 4 .
Figure 4. Approximate detection areas and sensor distribution on the highway.

Figure 2 .
Figure 2. Wireless sensor node located on the highway.

Figure 4 .
Figure 4. Approximate detection areas and sensor distribution on the highway.Figure 4. Approximate detection areas and sensor distribution on the highway.

Figure 4 .
Figure 4. Approximate detection areas and sensor distribution on the highway.Figure 4. Approximate detection areas and sensor distribution on the highway.

Figure 7 .
Figure 7. Frame format for the system.

Figure 7 .
Figure 7. Frame format for the system.

Figure 7 .
Figure 7. Frame format for the system.

Figure 8 .
Figure 8. Profile of the road section from 140 to 170 km.

Figure 8 . 14 Figure 9 .
Figure 8. Profile of the road section from 140 to 170 km.Electronics 2023, 12, x FOR PEER REVIEW 9 of 14

Figure 9 .
Figure 9. Cellular coverage map of the Altoandina highway.

Figure 9 .
Figure 9. Cellular coverage map of the Altoandina highway.

Figure 10 .
Figure 10.Sensor coverage calibration.Figure 10.Sensor coverage calibration.Subsequently, tests were performed on roads with heavy traffic, whose average speed was 55 km/h.The results are shown in Figure11.

Figure 11 .
Figure 11.Number of vehicles detected vs. the number of pulses.Test data in a controlled environment.

Figure 11 .
Figure 11.Number of vehicles detected vs. the number of pulses.Test data in a controlled environment.

Figure 12 .
Figure 12.Pulses recorded as a function of travel speed.

Figure 12 .
Figure 12.Pulses recorded as a function of travel speed.

Figure 12 .
Figure 12.Pulses recorded as a function of travel speed.

Figure 13 .
Figure 13.Proportion of registered traffic in both lanes; blue indicates lane 1, and orange indicates lane 2.

Figure 13 .
Figure 13.Proportion of registered traffic in both lanes; blue indicates lane 1, and orange indicates lane 2.

Figure 14 .
Figure 14.The proportion of registered traffic in both lanes is depicted graphically.Vehicles staying in their respective lanes are marked in blue, while those that have overtaken are highlighted in orange.

Figure 14 .
Figure 14.The proportion of registered traffic in both lanes is depicted graphically.Vehicles staying in their respective lanes are marked in blue, while those that have overtaken are highlighted in orange.

Table 2 .
Number of pulses that correspond to different vehicle lengths.

Table 2 .
Number of pulses that correspond to different vehicle lengths.