# Design and Research of a Vehicle Approaching Reminder Device Based on ZigBee Wireless Sensor Network

Authors: Zhen Li; Shanen Yu
Journal: Scientific Programming
 (2022)

---

## Abstract

In recent years, wireless sensor networks have developed rapidly, and at the same time, they are also an important support for the Internet of Things and have attracted worldwide attention. A wireless sensor network is composed of many self-organized sensor nodes, which provide a good foundation for it. As a wireless communication technology, ZigBee technology can realize energy-saving and high-efficiency wireless communication. Its sensor nodes are usually small computing devices with radio antennas. They are usually equipped with sensors that can detect one or more environmental parameters. The energy is limited. The function is simple. With the development of the Internet of Things and 5G technology, the scope of wireless sensor networks is becoming wider and wider. This article will apply it to vehicle driving. In today’s society, more and more people use cars as a means of transportation, resulting in a large number of road traffic every year. The accident caused a large number of casualties and material losses. For traffic accidents caused by these factors, the collision between a car hitting a person and a car is the most common, so the research on how to avoid a car collision is urgent. Among the many factors that cause road traffic accidents, the driver is the main reason. Therefore, the combination of the driver’s abnormal driving behavior and the implementation of the vehicle approaching reminder can effectively reduce traffic accidents. At the same time, the vehicle’s collision avoidance warning system is also a vehicle. One of the most important content in driving, we also made research. Through the research of wireless sensor network, this paper applies its relatively mature zigBee technology to the devices and systems of vehicle driving, so that the vehicle approach reminder device and anticollision warning system are developed vigorously.


---

## Body

## 1. Introduction

The wireless sensor network appeared in the 1970s. It was gradually formed with the continuous development of semiconductor technology, information technology, and network technology. In recent years, with the development of the Internet of Things, wireless sensor networks have attracted worldwide attention, and countries have increased their investment in related research [1]. Among them, ZigBee technology is a new wireless communication technology and also an advanced product [2].The wireless sensor network is composed of sensor technology, microelectromechanical technology, advanced network, and wireless communication end-to-end intelligent computing platform. It has broad prospects. It is one of the most popular researches in the computer field, and it is also a major technology that will change future life. This article will apply it to the research of vehicle collision avoidance warning system [3]. The system can be divided into three modules, namely, signal acquisition module, signal processing module, and execution module. The signal acquisition module includes obstacle detection, distance measurement, and road condition selection [4]. Regarding obstacle detection, this research mainly uses millimeter wave radar and CMOS camera to confirm the existence of obstacles and then uses millimeter wave radar to confirm the location of obstacles and to see obstacles [5]. Whether the object is within the collision range of the vehicle, the millimeter wave radar is used to measure the relative distance between the obstacle and the vehicle. Early warning technology to prevent vehicle collisions is an important part of vehicle active safety. In practical applications, it mainly analyzes the driving conditions of the vehicle and the traffic environment around the vehicle and provides early warning to the driver of possible road accidents [6]. Then, in order to reduce road traffic accidents, this article has also done a lot of research on vehicle collision avoidance, which is broken down by data collection methods, including machine-based vehicle collision warning, distance measurement-based reminder vehicle approaching device and communication-based vehicle collision avoidance warning; among them, vehicle approaching reminder devices include infrared, ultrasonic, millimeter wave, and laser methods; communication-based vehicle collision avoidance early warning includes DSRC, LTE-V, Zigbee, cellular networks, and other methods [7]. The research on collision avoidance systems is a hot topic today, and will continue to pave the way for future driverless driving [8]. At present, the research of anticollision warning system mainly uses one of the vehicle sensors (ultrasonic, laser, radar, infrared, machine vision, etc.) to detect and identify objects outside the vehicle [9]. Wireless sensor network is a key tool to realize the intelligent perception and interconnection of heterogeneous elements in the physical world. The digital twin system realizes the dynamic real-time interaction between the physical world and the digital world [10–12]. The vehicle approval reminder device based on ZigBee wireless sensor network studied in this paper also provides a certain degree of support for the realization of the digital twin system in the vehicle field.The focus of the entire research is on the accuracy of signal acquisition, real-time signal processing, accurate obstacle detection, real-time distance tracking, correct road pattern recognition, and organic fusion of received data and finally making the correct decision quickly, so as to avoid collisions and reduce traffic accident [13].The remainder of this paper is organized as follows. Section2 presents the methods used in the designed vehicle approaching reminder device based on Zigbee wireless sensor network, which contains theoretical basis, algorithm principle, and the detailed methods. Section 3 is the main research content, which contains vehicle driving road mode selection, model of vehicle approaching reminder device, communication and braking influence factors and algorithm simulation, and evaluation. Section 4 discusses the research results and designs the device software and hardware and data processing module, which is followed by concluding remarks in Section 5.


## 2. Methods

### 2.1. Theoretical Basis

Wireless sensor networks are currently an interdisciplinary and highly integrated hot research direction, and they have received considerable attention all over the world. The development of sensor technology, microelectromechanical systems, modern networks, and wireless communication has contributed to the emergence and development of modern wireless sensor networks [14]. The wireless sensor network expands people’s ability to collect data, connects the physical data of the objective world to the transmission network, and provides humans with the most direct, efficient and reliable data on the next-generation network. This section is mainly a basic introduction to wireless sensor networks, mainly introducing the architecture, key features, design, and applications of wireless sensor networks [15]. The sensor node is usually an embedded system. Owing to the limitation of size, price, and power, its processing power and storage capacity are relatively small, and the data transmission distance is also very limited [16]. In terms of network functions, each sensor node has the dual functions of collecting and routing data. In addition to collecting and exporting data locally, it must also store, manage, and integrate data sent from other sites and perform certain tasks in collaboration with other sites [17, 18]. The receiver node usually has powerful processing, storage, and communication skills.


### 2.2. Algorithm Principle

