Study on a Right-Turning Intelligent Vehicle Collision Warning and Avoidance Algorithm Based on Monte Carlo Simulation

With the development of intelligent vehicle technology, the demand for advanced driver assistant systems kept increasing. To improve the performance of the active safety systems, we focused on right-turning vehicle’s collision warning and avoidance. We put forward an algorithm based on Monte Carlo simulation to calculate the collision probability between the right-turning vehicle and another vehicle (or pedestrian) in intersections. We drew collision probability curves which used time-to-collision as the horizontal axis and collision probability as the vertical axis. We established a three-level collision warning system and used software to calculate and simulate the collision probability and warning process. To avoid the collision actively when turning right, a two-stage braking strategy is applied. Taking four right-turning collision conditions as examples, the two-stage braking strategy was applied, analysing and comparing the anteroposterior curve diagram simultaneously to avoid collision actively and reduce collision probability. By comparison, the collision probability 2s before active collision avoidance was more than 80% and the collision probability may even reach 100% in certain conditions. To improve the active safety performance, the two-stage braking strategy can reduce the collision probability from exceeding 50% to approaching 0% in 2s and reduce collision probability to less than 5% in 3s. By changing four initial positions, the collision probability curve calculation algorithm and the two-stage braking strategy are validated and analysed. The results veriﬁed the rationality of the collision probability curve calculation algorithm and the two-stage braking strategy.


Introduction
With the development of vehicle active safety systems, ADAS can solve traffic safety problems in challenging crashes situations. e current ADAS focuses mainly on turning left, and studying the right-turning process was also important for improving traffic safety. Considering that the driver in mainland China was sitting on the left side, there was a large blind spot in the process of turning right, and the algorithm was designed by taking the right turn as an example. e right-turning condition was special and relatively complex [1] because drivers needed to give attention to pedestrians crossing the road while avoiding vehicles coming from the left side and drivers had a visual blind spot during the right-turning [2]. erefore, the right-turning condition of an intelligent vehicle was studied and analysed.
In intersections, the intelligent vehicle's turning condition was a complex traffic scene which possesses a high accident rate [3,4]. ere are increasing numbers of collisions between right-turning vehicles and pedestrians (or other vehicles) [5,6]. erefore, it was necessary to reduce the collision probability by technical means. At present, most previous studies focused on the forward collision warning (FCW) system and active collision avoidance [7]; however, there was a lack of research on the collisions caused by right-turning vehicles. Some researchers estimated the motion state of vehicles and pedestrians [8,9]. By establishing a probability model, Hashimoto et al. predicted and identified a pedestrian's crossing decision in advance [10]; however, this research lacked the calculation of collision probability for a vehicle on a right-turning course. In rightturning collision-related research, Sitao et al. put forward an intersection optimization design to reduce the collision probability between right-turning vehicles and pedestrians [11], but it cannot cover all possible right-turning collisions in intersections. Zhao et al. have conducted research in intelligent vehicles active collision avoidance related fields [12]. Choi and Zhao et al. adopted the autonomous emergency braking (AEB) system to avoid collisions [13,14]. However, these studies were not combined with the intelligent vehicle's right-turning condition. In this paper, Monte Carlo simulation was used to establish a random simulation algorithm which simulates the right-turning intelligent vehicle's collision probability.
e current research is summarized as follows: (1) At present, most previous studies focused on the forward collision warning (FCW) system and autonomous emergency braking (AEB) system; however, there was a lack of research on the collisions caused by right-turning vehicles.
(2) e current research focused on pedestrian intention prediction and identification, without considering the right-turn condition. e existing research on the right turn was not comprehensive enough, and the research should be extended to the vehicle and pedestrian protection during the right turn. (3) At present, AEB early warning and active intervention were mature, but there was relatively little research on early warning of traffic conflicts during the right-turn process. Current research lacked the calculation of collision probability for a vehicle on a right-turning course. e early warning mechanism should be introduced into the field of right-turn collision warning.
In order to calculate the collision probability accurately, extensively covering all possible collisions during rightturning, and actively avoiding a collision, the system described in this paper not only calculated the collision probability and designed the three-level collision warning system (CWS) but also actively avoided the collision to reduce the collision probability.
According to the algorithm based on Monte Carlo simulation to calculate the collision probability, we have improved the performance of the active safety systems, which contributed to right-turning vehicle's collision warning and avoidance. We established a three-level collision warning system and used software to calculate and simulate the collision probability and warning process. To avoid the collision actively when turning right, a two-stage braking strategy was applied. erefore, we calculated the probability of collision, through the warning level and active intervention to improve the safety of the right-turning process and reduce the accident rate.

