A Theory-Data Dual-Driven Approach to Modeling Vehicle Car-Following Behavior

By adopting a theory-data dual-driven vehicle car-following behavior modeling method, combining 2D-IDM and KAN4CF models, and introducing randomness, the shortcomings of existing models in short-term prediction accuracy and traffic flow simulation results are solved, achieving high-precision vehicle trajectory prediction and realistic traffic flow simulation.

CN120781671BActive Publication Date: 2026-03-10HEBEI TRANSPORTATION INVESTMENT GRP CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing car-following models have shortcomings in short-term prediction accuracy and traffic flow simulation results. Theoretical-driven models have low accuracy, and data-driven models are unable to reflect traffic oscillations.

Method used

A theory-data dual-driven approach is adopted, combining the 2D-IDM model and the KAN4CF deep learning model. By collecting car-following trajectory data, a row-cross attention mechanism is constructed to introduce randomness, predict the vehicle acceleration distribution, and obtain the actual acceleration value through a sampler algorithm.

Benefits of technology

It improves the accuracy of short-term trajectory prediction, and the simulation results are consistent with the actual traffic flow evolution and can reflect the characteristics of traffic oscillation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120781671B_ABST
    Figure CN120781671B_ABST
Patent Text Reader

Abstract

This invention provides a theory-data dual-driven method for modeling vehicle car-following behavior. The method includes: collecting a dataset of car-following trajectories from manually driven vehicles; calibrating a 2D-IDM model using the car-following trajectory dataset; using the 2D-IDM model to predict the speed of the vehicle convoy to obtain simulation data; building a KAN4CF deep learning model; pre-training the KAN4CF deep learning model using simulation data and then fine-tuning it with real data to obtain a trained KAN4CF deep learning model; using the speed difference, position difference, vehicle speed, and preceding vehicle speed at each time step within a predetermined time period as input data; extracting features from the input data using a row-cross attention mechanism; and then inputting the extracted features into the trained KAN4CF deep learning model; the trained KAN4CF deep learning model outputs the vehicle's acceleration value at the next time step. This invention introduces randomness into the deep learning model, ensuring that the model achieves high short-term prediction accuracy while the traffic flow simulation results accurately reflect reality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent traffic management, and in particular to a theoretical-data double-driven vehicle car-following behavior modeling method. BACKGROUND

[0002] With the continuous growth of road traffic flow and the increasing complexity of vehicle driving environment, the interaction behavior between vehicles gradually becomes a key factor affecting traffic safety and operation efficiency. As the core decision-making process of vehicle longitudinal control, car-following behavior is directly related to vehicle spacing adjustment, speed change and potential conflict occurrence, and is an important part of micro-traffic behavior modeling. Especially in complex and dynamic road environment, the response of the driver in the car-following process has obvious randomness. If this behavior characteristic cannot be accurately described, it is easy to cause trajectory prediction deviation, and then affect the stable operation of the traffic system. Therefore, it is of great significance to build a model that can truly reflect the actual car-following characteristics of the driver, especially a car-following behavior model containing random factors, for improving the credibility of the traffic simulation system, assisting road traffic safety management and optimizing intelligent driving decision.

[0003] At present, the research of vehicle car-following model mainly includes two categories: one is a car-following model based on theoretical formula, which focuses on using physical formula to describe the basic phenomenon of car-following behavior, and has strong interpretability. Because the number of parameters is relatively small, it can be calibrated with limited data, and can simulate the actual traffic oscillation, but it performs poorly in short-time prediction of vehicle trajectory. The other is a car-following model based on data, compared with the theoretical model, the data-driven model can better extract key details from real-world traffic flow and accurately predict vehicle car-following behavior, but on the one hand, this kind of model needs a large amount of real data for training; on the other hand, this kind of model is mostly a deterministic model (considering that acceleration and vehicle spacing, speed difference, speed and other information are a one-to-one correspondence), which makes it difficult to reflect the real traffic phenomenon (such as the generation of oscillation) through simulation.

[0004] At present, the vehicle car-following model in the prior art includes a theoretical driving model and a data driving model. The theoretical driving model describes the car-following behavior through some formulas, can easily describe the randomness of artificial vehicles by introducing random numbers, and can reflect the characteristics of traffic oscillation, but has low short-time prediction accuracy. The data-driven model usually refers to a deep learning model, which needs a large amount of real data for training and has high short-time prediction accuracy, but because the model itself is difficult to introduce randomness, the simulation result does not conform to the actual situation and there is no traffic oscillation. SUMMARY

