Vehicle short-term trajectory prediction method, system, device and medium
By dynamically acquiring and predicting yaw angular velocity and yaw angle, combined with vehicle speed and steering curvature, and using polar coordinate conversion and maximum curvature limit, the accuracy and safety problems of short-term vehicle trajectory prediction in the existing technology are solved and improved. Forecast reliability and stability.
Patent Information
- Application Number
- CN202411079403.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-18
AI Technical Summary
Existing vehicle short-term trajectory prediction technology reduces prediction accuracy in conditions such as sideslip or large speed changes, and does not consider the maximum curvature limit of the trajectory, which may lead to increased safety risks.
By obtaining the initial yaw angular velocity and accumulated steering curvature change values, the yaw angular velocity and yaw angle are predicted, and the calculation mode is dynamically selected based on the current speed of the vehicle. The polar coordinate system is used to describe the local trajectory and converted to global Cartesian coordinates to limit the maximum trajectory. curvature to avoid unrealistic predictions.
It improves the accuracy and safety of trajectory prediction, ensures accurate prediction at different speeds, reduces error accumulation and discontinuity problems, and enhances the stability and safety of vehicle driving.
Smart Images

Figure CN118790262A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of assisted driving and relates to a method, system, device and medium for predicting a short-term trajectory of a vehicle. Background Art
[0002] In existing vehicle short-term trajectory prediction technologies, most systems rely on static parameter settings, such as fixed steering curvature and yaw rate, to estimate the future position of the vehicle and use the center of the vehicle as the origin for trajectory prediction in each cycle. This approach often lacks flexibility and accuracy when dealing with variable speeds or complex road conditions. Especially under low-speed and high-speed conditions, the dynamic response of the vehicle varies significantly, and static models are difficult to effectively adapt to these changes, resulting in insufficient prediction accuracy. In addition, traditional algorithms usually do not consider the maximum curvature limit of the trajectory, which may cause the predicted trajectory to be physically infeasible or increase safety risks, especially in emergency obstacle avoidance or complex traffic scenarios, as follows:
[0003] Existing short-term vehicle trajectory prediction technology lacks speed adaptability: Existing short-term trajectory prediction systems usually use static models, which perform inconsistently at different speeds. At low speeds, the yaw rate is mainly affected by the steering system, while at medium and high speeds, the vehicle behavior may be affected by side slip and aerodynamic effects, resulting in reduced prediction accuracy in conditions such as side slip or large speed changes.
[0004] The existing short-term vehicle trajectory prediction technology does not handle the coordinate system conversion process well: the trajectory prediction accuracy is highly dependent on the accurate conversion from the local coordinate system to the global coordinate system. This means that the calculated trajectory can reflect the actual movement path of the vehicle in the entire driving environment, rather than being limited to a local perspective. The existing short-term trajectory prediction usually uses a simplified model, with the vehicle as the center for prediction in each cycle, and the trajectory is discontinuous, resulting in inaccurate prediction trajectories.
[0005] Existing vehicle short-term trajectory prediction technology has yaw angle limit protection: when a sensor fails, the existing technology may incorrectly predict the trajectory when processing abnormally large yaw rate information, resulting in serious consequences.
[0006] In summary, the existing vehicle short-term trajectory prediction technology of the present invention has reduced prediction accuracy in conditions such as sideslip or large speed changes, and the predicted trajectory is inaccurate. It may incorrectly predict the trajectory when processing abnormally large yaw rate information. Summary of the invention
[0007] In order to overcome the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a vehicle short-term trajectory prediction method, system, device and medium, which can realize the prediction of vehicle short-term trajectory and improve the accuracy of trajectory prediction.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] In a first aspect, the present invention provides a method for predicting a short-term trajectory of a vehicle, comprising the following steps:
[0010] Obtain the initial yaw rate according to the current vehicle speed;
[0011] Obtain the cumulative steering curvature change value based on the number of steps in the for loop, the prediction time step, the total time of the steering change, and the rate of change of the steering curvature;
[0012] Obtaining a predicted yaw rate according to the initial yaw rate and the accumulated steering curvature change value, and obtaining a total yaw angle according to the predicted yaw rate;
[0013] Predict the coordinates of the short-term trajectory based on the total yaw angle and the current position coordinates.
[0014] In a second aspect, the present invention provides a vehicle short-term trajectory prediction system, comprising:
[0015] Initial yaw angle acquisition module: used to obtain the initial yaw angle velocity according to the current vehicle speed;
[0016] Curvature change value acquisition module: used to obtain the cumulative steering curvature change value according to the number of steps in the for loop, the prediction time step, the total time of the steering change and the change rate of the steering curvature;
[0017] Yaw angle acquisition module: used to obtain the predicted yaw angle velocity according to the initial yaw angle velocity and the cumulative steering curvature change value, and obtain the total yaw angle according to the predicted yaw angle velocity;
[0018] Trajectory coordinate acquisition module: used to predict the coordinates of the short-term trajectory based on the total yaw angle and current position coordinates.
[0019] In a third aspect, the present invention provides an electronic device, comprising: a processor; a memory, the electronic device being used to store computer program instructions; and a memory being used to implement the steps of a vehicle short-term trajectory prediction method when executing the computer program.
[0020] In a fourth aspect, the present invention provides a storage medium storing computer program instructions. When the computer program instructions are loaded and executed by a processor, the processor executes a vehicle short-term trajectory prediction method.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] 1. The method of the present invention obtains the initial yaw rate according to the current vehicle speed, and the introduction of the initial value of the yaw rate is conducive to improving the accuracy of the trajectory prediction of the present invention at medium and high speeds; the cumulative steering curvature change value is obtained according to the number of steps of the for loop, the prediction time step, the total time of the steering change, and the rate of change of the steering curvature, which is conducive to improving the accuracy of the trajectory prediction at low speeds; the predicted yaw rate is obtained according to the initial yaw rate and the cumulative steering curvature change value, and the total yaw angle is obtained according to the predicted yaw rate. In the medium speed area, the trajectory is predicted by combining the yaw rate and the steering curvature, which is conducive to improving the accuracy of the trajectory prediction at medium speeds; the coordinates of the short-term trajectory are predicted according to the total yaw angle and the current position coordinates. The present invention combines the yaw rate and the steering curvature to predict the trajectory, which can realize the prediction of the short-term trajectory of the vehicle and improve the accuracy of the trajectory prediction.
[0023] 2. The present invention can dynamically select the calculation mode of the yaw rate according to the current speed of the vehicle. That is, if the current vehicle speed is less than the speed at the start of interpolation, the steering curvature and the current vehicle speed are used to obtain the initial yaw rate; if the current vehicle speed is greater than the speed at the start of interpolation and less than the speed at the end of interpolation, the current vehicle speed, the speed at the start of interpolation, the speed at the end of interpolation and the steering curvature are used to obtain the initial yaw rate; if the current vehicle speed is greater than the speed at the end of interpolation, the measured yaw rate is used to obtain the initial yaw rate. In the low-speed area, the yaw rate is mainly calculated based on the steering curvature to calculate the short-term predicted trajectory; in the high-speed area, the measured yaw rate is directly used to calculate the short-term predicted trajectory; at medium speed, the predicted yaw rate is obtained by weighted interpolation of the steering curvature calculation and the yaw rate measured by the sensor. This adaptive yaw rate fusion strategy can provide the most appropriate yaw angle information according to different driving speeds, thereby optimizing the accuracy of the predicted trajectory.
[0024] 3. The local and global coordinate conversion of the trajectory of the present invention: The local moving trajectory of the vehicle is described by the polar coordinate system, and the local trajectory is spliced within the prediction time and converted into a trajectory in the global Cartesian coordinate system. This algorithm can ensure that the short-term trajectory planning is continuous, not separated, improve the accuracy of model prediction, reduce the error accumulation caused by coordinate conversion and nonlinear dynamic behavior, and the problem of trajectory discontinuity, making the prediction result more stable and reliable.
[0025] 4. The present invention has dynamic adaptability: The present invention dynamically adjusts the yaw rate prediction algorithm by combining the vehicle's speed conditions to ensure accurate trajectory prediction at different speeds. This adaptability makes the algorithm more accurate when facing vehicles with variable speeds, thereby improving the reliability and accuracy of trajectory prediction.
[0026] 5. The present invention can enhance driving safety: if the absolute value of the difference between the total yaw angle and the initial direction is greater than or equal to the maximum bending yaw angle, the yaw rate change corresponding to the time step is reset to zero. By limiting the maximum yaw angle of the trajectory, it is possible to avoid generating an overly tortuous trajectory, reduce the risk of collision caused by lane changes or sharp turns, and eliminate unrealistic trajectories that lead to erroneous predictions. This control mechanism can improve the stability and safety of vehicle driving, especially in emergency obstacle avoidance or rapid lane change scenarios.
[0027] 6. The system of the present invention includes an initial yaw angle acquisition module, a curvature change value acquisition module, a yaw angle acquisition module and a trajectory coordinate acquisition module. The initial yaw angle acquisition module is used to acquire the initial yaw angular velocity according to the current vehicle speed; the curvature change value acquisition module is used to acquire the cumulative steering curvature change value according to the number of steps in the for loop, the predicted time step, the total time of the steering change and the change rate of the steering curvature; the yaw angle acquisition module is used to acquire the predicted yaw angular velocity according to the initial yaw angular velocity and the cumulative steering curvature change value, and acquire the total yaw angle according to the predicted yaw angular velocity; the trajectory coordinate acquisition module is used to predict the coordinates of the short-term trajectory according to the total yaw angle and the current position coordinates. The various modules of the system of the present invention cooperate with each other, which can realize the prediction of the short-term trajectory of the vehicle and improve the accuracy of trajectory prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The flowchart of calculating and predicting the yaw rate of the present invention;
[0029] Figure 2 It is a schematic diagram of the prediction trajectory of the present invention;
[0030] Figure 3 A flowchart for constructing a short-term prediction trajectory for the present invention;
[0031] Figure 4 is a flow chart of the method of the present invention;
[0032] Figure 5 It is a schematic diagram of the system module of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0036] See also Figure 4 , a vehicle short-term trajectory prediction method, comprising the following steps:
[0037] S1. Obtain the initial yaw rate according to the current vehicle speed, as follows:
[0038] If the current vehicle speed is less than the interpolation start speed, the steering curvature and the current vehicle speed are used to obtain the initial yaw rate. The formula is as follows:
[0039]
[0040] in, is the initial yaw rate, k is the turning curvature;
[0041] If the current vehicle speed is greater than the speed at the start of interpolation and less than the speed at the end of interpolation, the initial yaw rate is obtained using the current vehicle speed, the speed at the start of interpolation, the speed at the end of interpolation, and the steering curvature. The formula is as follows:
[0042]
[0043] in, is the initial value of the yaw angular velocity; r y is the yaw rate estimated by the current steering curvature; v is the current speed of the vehicle; v b is the speed at which interpolation starts; v e is the speed at the end of interpolation; r is the measured yaw rate;
[0044]
[0045] Where v is the current speed of the vehicle, L is the wheelbase of the vehicle, that is, the distance between the front axle and the rear axle, and δ is the steering angle of the vehicle, that is, the turning angle of the front wheels. This formula assumes that the turning angle δ of the front wheels of the vehicle is very small, so we can use Approximately, the turning curvature Therefore, the yaw rate formula can be expressed as: y =vK;
[0046] If the current vehicle speed is greater than the interpolation end speed, the measured yaw rate is used to obtain the initial yaw rate. The formula is as follows:
[0047]
[0048] in, is the initial value of the yaw angular velocity; r is the measured yaw rate.
[0049] S2. Obtain the cumulative steering curvature change value according to the number of steps in the for loop, the prediction time step, the total time of the steering change, and the rate of change of the steering curvature, as follows:
[0050] The prediction time is obtained based on the prediction time step and number of steps. The formula is as follows:
[0051] t i =i·Δt
[0052] Among them, t i is the prediction time, i is the number of steps in the for loop, and Δt is the prediction time step;
[0053] Get the total time when the steering change occurs;
[0054] If the predicted time is less than or equal to the total time of the steering change, the steering curvature gradient is obtained according to the total time of the steering change, the predicted time and the rate of change of the steering curvature. The formula is as follows:
[0055]
[0056] κ pred ′=0.5κ′(cos(cos(val))+1)
[0057] Among them, κ pred ′ is the turning curvature gradient; κ′ is the rate of change of the turning curvature; cos(val) is the cosine value at the prediction time; t change is the total time for the steering change to occur; i is the number of steps in the for loop;
[0058] The cumulative turning curvature change value is obtained according to the turning curvature gradient and the predicted time step. The formula is as follows:
[0059] Δκ+=κ pred ′·Δt
[0060] Where Δκ is the cumulative turning curvature change; κ pred′ is the turning curvature gradient; Δt is the prediction time step.
[0061] S3. Obtain the predicted yaw rate according to the initial yaw rate and the cumulative steering curvature change value, see Figure 3 , obtain the total yaw angle according to the predicted yaw angular velocity;
[0062] Preferably, the formula is as follows:
[0063]
[0064] in, is the predicted yaw rate at step i; is the yaw angular velocity; v i is the speed of the i-th step; Δκ is the change in turning curvature.
[0065] Preferably, the method for obtaining the total yaw angle according to the predicted yaw angular velocity is as follows:
[0066] Obtaining a change in yaw angular velocity within each time step according to the predicted yaw angular velocity and the predicted time step;
[0067] The yaw rate change in each time step is accumulated to predict the total yaw angle. The formula is as follows:
[0068]
[0069]
[0070] in, is the predicted yaw rate at step i; is the change of yaw rate within the time step; Δt is the prediction time step; is the predicted total yaw angle.
[0071] S4. Predict the coordinates of the short-term trajectory based on the total yaw angle and the current position coordinates, as follows:
[0072] If the absolute value of the difference between the total yaw angle and the initial direction is greater than or equal to the maximum bending yaw angle, the yaw angular velocity change corresponding to the time step is reset to zero. The formula is as follows:
[0073]
[0074] If the absolute value of the difference between the total yaw angle and the initial direction is less than the maximum bending yaw angle, the coordinates of the short-term trajectory are predicted based on the total yaw angle, the speed of the i-th step, the prediction time step and the current position coordinates.
[0075] Preferably, the method for predicting the coordinates of the short-term trajectory according to the total yaw angle, the speed of the current step, the prediction time step and the current position coordinates is as follows:
[0076] The predicted distance change value is obtained based on the speed of the current step and the predicted time step. The formula is as follows:
[0077] d=v i-1 ×Δt
[0078] Where d is the predicted distance change value; v i-1 is the speed of the i-1th step; Δt is the prediction time step;
[0079] The angle change value is obtained based on the initial yaw angular velocity and the predicted time step. The formula is as follows:
[0080]
[0081] in, is the predicted angle change value, is the yaw rate at step i-1; Δt is the prediction time step;
[0082] The Cartesian coordinates of the current step are predicted based on the predicted distance change value, the predicted angle change value, and the predicted time step. The formula is as follows:
[0083]
[0084]
[0085] Where X' is the x-direction displacement of the vehicle in the local coordinate system at the current prediction step. It is calculated by multiplying the distance traveled by the current segment by the cosine of the angle of the current segment; Y' is the y-direction displacement of the vehicle in the local coordinate system at the current prediction step. It is calculated by multiplying the distance traveled by the current segment by the sine of the angle of the current segment; is the cosine value of the vehicle’s steering angle in the current prediction step; is the sine value of the vehicle’s steering angle in the current prediction step;
[0086] The inverse matrix transformation is used to predict the coordinates of the short-term trajectory according to the Cartesian coordinates of the current step and the current position coordinates. The formula is as follows:
[0087]
[0088]
[0089] Among them, X i is the global x coordinate of the vehicle in the current prediction step predStep_u8; Y iis the global y coordinate of the vehicle at the current prediction step; X i-1 is the global x coordinate of the vehicle in the previous prediction step; Y i-1 is the global y coordinate of the vehicle in the previous prediction step; X′ is the x-direction displacement of the vehicle in the local coordinate system in the current prediction step. It is calculated by multiplying the travel distance of the current segment by the cosine of the angle of the current segment; Y′ is the y-direction displacement of the vehicle in the local coordinate system in the current prediction step. It is calculated by multiplying the travel distance of the current segment by the sine of the angle of the current segment; The cosine value of the current vehicle's cumulative rotation angle (total yaw angle); It is the sine value of the current vehicle's cumulative rotation angle (total yaw angle).
[0090] See also Figure 1 In another feasible embodiment of the present invention, the following is adaptively modified according to the situation. The following steps are included: obtaining the initial yaw rate according to the current vehicle speed, and introducing the initial value of the yaw rate is beneficial to improving the accuracy of the trajectory prediction of the present invention at medium and high speeds. With the prediction of the initial yaw rate, the control algorithm can adjust the steering and speed of the vehicle more quickly to cope with complex road conditions and emergencies, thereby improving the overall response speed and safety. The cumulative steering curvature change value is obtained according to the number of steps of the for loop and the prediction time step, the total time of the steering change and the change rate of the steering curvature, which is conducive to improving the accuracy of trajectory prediction at low speed. By accurately calculating the cumulative steering curvature change value, a smoother and continuous steering control can be achieved, reducing the abruptness and vibration during steering, improving the riding comfort and the stability of vehicle control, and providing smooth and continuous steering control; the predicted yaw rate is obtained according to the initial yaw rate and the cumulative steering curvature change value, and the total yaw angle is obtained according to the predicted yaw rate. In the medium speed area, the trajectory is predicted by combining the yaw rate and the steering curvature, which is conducive to improving the accuracy of trajectory prediction at medium speed. In different speed intervals (low speed interval, medium speed interval, high speed interval), the initial yaw rate is calculated by using methods based on steering curvature, linear interpolation and sensor measurement, which can make full use of the advantages of each method and improve the accuracy and stability of trajectory prediction. The coordinates of the short-term trajectory are predicted according to the total yaw angle and the current position coordinates. The present invention combines the yaw rate and the steering curvature to predict the trajectory, which can realize the prediction of the short-term trajectory of the vehicle and improve the accuracy of trajectory prediction.
[0091] The different speed ranges are as follows:
[0092] Low speed range: vehicle speed is less than 8m / s, the initial yaw rate is calculated directly based on the steering curvature
[0093] Medium speed range: When the vehicle speed is between 8m / s and 13m / s, the linear interpolation method is used to combine the vehicle's current speed information speed and the initial yaw rate calculated based on the steering curvature and the yaw rate measured by the sensor to interpolate the initial value of the medium speed yaw rate.
[0094] High-speed section: When the vehicle speed exceeds 13 m / s, the yaw rate measured by the sensor is used as the initial yaw rate.
[0095] Specifically, the advantages of each speed range are as follows:
[0096] Low speed range, vehicle speed <8m / s;
[0097] When driving at low speed, the dynamic characteristics of the vehicle are relatively simple, and the steering curvature can accurately reflect the steering behavior of the vehicle. By calculating the initial yaw rate in this way, the trajectory prediction accuracy at low speed can be effectively improved.
[0098] Medium speed range: vehicle speed is between 8m / s and 13m / s;
[0099] Using linear interpolation, the initial yaw rate calculated based on the steering curvature and the yaw rate measured by the sensor are combined. The linear interpolation method can smoothly transition the yaw rate based on the steering curvature and the sensor measurement, reduce the sudden change of trajectory prediction caused by method switching, and improve the smoothness of the prediction.
[0100] High-speed section: vehicle speed>13m / s;
[0101] When driving at high speed, the dynamic characteristics of the vehicle are complex. The yaw rate measured by the sensor can reflect the actual steering situation of the vehicle in real time and provide a more timely and accurate initial yaw rate.
[0102] Embodiment 1:
[0103] See also Figure 4 The present invention provides a vehicle short-term trajectory prediction method. The method of the present invention mainly improves the accuracy and real-time performance of trajectory prediction through a short-term trajectory optimization algorithm, and at the same time enhances the collision prediction capability corresponding to the AEB function and the NOA function. The specific technical implementation steps are as follows:
[0104] Predicted yaw rate calculation and fusion: The yaw rate calculation mode is dynamically selected according to the current vehicle speed. In low-speed areas, the yaw rate is mainly calculated based on the steering curvature to calculate the short-term predicted trajectory; in high-speed areas, the measured yaw rate is directly used to calculate the short-term predicted trajectory; at medium speeds, the predicted yaw rate is obtained by weighted interpolation of the steering curvature calculation and the yaw rate measured by the sensor. This adaptive yaw rate fusion strategy can provide the most appropriate yaw angle information according to different driving speeds, thereby optimizing the predicted trajectory accuracy.
[0105] Trajectory local and global coordinate conversion: The local moving trajectory of the vehicle is described by the polar coordinate system, and the local trajectory is spliced during the prediction time and converted into a trajectory in the global Cartesian coordinate system. This algorithm can ensure that short-term trajectory planning is continuous, not separated, and improve the accuracy of model prediction.
[0106] Track curvature control: By setting a maximum curvature limit, the algorithm can avoid generating overly tortuous tracks and reduce the risk of collisions caused by lane changes or sharp turns. This control mechanism can improve the stability and safety of vehicle driving, especially in emergency obstacle avoidance or fast lane change scenarios.
[0107] Embodiment 2:
[0108] First, calculate the initial yaw rate required for the short-term prediction trajectory, see Figure 1 A flow chart of a method for calculating a predicted yaw rate;
[0109] Calculate the initial yaw rate:
[0110] The yaw rate calculation method used according to the vehicle speed is:
[0111] The current vehicle speed is low: the vehicle speed is less than the interpolation start speed, that is, 8m / s, and the initial yaw rate is calculated directly based on the steering curvature k.
[0112]
[0113] The current vehicle speed is medium speed: the vehicle speed is between the speed at which interpolation starts and the speed at which interpolation ends, that is, the current vehicle speed is between 8m / s and 13m / s. The linear interpolation method is used to combine the vehicle's current speed information speed and the initial yaw rate calculated based on the steering curvature and the yaw rate measured by the sensor to interpolate the initial yaw rate at medium speed.
[0114]
[0115] is the initial value of the yaw angular velocity;
[0116] r y is the yaw rate estimated by the current steering curvature;
[0117] v is the current speed of the vehicle;
[0118] v b is the speed at which interpolation starts;
[0119] v e is the speed at which interpolation ends;
[0120] r is the measured yaw rate.
[0121] The current vehicle speed is high speed: the vehicle speed exceeds the speed at which interpolation ends, that is, the vehicle speed exceeds 13m / s, and the yaw angular velocity measured by the sensor is used as the initial yaw angular velocity.
[0122]
[0123] After the initial yaw rate of the vehicle is obtained, the predicted yaw rate is calculated.
[0124] Feed the parameters into the for loop:
[0125] i is the number of steps, the maximum value is 15;
[0126] Δt is the time interval between each step, i.e. the prediction time step, which is 0.1s;
[0127] t change is the total time for the steering change to occur, which is 0.5s;
[0128] κ′ is the rate of change of the turning curvature;
[0129] v i is the speed of the i-th step;
[0130] is the yaw angular velocity;
[0131] Δκ is the change in turning curvature;
[0132] From iteration 1 to step 15, process each time step, calculate the predicted steering curvature gradient at that time point, and accumulate the steering curvature change. Use the yaw rate and the accumulated steering curvature change, combined with the vehicle speed of the current step, to calculate the predicted yaw rate of the step. The algorithm process for calculating the predicted yaw rate is as follows:
[0133] Iterate the predicted number of steps starting from 1, the predicted number of steps is 15, and the function will calculate the yaw rate at each step;
[0134] Calculate the prediction time: t i =i·Δt
[0135] If t i ≤t change , then execute: Calculate the cosine value at the predicted time:
[0136]
[0137] Among them, cos(val) is the cosine value at the prediction time; t change is the total time for the steering change to occur; i is the number of steps in the for loop;
[0138] Calculate the predicted steering curvature gradient and use the cosine function to simulate the nonlinear characteristics of the steering curvature change:
[0139] κ pred ′=0.5κ′(cos(cos(val))+1)
[0140] Among them, κ pred ′ is the turning curvature gradient; κ′ is the rate of change of the turning curvature;
[0141] Cumulative turning curvature change:
[0142] Δκ+=κ pre d ′ ·Δt
[0143] Among them, Δκ is the cumulative turning curvature change;
[0144] Calculate and update the yaw rate, i.e. the predicted yaw rate at step i, by adding the yaw rate change calculated in each time step to the total yaw rate change:
[0145]
[0146] in, is the predicted yaw rate at step i;
[0147] against Figure 2 , when the prediction time step number is i, the vector The length is determined by the predicted speed v of the i-th step i The product of the predicted time step Δt determines the vehicle’s travel distance d, which is determined by the speed and time step of the i-th step. i Δt. Refers to the vector angle, which is determined by the predicted yaw rate With the prediction time t i i is the time step of the current prediction, V i is the predicted host vehicle speed at time step i, is the predicted yaw rate at time step i, Δt is the size of the predicted time step, and t i is the prediction time. The entire trajectory is obtained by transforming these prediction vectors P i For each time step, there is a corresponding moving distance and direction. By connecting all the time steps in series, the short-term predicted trajectory of the main vehicle can be constructed.
[0148] against Figure 3 , which is the specific process of constructing short-term prediction trajectory:
[0149] Maximum curvature check:
[0150] Yaw angle limit check: check the current total yaw angle Is the absolute value of the difference from the initial direction less than the maximum bending yaw angle? The maximum bending yaw angle is 90 degrees. If the absolute value of the difference between the total yaw angle and the initial direction is greater than or equal to 90 degrees, an alarm is triggered;
[0151] Angle calculation: If the absolute value of the difference between the total yaw angle and the initial direction is less than the maximum bending yaw angle, the angle change is calculated by the predicted yaw rate It is determined by the product of and the time step Δt, expressed as:
[0152]
[0153] in, is the change in yaw angle; To predict the yaw rate;
[0154] Limit execution: If the total yaw angle exceeds the maximum allowed value, in order to ensure the stability and safety of the trajectory, the curvature of the trajectory is no longer increased and the angle change is set to 0:
[0155]
[0156] in, is the change in yaw angle at step i;
[0157] This calculation method not only takes into account the dynamic characteristics of the vehicle, that is, the angle change is calculated by the product of the yaw rate and time, but also takes into account operational safety and physical limitations, that is, the angle change is limited by introducing the concept of the maximum bending yaw angle. This processing ensures that the vehicle will not lose control or cause danger due to oversteering when turning, and also makes the trajectory prediction more consistent with the actual driving situation.
[0158] Calculation of trajectory points:
[0159] The prediction time step Δt is 0.1 seconds, and the prediction duration is t iThe total yaw angle is calculated by adding the predicted yaw rate calculated previously at each step. for use in the next forecast cycle.
[0160] After calculating the total yaw angle.
[0161] For each step I from 1 to n-1:
[0162] Calculate the sine, cos(totalYawf32), and cosine, sin(totalYawf32) of the total yaw angle for this step:
[0163] In each prediction cycle, the steering angle of the current cycle is calculated based on the current yaw rate (yaw angular velocity) and time step, and accumulated into totalYaw_f32.
[0164] for(uint8 predStep_u8=1U; predStep_u8 <numPredSteps_u8;++predStep_u8)
[0165] currPartPolar.Angle_f32=yawrate_af32[predStep_u8-1U]*stepSize_f32;
[0166] totalYaw_f32+=currPartPolar.Angle_f32;
[0167] In each prediction cycle, the steering angle in the current step is calculated based on the vehicle's current yaw rate yawrate_af32[predStep_u8-1U] and the time step stepSize_f32: If the current total yaw angle totalYaw_f32 does not exceed the maximum bending yaw angle maxBendYaw_f32, the calculated steering angle is added to totalYaw_f32. Otherwise, the steering angle in the current step is set to zero and no curvature is added.
[0168] Calculate the distance d and angle change for each step
[0169] d=v i-1 ×Δt
[0170]
[0171] Convert polar coordinates to Cartesian coordinates:
[0172] X′=d×cosΔt
[0173] Y′=d×sinΔt
[0174] Local to global coordinate transformation:
[0175] Next, the local coordinate system is converted into the global coordinate system using the inverse matrix transformation, and the coordinate table of the short-term prediction trajectory is obtained:
[0176]
[0177]
[0178] Update total yaw angle
[0179]
[0180] The invention provides an algorithm implementation method for short-term vehicle trajectory prediction, which utilizes the conversion between polar coordinates and Cartesian coordinate systems, predicts the yaw rate in combination with the vehicle speed, and accurately predicts the vehicle's trajectory in the short term by implementing the maximum bending yaw angle limit. This paves the way for ADAS functions such as NOA safe lane change and AEB collision, effectively identifies and prevents potential collision risks, ensures the safety of lane change actions, and reduces the occurrence of traffic accidents.
[0181] Based on the above method, the present invention also discloses a vehicle short-term trajectory prediction system, see Figure 5 ,include:
[0182] Initial yaw angle acquisition module: used to obtain the initial yaw angle velocity according to the current vehicle speed;
[0183] Curvature change value acquisition module: used to obtain the cumulative steering curvature change value according to the number of steps in the for loop, the prediction time step, the total time of the steering change and the change rate of the steering curvature;
[0184] Yaw angle acquisition module: used to obtain the predicted yaw angle velocity according to the initial yaw angle velocity and the cumulative steering curvature change value, and obtain the total yaw angle according to the predicted yaw angle velocity;
[0185] Trajectory coordinate acquisition module: used to predict the coordinates of the short-term trajectory based on the total yaw angle and current position coordinates.
[0186] The various modules of the system of the present invention cooperate with each other to realize the prediction of the short-term trajectory of the vehicle, thereby improving the accuracy of trajectory prediction.
[0187] An electronic device comprises: a processor; a memory for storing computer program instructions; and a method for implementing a vehicle short-term trajectory prediction method when executing the computer program.
[0188] A storage medium stores computer program instructions. When the computer program instructions are loaded and executed by a processor, the processor executes a vehicle short-term trajectory prediction method.
[0189] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0190] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0193] In summary, the beneficial effects of the present invention are as follows:
[0194] 1. Dynamic adaptability: The present invention dynamically adjusts the yaw rate prediction algorithm by combining the vehicle's speed conditions to ensure accurate trajectory prediction at different speeds. This adaptability makes the algorithm more accurate when facing vehicles with variable speeds, thereby improving the reliability and accuracy of trajectory prediction.
[0195] 2. Enhanced safety: By limiting the maximum yaw angle of the trajectory, the prediction algorithm is able to exclude unrealistic trajectories that lead to incorrect predictions.
[0196] 3. Reduce error accumulation: This algorithm reduces the error accumulation and trajectory discontinuity caused by coordinate transformation and nonlinear dynamic behavior by using the global coordinate system instead of continuously resetting the local coordinate origin, making the prediction results more stable and reliable.
[0197] The above contents are only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.
Claims
1. A vehicle short-term trajectory prediction method, characterized in that: The following steps are involved: Obtain the initial yaw rate according to the current vehicle speed; Obtain the cumulative steering curvature change value based on the number of steps in the for loop, the prediction time step, the total time of the steering change, and the rate of change of the steering curvature; Obtaining a predicted yaw rate according to the initial yaw rate and the accumulated steering curvature change value, and obtaining a total yaw angle according to the predicted yaw rate; Predict the coordinates of the short-term trajectory based on the total yaw angle and the current position coordinates.
2. A vehicle short-term trajectory prediction method according to claim 1, characterized in that: The method for obtaining the initial yaw rate according to the current vehicle speed is as follows: If the current vehicle speed is less than the interpolation start speed, the initial yaw rate is obtained using the steering curvature and the current vehicle speed; If the current vehicle speed is greater than the interpolation start speed and less than the interpolation end speed, the initial yaw rate is obtained using the current vehicle speed, the interpolation start speed, the interpolation end speed and the steering curvature; If the current vehicle speed is greater than the interpolation end speed, the measured yaw rate is used to obtain the initial yaw rate.
3. A vehicle short-term trajectory prediction method according to claim 1, characterized in that: The method for obtaining the cumulative steering curvature change value according to the number of steps in the for loop, the prediction time step, the total time of the steering change and the rate of change of the steering curvature is as follows: Get the prediction time based on the prediction time step and number of steps; Get the total time when the steering change occurs; If the predicted time is less than or equal to the total time of the steering change, the steering curvature gradient is obtained according to the total time of the steering change, the predicted time and the rate of change of the steering curvature; The cumulative turning curvature change value is obtained based on the turning curvature gradient and the prediction time step.
4. A vehicle short-term trajectory prediction method according to claim 1, characterized in that: The formula for obtaining the predicted yaw rate according to the initial yaw rate and the cumulative steering curvature change value is as follows: in, is the predicted yaw rate at step i; is the yaw angular velocity; v i is the speed of the i-th step; Δκ is the change in turning curvature.
5. A vehicle short-term trajectory prediction method according to claim 1, characterized in that: The method for obtaining the total yaw angle according to the predicted yaw angular velocity is specifically as follows: Obtaining a change in yaw angular velocity within each time step according to the predicted yaw angular velocity and the predicted time step; The yaw rate change in each time step is accumulated to predict the total yaw angle.
6. A vehicle short-term trajectory prediction method according to claim 1, characterized in that: The method for predicting the coordinates of the short-term trajectory according to the total yaw angle and the current position coordinates is as follows: If the absolute value of the difference between the total yaw angle and the initial direction is greater than or equal to the maximum bending yaw angle, the yaw angular velocity change corresponding to the time step is reset to zero; If the absolute value of the difference between the total yaw angle and the initial direction is less than the maximum bending yaw angle, the coordinates of the short-term trajectory are predicted based on the total yaw angle, the speed of the i-th step, the prediction time step and the current position coordinates.
7. A vehicle short-term trajectory prediction method according to claim 6, characterized in that: The method for predicting the coordinates of the short-term trajectory according to the total yaw angle, the speed of the current step, the prediction time step and the current position coordinates is as follows: Get the predicted distance change value based on the current step speed and the predicted time step; Obtain the angle change value according to the initial yaw angular velocity and the prediction time step; Predict the Cartesian coordinates of the current step based on the predicted distance change value, the predicted angle change value and the predicted time step; The inverse matrix transformation is used to predict the coordinates of the short-term trajectory based on the Cartesian coordinates of the current step and the current position coordinates.
8. A vehicle short-term trajectory prediction system for implementing the method according to any one of claims 1 to 7, characterized in that: include: Initial yaw angle acquisition module: used to obtain the initial yaw angle velocity according to the current vehicle speed; Curvature change value acquisition module: used to obtain the cumulative steering curvature change value according to the number of steps in the for loop, the prediction time step, the total time of the steering change and the change rate of the steering curvature; Yaw angle acquisition module: used to obtain the predicted yaw angle velocity according to the initial yaw angle velocity and the cumulative steering curvature change value, and obtain the total yaw angle according to the predicted yaw angle velocity; Trajectory coordinate acquisition module: used to predict the coordinates of the short-term trajectory based on the total yaw angle and current position coordinates.
9. An electronic device, comprising: Processor; memory, electronic device used to store computer program instructions; characterized in that it is used to implement the steps of the vehicle short-term trajectory prediction method as described in any one of claims 1-7 when executing the computer program.
10. A storage medium storing computer program instructions, characterized in that: When the computer program instructions are loaded and executed by a processor, the processor executes the vehicle short-term trajectory prediction method according to any one of claims 1 to 7.
