A method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections
By constructing a PINN-GBDT hybrid prediction model and the MC dropout method, combined with video data acquisition and TTC risk threshold classification, the accuracy and robustness issues of vehicle trajectory prediction at signalized intersections were solved, achieving high-precision and reliable vehicle trajectory prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-26
AI Technical Summary
Existing vehicle trajectory prediction methods lack sufficient accuracy and robustness at signalized intersections, especially in highly dynamic and interactive scenarios where they struggle to accurately depict vehicle decision-making and movement processes and effectively respond to sudden changes in risk states.
A PINN-GBDT hybrid prediction model is constructed, which combines video data acquisition and data cleaning. The TTC risk threshold is determined by the cumulative probability partitioning method. The historical trajectory features of vehicles and the conflict risk status are integrated. The uncertainty is quantified by the MC dropout method. Physical constraints and gradient boosting decision trees are used to process multi-source features for trajectory prediction.
It improves the accuracy and reliability of vehicle trajectory prediction at signalized intersections, enhances the model's adaptability to different traffic scenarios, and provides reliable confidence judgment through uncertainty quantification.
Smart Images

Figure CN122290339A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of intelligent transportation systems and machine learning, specifically relating to a method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections. Background Technology
[0002] Signalized intersections are critical nodes in urban transportation networks, and their traffic efficiency and safety directly impact the performance of the entire transportation system. Vehicle trajectory prediction, as one of the core technologies of intelligent transportation systems, provides crucial support for applications such as traffic signal optimization, autonomous driving path planning, and traffic conflict early warning. However, traffic flow at signalized intersections is highly dynamic, nonlinear, and strongly coupled. Vehicle operating states are influenced by various factors, including traffic light phases, interactions between vehicles, and road conditions, making trajectory prediction quite challenging.
[0003] Existing vehicle trajectory prediction methods are mainly divided into two categories: traditional dynamic models and data-driven models. Traditional dynamic models are based on vehicle kinematic equations and rely on precise vehicle parameters and environmental perception data, resulting in poor adaptability in complex traffic scenarios. Data-driven models, such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs), can learn trajectory features from large amounts of data, but they are significantly affected by data quality, leading to insufficient accuracy in predicting the trajectory of vehicles at future moments. In recent years, although some research has attempted to improve trajectory prediction models, such as the Physical Information Neural Network (PINN), which improves the model's rationality by embedding physical laws, its ability to fit multi-source discrete features such as vehicle type and conflict risk in traffic scenarios is limited. While models such as gradient boosting decision trees (GBDTs) are good at handling discrete features and nonlinear relationships, they lack constraints on the inherent physical laws of vehicle motion, resulting in poor stability of prediction accuracy. They are unable to accurately characterize the decision-making and motion processes of vehicles in highly dynamic and highly interactive scenarios at signalized intersections, especially failing to effectively respond to trajectory changes caused by sudden changes in risk states, thus limiting the overall accuracy and robustness of trajectory prediction. Summary of the Invention
[0004] To address the problems existing in the prior art, the purpose of this invention is to provide a method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections, thereby improving the accuracy and reliability of vehicle trajectory prediction at signalized intersections and providing technical support for intelligent traffic management.
[0005] The technical solution of this invention is: A method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections includes the following steps: Video data from signalized intersections is collected, trajectory parameters of each vehicle are extracted, and the data is cleaned and fused to construct a vehicle trajectory database for signalized intersections. This database obtains data on following vehicles, historical trajectory characteristics of vehicles, operational status characteristics, vehicle type, and peak hour information. Based on the data from following vehicles, obtain the time-based collision margin. TTC Indicators, and using the "cumulative probability partitioning method" to classify effective indicators. TTC The indicator data undergoes statistical processing to dynamically determine a uniformly applicable standard. TTC Risk thresholds are used to obtain the traffic conflict risk status of each vehicle in the database at each time stamp. Input the historical trajectory characteristics, operational status characteristics, traffic conflict risk status, vehicle type and peak hour information of each vehicle into the PINN-GBDT hybrid prediction model to obtain the future operational trajectory of each vehicle. The method for constructing the PINN-GBDT hybrid prediction model includes: Historical trajectory features, operational status features, traffic conflict risk status, vehicle type, and peak hour information of vehicles in the database are extracted as feature sets. The feature sets are then divided into training, validation, and test sets according to a certain ratio. The trajectory coordinates of vehicles in the next few frames are used as the prediction target, and the PINN-GBDT hybrid prediction model is trained by fusing the total vehicle loss function. The uncertainty quantification and effectiveness verification of the trajectory prediction data and the trained PINN-GBDT hybrid prediction model are performed based on the MC dropout method.
[0006] Preferably, the MC dropout method performs uncertainty quantification and validity verification on the trajectory prediction data and the trained PINN-GBDT hybrid prediction model, including: A dropout layer is implanted into the PINN-GBDT hybrid prediction model to construct a probabilistic prediction model; Based on the probabilistic prediction model, multiple rounds of Monte Carlo sampling are performed on each sample in the test set during the prediction phase to obtain batch prediction results; Based on the batch prediction results, the uncertainty of trajectory prediction is quantified and the prediction range of trajectory coordinates at future moments is constructed. The effectiveness of the uncertainty quantification results of the prediction interval is evaluated by using the prediction interval coverage (PICP) and prediction interval average width (PINAW) metrics.
[0007] Preferably, the effectiveness of uncertainty quantification results is evaluated using the Predicted Interval Coverage (PICP) and Predicted Interval Average Width (PINAW) metrics, including: Based on the mean and variance of the prediction results, a prediction interval with a specified confidence level is constructed for each prediction time. The prediction interval coverage (PICP) is calculated based on the proportion of the actual trajectory values of the test set samples that fall within the corresponding prediction interval. Based on the average of all predicted interval widths and after normalization, the average predicted interval width PINAW is obtained. If the PICP value is within the preset acceptable range and the PINAW value is less than the preset threshold, then the uncertainty quantification result is deemed valid.
[0008] 4. The method for predicting vehicle trajectory and analyzing uncertainty at a signalized intersection according to claim 1, characterized in that the vehicle trajectory parameters include the vehicle's two-dimensional world coordinates, instantaneous velocity, instantaneous acceleration, and heading angle; wherein the vehicle's two-dimensional world coordinates are obtained based on camera calibration results, and the instantaneous velocity, instantaneous acceleration, and heading angle are determined according to the following formulas: , , , in, Instantaneous velocity; It is instantaneous acceleration; For heading angle; The frame interval of the video; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; In a two-dimensional world coordinate system X Unit vector along the axial direction; In a two-dimensional world coordinate system Y The unit vector along the axis.
[0009] Preferably, the method for cleaning the vehicle trajectory parameters includes the following steps: Vehicle data with a trajectory duration shorter than a preset value is deleted. Outliers in velocity and acceleration are removed using the 3σ criterion, and missing values in the trajectory data are filled in using linear interpolation.
[0010] Preferably, the "cumulative probability partitioning method" is used for effective... TTC The methods for statistical processing of indicator data are as follows: Effective after cleaning treatment TTC Indicator data TTC ≥0 and TTC <∞, sort in ascending order, and then classify the risk level according to the cumulative probability. A cumulative probability of 15% is considered a high-risk threshold. TTC high A cumulative probability of 85% is considered a medium-risk threshold. TTC mid A cumulative probability of 85% or higher indicates low risk.
[0011] Preferably, the TTC The indicator data is determined according to the following formula: , in, , In the formula: TTC(t) for t Moment TTC Indicator data; for t The longitudinal distance between the following vehicle and the vehicle in front at any given time. , For the car in front Two-dimensional world coordinates at any given moment; , For the car behind Two-dimensional world coordinates at any given moment; For the car behind Instantaneous velocity at any moment; For the car in front Instantaneous velocity at any moment; This represents the speed limit threshold.
[0012] Preferably, the method for determining the traffic conflict risk status of the vehicle at each time point is as follows: If 0≤ TTC(t) < TTC high If so, the risk status is "high risk" and the label is 3; like TTC high ≤ TTC(t) < TTC mid If so, the risk status is "medium risk" and the label is 2; like TTC(t) ≥ TTC mid and TTC(t) If the value is less than ∞, the risk status is "low risk" and the label is 1. like TTC(t) <0 or TTC(t) If the value approaches infinity, the risk status becomes “no risk” and the label is 0.
[0013] Preferably, the PINN-GBDT hybrid prediction model includes a Physical Information Neural Network (PINN) sub-model and a Gradient Boosting Decision Tree (GBDT) sub-model. The PINN sub-model of the physical information neural network includes: The input layer is used to receive continuous features; The hidden layer contains three fully connected layers, with 128, 64, and 32 neurons in each fully connected layer, and the activation function is the ReLU function. The physical constraint embedding layer is used to incorporate the vehicle kinematics equations as constraints into the loss function during the training process of the PINN-GBDT hybrid prediction model. Its physical constraint loss is determined according to the following formula: , In the formula, The loss function; The instantaneous velocity component in the X direction predicted by the PINN-GBDT hybrid prediction model; The instantaneous velocity component in the Y direction predicted by the PINN-GBDT hybrid prediction model; , The coordinate values predicted by the PINN-GBDT hybrid prediction model. N This represents the number of training samples; This represents the time interval for vehicle trajectory parameters.
[0014] Preferably, the total vehicle loss function fused during the training of the PINN-GBDT hybrid prediction model is determined according to the following formula: , in, , In the formula, This is the total vehicle loss function for the PINN-GBDT hybrid prediction model; The loss is the mean squared error between the predicted and actual values. Loss due to physical constraints; These are the weighting coefficients; N This represents the number of training samples; , For vehicles in the future j The two-dimensional world coordinates at each moment, where t It is the current moment. j It is a future time step; , The PINN-GBDT hybrid prediction model predicts the vehicle's future... j Two-dimensional world coordinates at a given moment.
[0015] Compared with the prior art, the method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections of the present invention has the following advantages: This invention first collects and processes video data to construct a structured database that integrates multi-source information, fundamentally ensuring the quality and integrity of the model training data. Secondly, it dynamically determines a unified [database structure] using the proposed "cumulative probability partitioning method." TTC By establishing risk thresholds and identifying conflict states, a precise and universal assessment of vehicle risk states is achieved. Furthermore, a PINN-GBDT hybrid prediction model is constructed. This model embeds vehicle kinematic physical constraints into the PINN sub-model to ensure the rationality of the prediction, while utilizing the GBDT sub-model to efficiently process discrete features and fuse multi-source features for trajectory prediction. This improves prediction accuracy and enhances the model's adaptability to different traffic scenarios. In addition, the model is modified by introducing the MCDropout method and performs multiple rounds of Monte Carlo sampling during the prediction phase. The variance of the prediction results is used to quantify uncertainty, and the quantification effectiveness is evaluated using PICP and PINAW indices. This provides a reliable confidence judgment for the trajectory prediction results, significantly improving the accuracy, physical rationality, and reliability of vehicle trajectory prediction at signalized intersections. Attached Figure Description
[0016] Figure 1 This is a flowchart of the overall method in an embodiment of the present invention; Figure 2 This is an example of acquiring video data in an embodiment of the present invention; Figure 3 This is a distribution matrix diagram of the continuity parameters of vehicle operation characteristics at intersections in an embodiment of the present invention; Figure 4 This is a bar chart showing the frequency statistics of vehicle operation characteristic category parameters at intersections in an embodiment of the present invention. Figure 5 As described in the embodiments of the present invention TTC Cumulative distribution function graph; Figure 6 This is a comparison diagram of the actual trajectory and the predicted trajectory in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.
[0019] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0020] See Figure 1 As shown, in order to improve the accuracy and reliability of vehicle trajectory prediction at signalized intersections and provide technical support for intelligent traffic management, this embodiment provides a method for vehicle trajectory prediction and uncertainty analysis at signalized intersections, including the following steps: Step S1: Video acquisition at the intersection based on signal control using a high-precision camera High-precision industrial cameras will be deployed at key locations within the signalized intersection to ensure that the cameras cover all entrances, exits, and conflict zones. The specific data acquisition plan is as follows:
[0021] S1.1 Camera Parameter Configuration: A high-precision camera with a resolution of at least 3840×2160 (4K) and a frame rate of at least 25fps is selected. The lens focal length is adjusted according to the shooting distance to ensure that the vehicle's pixel ratio in the image is at least 5×5 pixels. The shutter speed is set to 1 / 500s to reduce motion blur. Automatic white balance and exposure compensation functions are enabled to adapt to different lighting conditions. The preferred camera resolution range is 3840×2160 to 7680×4320, covering all standard resolutions within this range, and the preferred frame rate range is 25fps to 60fps, covering all standard frame rates within this range.
[0022] S1.2 Camera Installation Locations: One main camera will be installed on a dedicated bracket above the center of the intersection, covering the entire intersection area. Auxiliary cameras will be installed 30m to 70m behind the stop lines of each approach lane to supplement the imagery of vehicles traveling in those lanes. The cameras should be installed at a height of at least 15m, preferably between 15m and 25m, ensuring both clear image capture and comprehensive coverage of the target area. The shooting angle should be 30° to 45° from the ground to ensure unobstructed views.
[0023] S1.3 Video Acquisition Process: Select two time periods for continuous acquisition: morning peak (7:00-9:00) and evening peak (17:00-19:00). The acquisition duration for each time period should be no less than 2 hours, and the general acquisition duration ranges from 2 to 4 hours. Video data is stored in MP4 format, and the file name format is "Intersection ID-Date-Time Period-Weather.mp4".
[0024] Step S2: Vehicle trajectory extraction at signal-controlled intersections based on DataFromSky DataFromSky software (a professional traffic analysis software platform mainly used to extract trajectory data of traffic participants such as vehicles and pedestrians from drone videos) was used to extract vehicle trajectory parameters from the video collected in step S1. The specific process is as follows: S2.1 Video Preprocessing: The acquired video is imported into DataFromSky software. First, image stabilization is performed to eliminate the impact of camera shake on trajectory extraction. Then, area calibration is performed to select the effective traffic area of the intersection and exclude non-vehicle driving areas such as sidewalks and green belts.
[0025] S2.2 Camera Calibration: The Zhang Zhengyou calibration method is adopted. By photographing the checkerboard calibration board, the intrinsic parameters of the camera, namely focal length, principal point coordinates, distortion coefficients, and extrinsic parameters, namely rotation matrix and translation vector, are obtained to complete the conversion between pixel coordinates and two-dimensional world coordinates. The two-dimensional world coordinate system takes the center of the intersection as the origin, the X-axis is along the east-west direction, the Y-axis is along the north-south direction, and the unit is meters.
[0026] S2.3 Vehicle Detection and Tracking: The vehicle detection module of DataFromSky is enabled, and the YOLOv8 target detection algorithm is used to identify vehicles in video frames and obtain the bounding box information x, y, w, h of the vehicles, where x and y are the pixel coordinates of the top left corner of the bounding box, and w and h are the width and height of the bounding box. The Kalman filter algorithm is used for vehicle tracking, and a unique track ID is assigned to each vehicle to ensure the continuity of the trajectory. During the tracking process, the minimum pixel area threshold of the vehicle is set to 25 pixels, and interference targets such as pedestrians and non-motorized vehicles are filtered out.
[0027] S2.4 Trajectory Parameter Calculation: Based on the camera calibration results, the pixel coordinates of the vehicle bounding box center are converted into two-dimensional world coordinates. X(t), Y(t) Based on the two-dimensional world coordinates of consecutive frames, calculate the vehicle's operating state parameters: instantaneous speed The calculation is performed using the two-point central difference method with second-order precision. The formula is as follows: , Instantaneous acceleration It is obtained by performing another "numerical difference" on the "numerical difference of position", and the formula is: , Heading angle The angle between the vehicle's direction of travel and the positive X-axis is expressed by the formula: , in, Instantaneous velocity; It is instantaneous acceleration; For heading angle; The frame interval of the video; , for The two-dimensional world coordinates of the vehicles at any given time, with the origin at the center of the signalized intersection. X The axis runs along the east-west direction. Y The axis runs along the north-south direction; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; In a two-dimensional world coordinate system X Unit vector along the axial direction; In a two-dimensional world coordinate system Y The unit vector along the axis.
[0028] S2.5 Trajectory Data Export: Export the extracted vehicle trajectory parameters as a CSV file, containing the following fields: frameID (frame number) and trackID (vehicle ID). t (timestamp) (Two-dimensional world coordinates in the X direction) (2D world coordinates in the Y direction) (Instantaneous velocity) (Instantaneous acceleration) (Heading angle), lane number.
[0029] Step S3: Construction of vehicle trajectory database for signalized intersections Based on the vehicle trajectory parameters exported in step S2, and combined with the data from the signalized intersection, a structured vehicle trajectory database for signalized intersections is constructed. The specific steps are as follows: S3.1 Data Cleaning: The following rules are used to filter invalid data: ① Delete vehicle data whose trajectory length is less than 30 frames (i.e., whose duration is less than a preset value) corresponding to the vehicle ID, to ensure the integrity of the trajectory; ②Use the 3σ criterion to eliminate speed acceleration Outliers, i.e., data that deviates from the mean by more than 3 standard deviations; ③ Fill in the missing values in the trajectory data using linear interpolation.
[0030] S3.2 Data Fusion: The cleaned trajectory data is fused with external data, with the timestamp as the fusion keyword. t The raw data is used as a database of vehicle trajectory at signalized intersections.
[0031] ① All variables in the original data are as follows: Track ID (vehicle ID); Type (vehicle type); Entrance (intersection entrance); Entry Time (vehicle entry time in seconds); Turn (driving direction: 1 straight, 2 right turn, 3 left turn); Exit Time (vehicle exit time in seconds); Traveled Distance (total distance traveled by the vehicle at the intersection in meters); Avg Speed (average vehicle speed in kilometers per hour); x (horizontal axis in meters); y (vertical axis in meters); Speed (instantaneous vehicle speed in kilometers per hour); Tan Acc (acceleration in meters per second). 2 ); Lat Acc (lateral acceleration m / s²) 2 ); Time (time s); Angle (turning angle rad); Session (morning and evening rush hours: V1, V2 are evening rush hours, V3, V4 are morning rush hours).
[0032] ②The names of all variables after cleaning are as follows: Vehicle ID; Vehicle Type; Intersection Entrance; Entry Time (s); Exit Time (s); Direction of Travel; Exit Time (s); Intersection Distance (m); Average Speed (km / h); Abscissa (m); ordinate (m); Instantaneous Speed (km / h); Acceleration (m / s²); Lateral Acceleration (m / s²); Time (s); Turning Angle (rad); Peak Hour.
[0033] S3.3 Descriptive Statistics: Perform statistical analysis on the constructed database data to generate descriptive statistical tables that reflect the distribution characteristics of the data, including following vehicle pairs data, historical trajectory characteristics of vehicles, operating status characteristics, vehicle type and peak period information.
[0034] Step S4: Based on TTC The cumulative probability classification of indicators is determined uniformly. TTC threshold Taking the car-following vehicle pairs (i.e., the preceding vehicle ID and the following vehicle ID) in the database constructed in step S3 as the research object, based on... TTC The statistical distribution characteristics of the indicators are dynamically determined using a "cumulative probability partitioning method based on 15% and 85%" and uniformly applicable methods. TTC Risk threshold, the core rule is: TTC An indicator less than 0 is considered risk-free; effective. TTC Indicator data TTC ≥0 and TTC When the probability is less than ∞, risk levels are determined by cumulative probability. A cumulative probability of 15% is considered high risk, 85% is considered medium risk, and 85% or higher is considered low risk. The specific steps are as follows: S4.1 Car-following vehicle pair screening: Within the same lane, screen car-following vehicle pairs that meet the following conditions to ensure data validity: the longitudinal distance between the following vehicle and the preceding vehicle is less than 50m, and the two vehicles are traveling in the same direction, i.e., the difference in heading angle is less than 10°; remove abnormal samples where the preceding or following vehicle is stationary, i.e., the speed is ≤0.5m / s, to avoid TTC calculation distortion.
[0035] S4.2 TTC Unified calculation of indicators: TTC This represents the shortest time required for a collision between the following vehicle and the preceding vehicle, given the following vehicle's current speed and acceleration, while the preceding vehicle maintains its current state of motion. The formula is as follows: , in, for t The longitudinal distance (in meters) between the following vehicle and the preceding vehicle at any given time is calculated as follows: , In the formula: TTC(t) for t Moment TTC Indicator data; for t The longitudinal distance between the following vehicle and the vehicle in front at any given time. , For the car in front Two-dimensional world coordinates at any given moment; , For the car behind Two-dimensional world coordinates at any given moment; For the car behind Instantaneous velocity at any moment; For the car in front Instantaneous velocity at any moment; The speed limit threshold, To avoid calculation errors caused by denominators being 0 or negative; and when the calculation result shows... TTC(t) When the value is less than 0, it is considered an abnormal calculation value and is directly judged as having no risk, and will not be included in subsequent valid data statistics.
[0036] S4.3 effective TTC Data filtering: Extract all data that meet the criteria TTC(t) ≥0 and TTC(t) Valid data <∞ constitutes TTC Valid dataset { TTC 1 TTC 2 ..., TTCn (n is the number of valid samples); the dataset is cleaned a second time using the 3σ criterion to remove outliers in velocity and acceleration that deviate from the mean by more than three standard deviations, ensuring the reasonableness of the data distribution; and each outlier is individually labeled. TTC(t) Samples with a value less than 0 are directly classified into the no-risk category.
[0037] S4.4 determines a uniform threshold based on cumulative probabilities of 15% and 85%: for effective cleaning... TTC Dataset (i.e.) TC ≥0 and TTC <∞) are sorted in ascending order, and thresholds for high-risk, medium-risk, and low-risk categories are determined based on the "cumulative probability" principle; first, sorting is performed to determine the effective TTC Sort the data in ascending order to get TTC ordered sequence TTC ≤ TTC≤... ≤TTC The corresponding cumulative probabilities are P=1 / n, P=2 / n, ..., P=n / n=100%; S4.5 percentile calculation: Based on the cumulative probability requirements, the 15th percentile value corresponding to a cumulative probability of 15% and the 85th percentile value corresponding to a cumulative probability of 85% are calculated respectively as the core risk threshold; the percentile calculation uses linear interpolation to ensure accuracy, and the result is rounded to one decimal place. S4.6 Threshold Definition: ① High-risk threshold TTC high Orderly TTC The 15th percentile value of the sequence, i.e., when the cumulative probability reaches 15%. TTC Values below this threshold are valid. TTC A data accumulation rate of 15% corresponds to a high collision risk, thus serving as a high-risk threshold. TTC high ; ②Medium risk threshold TTC mid Orderly TTC The 85th percentile value of the sequence, i.e., when the cumulative probability reaches 85%. TTC The effective value between this threshold and the high-risk threshold. TTC The cumulative data percentage is 70% (85%-15%), corresponding to a medium collision risk, which serves as the medium risk threshold. TTC mid ; ③ Low-risk zone: Effective TTC In the data, the cumulative probability reaches 85% or higher (i.e.) TTC≥TTC Of the 15% of the total, 15% represents a low collision risk. ④ Risk-free zone: All TTC(t)Samples <0, and TTC(t) →∞ (i.e.) ≤ (sample).
[0038] Step S5: Determine the traffic conflict risk status of the vehicle's trajectory based on the threshold. Based on the unified determination in step S4 TTC Risk threshold (including) TTC (Risk-free determination of <0), directly determining the traffic conflict risk status of each vehicle at each timett, without distinguishing vehicle speed groups. The specific rules are as follows: S5.1 Unified Threshold Judgment Rule: If 0 ≤ TTC(t) < TTC high (2.7s) then the risk status is "high risk", and the label is recorded as 3; S5.2 If TTC high (2.7s)≤ TTC(t) < TTC mid (9.2s) indicates a "medium risk" status, and the label is 2. S5.3 If TTC(t) ≥ TTC mid (9.2s) and TTC(t) If the value is less than ∞, the risk status is "low risk" and the label is 1. S5.4 If TTC(t) <0 or TTC(t) If the value is →∞, the risk status is "no risk" and the label is 0. The identified risk status labels are added to the vehicle trajectory data as one of the input features for subsequent models.
[0039] Step S6: Construct a vehicle trajectory prediction model based on the PINN-GBDT algorithm (i.e., the PINN-GBDT hybrid prediction model). By integrating data such as historical vehicle trajectory characteristics, operational status characteristics, traffic conflict risk status, vehicle type, and peak hour information, a hybrid prediction model based on PINN (Physical Information Neural Network) and GBDT is constructed to predict the future trajectories of vehicles at signalized intersections. The specific steps are as follows: S6.1 Feature Engineering 1. Extract input features and prediction targets from the database; 2. Input feature set X: includes the historical trajectory features of the first 60 frames of the dataset, vehicle operation status features, traffic conflict risk status features, that is, the historical trajectory of each frame (x, y coordinates), the operation status of each frame (speed, acceleration, turning angle), the risk level of each frame, vehicle type, peak time period, and other identifiers.
[0040] 3. Predicted target Y: The two-dimensional world coordinates of the vehicle in the next 20 frames.
[0041] 4. Standardize the input feature set X (subtract the mean and divide the standard deviation), and then divide it into training set, validation set and test set in a ratio of 7:2:1.
[0042] S6.2PINN-GBDT hybrid model structure 1. The model consists of a PINN sub-model and a GBDT sub-model, and adopts a structure of parallel feature extraction + fusion prediction.
[0043] 2. PINN Sub-model Structure Input layer: receives continuous features; Hidden layers: 3 fully connected layers, with 128, 64 and 32 neurons in each layer, respectively, and the ReLU activation function is used; Physical constraint embedding layer: The vehicle's kinematic equations (uniform linear motion equations and acceleration motion equations) are used as constraints in the loss function and embedded in the model training process; the kinematic constraint loss L is defined as: , In the formula, The loss function; The instantaneous velocity component in the X direction predicted by the PINN-GBDT hybrid prediction model; The instantaneous velocity component in the Y direction predicted by the PINN-GBDT hybrid prediction model; , The coordinate values predicted by the PINN-GBDT hybrid prediction model. N This represents the number of training samples; This represents the time interval for vehicle trajectory parameters.
[0044] PINN output layer: Outputs a 16-dimensional feature vector as a high-level representation of continuous features.
[0045] 3. GBDT Model Structure Input layer: receives discrete features; Model parameters: 100 decision trees, maximum tree depth of 6, learning rate of 0.1; GBDT output layer: Outputs an 8-dimensional feature vector as a high-level representation of discrete features.
[0046] 4. Feature Fusion and Output Layer: Feature fusion: The 16-dimensional features output by PINN are concatenated with the 8-dimensional features output by GBDT to obtain 24-dimensional fused features; Output layer: One fully connected layer with 6 neurons, using the Linear activation function, outputting the vehicle coordinates for the next 30 frames. (X(t+1),Y(t+1),X(t+2),Y(t+2),...,X(t+30),Y(t+30)) .
[0047] S6.3 Model Training The total vehicle loss function incorporated into model training is a weighted sum of the prediction loss L and the physical constraint loss L: , in, Weighting coefficients ( =0.7).
[0048] , In the formula, This is the total vehicle loss function for the PINN-GBDT hybrid prediction model; The loss is the mean squared error between the predicted and actual values. Loss due to physical constraints; These are the weighting coefficients; N This represents the number of training samples; , For vehicles in the future j The two-dimensional world coordinates at each moment, where t It is the current moment. j It is a future time step; , The PINN-GBDT hybrid prediction model predicts the vehicle's future... j Two-dimensional world coordinates at a given moment.
[0049] The model was trained using the Adam optimizer with a learning rate of 0.001 and 200 training epochs. After each training epoch, the loss was calculated using the validation set. Training was stopped and the optimal model parameters were saved when the validation loss did not decrease for 10 consecutive epochs.
[0050] Step S7: Uncertainty Analysis of Prediction Model Based on MC Dropout The output of the prediction model is subject to uncertainty, primarily stemming from data uncertainty such as acquisition noise and missing data, and model uncertainty such as differences in parameter initialization and model structure bias. To accurately quantify these two types of uncertainty and assess the confidence level of the prediction results, this invention employs the McLeod dropout method. By keeping the dropout layer active during the prediction phase and performing multiple samplings, it achieves efficient quantification of uncertainty. The detailed steps are as follows:
[0051] S7.1MC Dropout Adaptation Model Modification: Based on the structural characteristics of the PINN-GBDT hybrid model, a dropout layer is precisely implanted (dropout layer refers to a regularization technique used in neural network training to prevent overfitting; its core idea is to randomly "discard" (i.e., temporarily ignore) a portion of neurons in the neural network layer during model training) to construct a "probabilistic prediction model." The specific modification scheme is as follows:
[0052] ① After the three fully connected hidden layers (128, 64, and 32 neurons) of the PINN sub-model, add one dropout layer to each layer. After the 24-dimensional fused features output by the feature fusion module, add another dropout layer, for a total of four dropout layers. ② The dropout probability of all dropout layers is uniformly set to p=0.2 (it has been verified that this probability can effectively introduce reasonable randomness to simulate model uncertainty while preserving the model's representation of force). ③Key constraints: During the training phase, the dropout layer randomly discards neurons to prevent overfitting. During the prediction phase, the dropout layer is not turned off and the random dropping state is maintained, so that each forward propagation of the model corresponds to a different "sub-model", which provides a basis for subsequent Monte Carlo sampling.
[0053] S7.2 Multi-round Monte Carlo Sampling Implementation: Based on the modified probabilistic model, multiple rounds of independent forward propagation are performed on each sample in the test set to obtain batch prediction results and construct a statistical distribution.
[0054] ① Determining the number of samples: Let the number of samples be... T Balancing computational efficiency and quantization accuracy, the value is selected. T =100 ( T When the sampling count is ≥100, the sampling distribution tends to stabilize; further increasing the number of samplings has limited effect on improving accuracy but significantly increases computational cost. ②Sampling process: For a single test sample X Continuous execution T The second forward propagation yields... T Set of independent prediction results { Ŷ 1 ,Ŷ 2 ,...,Ŷ T The sampling result for the t-th time (t∈[1,T]) is: Ŷ=[Ŷ(t+1),Ŷ(t+2),Ŷ(t+3)] Decomposed into coordinate components: Ŷ(t+k)=[X̂(t+k),Ŷ(t+k)] ( k =1,2,3), corresponding to the predicted two-dimensional world coordinates in the X and Y directions at future times.
[0055] S7.3 Two-Dimensional Uncertainty Quantification Calculation: Based on TThe sampling results are quantified from two dimensions: "optimal predicted value" and "uncertainty intensity," with the core being the calculation of mean and variance.
[0056] S7.4 Optimal Prediction Value (Sample mean): using T The arithmetic mean of the group sampling results is used as the final prediction output. This mean can offset the random error of a single sampling, making it closer to the true trajectory. The calculation formula is:
[0057] , in, For the future The optimal predicted value at time 1. , The first t The second sampling obtained The predicted values of the X and Y coordinates at time 1. T =100 represents the number of samples.
[0058] like Figure 6 The image shown is a comparison chart of the actual trajectory and the predicted trajectory.
[0059] This figure consists of two sub-figures, using planar coordinates (X and Y coordinates, unit: meters) as the dimension, intuitively showing the comparison between the actual vehicle trajectory and the trajectory predicted by this invention. The solid blue line represents the actual vehicle trajectory, and the dashed red line represents the vehicle trajectory predicted by the method of this invention. Different markers (green, blue, and red) in the figure correspond to key nodes of the trajectory (such as the trajectory start and end points). The left sub-figure corresponds to a test scenario with a sample size of 4470, and the final displacement error (FDE) is 0.20 meters; the right sub-figure corresponds to a test scenario with a sample size of 8572, and the final displacement error (FDE) is 0.06 meters. In both scenarios, the spatial positions of the predicted and actual trajectories highly overlap, and the FDE indicators are both at low levels, fully verifying the high accuracy of the trajectory prediction method of this invention in intersection scenarios. This figure provides key evidence for verifying the effectiveness of the technical solution through a direct comparison of the actual trajectory and the predicted trajectory, as well as quantitative accuracy indicators. On the one hand, it clearly demonstrates the accurate fitting ability of the method of the present invention to the vehicle driving trajectory, proving that it can effectively capture the vehicle motion patterns in complex intersection scenarios. On the other hand, the low FDE index directly reflects the prediction accuracy advantage of the technical solution, providing data support for core innovations such as vehicle safety decision-making and efficient management of traffic systems.
[0060] S7.5 Uncertainty Intensity (Sampling Variance): The sample variance is used to quantify prediction uncertainty. A larger variance indicates higher dispersion in the prediction results of different "sub-models," stronger uncertainty, and lower prediction confidence; conversely, a smaller variance indicates weaker uncertainty. The calculation formula is:
[0061] , , in, For the future The variance of the prediction results at each time point (a core indicator of uncertainty). Standard deviation; For the future The optimal prediction value at each time point. For the first t The second sampling obtained Predicted X and Y coordinates at time 1. The denominator is taken as... T- 1. This is to ensure the unbiasedness of the variance estimate and avoid underestimation due to a finite number of samplings. It can be further decomposed into uncertainties in the X and Y directions:
[0062] , , in, For the future The variance of the prediction result in the X-coordinate at each time point, For the future The variance of the prediction result in the Y-coordinate at each time point. , The first t The second sampling obtained Predicted X and Y coordinates at time. , Each of the future The optimal predicted values of the X and Y coordinates at each time point.
[0063] By identifying the uncertainties in the components, the differences in confidence levels of trajectories in different directions can be clarified, providing a more refined basis for traffic control decisions.
[0064] S7.6 Evaluation of the Validity of Uncertainty Quantification: Two core indicators are introduced: Prediction Interval Coverage (PICP) and Prediction Interval Average Width (PINAW). The reliability of the uncertainty quantification results is evaluated from two dimensions: "accuracy" and "compactness". The specific calculation and judgment criteria are as follows: ① Construction of Prediction Interval (PI): Based on the assumption of normal distribution, a prediction interval is constructed using a 95% confidence level. The formula is as follows: , Where 1.96 is the quantile corresponding to the 95% confidence level of the standard normal distribution. for The 95% confidence interval for the predicted value at time point is determined by the upper and lower limits of the interval, which are determined by the best predicted value and the standard deviation, respectively.
[0065] ②Predicted interval coverage ( PICP ): This measures the proportion of samples whose true values fall within the predicted interval. It is a core indicator for evaluating the accuracy of quantification, with an ideal value of 95% (matching the confidence level). The calculation formula is:
[0066] , in, M The number of samples in the test set. For the first Sample The actual trajectory value at any given moment. For the first Sample The prediction interval for time. [·] indicates an indicator function (when the condition inside the brackets is true). =1, otherwise =0); denominator M ×3 is because each sample corresponds to the prediction results for 3 future times, and the coverage of all times needs to be considered. Judgment criterion: PICP ∈ [93%, 97%] is considered acceptable, indicating that the uncertainty quantification results are reliable.
[0067] ③ Average width of the prediction interval ( PINAW ): This measures the average width of the prediction intervals for all samples and is an indicator of quantification tightness (the smaller the width, the higher the accuracy of the prediction). The calculation formula is:
[0068] , in, , The first Sample Predict the upper and lower limits of the interval at any time. , These represent the maximum and minimum values of all trajectory values in the test set, respectively. To achieve width normalization and eliminate the influence of dimensions. Judgment criteria: PINAW The smaller the better, and it needs to be compatible with PICP Collaborative consideration (avoiding the pursuit of narrow intervals leading to...) PICP Too low).
[0069] ④ Interpretation of results: If PICP It meets the confidence requirement of approximately 95%, and PINAW is at a low levelThis demonstrates that the MC dropout uncertainty quantification method of the present invention is effective and can be achieved through... σ ( )and PI ( This provides a reliable confidence level reference for trajectory prediction results; if PICP Below 93%, adjustment is needed. dropout Probability or increasing the number of samples T ;like PINAW If the value is too large, the model structure needs to be optimized to improve prediction stability.
[0070] Compared with the prior art, the present invention has the following beneficial effects: 1. Trajectory Data Acquisition and Database Construction Standards: High-precision cameras are used to acquire video over multiple time periods. Combined with Datafromsky software, high-precision trajectory extraction is achieved, and a structured database containing trajectories, vehicle conflict risks, different vehicle types, and different time periods during morning and evening rush hours is constructed to provide high-quality data support for model training. The data cleaning and fusion process ensures the integrity and validity of the data.
[0071] 2. TTC Threshold determination is dynamic and precise: a unified threshold based on cumulative probability division of 15% and 85% is proposed. TTC Threshold determination method, simultaneously incorporated TTC The rule for determining outliers with values <0 as risk-free overcomes the problem of poor adaptability of the traditional empirical threshold method and improves the accuracy and universality of traffic conflict risk level assessment.
[0072] 3. Prediction model integrates physical laws and multi-source features: A PINN-GBDT hybrid model is constructed. The PINN sub-model embeds vehicle kinematic constraints to ensure the physical rationality of the prediction results; the GBDT sub-model is good at handling discrete features and effectively captures the influence of risk state and traffic light state on the trajectory; the hybrid structure takes into account the extraction of continuous and discrete features, improving the accuracy and stability of trajectory prediction.
[0073] 4. Highly targeted uncertainty analysis: The MC dropout method is applied to the PINN-XGBoost model, and the uncertainty prediction is quantified through Monte Carlo sampling. PICP and PINAW The evaluation of the uncertainty quantification effect provides a basis for judging the confidence level of trajectory prediction results, thereby improving the reliability and practicality of the prediction results.
[0074] The following detailed explanation, using specific examples, illustrates the vehicle trajectory prediction and uncertainty analysis method for signalized intersections provided by this invention.
[0075] Case 1 This case study takes the signalized intersection on Wenyi Road in Xi'an as the research object, and implements a vehicle trajectory prediction and uncertainty analysis method based on vehicle operating status, conflict risk, and the PINN-GBDT model. The specific steps are as follows: 1. Video Acquisition: One 4K high-precision camera (3840×2160 resolution, 25fps) will be deployed on a building 18m above the center of the intersection. One auxiliary camera will be deployed 50m behind the stop lines of each of the four approach lanes (east, south, west, and north) for video acquisition. Acquisition will be conducted during the morning rush hour (7:00-9:00) and the evening rush hour (17:00-19:00), with each period lasting 2 hours. The acquired video data is as follows: Figure 2 As shown.
[0076] 2. Trajectory Extraction: Import the acquired video into DataFromSky software, perform image stabilization processing, and select the effective traffic area of the intersection; use Zhang Zhengyou calibration method to complete camera calibration, with pixel coordinate and 2D world coordinate conversion error less than 0.1m; enable YOLOv8 vehicle detection and Kalman filter tracking, extract vehicle trajectory parameters, and export CSV format data.
[0077] 3. Database Construction The exported trajectory data was cleaned as follows: data with a trajectory length of less than 30 frames was deleted; outliers in velocity and acceleration were removed using the 3σ criterion; and missing values were filled using linear interpolation. The cleaned trajectory data was then fused with traffic light data and environmental data to construct a database. The cleaned variables are shown in Table 1. The descriptive statistical results are shown in Tables 2 and 3. Figure 3 and Figure 4 These are a distribution matrix of continuous parameters of vehicle operation characteristics at intersections and a bar chart of frequency statistics of vehicle operation characteristic category parameters at intersections.
[0078] Table 1. Comparison of Variable Names Before and After Variable Cleaning Table 2. Descriptive Statistics of Continuous Variable Data on Vehicle Trajectory at Signalized Intersections Table 3. Descriptive Statistics of Vehicle Trajectory Categories at Signalized Intersections Among them, such as Figure 3 The diagram shows the distribution matrix of continuous parameters for vehicle operation characteristics at the intersection. This matrix is constructed based on measured vehicle trajectory data at intersections and consists of 11 distribution histogram subgraphs. Each subgraph corresponds to the key continuous driving characteristic parameters of vehicles in the intersection scenario. The statistical frequency distribution intuitively reveals the driving behavior patterns of vehicles within the intersection. The distribution maps of entry time (s) and exit time (s) both exhibit a periodic multi-peak distribution, reflecting a clear temporal rhythm in vehicle arrival at the intersection entrance and departure at the exit. The peak exit time lags slightly behind the entry time, reflecting the time consumption characteristics of vehicles traveling within the intersection. The distribution map of intersection travel distance (m) shows a single-peak concentrated distribution, with samples mainly concentrated in the 25-35 meter range, peaking at approximately 30 meters. This indicates that the travel trajectory length of vehicles within the intersection is relatively concentrated and highly correlated with the intersection's geometric design and mainstream traffic paths. The distribution map of average speed (km / h) shows a single-peak shape, concentrated in the 10-20 km / h range, with a peak at approximately 15 km / h. This reflects that the average travel speed of vehicles within the intersection is at a low level, directly reflecting the intersection's traffic efficiency characteristics. The horizontal axis (m) distribution map shows a bi-peak distribution, with peaks at approximately 0 meters and 20 meters, corresponding to different lateral travel positions of vehicles within the intersection, directly related to the intersection's lane design. The vertical axis (m) The m) distribution map shows a right-skewed distribution, with samples mainly concentrated in the range of -25 meters to 0 meters, reflecting the longitudinal position distribution characteristics of vehicles within the intersection, which is closely related to the layout of the approach lanes and the driving path. The instantaneous speed (km / h) distribution map also shows a right-skewed distribution, with samples concentrated in the range of 0 km / h to 20 km / h, and a peak value of approximately 10 km / h, indicating that vehicles are mostly in a low-speed state during their journey within the intersection, with significant speed fluctuations. The acceleration (m / s²) and lateral acceleration (m / s²) distribution maps both show a single-peak normal distribution, with peak values concentrated near the 0 value, indicating that the acceleration, deceleration, and lateral control behavior of vehicles within the intersection is generally relatively smooth, with prominent driving smoothness characteristics. The time (s) distribution map is similar to the entrance time distribution, showing a periodic multi-peak shape, reflecting that the total driving time of vehicles within the intersection has a periodic characteristic consistent with the arrival rhythm. The turning angle (rad) distribution map shows a multi-peak distribution, indicating that the turning behavior of vehicles within the intersection is mainly straight-ahead and large-angle turns, which is highly consistent with the mainstream traffic direction of the intersection. Overall, this graph, through statistical analysis of vehicle trajectory data at intersections, systematically reveals the core patterns of central tendency, dispersion, periodicity, and distribution of various continuous characteristic parameters of vehicles traveling within intersections. The graph shows that: firstly, it verifies the adaptability of the technical solution to actual intersection scenarios, ensuring that the solution can effectively address the periodicity of vehicle arrivals, the fluctuation of driving speeds, and the diversity of turning behaviors; secondly, it provides statistical basis for setting thresholds for technical parameters, model training, and algorithm optimization, improving the rationality and effectiveness of the solution.
[0079] like Figure 4 The bar chart shown here displays the frequency statistics of vehicle operation characteristic category parameters at the intersection. This graph is constructed based on measured vehicle trajectory data at intersections and consists of four frequency distribution bar chart subgraphs. Each subgraph corresponds to the key classification attributes of vehicles in the intersection scenario. By statistically analyzing the number and proportion of samples in each category, the structural characteristics and behavioral patterns of vehicle traffic at intersections are intuitively revealed. The frequency distribution histogram of travel directions shows that the straight-ahead direction had 245,364 samples, accounting for 69.0%, while the right-turn and left-turn directions had 51,798 samples (14.6%) and 58,458 samples (16.4%), respectively. This indicates that straight-ahead travel is the main flow direction at this intersection, accounting for nearly 70%, while the demand for left-turn and right-turn traffic is similar. The overall flow direction structure is highly consistent with the intersection's geometric design and traffic organization. The frequency distribution histogram of vehicle types shows that motorcycles had 188,048 samples, accounting for 52.9%, cars had 153,379 samples, accounting for 43.1%, bicycles had 7,684 samples (2.2%), and buses had 6,509 samples (1.8%), respectively. This indicates that motorcycles and cars are the main vehicles at this intersection, accounting for over 96% combined, while non-motorized vehicles and buses have extremely low proportions, reflecting... The traffic composition at this intersection is primarily composed of motor vehicles, especially two-wheeled vehicles and cars. The frequency distribution bar chart during peak hours shows that the sample size during the morning peak was 162,032 (45.6%), while the sample size during the evening peak was 193,588 (54.4%). The evening peak sample size is slightly higher than the morning peak, indicating that the intersection experiences greater traffic pressure during the evening peak, and the vehicle aggregation characteristics are more pronounced during the evening peak. The risk level frequency distribution bar chart shows that the number of risk-free samples was 239,577 (67.4%), while the sample sizes for low-risk, medium-risk, and high-risk levels were 33,673 (9.5%), 68,951 (19.4%), and 13,419 (3.8%), respectively. The proportion of risk-free samples exceeded two-thirds, medium-risk samples nearly 20%, and high-risk samples were the lowest. This indicates that the overall traffic risk at the intersection is controllable, but a certain proportion of medium- and high-risk scenarios still exist, providing clear data guidance for the formulation of risk management strategies. Overall, this bar chart matrix presents the structural characteristics of vehicles in terms of driving direction, vehicle type composition, time period distribution, and risk level by classifying and statistically analyzing the vehicle trajectory data at intersections.
[0080] 4. TTC Threshold Determination Filter pairs of vehicles following each other in the same lane and calculate. TTC Indicators; Elimination TTC Abnormal samples with values less than 0 are valid. TTC data( TTCFor values ≥0 and <∞), the values were cleaned using the 3σ criterion and sorted in ascending order. A unified threshold was determined based on the cumulative probability division method of 15% and 85%, and the results are shown in Table 4 (high risk ≤2.7s, medium risk 2.7~9.2s, low risk ≥9.2s).
[0081] Table 4. Classification based on cumulative probabilities of 15% and 85%. TTC Risk threshold like Figure 5 As shown, TTC Accumulation Distribution function graph; This graph is constructed based on data from actual measurements of following vehicles at intersections, with collision time as the criterion. TTC The graph is plotted with seconds on the horizontal axis and cumulative probability (%) on the vertical axis, presented by the blue cumulative distribution curve. TTC The statistical distribution characteristics of the indicators were analyzed, and the "15% and 85% cumulative probability division method" was used to dynamically determine the TTC risk threshold applicable to this scenario. The figure clearly marks key cumulative probability quantiles such as 5% (1.68s), 15% (2.67s), 50% (4.42s), 85% (9.23s), and 90% (15.86s). The red dashed line corresponds to the 15% quantile at 2.67 seconds, representing a high-risk threshold, while the green dashed line corresponds to the 85% quantile at 9.23 seconds, representing a medium-risk threshold. The cumulative distribution curve is shown in the figure. TTC The steep slope in the less than 5-second interval indicates that TTC (Traffic Traction Control) is at a low level in most car-following scenarios, and the collision risk is relatively concentrated. TTC Increasing the slope of the curve makes it gentler, higher TTC As the proportion of scenarios gradually decreases, this figure provides a quantitative basis for technical solutions such as intersection following decision optimization, safety control, and risk warning through cumulative distribution analysis and dynamic threshold division.
[0082] 5. Risk Status Assessment According to the unified table 3 TTC Thresholds are used to determine the risk status label of each vehicle at each time point. For example, a following vehicle... TTC =2.5s, falling within 1.8s≤ TTC Within a range of <4.9s, the risk status label is 2 (medium risk); if a following vehicle TTC =0.3s, directly judged as no risk, the label is recorded as 0, and the obtained risk status label is integrated into the cleaned data to obtain a data of integrated risk status.
[0083] 6. Model Training and Prediction By integrating vehicle operating status and conflict risk status data, a hybrid prediction model based on PINN (Physical Information Neural Network) and GBDT is constructed to predict the future trajectories of vehicles at signalized intersections. The specific steps are as follows: 6.1 Feature Engineering 1. Extract input features and prediction targets from the database; 2. Input feature set X: includes the historical trajectory features of the first 60 frames of the dataset, vehicle operation status features, conflict risk features, i.e., the historical trajectory of each frame (x, y coordinates), the operation status of each frame (speed, acceleration, turning angle), the risk level of each frame, vehicle type, peak time period, and other identifiers.
[0084] 3. Predicted target Y: The two-dimensional world coordinates of the vehicle in the next 20 frames.
[0085] 4. Standardize the input feature set X (subtract the mean and divide the standard deviation), and then divide it into training set, validation set and test set in a ratio of 7:2:1.
[0086] 6.2 Establishing a trajectory prediction model using the PINN physical constraint method Physical constraint embedding layer: 1. The vehicle's kinematic equations, namely the equations of uniform linear motion and acceleration motion, are used as constraints in the loss function and embedded in the model training process; kinematic constraint loss. L Defined as: , In the formula, The loss function; The instantaneous velocity component in the X direction predicted by the PINN-GBDT hybrid prediction model; The instantaneous velocity component in the Y direction predicted by the PINN-GBDT hybrid prediction model; , The coordinate values predicted by the PINN-GBDT hybrid prediction model. N This represents the number of training samples; This represents the time interval for vehicle trajectory parameters.
[0087] 2. Positional Relationship Constraints: , , 3. Velocity relationship constraints: , The parameter settings for the model are shown in Table 5.
[0088] Table 5 PINN Physical Constraint Modeling Parameter Settings The evaluation results of the established PINN trajectory prediction model are shown in Table 6.
[0089] Table 6 PINN Physical Constraint Trajectory Prediction Indicators 6.3 Establishing a vehicle trajectory prediction model using the GBDT model The GBDT model in machine learning was used to construct the vehicle trajectory prediction model. The parameter settings are shown in Table 7, and the evaluation results are shown in Table 8.
[0090] Table 7 GBDT Modeling Parameter Settings Table 8 GBDT Model Trajectory Prediction Indicators 6.4 PINN-GBDT Hybrid Model Structure After extracting historical trajectory features and prediction targets, they were standardized and divided into training, validation, and test sets in a 7:2:1 ratio. A PINN-GBDT hybrid model was constructed, with the PINN sub-model having 128, 64, and 32 neurons in the hidden layer, and the GBDT sub-model having 100 decision trees with a maximum depth of 6. The Adam optimizer was used for 200 training rounds, with a total loss function weight α=0.7. After training, predictions were made using the test set to obtain the predicted values of future vehicle coordinates. The parameter settings are shown in Table 9, and the evaluation results are shown in Table 10.
[0091] Table 9 PINN-GBDT Physical Constraint Modeling Parameter Settings Table 10 PINN-GBDT Physical Constraint Trajectory Prediction Indicators Table 11 Comparison of the performance of the three models in predicting the x-axis. Table 12 Comparison of the performance of the three models in predicting the horizontal axis (y). 7. Uncertainty Analysis A dropout layer (probability 0.2) was added to the hidden layer and feature fusion layer of the PINN sub-model. For each sample in the test set, 100 forward propagations were performed, and the prediction mean and variance were calculated. A 95% prediction interval was constructed, and the calculated PICP = 99.7%, exceeding the ideal value of 95%, and the PINAW = 0.0483m, which is relatively small, indicating that the uncertainty quantification is effective. Experimental results show that the prediction interval coverage of the model in this invention reaches 99.7%, accurately quantifying prediction uncertainty and providing reliable trajectory prediction results for traffic control.
[0092] Table 13 Summary of Uncertainty Analysis Indicators Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections, characterized in that, Includes the following steps: Video data from signalized intersections is collected, trajectory parameters of each vehicle are extracted, and the data is cleaned and fused to construct a vehicle trajectory database for signalized intersections. This database obtains data on following vehicles, historical trajectory characteristics of vehicles, operational status characteristics, vehicle type, and peak hour information. Based on the data from following vehicles, obtain the time-based collision margin. TTC Indicators, and using the "cumulative probability partitioning method" to classify effective indicators. TTC The indicator data undergoes statistical processing to dynamically determine a uniformly applicable standard. TTC Risk thresholds are used to obtain the traffic conflict risk status of each vehicle in the database at each time stamp. Input the historical trajectory characteristics, operational status characteristics, traffic conflict risk status, vehicle type and peak hour information of each vehicle into the PINN-GBDT hybrid prediction model to obtain the future operational trajectory of each vehicle. The method for constructing the PINN-GBDT hybrid prediction model includes: Historical trajectory features, operational status features, traffic conflict risk status, vehicle type, and peak hour information of vehicles in the database are extracted as feature sets. The feature sets are then divided into training, validation, and test sets according to a certain ratio. The trajectory coordinates of vehicles in the next few frames are used as the prediction target, and the PINN-GBDT hybrid prediction model is trained by fusing the total vehicle loss function. The uncertainty quantification and effectiveness verification of the trajectory prediction data and the trained PINN-GBDT hybrid prediction model are performed based on the MC dropout method.
2. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 1, characterized in that, The MC dropout method performs uncertainty quantification and effectiveness verification on the trajectory prediction data and the trained PINN-GBDT hybrid prediction model, including: A dropout layer is implanted into the PINN-GBDT hybrid prediction model to construct a probabilistic prediction model; Based on the probabilistic prediction model, multiple rounds of Monte Carlo sampling are performed on each sample in the test set during the prediction phase to obtain batch prediction results; Based on the batch prediction results, the uncertainty of trajectory prediction is quantified and the prediction range of trajectory coordinates at future moments is constructed. The effectiveness of the uncertainty quantification results of the prediction interval is evaluated by using the prediction interval coverage (PICP) and prediction interval average width (PINAW) metrics.
3. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 2, characterized in that, The effectiveness of uncertainty quantification results is evaluated using the Predicted Interval Coverage (PICP) and Predicted Interval Average Width (PINAW) metrics, including: Based on the mean and variance of the prediction results, a prediction interval with a specified confidence level is constructed for each prediction time. The prediction interval coverage (PICP) is calculated based on the proportion of the actual trajectory values of the test set samples that fall within the corresponding prediction interval. Based on the average of all predicted interval widths and after normalization, the average predicted interval width PINAW is obtained. If the PICP value is within the preset acceptable range and the PINAW value is less than the preset threshold, then the uncertainty quantification result is deemed valid.
4. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 1, characterized in that, The vehicle trajectory parameters include the vehicle's two-dimensional world coordinates, instantaneous velocity, instantaneous acceleration, and heading angle; wherein the vehicle's two-dimensional world coordinates are obtained based on camera calibration results, and the instantaneous velocity, instantaneous acceleration, and heading angle are determined according to the following formulas: , , , in, Instantaneous velocity; It is instantaneous acceleration; For heading angle; The frame interval of the video; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; , for The two-dimensional world coordinates of the vehicle at any given moment; In a two-dimensional world coordinate system X Unit vector along the axial direction; In a two-dimensional world coordinate system Y The unit vector along the axis.
5. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 1, characterized in that, The method for cleaning the vehicle trajectory parameters includes the following steps: Vehicle data with a trajectory duration shorter than a preset value is deleted. Outliers in velocity and acceleration are removed using the 3σ criterion, and missing values in the trajectory data are filled in using linear interpolation.
6. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 1, characterized in that, The "cumulative probability partitioning method" is used to evaluate the effectiveness. TTC The methods for statistical processing of indicator data are as follows: Effective after cleaning treatment TTC Indicator data TTC ≥0 and TTC <∞, sort in ascending order, and then classify the risk level according to the cumulative probability. A cumulative probability of 15% is considered a high-risk threshold. TTC high A cumulative probability of 85% is considered a medium-risk threshold. TTC mid A cumulative probability of 85% or higher indicates low risk.
7. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 6, characterized in that, The TTC The indicator data is determined according to the following formula: , in, , In the formula: TTC(t) for t Moment TTC Indicator data; for t The longitudinal distance between the following vehicle and the vehicle in front at any given time. , For the car in front Two-dimensional world coordinates at any given moment; , For the car behind Two-dimensional world coordinates at any given moment; For the car behind Instantaneous velocity at any moment; For the car in front Instantaneous velocity at any moment; This represents the speed limit threshold.
8. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 7, characterized in that, The method for determining the traffic conflict risk status of vehicles at each time point is as follows: If 0≤ TTC(t) < TTC high If so, the risk status is "high risk" and the label is 3; like TTC high ≤ TTC(t) < TTC mid If so, the risk status is "medium risk" and the label is 2; like TTC(t) ≥ TTC mid and TTC(t) If the value is less than ∞, the risk status is "low risk" and the label is 1. like TTC(t) <0 or TTC(t) If the value approaches infinity, the risk status becomes "no risk" and the label is 0.
9. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 1, characterized in that, The PINN-GBDT hybrid prediction model includes a Physical Information Neural Network (PINN) sub-model and a Gradient Boosting Decision Tree (GBDT) sub-model. The PINN sub-model of the physical information neural network includes: The input layer is used to receive continuous features; The hidden layer contains three fully connected layers, with 128, 64, and 32 neurons in each fully connected layer, and the activation function is the ReLU function. The physical constraint embedding layer is used to incorporate the vehicle kinematics equations as constraints into the loss function during the training process of the PINN-GBDT hybrid prediction model. Its physical constraint loss is determined according to the following formula: , In the formula, The loss function; The instantaneous velocity component in the X direction predicted by the PINN-GBDT hybrid prediction model; The instantaneous velocity component in the Y direction predicted by the PINN-GBDT hybrid prediction model; , The coordinate values predicted by the PINN-GBDT hybrid prediction model. N This represents the number of training samples; This represents the time interval for vehicle trajectory parameters.
10. The method for predicting vehicle trajectories and analyzing uncertainties at signalized intersections according to claim 8, characterized in that, The total vehicle loss function fused during the training of the PINN-GBDT hybrid prediction model is determined according to the following formula: , in, , In the formula, This is the total vehicle loss function for the PINN-GBDT hybrid prediction model; The loss is the mean squared error between the predicted and actual values. Loss due to physical constraints; These are the weighting coefficients; N This represents the number of training samples; , For vehicles in the future j The two-dimensional world coordinates at each moment, where t It is the current moment. j It is a future time step; , The PINN-GBDT hybrid prediction model predicts the vehicle's future... j Two-dimensional world coordinates at a given moment.