[0005] Embodiments of the present application provide a theoretical-data double-driven vehicle car-following behavior modeling method to effectively reproduce the evolution law of traffic flow.

[0006] To achieve the above objectives, the present invention adopts the following technical solution.

[0007] A theory-data dual-driven method for modeling vehicle car-following behavior includes:

[0008] Collect a car-following trajectory dataset of manually driven vehicles. The car-following trajectory dataset includes the vehicle's latitude and longitude, vehicle speed, and timestamp. Use the car-following trajectory dataset to calibrate a 2D-IDM model. Use the 2D-IDM model to predict the speed of the convoy and obtain simulation data.

[0009] A KAN4CF deep learning model was constructed using the Kolmogrove-Arnold network. The KAN4CF deep learning model includes a Row-cross attention mechanism layer, three 2D convolutional KAN layers, one Flatten layer, and three fully connected KAN layers. The KAN4CF deep learning model was pre-trained using the simulation data and then fine-tuned with real data to obtain the trained KAN4CF deep learning model.

[0010] The speed difference, position difference, speed of the vehicle and speed of the vehicle in front are taken as input data at each time step within a set time period. The feature extraction of the input data is performed using the Row-cross attention mechanism, and then input into the trained KAN4CF deep learning model. The trained KAN4CF deep learning model outputs the acceleration value of the vehicle at the next time step.

[0011] Preferably, the data collection of car-following trajectories of manually driven vehicles includes: vehicle latitude and longitude, vehicle speed, and timestamp. The 2D-IDM model is calibrated using the car-following trajectory dataset, and the 2D-IDM model is used to predict the speed of the convoy to obtain simulation data, including:

[0012] A car-following trajectory dataset of manually driven vehicles was collected. This dataset includes the vehicle's latitude and longitude, vehicle speed, and timestamp. The data collection time interval was 0.1 seconds. The car-following trajectory dataset was then smoothed.

[0013] Preferably, the step of calibrating the 2D-IDM model using the car-following trajectory dataset and using the 2D-IDM model to predict the speed of the convoy to obtain simulation data includes:

[0014] The calculation formula for the 2D-IDM model is set as follows:

[0015]

[0016] Δv i (t)=v i (t)-vi-1 (t)

[0017] Vd i (t)=|x i (t)-x i-1 (t)|-l veh

[0018] v i (t)=v i (t-1)+a i (t)*Δt

[0019] x i (t)=x i (t-1)+v i (t)*Δt

[0020] Among them, T i (t) represents the time-varying expected headway of the i-th vehicle at time t, where T1 and T2 are T1 and T2 respectively. i The upper and lower bounds of (t); r1 is a random variable uniformly distributed between 0 and 1; Δv i (t) represents the speed difference between vehicle i and vehicle i-1 at time t;

[0021] Δd i (t) represents the position difference between vehicle i and vehicle i-1; l veh Indicates the length of the vehicle; a max v represents the maximum acceleration of the vehicle. max The maximum speed of the vehicle is represented by δ, which is the acceleration exponent (δ > 0); d0 is the time distance in congestion; b is the comfortable deceleration; p1 represents T. i The probability of change of (t), a max T1, T2, δ, p1, and d0 are parameters that need to be determined manually.

[0022] The 2D-IDM model is calibrated using the aforementioned car-following trajectory dataset, and the objective function is constructed as follows:

[0023]

[0024] In the formula, M represents the number of vehicles in the fleet, N represents the total amount of data, and Q represents the total fleet operation time in seconds. i,true and s i,sim Let std represent the actual and simulated vehicle frontage distances for the i-th data point, respectively. j,true and std j,sim The standard deviation of the actual and simulated speeds of the first j vehicles, pl q,true and pl q,sim Let represent the actual and simulated platoon lengths at time q, respectively;

[0025] With the range of values ​​for each parameter as a constraint, the objective function is solved iteratively using the Grey Wolf algorithm. The solution outputs the parameter values ​​that need to be customized in the solved 2D-IDM model. The 2D-IDM model is iterated repeatedly until the maximum number of iterations is reached. Then, the speed of the convoy is predicted, and simulation data of the speed and position information of each vehicle in the convoy at each moment is obtained.

[0026] Preferably, the construction of the KAN4CF deep learning model using the Kolmogrove-Arnold network comprises a Row-cross attention mechanism layer, three 2D convolutional KAN layers, a Flatten layer, and three KAN layers. The KAN4CF deep learning model is pre-trained using the simulation data and then fine-tuned with real data to obtain the trained KAN4CF deep learning model, including:

