# Research on Risk Detection of Autonomous Vehicle Based on Rapidly-Exploring Random Tree

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Basic of Risk Detection Based on RRT

- (1)
- Define the initial point (${\mathrm{q}}_{\mathrm{start}}$) and target point (${\mathrm{q}}_{\mathrm{goal}}$), and deem the later one as the root node of RRT in the space Z.
- (2)
- Select a sampling point ${\mathrm{q}}_{\mathrm{rand}}$randomly.
- (3)
- Check whether ${\mathrm{q}}_{\mathrm{rand}}$ is in the space with obstacle, desert it while ensuring it is in the space, and then repeat last step.
- (4)
- Try to generate a branch $\left[{\mathrm{q}}_{\mathrm{near}},{\mathrm{q}}_{\mathrm{new}}\right]$ along the direction of $\left[{\mathrm{q}}_{\mathrm{near}},{\mathrm{q}}_{\mathrm{rand}}\right]$ with step space $\mathcal{E}$.
- (5)
- Check whether the new branch passes through an obstacle, add ${\mathrm{q}}_{\mathrm{new}}$ into RRT as a new leaf node when the new branch does not pass through an obstacle. Otherwise, repeat Step (2).
- (6)
- Check whether the new branch meets the requirement of being less than the threshold. If it meets the requirement, the path planning ends.
- (7)
- Repeat Step (2) to Step (6); if iterations exceed definitive maximum iterations, path planning can be deemed as a failure.

- (1)
- The size of the vehicle itself and the actual situation of the vehicle in operation are ignored.
- (2)
- In the case of dense obstacles, the complexity of this algorithm will increase significantly, resulting in low efficiency and even a low success rate.
- (3)
- The calculation efficiency of random number will decrease when it is used for path planning in the spatial environment. If the expansion branch is added, it will not only further reduce the efficiency, but may also cause the collision of the planned path.

## 3. Path Detection Based on Epirelief Curve Model

- (1)
- The road is assumed in the bottom half of the image.
- (2)
- The geometrical model applied for the design of the left lane line and right lane line can be deemed a complicated curvilinear function.
- (3)
- In the epirelief curve, the part on the left of the maximum value is the left lane line, and the part on the right of the maximum value is the right lane line.

## 4. Risk Detection of Autonomous Vehicle Based on NPCD

_{new}, that is to say, ${\mathrm{P}}_{\mathrm{i}}\left({\mathrm{x}}_{{\mathrm{P}}_{\mathrm{i}}},{\mathrm{y}}_{{\mathrm{P}}_{\mathrm{i}}}\right)$ with step size of ${\mathrm{N}}_{\mathrm{i}}\left({\mathrm{x}}_{{\mathrm{N}}_{\mathrm{i}}},{\mathrm{y}}_{{\mathrm{N}}_{\mathrm{i}}}\right)$ from ${\mathrm{N}}_{\mathrm{i}}\left({\mathrm{x}}_{{\mathrm{N}}_{\mathrm{i}}},{\mathrm{y}}_{{\mathrm{N}}_{\mathrm{i}}}\right)$ to ${\mathrm{q}}_{\mathrm{rand}}$, is the father node of ${\mathrm{N}}_{\mathrm{i}}\left({\mathrm{x}}_{{\mathrm{N}}_{\mathrm{i}}},{\mathrm{y}}_{{\mathrm{N}}_{\mathrm{i}}}\right)$. Define ${\mathsf{\Delta}\mathrm{P}}_{\mathrm{i}}{\mathrm{N}}_{\mathrm{i}}$, where ${\mathsf{\Delta}\mathrm{P}}_{\mathrm{i}}{\mathrm{N}}_{\mathrm{i}}={\mathrm{N}}_{\mathrm{i}}-{\mathrm{P}}_{\mathrm{i}}$ as the path node from the peak to the father node and ${\mathsf{\Delta}\mathrm{N}}_{\mathrm{i}}{\mathrm{S}}_{\mathrm{i}}={\mathrm{S}}_{\mathrm{i}}-{\mathrm{N}}_{\mathrm{i}}$ serves as the path node from the secondary peak to the current node. Given the restraint condition of maximum steering angle ${\mathsf{\phi}}_{\mathrm{max}}$, the break angle ${\varnothing}_{\mathrm{i}}\text{}$between two paths ought to accord with the condition which is shown in (4), as follows:

