Dynamic vehicle-in-the-loop test system and method for autonomous vehicle

Through the dynamic vehicle-in-ring testing system, the virtual road environment is created using the autonomous driving simulator, which solves the problem that the autonomous driving vehicle-in-ring testing system in the existing technology is difficult to quickly verify complex road environments, and realizes fast and convenient verification of autonomous driving functions, reducing costs.

CN119668087APending Publication Date: 2025-03-21JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510152408.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

When existing autonomous vehicles verify the autonomous driving functions in complex road environments in the ring test system, due to the real road environment, it is difficult to quickly verify various virtual road environments, resulting in high time and economic costs.

Method used

Provides a dynamic vehicle-in-the-loop testing system that creates a virtual road environment through the combination of autonomous driving simulators and autonomous vehicles. Self-driving cars can verify autonomous driving performance without going to real test roads.

Benefits of technology

It realizes the verification of autonomous driving functions at any location, and quickly verifying autonomous driving functions for various virtual road environments, reducing time and economic costs, while improving the speed and convenience of autonomous driving technology development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668087A_ABST
    Figure CN119668087A_ABST
Patent Text Reader

Abstract

The invention relates to the field of in-loop testing of automatic driving automobiles, in particular to a dynamic vehicle in-loop testing system and method for an automatic driving automobile, and the system comprises an automatic driving simulator and an automatic driving automobile. The automatic driving simulator comprises a road environment database, a simulation engine, a sensing module, a position / attitude calculation module and an interlocking module, and is used for providing a virtual road environment, simulating a virtual automatic driving automobile and creating a simulation scene; the automatic driving vehicle comprises a behavior decision / global and local motion planning module, a vehicle control module, a position monitoring module and a position / attitude receiving module, has real vehicle dynamic characteristics, and is controlled according to a simulation scene created in the automatic driving simulator to realize behavior decision, planning and tracking control. And the closed-loop test is completed. The automatic driving function is quickly verified for various virtual road environments based on the dynamic vehicle in-the-loop test system without changing a driving place.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of in-the-loop testing of autonomous driving vehicles, and in particular to a dynamic vehicle in-the-loop testing system and method for autonomous driving vehicles. Background Art

[0002] The method of verifying advanced driver assistance systems and autonomous driving functions based on real vehicles is realistic, but it is difficult to cover all road conditions and is usually used in combination with simulator verification. Autonomous driving simulators verify the functions of perception, decision-making, planning, and control algorithms used for autonomous driving by simulating virtual autonomous vehicles driving in a virtual road environment. However, this method has limitations in fully simulating the performance or status of actual operation of autonomous driving vehicles. Therefore, the method of verifying autonomous driving functions based on vehicle-in-the-loop systems came into being, which combines simulators and actual autonomous driving vehicles for verification.

[0003] In the vehicle-in-the-loop system, the real position and posture of the autonomous vehicle are mapped to the virtual position and posture in the virtual road environment. However, since the autonomous vehicle can only travel on the real road corresponding to the simulated virtual road, the autonomous driving function verification based on the vehicle-in-the-loop system may have great restrictions on the virtual road environment, and it is very inconvenient to verify in various virtual road environments.

[0004] As the level of autonomous driving improves, the requirements for verifying autonomous driving functions in complex road environments are becoming increasingly stringent. To this end, the relevant vehicle-in-the-loop system should set up new test roads, or change the test roads every time a different road environment is required for verification, which may incur huge time and economic costs. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a dynamic vehicle-in-the-loop testing system and method for an autonomous driving vehicle, which creates a virtual road environment based on a target area, so that the autonomous driving vehicle can verify its autonomous driving performance without going to a real test road.

[0006] The present invention provides a dynamic vehicle-in-the-loop testing system for an autonomous driving vehicle, comprising an autonomous driving simulator and an autonomous driving vehicle.

[0007] The autonomous driving simulator comprises: a road environment database, a simulation engine, a perception module, a position / posture calculation module and an interlocking module; and is used to provide a virtual road environment, simulate a virtual autonomous driving car, and create a simulation scene.

[0008] The road environment database is used to store virtual road environment information, including simulated road environment information and existing road environment information. The simulated road is a simulated designed road, and the existing road is a real road.

[0009] Furthermore, the road types of the virtual road environment information include but are not limited to test sites, urban roads and highways; the road environment information includes but is not limited to environmental information, road information, traffic lights, and static objects; among them, the road information includes but is not limited to road shape, road width, and number of lanes, and the static objects include but are not limited to plants and buildings.

[0010] The simulation engine creates a virtual road environment by loading virtual road environment information from a road environment database, and constructs a simulation scene for autonomous driving performance verification; and specifies the position and posture of the virtual autonomous driving car in the virtual road environment according to the virtual position and posture information calculated by the position / posture calculation module.

[0011] Optionally, when constructing a simulation scenario for verifying autonomous driving performance, traffic participants are generated in a virtual road environment. The traffic participants refer to dynamic objects in the road environment, including one or more of vehicles, pedestrians, and animals.

[0012] The perception module generates virtual sensor data generated by the virtual self-driving car driving in the simulation scene by simulating the sensors installed in the virtual self-driving car in the simulation scene, and the interlocking module then transmits the virtual sensor data to the self-driving car.

[0013] Furthermore, virtual sensor data (V2X) is generated by simulating one or more virtual sensors including camera, light detection and ranging (LiDAR), radio detection and ranging (RADAR), global navigation satellite system (GNSS) / inertial navigation system (INS) in a virtual autonomous vehicle.

[0014] Preferably, in the simulation scenario, the relative distance information of the target vehicle point generated by the virtual sensor is calculated by the following steps:

[0015] (1) Calculate the relative position of the target coordinates detected by the virtual sensor and the virtual sensor itself:

[0016] ;

[0017] In the formula, (RD x , R.D. y ) is the relative distance between the target vehicle point detected by the virtual sensor and the vehicle sensor in the simulation scenario, (X mea , Y mea) is the coordinate of the target vehicle point detected by the virtual sensor, (X sensor , Y sensor ) is the global coordinate of the virtual sensor installed on the virtual self-driving car, is the heading angle.

[0018] (2) Calculate the global coordinates of the virtual sensor itself:

[0019] ;

[0020] Where, the global coordinates of the virtual sensor (X sensor , Y sensor ) by adding a displacement (d x , d y ), and then perform a rotation transformation to match the direction of the vehicle; (d x ,dy) is the position offset of the RTK-GPS device relative to the virtual sensor, (X ego , Y ego ) is the global coordinate of the virtual autonomous vehicle.

[0021] (3) Calculate the target coordinates detected by the virtual sensor:

[0022] ;

[0023] In the formula, (X traf , Y traf ) is the global coordinate of the target vehicle, and its heading angle is ; The offset generated by the target point detected by the vehicle sensor ( l x , l y ) to perform rotation transformation and obtain the coordinates of the target point detected by the vehicle sensor.

[0024] In addition, in the virtual simulation scenario, the error is calculated and the normally distributed noise is inserted. The calculated error data is used to generate the normally distributed noise, which is then added to the relative distance and relative speed calculations to more realistically simulate the uncertainty of the sensor data. The calculation is performed through the following steps:

[0025] (1) Calculate the mean of the error data:

[0026] ;

[0027] Where μ is the mean value, which is used to simulate the offset of the perception error; X k is the error between the RTK-GPS data of the virtual ego vehicle and the actual virtual sensor measurement data, and n is the number of samples of the error data.

[0028] (2) Calculate the variance of the error data:

[0029] ;

[0030] In the formula, σ 2 is the variance, which indicates the degree of dispersion of error data.

