Vehicle trajectory planning method, device, system and equipment and vehicle
Through the improved gradient descent method and Gauss-Lejender integral formula, the problems of low trajectory planning efficiency and iterative oscillation in the existing technology are solved, and more efficient trajectory planning and faster convergence speed are achieved.
Patent Information
- Application Number
- CN202510309980.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-08-15
AI Technical Summary
The existing trajectory planning efficiency is low, and the gradient descent method has low iteration efficiency, easy oscillation and saddle point problems during the iteration process, making it difficult to adaptively adjust the learning step size under frequently changing gradient information.
The improved gradient descent method is adopted to adaptively adjust the learning rate by considering the influence of gradient momentum and Euclidean norm, and optimize the dynamic equation of the system with Gauss-Lejeander integral formula to achieve smooth trajectory planning.
The efficiency of trajectory planning is improved, the number of iterations and solution time is reduced, the oscillation and saddle point problems in the gradient descent method are solved, and faster convergence speed and higher optimization efficiency are achieved.
Smart Images

Figure CN120482085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method, device, system, equipment and vehicle for vehicle trajectory planning. Background Art
[0002] Trajectory planning is an important technical link in autonomous driving systems, converting driving decisions and destinations into trajectories, but the existing trajectory planning efficiency is low. Summary of the Invention
[0003] In view of the above problems, a method, apparatus, system, device and vehicle for vehicle trajectory planning are proposed to overcome the above problems or at least partially solve the above problems, including:
[0004] A method for vehicle trajectory planning, the method comprising:
[0005] During autonomous driving, obtain the current vehicle status;
[0006] A trajectory is planned based on the current vehicle state to obtain a target trajectory that is suitable for the current driving task.
[0007] Optionally, performing trajectory planning according to the current vehicle state to obtain a target trajectory adapted to the current driving task includes:
[0008] Determining a first trajectory point vector according to the current vehicle state, and performing iterative calculation based on the first trajectory point vector to obtain a target second trajectory point vector;
[0009] The target trajectory adapted to the current driving task is determined according to the target second trajectory point vector.
[0010] Optionally, performing iterative calculation according to the first trajectory point vector to obtain a target second trajectory point vector includes:
[0011] A second trajectory point vector is calculated according to the first trajectory point vector, and during the iterative calculation process, the second trajectory point vector that meets a preset condition is determined as the target second trajectory point vector.
[0012] Optionally, calculating the second trajectory point vector according to the first trajectory point vector includes:
[0013] determining a weighted average of historical gradient values, and calculating the second trajectory point vector based on the weighted average of the historical gradient values and the first trajectory point vector;
[0014] The iterative calculation process is implemented by gradient descent, and the historical gradient value is the gradient value that has been used in the iterative calculation process.
[0015] Optionally, calculating the second trajectory point vector according to the weighted average of the historical gradient values and the first trajectory point vector includes:
[0016] Determining a feedback control rate and a feedforward control rate; wherein the feedback control rate and the feedforward control rate are used to control the step size of parameter update during the gradient descent process;
[0017] The second trajectory point vector is calculated according to the feedback control rate, the feedforward control rate, a weighted average of the historical gradient values, and the first trajectory point vector.
[0018] Optionally, the feedback control rate is associated with the Euclidean norm of the current gradient.
[0019] Optionally, determining the feedback control rate includes: determining the feedback control rate according to a feedback control weight coefficient and the Euclidean norm of the current gradient.
[0020] Optionally, the feedforward control rate is negatively correlated with the number of iterative calculations.
[0021] Optionally, determining the feedforward control rate includes: determining the feedforward control rate according to a feedforward control initial value and the number of iterative calculations.
[0022] Optionally, the first trajectory point vector includes a first control vector and a first state vector, the second trajectory point vector includes a second control vector and a second state vector, and calculating the second trajectory point vector according to the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, and the first trajectory point vector includes:
[0023] Calculating the second control vector according to the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, the first control vector, and the first state vector;
[0024] The second state vector is calculated based on the second control vector.
[0025] Optionally, calculating the second state vector according to the second control vector includes:
[0026] A second state vector is calculated based on the second control vector using a system dynamics equation.
[0027] Optionally, the first state vector and the second state vector include any one or more of the following: horizontal coordinate, longitudinal coordinate, longitudinal velocity, longitudinal acceleration, first-order derivative of acceleration, heading angle, front wheel angle, front wheel angular velocity.
[0028] Optionally, the first control vector and the second control vector include any one or more of the following: a second-order derivative of acceleration, an angular acceleration.
[0029] Optionally, during the iterative calculation process, determining the second trajectory point vector that meets a preset condition as the target second trajectory point vector includes:
[0030] During the iterative calculation process, a cost function is used to calculate a cost value, and based on the cost value, the second trajectory point vector at which the cost function is in a convergent state is determined as the target second trajectory point vector.
[0031] Optionally, determining, based on the cost value, the second trajectory point vector at which the cost function is in a converged state as the target second trajectory point vector includes:
[0032] According to the cost value, the second trajectory point vector whose cost value error is within a preset range and in which the cost function is in a convergence state is determined as the target second trajectory point vector.
[0033] Optionally, the cost value error is the difference between the currently calculated cost value and the most recently calculated cost value.
[0034] A vehicle trajectory planning device, comprising:
[0035] An acquisition module, wherein the acquisition module is used to acquire the current vehicle state through sensors during the autonomous driving process;
[0036] A trajectory planning module is connected to the acquisition module, and is used to perform trajectory planning according to the current vehicle state to obtain a target trajectory adapted to the current driving task.
[0037] An automatic driving system, comprising:
[0038] The device as described above is used to obtain the current vehicle state through sensors, and perform trajectory planning based on the current vehicle state to obtain a target trajectory adapted to the current driving task;
[0039] A driving domain controller is connected to the device and is used to control the execution of automatic driving according to the target trajectory.
[0040] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method described above when executed by the processor.
[0041] A vehicle includes the automatic driving system as described above, or includes the device as described above.
[0042] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0043] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements the method described above.
[0044] The embodiments of the present invention have the following advantages:
[0045] In an embodiment of the present invention, by obtaining the current vehicle state during the autonomous driving process and performing trajectory planning based on the current vehicle state, a target trajectory adapted to the current driving task is obtained, thereby optimizing the trajectory planning during the autonomous driving process and improving the efficiency of trajectory planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 is a flowchart of the steps of a vehicle trajectory planning method provided by some embodiments of the present invention;
[0048] Figure 2 is a flowchart of the steps of another method for vehicle trajectory planning provided by some embodiments of the present invention;
[0049] Figure 3 This is a flowchart of the steps of another vehicle trajectory planning method provided by some embodiments of the present invention. DETAILED DESCRIPTION
[0050] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0051] In the field of autonomous driving, trajectory planning describes the spatial location that an autonomous vehicle is expected to reach at each moment in the future. This can be viewed as a curve in space and time. Joint space-time planning technology directly solves for the optimal space-time trajectory in three-dimensional space, resulting in higher-quality trajectories. The joint space-time planning algorithm is a numerical optimization algorithm that achieves the optimal solution through iteration.
[0052] In related technologies, the solver for spatiotemporal joint planning algorithms is implemented based on an iterative linear quadratic regulator (iLQR). In the iterative solution process of iLQR-based spatiotemporal joint planning algorithms, gradient updating is particularly important. A good gradient update strategy can improve iteration efficiency, reduce the number of iterations, and quickly obtain the optimal solution. However, the iterative calculation using the gradient descent method in related technologies is not very efficient.
[0053] For example, related technologies seamlessly combine neural networks with physical models to establish a PINN-based dynamics model, design an ILQR control algorithm, and apply this algorithm to a trajectory tracking controller. By minimizing the objective function, the optimal control command is obtained, achieving accurate tracking of the reference trajectory. The Levenberg-Marquardt (LM) algorithm and line search are introduced to improve the convergence of the ILQR control algorithm.
[0054] However, in the above-mentioned related technologies, the step size during iteration is adjusted by adjusting the size of the LM parameter λ, which is essentially the Newton method and the gradient descent method. It cannot effectively solve the "saddle point" problem and the frequently changing gradient parameter problem in the iterative process, and cannot adaptively and autonomously adjust the learning step size under frequently changing gradient information.
[0055] In summary, the iterative process of calculating the ILQR solution using the gradient descent method in related technologies has the problems of low iteration efficiency (slow parameter optimization) and easy oscillation at the convergence point. In addition, the gradient descent method in related technologies handles the "saddle point" problem and is prone to falling into the local minimum.
[0056] In an embodiment of the present invention, by considering the influence of gradient momentum, parameter iteration is accelerated, the oscillation process during the gradient descent process and near the saddle point is reduced, and the Euclidean norm (L2 norm) of the gradient is innovatively added, which can effectively adjust the iteration step size and realize adaptive adjustment of the learning rate during the gradient descent process. Furthermore, compared with the Newton iterative linear search algorithm in the related art, the iterative convergence speed is fast, the solution time is short, the efficiency is high, and the problem of sparse gradient or large gradient noise can be well solved.
[0057] The embodiments of the present invention mainly include the following aspects:
[0058] 1. An adaptive gradient optimization strategy based on the momentum algorithm adopts an improved gradient descent method. By considering the momentum effect of the gradient, it can reduce oscillation at the convergence position, maintain a smooth descent curve, accelerate convergence, and solve the "saddle point" problem in gradient descent.
[0059] Specifically, by factoring the influence of momentum into the current gradient value—that is, taking into account the moving weighted average of historical gradients—this smoothes the current gradient update trajectory and effectively addresses the "saddle point" problem. By accounting for the cumulative effect of momentum, parameter iteration is accelerated, reducing oscillations during gradient descent and near saddle points, while maintaining a smooth gradient descent trajectory.
[0060] 2. The Euclidean norm of the gradient is added to the calculation of the learning rate. For different iteration parameters, the learning rate can be adaptively adjusted to update frequently changing parameters with smaller iteration steps, while updating sparse parameters with larger step sizes.
[0061] Specifically, when calculating the update step size, a denominator is added: the Euclidean norm of the gradient (the square root of the cumulative sum of squares). This accumulates the historical gradients of each parameter. Frequently updated gradients result in a larger accumulated denominator and a smaller update step size. Sparse gradients result in a smaller accumulated denominator and a larger update step size.
[0062] Moreover, the feedforward adjustment factor α is not a fixed value, but a value that changes with the number of iterations, and as the number of iterations increases, the α value gradually decreases.
[0063] By adaptively adjusting the learning rate during the gradient descent process, different learning rates are adjusted for each different parameter, frequently changing parameters are updated with smaller step sizes, and sparse parameters are updated with larger step sizes, which speeds up parameter iteration and convergence to the optimal solution.
[0064] 3. The Gauss-Legendre integral formula is used to solve the system dynamics equations, which provides higher computational accuracy, effectively improving optimization efficiency and reducing the number of iterations. Compared to the Newton iterative linear search algorithm used in related technologies, it has faster iterative convergence, shorter solution time, and higher efficiency.
[0065] The present invention will be further described below with reference to the accompanying drawings:
[0066] Reference Figure 1 , shows a flowchart of a vehicle trajectory planning method provided by some embodiments of the present invention, which may specifically include the following steps:
[0067] Step 101: During the automatic driving process, obtain the current vehicle status.
[0068] Step 102 : performing trajectory planning based on the current vehicle state to obtain a target trajectory that is suitable for the current driving task.
[0069] For example, the current driving task is driving tasks such as moving forward, avoiding obstacles, and turning during the autonomous driving process.
[0070] In an embodiment of the present invention, by obtaining the current vehicle state during the autonomous driving process and performing trajectory planning based on the current vehicle state, a target trajectory adapted to the current driving task is obtained, thereby optimizing the trajectory planning during the autonomous driving process and improving the efficiency of trajectory planning.
[0071] In some embodiments of the present invention, performing trajectory planning according to the current vehicle state to obtain a target trajectory adapted to the current driving task includes:
[0072] According to the current vehicle state, a first trajectory point vector is determined, and an iterative calculation is performed based on the first trajectory point vector to obtain a target second trajectory point vector; and according to the target second trajectory point vector, a target trajectory adapted to the current driving task is determined.
[0073] In practical applications, the current vehicle state can be used to determine the vehicle's first trajectory point vector. Iterative calculations can then be performed based on this first trajectory point vector to determine the optimal second trajectory point vector. This second trajectory point vector is then sent to the downstream control end for actual vehicle control. The downstream control module, based on the data sent by the plan, controls the vehicle to follow the planned trajectory.
[0074] In some embodiments of the present invention, performing iterative calculation based on the first trajectory point vector to obtain the target second trajectory point vector includes:
[0075] Sub-step 11: Calculate a second trajectory point vector based on the first trajectory point vector.
[0076] In some embodiments of the present invention, calculating the second trajectory point vector based on the first trajectory point vector includes: determining a weighted average of historical gradient values, and calculating the second trajectory point vector based on the weighted average of the historical gradient values and the first trajectory point vector.
[0077] The iterative calculation process may be implemented in a gradient descent manner, and the historical gradient value may be a gradient value that has been used in the iterative calculation process.
[0078] In practical applications, historical gradient values, that is, gradient values used in the past, are obtained, and then weighted averages of the historical gradient values are performed to obtain a weighted average of the historical gradient values.
[0079] In an embodiment of the present invention, by considering the influence of momentum and adding historical gradient information, the magnitude of the gradient change can be measured, thereby adjusting the learning rate of the parameter, which can effectively avoid updates with gradients that are too large or too small, making the gradient update trajectory smooth and effectively solving the "saddle point" problem.
[0080] In some examples, the following gradient calculation formula can be used:
[0081] K t =β*K t-1 +(1-β)*K current
[0082] Among them, K t-1 Represents the weighted average of historical gradient values (such as moving weighted average, exponential weighted average); K current Indicates the gradient value at the current moment; K t is the weighted average of the gradient values at the current moment; β is the attenuation weight coefficient, which can be set according to the empirical value. For example, setting β = 0.5 affects the weight of the historical gradient in the current gradient calculation.
[0083] In some embodiments of the present invention, calculating the second trajectory point vector based on the weighted average of the historical gradient values and the first trajectory point vector includes: determining a feedback control rate and a feedforward control rate; and calculating the second trajectory point vector based on the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, and the first trajectory point vector.
[0084] Among them, the feedback control rate and the feedforward control rate can be used to control the step size of the parameter update during the gradient descent process. In the gradient descent algorithm, the feedforward control rate can be used to control the step size of the parameter update. Specifically, the feedforward control rate determines the amplitude of the parameter update in the opposite direction of the gradient in each iteration. The size of the feedforward control rate directly affects the convergence speed and stability of the gradient descent algorithm. Excessively large learning rates may cause the algorithm to oscillate around the optimal solution or even diverge; while too small a learning rate will make the algorithm converge too slowly and increase the computational cost. In practical applications, the feedforward control rate can be adjusted according to factors such as the complexity of the model, the size and distribution of the dataset, and so on.
[0085] In the gradient descent algorithm, the feedback control rate can be understood as a strategy for dynamically adjusting the learning rate based on the current gradient information, also known as an "adaptive learning rate." This strategy aims to dynamically adjust the learning rate of each parameter based on the magnitude and trend of the gradient, enabling more refined parameter updates. Specifically, the feedback control rate dynamically adjusts the learning rate of each parameter based on the magnitude and direction of the current gradient to achieve more stable convergence and higher performance. By dynamically adjusting the learning rate, the feedback gradient learning rate can more flexibly respond to the update requirements of different parameters and at different stages, avoiding excessive fluctuations near the optimal solution while accelerating the convergence process.
[0086] In practical applications, different learning rates can be adjusted for each different parameter, frequently changing parameters can be updated with smaller step sizes, and sparse parameters can be updated with larger step sizes, including adaptive adjustment of the feedforward learning rate (feedforward control rate) α and the feedback learning rate Adaptive adjustment of (feedback control rate) to achieve adaptive gradient learning rate update strategy.
[0087] In an embodiment of the present invention, by adaptively adjusting the learning rate of gradient descent, a different learning rate is adjusted for each different parameter, frequently changing parameters are updated with a smaller step size, and sparse parameters are updated with a larger step size, thereby accelerating parameter iteration and accelerating convergence to the optimal solution.
[0088] In some embodiments of the present invention, the feedback control rate is associated with the Euclidean norm (L2 norm) of the current gradient.
[0089] In some embodiments of the present invention, determining the feedback control rate includes: determining the feedback control rate according to a feedback control weight coefficient and the Euclidean norm of the current gradient.
[0090] Regarding the selection of gradient learning rate, a gradient learning rate that is too small will lead to very slow convergence, while a gradient learning rate that is too large will hinder convergence, causing the loss function to oscillate or even diverge near the optimal point. The same learning rate is applied to all parameter updates, and the gradient update does not change with the change of the gradient. Specifically, for working conditions where the gradient changes repeatedly, a good gradient learning rate is to reduce the gradient update value to achieve refined iteration; while for working conditions where the gradient changes relatively large, a good gradient learning rate is to increase the gradient update value to achieve a large step size gradient update, thereby achieving fast iteration.
[0091] In an embodiment of the present invention, the Euclidean norm of the gradient is used to calculate the feedback control rate. The Euclidean norm is the arithmetic square root of the square of the gradient, and can accumulate the historical gradients of various parameters. If the gradient is updated frequently, the accumulated denominator term will gradually become larger, so the update step size will become relatively smaller. Sparse gradients will cause the corresponding value in the accumulated denominator term to be relatively small, so the update step size will be relatively large. The embodiment of the present invention innovatively adds the Euclidean norm of the gradient, which can effectively adjust the iterative step size and realize adaptive adjustment of the learning rate in the gradient descent process.
[0092] In some examples, the feedback control rate can be expressed as follows:
[0093]
[0094] Where γ is the decay rate of the quadratic exponential, such as γ = 0.8, and ∈ is a small non-zero value, such as ∈ = 10 -8 , which is used to prevent the divisor from becoming 0. is the feedback control rate, which is related to the feedback control weight coefficient η and the Euclidean norm of the gradient. η is the feedback control weight coefficient, which can be set to η=0.01, M t 、 It is an intermediate quantity in the process of formula derivation.
[0095] In some embodiments of the present invention, the feedforward control rate is negatively correlated with the number of iterative calculations.
[0096] In some embodiments of the present invention, determining the feedforward control rate includes: determining the feedforward control rate according to a feedforward control initial value and the number of iterative calculations.
[0097] The feedforward control rate is updated using a linear scaling method. During each iteration, the feedforward control rate is reduced according to a predetermined rule, achieving adaptive adjustment of the feedforward control rate α. The specific feedforward adjustment factor α is not a fixed value, but a value that changes with the number of iterations, and the value of α gradually decreases with each iteration.
[0098] In some examples, the feedforward control rate can be expressed as follows:
[0099]
[0100] Wherein, α is the feedforward control rate, which is a linear scaling factor. The value decreases as the number of iterations increases. a represents the initial value and can be set to a = 1.05. iCount is the number of iterations, iCount = 0, 1, 2, 3, 4, 5... As the number of iterations increases, the linear scaling factor α gradually decreases.
[0101] In some embodiments of the present invention, the first trajectory point vector includes a first control vector and a first state vector, and the second trajectory point vector includes a second control vector and a second state vector.
[0102] In some examples, the state vector is used to characterize the current state of the vehicle, and the first state vector and the second state vector include any one or more of the following: horizontal coordinate, longitudinal coordinate, longitudinal velocity, longitudinal acceleration, first-order derivative of acceleration, heading angle, front wheel angle, and front wheel angular velocity.
[0103] In some examples, the control vector is used to characterize the automatic control operation of the vehicle, and the first control vector and the second control vector include any one or more of the following: the second derivative of acceleration, the angular acceleration
[0104] In some embodiments of the present invention, calculating the second trajectory point vector based on the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values and the first trajectory point vector includes: calculating the second control vector based on the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, the first control vector and the first state vector; and calculating the second state vector based on the second control vector.
[0105] In related technologies, the gradient descent calculation formula is as follows:
[0106]
[0107] In order to implement the adaptive gradient update strategy, different learning rates are adjusted for each different parameter, frequently changing parameters are updated with a smaller step size, and sparse parameters are updated with a larger step size. The improved gradient descent calculation formula of the embodiment of the present invention is as follows:
[0108]
[0109] Among them, u i is the first control vector, x i is the first state vector (actual value), is the expected value of the first state vector, k is the feedforward term, obtained by back propagation, u i+1 is the second control quantity.
[0110] In some embodiments of the present invention, calculating the second state vector according to the second control vector includes: using a system dynamics equation to calculate the second state vector according to the second control vector.
[0111] Using the first control vector and the first state vector as input, at each moment, backpropagation (BP) is used to obtain the feedforward control rate and feedback control rate to update the current moment's input, i.e., the second control vector. Then, using the new control input (the second control vector) through the system dynamics equations, a new state vector (the second state vector) is calculated. This is then passed through the entire number of points in the planning optimization process to obtain the complete state vector and control vector of the forward propagation (FP) process.
[0112] In some examples, the points in the entire solution process are traversed until the last planning point, that is, the state vector and control vector of the entire planning point are obtained. For example, if there are 50 points in the entire optimization trajectory, it is necessary to traverse 50 times to obtain a state vector and a control vector with a dimension of 50.
[0113] To ensure vehicle stability and smoothness during motion, stability is reflected in the smoothness of the steering wheel angle, such as the change in steering wheel angle during lane changes. Smoothness is reflected in longitudinal speed control to address the jerking sensation of the vehicle during longitudinal motion. In this embodiment of the present invention, the Gauss-Legendre formula is used to derive the system dynamics equation, as follows:
[0114]
[0115] v i+1 =v i +a*dt+0.5*jerk i *dt 2
[0116] a i+1 =a i +jeak*dt
[0117] jerk i+1 =jerk i +djeak*dt
[0118]
[0119] δ i+1 =δ i +ω*dt
[0120] ω i+1 =ω i +γ*dt
[0121] γ=snap
[0122] Write the above formula in matrix form: Y i+1 =f(X i );
[0123] State vector: X = [x, y, v, a, jerk, θ, δ, ω]
[0124] Control vector: U = [djerk, snap]
[0125] Where L is the vehicle wheelbase; δ is the front wheel angle, which corresponds to the steering wheel angle; ω is the front wheel angular velocity, which corresponds to the steering wheel angular velocity; γ is the front wheel angular acceleration, which corresponds to the steering wheel angular acceleration; x, y are the vehicle's horizontal and longitudinal coordinates; v is the vehicle's longitudinal velocity; a is the longitudinal acceleration; jeak is the first-order derivative of acceleration; θ is the heading angle, djeak is the second-order derivative of acceleration; and snap is the angular acceleration.
[0126] The following combination Figure 2 The embodiments of the present invention are exemplarily described as follows:
[0127] The feedforward control rate vector and feedback control rate vector are calculated through feedback propagation to obtain the vehicle's current state value (i.e., the first state vector) and control value (i.e., the first control vector). The gradient value considering the influence of momentum is used to calculate the weighted average of the historical gradient values. The feedback control rate and feedforward control rate are calculated using an adaptive gradient learning rate. The vehicle system dynamics are updated based on the Gauss-Legendre integral formula.
[0128] Through the above calculations, the state vector (ie, the second state vector), the control vector (ie, the second state vector), and the new cost function value (ie, the current cost value) are output.
[0129] Sub-step 12: During the iterative calculation process, determine the second trajectory point vector that meets a preset condition as the target second trajectory point vector.
[0130] In some embodiments of the present invention, during the iterative calculation process, determining the second trajectory point vector that meets a preset condition as the target second trajectory point vector includes:
[0131] During the iterative calculation process, a cost function is used to calculate a cost value, and based on the cost value, the second trajectory point vector at which the cost function is in a convergent state is determined as the target second trajectory point vector.
[0132] In some embodiments of the present invention, determining, based on the cost value, the second trajectory point vector at which the cost function is in a converged state as the target second trajectory point vector includes:
[0133] According to the cost value, the second trajectory point vector whose cost value error is within a preset range and in which the cost function is in a convergence state is determined as the target second trajectory point vector.
[0134] In some examples, the cost value error is the difference between the currently calculated cost value and the most recently calculated cost value.
[0135] In practical applications, the cost value of the cost function of the optimization parameters is calculated, and it is determined whether the error between the cost value of the current cost function and the cost value of the previous cost function is within the allowable preset range (such as the preset range is 0.01). If it is within the allowable range and the cost function converges, the iLQR iterative process is exited. If not, the next iterative solution is performed.
[0136] The following combination Figure 3 The present invention is illustrated by way of example:
[0137] 1. Configure iLQR iterative solution parameters, such as the maximum number of iterations, convergence tolerance, and penalty coefficient. Use the optimized solution (i.e., the first state vector and the first control vector) obtained in the previous planning cycle as the initial solution vector for this iteration and perform iterative solution.
[0138] 2. Set the cost function, optimize the parameter weights and the weight coefficients of the constraint parameters, and perform a backward pass to obtain the feedback control rate and feedforward control rate at each moment. In some examples, the number of points to be optimized is 50, so the dimension of the feedback control vector and the feedforward control rate obtained in the backward pass is 49.
[0139] 3. Perform forward propagation, starting from the initial state, initialize the state and control input (i.e., the first state vector and the first control vector). At each moment, use the feedforward control rate and feedback control rate obtained by backpropagation to update the input at the current moment (i.e., the second control vector); then use the new control input to calculate the new state vector (i.e., the second state vector) through the system dynamics equation, and then traverse the entire planning optimization points to obtain the complete forward propagation state vector and control vector.
[0140] 4. At the same time, calculate the cost value of the cost function of the optimization parameter, and determine whether the error between the cost value of the current cost function and the cost value of the previous cost function is within the allowable preset range (such as the preset range is 0.01). If it is within the allowable range and the cost function converges, exit the iLQR iterative process. If not, proceed to the next iterative solution.
[0141] 5. Through the above iterative calculation process, the optimal trajectory point vector is obtained, including the state vector [x final ,y final ,v final ,a final ,jerk fina1 ,θ final ,δ final,ω final ] and the control vector [djerk final ,snap final ], and sends the optimal trajectory point vector to the downstream control end for actual vehicle control. The downstream control module controls the vehicle to follow the planned trajectory based on the data sent by the plan.
[0142] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0143] Some embodiments of the present invention also provide a vehicle trajectory planning device, which may specifically include:
[0144] The acquisition module is used to obtain the current vehicle status through sensors during the autonomous driving process;
[0145] The trajectory planning module is connected to the acquisition module and is used to perform trajectory planning according to the current vehicle state to obtain a target trajectory that is adapted to the current driving task.
[0146] Optionally, performing trajectory planning according to the current vehicle state to obtain a target trajectory adapted to the current driving task includes:
[0147] Determining a first trajectory point vector according to the current vehicle state, and performing iterative calculation based on the first trajectory point vector to obtain a target second trajectory point vector;
[0148] The target trajectory adapted to the current driving task is determined according to the target second trajectory point vector.
[0149] Optionally, performing iterative calculation according to the first trajectory point vector to obtain a target second trajectory point vector includes:
[0150] A second trajectory point vector is calculated according to the first trajectory point vector, and during the iterative calculation process, the second trajectory point vector that meets a preset condition is determined as the target second trajectory point vector.
[0151] Optionally, calculating the second trajectory point vector according to the first trajectory point vector includes:
[0152] determining a weighted average of historical gradient values, and calculating the second trajectory point vector based on the weighted average of the historical gradient values and the first trajectory point vector;
[0153] The iterative calculation process is implemented by gradient descent, and the historical gradient value is the gradient value that has been used in the iterative calculation process.
[0154] Optionally, calculating the second trajectory point vector according to the weighted average of the historical gradient values and the first trajectory point vector includes:
[0155] Determining a feedback control rate and a feedforward control rate; wherein the feedback control rate and the feedforward control rate are used to control the step size of parameter update during the gradient descent process;
[0156] The second trajectory point vector is calculated according to the feedback control rate, the feedforward control rate, a weighted average of the historical gradient values, and the first trajectory point vector.
[0157] Optionally, the feedback control rate is associated with the Euclidean norm of the current gradient.
[0158] Optionally, determining the feedback control rate includes: determining the feedback control rate according to a feedback control weight coefficient and the Euclidean norm of the current gradient.
[0159] Optionally, the feedforward control rate is negatively correlated with the number of iterative calculations.
[0160] Optionally, determining the feedforward control rate includes: determining the feedforward control rate according to a feedforward control initial value and the number of iterative calculations.
[0161] Optionally, the first trajectory point vector includes a first control vector and a first state vector, the second trajectory point vector includes a second control vector and a second state vector, and calculating the second trajectory point vector according to the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, and the first trajectory point vector includes:
[0162] Calculating the second control vector according to the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, the first control vector, and the first state vector;
[0163] The second state vector is calculated based on the second control vector.
[0164] Optionally, calculating the second state vector according to the second control vector includes:
[0165] A second state vector is calculated based on the second control vector using a system dynamics equation.
[0166] Optionally, the first state vector and the second state vector include any one or more of the following: horizontal coordinate, longitudinal coordinate, longitudinal velocity, longitudinal acceleration, first-order derivative of acceleration, heading angle, front wheel angle, front wheel angular velocity.
[0167] Optionally, the first control vector and the second control vector include any one or more of the following: a second-order derivative of acceleration, an angular acceleration.
[0168] Optionally, during the iterative calculation process, determining the second trajectory point vector that meets a preset condition as the target second trajectory point vector includes:
[0169] During the iterative calculation process, a cost function is used to calculate a cost value, and based on the cost value, the second trajectory point vector at which the cost function is in a convergent state is determined as the target second trajectory point vector.
[0170] Optionally, determining, according to the cost value, the second trajectory point vector at which the cost function is in a converged state as the target second trajectory point vector includes:
[0171] According to the cost value, the second trajectory point vector whose cost value error is within a preset range and in which the cost function is in a convergence state is determined as the target second trajectory point vector.
[0172] Optionally, the cost value error is the difference between the currently calculated cost value and the most recently calculated cost value.
[0173] Some embodiments of the present invention further provide an automatic driving system, comprising:
[0174] The device as described above is used to obtain the current vehicle state through sensors, and perform trajectory planning based on the current vehicle state to obtain a target trajectory adapted to the current driving task;
[0175] a driving domain controller, the driving domain controller being connected to the device and configured to control the execution of autonomous driving according to the target trajectory;
[0176] The autonomous driving system also includes various on-board sensors for collecting vehicle status information and providing the vehicle status information to the above-mentioned device for trajectory planning.
[0177] Some embodiments of the present invention further provide an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above method when executed by the processor.
[0178] Some embodiments of the present invention also provide a vehicle comprising the automatic driving system as described above, or comprising the device as described above.
[0179] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0180] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above method when executed by a processor.
[0181] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0182] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0183] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatuses, or computer program products. Thus, embodiments of the present invention may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware. Furthermore, embodiments of 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 magnetic disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.
[0185] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the 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 the 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 terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0188] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0189] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the above elements.
[0190] The above describes in detail the method, apparatus, system, equipment, and vehicle for vehicle trajectory planning. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A method for vehicle trajectory planning, characterized in that: The method comprises: During autonomous driving, obtain the current vehicle status; A trajectory is planned based on the current vehicle state to obtain a target trajectory that is suitable for the current driving task.
2. The method according to claim 1, characterized in that The performing trajectory planning according to the current vehicle state to obtain a target trajectory adapted to the current driving task includes: Determining a first trajectory point vector according to the current vehicle state, and performing iterative calculation based on the first trajectory point vector to obtain a target second trajectory point vector; The target trajectory adapted to the current driving task is determined according to the target second trajectory point vector.
3. The method according to claim 2, characterized in that The iterative calculation based on the first trajectory point vector to obtain the target second trajectory point vector includes: A second trajectory point vector is calculated according to the first trajectory point vector, and during the iterative calculation process, the second trajectory point vector that meets a preset condition is determined as the target second trajectory point vector.
4. The method according to claim 3, characterized in that The calculating the second trajectory point vector according to the first trajectory point vector includes: determining a weighted average of historical gradient values, and calculating the second trajectory point vector based on the weighted average of the historical gradient values and the first trajectory point vector; The iterative calculation process is implemented by gradient descent, and the historical gradient value is the gradient value that has been used in the iterative calculation process.
5. The method according to claim 4, characterized in that The calculating the second trajectory point vector according to the weighted average of the historical gradient values and the first trajectory point vector includes: Determining a feedback control rate and a feedforward control rate; wherein the feedback control rate and the feedforward control rate are used to control the step size of parameter update during the gradient descent process; The second trajectory point vector is calculated according to the feedback control rate, the feedforward control rate, a weighted average of the historical gradient values, and the first trajectory point vector.
6. The method according to claim 5, characterized in that The feedback control rate is associated with the Euclidean norm of the current gradient.
7. The method according to claim 6, characterized in that The determining of the feedback control rate includes: determining the feedback control rate according to a feedback control weight coefficient and the Euclidean norm of the current gradient.
8. The method according to claim 5, characterized in that The feedforward control rate is negatively correlated with the number of iterative calculations.
9. The method according to claim 8, characterized in that Determining the feedforward control rate includes: determining the feedforward control rate according to a feedforward control initial value and the number of iterative calculations.
10. The method according to any one of claims 5 to 9, characterized in that The first trajectory point vector includes a first control vector and a first state vector, the second trajectory point vector includes a second control vector and a second state vector, and calculating the second trajectory point vector according to the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, and the first trajectory point vector includes: Calculating the second control vector according to the feedback control rate, the feedforward control rate, the weighted average of the historical gradient values, the first control vector, and the first state vector; The second state vector is calculated based on the second control vector.
11. The method according to claim 10, characterized in that The calculating the second state vector according to the second control vector includes: A second state vector is calculated based on the second control vector using a system dynamics equation.
12. The method according to claim 10, characterized in that The first state vector and the second state vector include any one or more of the following: a horizontal coordinate, a longitudinal coordinate, a longitudinal velocity, a longitudinal acceleration, a first-order derivative of acceleration, a heading angle, a front wheel turning angle, and a front wheel turning angular velocity.
13. The method according to claim 10, characterized in that The first control vector and the second control vector include any one or more of the following: a second-order derivative of acceleration, an angular acceleration.
14. The method according to claim 3, characterized in that In the iterative calculation process, determining the second trajectory point vector that meets a preset condition as the target second trajectory point vector includes: During the iterative calculation process, a cost function is used to calculate a cost value, and based on the cost value, the second trajectory point vector at which the cost function is in a convergent state is determined as the target second trajectory point vector.
15. The method according to claim 14, characterized in that The step of determining, based on the cost value, the second trajectory point vector at which the cost function is in a converged state as the target second trajectory point vector includes: According to the cost value, the second trajectory point vector whose cost value error is within a preset range and in which the cost function is in a convergence state is determined as the target second trajectory point vector.
16. The method according to claim 15, characterized in that The cost value error is the difference between the currently calculated cost value and the most recently calculated cost value.
17. A vehicle trajectory planning device, characterized in that: The device comprises: An acquisition module, wherein the acquisition module is used to acquire the current vehicle state through sensors during the autonomous driving process; A trajectory planning module is connected to the acquisition module, and is used to perform trajectory planning according to the current vehicle state to obtain a target trajectory adapted to the current driving task.
18. An automatic driving system, characterized in that: The system comprises: The device of claim 17, configured to obtain a current vehicle state through a sensor, and perform trajectory planning based on the current vehicle state to obtain a target trajectory adapted to a current driving task; A driving domain controller is connected to the device and is used to control the execution of automatic driving according to the target trajectory.
19. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 16 when executed by the processor.
20. A vehicle, characterized in that: Includes the autonomous driving system as claimed in claim 18, or includes the device as claimed in claim 19.
21. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.
22. A computer program product, characterized in that A computer program is included which, when executed by a processor, implements the method according to any one of claims 1 to 16.