- (1)
- Set threshold value $\mathsf{\alpha}\in \left(0,\text{}1\right)$
- (2)
- Generate random number $\mathrm{p}\in \left(0,1\right)$; when $\mathrm{p}\in \left(0,\text{}\mathsf{\alpha}\right)$, take a sample ${\mathrm{q}}_{\mathrm{rand}}$ randomly in state space; otherwise take terminal point ${\mathrm{q}}_{\mathrm{goal}}$ as ${\mathrm{q}}_{\mathrm{rand}}$.
- (3)
- Check whether ${\mathrm{q}}_{\mathrm{rand}}$ is in the space within obstacles. if it is in the space, desert it and repeat Step (2).
- (4)
- Figure out the break angle between the two paths and check whether it accords with the constrain condition of maximum steering angle; if it does not accord, rectify the direction of the sample, or execute Step (5).
- (5)
- Try to work out a new branch $\left[{\mathrm{q}}_{\mathrm{near}},{\mathrm{q}}_{\mathrm{new}}\right]$ with a step size of $\mathrm{L}$ and along the direction of $\left[{\mathrm{q}}_{\mathrm{near}},{\mathrm{q}}_{\mathrm{rand}}\right]$. In particular, ${\mathrm{q}}_{\mathrm{near}}$ is the nearest node to ${\mathrm{q}}_{\mathrm{rand}}$, where ${\mathrm{q}}_{\mathrm{new}}$ is located in the line segment between ${\mathrm{q}}_{\mathrm{near}}$ and ${\mathrm{q}}_{\mathrm{rand}}$, and the distance between ${\mathrm{q}}_{\mathrm{new}}$ and ${\mathrm{q}}_{\mathrm{near}}$ is $\mathrm{L}$.
- (6)
- Check whether the new branch passes through obstacle, add ${\mathrm{q}}_{\mathrm{new}}$ into RRT as a new leaf node when the new branch does not pass through an obstacle; otherwise, repeat Step (2).
- (7)
- Check whether the distance between ${\mathrm{q}}_{\mathrm{new}}$ and ${\mathrm{q}}_{\mathrm{goal}}\text{}$is less than the threshold value and whether the new branch collides with the obstacle; if the distance is less than threshold value and new branch does not collide with obstacle, path planning can be deemed a success.
- (8)
- Repeat Steps (2) to (8); if number of repetitions exceed maximum iterations, path planning can be deemed a failure.

#### 4.1. Construction of Automobile Turning Model

- (1)
- The boundary line inside can be calculated;
- (2)
- The turning center is in a straight line with the rear wheel turning center;
- (3)
- The turning line in the rear wheel is the track line. According to the above constraints, the following constraint equations can be determined:

#### 4.2. Optimization of Risk Detection for Autonomous Vehicle

_{1}) and the rear outer vehicle position as (B

_{1}). The coordinates can be expressed as follows:

#### 4.3. PM Path Modification Strategy

- (1)
- Before the automobile reaches its turning point, the author shifts it so as to make its rear wheel located on the circumference, which consists of turning the trod line of the inside front wheel when the automobile reaches a turning point. In this case, when the automobile is turning for the break angle between two segments, its inside rear wheel is located on the turning point of the inside boundary of the safe cavity.
- (2)
- There is no doubt that driving in the safe cavity is safe, and, thus, prolonging the distance of driving in the safe cavity will reduce the probability of collision. In order to achieve this goal, it is necessary to implement deviation treatment and guarantee the shortest distance.

## 5. Analysis on Emulation Experiment

#### 5.1. Experiment Scene

#### 5.2. Design of Emulation Experiment

#### 5.3. Analysis on Result of Emulation Experiment

