High dynamic scene IDM model parameter online calibration method based on LSTM-PSO

By introducing PSO algorithm and LSTM neural network into the IDM model, traffic scene recognition and online parameter optimization are realized, and the problem of following model parameter calibration in high dynamic traffic scenarios is solved, and the real-time and adaptability of the model are improved.

CN120067812APending Publication Date: 2025-05-30SOUTHEAST UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510211542.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing follow-up model parameter calibration method is difficult to achieve real-time, global optimization capabilities and dynamic scenario adaptability in high dynamic traffic scenarios, resulting in poor model prediction results.

Method used

The online calibration method of IDM model parameters based on PSO algorithm is adopted, combined with the LSTM neural network to identify traffic scenes, dynamically adjust the boundary range of IDM model parameters, and optimize parameters online through the PSO algorithm to achieve minimum error.

Benefits of technology

Real-time follow-up behavior prediction in high dynamic traffic scenarios is achieved, the adaptability and accuracy of the model is improved, and the intelligent driving system maintains efficient and stable operation in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067812A_ABST
    Figure CN120067812A_ABST
Patent Text Reader

Abstract

The invention discloses a high dynamic scene IDM model parameter online calibration method based on LSTM-PSO, and the method comprises the steps: carrying out the processing of original vehicle track data collected by a sensor disposed at a road section, extracting the vehicle speed, acceleration, headstock, traffic flow and other characteristic variables, and screening out the vehicle group car-following data meeting the initial conditions; further preprocessing the car-following data in combination with traffic rules and the like, and defining scene types according to characteristics such as traffic flow, speed and acceleration; a time sequence data set based on multi-scene input is constructed and standardized, and an LSTM neural network is utilized to complete training of a high-dynamic scene classification model and real-time scene recognition; a to-be-calibrated parameter range of the IDM model is set, a PSO particle swarm is initialized, a parameter boundary is adjusted according to a scene identification result, IDM model parameters (classification) are calibrated on line in combination with a PSO algorithm, and an optimal solution is obtained by taking error minimization as a target; and dynamically recording and updating the optimal parameter library of different scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of traffic engineering and intelligent transportation systems (ITS), and focuses on improving the intelligent driving decision-making performance in high-dynamic traffic scenarios by calibrating the parameters of the vehicle-following model. In particular, it relates to an online calibration method for IDM model parameters based on the PSO algorithm, which is used for the efficient calibration and real-time optimization of vehicle-following behavior in a dynamic traffic environment. Background Art

[0002] With the continuous expansion of the traffic network scale and the rapid growth of the number of motor vehicles, the traffic operation pressure in modern cities is increasing day by day. In such a complex traffic environment, microscopic traffic flow models, especially vehicle-following models, have become important tools for studying traffic flow behavior and optimizing traffic systems. Among them, the IDM model, as a widely used vehicle-following model, has clear physical meanings for its parameters, can intuitively show the changes in driving behavior, and this model can be applied to speed prediction in both unobstructed and congested states. However, the actual application effect of the IDM model depends to a large extent on the accuracy and adaptability of the model parameters.

[0003] In real traffic scenarios, due to the complexity of driving behavior, traffic environment, and external influences (such as abnormal events or dynamic traffic flow changes), it is difficult to directly set or generalize the parameters of the IDM model, and accurate parameter calibration often needs to be carried out for specific traffic scenarios. The accuracy of parameter calibration not only affects the fitting performance of the model but also directly relates to the credibility of simulation results and the effectiveness of optimization methods. However, current research and practice on IDM model parameter calibration still face many challenges.

[0004] Currently, existing methods for calibrating vehicle-following model parameters can be divided into three categories: calibration methods based on traditional optimization algorithms, calibration methods based on intelligent optimization algorithms, and calibration methods based on deep learning. Traditional optimization algorithms (such as gradient descent method, Newton method, conjugate gradient method, trust region method) are usually only applicable to certain specific types of problems, and are less efficient in dealing with complex problems such as non-linearity, high-dimensionality, and non-convexity, and are prone to falling into local optimal solutions. In addition, traditional algorithms have high requirements for the selection of initial points and parameter settings, and the solution process is prone to instability. Intelligent optimization algorithms (such as genetic algorithm, particle swarm algorithm, ant colony algorithm, simulated annealing method) have strong global optimization capabilities through population search mechanisms and are suitable for non-linear, multi-peak optimization problems. However, these methods have high computational complexity and poor real-time performance, and are difficult to be efficiently applied in high-dynamic traffic scenarios. Deep learning methods can achieve higher-precision parameter prediction through feature learning and modeling of large-scale traffic data, and can capture the complex dynamic characteristics of traffic flow. However, the training of deep learning models depends on a large amount of high-quality data, and there are still certain limitations in terms of real-time performance and interpretability.

[0005] Therefore, the existing calibration methods cannot effectively solve the problem of real-time calibration of vehicle following model parameters in high-dynamic traffic scenarios. Especially in meeting multiple requirements such as real-time performance, global optimization ability, and adaptability to dynamic scenarios, there are still significant technical bottlenecks. Summary of the Invention

[0006] The purpose of the present invention is to provide an online calibration method for IDM model parameters based on the PSO algorithm. By combining LSTM neural network scene recognition and PSO algorithm online calibration, it solves the problem that the IDM following model cannot adapt to different scenarios in real time in a high-dynamic traffic environment. It enables the intelligent transportation system to maintain efficient and stable operation in changing traffic scenarios and provides strong support for the development of intelligent driving technology.

[0007] The specific solution is as follows:

[0008] An online calibration method for IDM model parameters in high-dynamic scenarios based on LSTM-PSO. By constructing a time series dataset of multi-source traffic flow data, using the LSTM neural network to classify and identify traffic scenarios, and dynamically adjusting the boundary range of IDM model parameters according to the identified scenario types; combining the PSO algorithm, taking the minimum model prediction error as the objective function to online optimize the IDM parameters, and outputting the optimal parameter combination corresponding to each scenario; realizing the real-time performance and adaptability of the model through dynamically updating the scenario parameter library, which is of great significance for studying intelligent driving decisions in high-dynamic scenarios. The specific steps are as follows:

[0009] Step S1: Process the original vehicle trajectory data collected by sensors

[0010] The original vehicle trajectory data collected by sensors is single-vehicle trajectory information. The data used includes fields such as vehicle number oid, collection time inttime, vehicle latitude and longitude information lat, lng, driving direction direction, lane number laneid, and vehicle speed speed. In order to calibrate the parameters of the following model, it is necessary to calculate and extract vehicle group following data.

[0011] Sub-step S11: Determine the parameters required for calibrating the IDM model parameters: the speed of the leading vehicle pre_speed, the speed of the following vehicle speed, the acceleration of the following vehicle acc, the headway distance delta_d between the leading and following vehicles, the time stamp t_sec for drawing, and the traffic flow traffic_flow for scenario judgment. By default, the following behavior of the following vehicle in a pair of vehicle groups is considered, so the acceleration parameter of the following vehicle is required.

[0012] Sub-step S12: Filter the vehicle trajectory data. Since the IDM model is a continuous microscopic single-lane model, the data of vehicles changing lanes is filtered out.

[0013] Sub-step S13: Considering the constraints of the car-following model comprehensively and combining with "Traffic flow theory", calculate the headway distance distance by converting the longitude and latitude difference of vehicles in the same lane and in the same direction at the same moment. Taking the range of distance between two vehicles in the same lane at the same moment being 0 - 120m as the standard, calculate, extract and output the respective data of the two vehicles in the car-following vehicle group and the parameters required for calibrating the IDM model.

[0014] Step S2: The car-following data of the vehicle group obtained through Step S1 needs to be further processed to ensure that the car-following data sequence is continuously available, the specific vehicle data meets the requirements of the lane speed limit specification, and define the scenario type according to the traffic flow, speed, and acceleration characteristics to prepare for the subsequent steps.

[0015] Sub-step S21: Remove the rows with missing values in the speed, acc, and pre_speed columns. Missing values will prevent obtaining valid results in subsequent calculations, so they need to be removed.

[0016] Sub-step S22: According to the actual traffic rules of the road, set vehicle speed screening conditions to preprocess the data.

[0017] In the original vehicle trajectory data, there are three lanes in the same direction, and the lane close to the central divider is Lane 1. Therefore, according to the speed limits of different lanes on the highway and combining with the up and down fluctuations of the vehicle speed when actually entering the lane, the following speed limits are set for each lane. The range of pre_speed is the same as that of speed:

[0018] Speed of Lane 1: 100 - 130 km / h, that is, 27.7777 - 36.1111 m / s; speed of Lane 2: 80 - 110 km / h, that is, 22.2222 - 30.5555 m / s; speed of Lane 3: 55 - 90 km / h, that is, 15.2777 - 25 m / s. The range of acceleration acc for all lanes is -3 - 3.01 m / s. 2 。

[0019] During the car-following process, the leading vehicle must always be in front of the following vehicle, so there is a screening condition delta_d > 0.

[0020] Sub-step S23: Define different scenario types according to the data thresholds of traffic flow traffic_flow, speed speed, and acceleration acc:

[0021] Off-peak traffic flow: 50 ≤ traffic_flow < 100, speed: 22.2 m / s ≤ speed < 30.5 m / s, acceleration: 0.5 m / s 2 ≤ acc ≤ 1 m / s 2 ;

[0022] Morning and evening peak traffic flows are both: traffic_flow ≥ 100, speed: speed ≤ 22.2 m / s, acceleration: acc ≥ 1 m / s 2 ;

[0023] Night traffic flow: traffic_flow > 50, speed: speed ≥ 30.5 m / s, acceleration: 0.5 m / s 2 ≥ acc ≥ 0; The traffic flow, speed, and acceleration during holidays and emergencies all show fluctuating or sudden changes.

[0024] Step S3: Prepare data and design and train a classification model based on LSTM for detecting traffic scene types.

[0025] Sub-step S31: Use traffic flow data under multiple scenarios, including speed speed, acceleration acc, and vehicle distance delta_d feature data, to construct a time series data set. Then standardize the time series data to unify the dimension and reduce the impact of eigenvalue differences on model training. Use a sliding window to generate a time series input data set.

[0026] Sub-step S32: Design and build a deep neural network based on LSTM for processing time series data.

[0027] Input layer: Receive the time series features generated by the sliding window, and the input dimension is (N win , F), where N win is the window length and F is the feature dimension.

[0028] LSTM hidden layer: Adopt 50 hidden units to extract time series features and use the ReLU activation function to capture the dynamic change patterns of traffic scenes.

[0029] Output layer: Map to the classification output through a fully connected layer and use the Softmax activation function to calculate the probability distribution to achieve multi-class scene classification.

[0030] Sub-step S33: Use the preprocessed traffic flow data, take accuracy as the evaluation index, compile the LSTM model using the Adam optimizer and the categorical_crossentropy loss function. Use a generator to train the model, and the number of training epochs is 20. Save the trained LSTM model for real-time scene recognition tasks.

[0031] Step S4: Introduce the IDM model and determine the definitions and ranges of the parameters to be calibrated. Based on the real-time data input, perform high-dynamic scenario type recognition and adjust the parameter boundaries according to the scenario recognition results.

[0032] Sub-step S41: Introduce the IDM model. The acceleration formula of the IDM model is as follows:

[0033]

[0034]