[0027] The KAN4CF deep learning model is constructed by combining the convolutional Kolmogro-Arnold network ConvKAN and the fully connected Kolmogro-Arnold network Dense KAN. This KAN4CF deep learning model includes a row-cross attention mechanism layer, three 2D convolutional KAN layers, one Flatten layer, and three fully connected KAN layers. The output of the last KAN layer contains two values: the mean and variance of the acceleration probability distribution at the next time step.

[0028] The KAN4CF deep learning model was pre-trained using simulation data generated from the 2D-IDM model. The loss function during the pre-training process was constructed as follows:

[0029]

[0030] In the formula, L Gaussian y represents the loss function of the model during the pre-training phase. t μ represents the true value of the vehicle's acceleration at time t. t σ represents the mean of the predicted vehicle acceleration distribution. t The standard deviation of the predicted acceleration distribution;

[0031] After pre-training, the weights of the attention mechanism layer and ConvKAN are frozen, and the KAN4CF deep learning model is fine-tuned using real data. During the fine-tuning process, the following loss function is constructed based on the neural network with embedded physical knowledge:

[0032]

[0033] In the formula, ω real and ω physics These represent the weights of the data-driven part and the theory-driven part, respectively;

[0034] After the fine-tuning process is completed, the trained KAN4CF deep learning model is obtained.

[0035] Preferably, the step of taking the speed difference, position difference, vehicle speed, and vehicle speed of the vehicle in front at each time step within a predetermined time period as input data, extracting features from the input data using a Row-cross attention mechanism, and then inputting the data into a trained KAN4CF deep learning model, with the trained KAN4CF deep learning model outputting the vehicle's acceleration value at the next moment, includes: taking the speed difference, position difference, vehicle speed, and vehicle speed of the vehicle in front at each time step within a predetermined time period as input data, and using a Row-cross attention mechanism to convert the input data into matrix form. Assuming the time step of the input data is T and the feature dimension of the input data is 4*T, an M*N matrix is ​​constructed, where N is a multiple of 4, and M*N = 4*T. M and N need to be as close as possible in value. All features of the input data are converted into the following input feature matrix:

[0036]

[0037] In the formula, Let Δv represent the original input feature matrix. t Δs represents the speed difference between the vehicle and the vehicle in front at time t. t This represents the positional difference between the vehicle and the vehicle in front at time t. This represents the speed of the vehicle at time t. Let N represent the speed of the vehicle in front at time t, N represent the number of columns in the matrix, and M represent the number of rows in the matrix.

[0038] Based on the original input feature matrix The time step information at each position is used to construct the corresponding time feature matrix, as shown below:

[0039]

[0040] In the formula, Represents the time feature matrix;

[0041] Based on the time feature matrix Construct the location feature matrix as follows:

[0042]

[0043] In the formula, Represents the position feature matrix;

[0044] The first branch of the Row-cross attention mechanism concatenates the temporal and spatial feature matrices, then multiplies them with a trainable weight matrix using 2D convolution, layer normalization, and a sigmoid activation function to obtain the query matrix Q. The second branch of the Row-cross attention mechanism multiplies the temporal, spatial, and original feature matrices using channel pooling, 2D convolution, layer normalization, and a sigmoid activation function, and multiplies them with two trainable weight matrices to obtain the key matrix K and the value matrix V. Finally, the Q, K, and V matrices are calculated using a cross-attention mechanism to obtain three matrices with the same format as the original input matrix.

[0045] The three matrices are input into the trained KAN4CF deep learning model. The KAN4CF deep learning model predicts the possible acceleration distribution of the vehicle at the next moment. The acceleration value of the vehicle at the next moment is obtained by sampling from the acceleration distribution through the sampler algorithm.

[0046] As can be seen from the technical solutions provided by the embodiments of the present invention above, the present invention proposes a theory-data dual-driven car-following behavior modeling method. By introducing randomness into the deep learning model, it ensures that the model has high short-term prediction accuracy while the traffic flow simulation results conform to the actual situation. This solves the problem that existing car-following models struggle to maintain short-term trajectory prediction accuracy, and the simulation results are more consistent with the actual traffic flow evolution.

[0047] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of the invention. Attached Figure Description