- (1)
- Path planning based on AV-RRT accords to the kinematical constraint condition.

- (2)
- Functional examination for AV-RRT algorithm

- (3)
- Functional Examination of Algorithm Based on AV-RRT

#### 5.4. Analysis on Performance Examination Based on AV-RRT Algorithm

- (1)
- Comparison of Extended Nodes [27] Based on AV-RRT and based on RRT

- (2)
- Comparison of Path Nodes based on AV-RRT and based on RRT

- (3)
- Comparison of Consumption of Time based on AV-RRT and based on RRT

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Chen, X.L.; Chen, W.S.; Rao, Y.H.; Huang, Y.; Key, C.; Dong, Y.L. Progress and prospect of radar detection and recognition technology of flying bird and UAV targets. J. Radars
**2020**, 9, 803–827. [Google Scholar] [CrossRef] - Li, L. Research on Pedestrian Detection Model and Compression Technology for UAV Images. Sensors
**2022**, 22, 9171. [Google Scholar] [CrossRef] [PubMed] - Zheng, Y.; Wang, J.; Li, K. Smoothing traffic flow via control of autonomous vehicles. IEEE Internet Things J.
**2020**, 7, 3882–3896. [Google Scholar] [CrossRef] [Green Version] - Lei, Y.L.; Du, Z.X.; Fang, Y.B.; Wang, T.Y. Application of UAV-borne laser scanning imaging in substation equipment operation and maintenance management. Electron. Des. Eng.
**2019**, 27, 185–188. [Google Scholar] [CrossRef] - Chen, S.; Su, C.; Kuang, Z. Real-time detection of UAV detection image of power line insulator bursting based on YOLOV3. J. Phys. Conf. Ser.
**2020**, 1544, 012117. [Google Scholar] [CrossRef] - Li, N.; Zheng, Q.; Xie, G.W.; Chen, W. Detection of defects in transmission line based on the unmanned aerial vehicle image recognition technology. Electron. Des. Eng.
**2019**, 27, 102–106. [Google Scholar] [CrossRef] - Stefan, I.; Ante, S.; Bojan, C. Constrained multi-agent ergodic area surveying control based on finite element approximation of the potential field. Eng. Appl. Artif. Intell.
**2022**, 116, 105441. [Google Scholar] [CrossRef] - Tang, W.Y.; Ding, C.L.; Pan, Y.Y.; Yang, Z. An Analysis of Visual Characteristics of Drivers Over Continuous Highway Tunnels. J. Transp. Inf. Saf.
**2022**, 40, 54–62. [Google Scholar] [CrossRef] - Zhao, X.; Pang, M.B. A Control method of Dedicated Lanes for Mixed Use of Special Vehicles and CAVs Based on Dynamic Clear Distance. J. Transp. Inf. Saf.
**2022**, 40, 118–126. [Google Scholar] [CrossRef] - Xie, D.; Xu, Y.; Wang, R.; Su, Z. Obstacle Detection and Tracking for Unmanned Vehicles Based on 3D Laser Radar. Automot. Eng.
**2018**, 40, 952–959. [Google Scholar] [CrossRef] - Ge, J.; Orosz, G. Connected cruise control among human-driven vehicles: Experiment-based parameter estimation and optimal control design. Transp. Res. Part C-Emerg. Technol.
**2018**, 95, 445–459. [Google Scholar] [CrossRef] - Qian, Y.; Wei, Y.; Kong, D. Experimental investigation on motor noise reduction of Unmanned Aerial Vehicles. Appl. Acoust.
**2021**, 26, 176. [Google Scholar] [CrossRef] - Whelan, J.; Almehmadi, A.; El-Khatib, K. Artificial intelligence for intrusion detection systems in Unmanned Aerial Vehicles. Comput. Electr. Eng.
**2022**, 99, 107784. [Google Scholar] [CrossRef] - Yuan, C.; Zhang, Y.M.; Liu, Z.X. A survey on technologies for automatic forest fire monitoring, detection, and fighting using unmanned aerial vehicles and remote sensing techniques. Can. J. For. Res.
**2015**, 45, 783–792. [Google Scholar] [CrossRef] - Liberatore, V.; Newman, W.; Bhasin, K. IP Communication and Distributed Agents for Unmanned Autonomous Vehicles. In Proceedings of the 2nd AIAA “Unmanned Unlimited” Conf. and Workshop & Exhibit, San Diego, CA, USA, 15–18 September 2003. [Google Scholar] [CrossRef] [Green Version]
- Alulema, V.; Valencia, E.; Cando, E.; Hidalgo, V.; Rodriguez, D. Propulsion Sizing Correlations for Electrical and Fuel Powered Unmanned Aerial Vehicles. Aerospace
**2021**, 8, 171. [Google Scholar] [CrossRef] - Sachdeva, H.; Gupta, S.; Misra, A. Improving Privacy and Security in Unmanned Aerial Vehicles Network using Blockchain. arXiv
**2022**, arXiv:2201.06100. [Google Scholar] [CrossRef] - Dey, K.C.; Yan, L.; Wang, X. A review of communication, driver characteristics, and controls aspects of cooperative adaptive cruise control (CACC). IEEE Trans. Intell. Transp. Syst.
**2016**, 17, 491–509. [Google Scholar] [CrossRef] - Diyachuk, A.K.; Orkin, B.D.; Orkin, S.D. Planning, simulation and mission efficiency estimation of piloted and unmanned aerial vehicles in standard operations of their application. J. Phys. Conf. Ser.
**2021**, 1958, 012011. [Google Scholar] [CrossRef] - Ding, Y.; Zhuang, W.; Wang, L. Safe and optimal lane-change path planning for automated driving. Proc. Inst. Mech. Eng. Part D J. Automob. Eng.
**2020**, 235, 1070–1083. [Google Scholar] [CrossRef] - Chandy, D.A.; Yohannan, B.; Christinal, A.H. Drivable path detection based on image fusion for unmanned ground vehicles. Int. J. Veh. Auton. Syst.
**2019**, 14, 265. [Google Scholar] [CrossRef] - Peng, Z.R.; Liu, X.F.; Zhang, L.Y.; Sun, J. Research progress and prospect of UAV applications in transportation information collection. J. Traffic Transp. Eng.
**2012**, 12, 119–126. [Google Scholar] [CrossRef] - Wang, J.; Zhang, X.; Kang, H. Test Method and Risk Factor Definition of Forward Collision Warning System. IEEE Access
**2020**, 8, 47730–47740. [Google Scholar] [CrossRef] - Xu, Y.R.; Li, P.C. Developing Tendency of Unmanned Underwater Vehicles. Chin. J. Nat.
**2011**, 33, 125–131. [Google Scholar] [CrossRef] - Bennet, D.J.; Mcinnes, C.R. Verifiable control of a swarm of unmanned aerial vehicles. Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng.
**2009**, 223, 939–953. [Google Scholar] [CrossRef] [Green Version] - Ingham, L.A.; Jones, T.; Maneschijn, A. Considerations for UAV design and operation in South African airspace. Aeronaut. J.
**2006**, 110, 695–701. [Google Scholar] [CrossRef] - Gil, G.; Lee, S. In-Plane Bending and Shear Deformation of Belt Contributions on Tire Cornering Stiffness Characteristics. Tire Sci. Technol.
**2021**, 49, 276–297. [Google Scholar] [CrossRef] - Muralidharan, A.; Mostofi, Y. Energy Optimal Distributed Beamforming using Unmanned Vehicles. IEEE Trans. Control Netw. Syst.
**2018**, 5, 1529–1540. [Google Scholar] [CrossRef] - Yang, J.M.; Tseng, C.M.; Tseng, P.S. Path planning on satellite images for unmanned surface vehicles. Int. J. Nav. Archit. Ocean Eng.
**2015**, 7, 87–99. [Google Scholar] [CrossRef] [Green Version] - Yu, K.; Dutkiewicz, E. NLOS identification and mitigation for mobile tracking. IEEE Trans. Aerosp. Electron. Syst.
**2013**, 49, 1438–1452. [Google Scholar] [CrossRef]