[0031] (3) Generate noise N (μ, σ) that conforms to the normal distribution 2 ):

[0032] ;

[0033] The above formula generates a mean μ and variance σ 2 Normally distributed noise is added to the relative distance and relative speed perceived in the simulation scene to enhance the authenticity of the virtual sensor data.

[0034] The position / attitude calculation module obtains the real position and attitude of the autonomous driving vehicle from the interlocking module, converts the real position and attitude into the virtual position and attitude of the virtual autonomous driving vehicle in the simulation scene, and then transmits the converted position and attitude to the simulation engine and renders it into the simulation scene.

[0035] Preferably, the method in which the position / attitude calculation module converts the real position and attitude into the virtual position and attitude of the virtual autonomous driving car in the simulation scene is as follows:

[0036] The initial real position P of the autonomous vehicle in the real road environment on the reference coordinate system R R,org G , the actual position P that the self-driving car moves to during driving R,tk G , the virtual self-driving car in the virtual road environment is in the coordinate system V The initial virtual position P on V,org G and the virtual position P to which it moves during driving V,tk G .

[0037] The position change P of the autonomous vehicle in the reference coordinate system R R,tk R The formula for calculation is: , is the rotation matrix from the global coordinate system G to the reference coordinate system R.

[0038] Virtual self-driving car in coordinate system V The position change P V,tk VSame as the position change of the self-driving car, the formula is: P R,tk R =P V,tk V .

[0039] In addition, the virtual position P to which the virtual self-driving car moves during driving V,tk G The formula for calculation is: .

[0040] When the real direction change of the autonomous vehicle is reflected in the initial virtual direction of the virtual autonomous vehicle, the virtual direction of the virtual autonomous vehicle can be calculated.

[0041] Next, the position / attitude calculation module calculates the virtual attitude based on the virtual position and direction of the virtual autonomous driving car according to the road shape information in the simulation scene.

[0042] The interlocking module is respectively connected to the perception module, the position / attitude calculation module, and the position monitoring module and the position / attitude receiving module of the autonomous driving vehicle; the virtual sensor data generated by the perception module is transmitted to the autonomous driving vehicle, and the virtual position and attitude information calculated by the position / attitude calculation module is transmitted to the autonomous driving vehicle; the real position and attitude of the autonomous driving vehicle are received from the autonomous driving vehicle, and transmitted to the position / attitude calculation module.

[0043] The autonomous driving car includes a behavior decision / global and local motion planning module, a vehicle control module, a position monitoring module and a position / posture receiving module; the autonomous driving car has real vehicle dynamics characteristics and is controlled according to a simulation scenario created in an autonomous driving simulator to achieve behavior decision, planning and tracking control and complete closed-loop testing.

[0044] The behavior decision / global and local motion planning module identifies / determines the vehicle state and road conditions according to the autonomous driving algorithm, and generates a global trajectory, local behavior decision and motion planning trajectory for the autonomous driving vehicle based on the virtual sensor data and virtual position and posture information received from the position / posture receiving module.

[0045] Preferably, the model adopted by the behavior decision / global and local motion planning module is as follows:

[0046] Behavioral decision-making is based on a finite state machine, which divides the vehicle's behavior into several discrete states, including one or more of cruising, lane changing, overtaking, and obstacle avoidance, and defines the transition conditions between states.

[0047] Global motion planning is based on the shortest path search of the Dijkstra algorithm. It uses the road network (such as lane centerlines or grid maps) as the graph structure and defines the weight of each edge (such as driving distance, traffic density). It uses the Dijkstra algorithm to search for the shortest path from the starting point to the target point.

[0048] Based on the global path, local motion planning fits multiple trajectories to the starting and ending points of motion planning through quintic polynomials, and then uses the cost function to obtain the path with the minimum cost.

[0049] The vehicle control module controls the actual driving of the autonomous vehicle based on the target trajectory generated by the behavior decision / global and local motion planning modules, combined with the position and posture information of the autonomous vehicle monitored by the position monitoring module; the vehicle control module calculates the positions of the steering wheel, brake and accelerator pedals according to the trajectory requirements, generates control instructions, ensures that the vehicle arrives at the target position on time, and tracks the trajectory generated by the motion planning.

[0050] Preferably, the model adopted by the vehicle control module is as follows: the vehicle control module consists of two parts: a longitudinal controller and a lateral controller.

[0051] The longitudinal controller is implemented using a proportional-integral-derivative (PID) controller that minimizes the longitudinal speed error by controlling the throttle or brake. e v =v ref - v ; Use the velocity error to calculate the longitudinal control amount:

[0052] ;

[0053] Among them, K p is the proportional gain parameter, K d is the differential gain parameter, K i is the integral gain parameter, v ref is the reference speed, v is the current actual speed of the vehicle, and u is the output of the control object (driving force / throttle opening).

[0054] The lateral controller is implemented by a linear quadratic regulator (LQR). The optimal steering angle control amount is calculated by minimizing the cost function. The steps are as follows:

[0055] The single-track model of the lateral motion of the vehicle is approximately described as:

[0056] ;

[0057] ;

[0058] ;

[0059] ;

[0060] Where y is the lateral deviation between the vehicle and the trajectory, v x is the longitudinal velocity of the vehicle, v y is the lateral velocity of the vehicle, is the yaw angle, r is the yaw angular velocity, δ is the front wheel turning angle, C f , C r are the cornering stiffness of the front and rear tires, l f 、l r are the front and rear wheelbases, m is the total mass of the vehicle, I z is the moment of inertia of the vehicle about the vertical axis.

[0061] Convert the model to linear state space form:

[0062] ;

[0063] Among them, the state vector , control input u=δ, matrix ,matrix .

[0064] The cost function of the LQR controller is:

[0065] ;

[0066] Among them, Q is the state weight matrix, R is the control input weight matrix; the control law is u=-KX, and the optimal gain matrix K is calculated by solving the Riccati equation.

[0067] The position monitoring module is used to monitor the position and posture information of the autonomous driving vehicle, and send the real position and posture information of the autonomous driving vehicle to the interlocking module.

[0068] Furthermore, the position monitoring module measures the real position and attitude of the autonomous driving vehicle by using real position and attitude sensors, or estimates them through a recognition algorithm; the real position and attitude sensors include a global navigation satellite system (GNSS) and / or an inertial measurement unit (IMU).

[0069] The position / posture receiving module is used to receive the position and posture information of the virtual autonomous driving vehicle of the autonomous driving simulator from the interlocking module, and transmit it to the behavior decision / global and local motion planning module to complete the closed-loop test.

[0070] The present invention also provides a dynamic vehicle-in-the-loop testing method for an autonomous driving vehicle, which is implemented using an autonomous driving simulator and an autonomous driving vehicle.

[0071] The autonomous driving simulator generates a virtual road environment and traffic participants by loading the stored virtual road environment information, thereby creating a simulation scene for autonomous driving performance verification; obtains the real position and posture of the autonomous driving car, converts the real position and posture into the virtual position and posture of the virtual autonomous driving car in the simulation scene, and simulates the operation of the virtual autonomous driving car in the virtual road environment; generates virtual sensor data generated by the virtual autonomous driving car driving in the simulation scene by simulating the sensors installed in the virtual autonomous driving car, and the autonomous driving simulator transmits the generated virtual sensor data and virtual position and posture information to the autonomous driving car; the autonomous driving car drives in a sufficiently wide open space with real vehicles. The system uses the vehicle dynamics characteristics to identify and determine the vehicle status and road conditions, and generates the global trajectory for planning the autonomous vehicle, the local behavior decision-making and the motion planning trajectory based on the virtual sensor data and the virtual position and posture information according to the simulation scene created in the autonomous driving simulator; according to the generated target trajectory, combined with the real position and posture information of the autonomous vehicle, the real driving of the autonomous vehicle is controlled, the positions of the steering wheel, brake and accelerator pedals are calculated according to the trajectory requirements, and control instructions are generated to ensure that the vehicle arrives at the target position on time and tracks the trajectory generated by the motion planning; the closed-loop test is completed by monitoring the real position and posture information of the autonomous vehicle and sending the real position and posture information of the autonomous vehicle to the autonomous driving simulator.