[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A flowchart illustrating a theory-data dual-driven vehicle following behavior modeling method provided in an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of a Row-cross attention mechanism proposed in an embodiment of the present invention;

[0051] Figure 3 A schematic diagram illustrating a method for introducing physical knowledge into a deep learning model in three stages, provided by this invention;

[0052] Figure 4 This invention provides a spatiotemporal diagram of traffic flow evolution for a car-following convoy consisting of 10 vehicles, as proposed in an embodiment of the invention. Detailed Implementation

[0053] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0054] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or couplings. The term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.

[0055] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.

[0056] To facilitate understanding of the embodiments of the present invention, the following will provide further explanation and description with reference to the accompanying drawings and several specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0057] Following in a line: Driving in a convoy on a single lane where overtaking is not permitted.

[0058] The randomness of car-following behavior: An inherent property of human drivers, even under identical conditions (difference in position, speed, etc. between vehicles), the actions (driving behavior, vehicle speed) taken by a human driver will not be exactly the same each time. If the car-following model lacks randomness, the simulated spatiotemporal evolution will be extremely smooth, failing to reflect the characteristics of traffic oscillations.

[0059] Spatiotemporal evolution diagram: The horizontal axis represents time, and the vertical axis represents vehicles or locations. A heat map is used to represent the speed of each vehicle or location at each time.

[0060] Pulley (traffic flow) simulation: Given the complete driving trajectory of the lead vehicle in the pulley and the initial conditions (position, speed) of other vehicles, the model repeatedly predicts and updates the pulley situation to obtain the driving trajectory of each vehicle.

[0061] Car-following model parameter calibration: Based on the dataset, set the objective function and constraints (parameter value range), and determine the custom parameter values ​​that need to be defined in the car-following model through optimization algorithms.

[0062] This invention proposes a theory-data dual-driven method for modeling car-following behavior, comprising: collecting car-following trajectory data of manually driven vehicles and smoothing it; calibrating a theoretical two-dimensional intelligent driver random car-following model (2D-IDM) using the trajectory data, and using the calibrated model to simulate and generate data driven by the theoretical model; adjusting the shape of the input data to a matrix form, and constructing a time feature matrix and a position feature matrix; constructing a row-cross attention mechanism, combining KAN (Kolmogorov-Arnold Network) and ConvKAN (Convolutional KAN) to build a KAN4CF (Kolmogorov-Arnold Network for CarFollowing) deep learning model to predict the acceleration probability distribution at the next moment; pre-training the model using a simulation dataset, and fine-tuning the model using real data; constructing a sampler algorithm to randomly sample from the acceleration distribution as the final vehicle acceleration at the next moment; and verifying the effectiveness of the model through short-term trajectory prediction and traffic flow simulation.

[0063] The processing flowchart of a theory-data dual-driven vehicle following behavior modeling method proposed in this invention is as follows: Figure 1 As shown, the processing steps include the following:

[0064] Step S10: Collect the following trajectory data of the manually driven vehicle.

[0065] First, a car-following trajectory dataset of manually driven vehicles was collected. This dataset includes the vehicle's latitude and longitude, vehicle speed, and timestamp. The data collection time interval was 0.1 seconds.

[0066] Smoothing is applied to the car-following trajectory dataset.

[0067] Step S20: Use the car-following trajectory dataset to calibrate the 2D-IDM model, and use the 2D-IDM model to predict the speed of the convoy to obtain simulation data.

[0068] The 2D-IDM model is a stochastic theoretical car-following model, and its calculation formula is shown below:

[0069]

[0070] Δv i (t)=v i (t)-v i-1 (t)

[0071] Vd i (t)=|x i (t)-x i-1 (t)|-l veh

[0072] v i (t)=v i (t-1)+a i (t)*Δt

[0073] x i (t)=x i (t-1)+v i (t)*Δt

[0074] Among them, T i (t) represents the time-varying expected headway of the i-th vehicle at time t, where T1 and T2 are T1 and T2 respectively. i The upper and lower bounds of (t); r1 is a random variable uniformly distributed between 0 and 1; Δv i (t) represents the speed difference between vehicle i and vehicle i-1 at time t;

[0075] Δd i (t) represents the position difference between vehicle i and vehicle i-1; l veh Indicates the length of the vehicle; a max v represents the maximum acceleration of the vehicle. max The maximum speed of the vehicle is represented by δ, which is the acceleration exponent (δ > 0); d0 is the time distance in congestion; b is the comfortable deceleration; p1 represents T. i The probability of change of (t). max T1, T2, δ, p1, and d0 are parameters that need to be determined manually.