Collision Safety Model Based on Time-to-Collision.
Our study analysed the right-turning condition and predicted four different collision modes during the rightturning process. e CWS was designed for each collision scenario, and the two-stage braking strategy was designed for each scenario to actively and simultaneously avoid collisions. Finally, by changing four initial positions, the collision probability curve calculation algorithm and the two-stage braking strategy were validated and analysed. is control scheme's technical roadmap is shown in Figure 1. e collision warning and avoidance algorithm's main process was as follows: (1) e information gathering process needs to collect the vehicle's velocity information and classify it into four modes. e four modes were as follows: a collision between a vehicle which turned right into the lane and another vehicle which merged into the same lane from the left side (scenario 1); a collision between a right-turning vehicle merging into the lane and pedestrians crossing the road in the same lane (scenario 2); a collision between the pedestrians crossing the road ahead and a right-turning vehicle (scenario 3); and a collision between a right-turning vehicle merging into the lane and another vehicle existing in the lane (scenario 4). e four modes are shown in Figure 2.
(2) We calculated the collision probability for these four modes and used the vehicle's and pedestrian's safety profile as the collision's criteria. We generated random variables for velocity and turning radius and simulated the collision probability curve using a collision probability calculation algorithm based on Monte Carlo simulation. We accumulated collision probability and plotted the collision probability curve on the three-level warning figure.
(3) We output the warning level through the three-level warning region and performed the two-stage braking strategy in the specific scenario.
In our study, we adopted the collision safety model based on time-to-collision (TTC) [1]. e driver's danger perception caused a delay, and the braking system also caused a delay. e total delay was as follows: the time in which driver included stimulation (D 1 ), identification and decision time (D 2 ), time to control action (D 3 ), and braking system delay time (d).
To ensure safety, it was necessary to ensure the safety time threshold (D s ) greater than the sum of delay (D sum ), so the CWS needed to take actions before D sum , as expressed by the following equations: D sum was generally within 3 s [15]; therefore, D s should be greater than 3 s. To reach reliable intelligent vehicle safety during right-turning conditions, the collision warning and avoidance algorithm was designed for a TTC of 5 s.

Establishment of Collision Warning Mechanism.
e three warning levels for right-turning collisions of intelligent vehicles [16,17] were defined as follows: I-level: it is low collision probability; vehicle's rightturning process was safe, so the warning system did not warn the driver. II-level: the intelligent vehicle had a certain collision probability; the warning system reminded the driver by displaying a yellow light in the dashboard. III-level: a collision could happen immediately, and the warning system reminded the driver to take action. If the TTC was within 2 s, the intelligent vehicle would perform the two-stage braking strategy to actively avoid the collision.
Many researchers believed that a collision between the vehicle and other vehicles or between the vehicle and pedestrians should have different collision warning figures, collision warning icons should be different according to the crashing objects, and their systems generated different collision warning figures based on different collision objects [18,19]. We used a conservative warning figure as the only collision warning figure, which can simultaneously simplify the collision warning mechanism and ensure security. e specific areas of the CWS are shown in Table 1 and drawn, as shown in Figure 3. During the simulations, the area where the collision probability curve was located is the warning level.

