# Automatic Generation System for Autonomous Driving Simulation Scenarios Based on PreScan
## 4 Testing and Simulation
### Accuracy Verification  
In this study, we have selected four distinct scenarios to evaluate the functionality and accuracy of the system. These scenarios incorporate various factors, including the speed and acceleration of the HV, the speed and direction of RV, and varying weather conditions. Subsequent to the generation process, we conduct a reverse verification to ensure the fidelity of the generation. This verification is accomplished by cross-referencing the elements of the simulated scenarios against the predefined data settings within the system. A perfect correspondence results in a \"Yes\" verdict, indicating accuracy, while any discrepancies lead to a \"No\" outcome. This approach is particularly advantageous given that manual construction is prone to human errors, especially in the fine details of data manipulation. Hence, our automated system significantly mitigates the risk of inaccuracies that are often introduced during manual scenario assembly. This approach is designed to rigorously validate the system's capability to automatically generate scenarios. Detailed information about these test scenarios is presented in Table 4.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Serial** & **Functional** & **Logical Scenario** & **Parameterization** & **Accuracy** \\
**Number** & **Scenarios** & **Definition** & & **Judgment** \\ \hline a & FCW & \begin{tabular}{c} HV traveling, RV \\ stopping in same lane \\ \end{tabular} & \begin{tabular}{c} \(FCW_{1}:\) \\ \(\left\{hv\Big{\{}20_{speed}\Big{\}},rv\Big{\{}190_{distance\_hr},\beta_{ vehicle\_typey}[4]\Big{\}},\beta_{\text{weather}}[2]\right\}\) \\ \end{tabular} & Yes \\ \hline b & ICW & \begin{tabular}{c} HV right turn through \\ intersection, RV \\ straight or turn \\ through intersection \\ \end{tabular} & \begin{tabular}{c} \(ICW_{5}:\left\{hv\Big{\{}1_{speed},0.5_{acceleration}\Big{\}},rv1\Big{\{}2_{ speed},\beta_{road}[2]\Big{\}},\right.\) \\ \(\left.rv2\Big{\{}2_{speed},\beta_{road}[1]\Big{\}},rv3\Big{\{}2_{speed},\beta_{road }[2]\Big{\}},\beta_{\text{weather}}[1]\right\}\) \\ \end{tabular} & Yes \\ \hline c & VRUCW & \begin{tabular}{c} Turning at HV junction \\ with pedestrian \\ crossing ahead \\ \end{tabular} & \begin{tabular}{c} \(\left\{hv\Big{\{}4_{speed},\beta_{road}[1]\Big{\}},ped\Big{\{}0.7_{speed}\Big{\}}, \beta_{\text{weather}}[1]\Big{\}}\) \\ \end{tabular} & Yes \\ \hline d & RLVW & \
\begin{tabular}{c} The vehicle arrives at \\ the intersection with a \\ red light. \\ \end{tabular} &
\begin{tabular}{c} \(RLVW_{1}:\left\{hv\Big{\{}5_{speed}\Big{\}},500_{lux},\beta_{\text{weather}}[3] \Big{\}}\) \\ \end{tabular} & Yes \\ \hline \hline \end{tabular}
\end{table}
Table 4: Test scenarios parameter information.  
Figure 5: Scenario introduction and parameter setting function.  
The test procedure, as depicted in Figure 6, evaluates various scenarios. The vehicle type of RV can be clearly observed in the FCW as a truck, and the weather is rainy, and the speed of HV can be seen in the results as 20 m/s, and the distance between HV and RV is 190 m. In the ICW, RV1 is set as a straight line, RV2 is set as a right turn, and RV3 is set as a straight line, and the state of the vehicle can be clearly seen in the visualization scenario. In the VRUCW set HV left turn, the speed of crossing pedestrian is 0.7 m/s, the generation results are accurate. In the RLVW, red light running warning, set HV speed is 5 m/s, the light is 500 lux, the weather is snowy. The above four scenarios verify the versatility of the system in this paper, which can accurately generate scenarios with different factors and under different working conditions.  
Figure 6: _Cont._