[0072] Autonomous driving cars can interlock with virtual road environments anywhere else to verify autonomous driving functions without having to go to real test roads corresponding to simulated virtual road environments; without changing the driving location, the autonomous driving function can be quickly verified on various virtual road environments based on the vehicle-in-the-loop system, and complex test cases can be generated through autonomous driving simulators, such as high-density traffic, emergency cut-ins, accident scenarios, and construction scenarios. Complex simulation scenarios test the reasoning speed and real-time performance of autonomous driving car algorithms, thereby improving the speed and convenience of autonomous driving technology development; autonomous driving cars can have real and safe verification conditions in autonomous driving simulators, thereby improving the robustness of autonomous driving technology development.

[0073] Preferably, in the simulation scenario, the relative distance information of the target vehicle point generated by the virtual sensor is calculated by the following steps:

[0074] (1) Calculate the relative position of the target coordinates detected by the virtual sensor and the virtual sensor itself:

[0075] ;

[0076] In the formula, (RD x , R.D. y ) is the relative distance between the target vehicle point detected by the virtual sensor and the vehicle sensor in the simulation scenario, (X mea , Y mea ) is the coordinate of the target vehicle point detected by the virtual sensor, (X sensor , Y sensor ) is the global coordinate of the virtual sensor installed on the virtual self-driving car, is the heading angle.

[0077] (2) Calculate the global coordinates of the virtual sensor itself:

[0078] ;

[0079] Where, the global coordinates of the virtual sensor (X sensor , Y sensor ) by adding a displacement (d x , d y ), and then perform a rotation transformation to match the direction of the vehicle; (d x , d y ) is the position offset of the RTK-GPS device relative to the virtual sensor, (X ego , Y ego ) is the global coordinate of the virtual autonomous vehicle.

[0080] (3) Calculate the target coordinates detected by the virtual sensor:

[0081] ;

[0082] In the formula, (X traf , Y traf ) is the global coordinate of the target vehicle, and its heading angle is ; The offset generated by the target point detected by the vehicle sensor ( l x , l y ) to perform rotation transformation and obtain the coordinates of the target point detected by the vehicle sensor.

[0083] In the virtual simulation scenario, the error is calculated and the normally distributed noise is inserted. The calculated error data is used to generate the normally distributed noise, which is then added to the relative distance and relative speed calculations to more realistically simulate the uncertainty of the sensor data. The calculation is performed through the following steps:

[0084] (1) Calculate the mean of the error data:

[0085] ;

[0086] Where μ is the mean value, which is used to simulate the offset of the perception error; X k is the error between the RTK-GPS data of the virtual ego vehicle and the actual virtual sensor measurement data, and n is the number of samples of the error data.

[0087] (2) Calculate the variance of the error data:

[0088] ;

[0089] In the formula, σ 2 is the variance, which indicates the degree of dispersion of error data.

[0090] (3) Generate noise N (μ, σ) that conforms to the normal distribution 2 ):

[0091] .

[0092] The above formula generates a mean μ and variance σ 2 Normally distributed noise is added to the relative distance and relative speed perceived in the simulation scene to enhance the authenticity of the virtual sensor data.

[0093] Preferably, the method for converting the real position and posture into the virtual position and posture of the virtual autonomous driving car in the simulation scene is as follows:

[0094] The initial real position P of the autonomous vehicle in the real road environment on the reference coordinate system R R,org G , the actual position P that the self-driving car moves to during driving R,tk G The virtual self-driving car in the road environment is in the coordinate system V The initial virtual position P on V,org G and the virtual position P to which it moves during driving V,tk G .

[0095] The position change P of the autonomous vehicle in the reference coordinate system R R,tk R Calculated from the following formula:

[0096] , is the rotation matrix from the global coordinate system G to the reference coordinate system R.

[0097] Virtual self-driving car in coordinate system V The position change PV,tk V The same as the position change of the self-driving car, as shown in the following formula:

[0098] P R,tk R =P V,tk V .

[0099] In addition, the virtual position P to which the virtual self-driving car moves during driving V,tk G Calculated from the following formula:

[0100] .

[0101] When the real direction change of the autonomous vehicle is reflected in the initial virtual direction of the virtual autonomous vehicle, the virtual direction of the virtual autonomous vehicle can be calculated.

[0102] Next, the position / attitude calculation module calculates the virtual attitude based on the virtual position and direction of the virtual autonomous driving car according to the road shape information in the simulation scene.

[0103] As a preferred method, the model used to generate the global trajectory, local behavior decision and motion planning trajectory for the autonomous driving vehicle is as follows:

[0104] Behavioral decision-making is based on a finite state machine, which divides the vehicle's behavior into several discrete states, including one or more of cruising, lane changing, overtaking, and obstacle avoidance, and defines the transition conditions between states.

[0105] Global motion planning is based on the shortest path search of the Dijkstra algorithm. It uses the road network (such as lane centerlines or grid maps) as the graph structure and defines the weight of each edge (such as driving distance, traffic density). It uses the Dijkstra algorithm to search for the shortest path from the starting point to the target point.

[0106] Based on the global path, local motion planning fits multiple trajectories to the starting and end points of motion planning through quintic polynomials, and then uses the cost function to obtain the path with the minimum cost.

[0107] Preferably, the controller used to control the actual driving of the autonomous driving car includes a longitudinal controller and a lateral controller.

[0108] The longitudinal controller is implemented by proportional-integral-derivative (PID) to minimize the longitudinal speed error by controlling the throttle or brake. e v =v ref - v ; Use the velocity error to calculate the longitudinal control amount:

[0109] ;

[0110] Among them, K p is the proportional gain parameter, K d is the differential gain parameter, K i is the integral gain parameter, v ref is the reference speed, v is the current actual speed of the vehicle, and u is the output of the control object (driving force / throttle opening).

[0111] The lateral controller is implemented by a linear quadratic regulator (LQR), which calculates the optimal steering angle control value by minimizing the cost function:

[0112] The single-track model of the lateral motion of the vehicle is approximately described as:

[0113] ;

[0114] ;

[0115] ;

[0116] ;

[0117] Where y is the lateral deviation between the vehicle and the trajectory, v x is the longitudinal velocity of the vehicle, v y is the lateral velocity of the vehicle, is the yaw angle, r is the yaw angular velocity, δ is the front wheel turning angle, C f , C r are the cornering stiffness of the front and rear tires, l f 、l r are the front and rear wheelbases, m is the total mass of the vehicle, I z is the moment of inertia of the vehicle about the vertical axis.

[0118] Convert the model to linear state space form:

[0119] ;

[0120] Among them, the state vector , control input u=δ, matrix ,matrix .

[0121] The cost function of the LQR controller is:

[0122] ;

[0123] Among them, Q is the state weight matrix, R is the control input weight matrix; the control law is u=-KX, and the optimal gain matrix K is calculated by solving the Riccati equation.

[0124] Beneficial effects of the present invention:

