Hardware Simulation of Rear-End Collision Avoidance System Based on Fuzzy Logic

—Rear-end collisions are the most common type of traffic accident. On the highway, a real-end collision may involve more than two vehicles and cause a pile-up or chain-reaction crash. Referring to data released by the Australian Capital Territory (ACT), rear-end collisions which occurred throughout 2010 constituted as much as 43.65% of all collisions. In most cases, these rear-end collisions are caused by inattentive drivers, adverse road conditions and poor following distance. The Rear-end Collision Avoidance System (RCAS) is a device to help drivers to avoid rear-end collisions. The RCAS is a subsystem of Advanced Driver Assistance Systems (ADASs) and became an important part of the driverless car. This paper discusses a hardware simulation of a RCAS based on fuzzy logic using a remote control car. The Mamdani method was used as a fuzzy inference system and realized by using the Arduiono Uno microcontroller system. Simulation results showed that the fuzzy logic algorithm of RCAS can work as designed.

In the era of connected vehicles, an RCAS was developed into a Cooperative RCAS (CRCAS), which is an RCAS which works not only using sensors, but also with communication between vehicles, known as V2V communication. The development of an RCAS into a CRCAS was among others conducted in [19] and [20].

II. research Method
The working principle of RCAS is the distance and speed monitoring of the vehicle in front of using the sensor. When the distance is too close compared to a safe distance, the vehicle will slow down or stop if the vehicle in front stops suddenly. In the following discussion, the term following vehicle (FV) refers to a vehicle equipped with RCAS and leading vehicle (LV) refers to a vehicle driving in front of the FV in the same lane.

A. The Problem of Rear-End Collision
An illustration of rear-end collision can be seen in Fig.  1. The acceleration, velocity and position of the FV car are aF(t), vF(t) and xF(t), while acceleration, velocity and the position of the LV car are aL(t), vL(t), and xL(t). The distance between the FV and LV is R(t).
Rear-end collisions can occur with the following scenarios: 1. The LV brakes and the FV is unable to brake or avoid and then hits the LV. 2. The LV is running at a normal speed and the FV at high speed, so that it hits the LV. A rear-end collision can occur if R(t) ≤ 0, in which R(t) is the distance between the FV and LV. To avoid a rear-end collision, the FV must manoeuvre by reducing its speed or coming to a stop.
Basically, the RCAS is a system that allows the vehicle to be able to slow down or brake to a stop to avoid a rearend collision automatically. Slowing or stopping suddenly both require a sufficient distance to process, which is called the safe distance (Sd).
Rear-end collisions can occur because the distance between the FV and LV is smaller than a safe distance and the situation is not corrected. The distance insufficiency is due to limited driver or environmental influences such as weather and road conditions. The size of the vehicle can also result in a safe distance not being monitored well in large vehicles such as buses and trucks.

B. Block Diagram of RCAS
A block diagram of RCAS is shown in Fig. 2, in which Sd is a safe distance between the FV and LV, and Ad is the actual distance between the FV and LV, monitored by a distance sensor. If Ad is smaller than Sd, then the controller (Fuzzy Logic Controller, FLC) will choose how to avoid a collision with the LV. If it is still possible to adjust the distance, then the FV will brake and if it is not possible, then the FV will fully brake to a stop.

C. Fuzzy Logic-Based RCAS
The use of fuzzy logic for controlling a mobile robot has been carried out in studies [15], [21], and [22]. A block diagram of the fuzzy logic-based RCAS is provided in Fig. 3.
The input membership functions of the fuzzy logicbased RCAS can be seen in Fig. 4 and Fig. 5. The membership function of the distance input was divided into three regions, which were near, medium and far. The membership function of the change of distance input was divided into three regions, which were small, medium and big. Fig. 6 shows that the membership function of output was divided into three regions, which were slow, medium, and fast. The output variables were Pulse Width Modulation (PWM) values, indicating the desired speed. The fuzzy rule base used can be seen in Table 1.
A view of the rule viewer of FLC is presented in Fig.  7. This view was selected at a distance situation in which the FV and LV are too close and the change of distances is big. The FLC output in this situation is stop. In such a situation, the FV should fully apply the brakes to stop. The output value is 38.2 on the display rules, indicating that the RC car stopped. The input and output relationship of the  FLC can be seen in Fig. 8.