The weighted average method can divide the three components ofR, G, and B more reasonably, so as to obtain a more reasonable gray image. In the MATLAB simulation software, the weighted average of the three components of the system function R, G, and B is as follows:(1)fi,j=0.30Ri,j+0.59Gi,j+0.11Bi,j.The formula expression is as follows:(2)R=midzk|k=1,2,3,…,9.The gray value of the gray image is between 0 and 255. In order to better identify the target image and extract the edge, the gray value must be redesigned and set. This is a binarization process. Image binarization is a basic image processing technology. Binarization technology plays a very important role, whether it is compressing image data, extracting edges, or analyzing shapes.(3)gx,y=255,fx,y≥T,0,fx,y<T.


### 2.3. Research Methods

The transmitted signal of millimeter wave radar is as follows:(4)xt=cos2πf0t+ϕ0.The received signal of the millimeter wave radar is as follows:(5)xRt=cos2πf0t−tx+ϕ0,where: tx—delay time.(6)tx=2c−vxR0−vxt.The distance between the car and the stationary obstacle is as follows:(7)Rt=R0−vxt.It can be seen from earlier that the relationship between vehicle distance and delay time is as follows:(8)Rt=ctx2.When the millimeter wave radar is working, the continuous waveform emitted by the transmitter will be decomposed into signals when it hits an obstacle in front of it. When the front barrier is a fixed object, the echo frequency received by the receiving end is the same as the frequency of the transmitted signal, as shown in Figure1.Figure 1
The millimeter-wave radar range finding diagram of stationary obstacles.


## 2.1. Theoretical Basis

Wireless sensor networks are currently an interdisciplinary and highly integrated hot research direction, and they have received considerable attention all over the world. The development of sensor technology, microelectromechanical systems, modern networks, and wireless communication has contributed to the emergence and development of modern wireless sensor networks [14]. The wireless sensor network expands people’s ability to collect data, connects the physical data of the objective world to the transmission network, and provides humans with the most direct, efficient and reliable data on the next-generation network. This section is mainly a basic introduction to wireless sensor networks, mainly introducing the architecture, key features, design, and applications of wireless sensor networks [15]. The sensor node is usually an embedded system. Owing to the limitation of size, price, and power, its processing power and storage capacity are relatively small, and the data transmission distance is also very limited [16]. In terms of network functions, each sensor node has the dual functions of collecting and routing data. In addition to collecting and exporting data locally, it must also store, manage, and integrate data sent from other sites and perform certain tasks in collaboration with other sites [17, 18]. The receiver node usually has powerful processing, storage, and communication skills.


## 2.2. Algorithm Principle

The weighted average method can divide the three components ofR, G, and B more reasonably, so as to obtain a more reasonable gray image. In the MATLAB simulation software, the weighted average of the three components of the system function R, G, and B is as follows:(1)fi,j=0.30Ri,j+0.59Gi,j+0.11Bi,j.The formula expression is as follows:(2)R=midzk|k=1,2,3,…,9.The gray value of the gray image is between 0 and 255. In order to better identify the target image and extract the edge, the gray value must be redesigned and set. This is a binarization process. Image binarization is a basic image processing technology. Binarization technology plays a very important role, whether it is compressing image data, extracting edges, or analyzing shapes.(3)gx,y=255,fx,y≥T,0,fx,y<T.


## 2.3. Research Methods

The transmitted signal of millimeter wave radar is as follows:(4)xt=cos2πf0t+ϕ0.The received signal of the millimeter wave radar is as follows:(5)xRt=cos2πf0t−tx+ϕ0,where: tx—delay time.(6)tx=2c−vxR0−vxt.The distance between the car and the stationary obstacle is as follows:(7)Rt=R0−vxt.It can be seen from earlier that the relationship between vehicle distance and delay time is as follows:(8)Rt=ctx2.When the millimeter wave radar is working, the continuous waveform emitted by the transmitter will be decomposed into signals when it hits an obstacle in front of it. When the front barrier is a fixed object, the echo frequency received by the receiving end is the same as the frequency of the transmitted signal, as shown in Figure1.Figure 1
The millimeter-wave radar range finding diagram of stationary obstacles.


## 3. Results

### 3.1. Vehicle Driving Road Mode Selection

Nowadays, the four driving modes of the car are quiet and stable pure electric mode (EV), efficient and energy-saving economic mode (ECO), stable normal mode (NORMAL), and surging sport mode (SPORT). When the EV pure electric mode runs at low speed and short distance, the vehicle only works on the power provided by the battery. At this time, the engine does not intervene, the noise of the vehicle is almost equal to zero, and zero emission is realized at the same time. When switching to sport mode, the energy output of the battery will increase instantaneously, the power response will be rapid, and the steering operation will be obvious. At the same time, traction control system and vehicle stability control system will reduce the intervention in driving.A moving car uses an emergency braking system in an emergency. The car has a certain distance when braking. This distance is called the braking distance. Different cars have different braking distances on different roads. When designing a collision warning, the determination of the safety distance of the vehicle in the execution phase is mainly based on the braking distance of the vehicle. In addition, the braking distance is mainly determined by these road conditions. Therefore, before investigating the braking distance, first determine the road on which the car is traveling. The current investigations of roads at home and abroad are mainly based on the relationship between sliding speeds and adhesion coefficient μ. The maximum µ value is determined using the µ-s ratio graph and the slope of the small slider in the speed range. When installing the sensor, tilt the position of the sensor to the front of the vehicle so that the sensor can detect the road conditions in front of the vehicle during operation, thereby predicting the road conditions ahead and keeping the vehicle in the best position safely. The sensor used to detect road traffic in this article is an ultrasonic sensor. As the waveform attenuates during transmission and along the same path, the attenuation of the waveform is different under dry and wet conditions, resulting in different received waveforms. The waveform received in this way can be used for spectrum analysis of the spectrum difference to distinguish path types. Signal analysis and feature removal are mainly based on time domain, frequency domain, or time-frequency domain. When extracting attributes from the time domain, if the signal is uncertain or the weather changes, or an unknown interference signal appears during transmission, its robustness should be considered. When extracting attributes from a frequency range, it is only for a limited signal interval, so the signal time range must be cut off, which leads to information leakage, and the amplitude, frequency, and phase of the resulting individual spectrum can lead to further errors.As shown in Table1 for the impact data of the vehicle braking distance, it can be seen from the table that the driver’s reaction and braking distance increase with the increase of speed.Table 1
Data comparison of different initial speeds and adhesion coefficients on braking distance.
Initial speed of vehicle (km/h)Driver reaction distance (m)Dry asphalt pavementWet cement pavementWet asphalt pavementSnow pavementIcy roadAdhesion coefficient 0.7Adhesion coefficient 0.6Adhesion coefficient 0.5Adhesion coefficient 0.2Adhesion coefficient 0.1205.552.362.733.267.9615.85256.953.624.215.0312.4224.72308.325.156.027.1717.8235.514011.129.1110.5812.6831.5763.085013.8814.1516.5119.7949.2898.496016.6820.3323.7228.4570.95141.778022.2336.1142.1150.51126.02251.97Figure2 shows the relationship between starting speed and stopping distance under various road conditions after simulation. It can be seen from the figure that the braking distance of a car is different on different roads, and the braking distance is the largest under icy roads.Figure 2
The relationship between the initial speed of the vehicle and the braking distance under different road conditions.