**Figure 4.**Detection results of two direction detectors. (

**a**) 45” lane line detector, and (

**b**) 135” lane line detector.

**Figure 5.**Test results of different detectors. (

**a**) Original image, (

**b**) Sobel detector, (

**c**) Prewitt detector, and (

**d**) Canny detector.

**Figure 8.**Simulation experiment scene of sparse, moderate, and dense obstacles. (

**a**) Sparse obstacle simulation, (

**b**) Moderate obstacle simulation and (

**c**) dense obstacle simulation.

Number | Condition |
---|---|

4.1 | ${x}_{n-1}={x}_{n}\text{}\mathrm{and}\text{}\frac{{y}_{n+1}-{y}_{n}}{{x}_{n+1}-{x}_{n}}0$ |

4.2 | ${x}_{n+1}={x}_{n}\text{}\mathrm{and}\text{}\frac{{y}_{n}-{y}_{n-1}}{{x}_{n}-{x}_{n-1}}0$ |

4.3 | ${x}_{n-1}\ne {x}_{n}\ne {x}_{n+1}\text{}\mathrm{and}\text{}0\frac{{y}_{n}-{y}_{n-1}}{{x}_{n}-{x}_{n-1}}\frac{{y}_{n+1}-{y}_{n}}{{x}_{n+1}-{x}_{n}}$ |

