An intelligent vehicle dynamics model based on a physical information neural network, an ILQR control algorithm and a trajectory tracking controller
By combining physical information neural networks with iterative linear quadratic control algorithms, a dynamic model for intelligent vehicles was designed, which solved the balance problem between accuracy and computational speed in existing models. It achieved accurate trajectory tracking and stability under extreme conditions, and improved the interpretability and generalization ability of the model.
Patent Information
- Application Number
- CN202310272398.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-03-20
AI Technical Summary
Existing intelligent vehicle dynamics models struggle to balance accuracy and computational speed. Physical models cannot accurately reflect the time-varying nonlinearity and complex dynamic characteristics of the system under extreme conditions, while data-driven models lack physical interpretability and are difficult to guarantee generalization ability.
A physical information neural network (PINN)-based intelligent vehicle dynamics model is adopted, which seamlessly integrates physical prior knowledge with the neural network. A trajectory tracking controller is designed by combining iterative linear quadratic (ILQR) control algorithm, and the convergence effect is improved by introducing the Levenberg-Marquardt algorithm and linear search.
It achieves faster learning speed, higher accuracy and better generalization performance, and can accurately track the reference trajectory under different road conditions and driving conditions, while taking into account both lateral and longitudinal stability.
Smart Images

Figure CN116560223B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent vehicle dynamics and control, and more particularly relates to an intelligent vehicle dynamics model based on a physical information neural network, an ILQR control algorithm and a trajectory tracking controller. BACKGROUND
[0002] In recent years, people's requirements for maneuverability, efficiency and safety have been increasing, which has greatly promoted the development of intelligent transportation systems. With the advent of the era of autonomous driving, intelligent vehicles can partially or completely replace human driving tasks, which has far-reaching significance for improving road traffic safety and protecting human life and property. Existing intelligent vehicle driving systems include environment perception and positioning, decision planning and vehicle control. The performance of the controller directly depends on the accuracy of the vehicle model, and a high-fidelity vehicle dynamics model can fully describe the complex physical characteristics of the vehicle system. Trajectory tracking control based on the dynamics model can achieve stable and rapid movement of the vehicle from the current position to the target position, which is particularly important in autonomous driving technology.
[0003] Vehicle dynamics modeling can use physical models and data-driven models. Physical models are established based on the physical laws of vehicle systems. They have good mechanical background and physical meaning, and are relatively high in interpretability. However, the modeling is simple, and idealized assumptions made during modeling can lead to reduced model accuracy, making it difficult to balance the contradiction between model accuracy and computational speed under complex problems. In addition, it cannot accurately reflect the time-varying nonlinearity and complex dynamics of the system under extreme conditions. On the other hand, data-driven models have better performance than physical models in vehicle dynamics modeling, i.e., the computational efficiency and modeling accuracy of data-driven models have been improved, but they are highly dependent on data size and quality, and the generalization ability cannot be guaranteed due to overfitting during model training. Data-driven models ignore physical prior knowledge and often cannot ensure physical interpretability. Therefore, it is an important problem to be solved to establish an accurate intelligent vehicle dynamics model while ensuring model interpretability and to design a trajectory tracking control algorithm based on the established model. SUMMARY
[0004] In order to solve the problems in the prior art, the application provides an intelligent vehicle dynamics model based on a physics-informed neural network (PINN), an ILQR control algorithm and a trajectory tracking controller. The application combines a neural network and a physical model seamlessly together, establishes a dynamics model based on the PINN, and endows the neural network with prior knowledge available. The dynamics model is used for the design of an iterative linear quadratic regulator (ILQR) control algorithm and derivation of a control law, so as to realize a trajectory tracking control task of the intelligent vehicle. Main contents of the application can be divided into three parts: a vehicle dynamics model based on the PINN, design of the ILQR control algorithm, and establishment and performance evaluation of the trajectory tracking controller.
[0005] In the dynamics model based on the PINN, a fully connected neural network is used as a model backbone, and a Pacejka magic formula tire model and a bicycle model are used as physical information embedded into a loss function of the PINN. Collected data sets are divided into a training set and a test set according to a ratio of 7:3. A rectified linear unit (ReLU) is used as an activation function. A mean square error (MSE) loss is used as a loss function, and an Adam optimizer is used to optimize a target function.
[0006] The ILQR control algorithm is designed based on the established PINN dynamics model, and the designed ILQR control algorithm is used for the trajectory tracking controller. Optimal control instructions are obtained by minimizing a target function, so as to realize accurate tracking of a reference trajectory. The Levenberg-Marquardt algorithm and linear search are introduced to improve the convergence effect of the ILQR control algorithm.
[0007] The application has the following beneficial effects:
[0008] 1. In the application, the model learning problem is innovatively combined with vehicle dynamics physical prior knowledge, and a method for modeling vehicle dynamics characteristics based on the physics-informed neural network is proposed. The model established according to the method fully utilizes the advantages of the data-driven model in terms of precision, and integrates physical laws, so that the model has better interpretability. Compared with the ordinary data-driven model, the model has faster learning speed, higher precision and better generalization performance.
[0009] 2. The present application designs an iterative linear quadratic trajectory tracking control algorithm based on the established physical information neural network vehicle dynamics model. Compared with nonlinear model predictive control (NMPC), the iterative linear quadratic control algorithm has more accurate control effect and faster solution speed, and can realize tracking control of the reference trajectory under different road conditions and driving conditions, ensuring tracking accuracy while considering lateral and longitudinal stability. The Levenberg-Marquardt algorithm and linear search introduced also improve the convergence effect of the iterative linear quadratic control algorithm. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 Figure 1 is a flowchart of the intelligent vehicle trajectory tracking control based on the PINN dynamics model, including model design and training and model-based trajectory tracking control, as follows:
[0011] Figure 2 Figure 2 is a schematic diagram of a bicycle model;
[0012] Figure 3 Figure 3 is a graph of the relationship between tire side slip angle and tire lateral force;
[0013] Figure 4 Figure 4 is a flowchart of vehicle dynamics data collection;
[0014] Figure 5 Figure 5 is a flowchart of PINN solving the intelligent vehicle dynamics model;
[0015] Figure 6 Figure 6 is a comparison chart of test error curves of PINN and baseline neural network;
[0016] Figure 7 Figure 7 is an error state chart of the bicycle model and reference trajectory of the vehicle;
[0017] Figure 8 Figure 8 is an elliptical reference trajectory for evaluating trajectory tracking performance;
[0018] Figure 9 Figure 9 is a race track trajectory for evaluating trajectory tracking performance. DETAILED DESCRIPTION
[0019] The present application will be further described below in conjunction with the accompanying drawings.
[0020] Figure 1 Figure 1 is a flowchart of the intelligent vehicle trajectory tracking control based on the PINN dynamics model, including model design and training and model-based trajectory tracking control, as follows:
[0021] Model design and training: Through the simulation platform Matlab-CarSim and the real-world intelligent driving platform Chery Ariuze, the vehicle dynamics state data is obtained to construct the data set. The vehicle dynamics model based on PINN is established, and the model is trained by using the constructed data set.
[0022] Model-based trajectory tracking control: The weight parameters of the trained PINN-based vehicle dynamics model are extracted, and the ILQR control algorithm is designed. The optimal control is obtained by minimizing the objective function to achieve accurate tracking of the reference trajectory.
[0023] The specific implementation process is as follows:
[0024] First part: vehicle dynamics model based on PINN
[0025] The prior knowledge of the vehicle physical model is embedded into the neural network. The prior knowledge can constrain the space of acceptable solutions and guide the network to the correct solution.
[0026] In order to model the motion of a vehicle traveling at high speed, a dynamic bicycle model is usually used because it provides a good trade-off between model accuracy and complexity for real-time implementation. By analyzing the lateral and yaw dynamics of the vehicle, the relevant mathematical mapping relationship can be obtained.
[0027] Figure 2 The bicycle model is shown. Its motion differential equation can be expressed as:
[0028]
[0029] In the formula, m is the mass of the vehicle, I z is the yaw direction moment of inertia; a and b are the distances from the mass center to the front and rear axles, respectively; v y is the lateral speed of the vehicle, v x is the longitudinal speed of the vehicle, r is the yaw angular velocity; F x,f , F y,f are the longitudinal and lateral forces of the front wheel, respectively, F y,r is the lateral force of the rear wheel; δ is the front wheel steering angle.
[0030] Assuming that the longitudinal speed is constant, the following can be obtained:
[0031] F x,f = 0 (0.2)
[0032] In most current automatic shifting vehicles, the vehicle dynamics will change greatly with shifting, so the throttle as an action becomes undesirable, so the present application takes v des as input, and adds a low-level proportional integral (PI) speed controller to manage throttle and braking actions.
[0033] The tire side slip angle can be obtained by the following formula:
[0034]
[0035] Wherein, a f and a r respectively represent the front wheel side slip angle and the rear wheel side slip angle of the vehicle.
[0036] Since the Pacejka magic formula tire model has high fitting accuracy and simple modeling, the magic formula is selected to model the tire in the present application. Therefore, the tire-pavement dynamics can be represented by the Pacejka magic formula tire model as the following nonlinear equation:
[0037] F y =Dsin(Carctan(Bx-E(Bx-arctan(Bx))))+S v (0.4)
[0038] In the formula, F y is the lateral force of the tire, x=a+S h , x is an input variable which can be the slip ratio of the tire or the side slip angle of the tire, a is the tire side slip angle, S h is the horizontal offset, S v is the vertical offset. The model parameters B are the stiffness factor, C is the shape factor, D is the peak factor, and E is the curvature factor. The calculation formula of each parameter is as follows:
[0039]
[0040] Wherein, A0+A 13 is a dimensionless fitting parameter without physical meaning, g is the roll angle, F z is the vertical load of the tire. The magic formula composed of trigonometric functions can achieve high-precision fitting of tire force, but its complex structure will result in large mathematical operation amount, and the present application considers to simplify it properly. First, since the vertical motion of the unmanned vehicle has little effect on the trajectory tracking process, the vertical motion can be ignored in the controller design, and the lateral force calculation is pure side slip, so the roll angle g is set to 0 here; second, Bx is generally a small value, i.e.:
[0041] Bx-arctan(Bx)≈0 (0.6)
[0042] In addition, the original magic formula only describes the absolute value relationship between the tire side slip angle and the tire lateral force, but in the vehicle coordinate system, the signs of the two are opposite, and the calculation of F y should add a negative sign. Based on the above discussion, the calculation of the tire lateral force is simplified as:
[0043]
[0044] where A0-A 13 are parameters whose values are determined by fitting experimental data of the tire. Table 1 shows the values of the parameters.
[0045] Table 1 Values of parameters in magic formula tire model
[0046] Symbol Value Symbol Value Symbol Value [A0] 1.65 [A1] -34 [A2] 1250 [A3] 3036 [A4] 12.8 [A9] 0.013 A 10 ]]> 0.004 A 12 ]] 1.214 A 13 ]]> 6.262
[0047] Figure 3 is a graph of the relationship between the tire side slip angle and the tire lateral force based on equation (1.7). It can be seen from Figure 3 that under the action of different vertical loads, when the tire side slip angle a e [-4, 4], the tire lateral force and the side slip angle are linearly related and can be expressed as the following equation:
[0048]
[0049] where C f and C r are the side slip stiffness of the front and rear wheels, respectively, and generally take negative values.
[0050] The dynamic state variable x = (v y , r) T is composed of the lateral velocity v y and the yaw rate r. The kinematic state variable in the global coordinate system is composed of the position (x, y) T and the heading angle θ. The control input of the system u = (δ, v des ) T includes the front wheel steering angle δ and the desired vehicle speed v des .
[0051] Substitute equation (1.8) and equation (1.2) into equation (1.1), and assume that the side slip angle is relatively small. By further organizing, the two-degree-of-freedom dynamic model can be written in the state space form:
[0052]
[0053] Finally, the state differential can be used to obtain the state change in the time step Δt:
[0054]
[0055] Figure 4A flowchart for vehicle dynamics data collection. The present invention constructs a dataset from the simulation and real-world environment. First, different driving scenarios, road environments are set in CarSim and the dynamics model is provided, and a Matlab-CarSim intelligent driving simulation platform is built, and the state data of the vehicle is collected by using the Logitech G290 steering pedal system. Then, the data of 70 minutes driven by human drivers under different conditions is collected by using a real vehicle equipped with inertial measurement unit (IMU) and steering wheel sensor and other vehicle-mounted devices, and the data rate is 30 Hz. The dataset contains four different types of driving behavior: 1) low-speed zigzag driving, 2) high-speed driving, 3) sliding as much as possible, and 4) random motion. 1) and 2) are collected on a race track with six sharp corners. 3) and 4) are collected on flat ground. The maximum vehicle speed v max is set to 40 km / h. These driving data are collected on seven different friction coefficient road surfaces, where μ ∈ {0.4, 0.5,..., 1.0}. A Chery Aries is used as the control vehicle.
[0056] Since there is a large range between the dimensions of the input data, a normalization technique is used to ensure accurate prediction results. The present invention chooses the min-max normalization, so that the normalized values are between [0, 1], which can be expressed as:
[0057]
[0058] where x and x' are the original data and the normalized data, respectively, x max and x min are the maximum and minimum values of the column where the data is located, respectively.
[0059] Figure 5 A flowchart for solving the intelligent vehicle dynamics model by PINN. The present invention uses the current and historical state-control variable pair H as input:
[0060] H t = [x t , u t , x t-1 , u t-1 , …, x t-3 , u t-3 ] (0.12)
[0061] In the formula, t represents the discretized time variable. Each layer between the input and the output and the neurons in each layer constitute a fully connected neural network F, which is composed of 4 hidden layers, each with 10 neurons. Each activated input is represented by z □ , the output is represented by o □ , and the activation function is represented by act(z □ ). W□ and b □ are the weights and bias terms of the network, respectively, where □ denotes the layer number and □ ∈ {1,2,3,4}. The fully connected neural network F in PINN can be expressed in the following form:
[0062]
[0063] Then, the discrete change in state over a time step Δt can be predicted using the fully connected neural network F:
[0064] x t+1 -x t = F(H t ) (0.14)
[0065] The idea of estimating the state residual is valid when using small discrete time intervals.
[0066] The dynamics model of an autonomous vehicle (AV) should be transformed into the form of a general nonlinear partial differential equation. Let a function u = u(t,x) satisfy the partial differential equation of the following form:
[0067] u t +N(u; l) = 0, x e Q, t e [0, T] (0.15)
[0068] where N(u; l) represents a nonlinear operator about u parameterized by l, x is a spatial variable, t is a time variable, Q is a subset of the Euclidean space , and T is the termination time. PINN considers establishing a neural network to approximate the solution of the partial differential equation, i.e., u = u(t,x). After inputting the time and spatial data, the function is first approximated by a fully connected neural network, and then the automatic differentiation technique is used to calculate the physics-based loss function. The loss function is minimized by the gradient descent method to calculate the final required neural network connection weight parameters and the physical parameters of the partial differential equation. In addition, I in the middle box is the identity operator, and represents the differential operator / activation operator. The tire model and the bicycle model are embedded into the loss function, and all the coefficients are determined.
[0069] The data set is divided into a training set and a test set in a ratio of 7:3. A rectified linear unit (ReLU) is used as the activation function. In order to reduce the error of the loss function, the Adam optimizer is used to optimize the objective function. The Adam optimizer can adaptively adjust the learning rate according to the situation during the learning process. The "Xavier" method is used to determine the initial weights and biases to ensure faster convergence of the neural network. A residual neural network is added to the FC-NN to avoid gradient explosion or gradient disappearance. The learning rate is taken as 0.001 during the training process. Early stopping is applied on the test set.
[0070] In PINN, based on the physical equation of the control problem, the output of the network and its differential value are used to define the residual or loss function. Unlike the loss function in most neural network methods, which has only one loss term, the loss function of PINN is composed of more than two loss terms. Specifically, for the present invention, the total loss function L of PINN is composed of the residual loss L of the neural network, the loss term L of the physical condition, and the loss term L of the initial condition, that is: N Data r r0
[0071]
[0072] The present invention selects the mean square error (MSE) to construct the loss function L related to the residual between the neural network prediction value and the true value: Data , and the loss function is expressed as follows:
[0073]
[0074] where n is the size of the training set, x i and x are the true state and the predicted state of the vehicle at time i, respectively, that is
[0075]
[0076] The loss term related to the physical condition of formula (1.9) is expressed in the form of mean square error:
[0077]
[0078]
[0079] where n is the total number of configuration points, x i is the state of the vehicle at time i, and x i ∈x.
[0080] The initial condition is expressed as:
[0081]
[0082] where v y0 is the initial lateral velocity of the vehicle, and r0 is the initial yaw rate. The loss term related to the initial condition is defined as:
[0083]
[0084] The physics-based loss function is then computed using automatic differentiation techniques, and the final required neural network connection weight parameters and partial differential equation physical parameters are computed by minimizing the loss function.
[0085] The PINN method is compared to a baseline neural network. A neural network of the same architecture (fully connected 4 layers, 10 neurons per layer) is chosen as the baseline neural network and is trained with the same training data. The same settings are applied to both models, except for the physics embedding. The baseline model then takes the form:
[0086]
[0087] The performance of the PINN and baseline neural network is tested using the root mean square error (RMSE) and maximum error (E max ) over the validation data.
[0088] Figure 6 A comparison of the test error curves for the PINN and baseline neural network is shown in Figure 1. It can be seen that the PINN method converges much faster than the baseline neural network and also converges to a better solution, as the physics prior knowledge guides the learning problem.
[0089] The PINN method is also tested on validation data to demonstrate its superiority in terms of generalization. These data are collected on the same track with six sharp corners, but with adjusted friction coefficients. The following values are assigned to each corner of the track, i.e., [0.45, 0.55, 0.65, 0.75, 0.85, 0.95], and the other regions are set to μ = 1.0. Moreover, these friction values are not present in the training set.
[0090] The PINN model still outputs the residual of the state, as does the baseline neural network. Moreover, the Pacejka tire model (Eq. (1.4)) and the vehicle dynamics model (Eq. (1.9)) are fully differentiable. This allows the PINN to be trained in an end-to-end fashion by minimizing the same objective used in the baseline network, i.e., ||x t+1 -x t -F(H t )| 2 The method disclosed herein is a general solution that can be used for other types of model structures, including recurrent neural networks (RNNs). Moreover, it can also be represented as a stochastic model or an ensemble model.
[0091] Second part: design of ILQR control algorithm
[0092] The state transition function of the vehicle dynamics model and its initial state are:
[0093]
[0094] In the formula, i = 0, 1, ..., N-1, and Let represent the state variable and control variable at time i, respectively, and f be the dynamic equation. The total system cost J0 is the operating cost l(x). i ,u i (i.e., in state x) i Execution control u i Costs at the terminal time f (x N The sum of ), starting from state x0, applying the control sequence U≡{u0,u1,...,u N-1}, until the control time domain N:
[0095]
[0096] The optimal control problem is to determine the control sequence U specific to x. * (x) minimizes the cost function J0, i.e.:
[0097]
[0098] Let U i ≡{u i ,u i+1 ,...,u N-1}, and define the segmented cost J i The sum of costs from i to N:
[0099]
[0100] Define the performance index function V at time i given the minimum control sequence. i (x) is:
[0101]
[0102] Based on the Bellman optimality principle of dynamic programming, minimizing the entire control sequence is simplified to minimizing a single control step size, and then propagated backward in time:
[0103]
[0104] Besides the state value function V i In addition, this invention introduces an action value function, denoted as Q:
[0105] Q(x i ,u i )=l(x i ,u i )+Vi+1 (f(x i ,u i )) (0.29)
[0106] Next, let the change of state and input be represented as δx i and δu i respectively, then the minimum value of equation (2.7) after a disturbance is applied at time i is:
[0107]
[0108] Second-order Taylor expansion of the above equation gives:
[0109]
[0110] where Q x and Q u are the first-order partial derivatives of Q(δx i , δu i ) with respect to state x and control input u, Q xx and Q uu are the second-order partial derivatives of Q(δx i , δu i ) with respect to state x and control input u, Q xu and Q ux are the second-order mixed partial derivatives of Q(δx i , δu i ) with respect to state x and control input u, and the expansion coefficients are given as follows:
[0111]
[0112] where l x and l u are the first-order partial derivatives of the system's operating cost with respect to state and control input; f x and f u are the state and control input of the linearized system; (V . ) x and (V . ) xx are the first-order and second-order partial derivatives of the system's performance index value function with respect to state; l xx and l uu are the second-order partial derivatives of the system's operating cost with respect to state and control input; l ux is the second-order partial derivative of the system's operating cost with respect to state and control input.
[0113] ILQR approximates the original function by the first order term of Taylor expansion using Gauss-Newton method, so the second order term in the last three sub-equations of (2.10) is omitted. By solving the minimum of the action value function Q(δx, δu) of the system, the optimal control law of the system increment δu is obtained * is:
[0114]
[0115] where the open loop term feedback gain term The difference of the state value function of the optimal control at the i-th time is given by:
[0116]
[0117] For the state value function, its gradient and Hessian matrix are given by:
[0118]
[0119]
[0120] The nominal control sequence U0={u 01 ,u 02 ,...,u 0N} can be obtained by recursively calculating the local performance index value V(i) and updating the control gain [K(i), k(i)] at the i-th time through the backward pass. Then the new state and control sequence can be calculated through the forward pass, denoted as:
[0121]
[0122] Each iteration of the ILQR algorithm searches for the control sequence i ,u i around the trajectory {x Then the new state trajectory is found according to the nonlinear dynamic model.
[0123] In the Newton method, when the Hessian matrix is not positive definite or the second order approximation is not accurate, it can cause the problem of difficult convergence. Gradient descent method can solve the above problems, but the convergence speed is slow near the minimum point, so the present application proposes Levenberg-Marquardt (LM) algorithm, which dynamically adjusts the step size during iteration by flexibly adjusting the size of LM parameter λ, so that the algorithm can fully combine the advantages of both in the local optimization process. That is, a diagonal item is added as a regularization term in the Hessian matrix part of the local control cost Q to ensure the positive definite of the Hessian matrix.
[0124]
[0125] where I m is the unit matrix, and λ∈[0,+∞). When λ is close to 0, it is the Newton iteration method, and when λ takes a larger value, it is the gradient descent method. Therefore, the present application makes the following modification to the Hessian matrix Q uu and Q ux
[0126]
[0127]
[0128] At this time, the optimal control law of the system increment is:
[0129]
[0130] where, This regularization is equivalent to adding a quadratic cost around the current control sequence, making the step more conservative. In addition, it also makes the new trajectory closer to the old trajectory, thereby significantly improving the robustness of the algorithm.
[0131] The optimal control performance function value based on the above regularization improvement is:
[0132]
[0133]
[0134] For general nonlinear systems, in the process of finding function extreme value by Newton method iteration, the situation of crossing the real extreme value may occur, and the result of the second order approximation may deviate too much from the actual system, and the objective function may not converge. The present application introduces line search, adds backtracking line search parameter α in front of the update amount, and adjusts the search range of the original function to search for the minimum value in a smaller range.
[0135]
[0136] where 0 < a < 1. a cannot be too small, otherwise the gradient descent is not sufficient. When a is close to 0, the control law will not update and the trajectory will remain unchanged. But for intermediate values, the resulting control step is not a simple scaling of the full step due to the presence of feedback.
[0137] Third part: Establishing trajectory tracking controller and evaluating its performance
[0138] This part first introduces the design of trajectory tracking controller. Let s i = {x i , y i , θ i , v y,i , r i} denote the state of a vehicle with wheelbase L at discrete time i, where x i and y i denote the longitudinal and lateral positions of the vehicle in the world coordinate system, respectively, θ i is the heading angle at time i, v y,i is the lateral vehicle speed at time i, and r i is the yaw rate at time i. The control command is given by u i = {δ i , v des,i}, where δ i is the front wheel steering angle at time i, and v des,i is the desired vehicle speed at time i. Let π denote the state transition function f:
[0139] s i+1 = π(s i , u i ) (1.1)
[0140] According to the bicycle model of the vehicle at state s i , the dynamic equation π (i.e., the state transition function f) of the vehicle can be defined by the following formula:
[0141]
[0142] Given a set of M ordered poses with speed {x i , y i , θ i}, i ∈ [1, M], perform cubic spline interpolation on them to obtain the reference trajectory.
[0143] Figure 7 is the error state map of the bicycle model of the vehicle at state s i and the reference trajectory. For state s i , the error state ψ i relative to the reference trajectory is defined as a tuple, as follows:
[0144]
[0145] in, For state s i The vertical distance between the vehicle and the reference trajectory. This represents the heading error of the vehicle relative to the reference trajectory. The velocity error corresponding to the nearest point on the reference trajectory ( Here v p (The velocity of the nearest point on the reference trajectory), v y,i and r i From state s i This invention will define the error state ψ i The state of the ILQR trajectory tracking controller is used to encode all errors of the reference trajectory. Given the error state ψ at discrete time i... i and control u i Let γ denote the state transition function f, then the error state ψ at time i+1 is... i+1 It is expressed as follows:
[0146] ψ i+1 =γ(ψ i ,u i (1.3)
[0147] γ can be defined by the following formula:
[0148]
[0149]
[0150]
[0151]
[0152]
[0153] In the error state ψ i Execution control u i Cost l(ψ) i ,u i )as follows:
[0154]
[0155] Where A and B are diagonal weight matrices, the last three diagonal elements of A are zero, because this invention only focuses on making the error term in equation (3.4) approach zero. Error state ψ i The final cost f (ψ N As shown below:
[0156]
[0157] Thus, the intelligent vehicle trajectory tracking control problem with a given reference trajectory can be defined as: finding the optimal control sequence U * = {u0, u1,..., u N-1} in the time domain N, so as to minimize the following objective function:
[0158]
[0159] Plus the following constraints:
[0160]
[0161] Equations (3.7) and (3.8) can convert the trajectory tracking problem into the ILQR problem defined in step 2.
[0162] The present application takes the root mean square error of lateral position and heading angle, algorithm time consumption and speed tracking error as evaluation indexes to verify the modeling effect of the PINN model established in the trajectory tracking control.
[0163] The present application calculates the above indexes on an elliptical trajectory (as shown in FIG. 1) and a race track (as shown in FIG. 2). Figure 8 Figure 9 The elliptical trajectory and the race track are built in the simulator, and the center line of the trajectory is set as the target trajectory. The race track is about 790 meters long and consists of two road surfaces, one with a friction coefficient of 1.0 and the other with a friction coefficient of 0.4.
[0164] The series of detailed descriptions listed above are only specific descriptions of the feasible embodiments of the present application, and are not intended to limit the protection scope of the present application. Any equivalent means or changes that do not deviate from the technology of the present application shall be included in the protection scope of the present application.
Claims
1. An intelligent vehicle dynamics model based on physical information neural networks, characterized in that, A fully connected neural network is used as the model backbone, and the Pacejka magic formula tire model and bicycle model are embedded into the loss function of the model as physical information; total loss function the residual loss of the neural network a sum of a loss term for the physical condition and and an initial condition loss term and i.e.: A mean square error (MSE) is used to construct a loss function related to a residual between a neural network prediction value and a true value And the loss function is expressed as follows: where n is the size of the training set, x i With are the real state of the vehicle at time i and the predicted state of the neural network, respectively, i.e. The physical condition loss term is expressed in the form of mean square error as: where n is the total number of configuration points, x i is the state of the vehicle at time i, and x i ∈ x; The initial condition is expressed as: where v y0 is the initial lateral velocity of the vehicle, and r0is the initial yaw rate. The loss term related to the initial condition is defined as:
2. The intelligent vehicle dynamics model based on physical information neural network according to claim 1, wherein, The bicycle model is expressed by the following motion differential equation: where m is the mass of the vehicle, I z is the yaw direction moment of inertia; a and b are the distances from the mass center to the front and rear axles, respectively; v y is the lateral velocity of the vehicle, v x is the longitudinal velocity of the vehicle, and r is the yaw angular velocity; F x,f , F y,f are the longitudinal and lateral forces on the front wheels, respectively, F y,r is the lateral force on the rear wheels, and δ is the front wheel steering angle. Assuming constant longitudinal velocity, It follows that F x,f =0(1.2)。 3. The intelligent vehicle dynamics model based on physical information neural network according to claim 2, characterized in that, The Pacejka magic formula tire model includes a tire side slip angle model, which is obtained by the following formula: wherein α f and α r respectively represent the front wheel side slip angle and the rear wheel side slip angle of the vehicle. The tire-pavement dynamics is expressed by the Pacejka magic formula tire model as the following nonlinear equation: F y = D sin(C arctan(B x - E(B x - arctan(B x)))) + S v (1.4) where F y is the lateral force of the tire, x = a + S h , x is an input variable, which can be the slip ratio of the tire or the side slip angle of the tire, a is the tire side slip angle, S h is the horizontal offset, S v is the vertical offset, the model parameters B are stiffness factors, C are shape factors, D are peak factors, and E are curvature factors; where the formulas for each parameter are as follows: where A0-A 13 are dimensionless fitting parameters without physical meaning, γ is the roll angle, F z is the vertical load of the tire.
4. The intelligent vehicle dynamics model based on physical information neural network according to claim 3, characterized in that, Simplify the tire model: first, since the vertical motion of the unmanned vehicle has little effect on the trajectory tracking process, the vertical motion can be ignored in the controller design, and the lateral force is calculated as pure side slip, so the roll angle γ is set to 0 here; second, Bx is generally a small value, that is: Bx-arctan(Bx)≈0 (1.6) The calculation of the tire lateral force is simplified as: In the formula, A0~A 13 The parameter values are generally determined by fitting experimental data of the tire.
5. The intelligent vehicle dynamics model based on physical information neural network according to claim 4, characterized in that, When the tire side slip angle α ∈ [-4, 4], the tire lateral force changes linearly with the side slip angle and is expressed as the following equation: where C f and C r are the cornering stiffness of the front and rear wheels, respectively, and are generally negative. Dynamic state variables x = (v y , r) T consist of lateral velocity v y and yaw rate r, the kinematic state variables in global coordinates consist of position (x, y) T and heading angle θ, the control input of the system u = (δ, v des ) T includes front wheel steering angle δ and desired vehicle speed v des ; Put equation (1.8) and equation (1.2) into equation (1.1), and assume that the side slip angle is relatively small, write the two-degree-of-freedom dynamic model into the state space form: Finally, the state change on the time step Δt can be obtained using the state differential:
6. The intelligent vehicle dynamics model based on physical information neural network according to claim 1, wherein, The fully connected neural network comprises 4 hidden layers, 10 neurons per layer, each activated input is denoted by z i , and the output is denoted by o i , the activation function is denoted by act(z i ), W i and b i are the weights and bias terms of the network, respectively, where i denotes the layer number and i e {1,2,3,4}, the fully connected neural network F is expressed in the following form:
7. An ILQR control algorithm for intelligent vehicles, characterized in that, The ILQR control algorithm is based on the vehicle dynamics model of any one of claims 1-6, comprising the following: Let the state transition function of the vehicle dynamics model and the initial state be: where i = 0, 1,..., N - 1, and denote the state variable and control variable at time i, respectively, f is the dynamic equation, and the total cost Jo is the sum of the operating cost and the terminal time cost Starting from the state xo, the control sequence U≡{u0, u1,..., u N-1} is applied until the control horizon N. The optimal control problem is to determine the control sequence U * (x) to minimize the cost function Jo, i.e.: Let U i ≡ {u i ,...,u i+1 ,...,u N-1} and define the segment cost J i as the sum of costs from i to N: V (x) is defined as the performance index value function of a given minimum control sequence at the i-th moment i (x) is: Simplify the minimization of the entire control sequence to the minimization of a single control step, and pass it backward in time: In addition to the state value function V i an action value function, denoted Q, is introduced: Next, the change in state and input are denoted as δx i and δu i The minimum value of equation (2.7) after a perturbation at time i is then given by: Second-order Taylor expansion is performed on the above equation to obtain: where Q x Q u are the first order partial derivatives of Q(δx i , δu i ) with respect to the state x and the control input u, respectively, Q xx Q uu are the second order partial derivatives of Q(δx i , δu i ) with respect to the state x and the control input u, respectively, Q xu Q ux are the second order mixed partial derivatives of Q(δx i , δu i ) with respect to the state x and the control input u, and the expansion coefficients are given by where, and are the first-order partial derivatives of the system's operating cost with respect to the state and control input, respectively; x and u are the linearized state and control input of the system, respectively; . ) x and . ) xx are the first- and second-order partial derivatives of the system's performance index value function with respect to the state, respectively; and are the second-order partial derivatives of the system's operating cost with respect to the state and control input, respectively; are the second-order partial derivatives of the system's operating cost with respect to the state and control input, respectively; By finding the minimum value of the action value function Q(δx, δu) of the system, the optimal control law δu of the system increment is obtained * is: where the open-loop term the feedback gain term The difference in the state value function of the optimal control at the ith time instant is given by For the state value function, its gradient and Hessian matrix are given by the following equation: The local performance index value V(i) is recursively calculated by back propagation and the control gain [K(i), k(i)] at the i-th time is updated to obtain a nominal control sequence U0={u 01 ,u 02 ,...,u 0N}, and then the new state and control sequence are calculated by forward propagation, denoted as: Each iteration finds a control sequence near the trajectory {x i , i} that minimizes the cost function Then a new trajectory of states is found according to the nonlinear vehicle dynamics model The iterations are repeated until convergence; Add a diagonal term to the Hessian matrix part of the local control cost Q as a regularization term to make the Hessian matrix positive definite, where I m is the identity matrix, λ ∈ [0, +∞), and λ approaches 0 for the Newton iteration method and λ takes a larger value for the gradient descent method. Therefore, the Hessian matrix Q uu and Q ux are modified as follows: At this time, the optimal control law of the system increment is: wherein, This regularization is equivalent to adding a quadratic cost around the current control sequence, making the steps more conservative and also making the new trajectory closer to the old one, improving robustness; The optimal control performance function value based on the above regularization is: Add a backtracking linear search parameter α in front of the update quantity to adjust the search range of the original function to search for the minimum value in a smaller range, Where 0 < α ≤ 1, when α approaches 0, the control law will not be updated, and the trajectory will remain unchanged, but for intermediate values, due to the existence of feedback, the control step obtained is not a simple scaling of the full step.
8. A trajectory tracking controller for an intelligent vehicle, characterized by, It is obtained by the following design: Let s i ={x i ,y i ,θ i ,v y,i ,r i} denote the state of a vehicle with wheel base L at discrete time instant i, where x i and y i denote the longitudinal and lateral positions of the vehicle in a world coordinate system, respectively, θ i is the heading angle at time i, v y,i is the lateral vehicle speed at time i, and r i is the yaw rate at time i. The control commands are given by u i ={δ i ,v des,i}, where δ i is the front wheel steering angle at time i, and v des,i is the desired vehicle speed at time i. Let π denote the state transition function f: s i+1 = π(s i , u i ) (3.1) According to the bicycle model of the vehicle in state s i The dynamic equation π (i.e. the state transition function f) of the vehicle can be defined by the following equation: A set of M ordered poses {x i ,y i ,θ i}, i ∈ [1, M] with velocities is given, which are interpolated by a cubic spline to obtain the reference trajectory; For a state s i The error state ψ i is defined as a tuple as follows: where, is the vertical distance of the vehicle from the reference trajectory at state s i is the lateral distance of the vehicle from the reference trajectory at state s is the heading error of the vehicle with respect to the reference trajectory at state s is the speed error corresponding to the closest point on the reference trajectory at state s Here v p is the speed of the closest point on the reference trajectory, v y,i and r i come from the state s i ; the error state ψ i encodes all errors from the reference trajectory as the state of the ILQR trajectory tracking controller; given the error state ψ i and the control u i at a discrete time instant i, the state transition function f is denoted by γ, then the error state ψ i+1 at time instant i+1 is expressed as follows: ψ i+1 = γ(ψ i , u i ) (3.3) γ is defined by the following formula: In the error state ψ i The control u i The cost Is as follows: where A and B are diagonal weight matrices, the last 3 diagonal elements of A are zero, and the error state ψ i The final cost is given by: The intelligent vehicle trajectory tracking control problem with a given reference trajectory is defined as: finding the optimal control sequence U * = {u0, u1,..., u N-1} in the time horizon N, such that the following objective function is minimized: With the following constraints:
9. The trajectory tracking controller of claim 8, wherein, The trajectory tracking problem of equation (3.7) and equation (3.8) is converted into solving using the ILQR algorithm of claim 7.
Citation Information
Patent Citations
Loss function adaptive balancing method of neural network with embedded physical knowledge
CN114118405A
Unmanned vehicle trajectory tracking control method and system based on neural network dynamics model, and vehicle-mounted control equipment
CN114995426A
Vehicle dynamics model based on depth Gaussian, training method, intelligent automobile trajectory tracking control method and terminal equipment
CN115303289A