### 3.2. Model of Vehicle Approaching Reminder Device

As shown in Figure3, based on the automatic tracking theory, the Berkeley safety distance model and the hidden Markov model, a collision warning system that can objectively and accurately calculate and assess traffic hazards has been designed, including an improved safety distance model, through the analysis of vehicles The characteristics of different stages of braking and the characteristics of car-following behavior of the vehicle optimize the safety distance model. The risk assessment process of the early warning model is introduced, the problem of low accuracy of risk assessment based on vehicle data is optimized, and the hidden Markov model is used to conduct risk assessment according to the observation sequence of the periodic process. At the same time, an improved safety distance model is used to mark the state of vehicle data, and the K-Average method is used to classify and discretize the observation data. The evaluation of the early warning situation is based on the statistics of the angle of the vehicles on the road section, and according to different direction values, the current scene is regarded as a circular arc, a straight road or an intersection.Figure 3
Schematic diagram of collision avoidance warning model.According to the car-following theory, this provides a theoretical basis for analyzing vehicle braking and assessing the possibility of collision. As shown in Figure4, assuming that the driver detects a dangerous situation ahead and the vehicle starts to brake, he should depress the brake pedal with his right foot while the vehicle is running until the vehicle maintains a minimum safe distance from the vehicle. The driver depresses the brake pedal to brake until the vehicle is out of danger and the entire braking process is completed.Figure 4
Automobile braking process.


### 3.3. Communication and Braking Influence Factors

V2X communication technology is an important research direction for vehicle intelligence and networking. Among them, the dedicated short range communication (DSRC) standard was mainly formulated in the United States, Europe, and Japan in the 1990s; and C-V2X (Cellular Vehicle to Everything) was developed by 3GPP (Cooperative Project No. 3) Development. Table2 shows the main indicators of DSRC and C-V2X. The comparison shows that C-V2X has greater advantages over DSRC in terms of transmission distance, delay, and evolution.Table 2
DSRC and C-V2X key index table.
Key indicatorsDSRCC-V2XTransmission distance (m)301∼5011001Adapt to vehicle speed (km/h)201501Transmission rate (Mbps)28501Delay (ms)51∼10151Network deploymentNeed to deploy RSUBase stationMaturityHighMiddleEvolutionaryWeakPowerfulBusiness potentialLowHighThe application scenarios of the future intelligent networked vehicles include traffic safety, traffic efficiency, and information services, of which 19 are safety, 12 efficiency categories, and 9 information service categories. Table3 shows intersection collision warning, frontal collision warning, and a statistical table of 8 typical V2X safety applications such as side collision warning.Table 3
Statistical table of typical security V2X applications.
CategorySerial numberApplication nameSerial numberApplication nameSafety1Intersection collision warning5Side collision warning2Emergency brake warning6Rear collision warning3Reverse overtaking collision warning7Early warning of abnormal vehicles4Forward collision warning8Vehicle out of control warningThe C-V2X standard is composed of the LTE-V2X standard and the 5G V2X standard and can seamlessly develop from LTE-V2X to 5G V2X. The C-V2X standard includes two modes of operation: direct data transmission and mobile communication. The different operating modes correspond to the communication interface PC5 and the communication interface Uu. The PC5 communication interface can support vehicle-to-vehicle V2V communication, V2I vehicle-to-road communication, and V2P human-vehicle communication through the Uu communication interface. Figure5 shows the network architecture of the DSRC system and the network architecture of the C-V2X system.Figure 5
Network architecture diagram of the Internet of Vehicles system: (a) DSR Internet of Vehicles network architecture diagram and (b) C-V2X Internet of Vehicles network architecture diagram).First, the braking process is analyzed for the reaction time. The factors related to the process performance can complement the driver’s response time. It is often believed that a rear-end collision between two vehicles must be related to the following distance and the driver’s reaction time. However, the following distance and reaction time need to be considered. Therefore, in this section, we will analyze the characteristics of the braking behavior process and find the relationship between each driving mode and reaction time. Factors related to response time include braking response time, initial monitoring distance (IHD), and distance (BHD). The statistical data of the relevant variables are shown in Table4. Behavior 1, Behavior 2, Behavior 3, Behavior 4, Behavior 5, and Behavior 6, respectively, represent the normal driving state that occurs under normal driving conditions, and the emergency events that occur under the conditions of communication behavior, voice information behavior, chat and drinking, yawning, and so on, and give abnormal driving behavioral reaction time and following distance.Table 4
Statistics of related factors under different driving behaviors.
Emergency braking eventQuantityBRT (s)IHD (m)BHD (m)MeanSDMeanSDMeanSDBehaviour 1551.920.7635.0410.1718.059.96Behaviour 2272.410.8325.0613.1115.216.88Behaviour 3272.720.8830.0512.0817.7510.81Behaviour 4352.020.7123.0810.7714.615.77Behaviour 5442.380.9134.7114.6119.7110.97Behaviour 6262.210.7534.5113.6715.977.65Table5 shows the significant difference results of different driving behavior variables. The analysis of variance shows that different abnormal driving habits have a significant impact on the reaction time of the driver in the braking process (F = 8.971, P=0.003≤0.05), the initial following distance and braking following distance are related to the driver’s braking response Time does not significantly affect the relationship.Table 5
Significant difference results under different driving behaviors.
VariableF valueР valueBRT (s)8.9720.004IHD (m)3.0050.068BHD (m)2.4020.067The nonparametric K-M estimation method is used to estimate the survival probability of different driving behaviors according to the braking reaction time, as shown in Figure6.Figure 6
Survival probability curve diagram of different driving behaviors corresponding to braking reaction time.


