The Design and Implementation of the Curved Road Radar Early-Warning System

The curved road is complicated and special, becoming the high incidence area of traffic accidents. In this paper, a curved road radar early-warning system is designed and implemented. The system is using a 24 GHz traffic radar to detect vehicles in the curved road, analyzing the radar data by the microprocessor STC12C5A60S2, and displaying the results by the Light-Emitting Diode (LED) display screen. The system can provide real-time warning for vehicles, enhance the security of the crossing in the curved road, and reduce traffic accidents effectively.


Introduction
The curved road is the high incidence area of traffic accidents. The traffic accident in the curved road is multiple and high hazard. According to the annual statistical report of traffic accidents released in recent years in China [1] . In 2011,traffic accidents in the curved road account for 6.59% of all traffic accidents，and the number of deaths accounted for 14.2% of the total number of deaths in 2011.In 2014, traffic accidents in the curved road account for 6.59% of all traffic accidents 7.84%，and the number of deaths accounted for 16.3% of the total number of deaths. Proportion of traffic accidents and death rose by 1.25% and 2.1%.There is still a serious problem in the curved road safety. Studies [2] have shown that traffic accidents can be reduced 50% to 90% if a warning was shown to the drivers one second before the accident.
Scholars mainly study the factors that affect the traffic safety and obtained a lot of production [3][4][5] .At present, it is used to install road reflecting mirrors in the curved road to reduce the risk of traffic accidents. Road safety in the curved road is easily ignored. There is a few early-warning systems in the market that shows the drivers the condition of the curved road. Therefore, to study and implementation the curved road early-warning system will be very important and helpful for reducing the traffic accidents.

The Design Concept
The road reflecting mirror is often used in the curved road which prompts drivers and pedestrians to pay attention to the curved road .However, the road reflecting mirror has shortcomings of short visual distance, the mirror surface needs to be cleaned and maintained regularly, and the visibility is low in heavy weather such as rain and snow.
24GHz traffic radar has excellent performance and wide application range. It is often used as Vehicle Collision Avoidance Radar and Vehicle Ranging Radar [6][7][8][9] . 24GHz traffic radar can detect long-range targets both day and night. It is sensitive to moving-targets and is not affected by bad weather. It can make up the shortcomings of the road reflecting mirror perfectly. Accordingly, it is the best choice for the system to detect the vehicles in the curved road by using 24GHz traffic radar.
A simulation system is shown in Figure 1.The system is composed of three components. In the first part, radar detects moving-targets. In the second part, the microprocessor STC12C5A60S2 analyzes radar data. The LED shows the corresponding warning information in the third part.

Hardware Design
The curved road radar early-warning system can solve the problem of vehicles detection and real-time warning in the curved road. The equipment used in this system including 24GHz traffic radar, microprocessor STC12C5A60S2, Controller Area Network (CAN)bus transceiver, LED display screen, LED controller , solar power supply system and so on.

Brief Introduction of Traffic Radar
The radar uses the Doppler frequency to extract the velocity of targets to distinguish the motion and the stationary targets, and to obtain the detection distance by comparing the frequency difference between the received signal and the transmitted signal [10][11] . The 24GHz traffic radar sensor adopts the Frequency-Modulated Continuous-Wave (FMCW) system, with small size, light weight, high detection precision and strong anti-interference ability, and can detect 32 targets in the same time. The data refresh time is 30ms, the angle of azimuth ≥30°the angle of pitch ≥12°. The radar transmitted CAN signal according to the CAN [12] communication protocol. 24GHz traffic radar can be applied to over-speed snapshotting, traffic flow monitoring, public security monitoring and so on.

Brief Introduction of Microprocessor and Interface Circuits
Microprocessor STC12C5A60S2 is a single clock micro-controller which produced by STC Bearings GMBH. It is a new generation of 8051 Microcontroller Unit (MCU) with high speed, low power consumption and super strong anti-interference. The instruction code is fully compatible with traditional 8051 MCU and runs 8~12 times faster than traditional 8051 MCU. CAN bus uses differential signal transmission which has the advantages of high transmission rate, long transmission distance and strong ability to resist electromagnetic interference. When processing radar data by a microprocessor, the CAN bus transceiver is required to convert the differential transmission signal on the CAN bus into a single end signal to adapt to the microprocessor I/O port via the level conversion. The level converter circuit is shown in Figure 2.