Geometric Modelling of Vehicle's and Pedestrian's Safety
Profiles.
e vehicle's right-turning process was regarded as a rigid body motion, and the vehicle's centre (O 1 ) was placed on its geometric centre. e length of the right-turning   vehicle was L 1 and the width W 1 . A second vehicle's length was L 2 , and the width was W 2 . e coordinate system was based on O 1 , and another vehicle's centre was O 2 at coordinates (a, b). e velocity of the right-turning vehicle is V 1 , and the angle with the X-axis was θ 1 . Another vehicle's velocity was V 2 , and the angle with the X-axis is θ 2 . e vehicle's coordinate system is shown in Figure 4. During the simulation, the second vehicle's or pedestrian's position was unchanging, and reversed speed equal to the speed of the second vehicle or pedestrian was applied to the turning vehicle. If the right-turning vehicle's centre (O 1 ) crossed into the second vehicle's or pedestrian's safety profiles, a collision occurs.
Many scholars regarded the car as a contour [20,21]; based on this, the second vehicle's and pedestrian's safety profiles were developed. In this study, we expanded the contour of another vehicle or pedestrian, and the expansion size was the size of the turning vehicle and used this size to establish the vehicle's and pedestrian's safety profiles. If the turning vehicle's centre crossed into the safety profiles, the collision occurred.
When another vehicle collides with the right-turning vehicle, this situation could be used as the safe contour threshold. e vehicle's safety profile was built up as follows. e front of the vehicle's safety profile was a circle with the front centre S 2 as the centre point and (L 1 + W 2 )/2 as the radius. e vehicle's rear safety profile was constructed in the same way as the front, and the transition part was a rectangle. e vehicle's safety profile is shown as Figure 5.
In the same way, the pedestrian's safety profile was centred on the pedestrian, and the pedestrian's geometric area was enlarged to determine whether the vehicle's centre (O 1 ) crossed into the pedestrian safety profile, which was the collision criterion. When the vehicle's front side collided with the pedestrian, this situation was the pedestrian's safety profile threshold. We defined the pedestrian's profile as a circle with a centre O 2 and radius D/2, and the pedestrian's safety profile was a circle with centre O 2 and radius (D + L 1 )/2. e pedestrian's safety profile is shown in Figure 6.

Right-Turning Vehicle Collision Probability Calculation Algorithm
Monte Carlo simulation theory was based on the central limit theorem and the large number theorem [22,23]. e central limit theorem showed that although the distribution of each random variable M i was unknown, ΣM i obeyed a normal distribution and could be converted to a standard normal distribution; therefore, it could be processed using the standard normal distribution properties. We defined {M i } as an independent random variable and part of a sequence of identically distributed random variables, with an expected value of O and variance of k 2 , as shown in Φ(m) represented the value of the standard normal distribution. According to equation (3), the more the samples of random variable M i were obtained, the closer the distribution was normal, which was the basis of Monte Carlo simulation theory for collision probability.
N random numbers were generated for each random variable V 1 and V 2 and the right-turning radius r. e random variables were assumed to obey the normal distribution with μ as the expected value and σ 2 as the variance [24,25]. e intelligent vehicle's position was continuously updated as sampling time increases. Sampling time is pt; each simulation calculated the collision probability within the collision analysis period (T), shown in Figure 7, to calculate whether a collision will occur in T; according to the vehicle's and pedestrian's safety profiles, PC represented the collision probability. If a collision occurred, the probability is accumulated, and the probability curve is drawn on the three-level warning figure by software.
e calculation process of collision probability for four modes was as follows. First, the right-turning vehicle's angle (θ 1 ) and coordinate calculation algorithm were introduced. e four modes were slightly different in calculation due to different initial velocity directions and initial positions, but the basic calculation principle was the same. We introduced the calculation process for θ 1 and the right-turning vehicle's coordinates (x(t), y(t)). In the i times simulation, the velocity of the right-turning vehicle was V 1 (i), turning radius was r(i), and the velocity of the second vehicle was V 2 (i). We represented TTC with t, and t represented the simulation time.
e calculation of angle θ 1 was shown in To calculate the position coordinates (x(t), y(t)) at the time t using θ 1 , , the second vehicle was regarded as stationary and the reverse speed V 2 (i) was applied to the right-turning vehicle.
When the condition met the scenario 1, the right-turning vehicle's coordinates (x(t), y(t)) were shown in When the condition met the scenario 2, the right-turning vehicle's coordinates (x(t), y(t)) were shown in When the condition met scenario 3, the right-turning vehicle's coordinates (x(t), y(t)) were shown: x(t) � r(i) − r(i)cos θ 1 .
When the condition met scenario 4, the right-turning vehicle's coordinates (x(t), y(t)) were shown in  y(t) � sin θ 1 r(i), e second step, in the i times simulation, was to judge if a collision will occur. We needed to judge whether the rightturning vehicle centre O 1 crossed the vehicle's or pedestrian's safety profile. When the condition met the scenario 1 or scenario 4, the safety profile condition of the vehicle was given in equation (9), and the probability was accumulated according to the safety profile condition: e collision between the right-turning vehicle and the pedestrians was judged by the pedestrian's safety profile condition, when the condition met the scenario 2 or scenario 3, which was given in the same way as equation (9). e probability was accumulated according to the pedestrian's safety profile condition; the pedestrian's safety profile condition was shown in