### 3.4. Algorithm Simulation and Evaluation

The simulation value of the vehicle position prediction result in Figure7 basically fits the curve of the horizontal position and the longitudinal position. In this test case, the prediction error of the horizontal position is −0.015 ± 0.252 m, and the prediction error of the longitudinal position is 0.089 ± 0.207 m.Figure 7
The result of vehicle position prediction: (a) horizontal position and (b) longitudinal position.The prediction error of the vehicle speed is calculated based on the expected speed and the actual speed. The analysis of the results in Figure8 shows that in this test case, the prediction error of the lateral speed is −0.028 ± 0.279 m/s, and the prediction error of the longitudinal speed is 0.064 ± 0.231 m/s. The simulation results show that the prediction data of the prediction algorithm has a small error with the actual data, and the prediction results can be used in the vehicle collision avoidance system.Figure 8
The result of vehicle speed prediction: (a) horizontal position and (b) longitudinal position.


## 3.1. Vehicle Driving Road Mode Selection

Nowadays, the four driving modes of the car are quiet and stable pure electric mode (EV), efficient and energy-saving economic mode (ECO), stable normal mode (NORMAL), and surging sport mode (SPORT). When the EV pure electric mode runs at low speed and short distance, the vehicle only works on the power provided by the battery. At this time, the engine does not intervene, the noise of the vehicle is almost equal to zero, and zero emission is realized at the same time. When switching to sport mode, the energy output of the battery will increase instantaneously, the power response will be rapid, and the steering operation will be obvious. At the same time, traction control system and vehicle stability control system will reduce the intervention in driving.A moving car uses an emergency braking system in an emergency. The car has a certain distance when braking. This distance is called the braking distance. Different cars have different braking distances on different roads. When designing a collision warning, the determination of the safety distance of the vehicle in the execution phase is mainly based on the braking distance of the vehicle. In addition, the braking distance is mainly determined by these road conditions. Therefore, before investigating the braking distance, first determine the road on which the car is traveling. The current investigations of roads at home and abroad are mainly based on the relationship between sliding speeds and adhesion coefficient μ. The maximum µ value is determined using the µ-s ratio graph and the slope of the small slider in the speed range. When installing the sensor, tilt the position of the sensor to the front of the vehicle so that the sensor can detect the road conditions in front of the vehicle during operation, thereby predicting the road conditions ahead and keeping the vehicle in the best position safely. The sensor used to detect road traffic in this article is an ultrasonic sensor. As the waveform attenuates during transmission and along the same path, the attenuation of the waveform is different under dry and wet conditions, resulting in different received waveforms. The waveform received in this way can be used for spectrum analysis of the spectrum difference to distinguish path types. Signal analysis and feature removal are mainly based on time domain, frequency domain, or time-frequency domain. When extracting attributes from the time domain, if the signal is uncertain or the weather changes, or an unknown interference signal appears during transmission, its robustness should be considered. When extracting attributes from a frequency range, it is only for a limited signal interval, so the signal time range must be cut off, which leads to information leakage, and the amplitude, frequency, and phase of the resulting individual spectrum can lead to further errors.As shown in Table1 for the impact data of the vehicle braking distance, it can be seen from the table that the driver’s reaction and braking distance increase with the increase of speed.Table 1
Data comparison of different initial speeds and adhesion coefficients on braking distance.
Initial speed of vehicle (km/h)Driver reaction distance (m)Dry asphalt pavementWet cement pavementWet asphalt pavementSnow pavementIcy roadAdhesion coefficient 0.7Adhesion coefficient 0.6Adhesion coefficient 0.5Adhesion coefficient 0.2Adhesion coefficient 0.1205.552.362.733.267.9615.85256.953.624.215.0312.4224.72308.325.156.027.1717.8235.514011.129.1110.5812.6831.5763.085013.8814.1516.5119.7949.2898.496016.6820.3323.7228.4570.95141.778022.2336.1142.1150.51126.02251.97Figure2 shows the relationship between starting speed and stopping distance under various road conditions after simulation. It can be seen from the figure that the braking distance of a car is different on different roads, and the braking distance is the largest under icy roads.Figure 2
The relationship between the initial speed of the vehicle and the braking distance under different road conditions.


## 3.2. Model of Vehicle Approaching Reminder Device

As shown in Figure3, based on the automatic tracking theory, the Berkeley safety distance model and the hidden Markov model, a collision warning system that can objectively and accurately calculate and assess traffic hazards has been designed, including an improved safety distance model, through the analysis of vehicles The characteristics of different stages of braking and the characteristics of car-following behavior of the vehicle optimize the safety distance model. The risk assessment process of the early warning model is introduced, the problem of low accuracy of risk assessment based on vehicle data is optimized, and the hidden Markov model is used to conduct risk assessment according to the observation sequence of the periodic process. At the same time, an improved safety distance model is used to mark the state of vehicle data, and the K-Average method is used to classify and discretize the observation data. The evaluation of the early warning situation is based on the statistics of the angle of the vehicles on the road section, and according to different direction values, the current scene is regarded as a circular arc, a straight road or an intersection.Figure 3
Schematic diagram of collision avoidance warning model.According to the car-following theory, this provides a theoretical basis for analyzing vehicle braking and assessing the possibility of collision. As shown in Figure4, assuming that the driver detects a dangerous situation ahead and the vehicle starts to brake, he should depress the brake pedal with his right foot while the vehicle is running until the vehicle maintains a minimum safe distance from the vehicle. The driver depresses the brake pedal to brake until the vehicle is out of danger and the entire braking process is completed.Figure 4
Automobile braking process.