Fig. 2. CAN/TLL Converter circuit
The I/O port of microprocessor is TTL level, and the input port of LED controller adopts RS232 level. Therefore, the microprocessor can control the LED controller through the RS232/TTL converter .The RS232/TTL converter circuit is shown in Figure 3.

System Power Supply
The working voltage of the radar is 12V, the working voltage of the microprocessor and the CAN filter is 5V, and the working voltage of the LED display screen is 220V. The curved road radar early-warning system works in the wild environment most of time, so it can use the solar panels to supply power to the system. The system can also run normally even though in the remote area where could not connect the city electricity. The solar power system consists of two 18V50W single crystal silicon solar panels, a 12V38AH silicon energy storage battery and a number of controllers, with 220V, 12V and 5V power interfaces.

Software Design
The control core of the system is the microprocessor STC12C5A60S2, and the program is written through the development tool Keil uVision4. The function of the program is to judge whether the radar data contains the information of movingtargets, and to carry out relevant operations. The working flow of the microprocessor is shown in Figure 4. Initializing the serial port of microprocessor. After the level conversion, the radar data frame is a standard data frame with a specific ID, and the standard data frame consists of 2 bytes ID and 8 bytes data. Therefore, to define an array of 10 in length and extracts the radar data which stored in Serial Data Buffer (SBUF), and stores radar data in the defined array. 2. Counting the number of received, when the number of received is 10, it means that a standard data frame has been received completely, then stop to store radar data. 3. According to the CAN bus communication protocol, each target contains a specific frame ID. Therefore, it is necessary to analyze the data in the array to determine whether the array data contains the frame ID of target. If the array data contains the frame ID of target, it means a target has been detected. Then sending specific data to LED controller from the Receive Data (RXD) port of microprocessor. Driving the LED display screen displays as "Coming A CAR". If the array data do not contain the frame ID of target, it means a target has not been detected. Then sending specific data to LED controller from the Transmit Data (TXD) port of microprocessor. Driving the LED display screen displays as "Curved Road Ahead" 4. Finishing the processing of a standard data frame and waiting for next radar data frame.

System Working Flow
The working flow of the system is shown in Figure 5. The radar detector is set up in the curved road, and the radar detection signal is used to detect the moving-targets that will arrive in the curved road, and the moving-targets including pedestrians, animals, motorcycles, bicycle and so on. The radar receives and processes the echo signal, then transmits in the form of CAN signal. The I/O port of microprocessor can only receive the TTL signal, and the CAN signal is needed to be converted into the TTL signal to pass into the RXD port of the microprocessor by CAN bus transceiver. 2. The RXD port of microprocessor receives the data and performs the corresponding operation. If the signal contains the information of a target, converts the TTL level to the RS232 level and sends the corresponding data to the LED controller and vice versa. 3. The LED controller receives the data which sent by the microprocessor and drives the LED display screen to display the corresponding warning information. If detects a target, the LED shows "Coming A Car", else the LED display screen shows "Curved Road Ahead". This process has completed the analysis and processing of a radar data frame, it means that a radar curved road early-warning displays has been completed.
Test and Analysis

System Testing and Statistics
The system is tested at different intersections. The purpose of the test is to detect the detection probability and the detection distance of moving-targets, including bicycles, motorcycles, cars, trucks and buses and so on. The detection probability statistics are shown in Table 1. The average probability of the successful detection is 97.71% through the table 1, of which the maximum detection probability is 100% for the truck / bus, and the lowest probability for the bicycle detection is 93.81%. However, the average probability is acceptable .The system detection distance statistics are shown in Table 2.

System Analysis
The test results show in the probability of successful detection and early-warning of the system is high, and has a far detection distance. The system also has some shortcomings that is the detection probability of the bicycle is not high enough and the detection distance is not far enough. The maximum detection distance of the radar is related to the speed of targets and the Radar-Cross Section (RCS), and the average RCS and the motion speed of bicycles are too small, hence the detection probability and the detection distance of bicycle is smaller than other vehicles.

Conclusions
In this paper, a curved road radar early-warning system is designed and implementation. The radar is used to detect the moving-targets, and the early-warning signal is displayed by the LED display screen in the curved road. It can enhance the security of the crossing in the curved road, and reduce traffic accidents effectively. The system has been test completely, runs stably and reliably.