[0076] To determine the custom parameter values ​​required in the above 2D-IDM model, the 2D-IDM model needs to be calibrated using a car-following trajectory dataset. This process considers both macroscopic (fleet conditions) and microscopic (vehicle conditions) indicators, and constructs the objective function as follows:

[0077]

[0078] In the formula, M represents the number of vehicles in the fleet, N represents the total amount of data, and Q represents the total fleet operation time in seconds. i,true and s i,sim Let std represent the actual and simulated vehicle frontage distances for the i-th data point, respectively. j,true and std j,sim The standard deviation of the actual and simulated speeds of the first j vehicles, pl q,true and pl q,sim Let q represent the actual and simulated convoy lengths at time q, respectively.

[0079] Constrained by the range of parameter values ​​(lower bounds are 0.5, 0, 1.5, 0, 0, 0.5; upper bounds are 3, 1.5, 5, 6, 1, 4), the Grey Wolf algorithm is used to iteratively solve the objective function, outputting the solved 2D-IDM model parameter values. Given the complete velocity curve of the lead car in the convoy and the initial states of the remaining vehicles (including the position and initial velocity of each vehicle), the 2D-IDM model is iterated repeatedly, with a maximum iteration count of 20. After reaching the maximum iteration count, the convoy's velocity is predicted, obtaining simulation data of the velocity and position information of each vehicle in the convoy at each moment, providing data support for the pre-training of subsequent models.

[0080] Step S30: Build the Kolmogorov-Arnold Network for Car Following (KAN4CF) deep learning model.

[0081] A KAN4CF deep learning model is constructed by combining a Convolutional Kolmogorov-Arnold Network (ConvKAN) and a Dense Kolmogorov-Arnold Network (Dense KAN). This KAN4CF deep learning model includes a Row-cross attention mechanism layer, three 2D convolutional KAN layers, one Flatten layer, and three fully connected KAN layers. The output of the last KAN layer contains two values: the mean and variance of the acceleration probability distribution at the next time step.

[0082] In order for the predictions of the KAN4CF deep learning model to conform to the physical laws of the real world, Figure 3This invention provides a schematic diagram of a three-stage method for introducing physical knowledge into a deep learning model. A large amount of data is repeatedly generated using 2D-IDM to pre-train all parameters in the deep learning model. After pre-training, the Row-cross attention mechanism layer, three 2D convolutional KAN layers, and the Flatten layer are frozen. Finally, real data is used to fine-tune the three fully connected KAN layers.

[0083] The KAN4CF deep learning model was pre-trained using simulation data. The loss function during the pre-training process was constructed as follows:

[0084]

[0085] In the formula, L Gaussian y represents the loss function of the model during the pre-training phase. t μ represents the true value of the vehicle's acceleration at time t. t σ represents the mean of the predicted vehicle acceleration distribution. t This represents the standard deviation of the predicted acceleration distribution.

[0086] After pre-training, the weights of the attention mechanism layer and ConvKAN are frozen, and the KAN4CF deep learning model is fine-tuned using real data. During this process, based on the idea of ​​Physics-Informed Neural Network (PINN), the following loss function is constructed:

[0087]

[0088] In the formula, ω real and ω physics These represent the weights of the data-driven part and the theory-driven part, respectively.

[0089] After the fine-tuning process is completed, the trained KAN4CF deep learning model is obtained.

[0090] Since the KAN4CF deep learning model obtained a distribution, but ultimately needs to obtain a value as the predicted value of the vehicle's acceleration at the next moment, it is necessary to tackle the sampler algorithm to sample a value from the distribution, which includes the following steps:

[0091] Define a cumulative probability α at time t. t At each time step, it is updated with probability p, as follows:

[0092]

[0093] Furthermore, to prevent unreasonable changes in acceleration values ​​due to excessive cumulative probability changes between adjacent time steps, a cumulative probability change constraint is introduced, as shown below:

[0094]

[0095] In the formula, α represents the maximum change in cumulative probability. The values ​​of probability p and the maximum change in cumulative probability also need to be calibrated, and their objective function is the same as that used when calibrating 2D-IDM.

[0096] Step S40: Construct a Row-cross attention mechanism to transform the input data, obtaining the input feature matrix, time feature matrix, and location feature matrix, which serve as the input for subsequent models.