[0035] where v is the speed of the current vehicle, a is the maximum acceleration, v 0 is the desired speed (free-flow speed) of the vehicle, δ is the acceleration exponent, s is the distance between the current vehicle and the vehicle in front, s * is the desired safety distance, s 0 is the minimum safety distance, Δv is the speed difference between the current vehicle and the vehicle in front, T is the safety time interval (the reaction time of the driver, also known as the following time headway), and b is the comfort deceleration.

[0036] It can be seen from the IDM model formula that there are a total of 6 adjustable parameters in the IDM model. Take δ = 4, and denote the vector arg = [v 0 , a, b, s 0 , T] T as the set of parameters to be calibrated.

[0037] Sub-step S42: The parameters to be calibrated have upper and lower limits. According to the research "Congested Traffic States in Empirical Observations and Microscopic Simulations" published by Treiber, Hennecke, and Helbing in 2000, set the ranges of the parameters to be calibrated in the IDM model as follows:

[0038] Free-flow speed v 0 Range: 10 - 40 m / s, maximum acceleration a range: 2 - 6 m / s 2 , comfort deceleration b range: 1 - 3 m / s 2 , minimum safety distance s 0 Range: 0.1 - 3 m, safety time interval T range: 0.5 - 5 s.

[0039] Sub-step S43: Input real-time traffic flow data, and based on Step S3, use the trained LSTM model to perform high-dynamic scenario type recognition. Set the corresponding parameter boundary adjustment factors according to the scenario type, the minimum boundary value adjustment factor factors_low, and the maximum boundary value adjustment factor factors_up. Modify the upper and lower bounds of the IDM model parameters according to the adjustment factors to obtain the adjusted parameter value range.

[0040] Factor during off-peak period: factors_low = [1.0, 1.0, 1.0, 1.0], factors_up = [1.0, 1.0, 1.0, 1.0];

[0041] Factor during morning rush hour: factors_low = [1.1, 1.1, 1.0, 1.0], factors_up = [1.2, 1.3, 1.1, 0.95];

[0042] Factor during evening rush hour: factors_low = [1.05, 1.05, 1.0, 0.95], factors_up = [1.1, 1.2, 1.05, 0.95];

[0043] Factor at night: factors_low = [0.9, 0.8, 1.2, 1.2], factors_up = [1.0, 1.1, 1.3, 1.3];

[0044] Factor on holidays: factors_low = [1.2, 1.3, 0.8, 0.8], factors_up = [1.3, 1.4, 1.0, 1.1];

[0045] Factor for emergencies: factors_low = [1.3, 1.4, 0.7, 0.6], factors_up = [1.4, 1.5, 1.0, 1.3].

[0046] Step S5: Construct a fitness function based on the IDM model, using the actual vehicle following data as a comparison benchmark to measure the error between the particle swarm parameters and the following data.

[0047] Sub-step S51: Determine that the fitness function takes the error between the actual vehicle acceleration and the expected acceleration calculated based on the IDM model as the optimization goal, and measures the fitting degree of the model parameters to the actual data through the mean square of the error. The smaller the fitness value, the better the model fitting effect.

[0048] Sub-step S52: Perform iterative calculations on all sample points, that is, all data within the sliding window. For each sample point i, a total of n, calculate the IDM expected acceleration based on the current particle parameters

[0049] Sub-step S53: The error value is the square difference between the actual acceleration and the desired acceleration:

[0050]

[0051] In the formula, a i is the actual acceleration of the following vehicle, and the errors at all time steps are accumulated into the list e i .

[0052] Sub-step S54: Calculate the average value of all errors in the error list as the fitness value of the current particle:

[0053]

[0054] Take the fitness value of the current particle as the output to provide an optimization direction for the subsequent iteration of the PSO algorithm.

[0055] Step S6: Enter online calibration, obtain real-time data, execute steps S3 and S4, complete scene type detection and parameter range adjustment, and use the PSO algorithm to solve the optimal parameters of the IDM model based on the detected scene type.

[0056] Sub-step S61: In this scene type, define the basic parameters of the PSO algorithm, including the maximum number of iterations NGEN and the population size pop_size. Create matrices for storing particle positions, velocities, individual best positions, and global best positions according to the population size and the number of parameters, and randomly generate initial positions and velocities for each particle. The position of a particle is a vector containing five parameters to be calibrated, and each parameter has a velocity. Based on steps S3 and S4, each parameter value of the initial position is randomly taken within the upper and lower boundary ranges, and the initial fitness value of each particle is calculated. Set the particle position with the lowest fitness value as the global best position.

[0057] Sub-step S62: In each iteration, sequentially execute the following steps:

[0058] Update the velocity and position of each particle, and perform out-of-bounds protection on the updated particle position to ensure that its parameter values are always within the upper and lower boundary ranges.

[0059] v i = ω * v i + c 1 * rand() * (p_best i - x i ) + c 2 * rand() * (g_best i - x i )

[0060] x i = x i + v i

[0061] where ω is the inertia factor, and its value is non - negative; i = 1, 2, ..., N, where N is the total number of particles in this group, v i is the velocity of the particle, rand() is a random number between (0, 1), x i is the current position of the particle, c 1 , c 2 is the learning factor, c 1 = c 2 = 2, the maximum value of v i is V max , if v i is greater than V max , then v i = V max , p_best i is the historical optimal position of the individual particle, and g_best i is the historical optimal position in the global population.

[0062] Calculate the fitness value of the current position of each particle based on step S5.

[0063] Compare the fitness value of the current position of the particle with its historical optimal fitness value. If the current fitness value is lower, then update the individual optimal position of the particle. Similarly, compare the fitness value of the current particle with the global optimal fitness value. If the current fitness value is lower, then update the global optimal position.

[0064] Sub - step S63: After each iteration, check the change difference between the current global optimal fitness value and the global optimal fitness value of the previous generation. If the change difference is less than the set threshold of 0.00001, it is considered that the algorithm has converged and stop the iteration. Otherwise, continue the iteration process of the next generation.