D. Hardware Simulation
A hardware simulation was built using a remote control (RC) car as shown in Fig. 9. The hardware simulation in this study used an ultrasonic sensor that was mounted on the front side of the car. The sensor was used to measure the distances of the LV from the FV. The low level of control in this study was simplified with an open loop speed control system based on PWM.
The RC car was used as the primary simulator device. This RC car had a 1:10 scale of the real car. In the hardware simulation, an ultrasonic sensor was mounted on the front of the RC car. The sensor was used to measure the distance of LV cars in front of the RC car.
The RC car was controlled using an Arduino Uno R3 microcontroller system based on ATmega328. The microcontroller system was equipped with a fuzzy logic library with Mamdani Min-Max as an inference method and defuzzification process using the centre of the area. The control signal of the main motor in the RC car was made by using a PWM signal. Through the PWM signal, the speed of RC car could be determined as needed. Important data during the testing process were stored in the Secure Digital (SD) card.

III. results and analysIs
Hardware simulation testing was divided into two sections. The first section was the subsystem testing, while the second section was the overall system testing.

A. Subsystem testing
Subsystem testing was performed on two sections, namely the proximity sensor and the speed control section of the RC car. The results of the proximity sensor measurements are presented in Fig. 10, whereas the relation speed of the RC car with the PWM value given to the DC motor of the RC car are provided in Fig. 11. It can be seen that if the voltage in the form of PWM given to the DC motor from the RC car is 150, then the RC car will go at a speed of 70 cm/s. The sensor measurements showed that the proximity sensor can measure the distance well. Good sensor performance was necessary in this study, because the distance was the input for the RC car speed control system.

B. Overall System Testing
Overall testing performed by using another RC car that acted as an LV, see Fig. 12. In the overall system, testing was performed using three variations of speed, which were slow, medium, and high speed.

Slow Speed and Stop Testing
The distance between the FV and LV was set to the close condition. At this time, the FV and LV were adjacent so that FLC output was slow if there were small changes in distance and FLC output stopped if the change of distance was medium or big. In the medium distance, the FLC output was slow if the distance changes were small and medium, while at big distance changes, the FLC output stopped. The test results are presented in Fig. 13 (a). A PWM value in the 0 to 150 range shows that the RC car drove at a slow speed or stopped. A PWM value below 100 indicates that the RC car stopped.

Medium Speed Testing
The distance between the FV and LV was set to far. The speed of the FV changed to medium speed when distance changing was big. In this situation, the LV drove more slowly than the speed of the FV. This situation was addressed by a decrease in the FV's speed to medium in order to avoid a rear collision. The test results are provided in Fig. 13 (b). Gambar

High Speed Testing
The speed of FV was high when the FV was away from the LV, as well as when the distance changing was small or medium. Testing was performed by adjusting the FV away from the LV. The test results can be seen in Fig. 13 (c). When the FV was far from the LV, the FV sped up. Once the distance between the FV and LV was near, the speed of the FV decreased. A PWM value above 200 indicates the RC car was going fast.

I. conclusIon
Simulation using software showed that the FLC of RCAS can work well to control the speed of an RC car so that a rear-end collision can be prevented. Implementation of the hardware simulation using an RC car showed the FLC of RCAS can control the car's speed to avoid a collision with the RC car in front. Improvements to the performance of the RCAS algorithm, among others, can be achieved by adding input variables, namely the speed of the car in front. The addition of the input variables can refine RC car speed changes. In hardware simulation, the improvement can be achieved by increasing the distance range of the sensor and choosing a better RC car to improve the accuracy of the designed testing.