[0097] After the KAN4CF deep learning model is trained and calibrated, this invention uses the speed difference, position difference, vehicle speed, and vehicle speed of the vehicle in front at each time step within a predetermined time (e.g., 4 seconds) as input data. The input data is then formatted as a matrix, and a time feature matrix and a position feature matrix are constructed. Specifically, the following steps are included:

[0098] Assuming the time step of the model input is T, the overall input feature dimension is 4*T. Based on this, we construct an M*N matrix, where N is a multiple of 4, and M*N = 4*T. M and N should be as close as possible in numerical value. All input features can be transformed into the following input feature matrix:

[0099]

[0100] In the formula, Let Δv represent the original input feature matrix. t Δs represents the speed difference between the vehicle and the vehicle in front at time t. t This represents the positional difference between the vehicle and the vehicle in front at time t. This represents the speed of the vehicle at time t. Let t represent the speed of the vehicle in front at time t, N represent the number of columns in the matrix, and M represent the number of rows in the matrix.

[0101] Based on the time step information at each position in the above matrix, a corresponding time feature matrix is ​​constructed, as shown below:

[0102]

[0103] In the formula, This represents the time feature matrix.

[0104] Furthermore, since the input matrix repeatedly stores four pieces of information—vehicle speed difference, position difference, vehicle speed, and preceding vehicle speed—at different locations, a position feature matrix was further constructed, as shown below:

[0105]

[0106] In the formula, This represents the location feature matrix.

[0107] To enable the model to fully learn the relationship between the three matrices, a schematic diagram of a Row-cross attention mechanism proposed in this embodiment of the invention is shown below. Figure 2 As shown, it contains two branches: The first branch concatenates the temporal feature matrix and the spatial feature matrix, then multiplies them with a trainable weight matrix through 2D convolution, layer normalization, and the sigmoid activation function to obtain the query matrix (Q); The second branch multiplies the temporal feature matrix, the spatial feature matrix, and the original feature matrix through channel pooling, 2D convolution, layer normalization, and the sigmoid activation function, and multiplies them with two trainable weight matrices to obtain the key matrix (K) and the value matrix (V), respectively; Then, a cross-attention mechanism is performed on the Q, K, and V matrices (the cross-attention mechanism is only calculated between elements in the same row) to obtain three matrices with the same format as the original input matrix, which are used as the input to the subsequent model.

[0108] The three matrices mentioned above are input into the trained KAN4CF deep learning model. The KAN4CF deep learning model predicts the possible acceleration distribution of the vehicle at the next time step, and the final acceleration value of the vehicle at the next time step is obtained through a sampler algorithm. In the short-time prediction process, the mean of the predicted acceleration distribution of the vehicle at the next time step is used as the output.

[0109] To verify the effectiveness of the model in this embodiment of the invention, 31,533 vehicle following trajectory data points, i.e., sample data, were extracted, and the training set and test set were divided in a 4:1 ratio. The 2D-IDM model, Convolutional Neural Networks (CNN) model, and ConvKAN model were selected for comparative analysis with the model in this invention. The accuracy of each model in short-term vehicle trajectory prediction was obtained on an experimental platform with an Intel i7-12650H processor, 32.0GB of system memory, Windows 11 (64-bit), and Python 3.9 programming language, as shown in the table below.

[0110] Model RMSE MAE 2D-IDM 0.344 0.262 CNN 0.460 0.318 ConvKAN 0.325 0.241 KAN4CF 0.314 0.231

[0111] As can be seen from the table above, KAN4CF has higher short-term trajectory prediction accuracy compared to other commonly used models.