[0065] Sub - step S64: When the convergence condition is met or the maximum number of iterations is reached, stop the iteration. Output the global optimal parameter combination calculated by the PSO algorithm as the optimal parameters of the IDM model corresponding to the scene type of the sliding window data at this time. At the same time, record the global optimal fitness value of each generation during the optimization process, and draw a curve graph of the fitness value changing with the number of iterations to evaluate the convergence process and performance of the PSO algorithm.

[0066] Sub - step S65: Record this scene type and the corresponding optimal parameters for analyzing and comparing the changes in the optimal parameters under different time periods and different data conditions.

[0067] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0068] (1) Strong adaptability: The present invention can automatically adjust the parameter range of the IDM model according to different traffic scenarios and environmental changes, ensuring that the system always maintains high-precision following behavior prediction in a dynamic traffic environment, and enhancing the adaptability and robustness of the system in complex and highly dynamic scenarios.

[0069] (2) Improvement in real-time performance and accuracy: By combining the LSTM neural network for multi-scenario classification, dynamically adjusting the parameter boundaries in the PSO algorithm, and using online calibration, the present invention can optimize the parameters of the IDM model in real time, avoid the problem of local optimal solutions, and significantly improve the accuracy and real-time response ability of the following model. Description of the Drawings

[0070] Figure 1 It is a flowchart of the online calibration method for the parameters of the IDM model in high-dynamic scenarios based on LSTM-PSO.

[0071] Figure 2 It is a specific flowchart of the LSTM algorithm for training the scenario recognition model in the present invention.

[0072] Figure 3 It is a specific flowchart of the PSO algorithm for calibrating the following model in the present invention. Detailed Embodiments

[0073] With the rapid development of intelligent transportation systems and the acceleration of urbanization, the accurate modeling and real-time prediction of traffic flow have become one of the core challenges in the field of traffic engineering. As an important tool for describing the microscopic behavior of individual vehicles, the following model is widely used in traffic flow modeling, simulation, and prediction. Among many following models, the IDM model has received extensive attention because it can more accurately describe the nonlinear characteristics of driver behavior and the interaction with surrounding vehicles. However, in practical applications, the performance of the IDM model highly depends on the accuracy of its parameters, and these parameters show significant differences under different road conditions, traffic scenarios, and driving behaviors. Therefore, how to efficiently and accurately calibrate the parameters of the IDM model to adapt to complex and highly dynamic traffic scenarios has become a difficult point and a practical need in current research.