## 3.3. Communication and Braking Influence Factors

V2X communication technology is an important research direction for vehicle intelligence and networking. Among them, the dedicated short range communication (DSRC) standard was mainly formulated in the United States, Europe, and Japan in the 1990s; and C-V2X (Cellular Vehicle to Everything) was developed by 3GPP (Cooperative Project No. 3) Development. Table2 shows the main indicators of DSRC and C-V2X. The comparison shows that C-V2X has greater advantages over DSRC in terms of transmission distance, delay, and evolution.Table 2
DSRC and C-V2X key index table.
Key indicatorsDSRCC-V2XTransmission distance (m)301∼5011001Adapt to vehicle speed (km/h)201501Transmission rate (Mbps)28501Delay (ms)51∼10151Network deploymentNeed to deploy RSUBase stationMaturityHighMiddleEvolutionaryWeakPowerfulBusiness potentialLowHighThe application scenarios of the future intelligent networked vehicles include traffic safety, traffic efficiency, and information services, of which 19 are safety, 12 efficiency categories, and 9 information service categories. Table3 shows intersection collision warning, frontal collision warning, and a statistical table of 8 typical V2X safety applications such as side collision warning.Table 3
Statistical table of typical security V2X applications.
CategorySerial numberApplication nameSerial numberApplication nameSafety1Intersection collision warning5Side collision warning2Emergency brake warning6Rear collision warning3Reverse overtaking collision warning7Early warning of abnormal vehicles4Forward collision warning8Vehicle out of control warningThe C-V2X standard is composed of the LTE-V2X standard and the 5G V2X standard and can seamlessly develop from LTE-V2X to 5G V2X. The C-V2X standard includes two modes of operation: direct data transmission and mobile communication. The different operating modes correspond to the communication interface PC5 and the communication interface Uu. The PC5 communication interface can support vehicle-to-vehicle V2V communication, V2I vehicle-to-road communication, and V2P human-vehicle communication through the Uu communication interface. Figure5 shows the network architecture of the DSRC system and the network architecture of the C-V2X system.Figure 5
Network architecture diagram of the Internet of Vehicles system: (a) DSR Internet of Vehicles network architecture diagram and (b) C-V2X Internet of Vehicles network architecture diagram).First, the braking process is analyzed for the reaction time. The factors related to the process performance can complement the driver’s response time. It is often believed that a rear-end collision between two vehicles must be related to the following distance and the driver’s reaction time. However, the following distance and reaction time need to be considered. Therefore, in this section, we will analyze the characteristics of the braking behavior process and find the relationship between each driving mode and reaction time. Factors related to response time include braking response time, initial monitoring distance (IHD), and distance (BHD). The statistical data of the relevant variables are shown in Table4. Behavior 1, Behavior 2, Behavior 3, Behavior 4, Behavior 5, and Behavior 6, respectively, represent the normal driving state that occurs under normal driving conditions, and the emergency events that occur under the conditions of communication behavior, voice information behavior, chat and drinking, yawning, and so on, and give abnormal driving behavioral reaction time and following distance.Table 4
Statistics of related factors under different driving behaviors.
Emergency braking eventQuantityBRT (s)IHD (m)BHD (m)MeanSDMeanSDMeanSDBehaviour 1551.920.7635.0410.1718.059.96Behaviour 2272.410.8325.0613.1115.216.88Behaviour 3272.720.8830.0512.0817.7510.81Behaviour 4352.020.7123.0810.7714.615.77Behaviour 5442.380.9134.7114.6119.7110.97Behaviour 6262.210.7534.5113.6715.977.65Table5 shows the significant difference results of different driving behavior variables. The analysis of variance shows that different abnormal driving habits have a significant impact on the reaction time of the driver in the braking process (F = 8.971, P=0.003≤0.05), the initial following distance and braking following distance are related to the driver’s braking response Time does not significantly affect the relationship.Table 5
Significant difference results under different driving behaviors.
VariableF valueР valueBRT (s)8.9720.004IHD (m)3.0050.068BHD (m)2.4020.067The nonparametric K-M estimation method is used to estimate the survival probability of different driving behaviors according to the braking reaction time, as shown in Figure6.Figure 6
Survival probability curve diagram of different driving behaviors corresponding to braking reaction time.


## 3.4. Algorithm Simulation and Evaluation

The simulation value of the vehicle position prediction result in Figure7 basically fits the curve of the horizontal position and the longitudinal position. In this test case, the prediction error of the horizontal position is −0.015 ± 0.252 m, and the prediction error of the longitudinal position is 0.089 ± 0.207 m.Figure 7
The result of vehicle position prediction: (a) horizontal position and (b) longitudinal position.The prediction error of the vehicle speed is calculated based on the expected speed and the actual speed. The analysis of the results in Figure8 shows that in this test case, the prediction error of the lateral speed is −0.028 ± 0.279 m/s, and the prediction error of the longitudinal speed is 0.064 ± 0.231 m/s. The simulation results show that the prediction data of the prediction algorithm has a small error with the actual data, and the prediction results can be used in the vehicle collision avoidance system.Figure 8
The result of vehicle speed prediction: (a) horizontal position and (b) longitudinal position.


## 4. Discussion and Design

### 4.1. Device Software and Hardware Design