4.4 | ${x}_{n-1}\ne {x}_{n}\ne {x}_{n+1}\mathrm{and}\text{}\frac{{y}_{n}-{y}_{n-1}}{{x}_{n}-{x}_{n-1}}0\frac{{y}_{n+1}-{y}_{n}}{{x}_{n+1}-{x}_{n}}$ |

Number | Condition |
---|---|

4.5 | ${\mathrm{x}}_{\mathrm{n}-1}={\mathrm{x}}_{\mathrm{n}}\text{}\mathrm{and}\text{}\frac{{\mathrm{y}}_{\mathrm{n}+1}-{\mathrm{y}}_{\mathrm{n}}}{{\mathrm{x}}_{\mathrm{n}+1}-{\mathrm{x}}_{\mathrm{n}}}0$ |

4.6 | ${\mathrm{x}}_{\mathrm{n}+1}={\mathrm{x}}_{\mathrm{n}}\text{}\mathrm{and}\text{}\frac{{\mathrm{y}}_{\mathrm{n}}-{\mathrm{y}}_{\mathrm{n}-1}}{{\mathrm{x}}_{\mathrm{n}}-{\mathrm{x}}_{\mathrm{n}-1}}0$ |

4.7 | ${\mathrm{x}}_{\mathrm{n}-1}\ne {\mathrm{x}}_{\mathrm{n}}\ne {\mathrm{x}}_{\mathrm{n}+1}\text{}\mathrm{and}\text{}\frac{{\mathrm{y}}_{\mathrm{n}}-{\mathrm{y}}_{\mathrm{n}-1}}{{\mathrm{x}}_{\mathrm{n}}-{\mathrm{x}}_{\mathrm{n}-1}}\frac{{\mathrm{y}}_{\mathrm{n}+1}-{\mathrm{y}}_{\mathrm{n}}}{{\mathrm{x}}_{\mathrm{n}+1}-{\mathrm{x}}_{\mathrm{n}}}0$ |

4.8 | ${\mathrm{x}}_{\mathrm{n}-1}\ne {\mathrm{x}}_{\mathrm{n}}\ne {\mathrm{x}}_{\mathrm{n}+1}\text{}\mathrm{and}\text{}\frac{{\mathrm{y}}_{\mathrm{n}}-{\mathrm{y}}_{\mathrm{n}-1}}{{\mathrm{x}}_{\mathrm{n}}-{\mathrm{x}}_{\mathrm{n}-1}}0\frac{{\mathrm{y}}_{\mathrm{n}+1}-{\mathrm{y}}_{\mathrm{n}}}{{\mathrm{x}}_{\mathrm{n}+1}-{\mathrm{x}}_{\mathrm{n}}}$ |