[0125] The present invention proposes a dynamic vehicle-in-the-loop test system and method that integrates a real test vehicle into a virtual environment. The dynamic vehicle-in-the-loop test system enables an autonomous driving car to verify the autonomous driving function at any location by linking a virtual road environment, without having to go to a real test road corresponding to a simulated virtual road environment. Therefore, the present invention can quickly verify the autonomous driving function for various virtual road environments based on the dynamic vehicle-in-the-loop test system without changing the driving location, thereby improving the speed and convenience of autonomous driving technology development. In addition, in a virtual road environment, by adding traffic participants, interaction between real vehicles and virtual traffic participants can be achieved, and complex test cases can be generated through an autonomous driving simulator. In this way, an autonomous driving car can have real and safe verification conditions in an autonomous driving simulator, and unstable or unexpected behaviors caused by driving functions and controllers can be detected in a risk-free manner, thereby improving the robustness of autonomous driving technology development. BRIEF DESCRIPTION OF THE DRAWINGS

[0126] Figure 1 A schematic diagram of the overall structure of a dynamic vehicle-in-the-loop test system for an autonomous driving vehicle provided by the present invention.

[0127] Figure 2 The figure is a schematic diagram of a model for converting a real position and direction into a virtual position and direction according to the present invention.

[0128] 1. Autonomous driving simulator, 101. Road environment database, 102. Simulation engine, 103. Perception module, 104. Position / attitude calculation module, 105. Interlocking module; 2. Autonomous driving vehicle, 201. Decision / global and local motion planning module, 202. Vehicle control module, 203. Position monitoring module, 204. Position / attitude receiving module. DETAILED DESCRIPTION

[0129] Embodiment 1,

[0130] The present invention provides a dynamic vehicle-in-the-loop testing system for an autonomous driving vehicle, comprising an autonomous driving simulator 1 and an autonomous driving vehicle 2.

[0131] The autonomous driving simulator 1 includes: a road environment database 101, a simulation engine 102, a perception module 103, a position / posture calculation module 104 and an interlocking module 105; it is used to provide a virtual road environment, simulate a virtual autonomous driving car, and create a simulation scene.

[0132] The road environment database 101 is used to store virtual road environment information, including simulated road environment information and existing road environment information. The simulated road is a simulated designed road, and the existing road is a real road. Road types include but are not limited to test sites, urban roads and highways. Road environment information includes but is not limited to environmental information, road information, traffic lights, and static objects. Among them, road information includes but is not limited to road shape, road width, and number of lanes, and static objects include but are not limited to plants and buildings.

[0133] The simulation engine 102 is configured in the existing open source simulation software, and creates a virtual road environment by loading the virtual road environment information in the road environment database 101. Optionally, traffic participants are generated in the virtual road environment to construct a simulation scene for automatic driving performance verification; the position and posture of the virtual automatic driving car in the virtual road environment are specified according to the virtual position and posture information calculated by the position / posture calculation module 104. The traffic participants refer to dynamic objects in the road environment, including one or more of vehicles, pedestrians, and animals; in the simulation scene, traffic participants will move, which may cause accidents not only due to normal movement, but also due to abnormal movement.

[0134] The perception module 103 generates virtual sensor data generated by the virtual self-driving car driving in the simulation scene by simulating the sensors installed in the virtual self-driving car in the simulation scene, and then the interlocking module transmits the virtual sensor data to the self-driving car; specifically, the virtual sensor data (V2X) is generated by simulating cameras, light detection and ranging (LiDAR), radio detection and ranging (RADAR), and global navigation satellite system (GNSS) / inertial navigation system (INS) in the virtual self-driving car.

[0135] In this embodiment, in the simulation scenario, the relative distance information of the target vehicle point generated by the virtual sensor is calculated by the following steps:

[0136] (1) Calculate the relative position of the target coordinates detected by the virtual sensor and the virtual sensor itself:

[0137] ;

[0138] In the formula, (RD x , R.D. y ) is the relative distance between the target vehicle point detected by the virtual sensor and the vehicle sensor in the simulation scenario, (X mea , Y mea ) is the coordinate of the target vehicle point detected by the virtual sensor, (X sensor , Y sensor) is the global coordinate of the virtual sensor installed on the virtual self-driving car, is the heading angle.

[0139] (2) Calculate the global coordinates of the virtual sensor itself:

[0140] ;

[0141] Where, the global coordinates of the virtual sensor (X sensor , Y sensor ) by adding a displacement (d x , d y ), and then perform a rotation transformation to match the direction of the vehicle; (d x , d y ) is the position offset of the RTK-GPS device relative to the virtual sensor, (X ego , Y ego ) is the global coordinate of the virtual autonomous vehicle.

[0142] (3) Calculate the target coordinates detected by the virtual sensor:

[0143] ;

[0144] In the formula, (X traf , Y traf ) is the global coordinate of the target vehicle, which is provided by the RTK-GPS device of the target vehicle, and its heading angle is ; The target point detected by the vehicle sensor may not be in the center, so an offset is generated ( l x , l y ), by performing a rotation transformation on the offset, the coordinates of the target point detected by the vehicle sensor are obtained.

[0145] In addition, real-world sensors (such as LiDAR, cameras, and millimeter-wave radars) have measurement errors, which usually follow a normal distribution. In the virtual simulation scene, the error is calculated and the normal distribution noise is inserted. The calculated error data is used to generate the normal distribution noise, and then this noise is added to the relative distance and relative speed calculations to more realistically simulate the uncertainty of the sensor data. The calculation is performed through the following steps:

[0146] (1) Calculate the mean of the error data:

[0147] ;

[0148] Where μ is the mean value, which is used to simulate the offset of the perception error; X kis the error between the RTK-GPS data of the virtual ego vehicle and the actual virtual sensor measurement data, and n is the number of samples of the error data.

[0149] (2) Calculate the variance of the error data:

[0150] ;

[0151] In the formula, σ 2 is the variance, which indicates the degree of dispersion of error data.

[0152] (3) Generate noise that conforms to the normal distribution:

[0153] .

[0154] The above formula generates a mean μ and variance σ 2 Normally distributed noise is added to the relative distance and relative speed perceived in the simulation scene to enhance the authenticity of the virtual sensor data.

[0155] The position / posture calculation module 104 obtains the real position and posture of the autonomous driving vehicle from the interlocking module 105, converts the real position and posture into the virtual position and posture of the virtual autonomous driving vehicle in the simulation scene, and then transmits the converted position and posture to the simulation engine 102 and renders it into the simulation scene.

[0156] The interlocking module 105 is respectively connected to the perception module 103, the position / posture calculation module 104, and the position monitoring module 203 and the position / posture receiving module 204 of the autonomous driving vehicle 2; the virtual sensor data generated by the perception module 103 is transmitted to the autonomous driving vehicle 2, and the virtual position and posture information calculated by the position / posture calculation module 104 is transmitted to the autonomous driving vehicle 2; the real position and posture of the autonomous driving vehicle are received from the autonomous driving vehicle 2, and transmitted to the position / posture calculation module 104.

[0157] In this embodiment, the method in which the position / attitude calculation module 104 converts the real position and attitude into the virtual position and attitude of the virtual autonomous driving car in the simulation scene is as follows:

[0158] like Figure 2 As shown, the initial real position P of the autonomous driving car in the real road environment on the reference coordinate system R R,org G , the actual position P that the self-driving car moves to during driving R,tk G , the virtual self-driving car in the virtual road environment is in the coordinate system V The initial virtual position P on V,org Gand the virtual position P to which it moves during driving V,tk G .

[0159] The position change P of the autonomous vehicle in the reference coordinate system R R,tk R Calculated from the following formula:

[0160] , is the rotation matrix from the global coordinate system G to the reference coordinate system R.

[0161] Virtual self-driving car in coordinate system V The position change P V,tk V The same as the position change of the self-driving car, as shown in the following formula:

[0162] P R,tk R =P V,tk V .

[0163] In addition, the virtual position P to which the virtual self-driving car moves during driving V,tk G Calculated from the following formula:

[0164] .

[0165] When the real direction change of the autonomous vehicle is reflected in the initial virtual direction of the virtual autonomous vehicle, the virtual direction of the virtual autonomous vehicle can be calculated.

[0166] Next, the position / attitude calculation module calculates the virtual attitude based on the virtual position and direction of the virtual autonomous driving car according to the road shape information in the simulation scene.

[0167] The autonomous driving car 2 includes a behavior decision / global and local motion planning module 201, a vehicle control module 202, a position monitoring module 203 and a position / posture receiving module 204; the autonomous driving car 2 has real vehicle dynamics characteristics and is controlled according to the simulation scenario created in the autonomous driving simulator 1, further realizing behavior decision, planning and tracking control, and completing closed-loop testing.

[0168] The behavior decision / global and local motion planning module 201 identifies / determines the vehicle state and road conditions according to the autonomous driving algorithm, and generates a global trajectory, local behavior decision and motion planning trajectory for the autonomous driving vehicle based on the virtual sensor data and virtual position and posture information received from the position / posture receiving module 204.

[0169] In this embodiment, the model adopted by the behavior decision / global and local motion planning module 201 is as follows:

[0170] Behavioral decision-making is based on a finite state machine, which divides the vehicle's behavior into several discrete states, including one or more of cruising, lane changing, overtaking, and obstacle avoidance, and defines the transition conditions between states.

[0171] Global motion planning is based on the shortest path search of the Dijkstra algorithm. It uses the road network (such as lane centerlines or grid maps) as the graph structure and defines the weight of each edge (such as driving distance, traffic density). It uses the Dijkstra algorithm to search for the shortest path from the starting point to the target point.

[0172] Based on the global path, local motion planning fits multiple trajectories to the starting and end points of motion planning through quintic polynomials, and then uses the cost function to obtain the path with the minimum cost.

[0173] The vehicle control module 202 controls the actual driving of the autonomous vehicle based on the target trajectory generated by the behavior decision / global and local motion planning module 201, combined with the position and posture information of the autonomous vehicle monitored by the position monitoring module 203; the vehicle control module 202 calculates the positions of the steering wheel, brake and accelerator pedals according to the trajectory requirements, generates control instructions, ensures that the vehicle arrives at the target position on time, and tracks the trajectory generated by the motion planning.

[0174] In this embodiment, the model adopted by the vehicle control module 202 is specifically as follows: the vehicle control module 202 is composed of two parts: a longitudinal controller and a lateral controller.

[0175] The longitudinal controller is implemented using a proportional-integral-derivative (PID) controller that minimizes the longitudinal speed error by controlling the throttle or brake. e v =v ref - v ; Use the velocity error to calculate the longitudinal control amount:

[0176] ;

[0177] Among them, K p is the proportional gain parameter, K d is the differential gain parameter, K i is the integral gain parameter, v ref is the reference speed, v is the current actual speed of the vehicle, and u is the output of the control object (driving force / throttle opening).

[0178] The lateral controller is implemented by a linear quadratic regulator (LQR). The optimal steering angle control amount is calculated by minimizing the cost function. The steps are as follows:

[0179] The single-track model of the lateral motion of the vehicle is approximately described as:

[0180] ;

[0181] ;

[0182] ;

[0183] ;

[0184] Where y is the lateral deviation between the vehicle and the trajectory, v x is the longitudinal velocity of the vehicle, v y is the lateral velocity of the vehicle, is the yaw angle, r is the yaw angular velocity, δ is the front wheel turning angle, C f , C r are the cornering stiffness of the front and rear tires, l f 、l r are the front and rear wheelbases, m is the total mass of the vehicle, I z is the moment of inertia of the vehicle about the vertical axis.

[0185] Convert the model to linear state space form:

[0186] .

[0187] Among them, the state vector , control input u=δ, matrix ,matrix .

[0188] The cost function of the LQR controller is:

[0189] .

[0190] Among them, Q is the state weight matrix, R is the control input weight matrix; the control law is u=-KX, and the optimal gain matrix K is calculated by solving the Riccati equation.

[0191] The position monitoring module 203 is used to monitor the position and attitude information of the autonomous driving vehicle, and send the real position and attitude information of the autonomous driving vehicle to the interlocking module 105; specifically, the position monitoring module 203 measures the real position and attitude of the autonomous driving vehicle by using real position and attitude sensors, or estimates them by recognition algorithms; the real position and attitude sensors include global navigation satellite systems (GNSS) and / or inertial measurement units (IMUs).

[0192] The position / posture receiving module 204 is used to receive the position and posture information of the virtual autonomous driving vehicle of the autonomous driving simulator from the interlocking module 105, and transmit it to the behavior decision / global and local motion planning module 201 to complete the closed-loop test.

[0193] Embodiment 2,

[0194] The present invention also provides a dynamic vehicle-in-the-loop testing method for an autonomous driving vehicle, which is implemented using an autonomous driving simulator and an autonomous driving vehicle.

[0195] The autonomous driving simulator generates a virtual road environment and traffic participants by loading the stored virtual road environment information, thereby creating a simulation scene for autonomous driving performance verification; obtains the real position and posture of the autonomous driving car, converts the real position and posture into the virtual position and posture of the virtual autonomous driving car in the simulation scene, and simulates the operation of the virtual autonomous driving car in the virtual road environment; generates virtual sensor data generated by the virtual autonomous driving car driving in the simulation scene by simulating the sensors installed in the virtual autonomous driving car, and the autonomous driving simulator transmits the generated virtual sensor data and virtual position and posture information to the autonomous driving car; the autonomous driving car drives in a sufficiently wide open space with real vehicles. The system uses the vehicle dynamics characteristics to identify / determine the vehicle status and road conditions, and generates the global trajectory for planning the autonomous vehicle, the local behavior decision-making and the motion planning trajectory based on the virtual sensor data and the virtual position and posture information according to the simulation scenario created in the autonomous driving simulator; according to the generated target trajectory, combined with the real position and posture information of the autonomous vehicle, the real driving of the autonomous vehicle is controlled, the positions of the steering wheel, brake and accelerator pedals are calculated according to the trajectory requirements, and control instructions are generated to ensure that the vehicle arrives at the target position on time and tracks the trajectory generated by the motion planning; the closed-loop test is completed by monitoring the real position and posture information of the autonomous vehicle and sending the real position and posture information of the autonomous vehicle to the autonomous driving simulator.

[0196] Autonomous driving cars can interlock with virtual road environments anywhere else to verify autonomous driving functions without having to go to real test roads corresponding to simulated virtual road environments; without changing the driving location, the autonomous driving function can be quickly verified on various virtual road environments based on the vehicle-in-the-loop system, and complex test cases can be generated through autonomous driving simulators, such as high-density traffic, emergency cut-ins, accident scenarios, and construction scenarios. Complex simulation scenarios test the reasoning speed and real-time performance of autonomous driving car algorithms, thereby improving the speed and convenience of autonomous driving technology development; autonomous driving cars can have real and safe verification conditions in autonomous driving simulators, thereby improving the robustness of autonomous driving technology development.

[0197] In this embodiment, in the simulation scenario, the relative distance information of the target vehicle point generated by the virtual sensor is calculated by the following steps:

[0198] (1) Calculate the relative position of the target coordinates detected by the virtual sensor and the virtual sensor itself:

[0199] ;