Two-Stage Braking Strategy
An intelligent right-turning vehicle collision warning and avoidance algorithm needed a braking strategy to realize active collision avoidance. We established the two-stage braking strategy. e twostage braking strategy could select the braking strength independently according to the TTC so that high-efficiency braking could be achieved, and emergency braking could be avoided to prevent the driver from being nervous and misoperating the car. e specific flow of the two-stage braking strategy was as follows: II-stage braking: if the collision probability reached 50% within 1 s (whether it reached III-level warning within 1 s), we used the II-stage braking with the amount a max . In the braking process, we considered the braking deceleration (a) approximately linearly increasing with the braking delay (d) and performed a time-domain integral operation on a, so the speed reduction amount could be obtained, thereby obtaining the vehicle speed at each sampling time. I-stage braking: if the collision probability reached 50% within 1-2 s (whether it reached III-level warning within 1-2 s), we used the I-stage braking with the amount a min . For the same reason as in the II-stage braking process, we considered the braking deceleration (a) approximately linearly increasing with the braking delay (d) and performed a time-domain integral operation on a. e two-stage braking strategy is shown in Figure 8. e time-domain integral operation of the acceleration obtained the decrease in velocity, ΔV(t), during the two-stage braking process; thereby, we obtained the speed change by time-domain integration of acceleration: e two-stage braking strategy had two sets of formulas, and equation (12) represented the II-stage braking, which was within 1 s: Equation (13) represented the I-stage braking, which was within 1-2 s: ⎧ ⎨ ⎩ (13) erefore, in each simulation, the right-turning vehicle speed V 1 (i) was obtained, and then, the updated speed V * 1 (i) was obtained, which was shown in e position coordinates (x t , y t ) of the vehicle were updated at time t, and the updated coordinates (x * t , y * t ) were shown in

Simulation Results of Each of the Four Modes
Scenario 1: the driver was sitting on the left side and needed to view the right, and it was not convenient to observe the movement of the vehicle in the left side, so it was easy to collide with another vehicle. e parameters in this scenario were defined as follows: pt � 0.01 s, T � 5 s, L1 � 8 m, W1 � 2 m, L2 � 8 m, and W2 � 2 m; the second vehicle's coordinates were (−9, 12). V 1 , V 2 , and R consist of 10,000 normally distributed random numbers; V 1 ∼ N (12, 1), V 2 ∼ N (15, 1), and R ∼ N (20, 1). We used the twostage braking strategy; the specific parameters were as follows: a max � 6 m/s 2 , a min � 3 m/s 2 , and d � 0.3 s. e collision probability curve (A curve) and the collision probability curve (B curve) after two-stage braking are shown in Figure 9. 6 Journal of Advanced Transportation

Simulation Results Analysis of Four Modes.
rough the simulation results from the four modes, by comparing the collision probability curve (A curve) and the collision probability curve (B curve) after two-stage braking, the two-stage braking strategy could reduce the collision probability that was more than 50% within 2 s to nearly 0%. e two-stage braking strategy shifted the collision probability curve (A curve) to the right so that most of the curve falls in the I-level region. Before the two-stage braking, most of the curve fell in the II-level and III-level regions. Finally, the simulation results showed that the intelligent right-turning vehicle collision probability calculation algorithm could calculate collision probability and the two-  Scenario 2: when the vehicle turned right into the lane, it was difficult to find pedestrians who were crossing the road in the lane, so it was easy to cause serious traffic accidents. e parameters in this scenario were defined as follows: pt � 0.01 s, T � 5 s, L 1 � 8 m, W 1 � 2 m, and D � 1.5 m; the pedestrian's coordinates were (8,12). V 1 , V 2 , and R consist of 10,000 normally distributed random numbers, V 1 ∼ N (14, 1), V 2 ∼ N (1, 2), and R ∼ N (20, 1); V 2 represented the velocity of the pedestrian in this case. We used the two-stage braking strategy; the specific parameters were as follows: a max � 6 m/s 2 , a min � 3 m/s 2 , and d � 0.3 s. e collision probability curve (A curve) and the collision probability curve (B curve) after two-stage braking are shown in Figure 10.  Scenario 3: because the driver had blind spots in vision, it is possible for the right-turning vehicle to collide with pedestrians crossing the road. e parameters in this scenario were defined as follows: pt � 0.01 s, T � 5 s, L 1 � 8 m, W 1 � 2 m, and D � 1.5 m; the pedestrian's coordinates were (3,9). V 1 , V 2 , and R consist of 10,000 normally distributed random numbers, V 1 ∼ N (10, 1), V 2 ∼ N (1, 0.7), R ∼ N (20, 1); V 2 represented the velocity of the pedestrian in this case. We used the two-stage braking strategy; the specific parameters were as follows: a max � 6 m/s 2 , a min � 3 m/s 2 , and d � 0.3 s. e collision probability curve (A curve) and the collision probability curve (B curve) after two-stage braking are shown in Figure 11.
Journal of Advanced Transportation stage braking algorithm significantly reduced the collision probability which can improve safety.