Salient Point | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|

Obstacles 1 | (169,103) | (181,42) | (272,42) | |||

Obstacles 2 | (332,399) | (358,329) | (404,408) | (434,336) | ||

Obstacles 3 | (63,149) | (121,223) | (142,150) | |||

Obstacles 4 | (345,121) | (356,180) | (383,80) | (416,199) | (439,102) | (455,152) |

Salient Point | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|

Obstacles 1 | (169,103) | (181,42) | (272,42) | |||

Obstacles 2 | (332,399) | (358,329) | (404,408) | (434,336) | ||

Obstacles 3 | (63,149) | (121,223) | (142,150) | |||

Obstacles 4 | (345,121) | (356,180) | (383,80) | (416,199) | (439,102) | (455,152) |

Obstacles 5 | (87,379) | (145,333) | (177,438) | (189,361) | ||

Obstacles 6 | (202,198) | (250,162) | (250,225) | (289,198) | ||

Obstacles 7 | (229,332) | (265,289) | (265,376) | (312,332) |

Salient Point | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|

Obstacles 1 | (169,103) | (181,42) | (272,42) | |||

Obstacles 2 | (332,399) | (358,329) | (404,408) | (434,336) | ||

Obstacles 3 | (63,149) | (121,223) | (142,150) | |||

Obstacles 4 | (345,121) | (356,180) | (383,80) | (416,199) | (439,102) | (455,152) |

Obstacles 5 | (87,379) | (145,333) | (177,438) | (189,361) | ||

Obstacles 6 | (202,198) | (250,162) | (250,225) | (289,198) | ||

Obstacles 7 | (229,332) | (265,289) | (265,376) | (312,332) | ||

Obstacles 8 | (25,89) | (69,21) | (104,138) | (148,66) | ||

Obstacles 9 | (38,272) | (59,318) | (71,238) | (111,307) | (118,260) | |

Obstacles 10 | (332,224) | (383,273) | (457,273) |

Scene | Algorithm | Number of Extended Nodes | Number of Path Nodes | Consumption of Time/s |
---|---|---|---|---|

With sparse obstacles | RRT | 679.97 | 225.90 | 37.77 |

KB-RRT | 613.47 | 234.97 | 27.42 | |

AV-RRT | 473.57 | 86.83 | 22.83 | |

With moderate obstacles | RRT | 1352.9 | 239.0 | 108.7 |

KB-RRT | 1442.1 | 232.46 | 78.04 | |

AV-RRT | 924.17 | 141.90 | 66.7 | |

With dense obstacles | RRT | 1367.6 | 243.6 | 133.63 |

KB-RRT | 1521.7 | 236.72 | 88.47 | |

AV-RRT | 1059.6 | 158.3 | 68.5 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ma, Y.; Lim, K.G.; Tan, M.K.; Chuo, H.S.E.; Farzamnia, A.; Teo, K.T.K.
Research on Risk Detection of Autonomous Vehicle Based on Rapidly-Exploring Random Tree. *Computation* **2023**, *11*, 61.
https://doi.org/10.3390/computation11030061

**AMA Style**

Ma Y, Lim KG, Tan MK, Chuo HSE, Farzamnia A, Teo KTK.
Research on Risk Detection of Autonomous Vehicle Based on Rapidly-Exploring Random Tree. *Computation*. 2023; 11(3):61.
https://doi.org/10.3390/computation11030061

**Chicago/Turabian Style**

Ma, Yincong, Kit Guan Lim, Min Keng Tan, Helen Sin Ee Chuo, Ali Farzamnia, and Kenneth Tze Kin Teo.
2023. "Research on Risk Detection of Autonomous Vehicle Based on Rapidly-Exploring Random Tree" *Computation* 11, no. 3: 61.
https://doi.org/10.3390/computation11030061