[0074] Currently, the mainstream calibration methods for car-following model parameters can be classified into three categories: calibration methods based on traditional optimization algorithms, calibration methods based on intelligent optimization algorithms, and calibration methods based on deep learning. Methods based on traditional optimization algorithms (such as gradient descent method, Newton's method, conjugate gradient method, trust region method) are generally limited by the algorithm model itself and are only applicable to solving some specific types of problems. For complex problems such as non-linearity, high-dimension, non-convexity, and non-smoothness, traditional algorithms have low solving efficiency and are prone to falling into local optimal solutions. Moreover, traditional algorithms generally have high requirements for the selection of initial points and the setting of parameters, and problems are also likely to occur during the solving process. Methods based on intelligent optimization algorithms (such as genetic algorithm, particle swarm algorithm, ant colony algorithm, simulated annealing method) have strong global optimization capabilities through population search mechanisms and are suitable for solving non-linear, multi-peak optimization problems. However, the computational complexity of these methods is relatively high, the real-time performance is poor, and it is difficult to be efficiently applied in high-dynamic scenarios; Methods based on deep learning achieve higher-precision parameter prediction through feature learning and modeling of large-scale traffic data, and can capture the complex dynamic characteristics of traffic flow. However, the model training depends on a large amount of high-quality data, and there are still deficiencies in real-time performance and interpretability.

[0075] Based on the above problems, none of the existing methods can effectively solve the difficult problem of real-time calibration of vehicle following model parameters in high-dynamic traffic scenarios. Specifically, the existing methods are difficult to simultaneously meet the requirements of real-time performance, global optimization capabilities, and adaptation to dynamic scenario changes.

[0076] To address the above challenges, the present invention proposes an online calibration method for IDM model parameters in high-dynamic scenarios based on LSTM-PSO. By combining the PSO (Particle Swarm Optimization) and LSTM (Long Short-Term Memory) methods, it fully exploits the efficiency and adaptability of PSO in global optimization and the advantage of LSTM in capturing dynamic change characteristics in time series modeling. PSO finds the optimal solution of model parameters through global search, while LSTM uses real-time traffic data to predict dynamic changes and provides high-quality dynamic inputs for PSO. The combination of the two achieves the organic unity of global optimization and local adaptation. Its expected effects include: Through multi-scenario classification based on the LSTM neural network, different traffic scenarios (such as peak hours, holidays, emergencies, etc.) can be accurately identified and classified, and the parameters of the IDM model can be dynamically adjusted according to real-time traffic data. This real-time adjustment ability ensures that the model can adapt to the changing traffic environment, thereby improving the response speed and adaptability of the system and avoiding the problem that static models cannot adapt to dynamic traffic changes. By using the PSO algorithm to online calibrate the IDM model parameters, the model error can be effectively reduced, the prediction accuracy of vehicle following behavior can be ensured, and more real and reliable intelligent driving support can be provided. Compared with existing methods, this method can not only respond to complex changes in high-dynamic traffic scenarios in real time, but also improve the calibration accuracy and efficiency, and has significant advantages in solving the deficiencies of traditional methods in terms of real-time performance and adaptability.

[0077] The present invention realizes the online real-time calibration of IDM following model parameters in different scenarios by introducing a traffic scenario classification detection and adaptive parameter adjustment mechanism and combining the global optimization ability of the PSO algorithm. The vehicle trajectory data collected by sensors is preprocessed to extract characteristic variables such as vehicle speed, acceleration, and headway, and different traffic scenarios (such as peak hours, holidays, emergencies, etc.) are defined according to traffic flow and driving behavior. A multi-scenario classification model based on the LSTM neural network is used to identify scenarios for real-time data, and the identification results provide a basis for adjusting the IDM model parameters. The parameter boundaries in the PSO algorithm are dynamically adjusted based on the scenario identification results, and the search range of particles is adjusted in different traffic scenarios to optimize the parameters of the IDM model, so as to reduce the model error and improve the prediction accuracy of following behavior. By online real-time calibrating the IDM model parameters, it is ensured that as the traffic environment changes, the system can adaptively adjust and real-time calibrate the optimal vehicle following behavior model. And the optimal parameter library in different scenarios is dynamically recorded and updated, which can be used to analyze and compare the changes in optimal parameters under different time periods and different data conditions.

[0078] The idea of the present invention is further described below:

[0079] Step S1: Process the original vehicle trajectory data collected by sensors

[0080] The original vehicle trajectory data collected by sensors is single-vehicle trajectory information. The data used includes fields such as vehicle number oid, collection time inttime, vehicle latitude and longitude information lat, lng, driving direction direction, lane number laneid, and vehicle speed speed. In order to calibrate the parameters of the car-following model, it is necessary to calculate and extract the car-following data of vehicle groups.

[0081] Sub-step S11: Determine that the parameters required for calibrating the IDM model are: the speed of the leading vehicle pre_speed, the speed of the following vehicle speed, the acceleration of the following vehicle acc, the headway distance delta_d between the leading and following vehicles, as well as the timestamp t_sec for drawing and the traffic flow traffic_flow for scenario judgment. By default, the car-following behavior of the following vehicle in a pair of vehicle groups is considered, so the acceleration parameter of the following vehicle is required.

[0082] Sub-step S12: Filter the vehicle trajectory data. Since the IDM model is a continuous microscopic single-lane model, filter out the data of vehicles changing lanes.

[0083] Sub-step S13: Considering the constraints of the car-following model comprehensively and combining with "Traffic flow theory", calculate the headway distance distance by converting the longitude and latitude difference of vehicles in the same lane at the same moment in the same direction. Taking the distance range between two vehicles in the same lane at the same moment as 0 - 120m as the standard, calculate, extract and output the respective data of the two vehicles in the car-following vehicle group and the parameters required for calibrating the IDM model

[0084] Step S2: The car-following data of vehicle groups obtained through Step S1 needs to be further processed to ensure that the car-following data sequence is continuously available, the specific vehicle data meets the requirements of lane speed limits, and define the scenario type according to traffic flow, speed, and acceleration characteristics to prepare for subsequent steps.

[0085] Sub-step S21: Remove the rows with missing values in the speed, acc, and pre_speed columns. Missing values will prevent subsequent calculations from obtaining valid results, so they need to be removed.

[0086] Sub-step S22: According to the actual traffic rules of the road, set vehicle speed screening conditions to preprocess the data.

[0087] In the original vehicle trajectory data, there are three lanes in the same direction. The lane closest to the central divider is Lane 1. Therefore, according to the speed limits for different lanes on the highway in traffic rules and considering the fluctuations in the vehicle's actual speed when entering the lane, the following speed limits are set for each lane. The range of pre_speed is the same as that of speed:

[0088] Table 1 Speed Limits for Each Lane

[0089] Lane Speed Speed Acceleration lane_1 100 - 130 km / h 27.77777 - 36.1111 m / s <![CDATA[-3 - 3.01m / s 2 > lane_2 80 - 110 km / h 22.22222 - 30.5555 m / s <![CDATA[-3-3.01m / s 2 > lane_3 55 - 90 km / h 15.27777 - 25 m / s <![CDATA[-3 - 3.01m / s 2 >

[0090] During the following process, the leading vehicle must always be in front of the following vehicle. Therefore, there is a screening condition: delta_d > 0.

[0091] Sub-step S23: Define different scenario types according to the data thresholds of traffic flow traffic_flow, speed speed, and acceleration acc:

[0092] Table 2 Division of Different Scenario Types

[0093]

[0094] Step S3: Prepare the data and design and train a classification model based on LSTM to detect traffic scenario types.

[0095] Sub-step S31: Use traffic flow data in multiple scenarios, including feature data of speed speed, acceleration acc, and vehicle distance delta_d, to construct a time series data set. Then, standardize the time series data to unify the dimension and reduce the impact of feature value differences on model training. Use a sliding window to generate a time series input data set.

[0096] Sub-step S32: Design and build a deep neural network based on LSTM to process time series data.

[0097] Input layer: Receive the time series features generated by the sliding window. The input dimension is (N win , F), where N win is the window length and F is the feature dimension.

[0098] LSTM hidden layer: Adopt 50 hidden units to extract time series features and use the ReLU activation function to capture the dynamic change patterns of traffic scenarios.

[0099] Output layer: Map to the classification output through a fully connected layer and use the Softmax activation function to calculate the probability distribution to achieve multi-class scenario classification.

[0100] Sub-step S33: Using the preprocessed traffic flow data, with accuracy as the evaluation metric, compile the LSTM model using the Adam optimizer and the categorical_crossentropy loss function. Train the model using a generator for 20 epochs. Save the trained LSTM model for real-time scene recognition tasks.

[0101] Step S4: Introduce the IDM model and define the range of parameters to be calibrated. Based on real-time data input, perform high-dynamic scene type recognition and adjust the parameter boundaries according to the scene recognition results.

[0102] Sub-step S41: Introduce the IDM model. The acceleration formula of the IDM model is as follows:

[0103]

[0104]

[0105] where v is the speed of the current vehicle, a is the maximum acceleration, v 0 is the desired speed of the vehicle, δ is the acceleration exponent, s is the distance between the current vehicle and the vehicle in front, s * is the desired safety distance, s 0 is the minimum safety distance, Δv is the speed difference between the current vehicle and the vehicle in front, T is the safety time interval, and b is the comfortable deceleration.

[0106] From the IDM model formula, it can be seen that there are a total of 6 adjustable parameters in the IDM model. Take δ = 4, and denote the vector arg = [v 0 , a, b, s 0 , T] T as the set of parameters to be calibrated.

[0107] Sub-step S42: The parameters to be calibrated have upper and lower limits. According to the research "Congested Traffic States in Empirical Observations and Microscopic Simulations" published by Treiber, Hennecke, and Helbing in 2000, set the range of parameters to be calibrated for the IDM model as shown in the table:

[0108] Table 3 Range table of microscopic traffic parameters

[0109] Parameter <![CDATA[Free flow speed v 0 > Maximum acceleration a Comfortable deceleration b <![CDATA[Minimum safety distance s 0 > Safe time interval T Value 10 - 40 m / s <![CDATA[2-6m / s 2 > <![CDATA[1-3m / s 2 > 0.1-3m 0.1-5s

[0110] Sub-step S43: Input real-time traffic flow data, and based on step S3, use the trained LSTM model to perform high-dynamic scenario type recognition. Set the corresponding parameter boundary adjustment factors according to the scenario type, the minimum boundary value adjustment factor factors_low, the maximum boundary value adjustment factor factors_up, and correct the upper and lower bounds of the IDM model parameters according to the adjustment factors to obtain the adjusted parameter value range.

[0111] Table 4 Adjustment Factor Parameter Table

[0112] Scene type Scene description factors_low factors_up 0 Off-peak period [1.0,1.0,1.0,1.0,1.0] [1.0,1.0,1.0,1.0,1.0] 1 Morning rush hour [1.1,1.2,0.9,0.9,0.8] 1.2,1.3,1.1,0.95,0.9] 2 Evening rush hour [1.05,1.05,0.95,0.95,0.9] [1.1,1.1,1.05,1.0,1.0] 3 Night [0.9,0.8,1.2,1.2,1.2] [0.95,0.9,1.3,1.3,1.3] 4 Holiday [1.2,1.3,0.8,0.8,0.7] [1.3,1.4,0.9,0.9,0.8] 5 Emergency [1.3,1.4,0.7,0.7,0.6] [1.4,1.5,0.8,0.8,0.7]

[0113] Step S5: Construct a fitness function based on the IDM model, use the actual vehicle following data as a comparison benchmark, and measure the error between the particle swarm parameters and the following data.

[0114] Sub-step S51: Determine that the fitness function takes the error between the actual acceleration of the vehicle and the expected acceleration calculated based on the IDM model as the optimization goal, and measure the fitting degree of the model parameters to the actual data through the mean square of the error. The smaller the fitness value, the better the model fitting effect.

[0115] Sub-step S52: Perform iterative calculations on all sample points, that is, all data within the sliding window. For each sample point i, a total of n, calculate the IDM expected acceleration based on the current particle parameters

[0116] Sub-step S53: The error value is the square difference between the actual acceleration and the expected acceleration:

[0117]

[0118] where a i is the actual acceleration of the following vehicle, and accumulate the errors of all time steps into the list e i .

[0119] Sub-step S54: Calculate the average value of all errors in the error list as the fitness value of the current particle:

[0120]

[0121] Take the fitness value of the current particle as the output, providing an optimization direction for the subsequent iteration of the PSO algorithm.

[0122] Step S6: Enter online calibration, obtain real-time data, execute steps S3 and S4, complete scenario type detection and parameter range adjustment, and use the PSO algorithm to solve the optimal parameters of the IDM model based on the detected scenario type.

[0123] Sub-step S61: Under this scenario type, define the basic parameters of the PSO algorithm, including the maximum number of iterations NGEN and the population size pop_size. Create matrices for storing the particle positions, velocities, individual best positions, and global best positions according to the population size and the number of parameters, and randomly generate the initial positions and velocities for each particle. The position of a particle is a vector containing five parameters to be calibrated, and each parameter has a velocity. Based on steps S3 and S4, each parameter value of the initial position is randomly taken from within the upper and lower bounds, and the initial fitness value of each particle is calculated. The position of the particle with the lowest fitness value is set as the global best position.

[0124] Sub-step S62: In each iteration, sequentially perform the following steps:

[0125] Update the velocity and position of each particle, and perform out-of-bounds protection on the updated particle position to ensure that its parameter values are always within the upper and lower bounds.

[0126] v i = ω * v i + c 1 * rand() * (p_best i - x i ) + c 2 * rand() * (g_best i - x i )

[0127] x i = x i + v i

[0128] where ω is the inertia factor, and its value is non-negative; i = 1, 2,..., N, N is the total number of particles in this group, v i is the velocity of the particle, rand() is a random number between (0, 1), x i is the current position of the particle, c 1 , c 2 is the learning factor, c 1 = c 2 = 2, the maximum value of v i is V max , if v i is greater than V max , then v i = V max , p_best i is the historical best position of the individual particle, g_best i is the historical best position in the global population.

[0129] Calculate the fitness value of the current position of each particle based on step S5.

[0130] Compare the fitness value of the current position of the particle with its historical optimal fitness value. If the current fitness value is lower, update the individual optimal position of the particle. Similarly, compare the fitness value of the current particle with the global optimal fitness value. If the current fitness value is lower, update the global optimal position.

[0131] Sub-step S63: After each iteration, check the change difference between the current global optimal fitness value and the global optimal fitness value of the previous generation. If the change difference is less than the set threshold of 0.00001, it is considered that the algorithm has converged and the iteration is stopped. Otherwise, continue the iteration process of the next generation.

[0132] Sub-step S64: When the convergence condition is met or the maximum number of iterations is reached, stop the iteration. Output the global optimal parameter combination calculated by the PSO algorithm as the optimal parameters of the IDM model for the corresponding scenario type of the sliding window data at this time. At the same time, record the global optimal fitness value of each generation during the optimization process, and draw a curve graph of the fitness value changing with the number of iterations to evaluate the convergence process and performance of the PSO algorithm.

[0133] Sub-step S65: Record the scenario type and the corresponding optimal parameters for analyzing and comparing the changes in the optimal parameters under different time periods and different data conditions.

Claims

1. An online calibration method for IDM model parameters in high dynamic scenes based on LSTM-PSO, characterized in that: By constructing a time series dataset of multi-source traffic flow data, the LSTM neural network is used to classify and identify traffic scenes, and the boundary range of the IDM model parameters is dynamically adjusted according to the identified scene types; combined with the PSO algorithm, the IDM parameters are optimized online with the minimization of the model prediction error as the objective function, and the optimal parameter combination corresponding to each scene is output; the real-time and adaptability of the model are achieved by dynamically updating the scene parameter library, which specifically includes the following steps: Step S1: Processing the original vehicle trajectory data collected by the sensor The original vehicle trajectory data collected by the sensor is the single vehicle trajectory information. The data used include the field vehicle number oid, collection time inttime, vehicle longitude and latitude information lat, lng, driving direction direction, lane number laneid, and vehicle speed speed. In order to calibrate the parameters of the following model, it is necessary to calculate and extract the vehicle group following data. Sub-step S11: Determine the parameters required for IDM model parameter calibration: the front vehicle speed pre_speed, the rear vehicle speed speed, the rear vehicle acceleration acc, the head distance delta_d between the front and rear vehicles, and the timestamp t_sec used for drawing, and the traffic flow traffic_flow used for scene judgment; the default consideration is the following behavior of the rear vehicle in a pair of vehicles, so the acceleration parameters of the rear vehicle are required; Sub-step S12: filtering the vehicle trajectory data. The IDM model is a continuous microscopic single lane model, so the data of vehicle lane change is filtered out; Sub-step S13: Comprehensively considering the constraints of the following model, the head-on distance is calculated by converting the longitude and latitude differences of the vehicles in the same direction, lane and time. The distance between the two vehicles in the same lane at the same time is 0 to 120 meters. The data of the two vehicles in the following vehicle group and the parameters required for calibrating the IDM model are calculated, extracted and output; Step S2: The vehicle group following data obtained in step S1 needs to be further processed to ensure that the following data sequence is continuously available and the vehicle specific data meets the lane speed limit specification requirements, and the scene type is defined according to the traffic flow, speed, and acceleration characteristics to prepare for the subsequent steps; Sub-step S21: Remove the rows with missing values ​​in the speed, acc, and pre_speed columns. Missing values ​​will make it impossible to obtain valid results in subsequent calculations, so they need to be removed; Sub-step S22: setting vehicle speed screening conditions to pre-process the data according to actual road traffic rules; In the original vehicle trajectory data, there are three lanes in the same direction, and the lane close to the central dividing strip is 1. Therefore, according to the speed limits of different lanes on the highway according to traffic regulations, combined with the actual speed fluctuations of vehicles when entering the lanes, the following speed limits are made for each lane. The range of pre_speed is the same as speed: lane_1 speed: 100-130km / h, i.e. 27.7777-36.1111m / s; lane_2 speed: 80-110km / h, i.e. 22.2222-30.5555m / s; lane_3 speed: 55-90km / h, i.e. 15.2777-25m / s. The acceleration range of all lanes is -3 to 3.01m / s. 2 ; During the following process, the leading vehicle must always be in front of the following vehicle, so there is a screening condition delta_d>0; Sub-step S23: Different scene types are defined according to the data thresholds of traffic flow traffic_flow, speed speed, and acceleration acc: Off-peak traffic: 50≤traffic_flow<100, speed: 22.2m / s≤speed<30.5m / s, acceleration: 0.5m / s 2 ≤acc≤1m / s 2 ; The traffic flow during the morning and evening peaks is: traffic_flow≥100, speed: speed≤22.2m / s, acceleration: acc≥1m / s 2 ; Night traffic: traffic_flow>50, speed: speed≥30.5m / s, acceleration: 0.5m / s 2 ≥acc≥0; the traffic, speed, and acceleration during holidays and emergencies fluctuate or change suddenly; Step S3: Prepare data, design and train a classification model based on LSTM to detect traffic scene types; Sub-step S31: construct a time series data set using traffic flow data in multiple scenarios, including feature data of speed, acceleration acc, and vehicle distance delta_d; then standardize the time series data to unify the dimensions and reduce the impact of feature value differences on model training; and use a sliding window to generate a time series input data set; Sub-step S32: designing and building a LSTM-based deep neural network for processing time series data; Input layer: receives the time series features generated by the sliding window, and the input dimension is (N win , F), where N win is the window length, F is the feature dimension; LSTM hidden layer: uses 50 hidden units to extract time series features and uses the ReLU activation function to capture the dynamic change pattern of traffic scenes; Output layer: Maps to classification output through a fully connected layer and uses the Softmax activation function to calculate the probability distribution to achieve multi-category scene classification; Sub-step S33: using the preprocessed traffic flow data, taking accuracy as the evaluation indicator, using the Adam optimizer and the categorical_crossentropy loss function to compile the LSTM model; using the generator to train the model, the number of training rounds is 20; saving the trained LSTM model for the real-time scene recognition task; Step S4: Introduce the IDM model and determine the definition and range of the parameters to be calibrated, perform high-dynamic scene type recognition based on real-time data input, and adjust the parameter boundaries according to the scene recognition results; Sub-step S41: Introduce the IDM model. The acceleration formula of the IDM model is as follows: Where v is the current vehicle speed, a is the maximum acceleration, v0 is the desired speed of the vehicle, δ is the acceleration index, s is the distance between the current vehicle and the preceding vehicle, and s * is the expected safety distance, s0 is the minimum safety distance, Δv is the speed difference between the current vehicle and the preceding vehicle, T is the safety time interval, and b is the comfortable deceleration; From the IDM model formula, we can see that there are 6 adjustable parameters in the IDM model; take δ = 4, and let the vector arg = [v0, a, b, s0, T] T is the set of parameters to be calibrated, Sub-step S42: The parameters to be calibrated have an upper limit and a lower limit. The range of the parameters to be calibrated of the IDM model is set as follows: Free flow speed v0 range: 10-40m / s, maximum acceleration a range: 2-6m / s 2 , comfortable deceleration b range: 1-3m / s 2 , minimum safety distance s0 range: 0.1-3m, safety time interval T range: 0.5-5s; Sub-step S43: input real-time traffic flow data, and based on step S3, use the trained LSTM model to identify high-dynamic scene types; set corresponding parameter boundary adjustment factors according to the scene type, minimum boundary value adjustment factor factors_low, maximum boundary value adjustment factor factors_up, correct the upper and lower bounds of the IDM model parameters according to the adjustment factors, and obtain the adjusted parameter value range; Off-peak factors: factors_low = [1.0, 1.0, 1.0, 1.0], factors_up = [1.0, 1.0, 1.0, 1.0]; Morning peak factors: factors_low = [1.1, 1.1, 1.0, 1.0], factors_up = [1.2, 1.3, 1.1, 0.95]; Evening peak factors: factors_low = [1.05, 1.05, 1.0, 0.95], factors_up = [1.1, 1.2, 1.05, 0.95]; Night factors: factors_low = [0.9, 0.8, 1.2, 1.2], factors_up = [1.0, 1.1, 1.3, 1.3]; Holiday factors: factors_low = [1.2, 1.3, 0.8, 0.8], factors_up = [1.3, 1.4, 1.0, 1.1]; Emergency factors: factors_low = [1.3, 1.4, 0.7, 0.6], factors_up = [1.4, 1.5, 1.0, 1.3]; Step S5: construct a fitness function based on the IDM model, use the actual vehicle following data as a comparison benchmark, and measure the error between the particle swarm parameters and the following data; Sub-step S51: Determine the fitness function, taking the error between the actual acceleration of the vehicle and the expected acceleration calculated based on the IDM model as the optimization target, and measure the degree of fit of the model parameters to the actual data by the square mean of the error. The smaller the fitness value, the better the model fitting effect; Sub-step S52: Perform iterative calculations on all sample points, i.e., all data in the sliding window. For each sample point i, a total of n, calculate the IDM expected acceleration based on the current particle parameters. Sub-step S53: The error value is the square difference between the actual acceleration and the expected acceleration: In the formula, a i To obtain the actual acceleration of the following vehicle, the errors of all time steps are accumulated into the list e i middle; Sub-step S54: Calculate the average value of all errors in the error list as the fitness value of the current particle: The fitness value of the current particle is used as output to provide optimization direction for subsequent iterations of the PSO algorithm; Step S6: Enter online calibration, obtain real-time data, execute steps S3 and S4, complete scene type detection and parameter range adjustment, and use the PSO algorithm to solve the optimal parameters of the IDM model based on the detected scene type; Sub-step S61: Under this scenario type, define the basic parameters of the PSO algorithm, including the maximum iteration number NGEN and the population size pop_size; create a matrix for storing particle positions, speeds, individual optimal positions, and global optimal positions according to the population size and the number of parameters, and randomly generate an initial position and speed for each particle; the position of a particle is a vector containing five parameters to be calibrated, and each parameter has a speed; based on steps S3 and S4, each parameter value of the initial position is randomly taken from the upper and lower boundaries, and the initial fitness value of each particle is calculated, and the particle position with the lowest fitness value is set as the global optimal position; Sub-step S62: In each iteration, the following steps are performed in sequence: Update the speed and position of each particle, and perform out-of-bounds protection on the updated particle position to ensure that its parameter value is always within the upper and lower boundary range; v i =ω*v i +c1*rand()*(p_best i -x i )+c2*rand()*(g_best i -x i ) x i =x i +v i Where ω is the inertia factor, which is non-negative; i = 1, 2, ..., N, N is the total number of particles in the group, v i is the speed of the particle, rand() is a random number between (0,1), x i is the current position of the particle, c1, c2 are learning factors, c1=c2=2, v i The maximum value is V max , if v i Greater than V max , then v i =V max , p_best i is the best historical position of the individual particle, g_best i is the historically optimal position in the global population; Calculate the fitness value of each particle's current position based on step S5; Compare the fitness value of the particle's current position with its historical optimal fitness value. If the current fitness value is lower, update the individual optimal position of the particle. Similarly, compare the fitness value of the current particle with the global optimal fitness value. If the current fitness value is lower, update the global optimal position. Sub-step S63: After each iteration, check the change difference between the current global optimal fitness value and the previous generation global optimal fitness value; if the change difference is less than the set threshold 0.00001, it is considered that the algorithm has converged and the iteration is stopped; otherwise, continue the next generation of iteration process; Sub-step S64: When the convergence condition is met or the maximum number of iterations is reached, the iteration is stopped; the global optimal parameter combination calculated by the PSO algorithm is output as the optimal parameter of the IDM model under the scenario type corresponding to the sliding window data at this time; at the same time, the global optimal fitness value of each generation in the optimization process is recorded, and a curve graph of the fitness changing with the number of iterations is drawn to evaluate the convergence process and performance of the PSO algorithm; Sub-step S65: recording the scene type and the corresponding optimal parameters for analyzing and comparing the changes in the optimal parameters under different time periods and different data conditions.

Citation Information

Cited By

  • Real-time handwriting recognition method based on deep neural network

    CN120766298A