According to demand analysis and hardware design block diagram (Figures3 and 4), it can be concluded that the hardware platform of the whole system is mainly divided into main control module, DSRC wireless communication module, GPS module, CAN bus module and USB module, and power supply module. The main control module selects the i.MX6 DualLite processor produced by Freescale, and the core board integrates the CAN controller required by the procurement system. The communication module adopts the integrated module model THE0-P173 of Cohda Wireless, which combines a wireless radio frequency transceiver module and a protocol converter unit, and can use the 5.9 GHz frequency band to complete DSRC communication. The pins of the NEO-M8U chip are connected in series with the LED light, and the status of the LED light is used to indicate the working status of the GPS module. Steady ON indicates that the module is turned ON but not inserted; flashing indicates that the positioning is successful and GPS location information is sent. The CAN bus module uses the FlexC AN module integrated inside the I.MX6DL microprocessor.The vehicle collision avoidance warning system software based on V2X communication consists of three parts: middleware program, terminal application program and socket communication. The middle layer application is developed on the basis of the Linux operating system. Its task is to collect vehicle data, convert it into BSM data, and send it within a certain period of time through the V2X communication module. At the same time, it receives BSM data sent by other vehicles. As a high-level application, the user terminal is developed using QT software, which mainly realizes socket communication with the middle layer, realizes data reception, data preprocessing, use of early warning algorithms, and early warning prompts. The program has multiple I/O functions. In order to avoid I/O deadlock, multiple I/O technologies are used, so that multiple I/O functions can be reused in the same query block, allowing the program to process multiple I/O’s at the same time. Each I/O request becomes single-threaded time. The query function independently creates a pollfd structure for each monitored file graph, which determines the appearance of the file graph. In the main function, first initialize each module of the system, including the initialization of the GPS module, CAN module, and communication module P1609 layer. The structured data are stored in the StateStore structure. The channel synchronization event triggers the BSM message every 50 ms. The data stored in the structure must be recorded before each transmission, as defined in the BSM message in the compiled message format and must be adapted to the structure of the data storage structure in the StateStore. After the P1609 layer encodes the BSM message, it encapsulates it as a WSM message and sends it to the receiving device. The transmitted data packet can be saved in a log file; the P1609 layer of the receiving device receives the data packet in accordance with the SAE J2735 standard. The BSM message is decrypted, and the received data packet can also be saved in the log file.First set the serial port GPS parameters such as baud rate and stop bit, open the serial port, and start receiving the serial buffer data stream; after receiving the data, process the data frame starting from $GPRMC, and extract the corresponding fields in the chassis value, such as current time. The vehicle position and angle convert the ASCII code into a real number and then into an unsigned integer to receive and store the vehicle data. When other threads need GPS data, they are read from the memory structure; when the GPS update time expires, they continue to read the next data stream to obtain the latest vehicle position information. After the data are updated, the top-level application initiates an event update every 50 ms, encapsulates the BSM message and sends the request to the WSMP protocol layer [16]. The request contains the required parameters. When the WSMP layer receives a request to send a WSM message, it first checks the validity of the length of the data packet sent by the request. If it meets the specified length requirement, it adds WAVE data element, version and other extended header information values to the WSM message. Encapsulated in the WSM message and sent its MAC layer and PHY layer, after LLC lower layer processing, the data packet is sent to the WSMP protocol layer. The WSMP layer determines whether the packet format is a standard WSM message [19,20]. If the PSID value matches, the hit is successful, and it is sent to the upper unit corresponding to the PSID value, otherwise it is discarded [21].


### 4.2. Device Signal and Display Processing

The collected signal is sent to the signal processing module for digital processing, which is called digital signal processing (DSP). Digital signal processing is a series of processes such as conversion, filtering, enhancement, and compression of the received signal in the form of a computer or special equipment to obtain necessary or useful information [22].TMS320F28335 digital signal processor uses 176 pins, and its compression method is PGF/PTP thin four-channel flat package (LQFP). Its main features are as follows: (1) CMOS technology is a high-performance static technology with an instruction cycle of only 6.67 ns and a base frequency of up to 150 MHz; (2) the processor is a 32-bit high-performance processor, and the arithmetic unit is a single-precision floating-point number. (3) The 16-bit words of 256 KB of flash memory, 16-bit words of 34K SARAM memory that can be accessed in a single cycle, and 16-bit words of 1K OTPROM that can be programmed once are all password-protected; (4) With TMS320F281X series processors. In comparison, it contains eight external interrupts, but there is no special interrupt pin; (5) The processor contains two CAN modules (CANTXA, CANRXA and CANTXB, CANRXB), using standard IEEEll49.1 chip scan simulation interface (JTAG). This product uses 12864 liquid crystal displays for visual display. 12864 LCD is a graphic dot matrix liquid crystal display, which is composed of a row controller, a column controller and a 128 × 64 dot matrix liquid crystal display. It can not only display 8 × 4 16 × 16 dot matrix Chinese characters, but also display graphics, realize cursor display, screen movement, and custom icon and sleep mode [23].


### 4.3. Data Processing Module Design