[0112] Next, the effectiveness of the proposed model is verified by presenting a spatiotemporal diagram of the traffic flow evolution of a car-following convoy of 10 vehicles. Figure 4 As shown. The simulation process provides the complete velocity curve of the lead vehicle in the convoy and the initial conditions (initial position and initial velocity) of each vehicle. Then, it relies entirely on model iteration to obtain the velocity value of each vehicle at every moment. This is compared with the real spatiotemporal evolution diagram (…). Figure 4 (a) Spatiotemporal evolution diagram of a model without randomness ( Figure 4 (b) and the model proposed in this invention ( Figure 4 (c) It can be observed that if the model has no randomness, the spatiotemporal evolution diagram is relatively stable, without traffic oscillations, which does not conform to the actual traffic flow evolution pattern. The model of this invention can reproduce the actual traffic evolution (traffic oscillations), proving the effectiveness of the model.

[0113] In summary, the embodiments of this invention, using current theory-driven car-following models, do not focus on short-term prediction accuracy, but only on whether the traffic flow simulation conforms to the actual evolutionary patterns. When verifying the effectiveness of the model, a comparison was made with 2D-IDM, and the model of this invention has higher accuracy. Data-driven models do not consider the traffic flow simulation conditions, such as... Figure 4 As shown in (b), it does not reflect traffic oscillations.

[0114] Very few theory-data-driven models, especially deep learning models, consider the specific meaning of the input data. This invention proposes a Row-cross attention mechanism after constructing the feature matrix. Furthermore, in the stage of introducing physical knowledge, other techniques simply input simulated and real data together into the model for training, or merely modify the loss function. The method of this invention has better interpretability.

[0115] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing the present invention.

[0116] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.

[0117] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for apparatus or system embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The apparatus and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0118] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A theory-data dual-driven car-following behavior modeling method, characterized in that, The application relates to a method for predicting the acceleration of a vehicle in a car-following scenario. The application comprises the following steps: Collecting a car-following trajectory dataset of a manually driven vehicle, the car-following trajectory dataset comprising the latitude and longitude of the vehicle, the speed of the vehicle and a timestamp, calibrating a 2D-IDM model by using the car-following trajectory dataset, predicting the speed of a vehicle fleet by using the 2D-IDM model, and obtaining simulation data; Building a KAN4CF deep learning model of a car-following Kolmogorov-Arnold network, the KAN4CF deep learning model comprising a Row-cross attention mechanism layer, three layers of two-dimensional convolution KAN, one layer of a Flatten layer and three layers of fully connected KAN, pre-training the KAN4CF deep learning model by using the simulation data, fine-tuning the KAN4CF deep learning model by using real data, and obtaining a trained KAN4CF deep learning model; Taking the speed difference, the position difference, the speed of the ego vehicle and the speed of the preceding vehicle of the vehicle at each time step within a preset time as input data, extracting features of the input data by using the Row-cross attention mechanism, inputting the input data into the trained KAN4CF deep learning model, and outputting an acceleration value of the vehicle at the next moment by the trained KAN4CF deep learning model; The method for calibrating the 2D-IDM model by using the car-following trajectory dataset and for predicting the speed of the vehicle fleet by using the 2D-IDM model to obtain the simulation data comprises the following steps: Δv i (t) = v i (t) - v i-1 (t) Δd i (t) = |x i (t) - x i―1 (t) | - 1 veh v i (t) = v i (t-1) + a i (t) * Δt x i (t) = x i (t-1) + v i (t) * Δt where T i (t) is the desired headway of the ith vehicle at time t, T1 and T2 are the upper and lower bounds of T i (t), respectively; r1 is a random variable uniformly distributed between 0 and 1; Δv i (t) is the speed difference between vehicle i and vehicle i-1 at time t; Δd i (t) is the position difference between vehicle i and vehicle i-1; l veh is the length of the vehicle; a max is the maximum acceleration of the vehicle, v max is the maximum speed of the vehicle; δ is the acceleration exponent, δ > 0; d0 is the headway in congestion; b is the comfortable deceleration; p1 is the probability of change of T i (t); a max , T1, T2, δ, p1, d0 are parameters that need to be determined by human The calculation formula of the 2D-IDM model is as follows: where MP represents the number of vehicles in the platoon, ND represents the total amount of data, QT represents the total time of platoon operation, s i,true and s i,sim respectively represent the actual and simulated vehicle headway of the i-th vehicle, std j,true and std j,sim respectively represent the actual and simulated standard deviation of the first j vehicles' speed, pl q,true and pl q,sim respectively represent the real and simulated platoon length at time q; The target function of the 2D-IDM model calibrated by using the car-following trajectory dataset is as follows: Taking the value range of each parameter as a constraint, the grey wolf algorithm is used to iteratively solve the target function, and the parameter values of the 2D-IDM model that need to be defined are output, the 2D-IDM model is iteratively solved, the speed of the vehicle fleet is predicted when the maximum number of iterations is reached, and simulation data of the speed and position information of each vehicle in the vehicle fleet at each moment is obtained; The KAN4CF deep learning model of the car-following Kolmogorov-Arnold network comprises a Row-cross attention mechanism layer, three layers of two-dimensional convolution KAN, one layer of a Flatten layer and three layers of fully connected KAN, the KAN4CF deep learning model is pre-trained by using the simulation data and fine-tuned by using real data, and a trained KAN4CF deep learning model is obtained, and the method comprises the following steps: The KAN4CF deep learning model is built by combining a convolution Kolmogorov-Arnold network (ConvKAN) and a fully connected Kolmogorov-Arnold network (Dense KAN), the KAN4CF deep learning model comprises a Row-cross attention mechanism layer, three layers of two-dimensional convolution KAN, one layer of a Flatten layer and three layers of fully connected KAN, and the last layer of KAN outputs two values, namely the mean and variance of the acceleration probability distribution at the next moment; The simulation data generated by the 2D-IDM model is used to pre-train all parameters in the KAN4CF deep learning model, and a loss function in the pre-training process is constructed as follows: In the formula, L Gaussian represents the loss function of the pre-training stage model, y t represents the true value of the vehicle acceleration at time t, μ t represents the mean of the predicted vehicle acceleration distribution, σ t represents the standard deviation of the predicted acceleration distribution; After pre-training, the weights of the attention mechanism layer and ConvKAN are frozen, and the KAN4CF deep learning model is fine-tuned using real data, and the following loss function is constructed based on the neural network embedded with physical knowledge during the fine-tuning process: where ω real and ω physics represent the weights of the data-driven and theory-driven parts, respectively. After the fine-tuning process is completed, the trained KAN4CF deep learning model is obtained. The speed difference, position difference, vehicle speed and front vehicle speed of the ego vehicle and the front vehicle at each time step within the set time before the vehicle are taken as input data, the input data is extracted by the Row-cross attention mechanism, and then input into the trained KAN4CF deep learning model, and the trained KAN4CF deep learning model outputs the acceleration value of the vehicle at the next time, including: taking the speed difference, position difference, vehicle speed and front vehicle speed of the ego vehicle and the front vehicle at each time step within the set time before the vehicle as input data, converting the input data into a matrix form by using the Row-cross attention mechanism, assuming that the time step of the input data is T, the feature dimension of the input data is 4*T, an M*N matrix is constructed, where N is a multiple of 4, and M*N=4*T, M and N need to be as close as possible in value, and all features of the input data are converted into the following input feature matrix: wherein denotes the original input feature matrix, Δv t denotes the speed difference between the ego vehicle and the preceding vehicle at time t, Δs t denotes the position difference between the ego vehicle and the preceding vehicle at time t, denotes the speed of the ego vehicle at time t, denotes the speed of the preceding vehicle at time t, N denotes the number of columns of the matrix, and M denotes the number of rows of the matrix; According to the original input feature matrix The time step information of each position in the original input feature matrix is used to construct a corresponding time feature matrix, as follows: In the formula, denotes the time characteristic matrix; based on the time feature matrix A position feature matrix is constructed as follows: In the formula, denotes the position feature matrix; Through the first branch in the Row-cross attention mechanism, the time feature matrix and the space feature matrix are spliced, and then through two-dimensional convolution, layer normalization and sigmoid activation function, and multiplication with a trainable weight matrix, a query matrix Q is obtained; through the second branch in the Row-cross attention mechanism, the time feature matrix, the space feature matrix and the original feature matrix are processed through channel pooling, two-dimensional convolution, layer normalization and sigmod activation function, and multiplication with two trainable weight matrices, respectively obtaining a key K matrix and a value V matrix, and then performing cross-attention mechanism calculation on the Q, K and V matrices to obtain three matrices in the same format as the original input matrix; The above three matrices are input into the trained KAN4CF deep learning model, and the KAN4CF deep learning model predicts the possible acceleration distribution of the vehicle at the next time, and the acceleration value of the vehicle at the next time is obtained by sampling from the acceleration distribution through a sampler algorithm.

2. The method of claim 1, wherein, The follow-up trajectory data set of the manually driven vehicle is collected, and the follow-up trajectory data set includes the latitude and longitude of the vehicle, the vehicle speed and the time stamp, the 2D-IDM model is calibrated using the follow-up trajectory data set, the speed of the vehicle fleet is predicted using the 2D-IDM model, and simulation data is obtained, including: The follow-up trajectory data set of the manually driven vehicle is collected, and the follow-up trajectory data set includes the latitude and longitude of the vehicle, the vehicle speed and the time stamp, the time interval of data collection is 0.1s, and the follow-up trajectory data set is smoothed.

Citation Information

Patent Citations

  • Confluence optimization control method for merging automatic vehicle special lane into common lane

    CN114067559A

  • Vehicle track prediction method based on data driving and theoretical driving

    CN117150258A