Expressway vehicle longitudinal track reconstruction method
By integrating ETC and "two-passenger-one-dangerous-goods" GPS data, and using XGBoost and improved particle filter algorithms, the problems of data loss and noise processing on highways were solved, achieving higher accuracy and robust vehicle longitudinal trajectory reconstruction.
Patent Information
- Application Number
- CN202410934321.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing trajectory reconstruction methods have limitations in handling missing data and noise on highways, and lack adaptability and accuracy, especially when detectors are sparsely distributed or malfunctioning, resulting in low reconstruction accuracy.
By combining ETC data and GPS data of "two passengers and one dangerous goods" vehicles, an instantaneous vehicle speed estimation model is constructed using the XGBoost algorithm. Trajectory reconstruction is performed by improving the particle filter algorithm, taking into account instantaneous speed estimation error and observation noise, and adaptive processing is achieved.
It improves the accuracy and robustness of trajectory reconstruction, adapts to complex traffic environments, and provides trajectory reconstruction results with higher accuracy and robustness.
Smart Images

Figure CN118918713A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of intelligent traffic information technology, and in particular relates to a method for reconstructing the longitudinal trajectory of a highway vehicle. Background Art
[0002] The longitudinal trajectory data of vehicles can reflect the distance traveled by vehicles at different times and its changing information, and to a certain extent can reflect the driving behavior patterns of vehicles, which is of great significance for traffic management and illegal behavior monitoring. Due to the limitations of traditional GPS data in terms of vehicle penetration and coverage, as well as the sparse distribution of ETC detection equipment on highways, traffic managers on highways lack sufficiently accurate data to fully capture the dynamic behavior of vehicles, resulting in a reduction in the ability to monitor vehicle driving status. By integrating vehicle information from different data sources, exploring the differences in vehicle driving speeds under different temporal and spatial conditions, and then deeply analyzing and estimating the evolution of vehicle driving status in traffic flow, the effective reconstruction of the longitudinal trajectory of highway vehicles can be achieved, which is of great significance for realizing the abnormal identification of individual vehicles and traffic flow, the intelligent management of highways, and improving traffic efficiency.
[0003] Although a variety of vehicle trajectory reconstruction methods have been proposed, the main purpose of these methods is to repair existing vehicle trajectory data, such as filling or refining missing points in the trajectory. This type of method is not applicable to the typical scenario of highways that lack sufficient trajectory data. Existing vehicle trajectory reconstruction for highways is also mostly used to complete the information of vehicles that were missed at the checkpoints, and the reconstruction accuracy is low. In addition, traditional methods are usually based on traffic flow models and statistical models, which rely on a large amount of historical data and precise model parameters for trajectory reconstruction. When dealing with missing data and noise, these models often use simple interpolation or filtering methods, which are difficult to adapt to complex traffic environments and changing road conditions.
[0004] Patent document CN117334051B discloses a method for reconstructing vehicle trajectories on highways. This method uses an adaptive smoothing method to complete the spatiotemporal velocity matrix, uses the spatiotemporal velocity matrix generated by the macro model as a constraint, and combines the car-following model to reconstruct a higher-resolution trajectory. However, this method relies on multiple fixed detectors and connected vehicle data. When the detectors are sparsely distributed or fail, data integrity is limited, resulting in insufficient adaptability and robustness in different data scenarios. Summary of the invention
[0005] In view of this, the object of the present invention is to provide a method for reconstructing the longitudinal trajectory of a highway vehicle. The present invention aims to solve the limitations of existing trajectory reconstruction methods in terms of data loss and noise processing, and improve adaptability and accuracy.
[0006] The present invention provides a method for reconstructing the longitudinal trajectory of a highway vehicle, comprising the following steps:
[0007] S1. Collect ETC data and GPS data of “two passenger vehicles and one dangerous goods vehicle” of the target road section, pre-process the data, and extract vehicle speed characteristics in different time and space dimensions;
[0008] S2. In view of the missing data, a vehicle instantaneous speed estimation model is constructed based on the XGBoost algorithm to estimate the vehicle instantaneous speed under specific time and space conditions;
[0009] S3. Evaluate the error of the vehicle instantaneous speed estimation model and fit the probability distribution of the error;
[0010] S4. The vehicle instantaneous velocity estimation result and error are used as the observation value and observation noise, and the improved particle filter algorithm is used to complete the reconstruction of the vehicle longitudinal trajectory.
[0011] Further, the step S1 includes the following sub-steps:
[0012] S1.1 preliminarily matches heterogeneous data sets, screens out ETC data and “two passenger and one hazardous” GPS data on the same expressway section, and completes the spatiotemporal matching of data;
[0013] S1.2 performs data cleaning on the ETC data, deletes redundant data, and then extracts the travel speed of each vehicle on each highway section, as well as the average travel speed of vehicles within a specified observation time range, i.e., the traffic flow speed;
[0014] Vehicle individual travel speed:
[0015] Traffic flow speed:
[0016] Where, t in ,t out They represent the time when a vehicle enters and leaves the road section; L represents the length of the road section, that is, the distance between the upstream and downstream ETC gantries; N i Represents the number of vehicles passing within a specified observation time;
[0017] S1.3 Correct the position of the offset track points in the GPS data of the "two passenger and one dangerous goods" vehicle. After correction, convert the position information in the track of the "two passenger and one dangerous goods" vehicle from longitude and latitude expression to mileage expression;
[0018] The travel distance between adjacent trajectory points is calculated as follows:
[0019]
[0020] In the formula, d represents the spherical distance between the two trajectory points; R is the radius of the earth; lat1 represents the latitude of the first point; lat2 represents the latitude of the second point; Δlat represents the difference between the latitude of the first point and the latitude of the second point; Δlon represents the difference between the longitude of the first point and the longitude of the second point; a and c represent two intermediate variables of the spherical distance between the two trajectory points. By accumulating the driving distance from the vehicle's starting trajectory point to each trajectory point, the mileage of each trajectory point is obtained:
[0021]
[0022] In the formula, l i Represents the mileage of the trajectory point; d i Represents the travel distance of the i-th segment of the trajectory point;
[0023] S1.4 Based on the current GPS data, obtain the expected speed v at the current position rd and the average speed of surrounding "two passenger and one dangerous goods" vehicles v sr ;
[0024] v rd =R(x)
[0025] v sr =avg(v p )
[0026] Where R(x) is the fitted ridge regression function; x is the observation location; v p GPS records speed for "two passenger and one dangerous goods" vehicles.
[0027] Further, the step S2 includes the following sub-steps:
[0028] S2.1 Analyze different missing situations;
[0029] That is, when there is no "two passenger and one dangerous goods" vehicle in the observation range at the current moment, the average speed of the surrounding "two passenger and one dangerous goods" vehicles is v sr When the GPS data fails or is completely missing in the current observation range, the expected speed v at the current position is rd and the average speed of surrounding "two passenger and one dangerous goods" vehicles v sr All missing;
[0030] S2.2 performs a blanking operation on the missing data under different conditions, and uses the XGBoost algorithm to estimate the instantaneous speed of the vehicle under specific time and space conditions, wherein the four feature parameters extracted in step S1 are used as input data of the XGBoost algorithm;
[0031] The objective function of the XGBoost algorithm is in the following form:
[0032]
[0033] Where L(θ) is the loss function; Ω(θ) is the regularization term; n is the number of training data samples; y i is the true value of the i-th sample; is the value predicted by the model; f k is the kth decision tree; K is the total number of trees in the model;
[0034] In the regularization term, Ω(f k ) is defined as follows:
[0035]
[0036] Where T is the tree f k The number of leaf nodes; w j is the weight of the jth leaf node; γ and λ are regularization coefficients used to balance the relationship between the loss function and the model complexity, where γ is used to control the number of trees and λ is used to control the L2 regularization of the leaf node weight;
[0037] S2.3 When XGBoost encounters missing values, it assigns the missing data to the left or right subtree, and then chooses the direction that can bring the greatest gain after the split;
[0038] The gains of the left and right subtrees are calculated as follows:
[0039]
[0040]
[0041] Where Gain L and Gain R Represents the gain of missing values being assigned to the left subtree or the right subtree respectively; G and H represent the sum of the gradient and the second-order derivative respectively; G L ,G M ,G R , G represent the gradient sum of the left subtree, the gradient sum of the missing value part, the gradient sum of the right subtree and the gradient sum of the current node; H L ,H M ,H R ,H represent the sum of the second-order derivatives of the left subtree, the sum of the second-order derivatives of the missing value part, the sum of the second-order derivatives of the right subtree and the sum of the second-order derivatives of the current node; γ represents the regularization coefficient, which is used to control the number of trees.
[0042] Further, the step S3 includes the following sub-steps:
[0043] S3.1 evaluates the vehicle instantaneous speed estimation model error based on the XGBoost algorithm;
[0044] The calculation expression of the estimation error is: E = v est -v tr
[0045] In the formula, v est and v tr Represent the instantaneous speed estimate and actual value respectively;
[0046] S3.2 Use mean absolute error MAE and root mean square error RMSE to evaluate the estimation error of the model;
[0047]
[0048]
[0049] The MAE and RMSE indicators of the model are used as the value of the Gaussian distribution radius R to fit the probability distribution of the estimation error, and finally the MAE is determined as the Gaussian distribution radius of the speed estimation error;
[0050] The distribution probability expression of velocity estimation error is as follows:
[0051]
[0052] Furthermore, the improved particle filter algorithm in step S4 includes an initialization module, a state estimation module and a trajectory output module.
[0053] Further, the step S4 includes the following sub-steps:
[0054] S4.1 determines the number of trajectory points that need to be reconstructed for the target vehicle in the initialization module, and completes particle set initialization and particle weight initialization;
[0055] Among them, the dimension of the particle state space in the particle set initialization is 2, representing the vehicle position and vehicle speed respectively, the number of particle sets is determined, and at the same time, all initial particles are set with equal weights;
[0056] S4.2 In the state estimation module, the dynamic model is used to predict the state of the particle in the next time window;
[0057] For each particle i in the particle set, the dynamic model is expressed as:
[0058]
[0059]
[0060] In the formula, Respectively represent the predicted speed and predicted position of the ith particle at the tth time; Respectively represent the velocity and position of the i-th particle at time t-1; represents the change in velocity of the ith particle at the tth moment relative to the previous moment, and the velocity change obeys a uniform distribution, that is, The lower limit is 0km / h and the upper limit is 140km / h;
[0061] S4.3 uses the observation model to update the weight of each particle;
[0062] That is, the vehicle speed in the current time window estimated by the XGBoost algorithm is used as the observation value, and the error of the instantaneous speed estimation model is used as the observation noise to calculate the likelihood d of the predicted value and the observation value in the corresponding time window;
[0063]
[0064] In the formula, v par is the predicted value of the velocity for each particle; v obs is the velocity observation value in the corresponding time window;
[0065] S4.4 uses the residual-stratified hybrid resampling method to resample particle weights;
[0066] I. Calculate the number of valid particle samples and determine whether resampling is needed;
[0067]
[0068] Where N eff Indicates the number of valid particle samples, the number of valid particle samples N eff When it is less than half of the total number of particle samples N, resampling is required;
[0069] II. Calculate the resampling index of each particle, the resampling index includes an integer and a residual;
[0070] n i =|N·w i |
[0071]
[0072] Where n i is the integer part, representing the minimum number of times each particle is replicated; is the residual;
[0073] III. Stratified resampling of the residual to fill the remaining Particle positions, renormalize the residual to get the weight
[0074]
[0075] IV. The remaining The particle positions are assigned to particles using a stratified resampling method based on the residual weights Sampling is performed, that is, generating A random number uniformly distributed in the interval [0,1). For each random number, find the corresponding partition interval, which is determined by the normalized residual weight. Definition; Select additional particles based on the distribution of the residual part to complete the resampling operation;
[0076] S4.5 uses the updated and resampled particle set to calculate the final state estimate to obtain the vehicle speed and position at the current moment;
[0077] S4.6 In the trajectory output module, the trajectory scaling strategy is used to adjust the length of the reconstructed trajectory. The threshold θ of the difference between the reconstructed length and the actual length is set to determine whether to scale the reconstructed trajectory. The scaling factor α is calculated as follows:
[0078]
[0079] Where, L rec is the length of the reconstructed trajectory; L act is the actual driving distance of the vehicle;
[0080] After determining the scaling requirement of the reconstructed trajectory, the scaling factor is applied to the estimation result in each time window to output the final reconstructed trajectory.
[0081] Beneficial effects:
[0082] The present invention proposes a method for reconstructing the longitudinal trajectory of highway vehicles taking into account the instantaneous speed estimation error. By integrating ETC data and "two passenger and one dangerous goods" GPS data, combined with the XGBoost algorithm and the improved particle filter algorithm, the accuracy and robustness of trajectory reconstruction are improved. In the feature extraction stage, the individual vehicle speed, traffic flow speed, road section attributes and surrounding vehicle information are fully utilized to achieve adaptive processing of different data missing situations. The XGBoost algorithm is used to estimate the instantaneous speed, and the estimation error is processed as a Gaussian distribution, which enhances the reliability of speed estimation. By improving the particle filter algorithm and taking into account the speed estimation error, dynamic adjustment of the longitudinal trajectory of the vehicle is achieved, which improves the adaptability and accuracy in complex traffic environments. The above method effectively overcomes the limitations of existing trajectory reconstruction methods in data missing and noise processing, and provides trajectory reconstruction results with higher accuracy and robustness.
[0083] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 A flowchart of a method for reconstructing the longitudinal trajectory of a highway vehicle according to the present invention;
[0085] Figure 2 The overall framework diagram of the highway vehicle longitudinal trajectory reconstruction model. DETAILED DESCRIPTION
[0086] In order to make the technical solutions, advantages and purposes of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of this application.
[0087] like Figure 1 As shown, the present invention provides a method for reconstructing the longitudinal trajectory of a highway vehicle, comprising the following steps:
[0088] S1. Collect ETC data and GPS data of “two passenger vehicles and one dangerous goods vehicle” of the target road section, pre-process the data, and extract vehicle speed characteristics in different time and space dimensions;
[0089] Perform spatiotemporal matching on multi-source heterogeneous data and extract vehicle speed information from four perspectives: single vehicle, traffic flow, road section attributes, and surrounding vehicles. ETC gantries are distributed at important nodes of the highway according to certain distance requirements, dividing the entire road into different sections.
[0090] S1.1 preliminarily matches heterogeneous data sets, screens out ETC data and “two passenger and one hazardous” GPS data on the same expressway section, and completes the spatiotemporal matching of data;
[0091] S1.2 Clean the ETC data, delete redundant data, and then extract the travel speed of each vehicle on each highway section, as well as the average travel speed of vehicles within the specified observation time range, i.e., the traffic flow speed; the above two types of speed observation information can reflect the impact of individual vehicle and traffic flow differences on the estimation of vehicle instantaneous speed;
[0092] Vehicle individual travel speed:
[0093] Traffic flow speed:
[0094] In the formula, t in ,t out They represent the time when a vehicle enters and leaves the road section; L represents the length of the road section, that is, the distance between the upstream and downstream ETC gantries; N i Represents the number of vehicles passing within 2 minutes;
[0095] S1.3 Perform position correction on the track points with obvious deviation in the GPS data of “two passenger vehicles and one dangerous goods vehicle”. After correction, convert the position information in the track of “two passenger vehicles and one dangerous goods vehicle” from longitude and latitude expression to mileage expression;
[0096] The travel distance between adjacent trajectory points is calculated as follows:
[0097]
[0098] Where d represents the spherical distance between the two trajectory points; R is the radius of the earth; lat1 represents the latitude of the first point; lat2 represents the latitude of the second point; Δlat represents the difference between the latitude of the first point and the latitude of the second point; Δlon represents the difference between the longitude of the first point and the longitude of the second point; a and c represent two intermediate variables of the spherical distance between the two trajectory points.
[0099] By accumulating the driving distance from the vehicle's starting trajectory point to each trajectory point, the mileage of each trajectory point is obtained:
[0100]
[0101] In the formula, l i Represents the mileage of the trajectory point; d i Represents the travel distance of the i-th segment of the trajectory point;
[0102] S1.4 Based on the current GPS data, the driving speed of the "two passenger and one dangerous goods" vehicles around the target vehicle can be obtained. The above two speed observation information can reflect the impact of road attributes and surrounding vehicles on the instantaneous speed estimation of the vehicle. The current position expected speed v rd and the average speed of surrounding "two passenger and one dangerous goods" vehicles v sr The extraction method is as follows;
[0103] v rd =R(x)
[0104] v sr =avg(v p )
[0105] Where R(x) is the fitted ridge regression function; x is the observation location; v p GPS records speed for "two passenger and one dangerous goods" vehicles.
[0106] S2. Analyze the availability of the four feature parameters extracted in step S1 according to different data missing situations, build a vehicle instantaneous speed estimation model based on the XGBoost algorithm, and estimate the vehicle instantaneous speed under specific time and space conditions;
[0107] S2.1 Analyze different missing situations;
[0108] That is, when there is no "two passenger and one dangerous goods" vehicle in the observation range at the current moment, the average speed of the surrounding "two passenger and one dangerous goods" vehicles is v sr When the GPS data fails or is completely missing in the current observation range, the expected speed v at the current position is rd and the average speed of surrounding "two passenger and one dangerous goods" vehicles v sr All missing;
[0109] S2.2 performs a blanking operation on the missing data under different conditions, and uses the XGBoost algorithm to estimate the instantaneous speed of the vehicle under specific time and space conditions, wherein the four feature parameters extracted in step S1 are used as input data of the XGBoost algorithm;
[0110] The objective function of the XGBoost algorithm is in the following form:
[0111]
[0112] Where L(θ) is the loss function; Ω(θ) is the regularization term; n is the number of training data samples; y i is the true value of the i-th sample; is the value predicted by the model; f k is the kth decision tree; K is the total number of trees in the model;
[0113] In the regularization term, Ω(f k ) is defined as follows:
[0114]
[0115] Where T is the tree f k The number of leaf nodes; w j is the weight of the jth leaf node; γ and λ are regularization coefficients used to balance the relationship between the loss function and the model complexity, where γ is used to control the number of trees and λ is used to control the L2 regularization of the leaf node weight;
[0116] S2.3 When XGBoost encounters missing values, it assigns the missing data to the left or right subtree, and then chooses the direction that can bring the greatest gain after the split;
[0117] The gains of the left and right subtrees are calculated as follows:
[0118]
[0119]
[0120] In the formula, Gain L and Gain R Represents the gain of missing values being assigned to the left subtree or the right subtree respectively; G and H represent the sum of the gradient and the second-order derivative respectively; G L ,G M ,G R , G represent the gradient sum of the left subtree, the gradient sum of the missing value part, the gradient sum of the right subtree and the gradient sum of the current node; H L ,H M ,H R ,H represent the sum of the second-order derivatives of the left subtree, the sum of the second-order derivatives of the missing value part, the sum of the second-order derivatives of the right subtree, and the sum of the second-order derivatives of the current node; here γ represents the regularization coefficient, which is used to control the number of trees.
[0121] S3. Evaluate the error of the vehicle instantaneous speed estimation model and fit the probability distribution of the error;
[0122] S3.1 evaluates the vehicle instantaneous speed estimation model error based on the XGBoost algorithm;
[0123] The calculation expression of the estimation error is: E = v est -v tr
[0124] In the formula, v est and v tr Represent the instantaneous speed estimate and actual value respectively;
[0125] S3.2 Use mean absolute error (MAE) and root mean square error (RMSE) to evaluate the estimation error of the model;
[0126]
[0127]
[0128] The MAE and RMSE indicators of the model are used as the value of the Gaussian distribution radius R to fit the probability distribution of the estimation error, and finally the MAE is determined as the Gaussian distribution radius of the speed estimation error;
[0129] The distribution probability expression of velocity estimation error is as follows:
[0130]
[0131] S4. Using the vehicle instantaneous speed estimation result and error as the observation value and observation noise, the improved particle filter algorithm is used to complete the reconstruction of the vehicle longitudinal trajectory;
[0132] Based on the improved particle filter algorithm, the vehicle speed estimation in each time window is completed through the vehicle instantaneous speed estimation method in step S2, and the instantaneous speed estimation error in step S3 is taken into consideration to complete the derivation of the target vehicle speed and position information in each time window, and complete the reconstruction of the vehicle longitudinal trajectory.
[0133] The improved particle filter algorithm consists of three parts: initialization module, state estimation module and trajectory output module.
[0134] S4.1 determines the number of trajectory points that need to be reconstructed for the target vehicle in the initialization module, and completes particle set initialization and particle weight initialization;
[0135] Among them, the dimension of the particle state space in the particle set initialization is 2, representing the vehicle position and vehicle speed respectively, the number of particle sets is determined, and at the same time, all initial particles are set with equal weights to complete the particle weight initialization;
[0136] S4.2 In the state estimation module, the dynamic model is used to predict the state of the particle in the next time window;
[0137] For each particle i in the particle set, the dynamic model is expressed as:
[0138]
[0139]
[0140] In the formula, Respectively represent the predicted speed and predicted position of the ith particle at the tth time; Respectively represent the velocity and position of the i-th particle at time t-1; represents the speed change of the ith particle at the tth moment relative to the previous moment. Its main function is to maintain the diversity of particles and to cover various changes in vehicle speed. The speed change is set to obey a uniform distribution, that is, set up The lower limit is 0km / h and the upper limit is 140km / h, so that the predicted speed of each particle remains within a reasonable range;
[0141] S4.3 uses the observation model to update the weight of each particle;
[0142] That is, the vehicle speed in the current time window estimated by the XGBoost algorithm is used as the observation value, and the error of the instantaneous speed estimation model is used as the observation noise to calculate the likelihood d of the predicted value and the observation value in the corresponding time window;
[0143]
[0144] In the formula, v par is the predicted value of the velocity for each particle; v obs is the velocity observation value in the corresponding time window;
[0145] S4.4 uses the residual-stratified hybrid resampling method to resample particle weights;
[0146] I. Calculate the number of valid particle samples and determine whether resampling is needed;
[0147]
[0148] Where N eff Indicates the number of valid particle samples, the number of valid particle samples N eff When it is less than half of the total number of particle samples N, resampling is required. eff The larger it is, the more diverse and representative the sample is;
[0149] II. Calculate the resampling index of each particle, the resampling index includes an integer and a residual;
[0150] n i =|N·w i |
[0151]
[0152] Where n i is the integer part, representing the minimum number of times each particle is replicated; is the residual;
[0153] III. Stratified resampling of the residual to fill the remaining Particle positions, renormalize the residual to get the weight
[0154]
[0155] IV. The remaining The particle positions are assigned to particles using a stratified resampling method based on the residual weights Sampling is performed, that is, generating A random number uniformly distributed in the interval [0,1). For each random number, find the corresponding partition interval to make it fall into. This partition interval is determined by the normalized residual weight Definition; In this way, additional particles can be selected according to the distribution of the residual part to complete the resampling operation;
[0156] S4.5 uses the updated and resampled particle set to calculate the final state estimate to obtain the vehicle speed and position at the current moment;
[0157]
[0158]
[0159] S4.6 In the trajectory output module, the trajectory scaling strategy is used to adjust the length of the reconstructed trajectory. The threshold θ of the difference between the reconstructed length and the actual length is set to determine whether to scale the reconstructed trajectory. The scaling factor α is calculated as follows:
[0160]
[0161] Where, L rec is the length of the reconstructed trajectory; L act is the actual driving distance of the vehicle.
[0162] After determining the scaling requirement of the reconstructed trajectory, the scaling factor can be applied to the estimation result in each time window to output the final reconstructed trajectory.
[0163] In this embodiment, the overall framework diagram of the vehicle longitudinal trajectory reconstruction model can be referred to Figure 2 .
[0164] It is hereby declared that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should be included in the scope of the claims of the present invention.
Claims
1. A method for reconstructing the longitudinal trajectory of a highway vehicle, characterized in that: The following steps are involved: S1. Collect ETC data and "two passenger and one dangerous goods" GPS data of the target road section, pre-process the data, and extract vehicle speed characteristics in different time and space dimensions; S2. In view of the missing data, a vehicle instantaneous speed estimation model is constructed based on the XGBoost algorithm to estimate the vehicle instantaneous speed under specific time and space conditions; S3. Evaluate the error of the vehicle instantaneous speed estimation model and fit the probability distribution of the error; S4. The vehicle instantaneous velocity estimation result and error are used as the observation value and observation noise, and the improved particle filter algorithm is used to complete the reconstruction of the vehicle longitudinal trajectory.
2. A highway vehicle longitudinal trajectory reconstruction method according to claim 1, characterized in that: The step S1 comprises the following sub-steps: S1.1 preliminarily matches heterogeneous data sets, screens out ETC data and "two passenger and one hazardous" GPS data on the same expressway section, and completes the spatiotemporal matching of data; S1.2 performs data cleaning on the ETC data, deletes redundant data, and then extracts the travel speed of each vehicle on each highway section, as well as the average travel speed of vehicles within a specified observation time range, i.e., the traffic flow speed; Vehicle individual travel speed: Traffic flow speed: Where, t in ,t out They represent the time when a vehicle enters and leaves the road section; L represents the length of the road section, that is, the distance between the upstream and downstream ETC gantries; N i Represents the number of vehicles passing within a specified observation time; S1.3 Correct the position of the offset track points in the GPS data of the "two passenger and one dangerous goods" vehicle. After correction, convert the position information in the track of the "two passenger and one dangerous goods" vehicle from longitude and latitude expression to mileage expression; The travel distance between adjacent trajectory points is calculated as follows: d=R·c Where d represents the spherical distance between the two trajectory points; R is the radius of the earth; lat1 represents the latitude of the first point; lat2 represents the latitude of the second point; Δlat represents the difference between the latitude of the first point and the latitude of the second point; Δlon represents the difference between the longitude of the first point and the longitude of the second point; a and c represent two intermediate variables of the spherical distance between the two trajectory points. By accumulating the driving distance from the vehicle's starting trajectory point to each trajectory point, the mileage of each trajectory point is obtained: In the formula, l i Represents the mileage of the trajectory point; d i Represents the travel distance of the i-th segment of the trajectory point; S1.4 Based on the current GPS data, obtain the expected speed v at the current position rd and the average speed of surrounding "two passenger and one dangerous goods" vehicles v sr ; v rd =R(x) v sr =avg(v p ) Where R(x) is the fitted ridge regression function; x is the observation location; v p GPS records speed for "two passenger and one dangerous goods" vehicles.
3. A highway vehicle longitudinal trajectory reconstruction method according to claim 2, characterized in that: The step S2 comprises the following sub-steps: S2.1 Analyze different missing situations; That is, when there is no "two passenger and one dangerous goods" vehicle in the observation range at the current moment, the average speed of the surrounding "two passenger and one dangerous goods" vehicles is v sr When the GPS data fails or is completely missing in the current observation range, the expected speed v at the current position is rd and the average speed of surrounding "two passenger and one dangerous goods" vehicles v sr All missing; S2.2 performs a blanking operation on the missing data under different conditions, and uses the XGBoost algorithm to estimate the instantaneous speed of the vehicle under specific time and space conditions, wherein the four feature parameters extracted in step S1 are used as input data of the XGBoost algorithm; The objective function of the XGBoost algorithm is in the following form: Where L(θ) is the loss function; Ω(θ) is the regularization term; n is the number of training data samples; y i is the true value of the i-th sample; is the value predicted by the model; f k is the kth decision tree; K is the total number of trees in the model; In the regularization term, Ω(f k ) is defined as follows: Where T is the tree f k The number of leaf nodes; w j is the weight of the jth leaf node; γ and λ are regularization coefficients used to balance the relationship between the loss function and the model complexity, where γ is used to control the number of trees and λ is used to control the L2 regularization of the leaf node weight; S2.3 When XGBoost encounters missing values, it assigns the missing data to the left or right subtree, and then chooses the direction that can bring the greatest gain after the split; The gains of the left and right subtrees are calculated as follows: Where Gain L and Gain R Represents the gain of missing values being assigned to the left subtree or the right subtree respectively; G and H represent the sum of the gradient and the second-order derivative respectively; G L ,G M ,G R , G represent the gradient sum of the left subtree, the gradient sum of the missing value part, the gradient sum of the right subtree and the gradient sum of the current node; H L ,H M ,H R ,H represent the sum of the second-order derivatives of the left subtree, the sum of the second-order derivatives of the missing value part, the sum of the second-order derivatives of the right subtree and the sum of the second-order derivatives of the current node; γ represents the regularization coefficient, which is used to control the number of trees.
4. A method for reconstructing the longitudinal trajectory of a highway vehicle according to claim 3, characterized in that: The step S3 comprises the following sub-steps: S3.1 evaluates the vehicle instantaneous speed estimation model error based on the XGBoost algorithm; The calculation expression of the estimation error is: E = v est -v tr In the formula, v est and v tr Represent the instantaneous speed estimate and actual value respectively; S3.2 Use mean absolute error MAE and root mean square error RMSE to evaluate the estimation error of the model; The MAE and RMSE indicators of the model are used as the value of the Gaussian distribution radius R to fit the probability distribution of the estimation error, and finally the MAE is determined as the Gaussian distribution radius of the speed estimation error; The distribution probability expression of velocity estimation error is as follows:
5. A method for reconstructing the longitudinal trajectory of a highway vehicle according to claim 4, characterized in that: The improved particle filter algorithm in step S4 includes an initialization module, a state estimation module and a trajectory output module.
6. A method for reconstructing the longitudinal trajectory of a highway vehicle according to claim 5, characterized in that: The step S4 comprises the following sub-steps: S4.1 determines the number of trajectory points that need to be reconstructed for the target vehicle in the initialization module, and completes particle set initialization and particle weight initialization; Among them, the dimension of the particle state space in the particle set initialization is 2, representing the vehicle position and vehicle speed respectively, the number of particle sets is determined, and at the same time, all initial particles are set with equal weights; S4.2 In the state estimation module, the dynamic model is used to predict the state of the particle in the next time window; For each particle i in the particle set, the dynamic model is expressed as: In the formula, Respectively represent the predicted speed and predicted position of the ith particle at the tth time; Respectively represent the velocity and position of the i-th particle at time t-1; represents the change in velocity of the ith particle at the tth moment relative to the previous moment, and the velocity change obeys a uniform distribution, that is, The lower limit is 0km / h and the upper limit is 140km / h; S4.3 uses the observation model to update the weight of each particle; That is, the vehicle speed in the current time window estimated by the XGBoost algorithm is used as the observation value, and the error of the instantaneous speed estimation model is used as the observation noise to calculate the likelihood d of the predicted value and the observation value in the corresponding time window; In the formula, v par is the predicted value of the velocity for each particle; v obs is the velocity observation value in the corresponding time window; S4.4 uses the residual-stratified hybrid resampling method to resample particle weights; I. Calculate the number of valid particle samples and determine whether resampling is needed; Where N eff Indicates the number of valid particle samples, the number of valid particle samples N eff When it is less than half of the total number of particle samples N, resampling is required; II. Calculate the resampling index of each particle, the resampling index includes an integer and a residual; n i =|N·w i | Where n i is the integer part, representing the minimum number of times each particle is replicated; is the residual; III. Stratified resampling of the residual to fill the remaining Particle positions, renormalize the residual to get the weight IV. The remaining The particle positions are assigned to particles using a stratified resampling method based on the residual weights Sampling is performed, that is, generating A random number uniformly distributed in the interval [0,1). For each random number, find the corresponding partition interval, which is determined by the normalized residual weight. Definition; Select additional particles based on the distribution of the residual part to complete the resampling operation; S4.5 uses the updated and resampled particle set to calculate the final state estimate to obtain the vehicle speed and position at the current moment; S4.6 In the trajectory output module, the trajectory scaling strategy is used to adjust the length of the reconstructed trajectory. The threshold θ of the difference between the reconstructed length and the actual length is set to determine whether to scale the reconstructed trajectory. The scaling factor α is calculated as follows: Where, L rec is the length of the reconstructed trajectory; L act is the actual driving distance of the vehicle; After determining the scaling requirement of the reconstructed trajectory, the scaling factor is applied to the estimation result in each time window to output the final reconstructed trajectory.
Citation Information
Patent Citations
Vehicle space-time trajectory reconstruction method based on data fusion
CN115311854A
Non-motor vehicle track reconstruction method for non-motor vehicle shared space
CN116578879A
Signal control intersection vehicle trajectory reconstruction method based on particle filtering
CN117973167A
Apparatus, system and method for vehicle trajectory reconstruction
WO2014108219A1
Cited By
A vehicle trajectory reconstruction method based on parameter residual field calibration and physical constraint fusion
CN122821773A
A vehicle trajectory reconstruction method based on the fusion of parametric residual field calibration and physical constraints
CN122821773B
