Application and Simulation of Ultrasonic Radar in Automatic Parking Function
The Automatic Parking Assistance (APA) system is an essential component of modern automotive intelligent driving technology. This system enables vehicles to complete the parking process automatically without any human intervention. Specifically, the APA system detects available parking spaces and obstacles through sensors (surround-view cameras, ultrasonic radars, etc.) placed around the vehicle, then plans the parking path and controls vehicle movement to complete the parking process. This article will focus on the application of ultrasonic radar in the APA automatic parking function and the simulation method in the HiL testing environment.
1.Application of Ultrasonic Radar in APA Automatic Parking
In the automatic parking scenario, 12 ultrasonic radars are generally arranged around the vehicle to complete the fully automatic parking function. Compared to millimeter-wave radar or other types of radars, ultrasonic radar has many advantages, such as low manufacturing cost, easy installation, and easy maintenance.
Ultrasonic radar is mainly divided into two types. One type is short-range radar installed in the front and rear bumpers for detecting obstacles, with a detection range of 15-250 cm. This type of sensor is called a PDC sensor. The other type is installed on the sides of the vehicle to detect the length of parking spaces, with a detection range of 30-500 cm. This type of sensor is called a PLA sensor. The location of PDC and PLA sensors is shown in the following figure:

In practical automatic parking scenarios, ultrasonic radar has various working modes, such as Direct Echoes mode and complex Cross Echoes mode. In the Direct Echoes working mode, the ultrasonic radar can calculate the distance between the vehicle and obstacles through the time of flight (TOF) of the sound waves. This mode is relatively simple in principle but cannot obtain the two-dimensional coordinates of obstacles, i.e., it cannot determine the spatial position of obstacles relative to the vehicle. The Cross Echoes working mode uses multiple ultrasonic radars as receivers of sound waves, allowing for better acquisition of the spatial position of obstacles relative to the vehicle, but the calculations are more complex.

2.Ultrasonic Radar Distance Measurement Principle and APA Parking Process
During parking, the ultrasonic radar can calculate and output the distance between the vehicle and surrounding obstacles in real-time. The controller software processes the ultrasonic data to fit the contours, shapes, and relative positions of surrounding obstacles. In a horizontal parking scenario, the driver activates the vehicle's APA automatic parking function, and the vehicle moves forward at low speed. Combining the ultrasonic perception data, the APA system identifies a suitable parking space. After enabling the function, the vehicle proceeds to the next steps of path planning, vehicle control, etc., until the vehicle successfully parks and exits the APA automatic parking function. The entire APA automatic parking process is shown in the following figure:

3.Basic Simulation Methods of Ultrasonic Radar
After understanding the basic working principle and vehicle layout of ultrasonic radar, some important parameters need attention:
- Measurement Range: The maximum detection distance of the ultrasonic radar.
- FOV (Field of View): The horizontal and vertical viewing angles of the ultrasonic radar.
- Radar Working Frequency: The working frequency affects the diffusion, background noise, and reflection loss of ultrasonic waves. Generally, the working frequency of ultrasonic radar is around 40 kHz.
In the HiL simulation environment, simulating the ultrasonic radar requires the use of professional scene simulation software (VTD) and bus simulation experiment management software (CANoe). In VTD, it is necessary to correctly configure various parameters of the simulated ultrasonic radar, including the radar's vehicle installation position, the maximum detection distance of the ultrasonic radar, FOV angles, etc. In the bus simulation experiment management software, the communication protocol, sending frequency, baud rate, and other settings used by the ultrasonic radar must be clarified.

In the entire simulation chain, VTD packages the closest distance between each ultrasonic radar and obstacles detected by the built-in perfect sensor or other high-precision custom-developed models into UDP and sends it to CANoe for data parsing and bus simulation. The VTD sends 12 sets of radar output UDP data in real-time. This method effectively simplifies the transmission chain while also improving the performance of the entire simulation. Of course, depending on different simulation needs, the structure of the packet data can be modified to output the three-dimensional coordinates, ID, attributes, etc., of obstacles. By obtaining different data, CANoe can be used to conduct more types of APA automatic parking tests and verifications.

CANoe supports multiple bus simulation capabilities. Combined with Vector hardware such as VN1640, VN1670, VN5650, and other sensor communication devices, it can provide controllers with protocol support such as CAN/CAN FD, TCP/UDP, SOME/IP, DSI3, etc. The software also provides a VN hardware configuration window, making it convenient for users to manage VN interface boxes in the simulation system.
4.Polelink’s APA Simulation Function Technical Solution
Polelink has implemented and delivered various ultrasonic simulation test solutions in its projects. For ultrasonic radar simulation on SOME/IP, CAN/CAN FD buses, CANoe combined with VN1670, VN5650, or other communication interface boxes can provide a bus simulation platform with higher accuracy, more stable message transmission cycles, and richer fault injection types.
The DSI3 bus protocol has advantages such as asynchronous single-wire current-voltage communication in a master-slave one-to-many configuration, automatic ID allocation, asynchronous communication, low cost, strong anti-interference, and support for the transmission of various data formats. It is highly suitable for automotive functional safety applications. After combining CANoe with VTD, the simulated obstacle distance detected by ultrasonic radar is output to CANoe. CANoe processes the distance data into the required TOF data format and sends it to the DSI3 communication device. The DSI3 communication device converts the simulated ultrasonic data into a signal and sends it to the controller under test, completing the 12-channel ultrasonic data simulation.
When using the perfect sensor in VTD to detect obstacles around the vehicle, due to the characteristics of the perfect sensor, there may be certain distance errors. The simulation scheme of the perfect sensor cannot respond to millimeter-level distances. To compensate for this error, more additional algorithms are needed to correct the errors. This not only occupies more computing resources, but the processed results may not perfectly correct the errors. As shown in the following figure:
To address this, Polelink provides an ultrasonic model based on the ray tracing principle for distance measurement. Compared to using 12 channels of perfect sensors, the ray tracing sensor model can provide millimeter or even micrometer-level distance detection. It integrates the 12-channel sensor model into a single ray tracing ultrasonic model, significantly simplifying the sensor layout in the project and improving simulation efficiency. The model's operating environment requires support from the NVIDIA CUDA environment and allows the configuration of the ultrasonic radar's maximum detection distance, FOV, installation position, simulation frequency, and more. The ray tracing principle is shown in the following figure:

Conclusion
As an important part of intelligent driving, the APA automatic parking function faces increasingly complex parking environments. HiL testing can accelerate APA function development and testing verification through virtualization and simulation methods, reducing the cost of real vehicle testing and verification for APA. By constructing more complex and diverse parking scenarios, APA function testing coverage can be verified. Polelink has extensive successful solutions and implementation experience in intelligent driving MiL/SiL/HiL/ViL testing. In continuous project development, Polelink is also committed to technical verification and implementation of new solutions, contributing to the development of intelligent connected vehicles in China.