[0200] In the formula, (RD x , R.D. y ) is the relative distance between the target vehicle point detected by the virtual sensor and the vehicle sensor in the simulation scenario, (X mea , Y mea ) is the coordinate of the target vehicle point detected by the virtual sensor, (X sensor , Y sensor ) is the global coordinate of the virtual sensor installed on the virtual self-driving car, is the heading angle.

[0201] (2) Calculate the global coordinates of the virtual sensor itself:

[0202] ;

[0203] Where, the global coordinates of the virtual sensor (X sensor , Y sensor ) by adding a displacement (d x , d y ), and then perform a rotation transformation to match the direction of the vehicle; (d x , d y ) is the position offset of the RTK-GPS device relative to the virtual sensor, (X ego , Y ego ) is the global coordinate of the virtual autonomous vehicle.

[0204] (3) Calculate the target coordinates detected by the virtual sensor:

[0205] ;

[0206] In the formula, (X traf , Y traf ) is the global coordinate of the target vehicle, and its heading angle is ; The offset generated by the target point detected by the vehicle sensor ( l x , l y ) to perform rotation transformation and obtain the coordinates of the target point detected by the vehicle sensor.

[0207] In the virtual simulation scenario, the error is calculated and the normally distributed noise is inserted. The calculated error data is used to generate the normally distributed noise, which is then added to the relative distance and relative speed calculations to more realistically simulate the uncertainty of the sensor data. The calculation is performed through the following steps:

[0208] (1) Calculate the mean of the error data:

[0209] ;

[0210] Where μ is the mean value, which is used to simulate the offset of the perception error; X k is the error between the RTK-GPS data of the virtual ego vehicle and the actual virtual sensor measurement data, and n is the number of samples of the error data.

[0211] (2) Calculate the variance of the error data:

[0212] ;

[0213] In the formula, σ 2 is the variance, which indicates the degree of dispersion of error data.

[0214] (3) Generate noise N (μ, σ) that conforms to the normal distribution 2 ):

[0215] ;

[0216] The above formula generates a mean μ and variance σ 2 Normally distributed noise is added to the relative distance and relative speed perceived in the simulation scene to enhance the authenticity of the virtual sensor data.

[0217] In this embodiment, the method of converting the real position and posture into the virtual position and posture of the virtual autonomous driving car in the simulation scene is as follows:

[0218] like Figure 2As shown, the initial real position P of the autonomous driving car in the real road environment on the reference coordinate system R R,org G , the actual position P that the self-driving car moves to during driving R,tk G , the virtual self-driving car in the virtual road environment is in the coordinate system V The initial virtual position P on V,org G and the virtual position P to which it moves during driving V,tk G .

[0219] The position change P of the autonomous vehicle in the reference coordinate system R R,tk R Calculated from the following formula: , is the rotation matrix from the global coordinate system G to the reference coordinate system R.

[0220] Virtual self-driving car in coordinate system V The position change P V,tk V The same as the position change of the self-driving car, as shown in the following formula:

[0221] P R,tk R =P V,tk V ;

[0222] In addition, the virtual position P to which the virtual self-driving car moves during driving V,tk G Calculated from the following formula:

[0223] ;

[0224] When the real direction change of the autonomous vehicle is reflected in the initial virtual direction of the virtual autonomous vehicle, the virtual direction of the virtual autonomous vehicle can be calculated.

[0225] Next, the position / attitude calculation module calculates the virtual attitude based on the virtual position and direction of the virtual autonomous driving car according to the road shape information in the simulation scene.

[0226] In this embodiment, the model used to generate the global trajectory, local behavior decision and motion planning trajectory for the autonomous driving vehicle is as follows:

[0227] Behavioral decision-making is based on a finite state machine, which divides the vehicle's behavior into several discrete states, including one or more of cruising, lane changing, overtaking, and obstacle avoidance, and defines the transition conditions between states.

[0228] Global motion planning is based on the shortest path search of the Dijkstra algorithm. It uses the road network (such as lane centerlines or grid maps) as the graph structure and defines the weight of each edge (such as driving distance, traffic density). It uses the Dijkstra algorithm to search for the shortest path from the starting point to the target point.

[0229] Based on the global path, local motion planning fits multiple trajectories to the starting and end points of motion planning through quintic polynomials, and then uses the cost function to obtain the path with the minimum cost.

[0230] In this embodiment, the controller used to control the actual driving of the autonomous driving car includes a longitudinal controller and a lateral controller.

[0231] The longitudinal controller is implemented by proportional-integral-derivative (PID) to minimize the longitudinal speed error by controlling the throttle or brake. e v =v ref - v ; Use the velocity error to calculate the longitudinal control amount:

[0232] ;

[0233] Among them, K p is the proportional gain parameter, K d is the differential gain parameter, K i is the integral gain parameter, v ref is the reference speed, v is the current actual speed of the vehicle, and u is the output of the control object (driving force / throttle opening).

[0234] The lateral controller is implemented by a linear quadratic regulator (LQR), and the optimal steering angle control amount is calculated by minimizing the cost function. The steps are as follows:

[0235] The single-track model of the lateral motion of the vehicle is approximately described as:

[0236] ;

[0237] ;

[0238] ;

[0239] ;

[0240] Where y is the lateral deviation between the vehicle and the trajectory, v x is the longitudinal velocity of the vehicle, v y is the lateral velocity of the vehicle, is the yaw angle, r is the yaw angular velocity, δ is the front wheel turning angle, C f , C r are the cornering stiffness of the front and rear tires, l f 、l r are the front and rear wheelbases, m is the total mass of the vehicle, I z is the moment of inertia of the vehicle about the vertical axis.

[0241] Convert the model to linear state space form:

[0242] .

[0243] Among them, the state vector , control input u=δ, matrix ,matrix .

[0244] The cost function of the LQR controller is:

[0245] ;

[0246] Among them, Q is the state weight matrix, R is the control input weight matrix; the control law is u=-KX, and the optimal gain matrix K is calculated by solving the Riccati equation.

Claims

1. A dynamic vehicle-in-the-loop test system for an autonomous driving vehicle, comprising an autonomous driving simulator and an autonomous driving vehicle, characterized in that: The autonomous driving simulator comprises: a road environment database, a simulation engine, a perception module, a position / posture calculation module and an interlocking module; and is used to provide a virtual road environment, simulate a virtual autonomous driving car, and create a simulation scene; The road environment database is used to store virtual road environment information, including simulated road environment information and existing road environment information, wherein the simulated road is a simulated designed road, and the existing road is a real existing road; The simulation engine creates a virtual road environment by loading virtual road environment information in a road environment database, generates traffic participants in the virtual road environment, and constructs a simulation scene for autonomous driving performance verification; specifies the position and posture of the virtual autonomous driving car in the virtual road environment according to the virtual position and posture information calculated by the position / posture calculation module; The perception module generates virtual sensor data generated by the virtual self-driving car driving in the simulation scene by simulating the sensors installed in the virtual self-driving car in the simulation scene, and the interlocking module then transmits the virtual sensor data to the self-driving car; The position / attitude calculation module obtains the real position and attitude of the autonomous driving vehicle from the interlocking module, converts the real position and attitude into the virtual position and attitude of the virtual autonomous driving vehicle in the simulation scene, and then transmits the converted position and attitude to the simulation engine and renders it into the simulation scene; The interlocking module is respectively connected to the perception module, the position / attitude calculation module, and the position monitoring module and the position / attitude receiving module of the autonomous driving vehicle; the virtual sensor data generated by the perception module is transmitted to the autonomous driving vehicle, and the virtual position and attitude information calculated by the position / attitude calculation module is transmitted to the autonomous driving vehicle; the real position and attitude of the autonomous driving vehicle are received from the autonomous driving vehicle, and transmitted to the position / attitude calculation module; The autonomous driving vehicle comprises a behavior decision / global and local motion planning module, a vehicle control module, a position monitoring module and a position / posture receiving module; the autonomous driving vehicle has real vehicle dynamics characteristics and is controlled according to a simulation scenario created in an autonomous driving simulator to achieve behavior decision, planning and tracking control and complete closed-loop testing; The behavior decision / global and local motion planning module identifies and determines the vehicle state and road conditions according to the autonomous driving algorithm, and generates a global trajectory, a local behavior decision and motion planning trajectory for the autonomous driving vehicle based on the virtual sensor data and virtual position and posture information received from the position / posture receiving module; The vehicle control module controls the actual driving of the autonomous vehicle based on the target trajectory generated by the behavior decision / global and local motion planning modules, combined with the position and posture information of the autonomous vehicle monitored by the position monitoring module; the vehicle control module calculates the positions of the steering wheel, brake and accelerator pedals according to the trajectory requirements, generates control instructions, ensures that the vehicle reaches the target position on time, and tracks the trajectory generated by the motion planning; The position monitoring module is used to monitor the position and posture information of the autonomous driving vehicle, and send the real position and posture information of the autonomous driving vehicle to the interlocking module; The position / posture receiving module is used to receive the position and posture information of the virtual autonomous driving vehicle of the autonomous driving simulator from the interlocking module, and transmit it to the behavior decision / global and local motion planning module to complete the closed-loop test.