Based on the analysis of the on-board terminal, the on-board terminal functions are mainly divided into on-board data collection and communication functions, which are mainly used to support data in collision avoidance warning applications [24]. In order to facilitate the retrieval and use of data at the application algorithm layer and weaken the connection between the application layer and the underlying functional modules, this paper designs a data acquisition module between the basic layer and the application layer as an intermediate layer, and the data cache module supplements the data management function [25]. The anticollision software structure is divided into three layers according to the hierarchical structure. The lower layer is a data acquisition module and a communication module, which provides initial data support for the middle layer; the middle layer is a data cache module, which is used to manage the data structure for ease of use and application layer efficient retrieval of data saves program use time; the application layer includes a module that evaluates the driver’s reaction time and an adaptive collision avoidance warning module, which uses the collected data to determine the data of the vehicle’s early warning situation [26].The data acquisition module can also be called the data acquisition module, which mainly uses equipment to measure and collect physical data during the driving process of the vehicle. It is the basis for the accurate operation of the collision warning system. The data collection module mainly includes the collection of vehicle position data, vehicle attitude data or CarMaker simulation data.The main purpose of collecting vehicle position data is to read the NMEA0183 command information provided by the GPS/BDS positioning module through the UART serial port of the processor, and then use the following commands to analyze: $GPRMC, $GPGGA, $GPGSA, $GPGSV, and $GPGGA. GPS-pa required by GPVTG is mainly information such as latitude and longitude, angle, time, date, and altitude. The terminal installed in the car first initializes the accelerometer and gyroscope module; initializes the registers, and then can periodically read the three-dimensional acceleration and three-dimensional angle data of the vehicle. Since the GPS/BDS positioning module updates data slowly, and the data update cycle of the accelerometer and gyroscope modules is short, the data collected by the IMU module can be used to supplement the calculation of the vehicle position data, thereby shortening the update cycle of the vehicle position data. As there are many external factors that affect the accuracy of the test during the actual vehicle test during the test phase. Therefore, it is necessary to carry out the simulation test of the algorithm in real time before the actual vehicle test and improve the error correction of the algorithm.The communication module also represents a component of the underlying module. The communication module enables the communication between vehicles, the communication between vehicles and roads, and the communication between the terminals installed in the vehicles and the mobile terminals to be carried out stably. Through the network communication module, the vehicle-mounted terminal can send anticollision warning information to the mobile terminal to realize the sound and light warning for the driver; the vehicle-mounted terminal device can use the Bluetooth communication module and the vehicle-mounted OBE device to receive vehicle body usage data; the vehicle can send the vehicle to the mobile terminal through the V2X communication module. The surrounding vehicles send their own vehicle information, and at the same time receive the vehicle motion data sent by the surrounding vehicles, so as to realize the communication between the vehicles. Owing to the rapid development of the mobile Internet, mobile devices are ubiquitous. Mobile devices can warn drivers not only through visual animation, but also through audio transmission without affecting the driver’s visual awareness. The terminal installed in the vehicle calculates the vehicle collision avoidance warning and then sends the warning result to the mobile terminal, and the mobile terminal reminds the driver based on the calculation result of the collision avoidance warning algorithm. If the vehicle-mounted terminal is connected to the Internet through a 3G/4G mobile communication device or WiFi communication device, it can interact with the mobile terminal through the network communication module, send an anticollision warning algorithm, and determine the warning situation from the vehicle to the mobile terminal to the mobile device. At the same time, the vehicle-mounted terminal can also send the traffic data and road information received by the roadside device to the mobile terminal through the network communication module, thereby displaying information out of sight to the driver in advance, improving the driver’s field of vision and driving experience.


## 4.1. Device Software and Hardware Design

According to demand analysis and hardware design block diagram (Figures3 and 4), it can be concluded that the hardware platform of the whole system is mainly divided into main control module, DSRC wireless communication module, GPS module, CAN bus module and USB module, and power supply module. The main control module selects the i.MX6 DualLite processor produced by Freescale, and the core board integrates the CAN controller required by the procurement system. The communication module adopts the integrated module model THE0-P173 of Cohda Wireless, which combines a wireless radio frequency transceiver module and a protocol converter unit, and can use the 5.9 GHz frequency band to complete DSRC communication. The pins of the NEO-M8U chip are connected in series with the LED light, and the status of the LED light is used to indicate the working status of the GPS module. Steady ON indicates that the module is turned ON but not inserted; flashing indicates that the positioning is successful and GPS location information is sent. The CAN bus module uses the FlexC AN module integrated inside the I.MX6DL microprocessor.The vehicle collision avoidance warning system software based on V2X communication consists of three parts: middleware program, terminal application program and socket communication. The middle layer application is developed on the basis of the Linux operating system. Its task is to collect vehicle data, convert it into BSM data, and send it within a certain period of time through the V2X communication module. At the same time, it receives BSM data sent by other vehicles. As a high-level application, the user terminal is developed using QT software, which mainly realizes socket communication with the middle layer, realizes data reception, data preprocessing, use of early warning algorithms, and early warning prompts. The program has multiple I/O functions. In order to avoid I/O deadlock, multiple I/O technologies are used, so that multiple I/O functions can be reused in the same query block, allowing the program to process multiple I/O’s at the same time. Each I/O request becomes single-threaded time. The query function independently creates a pollfd structure for each monitored file graph, which determines the appearance of the file graph. In the main function, first initialize each module of the system, including the initialization of the GPS module, CAN module, and communication module P1609 layer. The structured data are stored in the StateStore structure. The channel synchronization event triggers the BSM message every 50 ms. The data stored in the structure must be recorded before each transmission, as defined in the BSM message in the compiled message format and must be adapted to the structure of the data storage structure in the StateStore. After the P1609 layer encodes the BSM message, it encapsulates it as a WSM message and sends it to the receiving device. The transmitted data packet can be saved in a log file; the P1609 layer of the receiving device receives the data packet in accordance with the SAE J2735 standard. The BSM message is decrypted, and the received data packet can also be saved in the log file.First set the serial port GPS parameters such as baud rate and stop bit, open the serial port, and start receiving the serial buffer data stream; after receiving the data, process the data frame starting from $GPRMC, and extract the corresponding fields in the chassis value, such as current time. The vehicle position and angle convert the ASCII code into a real number and then into an unsigned integer to receive and store the vehicle data. When other threads need GPS data, they are read from the memory structure; when the GPS update time expires, they continue to read the next data stream to obtain the latest vehicle position information. After the data are updated, the top-level application initiates an event update every 50 ms, encapsulates the BSM message and sends the request to the WSMP protocol layer [16]. The request contains the required parameters. When the WSMP layer receives a request to send a WSM message, it first checks the validity of the length of the data packet sent by the request. If it meets the specified length requirement, it adds WAVE data element, version and other extended header information values to the WSM message. Encapsulated in the WSM message and sent its MAC layer and PHY layer, after LLC lower layer processing, the data packet is sent to the WSMP protocol layer. The WSMP layer determines whether the packet format is a standard WSM message [19,20]. If the PSID value matches, the hit is successful, and it is sent to the upper unit corresponding to the PSID value, otherwise it is discarded [21].


## 4.2. Device Signal and Display Processing