Comparative Analysis.
To verify the rationality of the collision probability curve calculation algorithm, we compared and analysed the collision probability curves generated using three different initial positions. Taking scenario 1 as an example and leaving the size of the two vehicles unchanged, we designed three different initial positions and changed the initial coordinates of the second vehicle, as shown in Table 2.
e collision probability curves (A curve) for the three different initial positions are shown in Figure 13.
From Figure 13, we can conclude that the collision probability was increasing from position 1 to position 3 within the period from 1 to 4.5 s, and the closer the distance between the two vehicles was, the higher the collision probability is. erefore, the calculation algorithm of the collision probability curve (A curve) can be verified.  (9,12). V 1 , V 2 , and R consist of 10000 normal distribution random numbers, V 1 ∼ N (12, 1), V 2 ∼ N (3, 1), and R ∼ N (20, 1). We used the two-stage braking strategy; the specific parameters were as follows: a max � 6 m/s 2 , a min � 3 m/s 2 , and d � 0.3 s. e collision probability curve (A curve) and the collision probability curve (B curve) after two-stage braking are shown in Figure 12.

Journal of Advanced Transportation
For the same reason, to verify the rationality of the twostage braking strategy, we compared and analysed the collision probability curves after two-stage braking generated using three different initial positions. Taking scenario 1 as an example and leaving the size of two vehicles unchanged, we designed three different initial positions and changed the initial coordinates of the second vehicle, as shown in Table 3. e collision probability curve (B curve) after two-stage braking using three different initial positions is shown in Figure 14.
From Figure 14, we can conclude that the collision probability was increasing from position 1 to position 3 within the period from 2.5 to 4.5 s, and the closer the distance between the two vehicles is, the higher the collision probability is. erefore, the two-stage braking strategy can be verified.

Conclusion
(1) Compared with the safety distance model, the safety model based on TTC can more intuitively reflect the degree of danger. e two-stage braking strategy can lower the warning level. Aiming to reduce an intelligent right-turning vehicle's collision probability, we established a three-level warning mechanism and drew the warning figure. Based on Monte Carlo stochastic simulation, we established the collision probability calculation algorithm for an intelligent right-turning vehicle at an intersection and plotted the collision probability curve on the warning figure. e area where the probability curve was located outputs the warning level.
(2) e two-stage braking strategy was established to actively avoid a collision if the collision probability reaches 50% within 2 s. We analysed four modes for a rightturning vehicle and simulated the collision probability curve (A curve) and the collision probability curve (B curve) after two-stage braking. Finally, we changed the initial position for comparative analysis and verification. (3) e simulation results from the four modes showed that the collision probability reached 80% in the 2 s before active collision avoidance, and the collision probability of some modes could reach 100%. e two-stage braking strategy reduced the collision probability to nearly 0% in 2 s, and the collision probability was reduced to less than 5% in 3 s, which improves safety significantly. (4) e collision probability curve calculation algorithm and the two-stage braking strategy were verified and analysed. By comparing three different initial positions, the comparison results showed that the collision probability curve calculation algorithm and the two-stage braking strategy were reasonable. (5) We used the Monte Carlo method to calculate the collision probability; collision warning and avoidance were carried out to reduce the collision probability of a right-turning vehicle. Our research laid the foundation for future experiments, and we will carry out experimental analysis better in future.
rough future experiments, we can perfect the collision warning and avoidance algorithm.

Data Availability
All data generated or analysed during this study were included in this article. All data and models used during the study appear in the submitted article. Part data were calculated from the algorithm and the code.

Conflicts of Interest
e authors declare that there are no conflicts of interest.