2. A dynamic vehicle-in-the-loop test system for an autonomous driving vehicle according to claim 1, characterized in that: The road type of the virtual road environment information includes one or more of a test site, a city road, and a highway; the road environment information includes one or more of environmental information, road information, traffic lights, and static objects; the road information includes road shape, road width, and the number of lanes; and the static objects include plants and buildings; The perception module generates virtual sensor data by simulating one or more virtual sensors in a camera, light detection and ranging, radio detection and ranging, global navigation satellite system or inertial navigation system in a virtual autonomous driving car.

3. The dynamic vehicle-in-the-loop test system for an autonomous driving vehicle according to claim 1, characterized in that: In the simulation scenario, the relative distance information of the target vehicle point generated by the virtual sensor is calculated by the following steps: (1) Calculate the relative position of the target coordinates detected by the virtual sensor and the virtual sensor itself: ; Where, (RD x , R.D. y ) is the relative distance between the target vehicle point detected by the virtual sensor and the vehicle sensor in the simulation scenario, (X mea , Y mea ) is the coordinate of the target vehicle point detected by the virtual sensor, (X sensor , Y sensor ) is the global coordinate of the virtual sensor installed on the virtual self-driving car, is the heading angle; (2) Calculate the global coordinates of the virtual sensor itself: ; Where, the global coordinates of the virtual sensor (X sensor , Y sensor ) by adding a displacement (d x , d y ), and then perform a rotation transformation to match the direction of the vehicle; (d x ,dy) is the position offset of the RTK-GPS device relative to the virtual sensor, (X ego , Y ego ) is the global coordinate of the virtual autonomous vehicle; (3) Calculate the target coordinates detected by the virtual sensor: ; In the formula, (X traf , Y traf ) is the global coordinate of the target vehicle, and its heading angle is ; The offset generated by the target point detected by the vehicle sensor ( l x , l y ) to perform rotation transformation to obtain the coordinates of the target point detected by the vehicle sensor; In addition, in the virtual simulation scenario, the error is calculated and the normally distributed noise is inserted. The calculated error data is used to generate the normally distributed noise, which is then added to the relative distance and relative speed calculations to more realistically simulate the uncertainty of the sensor data. The calculation is performed through the following steps: (1) Calculate the mean of the error data: ; Where μ is the mean value, which is used to simulate the offset of the perception error; X k is the error between the RTK-GPS data of the virtual ego vehicle and the actual virtual sensor measurement data, and n is the number of samples of the error data; (2) Calculate the variance of the error data: ; In the formula, σ 2 is the variance, which indicates the degree of dispersion of error data; (3) Generate noise N (μ, σ) that conforms to the normal distribution 2 ): ; The above formula generates a mean μ and variance σ 2 Normally distributed noise is added to the relative distance and relative speed perceived in the simulation scene to enhance the authenticity of the virtual sensor data.

4. The dynamic vehicle-in-the-loop test system for an autonomous driving vehicle according to claim 1, characterized in that: The method by which the position / attitude calculation module converts the real position and attitude into the virtual position and attitude of the virtual self-driving car in the simulation scene is as follows: The initial real position P of the autonomous vehicle in the real road environment on the reference coordinate system R R,org G , the actual position P that the self-driving car moves to during driving R,tk G , the virtual self-driving car in the virtual road environment is in the coordinate system V The initial virtual position P on V,org G and the virtual position P to which it moves during driving V,tk G ; The position change P of the autonomous vehicle in the reference coordinate system R R,tk R The formula for calculation is: , is the rotation matrix from the global coordinate system G to the reference coordinate system R; Virtual self-driving car in coordinate system V The position change P V,tk V Same as the position change of the self-driving car, the formula is: P R,tk R =P V,tk V ; In addition, the virtual position P to which the virtual self-driving car moves during driving V,tk G The formula for calculation is: ; When the real direction change of the autonomous vehicle is reflected in the initial virtual direction of the virtual autonomous vehicle, the virtual direction of the virtual autonomous vehicle can be calculated; Next, the position / attitude calculation module calculates the virtual attitude based on the virtual position and direction of the virtual autonomous driving car according to the road shape information in the simulation scene.

5. The dynamic vehicle-in-the-loop test system for an autonomous driving vehicle according to claim 1, characterized in that: The models used in the behavior decision / global and local motion planning modules are as follows: Behavior decision-making is based on a finite state machine, which divides the vehicle's behavior into several discrete states, including one or more of cruising, lane change, overtaking, and obstacle avoidance, and defines the transition conditions between states; Global motion planning is based on the shortest path search of the Dijkstra algorithm, with the road network as the graph structure and the weight of each edge defined; the Dijkstra algorithm is used to search for the shortest path from the starting point to the target point; Based on the global path, local motion planning fits several trajectories to the starting and ending points of the motion planning through a quintic polynomial, and then uses the cost function to obtain the path with the minimum cost.

6. The dynamic vehicle-in-the-loop test system for an autonomous driving vehicle according to claim 1, characterized in that: The model adopted by the vehicle control module is as follows: the vehicle control module consists of two parts: a longitudinal controller and a lateral controller; The longitudinal controller is implemented by proportional-integral-derivative, which minimizes the longitudinal speed error by controlling the throttle or brake. e v =v ref - v ; Use the velocity error to calculate the longitudinal control amount: ; Among them, K p is the proportional gain parameter, K d is the differential gain parameter, K i is the integral gain parameter, v ref is the reference speed, v is the current actual speed of the vehicle, and u is the output of the control object; The lateral controller is implemented by a linear quadratic regulator. The optimal steering angle control amount is calculated by minimizing the cost function. The steps are as follows: The single track model of the lateral motion of the vehicle is described as: ; Where y is the lateral deviation between the vehicle and the trajectory, v x is the longitudinal velocity of the vehicle, v y is the lateral velocity of the vehicle, is the yaw angle, r is the yaw angular velocity, δ is the front wheel turning angle, C f , C r are the cornering stiffness of the front and rear tires, l f 、l r are the front and rear wheelbases, m is the total mass of the vehicle, I z is the moment of inertia of the vehicle around the vertical axis; Convert the model to linear state space form: ; Among them, the state vector , control input u=δ, matrix ,matrix ; The cost function of the LQR controller is: ; Among them, Q is the state weight matrix, R is the control input weight matrix; the control law is u=-KX, and the optimal gain matrix K is calculated by solving the Riccati equation.