The collected signal is sent to the signal processing module for digital processing, which is called digital signal processing (DSP). Digital signal processing is a series of processes such as conversion, filtering, enhancement, and compression of the received signal in the form of a computer or special equipment to obtain necessary or useful information [22].TMS320F28335 digital signal processor uses 176 pins, and its compression method is PGF/PTP thin four-channel flat package (LQFP). Its main features are as follows: (1) CMOS technology is a high-performance static technology with an instruction cycle of only 6.67 ns and a base frequency of up to 150 MHz; (2) the processor is a 32-bit high-performance processor, and the arithmetic unit is a single-precision floating-point number. (3) The 16-bit words of 256 KB of flash memory, 16-bit words of 34K SARAM memory that can be accessed in a single cycle, and 16-bit words of 1K OTPROM that can be programmed once are all password-protected; (4) With TMS320F281X series processors. In comparison, it contains eight external interrupts, but there is no special interrupt pin; (5) The processor contains two CAN modules (CANTXA, CANRXA and CANTXB, CANRXB), using standard IEEEll49.1 chip scan simulation interface (JTAG). This product uses 12864 liquid crystal displays for visual display. 12864 LCD is a graphic dot matrix liquid crystal display, which is composed of a row controller, a column controller and a 128 × 64 dot matrix liquid crystal display. It can not only display 8 × 4 16 × 16 dot matrix Chinese characters, but also display graphics, realize cursor display, screen movement, and custom icon and sleep mode [23].


## 4.3. Data Processing Module Design

Based on the analysis of the on-board terminal, the on-board terminal functions are mainly divided into on-board data collection and communication functions, which are mainly used to support data in collision avoidance warning applications [24]. In order to facilitate the retrieval and use of data at the application algorithm layer and weaken the connection between the application layer and the underlying functional modules, this paper designs a data acquisition module between the basic layer and the application layer as an intermediate layer, and the data cache module supplements the data management function [25]. The anticollision software structure is divided into three layers according to the hierarchical structure. The lower layer is a data acquisition module and a communication module, which provides initial data support for the middle layer; the middle layer is a data cache module, which is used to manage the data structure for ease of use and application layer efficient retrieval of data saves program use time; the application layer includes a module that evaluates the driver’s reaction time and an adaptive collision avoidance warning module, which uses the collected data to determine the data of the vehicle’s early warning situation [26].The data acquisition module can also be called the data acquisition module, which mainly uses equipment to measure and collect physical data during the driving process of the vehicle. It is the basis for the accurate operation of the collision warning system. The data collection module mainly includes the collection of vehicle position data, vehicle attitude data or CarMaker simulation data.The main purpose of collecting vehicle position data is to read the NMEA0183 command information provided by the GPS/BDS positioning module through the UART serial port of the processor, and then use the following commands to analyze: $GPRMC, $GPGGA, $GPGSA, $GPGSV, and $GPGGA. GPS-pa required by GPVTG is mainly information such as latitude and longitude, angle, time, date, and altitude. The terminal installed in the car first initializes the accelerometer and gyroscope module; initializes the registers, and then can periodically read the three-dimensional acceleration and three-dimensional angle data of the vehicle. Since the GPS/BDS positioning module updates data slowly, and the data update cycle of the accelerometer and gyroscope modules is short, the data collected by the IMU module can be used to supplement the calculation of the vehicle position data, thereby shortening the update cycle of the vehicle position data. As there are many external factors that affect the accuracy of the test during the actual vehicle test during the test phase. Therefore, it is necessary to carry out the simulation test of the algorithm in real time before the actual vehicle test and improve the error correction of the algorithm.The communication module also represents a component of the underlying module. The communication module enables the communication between vehicles, the communication between vehicles and roads, and the communication between the terminals installed in the vehicles and the mobile terminals to be carried out stably. Through the network communication module, the vehicle-mounted terminal can send anticollision warning information to the mobile terminal to realize the sound and light warning for the driver; the vehicle-mounted terminal device can use the Bluetooth communication module and the vehicle-mounted OBE device to receive vehicle body usage data; the vehicle can send the vehicle to the mobile terminal through the V2X communication module. The surrounding vehicles send their own vehicle information, and at the same time receive the vehicle motion data sent by the surrounding vehicles, so as to realize the communication between the vehicles. Owing to the rapid development of the mobile Internet, mobile devices are ubiquitous. Mobile devices can warn drivers not only through visual animation, but also through audio transmission without affecting the driver’s visual awareness. The terminal installed in the vehicle calculates the vehicle collision avoidance warning and then sends the warning result to the mobile terminal, and the mobile terminal reminds the driver based on the calculation result of the collision avoidance warning algorithm. If the vehicle-mounted terminal is connected to the Internet through a 3G/4G mobile communication device or WiFi communication device, it can interact with the mobile terminal through the network communication module, send an anticollision warning algorithm, and determine the warning situation from the vehicle to the mobile terminal to the mobile device. At the same time, the vehicle-mounted terminal can also send the traffic data and road information received by the roadside device to the mobile terminal through the network communication module, thereby displaying information out of sight to the driver in advance, improving the driver’s field of vision and driving experience.


## 5. Conclusion

Aiming at the problem of node power constraints in wireless sensor networks, this paper uses the general characteristics of wireless transmission and the temporal and spatial correlation of data collected in the network, and uses energy-saving routing protocols and data compression and aggregation technologies, such as compressed sensing, network coding, and predictive models. Reduce the amount of data collected and transmitted in the wireless sensor network, reduce the energy consumption of the nodes in the network, and alleviate the problem of node energy limitation, and then apply it to the current research status of vehicle collision warning technology. For traditional collision warning algorithms without considering the impact of abnormal driving behavior on the collision warning algorithm, which leads to problems such as incompatibility of collision warning applications, a vehicle-vehicle cooperative collision avoidance warning method based on driving behavior is proposed. In this paper, combined with the emergency braking process of the vehicle, the influence of abnormal driving behavior on the driver’s braking reaction time is studied, and the driver’s braking response time is simulated according to the driving behavior. According to the software function requirements, this paper designs a collision avoidance early warning software architecture based on layered thinking. The software architecture is divided into three layers, namely the bottom layer, the middle layer, and the application layer. The bottom layer includes a data acquisition module and a communication module, the middle layer is a data cache module and application programs, and the application layer is an anticollision warning module.With the increase of car ownership year by year, the contradiction between people and vehicles in China’s transportation system is becoming more and more serious. As the core technology of developing intelligent transportation system, vehicle road cooperation technology can not only improve the traffic efficiency in the transportation system but also play a key role in improving the safety of people and vehicles in the transportation system. This research plays an important role in promoting the information interaction of vehicle road collaborative system.



---

*Source: 8797953-2022-05-09.xml*