A high-speed merging area background traffic flow modeling method and model application
By constructing a merging intention activation function and a boundary force model, the longitudinal and lateral dynamic forces are decomposed, solving the problem of insufficient accuracy of existing traffic flow modeling methods in the merging zone and realizing more reliable autonomous driving tests.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU UNIV
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-05
AI Technical Summary
Existing traffic flow modeling methods cannot accurately describe the complex interactive behavior of vehicles in highway merging zones, which reduces the credibility of autonomous driving tests, fails to effectively simulate the nonlinear decision-making and individual differences of drivers, and is difficult to handle changing traffic conditions.
A traffic flow modeling method for high-speed merging zones is proposed. By defining the data of the vehicle and surrounding vehicles in the merging scenario, a merging intention activation function is constructed. Boundary force model, self-driving force and vehicle interaction force are introduced to decompose the longitudinal and lateral dynamic forces. The parameters are fitted using the particle swarm optimization algorithm to generate a more accurate traffic flow model.
It improves the simulation accuracy and anthropomorphism of autonomous driving tests, and can more realistically reflect the trajectory deviation and speed limitation characteristics of merging vehicles, thereby enhancing the credibility of merging zone scenarios and the ability to handle complex interactions.
Smart Images

Figure CN122154474A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of traffic flow modeling and autonomous driving testing, specifically a method for dynamic modeling of background traffic flow in merging areas of highways. Background Technology
[0002] With the rapid development of intelligent transportation systems and autonomous driving technology, highway merging zones have become a key testing scenario for autonomous driving due to the large speed difference between merging vehicles and main road vehicles and the frequent interweaving of merging behaviors. Currently, virtual testing of merging zones largely relies on traffic flow models such as cellular automata models, continuous flow models, and car-following models. While these methods can simulate traffic flow and vehicle behavior, they have certain drawbacks. For example, cellular automata models are overly simplified, unable to accurately describe the continuous motion and acceleration changes of vehicles, and have low computational efficiency, making them difficult to handle large-scale complex scenarios. Continuous flow models ignore individual differences and complex interactions between vehicles, making them unsuitable for the non-uniform flow environment of merging zones. While car-following models can consider local interactions, they are insufficient in handling the variable traffic conditions in merging zones and have high computational complexity. These shortcomings result in a discrepancy between the generated test scenarios and the real traffic environment, failing to fully reflect the complexity and dynamic changes of traffic flow, thus reducing the credibility of autonomous driving tests.
[0003] In actual high-speed merging, the merging of vehicles on ramps is not a simple lateral displacement, but a strongly constrained lane-changing behavior driven by multiple objectives. Drivers need to make nonlinear speed strategy adjustments in a short period of time, taking into account their own vehicle status, the status of other traffic flow on the ramp, changes in the target lane gap, and road geometric constraints.
[0004] This complex interaction logic is often simplified into a single heuristic rule in existing modeling, ignoring the driver's phased goal shift from "gap search" to "car-following stability," as well as individual style differences from conservative to aggressive. Furthermore, traditional models are mostly based on simple kinematic difference calculations, lacking a structured expression of driving motivation. This results in rigid patterns in the generated background traffic flow, making it difficult to cover extreme long-tail scenarios in real merging areas.
[0005] Therefore, a dynamic modeling method that can accurately depict the behavior of the flow is needed to improve the realism of autonomous driving tests in this scenario. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this application proposes a method and model application for modeling background traffic flow in high-speed merging zones, which can accurately depict merging behavior.
[0007] The technical solution adopted in this invention is as follows:
[0008] A method for modeling background traffic flow in high-speed merging zones includes the following steps:
[0009] Step 1: Define the start and end points in the high-speed merging process, extract the driving data of the vehicle and surrounding vehicles in the merging scenario, and form a merging dataset;
[0010] Step 2: Perform merging behavior feature analysis to identify drivers' path-keeping intentions under the constraints of the solid line control zone at the beginning of the ramp and their lane-changing merging intentions after crossing the end of the control zone. Construct a merging intention activation function based on the relative position of vehicles. It is used to describe the process of a driver’s attention shifting from driving along the ramp to the target lane on the main road, thereby realizing dynamic weight scheduling between different spatial areas during the merging process;
[0011] Step 3: Activate the merging intent function constructed in Step 2. A boundary force model is introduced as a dynamic coupling factor between different spatial constraints; boundary force model The force is composed of the repulsive force of the solid line control zone in front of the ramp, the attractive force of the center line of the main road lane, and the compressive force of the end boundary of the acceleration lane.
[0012] Step 4: Based on the boundary force model constructed in Step 3, construct the self-driving forces respectively. and vehicle interaction ;
[0013] Step 5: The background traffic flow dynamics model of the merging zone is composed of boundary forces, self-driving forces and vehicle interaction forces. The dynamics model is decomposed into longitudinal and transverse dynamic forces, and the global parameters of the decomposed longitudinal and transverse resultant forces are optimized to complete the construction of the background traffic flow model of the high-speed merging zone.
[0014] Furthermore, the merging process of vehicles is divided into three consecutive stages: First, the vehicle starts from the front end of the ramp and enters the acceleration lane; then it accelerates along the acceleration lane to find a merging opportunity; finally, it completes the merging action of merging into the main road and stabilizing near the center line of the main road.
[0015] Furthermore, the dataset includes, but is not limited to, the vehicle's position, speed, acceleration, and heading angle.
[0016] Furthermore, the activation function for the merging intention is:
[0017] ;
[0018] in, This indicates the longitudinal distance between the vehicle and the end of the solid line segment. The maximum activation intensity representing the driver's intention to merge. This refers to the "spatial buffer distance" required for the driver to complete the transfer of mental intent.
[0019] Furthermore, the specific construction process is as follows:
[0020] Step 3.1: Introduce inverse weights The correction addresses the solid line repulsion force caused by the solid line control zone at the beginning of the acceleration lane, suppressing premature activation of merging intentions. As vehicles approach the end of the solid line, the physical restraining force exerted by the road decreases smoothly with the shift in psychological intention. The solid line repulsion force is denoted as:
[0021]
[0022]
[0023] in, This indicates the change in acceleration of the merging vehicle due to the repulsion of the solid line; 1- The complementary function representing the activation function of the merging intention; Indicates the lateral distance between the vehicle and the solid line segment; For the attenuation rate parameter, These are the constitutive model parameters of the spring; For the quality of the vehicle;
[0024] Step 3.2: Introduce positive weights Adjust the attraction of the main road centerline; when a vehicle crosses the restricted area, the positive weight... To achieve the gradual release of the driver's merging intention with spatial displacement, the attraction force of the main road centerline is denoted as:
[0025]
[0026]
[0027] in, This indicates the change in acceleration of merging vehicles due to the attraction of the main road centerline; The activation function indicates the intention to merge. Indicates the lateral distance between the vehicle and the centerline of the main road; Represents the constitutive model parameters of the spring; For the quality of the vehicle;
[0028] Step 3.3: Construct an end-boundary pressure model based on vehicle displacement, velocity, and acceleration feedback to guide the vehicle to complete the merging maneuver within the limited acceleration lane space; considering the "forced lane change" characteristic at the merging end, the end-boundary force of the acceleration lane is expressed using a spring-damped parallel connection, denoted as:
[0029]
[0030]
[0031]
[0032] in, This indicates that the merging vehicle is accelerated by the boundary of the acceleration lane. This indicates the acceleration experienced by the merging vehicle at the end of the acceleration lane; , These represent the positions of the merging vehicle and the merging vehicle when it reaches the end boundary, respectively. , These represent the speeds of the merging vehicle and the speed of the merging vehicle when it reaches the end boundary, respectively. , These represent the accelerations of the merging vehicle and the merging vehicle when it reaches the end boundary, respectively. , These represent the constitutive model parameters of the spring; , These represent the constitutive model parameters of the damping, respectively; , These represent the spring relaxation length parameters; For the quality of the vehicle;
[0033] Step 3.4: Finally, the total boundary forces of the vehicle are obtained, denoted as:
[0034]
[0035] in, This represents the repulsive force of the solid line segment; Indicates the attraction of the centerline of the main road; This represents the boundary force at the end of the acceleration lane.
[0036] Furthermore, the specific process of step 4 is as follows:
[0037] Step 4.1: By introducing a sinusoidal correction function to compensate for the desired speed, the psychological game fluctuations of the driver during the merging preparation phase are simulated to construct self-driving force. The self-driving force model is denoted as:
[0038]
[0039]
[0040] in, Indicates the desired speed of the merging trains; This represents the speed of the merging vehicle at time t. Indicates the constitutive model parameters of the damper; This represents the maximum deviation of the sine term from the desired velocity; A parameter representing the period of fluctuation.
[0041] Step 4.2: The specific construction process of the interaction force model is as follows:
[0042] Step 4.2.1: Construct an attention transfer function based on lateral distance to naturally reflect the driver's attention shift from focusing on vehicles ahead on the ramp to focusing on vehicles on the main road during continuous lane changes. The attention transfer function is denoted as:
[0043]
[0044] in, Indicates the lateral distance between merging vehicles and other vehicles of interest; This is the attention diffusion scale parameter, used to characterize the driver's attention range towards vehicles in different lanes.
[0045] Step 4.2.2: Construct a direction-sensitive function and dynamically adjust its influence weights based on the angles of surrounding vehicles relative to the test vehicle. Utilizing the smoothing properties of the modified hyperbolic tangent function, it achieves focused attention on vehicles interacting in key directions. The direction-sensitive function is as follows:
[0046]
[0047] in, Indicates merging vehicle and surrounding vehicles The connection and The included angle of the axis; This represents the minimum weight parameter of the direction-sensitive function, ensuring that vehicles in different directions have different impacts. During high-speed merging, drivers are typically more sensitive to vehicles in front and diagonally ahead. This function uses a cosine mapping of the angle to give higher weight to vehicles in front and diagonally ahead, thus reflecting the driver's focus on vehicles interacting in key directions during merging.
[0048] Step 4.2.3: Establish inter-vehicle interaction force based on attention transfer function and direction-sensitive weight function , denoted as:
[0049]
[0050]
[0051] in, This indicates the acceleration change of the merging vehicle caused by vehicle interaction; Represents the attention transfer function; Represents the direction-sensitive function; , These indicate the positions of the merging vehicle and surrounding vehicles, respectively. , These represent the speeds of the merging vehicle and the surrounding vehicles, respectively. Represents the constitutive model parameters of the spring; Indicates the constitutive model parameters of the damper; This is the spring relaxation length parameter.
[0052] Furthermore, the aforementioned forces are decomposed into longitudinal (driving direction) and lateral (lane-changing direction). The longitudinal resultant force includes the longitudinal self-driving force, the longitudinal component of the end boundary force, and the longitudinal component of the interaction force; the lateral resultant force includes the lateral self-driving force, the repulsive force of the solid line segment, the attractive force of the main road center, the lateral component of the end boundary force, and the lateral component of the interaction force.
[0053] (1) The resultant force in the longitudinal direction of the merging car is denoted as:
[0054]
[0055] in, This indicates the self-driving force of the merging vehicle in the longitudinal direction; This represents the boundary force in the longitudinal direction of the merging vehicle. Since the repulsive force of the solid line and the attractive force of the main road centerline only occur in the lateral direction, the boundary force in the longitudinal direction of the merging vehicle is generated only by the longitudinal component of the boundary force at the end of the lane. This represents the interaction force along the longitudinal direction of the merging vehicle.
[0056] (2) The resultant force on the lateral side of the merging vehicle is denoted as:
[0057]
[0058] in, This indicates the self-driving force of the merging vehicle in the lateral direction; This represents the lateral boundary force of merging vehicles. Specifically, it is generated by the repulsive force of the solid line, the attractive force of the main road centerline, and the lateral component of the lane end boundary force. This indicates the interaction force in the lateral direction of the merging vehicles.
[0059] Furthermore, parameter fitting was performed using Matlab.
[0060] Furthermore, based on the extracted merging dataset and the constructed dynamic model, the undetermined parameters of the dynamic model are fitted using the particle swarm optimization algorithm. By comparing the residuals of the model output trajectory and the actual trajectory, the background traffic flow model is calibrated and validated.
[0061] The application of a high-speed merging zone background traffic flow model in the testing of an autonomous driving system includes the following steps:
[0062] S1: Acquire multiple high-speed merging sample scenarios and the corresponding vehicle driving data for each scenario. Calculate the relative speed and relative distance between vehicles and surrounding vehicles in each sample scenario. Then calculate the collision time (TTC) for each sample scenario and determine the minimum collision time within each sample scenario. This serves as a hazard indicator for the sample scenario;
[0063] S2: Based on the sample scenario The sample scenarios are ranked by the size of the indicators; after ranking, a portion of the higher-risk samples are selected as an elite sample set, and the parameters of the merging dynamics model corresponding to these elite samples are extracted to form an elite parameter set. ;
[0064] S3: For the elite parameter set, a Gaussian mixture model is used to fit the elite parameter set to obtain the fitted hazard enhancement sampling distribution. ;
[0065] S4: In the sampling distribution Random sampling is performed to generate new merging vehicle dynamics model parameter samples. These samples are then input into the high-speed merging area background traffic flow model constructed by the aforementioned high-speed merging area background traffic flow modeling method. Simulation calculations are then performed to obtain new high-speed merging scene trajectories.
[0066] The beneficial effects of this invention are:
[0067] 1. This invention extracts individual features from real-world driving datasets and constructs a merging intention weight function based on vehicle location. This effectively describes the driver's decision-making logic for a smooth transition from the "ramp solid line constraint stage" to the "main road merging stable stage." Compared to traditional models, this invention effectively avoids behavioral abrupt changes during merging, improving the simulation accuracy and anthropomorphism of background traffic flow in complex merging scenarios.
[0068] 2. This invention fully considers the unique road geometry and traffic regulations of merging zones. By introducing dynamic components such as the repulsive force of solid line segments, the attractive force of the main road center, and the constraint force at the end of lanes, macroscopic traffic rules are transformed into microscopic vehicle forces. This modeling method can more realistically reflect the trajectory deviation and speed limitation characteristics of merging vehicles under forced lane-changing pressure, providing a more reliable background traffic flow environment for autonomous driving testing.
[0069] 3. The attention transfer function introduced in this invention abandons the rigid interactive judgment based on "lane affiliation" or "logic switch" in traditional models. Instead, it uses lateral displacement to drive attention weights to perform nonlinear and continuous sliding between the vehicle in front of the ramp and the target vehicle on the main road. This method can more naturally reproduce the driver's attention transfer pattern during lane merging and effectively handle the complex interlaced following interactions in the merging zone. Attached Figure Description
[0070] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0071] Figure 2 This is a comparison chart of the longitudinal acceleration model prediction and actual value of the merging vehicle in an embodiment of the present invention.
[0072] Figure 3 This is a comparison chart of the predicted and actual lateral acceleration values of the merging vehicle in an embodiment of the present invention.
[0073] Figure 4 This is a comparison chart of the predicted and actual lateral acceleration of the vehicle without the inclusion of the merging intention transfer function.
[0074] Figure 5 Comparison of the cumulative distribution function of minimum collision time (TTC) between real and generated scenes. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0076] The following is in conjunction with the appendix Figures 1 to 5 The invention will be further described in detail with reference to specific embodiments, but the scope of protection of the invention is not limited thereto.
[0077] like Figure 1 As shown, the method for modeling background traffic flow in high-speed merging zones proposed in this invention is as follows:
[0078] Step 1: Define the start and end points of the high-speed merging process, and extract the driving data of the vehicle and surrounding vehicles in the merging scenario to form a merging dataset. The extracted driving data includes, but is not limited to, vehicle position, speed, acceleration, and heading angle.
[0079] More specifically, this example is based on the original driving dataset, which is the exiD dataset used.
[0080] This invention divides the merging process of vehicles into three consecutive stages: First, the vehicle starts from the front end of the ramp and enters the acceleration lane; then it accelerates along the acceleration lane to find a merging opportunity; finally, it completes the merging action by merging into the main road and stabilizing near the center line of the main road. This process reflects the full characteristics of the merging behavior from pre-entry to execution.
[0081] Based on the original driving dataset, and according to the defined merging process, driving data such as the position, speed, acceleration, and heading angle of the vehicle and surrounding vehicles are extracted to construct a merging dataset.
[0082] This example uses vehicle ID 62 in 73_tracks as an example. Vehicle ID 62 interacts with surrounding vehicles during the merging process.
[0083] Step 2: Perform merging behavior feature analysis based on the merging dataset to identify drivers' path-keeping intentions under the constraints of the solid line control zone before the ramp and their lane-changing merging intentions after crossing the end of the control zone. Construct a merging intention activation function based on the relative position of vehicles. Based on the merging dataset extracted in Step 1, we analyzed the significant characteristics of different drivers merging at high speeds. Specifically, before entering the merging zone, drivers primarily focus their attention on the centerline of the acceleration lane to maintain longitudinal acceleration within the current lane. As the vehicle approaches and enters the merging zone, the driver's visual search and decision-making weight gradually shifts from the acceleration lane to the centerline of the target lane on the main road. At this point, the driver's attention to the main road lane gradually increases, while the intention to continue along the original acceleration lane decreases accordingly.
[0084] To accurately describe the continuous evolution process from ramp merging to the main road and its eventual stabilization in dynamic modeling, this invention constructs a merging intention activation function based on the relative position of vehicles. This function uses mathematical methods to transform the driver's psychological intention switching into a smooth weight transition, avoiding the acceleration jumps caused by hard logical switching in traditional models. The specific definition of the merging intention activation function is as follows:
[0085]
[0086] in, This represents the longitudinal distance of the vehicle from the end of the solid line segment; it is the spatial trigger variable that drives the shift in the driver's psychological intention. When At that time, the vehicle was still in the restricted area marked by the solid line; when At that time, the vehicles enter the zone where they can merge freely. This represents the maximum activation intensity of the driver's merging intention, used to characterize the upper limit of the response of different driving styles to the main road's attractiveness. This refers to the "spatial buffer distance" required for the driver to complete the transfer of mental intent.
[0087] Step 3: Activate the merging intent function constructed in Step 2. A boundary force model is introduced as a dynamic coupling factor between different spatial constraints; boundary force model The force is composed of the repulsive force of the solid line control zone at the front of the ramp, the attractive force of the main road lane centerline, and the compressive force of the end boundary of the acceleration lane; the specific construction process is as follows:
[0088] Step 3.1: Introduce the merging intention activation function constructed in Step 2 into the boundary force sub-model. This function serves as a dynamic coupling factor between the ramp physical constraints and the main road target constraints. The total boundary force of merging vehicles is composed of the solid line repulsion force generated by the solid line no-entry zone at the front of the ramp, the attraction force of the main road lane centerline, and the boundary pressure force at the end of the acceleration lane.
[0089] Introducing reverse weights The correction addresses the solid line repulsion force caused by the solid line control zone at the beginning of the acceleration lane, suppressing premature activation of merging intentions. As vehicles approach the end of the solid line, the physical restraining force exerted by the road decreases smoothly with the shift in psychological intention. The solid line repulsion force is denoted as:
[0090]
[0091]
[0092] in, This indicates the change in acceleration of the merging vehicle due to the repulsion of the solid line; 1- The complementary function representing the activation function of the merging intention; Indicates the lateral distance between the vehicle and the solid line segment; For the attenuation rate parameter, These are the constitutive model parameters of the spring; For the quality of the vehicle;
[0093] Step 3.2: Introduce positive weights Adjust the attraction of the main road centerline; when a vehicle crosses the restricted area, the positive weight... To achieve the gradual release of the driver's merging intention with spatial displacement, the attraction force of the main road centerline is denoted as:
[0094]
[0095]
[0096] in, This indicates the change in acceleration of merging vehicles due to the attraction of the main road centerline; The activation function indicates the intention to merge. Indicates the lateral distance between the vehicle and the centerline of the main road; Represents the constitutive model parameters of the spring; For the quality of the vehicle;
[0097] Step 3.3: Construct an end-boundary pressure model based on vehicle displacement, velocity, and acceleration feedback to guide the vehicle to complete the merging maneuver within the limited acceleration lane space; considering the "forced lane change" characteristic at the merging end, the end-boundary force of the acceleration lane is expressed using a spring-damped parallel connection, denoted as:
[0098]
[0099]
[0100]
[0101] in, This indicates that the merging vehicle is accelerated by the boundary of the acceleration lane. This indicates the acceleration experienced by the merging vehicle at the end of the acceleration lane; , These represent the positions of the merging vehicle and the merging vehicle when it reaches the end boundary, respectively. , These represent the speeds of the merging vehicle and the speed of the merging vehicle when it reaches the end boundary, respectively. , These represent the accelerations of the merging vehicle and the merging vehicle when it reaches the end boundary, respectively. , These represent the constitutive model parameters of the spring; , These represent the constitutive model parameters of the damping, respectively; , These represent the spring relaxation length parameters; For the quality of the vehicle;
[0102] Step 3.4: Finally, the total boundary forces of the vehicle are obtained, denoted as:
[0103]
[0104] in, This represents the repulsive force of the solid line segment; Indicates the attraction of the centerline of the main road; This represents the boundary force at the end of the acceleration lane.
[0105] Step 4: Based on the boundary force model constructed in Step 3, construct the self-driving force. and vehicle interaction As a background traffic flow dynamics model for merging zones, the dynamics model is decomposed into longitudinal and transverse dynamic forces, and global parameter optimization is performed on the decomposed longitudinal and transverse resultant forces to complete the construction of the background traffic flow model for high-speed merging zones.
[0106] Self-driving force is used to simulate the driver's intention to achieve the desired speed. In this study, the magnitude of the self-driving force is positively correlated with the difference between the desired speed and the actual vehicle speed; this physical characteristic corresponds to the damper element in the constitutive model. Since the driver's desired speed fluctuates before and after merging, rather than being a fixed constant, this invention introduces a sinusoidal correction function to compensate for the desired speed. The specific process is as follows:
[0107] Step 4.1: By introducing a sinusoidal correction function to compensate for the desired speed, the psychological game fluctuations of the driver during the merging preparation phase are simulated to construct self-driving force. The self-driving force model is denoted as:
[0108]
[0109]
[0110] in, This indicates the change in acceleration of the merging vehicle due to its own driving force; Indicates the desired speed of the merging trains; This represents the speed of the merging vehicle at time t. Indicates the constitutive model parameters of the damper; This represents the maximum deviation of the sine term from the desired velocity; A parameter representing the period of fluctuation.
[0111] Step 4.2: The specific construction process of the interaction force model is as follows:
[0112] Step 4.2.1: Construct an attention transfer function based on lateral distance to naturally reflect the driver's attention shift from focusing on vehicles ahead on the ramp to focusing on vehicles on the main road during continuous lane changes. The attention transfer function is denoted as:
[0113]
[0114] in, Indicates the lateral distance between merging vehicles and other vehicles of interest; This is the attention diffusion scale parameter, used to characterize the driver's attention range towards vehicles in different lanes.
[0115] Step 4.2.2: Construct a direction-sensitive function and dynamically adjust its influence weights based on the angles of surrounding vehicles relative to the test vehicle. Utilizing the smoothing properties of the modified hyperbolic tangent function, it achieves focused attention on vehicles interacting in key directions. The direction-sensitive function is as follows:
[0116]
[0117] in, Indicates merging vehicle and surrounding vehicles The connection and The included angle of the axis; This represents the minimum weight parameter of the direction-sensitive function, ensuring that vehicles in different directions have different impacts. During high-speed merging, drivers are typically more sensitive to vehicles in front and diagonally ahead. This function uses a cosine mapping of the angle to give higher weight to vehicles in front and diagonally ahead, thus reflecting the driver's focus on vehicles interacting in key directions during merging.
[0118] Step 4.2.3: Establish inter-vehicle interaction force based on attention transfer function and direction-sensitive weight function , denoted as:
[0119]
[0120]
[0121] in, This indicates the acceleration change of the merging vehicle caused by vehicle interaction; Represents the attention transfer function; Represents the direction-sensitive function; , These indicate the positions of the merging vehicle and surrounding vehicles, respectively. , These represent the speeds of the merging vehicle and the surrounding vehicles, respectively. Represents the constitutive model parameters of the spring; Indicates the constitutive model parameters of the damper; This is the spring relaxation length parameter.
[0122] Step 5: The dynamic model is composed of boundary forces, self-driving forces and vehicle interaction forces. The dynamic model is then decomposed into longitudinal and lateral dynamic forces and global parameters are optimized to complete the construction of the background traffic flow model in the high-speed merging zone.
[0123] During merging, merging vehicles are subjected to self-driving force, boundary forces, and interaction forces from surrounding vehicles. In actual calculations, this needs to be divided into longitudinal and lateral forces. The resultant force is decomposed into longitudinal and lateral forces. The longitudinal forces include the longitudinal self-driving force, the longitudinal component of the boundary force at the end of the acceleration lane, and the longitudinal component of the interaction forces between vehicles. The lateral forces include the lateral self-driving force, the repulsive force of the solid line segment, the attractive force of the main road centerline, the lateral component of the boundary force at the end of the acceleration lane, and the lateral component of the interaction forces between vehicles.
[0124] Further, based on the model formula described in step 3, calculate the longitudinal and transverse resultant forces respectively:
[0125] (1) The resultant force in the longitudinal direction of the merging vehicle is calculated as follows:
[0126]
[0127] in, This indicates the self-driving force of the merging vehicle in the longitudinal direction; This represents the boundary force in the longitudinal direction of the merging vehicle. Since the repulsive force of the solid line and the attractive force of the main road centerline only occur in the lateral direction, the boundary force in the longitudinal direction of the merging vehicle is generated only by the longitudinal component of the boundary force at the end of the lane. This represents the interaction force along the longitudinal direction of the merging vehicle.
[0128] Furthermore, the mass of the merging vehicle is included in the calculation. Normalized to 1, substituting equations (21), (24), and (27) into equation (28), the final longitudinal resultant force is:
[0129]
[0130] in, This represents the longitudinal unit vector of the force exerted on the merging vehicle by the end boundary of the acceleration lane. This represents the longitudinal unit vector of the merging vehicle subjected to the interaction forces of surrounding vehicles.
[0131] Furthermore, when the merging vehicles reach the end of the acceleration lane, they will be forced to stop due to pressure. =0; =0. The parameters were fitted using the particle swarm optimization algorithm in Matlab, and the obtained parameter values are:
[0132] = 0.0171、 = 34.9729、 =8.9951、 =0.0564、 = 0.0100、 =0.0228、 =19.1713、 =7.3708、 = 5.7694、 =0.1000、 = 0.0435、 =1.1958、 = 6.9952、 =6.0662.
[0133] (2) The resultant force on the lateral side of the merging vehicle is calculated as follows:
[0134]
[0135] in, This indicates the self-driving force of the merging vehicle in the lateral direction; This represents the lateral boundary force of merging vehicles. Specifically, it is generated by the repulsive force of the solid line, the attractive force of the main road centerline, and the lateral component of the lane end boundary force. This indicates the interaction force in the lateral direction of the merging vehicles.
[0136] Furthermore, the mass of the merging vehicle is included in the calculation. Normalized to 1, substituting equations (18), (19), (20), (21), (24), and (27) into equation (30), the final resultant transverse force is:
[0137]
[0138] in, The lateral unit vector representing the force exerted on the merging vehicle by the end boundary of the acceleration lane; This represents the lateral unit vector of the merging vehicle subjected to the interaction forces of surrounding vehicles.
[0139] Furthermore, the parameters were fitted using the particle swarm optimization algorithm in Matlab, and the obtained parameter values are:
[0140] = 0.0936、 =1.1867、 =1、 = 0.0702、 =0.5、 =9.0602、 =0.2326、 =0.0001、 = 0.1056.
[0141] This completes the construction of the background traffic flow model for the high-speed merging zone.
[0142] Furthermore, this embodiment also includes model validity verification and accuracy analysis.
[0143] The effectiveness of the constructed dynamics model is quantitatively verified by comparing the simulated trajectories generated by the model with the real driving trajectories in the exiD dataset. The verification process is as follows:
[0144] First, using the longitudinal and lateral dynamic parameters obtained from the fitting in step 5, calculate the longitudinal and lateral acceleration, velocity, and displacement changes of the vehicle.
[0145] Furthermore, by using the original data to calculate the root mean square error (RMSE) values, the RMSE values for acceleration, velocity, and displacement in the longitudinal direction are 0.0386, 0.0454, and 0.1066, respectively; and the RMSE values for acceleration, velocity, and displacement in the lateral direction are 0.0198, 0.0212, and 0.0412, respectively. The experimental results show that the root mean square errors in each dimension remain at a low and reasonable level, proving that the dynamic model based on the high-speed merging zone proposed in this invention can faithfully reproduce the motion laws of real driving behavior.
[0146] Based on the above method, this invention also proposes an application of a high-speed merging zone background traffic flow model in the testing of autonomous driving systems, the steps of which are as follows:
[0147] S1: Obtain multiple high-speed merging sample scenarios and the corresponding vehicle driving data for each scenario, and calculate the relative distance between the test vehicle and surrounding vehicles in each sample scenario. and relative speed Furthermore, the collision time (TTC) is calculated, and its expression is:
[0148]
[0149] in, This indicates the longitudinal distance between the test vehicle and the vehicle in front. Indicates the speed of the test vehicle; Indicates the speed of the vehicle in front. When At that time, it was assumed that there was no risk of a rear-end collision between the two vehicles, so TTC was set to infinity.
[0150] Furthermore, the minimum collision time during the merging process is used as a hazard index for this sample scenario.
[0151] The formula for calculating the minimum collision time is:
[0152]
[0153] Where T represents the duration of the merging scenario.
[0154] S2: Based on the risk index obtained above All sample scenarios were sorted according to their degree of danger. Because... The smaller the value, the more dangerous the scenario; therefore, the top 15% of samples with the highest risk were selected as the elite sample set. Subsequently, the merging vehicle dynamics model parameters corresponding to these elite samples were extracted to form an elite parameter set:
[0155]
[0156] in, Indicates the first Vehicle dynamics model parameters corresponding to each sample scenario. This represents the risk screening threshold, which is set to 1.5 in this invention.
[0157] S3: In the obtained elite parameter set Based on this, a Gaussian mixture model is used to fit the probability distribution of the elite parameter set, thereby constructing a hazard-enhancing sampling distribution. :
[0158]
[0159] Where represents the number of Gaussian mixture components. For the first A Gaussian-distributed mixture of weights, satisfying ; For the first A mean vector of Gaussian distributions is used to describe the central location of the parameter distribution; It is the covariance matrix, used to characterize the correlation and statistical coupling between different driving behavior parameters; This represents the multidimensional Gaussian distribution function. By training the model with parameter samples extracted from natural driving data, the weights, means, and covariance matrices of each mixture component can be obtained, thus yielding a joint parameter distribution model that reflects the statistical laws of real driving behavior.
[0160] S4: The hazard-enhanced sampling distribution obtained in step S3 Based on this, random sampling is performed to shift the sampling probability towards the danger zone, thereby generating more potential danger scenarios, forming a danger scenario sample set, and generating new merging vehicle dynamics model parameter samples:
[0161]
[0162] in, This represents the generated dynamic model parameter samples; Indicates the number of parameter samples generated; This is a sampling distribution of hazardous areas obtained based on elite sample fitting. The parameter samples obtained in this way can increase the probability of sampling hazardous parameter combinations while maintaining the statistical characteristics of natural driving behavior.
[0163] Furthermore, based on Matlab software, the parameter samples of the merging vehicle dynamics model generated in S4 were substituted into the high-speed merging traffic flow dynamics model, and simulation calculations were performed in conjunction with the initial state of the background traffic flow to obtain a new high-speed merging scenario trajectory:
[0164]
[0165] in, This indicates the initial state of the background traffic flow; This represents the parameters of the generated merging vehicle dynamics model; This represents a high-speed merging traffic flow dynamics model.
[0166] The minimum collision time metric was then recalculated for the generated scene. This will form a sample set of dangerous scenarios.
[0167] Finally, the effectiveness of the proposed method in generating hazardous scenarios can be evaluated by comparing the hazard distribution of the generated hazardous scenario sample set with that of the original merging dataset. Therefore, a comparative analysis was conducted between the hazard distribution of the hazardous scenario sample set generated by the method of this invention and the original merging dataset. The results show that the minimum collision time distribution of the generated hazardous scenario sample set generally shifts towards a smaller TTC region, and the proportion of high-risk scenario samples increases significantly. This verifies that the generated hazardous scenario samples significantly increase the probability of triggering hazardous events while maintaining the rationality of driving behavior.
[0168] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A method for modeling background traffic flow in high-speed merging zones, characterized in that, The steps are as follows: Step 1: Define the start and end points in the high-speed merging process, extract the driving data of the vehicle and surrounding vehicles in the merging scenario, and form a merging dataset; Step 2: Perform merging behavior feature analysis to identify drivers' path-keeping intentions under the constraints of the solid line control zone at the beginning of the ramp and their lane-changing merging intentions after crossing the end of the control zone. Construct a merging intention activation function based on the relative position of vehicles. This describes the process of a driver's attention shifting from driving along a ramp to the target lane on the main road. Step 3: Activate the merging intent function constructed in Step 2. A boundary force model is introduced as a dynamic coupling factor between different spatial constraints; boundary force model The force is composed of the repulsive force of the solid line control zone in front of the ramp, the attractive force of the center line of the main road lane, and the compressive force of the end boundary of the acceleration lane. Step 4: Based on the boundary force model constructed in Step 3, construct the self-driving forces respectively. and vehicle interaction ; Step 5: The background traffic flow dynamics model of the merging zone is composed of boundary forces, self-driving forces and vehicle interaction forces. The dynamics model is decomposed into longitudinal and transverse dynamic forces, and the global parameters of the decomposed longitudinal and transverse resultant forces are optimized to complete the construction of the background traffic flow model of the high-speed merging zone.
2. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, The merging process of vehicles is divided into three consecutive stages: First, the vehicle starts from the front of the ramp and enters the acceleration lane; then it accelerates along the acceleration lane to find a merging opportunity; finally, it completes the merging action of merging into the main road and stabilizing near the center line of the main road.
3. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, The dataset includes, but is not limited to, vehicle position, speed, acceleration, and heading angle.
4. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, The activation function for the merging intention is: ;in, This indicates the longitudinal distance between the vehicle and the end of the solid line segment. The maximum activation intensity representing the driver's intention to merge. This refers to the "spatial buffer distance" required for the driver to complete the transfer of mental intent.
5. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, The specific construction process is as follows: Step 3.1: Introduce inverse weights The correction addresses the solid line repulsion force caused by the solid line control zone at the beginning of the acceleration lane, suppressing premature activation of merging intentions. As vehicles approach the end of the solid line, the physical restraining force exerted by the road decreases smoothly with the shift in psychological intention. The solid line repulsion force is denoted as: ; ; in, This indicates the change in acceleration of the merging vehicle due to the repulsion of the solid line; 1- The complementary function representing the activation function of the merging intention; Indicates the lateral distance between the vehicle and the solid line segment; For the attenuation rate parameter, These are the constitutive model parameters of the spring; For the quality of the vehicle; Step 3.2: Introduce positive weights Adjust the attraction of the main road centerline; when a vehicle crosses the restricted area, the positive weight... To achieve the gradual release of the driver's merging intention with spatial displacement, the attraction force of the main road centerline is denoted as: ; ; in, This indicates the change in acceleration of merging vehicles due to the attraction of the main road centerline; The activation function indicates the intention to merge. Indicates the lateral distance between the vehicle and the centerline of the main road; Represents the constitutive model parameters of the spring; For the quality of the vehicle; Step 3.3: Construct an end-boundary pressure model based on vehicle displacement, velocity, and acceleration feedback to guide the vehicle to complete the merging maneuver within the limited acceleration lane space; considering the "forced lane change" characteristic at the merging end, the end-boundary force of the acceleration lane is expressed using a spring-damped parallel connection, denoted as: ; ; ; in, This indicates that the merging vehicle is accelerated by the boundary of the acceleration lane. This indicates the acceleration experienced by the merging vehicle at the end of the acceleration lane; , These represent the positions of the merging vehicle and the merging vehicle when it reaches the end boundary, respectively. , These represent the speeds of the merging vehicle and the speed of the merging vehicle when it reaches the end boundary, respectively. , These represent the accelerations of the merging vehicle and the merging vehicle when it reaches the end boundary, respectively. , These represent the constitutive model parameters of the spring; , These represent the constitutive model parameters of the damping, respectively; , These represent the spring relaxation length parameters; For the quality of the vehicle; Step 3.4: Finally, the total boundary forces of the vehicle are obtained, denoted as: ; in, This represents the repulsive force of the solid line segment; Indicates the attraction of the centerline of the main road; This represents the boundary force at the end of the acceleration lane.
6. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, The specific process of step 4 is as follows: Step 4.1: By introducing a sinusoidal correction function to compensate for the desired speed, the psychological game fluctuations of the driver during the merging preparation phase are simulated to construct self-driving force. The self-driving force model is denoted as: ; ; in, Indicates the desired speed of the merging trains; This represents the speed of the merging vehicle at time t. Indicates the constitutive model parameters of the damper; This represents the maximum deviation of the sine term from the desired velocity; A parameter representing the period of fluctuation; Step 4.2: The specific construction process of the interaction force model is as follows: Step 4.2.1: Construct an attention transfer function based on lateral distance to naturally reflect the driver's attention shift from focusing on vehicles ahead on the ramp to focusing on vehicles on the main road during continuous lane changes. The attention transfer function is denoted as: ; in, Indicates the lateral distance between merging vehicles and other vehicles of interest; This is the attention diffusion scale parameter, used to characterize the driver's attention range towards vehicles in different lanes; Step 4.2.2: Construct a direction-sensitive function. Based on the angles of surrounding vehicles relative to the test vehicle, dynamically adjust their influence weights. Utilize the smoothing properties of the modified hyperbolic tangent function to focus on vehicles interacting in key directions. The direction-sensitive function is as follows: ; in, Indicates merging vehicle and surrounding vehicles The connection and The included angle of the axis; The minimum weight parameter represents the direction-sensitive function; Step 4.2.3: Establish inter-vehicle interaction force based on attention transfer function and direction-sensitive weight function , denoted as: ; ; in, This indicates the acceleration change of the merging vehicle caused by vehicle interaction; Represents the attention transfer function; Represents the direction-sensitive function; , These indicate the positions of the merging vehicle and surrounding vehicles, respectively. , These represent the speeds of the merging vehicle and the surrounding vehicles, respectively. Represents the constitutive model parameters of the spring; Indicates the constitutive model parameters of the damper; This is the spring relaxation length parameter.
7. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, The background traffic flow dynamics model of the merging zone is decomposed into longitudinal and lateral dimensions, as follows: (1) The resultant force in the longitudinal direction of the merging car is denoted as: ; in, This indicates the self-driving force of the merging vehicle in the longitudinal direction; This represents the boundary force in the longitudinal direction of the merging car. This indicates the interaction force along the longitudinal direction of the merging vehicles; (2) The resultant force on the lateral side of the merging vehicle is denoted as: ; in, This indicates the self-driving force of the merging vehicle in the lateral direction; This represents the boundary force in the lateral direction of the merging vehicle. This indicates the interaction force in the lateral direction of the merging vehicles.
8. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, Parameter fitting is performed using Matlab.
9. The method for modeling background traffic flow in a high-speed merging zone according to claim 1, characterized in that, Based on the extracted merging dataset and the constructed dynamic model, the undetermined parameters of the dynamic model are fitted using the particle swarm optimization algorithm. By comparing the residuals of the model output trajectory and the actual trajectory, the background traffic flow model is calibrated and validated.
10. An application of a high-speed merging zone background traffic flow model in the testing of an autonomous driving system, characterized in that, The steps are as follows: S1: Acquire multiple high-speed merging sample scenarios and the corresponding vehicle driving data for each scenario. Calculate the relative speed and relative distance between vehicles and surrounding vehicles in each sample scenario. Then calculate the collision time (TTC) for each sample scenario and determine the minimum collision time within each sample scenario. This serves as a hazard indicator for the sample scenario; S2: Based on the sample scenario The index size is used to rank the sample scenarios by risk level. After sorting, a portion of the samples with higher risk were selected proportionally to form an elite sample set, and the parameters of the merging dynamics model corresponding to these elite samples were extracted to form an elite parameter set. ; S3: For the elite parameter set, a Gaussian mixture model is used to fit the elite parameter set to obtain the fitted hazard enhancement sampling distribution. ; S4: In the sampling distribution Random sampling is performed to generate new merging vehicle dynamics model parameter samples. These samples are then input into the high-speed merging area background traffic flow model constructed by the high-speed merging area background traffic flow modeling method described in claim 1, and simulation calculations are performed to obtain new high-speed merging scene trajectories.