7. A dynamic vehicle-in-the-loop testing method for an autonomous driving vehicle, characterized in that: The dynamic vehicle-in-the-loop test system for the autonomous driving vehicle according to claim 1 is implemented, comprising an autonomous driving simulator and an autonomous driving vehicle; The autonomous driving simulator generates a virtual road environment and traffic participants by loading the stored virtual road environment information, thereby creating a simulation scene for autonomous driving performance verification; obtains the real position and posture of the autonomous driving car, converts the real position and posture into the virtual position and posture of the virtual autonomous driving car in the simulation scene, and simulates the operation of the virtual autonomous driving car in the virtual road environment; generates virtual sensor data generated by the virtual autonomous driving car driving in the simulation scene by simulating the sensors installed in the virtual autonomous driving car, and the autonomous driving simulator transmits the generated virtual sensor data and virtual position and posture information to the autonomous driving car; the autonomous driving car drives in a sufficiently wide open space with real vehicles. The system can identify and determine the vehicle status and road conditions based on the vehicle dynamics characteristics, and generate the global trajectory, local behavior decision-making and motion planning trajectory for the autonomous vehicle based on the virtual sensor data and virtual position and posture information according to the simulation scene created in the autonomous driving simulator; according to the generated target trajectory, combined with the real position and posture information of the autonomous vehicle, the real driving of the autonomous vehicle is controlled, the positions of the steering wheel, brake and accelerator pedals are calculated according to the trajectory requirements, and control instructions are generated to ensure that the vehicle arrives at the target position on time and track the trajectory generated by the motion planning; the closed-loop test is completed by monitoring the real position and posture information of the autonomous vehicle and sending the real position and posture information of the autonomous vehicle to the autonomous driving simulator; The method of converting the real position and posture into the virtual position and posture of the virtual self-driving car in the simulation scene is as follows: The initial real position P of the autonomous vehicle in the real road environment on the reference coordinate system R R,org G , the actual position P that the self-driving car moves to during driving R,tk G , the virtual self-driving car in the virtual road environment is in the coordinate system V The initial virtual position P on V,org G and the virtual position P to which it moves during driving V,tk G ; The position change P of the autonomous vehicle in the reference coordinate system R R,tk R Calculated from the following formula: , is the rotation matrix from the global coordinate system G to the reference coordinate system R; Virtual self-driving car in coordinate system V The position change P V,tk V The same as the position change of the self-driving car, as shown in the following formula: P R,tk R =P V,tk V In addition, the virtual position P to which the virtual self-driving car moves during driving V,tk G Calculated from the following formula: ; When the real direction change of the autonomous vehicle is reflected in the initial virtual direction of the virtual autonomous vehicle, the virtual direction of the virtual autonomous vehicle can be calculated; Next, the position / attitude calculation module calculates the virtual attitude based on the virtual position and direction of the virtual autonomous driving car according to the road shape information in the simulation scene.

8. A dynamic vehicle-in-the-loop testing method for an autonomous driving vehicle according to claim 7, characterized in that: In the simulation scenario, the relative distance information of the target vehicle point generated by the virtual sensor is calculated by the following steps: (1) Calculate the relative position of the target coordinates detected by the virtual sensor and the virtual sensor itself: ; Where, (RD x , R.D. y ) is the relative distance between the target vehicle point detected by the virtual sensor and the vehicle sensor in the simulation scenario, (X mea , Y mea ) is the coordinate of the target vehicle point detected by the virtual sensor, (X sensor , Y sensor ) is the global coordinate of the virtual sensor installed on the virtual self-driving car, is the heading angle; (2) Calculate the global coordinates of the virtual sensor itself: ; Where, the global coordinates of the virtual sensor (X sensor , Y sensor ) by adding a displacement (d x , d y ), and then perform a rotation transformation to match the direction of the vehicle; (d x , d y ) is the position offset of the RTK-GPS device relative to the virtual sensor, (X ego , Y ego ) is the global coordinate of the virtual autonomous vehicle; (3) Calculate the target coordinates detected by the virtual sensor: ; In the formula, (X traf , Y traf ) is the global coordinate of the target vehicle, and its heading angle is ; The offset generated by the target point detected by the vehicle sensor ( l x , l y ) to perform rotation transformation to obtain the coordinates of the target point detected by the vehicle sensor; In the virtual simulation scenario, the error is calculated and the normally distributed noise is inserted. The calculated error data is used to generate the normally distributed noise, which is then added to the relative distance and relative speed calculations to more realistically simulate the uncertainty of the sensor data. The calculation is performed through the following steps: (1) Calculate the mean of the error data: ; Where μ is the mean value, which is used to simulate the offset of the perception error; X k is the error between the RTK-GPS data of the virtual ego vehicle and the actual virtual sensor measurement data, and n is the number of samples of the error data; (2) Calculate the variance of the error data: ; In the formula, σ 2 is the variance, which indicates the degree of dispersion of error data; (3) Generate noise N (μ, σ) that conforms to the normal distribution 2 ): ; The above formula generates a mean μ and variance σ 2 Normally distributed noise is added to the relative distance and relative speed perceived in the simulation scene to enhance the authenticity of the virtual sensor data.

9. The method for dynamic vehicle-in-the-loop testing of an autonomous driving vehicle according to claim 7, characterized in that: The model used to generate the global trajectory, local behavior decision and motion planning trajectory for the autonomous vehicle is as follows: Behavior decision-making is based on a finite state machine, which divides the vehicle's behavior into several discrete states, including one or more of cruising, lane change, overtaking, and obstacle avoidance, and defines the transition conditions between states; Global motion planning is based on the shortest path search of the Dijkstra algorithm, with the road network as the graph structure and the weight of each edge defined; the Dijkstra algorithm is used to search for the shortest path from the starting point to the target point; Based on the global path, local motion planning fits several trajectories to the starting and ending points of the motion planning through a quintic polynomial, and then uses the cost function to obtain the path with the minimum cost.

10. The method for dynamic vehicle-in-the-loop testing of an autonomous driving vehicle according to claim 7, characterized in that: The controllers used to control the real driving of the autonomous vehicle include longitudinal controller and lateral controller; The longitudinal controller is implemented by proportional-integral-differential, and minimizes the longitudinal speed error by controlling the throttle or brake. e v =v ref - v ; Use the velocity error to calculate the longitudinal control amount: ; Among them, K p is the proportional gain parameter, K d is the differential gain parameter, K i is the integral gain parameter, v ref is the reference speed, v is the current actual speed of the vehicle, and u is the output of the control object; The lateral controller is implemented by a linear quadratic regulator, and the optimal steering angle control amount is calculated by minimizing the cost function. The steps are as follows: The single track model of the lateral motion of the vehicle is described as: ; Where y is the lateral deviation between the vehicle and the trajectory, v x is the longitudinal velocity of the vehicle, v y is the lateral velocity of the vehicle, is the yaw angle, r is the yaw angular velocity, δ is the front wheel turning angle, C f , C r are the cornering stiffness of the front and rear tires, l f 、l r are the front and rear wheelbases, m is the total mass of the vehicle, I z is the moment of inertia of the vehicle around the vertical axis; Convert the model to linear state space form: ; Among them, the state vector , control input u=δ, matrix ,matrix ; The cost function of the LQR controller is: ; Among them, Q is the state weight matrix, R is the control input weight matrix; the control law is u=-KX, and the optimal gain matrix K is calculated by solving the Riccati equation.