Learning-based predictive control method for driverless vehicles based on long short-term memory networks
By using the learning predictive control method based on LSTM in self-driving cars, combined with the Paceka tire model and the Ackerman driving car model, the problems of path planning and vehicle model design in complex environments are solved, and the performance of self-driving cars is improved. Safety performance and trajectory tracking capabilities reduce computing requirements.
Patent Information
- Application Number
- CN202410055698.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-01-15
AI Technical Summary
Existing autonomous vehicle technology is difficult to achieve reasonable path planning and vehicle model design in complex environments, leading to safety issues, especially when computing power is limited, and the application of model predictive control (MPC) is limited.
A learning predictive control method for driverless cars based on the long short-term memory network (LSTM) is used, combined with the Paceka tire model and the Ackerman driving car model, to establish a nonlinear vehicle dynamics model, and use model predictive control (MPC) and adaptive gradient descent methods to optimize control strategies to reduce accident risks.
Through accurate model establishment and optimized control strategies, autonomous vehicles can better adapt to different road conditions and driving needs, improve safety performance and the performance and robustness of trajectory tracking systems, reduce computing requirements, and achieve efficient and reliable Trajectory tracking.
Smart Images

Figure CN118025223B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of control technology, and in particular relates to a learning-based predictive control method for an unmanned vehicle based on a long short-term memory network. Background Art
[0002] With the improvement of hardware computing power and the update of control methods, autonomous vehicle (AV) technology is booming. However, in actual applications, there are also autonomous vehicle accidents, even life-threatening phenomena. Safety issues are always the primary consideration for academia and manufacturers. Therefore, first of all, reasonable path planning should be achieved in complex environments; secondly, the path tracking problem based on the vehicle model. However, how to establish a vehicle model and design a reasonable controller to achieve path tracking are still difficult problems under the current autonomous vehicle technology.
[0003] As a typical automatic feature extraction method, deep learning has attracted more and more attention in recent years. Generally, when using big data with complex features for modeling, deep learning performs better than shallow learning methods. The vehicle dynamics model is a complex nonlinear system, and the advantage of deep learning in extracting features will be more obvious when dealing with this system.
[0004] Model Predictive Control (MPC) is widely recognized as a high-performance and practical control technology. This model-based control strategy uses predictions of system responses to establish appropriate control responses and is widely used in various fields. When the hardware computing power meets the requirements, model predictive control has outstanding and powerful control capabilities and is suitable for high-precision path tracking problems. However, in practical problems, MPC is often limited by computing power. Therefore, taking appropriate measures to reduce computing requirements can ensure that this efficient algorithm can be used under low computing power conditions, meeting the manufacturer's requirements. Summary of the invention
[0005] In order to solve the technical problems existing in the prior art, the present invention provides a learning predictive control method for an unmanned vehicle based on a long short-term memory network. By accurately establishing a model and optimizing the control strategy, the risk of accidents can be reduced, and the vehicle can adapt to different road conditions and driving requirements, thereby improving the safety performance of the autonomous driving vehicle.
[0006] The present invention can be achieved by adopting the following technical solutions:
[0007] A learning-based predictive control method for an unmanned vehicle based on a long short-term memory network, the method comprising:
[0008] 1. A learning predictive control method for an unmanned vehicle based on a long short-term memory network, characterized in that it comprises the following steps:
[0009] S1. Combine the linearized longitudinal force and lateral force formulas of the Pascheka tire model to establish a nonlinear vehicle dynamics model based on the Ackerman driving car model;
[0010] S2, using the historical input data and historical state data of the vehicle as a training set, training the nonlinear vehicle dynamics model based on the long short-term memory network, and obtaining an optimized nonlinear vehicle dynamics model;
[0011] S3. Use the model predictive control (MPC) method as the optimized vehicle dynamics model control strategy to set the optimization problem; use the gradient descent method with adaptive learning parameters to solve the optimization problem, output the optimal control sequence in the control time domain, and use the first control signal in the optimal control sequence as the actual control input of the autonomous driving vehicle at the next moment.
[0012] Specifically, the linearized longitudinal force and lateral force formulas of the Paschka tire model are combined to establish a nonlinear vehicle dynamics model based on the Ackerman driving car model, including:
[0013] The vehicle dynamics model was established based on the Ackerman driving car model by applying Newton's second law to the longitudinal, lateral and yaw degrees of freedom;
[0014] The formulas of longitudinal force and lateral force in the Pascheka tire model are simplified, the motion of the vehicle dynamics model in the local fixed body coordinate system is converted into the motion of the inertial coordinate system, and the tire model is established;
[0015] A nonlinear vehicle dynamics model is established based on the vehicle dynamics model and tire model.
[0016] Specifically, the vehicle dynamics model is expressed as:
[0017]
[0018] Where Iz refers to the yaw inertia, m is the vehicle weight, and δ f is the front wheel steering angle, l f , l r is the distance from the center of mass to the front and rear axles, is the vehicle longitudinal velocity, is the vehicle lateral velocity, is the vehicle longitudinal acceleration, is the lateral acceleration of the vehicle, v cf 、v cr is the front wheel longitudinal speed, the rear wheel longitudinal speed, v cf 、v cr is the lateral speed of the front wheel and the lateral speed of the rear wheel, is the yaw angular rate, is the yaw angular acceleration, F lf 、F lr is the front wheel longitudinal force, the rear wheel longitudinal force, F cf 、F cr is the front wheel lateral force and the rear wheel lateral force;
[0019] The tire model is expressed as:
[0020]
[0021]
[0022] in, Represent the longitudinal acceleration and lateral acceleration of the vehicle in the inertial coordinate system, respectively. is the longitudinal velocity of the vehicle in the local fixed body coordinate system, is the vehicle lateral velocity in the local fixed body coordinate system, is the yaw angle.
[0023] Specifically, the nonlinear vehicle dynamics model is expressed as follows:
[0024] z(t+1)=f ture (z(t),u(t));u(t)=δ f ;
[0025] Among them, z(t+1) is the predicted state of the vehicle system at time t+1, z(t) is the state of the vehicle system at time t, u(t) is the control input at time t, and δ f is the front wheel steering angle, is the longitudinal velocity of the vehicle in the local fixed body coordinate system, is the vehicle lateral velocity in the local fixed body coordinate system, is the yaw angle, is the yaw rate, X and Y represent the longitudinal velocity and lateral velocity of the vehicle in the local fixed body coordinate system, respectively.
[0026] Specifically, the method uses the historical input data and historical state data of the vehicle as a training set, trains the nonlinear vehicle dynamics model based on a long short-term memory network, and obtains an optimized nonlinear vehicle dynamics model, including: providing a physical basis and constraint conditions for vehicle driving based on the nonlinear vehicle dynamics model, substituting the historical input data and historical state data into the LSTM network for fitting to obtain an optimized nonlinear vehicle dynamics model, and the optimized nonlinear vehicle dynamics model can be used to predict the predicted state of the vehicle.
[0027] Specifically, the optimized nonlinear vehicle dynamics model is expressed as:
[0028]
[0029] Among them, z(t) is the vehicle system state at time t, u(t) is the control input at time t, is the predicted state vector at time t+1, and f(z(t),u(t)) is the mapping established by the LSTM network.
[0030] Specifically, step S3 includes:
[0031] S31, set the optimization problem, input the reference trajectory, set the initial number of iterations p = 0, set the optimization termination condition threshold J set ;
[0032] S32, based on the reference trajectory, the optimization problem is calculated online through the optimized vehicle dynamics model. If the value of the target cost function J>J set , let p=p+1, go to step S33; otherwise let p=0, go to step S35;
[0033] S33, predicting the state through the output of the optimized vehicle dynamics model Calculate the Jacobi matrix based on the predicted state and update the control input using the gradient descent method GD;
[0034] S34, let the learning rate η be updated adaptively with iteration, and return to step S32;
[0035] S35. Output an optimal control input sequence, and use the first element in the optimal control sequence as the actual control input of the autonomous driving vehicle.
[0036] Specifically, the optimization problem is expressed as:
[0037]
[0038]
[0039] Among them, J(t) is called the target cost function, is the prediction time domain T P The predicted state under R T (t) is the reference trajectory state, obtained by the path planning method; U T (t) is the control time domain T c The optimal control input under T (t) is the control input increment, || means the absolute value of the elements in the vector; Δu(t) = u(t+1)-u(t), which means the change of u(t); ΔU(t) = U(t+1)-U(t) means the change of U(t), a and b are and the weight coefficient of U(t), umin and u max , z min and z max are the upper and lower bounds of the control input and system state, respectively.
[0040] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0041] 1. The present invention combines the Pacejka tire model to simplify the system and establishes a nonlinear vehicle dynamics model based on the Ackerman driving car model. The model includes important parameters of the vehicle dynamics system and establishes a connection with mathematical formulas. Accurate modeling has become a guarantee of control accuracy.
[0042] 2. The present invention applies deep learning technology to trajectory tracking problems by introducing LSTM networks for modeling. LSTM networks have good sequence modeling and memory capabilities and can effectively model dynamic and time series data. By using LSTM networks, autonomous vehicles can better capture the time dependency and sequence properties in trajectory tracking problems, improving the performance and robustness of trajectory tracking systems.
[0043] 3. The present invention uses MPC to solve the model, taking advantage of the model predictive control to achieve a balance between real-time feedback and optimal control, and generates the optimal control input sequence by iteratively solving the optimization problem and considering the system model and constraints. At the same time, the computational complexity of the iterative process is reduced through adaptive learning parameters and the gradient descent GD algorithm. The self-driving car can track the trajectory in an efficient and reliable manner and adapt to complex road and environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 the structures shown in these drawings without paying creative work.
[0045] Figure 1 A flowchart of optimizing the trajectory tracking problem of an autonomous driving vehicle based on data-driven model predictive control according to an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of a vehicle dynamics model according to an embodiment of the present invention;
[0047] Figure 3 It is a structural diagram of an expanded LSTM network according to an embodiment of the present invention;
[0048] Figure 4 1 is a structural diagram of an LSTM unit in an embodiment of the present invention;
[0049] Figure 5 The present invention is a flowchart of using the gradient descent method GD to solve the optimization problem of model predictive control. DETAILED DESCRIPTION
[0050] The technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is obvious that the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and the implementation of the present invention is not limited to this. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0051] Embodiment 1:
[0052] The overall idea of the present invention is to use the learning predictive control method for unmanned vehicles based on long short-term memory networks to solve the problem of nonlinear vehicle dynamics modeling and predictive control. Compared with the prior art, the present invention establishes a nonlinear vehicle dynamics model that combines the Ackerman driving car model with the Pacejka tire model, making the algorithm more practical, and combines LSTM, gradient descent method GD and MPC, using LSTM network to predict nonlinear vehicle dynamics, combining optimization problems to design a rolling optimization control method, and combining gradient descent method GD optimization operation, compared with the prior art, reducing the MPC calculation requirements while achieving more accurate prediction and control effects.
[0053] like Figure 1 As shown, the learning predictive control method for an unmanned vehicle based on a long short-term memory network of the present invention comprises the following steps:
[0054] S1. Combine the linearized longitudinal and lateral forces of the Pacejka tire model to establish a nonlinear vehicle dynamics model based on the Ackerman driving car model.
[0055] Specifically, a nonlinear vehicle dynamics model is established based on the Ackerman driving car model for dynamic analysis and simplified in combination with the Pacejka tire model. The present invention divides the path tracking problem into a vehicle model and a tire model. The bicycle model of the Ackerman steering vehicle is a simple and effective vehicle model that has been widely used in vehicle stability control. The Ackerman driving car model is one of the most classic and commonly used modeling models in the field of autonomous driving. It has the advantage of not having to consider factors such as the size and model of the car. The autonomous driving control method established on this basis is universal. In order to use this model, the following simplified assumptions need to be considered: (1) Multiple wheels on the same axle are concentrated at the center of the front axle or rear axle; (2) The weight of the vehicle body is evenly distributed on each wheel; (3) Suspension movement, slip phenomenon and aerodynamic bodies are ignored.
[0056] Based on the Ackerman driving car model, Newton's second law is applied to the longitudinal, lateral and yaw degrees of freedom to establish a vehicle dynamics model. The vehicle dynamics model is expressed as:
[0057]
[0058] Where Iz refers to the yaw inertia, m is the vehicle weight, and δ f is the front wheel steering angle, l f , l r is the distance from the center of mass to the front and rear axles, is the vehicle longitudinal velocity (in the xoy plane), is the vehicle lateral velocity (in the xoy plane), is the vehicle longitudinal acceleration, is the lateral acceleration of the vehicle, v cf 、v cr is the front wheel longitudinal speed, the rear wheel longitudinal speed, v cf 、v cr is the lateral speed of the front wheel and the lateral speed of the rear wheel, is the yaw angular rate, is the yaw angular acceleration, F lf 、F lr is the front wheel longitudinal force, the rear wheel longitudinal force, F cf 、F cr is the lateral force of the front wheel and the lateral force of the rear wheel; Figure 2 , which is a schematic diagram of a vehicle dynamics model according to an embodiment of the present invention, wherein XOY represents an inertial coordinate system and xoy represents a local body fixed coordinate system.
[0059] In addition to the influence of aerodynamics and gravity, other forces on the vehicle come from the tires, so it is very important to choose a tire model that is close to the actual situation. In order to solve the lateral and longitudinal forces on the tire, the present invention adopts a semi-empirical nonlinear model called the Pacejka tire model. The Pacejka tire model can excellently handle nonlinear and complex tire dynamics problems while ensuring practical application. Combining the Ackerman driving car model with the Pacejka tire model, the algorithm proposed in the present invention can be applied to autonomous driving car scenarios under different design requirements, which is more universal. When the curve angle and slip rate of the tire are very small, the formulas of the longitudinal force and lateral force in the Pacejka tire model are simplified, and the linear simplified formulas of the longitudinal force and lateral force in the tire model are as follows:
[0060]
[0061] Among them, F lf / F lr is the front / rear wheel longitudinal force, F cf / F cr is the lateral force of the front / rear wheels, C lf , C lr Respectively represent the longitudinal stiffness of the front wheel and the rear wheel; C cf , C cr Represents the lateral stiffness of the front and rear wheels; s f ,s r Represents the slip rate of the front and rear wheels; α f , α r Indicates the sideslip angle of the front and rear wheels.
[0062] The motion of the vehicle dynamics model in the local fixed body coordinate system is converted into the motion of the inertial coordinate system, and the tire model is established. The tire model is expressed as:
[0063]
[0064]
[0065] in, Represent the longitudinal acceleration and lateral acceleration of the vehicle in the inertial coordinate system, respectively. is the longitudinal velocity of the vehicle in the local fixed body coordinate system, is the vehicle lateral velocity in the local fixed body coordinate system, is the yaw angle.
[0066] The vehicle model and tire model are established. Based on the vehicle model and tire model, a nonlinear vehicle dynamics model is established. The established nonlinear vehicle dynamics model helps to achieve "high-precision control". Based on the above established vehicle model and tire model, δf The front wheel steering angle is used as the control variable u, u = δ f , and it is obvious that the mathematical model established above is nonlinear.
[0067] Combining the above states, the six-state space variable vector z of the vehicle can be expressed as:
[0068]
[0069] in, is the longitudinal velocity of the vehicle in the local fixed body coordinate system, is the vehicle lateral velocity in the local fixed body coordinate system, is the yaw angle, is the yaw rate, X, Y represent the longitudinal velocity and lateral velocity of the vehicle in the inertial coordinate system, respectively.
[0070] The nonlinear vehicle dynamics model can be expressed as follows:
[0071] z(t+1)=f ture (z(t),u(t)),u(t)=δ f
[0072] Among them, z(t+1) is the predicted state of the vehicle system at time t+1, z(t) is the state of the vehicle system at time t, that is, the six-state space variables of the vehicle at time t, u(t) is the control input at time t, δ f is the front wheel steering angle.
[0073] By modeling and analyzing the vehicle's dynamics, a nonlinear vehicle dynamics model is established based on the vehicle dynamics model and tire model, so that the model meets the dynamic constraints in the actual driving process and ensures the accuracy of subsequent predictions and controller implementation.
[0074] S2. The historical input data and historical state data of the vehicle are used as training sets, and the nonlinear vehicle dynamics model is trained based on the long short-term memory network (LSTM) to obtain an optimized nonlinear vehicle dynamics model. The optimized nonlinear vehicle dynamics model is used to predict the state and behavior of the future vehicle.
[0075] The long short-term memory network (LSTM) is similar to the recurrent neural network (RNN) in overall structure. However, in the standard RNN model, the gradient phenomenon often disappears because the network has difficulty capturing long-term dependencies; this is because the multiplication gradient decays exponentially with the number of layers. Therefore, the information stored in a long time interval is very limited in the short-term memory. LSTM is based on RNN, and makes appropriate adjustments to the calculation of hidden states, and also adds the number of cell states C as a memory unit to associate information with a longer time span. The LSTM network has the ability to model and memorize sequences, which can better understand and predict the trajectory of the vehicle, making the self-driving car "adaptable to complex environments". It uses three gated units (forget gate, input gate, and output gate) to protect and control the state of the memory unit, so that the information will be stored and memorized for a long time. For these reasons, the LSTM network will perform better in the modeling process, in which the input at the beginning of the long sequence is crucial to the prediction of the output at the end of the sequence. The nonlinear vehicle dynamics model can provide the physical basis and constraints of the vehicle's driving, and the LSTM network can learn from the historical input and output on this basis and use it to predict the state and behavior of the future vehicle. By using LSTM networks, time series data in driving tasks can be better processed, and combined with nonlinear vehicle dynamics models, driverless cars can more accurately predict and control their driving status and paths.
[0076] The LSTM network can be divided into an unfolded LSTM network structure, such as Figure 3 As shown in FIG. 1 , it is a structural diagram of the expanded LSTM network of an embodiment of the present invention. The LSTM network includes multiple LSTM units, using m∈R (n+m)×T The matrix representing the input sequence is used The matrix representing the network output sequence is passed to the next LSTM unit in the unrolled sequence. The output of each LSTM unit is the hidden state, and the vector of the hidden state is represented by h. The network output at the end of the prediction period Depends on all internal states h(1),…,h(T), where the number of internal states T (i.e., the number of LSTM units) corresponds to the length of the time series input sample. The LSTM network is iterated from k=1 to k=T to calculate the following equation, which is calculated from the input sequence m to the output sequence Mapping:
[0077]
[0078]
[0079]
[0080]
[0081] h(t)=o(t)tanh(c(t))
[0082]
[0083] Among them, σ(·) is the sigmoid function, tanh(·) is the hyperbolic tangent function, both of which are activation functions. h(t) is the internal state, is a weight matrix ω y and the bias vector b y The output of the repeated LSTM module. In addition, c(t) is the cell state, which stores the information to be passed to the network unit, where and b c The weight matrix and bias vector represent the input and hidden state vectors in the cell state activation function, respectively. The nonlinear function of a series of interactions performed in each LSTM unit is expressed as In the LSTM network, the internal structure of the repeating module performs the above iterative calculations.
[0084] like Figure 4 As shown in FIG. 1 , it is a structural diagram of an LSTM unit of an embodiment of the present invention. The LSTM unit includes an input gate, a forget gate, and an output gate. The outputs of the input gate, the forget gate, and the output gate of the LSTM unit are represented by i(t), f(t), and o(t), respectively. Accordingly, are the weight matrices of the input vector m and the hidden state vector h in the input gate, forget gate, and output gate, respectively, i , b f , b o Represent the bias vectors in the three gates respectively. These gate control units and cell states interact through a series of nonlinear functions, weight matrices, and bias terms to realize the operation and learning process of the LSTM unit.
[0085] Specifically, based on the nonlinear vehicle dynamics model, the physical basis and constraints of the vehicle driving are provided, and the historical input and output are substituted into the LSTM network for fitting to obtain an optimized nonlinear vehicle dynamics model, which can be used to predict the predicted state of the vehicle. By using the LSTM network, the time series data in the driving task can be better processed, and combined with the nonlinear vehicle dynamics model, the driverless car can more accurately predict and control its driving state and path.
[0086] The vehicle's historical input includes the vehicle's acceleration, braking, steering and other manipulation input data at multiple moments in the past, and the historical output includes the vehicle's historical status, such as position, posture, speed, etc. The LSTM network has memory units and gating mechanisms, which can effectively capture long-term dependencies in sequence data. The vehicle's historical input data and output data can be used as training data for the LSTM network to learn the vehicle's dynamic behavior to predict the vehicle's future action state and posture. That is, the LSTM network can be used as a modeling method to establish an optimized nonlinear vehicle dynamics model.
[0087] Vehicle history input U pass (t) is expressed as:
[0088] U pass (t)=[u(t-1),u(t-2),…,u(tl)],
[0089] Among them, u(t) and u(t-1) are the control inputs at time t and t-1 respectively, and l is the total amount of data.
[0090] Vehicle history status Z pass (t) is expressed as:
[0091] Z pass (t)=[z(t),z(t-1),…,z(tl)].
[0092] Among them, z(t) and z(t-1) are the historical status of the vehicle at time t and t-1 respectively, and l is the total amount of data.
[0093] The optimized nonlinear vehicle dynamics model can be expressed as:
[0094]
[0095] Among them, z(t) is the vehicle system state at time t, u(t) is the control input at time t, is the predicted state vector at time t+1, and f(z(t),u(t)) is the mapping established by the long short-term memory network LSTM network.
[0096] The learning model of the driverless car based on the long short-term memory network (LSTM) can build a model more accurately and more in line with the actual driving situation by learning from past driving data. Compared with the traditional ideal situation modeling method, this precise modeling can reduce the limitations of the model predictive control MPC when considering robustness. While saving input control energy, it improves the accuracy of system control and reduces the risk of path deviation or collision with obstacles due to model deviation. This precise modeling helps driverless cars better adapt to the actual driving environment and reduces the possibility of accidents. The present invention enables autonomous driving cars to better learn and adapt to complex road and environmental conditions by applying the deep learning LSTM network to trajectory tracking problems.
[0097] S3. Use the model predictive control (MPC) method as the optimized vehicle dynamics model control strategy to set the optimization problem; use the gradient descent method with adaptive learning parameters to solve the optimization problem, output the optimal control sequence in the control time domain, and use the first control signal in the optimal control sequence as the actual control input of the autonomous driving vehicle at the next moment.
[0098] Specifically, after using LSTM to establish the model, model predictive control (MPC) is used as the vehicle dynamics model control strategy, the optimization problem is set, and rolling optimal control is performed, and model predictive control (MPC) is used to solve it. Model predictive control (MPC) is a model-based control strategy that is widely used in the control and optimization of dynamic systems. The basic principle of MPC can be divided into three steps: establishing a prediction model, rolling optimization, and feedback correction. Among them, the prediction model has been established using LSTM. Model predictive control performs multi-step predictions on the vehicle system in each control cycle, and solves the optimization problem (optimization) based on the predicted values, thereby obtaining the input sequence that minimizes the objective function in the prediction time domain, and finally only uses the first input of the input sequence as the input value of the next moment (rolling), which reflects the idea of MPC rolling optimization.
[0099] Specifically, Figure 5 As shown, step S3 specifically includes:
[0100] S31, set the optimization problem, input the reference trajectory R(t), set the initial number of iterations p=0, and set the optimization termination condition threshold J set .
[0101] Given the prediction time domain T P and control time domain T c , the optimization problem in the model predictive control MPC method can be expressed as:
[0102]
[0103]
[0104] Among them, J(t) is called the target cost function, is the prediction time domain T P The predicted state under R T (t) is the reference trajectory state, obtained by the path planning method; U T (t) is the control time domain T c The optimal control input under T (t) is the control input increment, || means the absolute value of the elements in the vector; Δu(t) = u(t+1)-u(t), which means the change of u(t); ΔU(t) = U(t+1)-U(t)
[0105] represents the change of U(t), a and b are and the weight coefficient of U(t), u min 、u max are the upper and lower bounds of the control input, z min 、z max are the upper and lower bounds of the system state respectively. Among them:
[0106]
[0107] R T (t)=[r(t+1),r(t+2),…,r(t+T p )];
[0108] U T (t)=[u(t),u(t+1),…,u(t+T c -1)];
[0109] ΔU T (t)=[Δu(t),Δu(t+1),…,Δu(t+T c -1)].
[0110] It can be seen that the minimization of the target cost function will simultaneously ensure that the error between the reference trajectory state and the actual state is minimized and the control input increment is minimized. The relative values of the weight coefficients a and b can be set according to different models of actual vehicles to determine whether to prioritize minimizing the error or minimizing the control input increment. The design of minimizing the error in the target cost function embodies the idea of MPC feedback correction. It can be seen from S1 that the front wheel steering angle is used as the control variable, and the control input increment is the change in the front wheel steering angle.
[0111] In the process of manufacturing self-driving cars, different optimization termination condition thresholds can be set for the target cost function according to different product parameters and accuracy requirements. When the target cost function is lower than the threshold, it means that the error and control input increment at this time meet the set requirements. The lower the threshold, the higher the corresponding control accuracy. However, if the threshold is too low, there may be a phenomenon that there is still no solution after infinite iterations. At this time, the threshold should be adjusted appropriately, or the path planning algorithm should be improved.
[0112] The reference trajectory in this embodiment has been given by the path planning algorithm, that is, the path planning algorithm calculates a safe and efficient moving path by considering factors such as traffic conditions, obstacles, and road rules to obtain the reference trajectory.
[0113] S32, based on the reference trajectory, the optimization problem is calculated online through the optimized vehicle dynamics model. If the value of the target cost function J>J set , let p=p+1, go to step S33; otherwise let p=0, go to step S35;
[0114] The MPC method is based on the LSTM network for prediction. Even if a new environment is entered, the vehicle parameters and constraints related to the environment, the path planning and speed constraints determined by the environment have changed, the method can learn and predict the vehicle behavior under different road conditions through real-time learning. This enables the MPC method to adapt to various road conditions, such as highways, urban roads, etc., and make corresponding control decisions according to driving needs. It can flexibly make adaptive adjustments and decisions in different driving environments according to the requirements of the driving task. The MPC method takes full account of constraints, such as the vehicle's range of motion, speed limit, collision avoidance, etc. By considering these constraints in the optimization process, the MPC method can help vehicles avoid dangerous driving behaviors and reduce the risk of accidents. It can make corresponding adjustments based on real-time road conditions and vehicle status to provide safer driving control.
[0115] S33, predicting the state through the output of the optimized vehicle dynamics model The Jacobi matrix is calculated based on the predicted state, and the control input is updated by the gradient descent method GD.
[0116] The optimization problem is solved using the gradient descent method (GD) with adaptive learning parameters, specifically including: calculating the Jacobi matrix based on the output vehicle prediction state of the optimized vehicle dynamics model, allowing the learning rate η to be adaptively updated with the iteration, and calculating the control input increment for p iterations; updating the control input through the optimal control input for p iterations and the control input increment for p iterations.
[0117] The use of gradient descent with adaptive learning parameters can reduce the number of iterations, and an adaptive learning strategy is proposed for further optimization to obtain the optimal control strategy. Specifically, the control input is updated by the optimal control input of iterating p times and the control input increment of iterating p times. The updated control input U p+1 (t) can be expressed as:
[0118] U p+1 (t) = U p (t)+ΔU p (t);
[0119]
[0120] Among them, U p (t) is the optimal control input for p iterations, ΔU p (t) is the control input increment for p iterations, η is the learning rate, and p is the number of iterations.
[0121] According to the target cost function J(t), the control input increment of the iteration p times is derived and the target cost function J(t) is substituted into the equation:
[0122]
[0123] Substituting into the derivation, we can get ΔU p (t):
[0124]
[0125] It can be found that the key to dealing with optimization problems is to calculate the derivative of the prediction model output, that is, the Jacobian matrix The Jacobi matrix is calculated according to the output vehicle prediction state of the optimized vehicle dynamics model, and the control input increment of the calculation iteration p times is calculated according to the Jacobi matrix.
[0126] Since the activation functions used in the LSTM network are continuously differentiable sigmoid and hyperbolic tangent functions, it is feasible to calculate the Jacobian matrix of the optimized vehicle dynamics model. In addition, numerical differentiation can be used as an alternative method to ensure that every element in the Jacobian matrix is available.
[0127] S34, let the learning rate η be updated adaptively with iteration, and return to step S32;
[0128] In order to further speed up the convergence, the learning rate η is updated adaptively with iteration, and we can get:
[0129]
[0130] Among them, α is the decay rate of each iteration, and p is the number of iterations.
[0131] S35. Output the optimal control input sequence, and use the first element in the optimal control sequence as the actual control input of the autonomous driving vehicle. The optimal control input sequence U(t):
[0132] U T (t)=[u(t),u(t+1),…,u(t+T c -1)],
[0133] The first element u(t) in the optimal control sequence is applied to the system as a control signal to ensure that the system output can accurately track the reference trajectory in different modes.
[0134] By using the MPC controller combined with the measured values and prediction model of the current autonomous vehicle system, the system output in the future time domain can be predicted. By solving the optimization problem that satisfies the objective function and various constraints, a series of optimal control sequences in the control time domain can be obtained, which is shorter than the prediction time domain. Then, the first element in the obtained optimal control sequence is used as the actual control quantity of the autonomous vehicle, and then the above process is repeated at the next moment. The first element of the optimal control sequence is selected here, which is the idea of rolling optimization of model predictive control. Through this rolling method, the controlled object can be continuously controlled to achieve continuous control of the system.
[0135] The present invention provides a learning predictive control method for an unmanned vehicle based on a long short-term memory network. By using an MPC controller combined with the measured values and prediction model of the current autonomous vehicle system, the system output in a future time domain can be predicted. By solving the optimization problem that satisfies the objective function and various constraints, a series of optimal control sequences in the control time domain can be obtained, and the time period is shorter than the prediction time domain. Then, the first element in the obtained optimal control sequence is used as the actual control quantity of the autonomous vehicle, and then the above process is repeated at the next moment. The first element of the optimal control sequence selected here is the rolling optimization of the model predictive control. Through this rolling optimization, the controlled object can be continuously controlled to achieve continuous control of the system. Accurate model establishment and optimization control strategy can reduce the risk of accidents and enable the vehicle to adapt to different road conditions and driving requirements. Through precise path tracking and efficient control, the safety performance of autonomous vehicles can be improved.
[0136] The present invention is open and scalable for different vehicle dynamics models and can be applied to different types of autonomous vehicles and different road scenarios. By adjusting the parameters of the vehicle model and tire model and optimizing the control parameters, it can be customized and expanded according to actual needs. This openness and scalability make the present invention widely adaptable and can meet the needs of different autonomous vehicles.
[0137] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. Learning-based predictive control method for driverless cars based on long short-term memory networks, It is characterized in that The following steps are involved: S1. Combine the linearized longitudinal force and lateral force formulas of the Pascheka tire model to establish a nonlinear vehicle dynamics model based on the Ackerman driving car model; S2, using the historical input data and historical state data of the vehicle as a training set, training the nonlinear vehicle dynamics model based on the long short-term memory network, and obtaining an optimized nonlinear vehicle dynamics model; S3. Use the model predictive control (MPC) method as the optimized vehicle dynamics model control strategy to set the optimization problem; use the gradient descent method with adaptive learning parameters to solve the optimization problem, output the optimal control sequence in the control time domain, and use the first control signal in the optimal control sequence as the actual control input of the autonomous driving vehicle at the next moment; The step S3 comprises: S31. Set the optimization problem, input the reference trajectory, and set the initial number of iterations p=0 , set the optimization termination condition threshold J set ; S32, based on the reference trajectory, the optimization problem is calculated online through the optimized vehicle dynamics model. If the value of the target cost function J>J set ,make p=p+1 , go to step S33; otherwise, p=0 , proceed to step S35; S33, predicting the state through the output of the optimized vehicle dynamics model , calculate the Jacobi matrix based on the predicted state, and update the control input through the gradient descent method GD; S34, let the learning rate Following iterative adaptive updating, return to step S32; S35, outputting an optimal control input sequence, and using the first element in the optimal control sequence as an actual control input of the autonomous driving vehicle; The optimization problem is expressed as: in, is called the target cost function, is the prediction time domain The predicted state under is the reference trajectory state, obtained by the path planning method; It is the control time domain The optimal control input under is the control input increment, Indicates that the elements in the vector take the absolute value; ,express The amount of change; express The amount of change, and yes and The weight coefficient of and , and are the upper and lower bounds of the control input and system state, respectively.
2. The learning predictive control method for an unmanned vehicle based on a long short-term memory network according to claim 1, It is characterized in that The linearized longitudinal force and lateral force formulas of the Paska tire model are combined to establish a nonlinear vehicle dynamics model based on the Ackerman driving car model, including: The vehicle dynamics model was established based on the Ackerman driving car model by applying Newton's second law to the longitudinal, lateral and yaw degrees of freedom; The formulas of longitudinal force and lateral force in the Pascheka tire model are simplified, the motion of the vehicle dynamics model in the local fixed body coordinate system is converted into the motion of the inertial coordinate system, and the tire model is established; A nonlinear vehicle dynamics model is established based on the vehicle dynamics model and tire model.
3. The learning predictive control method for an unmanned vehicle based on a long short-term memory network according to claim 2, It is characterized in that The vehicle dynamics model is expressed as: Among them, I z refers to the yaw inertia, m is the vehicle weight, is the front wheel steering angle, is the distance from the center of mass to the front and rear axles, is the longitudinal velocity of the vehicle in the local fixed body coordinate system, is the vehicle lateral velocity in the local fixed body coordinate system, is the vehicle longitudinal acceleration, is the lateral acceleration of the vehicle, is the yaw angular rate, is the yaw angular acceleration, are the front wheel longitudinal force and the rear wheel longitudinal force, is the front wheel lateral force and the rear wheel lateral force; The tire model is expressed as: in, Represent the longitudinal acceleration and lateral acceleration of the vehicle in the inertial coordinate system, respectively. is the longitudinal velocity of the vehicle in the local fixed body coordinate system, is the vehicle lateral velocity in the local fixed body coordinate system, is the yaw angle.
4. The learning predictive control method for an unmanned vehicle based on a long short-term memory network according to claim 3, It is characterized in that The nonlinear vehicle dynamics model is expressed as follows: in, It is the predicted state of the vehicle system at time t+1. is the vehicle system state at time t, is the control input at time t, is the front wheel steering angle.
5. The learning predictive control method for an unmanned vehicle based on a long short-term memory network according to claim 4, It is characterized in that The method uses the historical input data and historical state data of the vehicle as a training set, trains the nonlinear vehicle dynamics model based on a long short-term memory network, and obtains an optimized nonlinear vehicle dynamics model, including: providing a physical basis and constraint conditions for vehicle driving based on the nonlinear vehicle dynamics model, substituting the historical input data and historical state data into the LSTM network for fitting to obtain an optimized nonlinear vehicle dynamics model.
6. The learning predictive control method for an unmanned vehicle based on a long short-term memory network according to claim 5, It is characterized in that The optimized nonlinear vehicle dynamics model is expressed as: in, is the vehicle system status at the moment, is the control input at time t, is the predicted state vector at time t+1, Mapping created for the LSTM network.
