An unmanned vehicle trajectory tracking control method, system and vehicle-mounted control device based on a neural network dynamics model

Through the combination of neural network dynamic model and ILQR control algorithm, the trajectory tracking controller is designed using IMU data, which solves the trajectory tracking problem of unmanned vehicles in complex environments, and achieves high-precision and stable trajectory tracking control.

CN114995426BActive Publication Date: 2025-07-29JIANGSU UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210627864.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2025-07-29
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

The existing unmanned vehicle trajectory tracking control methods have model inaccuracy and external interference uncertainty in complex dynamic environments, resulting in insufficient asymptotic performance, and the application of model-based control methods on real vehicle systems is limited.

Method used

Using an iterative linear quadratic regulator (ILQR) control algorithm based on neural network dynamics model, the vehicle dynamics model is learned through a fully connected feedforward neural network, and combined with inertial measurement unit (IMU) data, the ILQR controller is designed to realize trajectory tracking control.

Benefits of technology

It improves the accuracy and stability of trajectory tracking, and can achieve high-performance motion control under different road conditions, with strong interpretability and taking into account both lateral and longitudinal stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114995426B_ABST
    Figure CN114995426B_ABST
Patent Text Reader

Abstract

The present invention discloses a trajectory tracking control method, system and vehicle-mounted control device for driverless vehicles based on a neural network dynamics model. In the neural network-based dynamics model, a neural network model is designed using a fully connected feedforward neural network. The model has two hidden layers, with 64 neurons in each layer, and uses the ReLU activation function. The input of the model is the vehicle state and control command at the current moment, and the output is the vehicle state at the next moment. This neural network learns the dynamic equation by minimizing the mean square error between the predicted output state and the observed output state. The ILQR controller designed based on the neural network dynamics model contains the control algorithm of the iterative linear quadratic regulator, and obtains the optimal control command by minimizing the cost function to achieve the tracking of the reference trajectory. Compared with the end-to-end control, the proposed solution of the present invention has stronger interpretability, and while ensuring the trajectory tracking accuracy, it takes into account both lateral and longitudinal stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of driverless vehicle control, and more particularly, to a driverless vehicle trajectory tracking control method, system and vehicle-mounted control device based on a neural network dynamics model. Background Art

[0002] Driverless technology can significantly improve traffic efficiency, reduce the incidence of traffic accidents and improve energy use efficiency, and has become a research hotspot in the automotive industry in recent years. With the rapid development of driverless technology, its application scenarios in many fields have become more and more extensive. Driverless minibuses, driverless buses, driverless transport trucks, etc. have basically achieved trial operation in specific scenarios, and have achieved preliminary commercial implementation in scenarios such as specific roads and parks. Driverless technology mainly includes three parts: perception, decision-making, and control. Trajectory tracking control can enable a vehicle to stably and quickly reach a target position from the current position, and is a particularly important part of driverless technology.

[0003] Currently, driverless vehicle trajectory tracking control methods can be divided into model-based control methods and model-free control methods. Model-based control methods have been successfully used to control complex dynamic systems. In model-free control methods, the agent must learn a new strategy for each task from a large number of samples. The design of traditional driverless vehicle trajectory tracking controllers relies on using the dynamic model of the system to calculate the control law for the current task. Compared with model-free control methods, due to the inaccuracy of the model and the uncertainty of external disturbances, model-based control methods usually have slightly insufficient asymptotic performance. Collecting samples on real vehicles operating in a highly dynamic environment may be extremely dangerous, and for such dynamic systems, the effects produced by using model-free control methods usually cannot meet expectations. In actual dynamic systems, model-based control methods require certain professional knowledge, as well as the modeling of complex dynamics such as actuators, tire forces, and sideslip in driverless vehicles. These constraints limit the application of model-based control methods in real vehicle systems to a certain extent. Summary of the Invention

[0004] In order to solve the deficiencies in the prior art, the present invention proposes a driverless vehicle trajectory tracking control method and system based on a neural network dynamics model. The present invention uses a multi-layer neural network to learn the dynamics model of a driverless vehicle, and uses this model for the design of an iterative linear quadratic regulator control algorithm and derives the control law to achieve the driverless vehicle trajectory tracking control task. The present invention mainly includes three parts: the establishment of a neural network-based dynamics model, the design of an iterative linear quadratic regulator control algorithm, the establishment of a trajectory tracking controller, and performance evaluation.

[0005] In the establishment of a neural network-based dynamics model, a neural network model is designed using a fully connected feedforward neural network. The model has two hidden layers, with 64 neurons in each layer. The ReLU activation function is selected. The input of the model is the vehicle state and control command at the current moment, and the output is the vehicle state at the next moment. This neural network learns the dynamic equation by minimizing the mean square error between the predicted output state and the observed output state. In the present invention, data on driving behavior is collected through on-vehicle devices, that is, a real vehicle equipped with on-vehicle devices such as an inertial measurement unit (IMU) is driven manually for one hour in highway and off-highway environments to complete data collection.

[0006] An ILQR controller is designed based on the trained neural network dynamics model. The ILQR controller incorporates the control algorithm of the iterative linear quadratic regulator. The optimal control command is obtained by minimizing the cost function in the control algorithm of the iterative linear quadratic regulator to achieve tracking of the reference trajectory.

[0007] Furthermore, the neural network dynamics model is specifically as follows:

[0008] Let the n-dimensional real vector represent the system state at discrete time t, and the m-dimensional real vector represent the system control command at discrete time t. The system dynamics can be given by the following equation:

[0009] x t+1 = f(x t , u t ) (1)

[0010] The vehicle system state is given by where v t is the linear velocity at time t, is the steering angular velocity at time t, and the control command is given by where p t is the throttle pedal input, b t is the braking input, is the commanded steering angular velocity at time t. Now, the dynamic equation f of the vehicle is given as follows:

[0011]

[0012] Furthermore, the control algorithm of the iterative linear quadratic regulator is specifically as follows:

[0013] For the designed neural network dynamics model, which is a non-linear discrete dynamic system:

[0014] x t+1 = f(xt , u t ) (3)

[0015] wherein, is the system state, is the control input at time t.

[0016] The non - linear environment and cost function are locally linearized through Taylor expansion, and then the optimal solution under the linearized environment and cost is solved through the backward pass process of LQR. The ILQR algorithm is divided into three parts: linearization, backward pass of LQR, and forward pass;

[0017] In the linearization part, the non - linear dynamics in ILQR are expanded to the first order and the cost is expanded to the second order,

[0018]

[0019]

[0020] wherein, is the optimal control sequence generated at state , then the next state is is the derivative of the function corresponding to state x t and control u t , c(x t , u t ) is the cost function at state x t and control input u t .

[0021] Rearrange the above formula (4):

[0022]

[0023]

[0024] Take as the new state, as the new control input, then the next state is Q(δx t , δu t ) is the cost function at state δx t and control input δu t . Thus, we get:

[0025]

[0026]

[0027] wherein, Coefficient matrix of the quadratic part (where represents the upper left part of the average partition matrix C t , represents the upper right part of the matrix C t , represents the lower left part of the matrix C t , represents the lower right part of the matrix C t ), coefficient matrix of the linear part (where represents the upper half of the average partition matrix c t , represents the lower half of the matrix c t ). In this way, the ILQR problem is transformed into a conventional LQR problem;

[0028] In the backward pass of LQR, the present invention obtains the optimal control by minimizing the cost function Q(δx t , δu t ). At time t, the optimal control at this time is obtained by calculating δu t , δu t when the first derivative of the cost function Q(δx t , δu t ) is zero. That is, let t

[0029]

[0030] The optimal control at time t can be obtained

[0031]

[0032] Expand Equation (8) and represent it using the matrix K t and k t . Then we can get:

[0033]

[0034] δu t = K t δx t + k t (10)

[0035] Substitute Equation (10) into the cost function Q(δx t , δu , δu t ) in Equation (6), and denote the newly obtained cost function as V(δx t ):

[0036]

[0037] Expand Equation (11) to get:

[0038]

[0039] Appropriately simplify the expansion and regard it as the sum of a quadratic term and a linear term in the form of , where the matrix V t and v t are respectively:

[0040]

[0041]

[0042] Among them, the coefficient matrix represents the lower half of the matrix C t .

[0043] At time t - 1, equation (14) holds:

[0044]

[0045] Then the cost function generated from time t to time t - 1 is:

[0046]

[0047] Furthermore, from it can be obtained that:

[0048]

[0049] Then the cost function Q(δx t-1 , δu t-1 ) is expressed as:

[0050]

[0051] Among them, the coefficient matrix of the quadratic part at time t - 1 (where, represents the upper left part of the matrix Q t-1 , represents the upper right part of the matrix Q t-1 , represents the lower left part of the matrix Q t-1 , represents the lower right part of the matrix Q t-1 ), and the coefficient matrix of the linear part (where, represents the upper half of the matrix q t-1 , represents the lower half of the matrix q t-1 ). At time t - 1, by calculating the cost function Q(δx t-1 , δut-1 The δu when the first derivative of () is zero t-1 to obtain the optimal control at this moment. That is, let

[0052]

[0053] The optimal control at time t-1 can be obtained as follows:

[0054] δu t-1 = K t-1 δx t-1 + k t-1 (19)

[0055] where

[0056] Substitute equation (20) into equation (17) and simplify the expanded equation to obtain:

[0057]

[0058]

[0059] where the coefficient matrix represents the lower half of matrix Q t-1

[0060] In the forward pass of LQR, this process interacts with the real non-linear system to obtain a new real trajectory;

[0061]

[0062] where is the optimal control sequence generated at state , then the next state is The parameter α can be adjusted by backtracking line search. Combine the state at time N to obtain a new trajectory.

[0063] Furthermore, the trajectory tracking controller is specifically as follows:

[0064] Let represent the state of a vehicle with wheelbase L at discrete time i, where {x i , y i , θ i} is the attitude, x i and y i respectively represent the longitudinal and lateral coordinates of the vehicle in the world coordinate system, θ i is the heading angle of the vehicle, φ i is the steering angle, v i is the speed, ​is the yaw rate change at discrete time i, and the control command is given by , where p i is the throttle pedal input, b i is the brake input, is the commanded yaw rate change at discrete time i. Denote the state transition function f by π:

[0065] s i+1 = π(s i , u i ) (23)

[0066] From the bicycle model of the vehicle in the typical state s i , the dynamic equation of the vehicle π (i.e., the state transition function f) can be defined by the following formula:

[0067] x i+1 = x i + v i cos(θ i ) Δt

[0068] y i+1 = y i + v i sin(θ i ) Δt

[0069]

[0070]

[0071]

[0072] Given a set of M ordered poses with velocities, perform cubic spline interpolation on them to obtain the reference trajectory. For each state s i , define the error state ψ i relative to this reference trajectory as a 9-tuple is the vertical distance between the vehicle at state s i and the reference trajectory, is the heading error of the vehicle relative to the reference trajectory, is the velocity error corresponding to the nearest point on the reference trajectory ( here v p is the velocity of the nearest point on the reference trajectory), v i , and φ i are from state s i . Use the error state ψ i as the state of the iterative linear quadratic regulator to encode all the errors of the reference trajectory. Given the error state ψ i and control u at discrete time ii , denote the state transition function \(f\) by \(\gamma\), and the error state at the next moment \(\psi\) i+1 is as follows:

[0073] \(\psi\) i+1 = \(\gamma(\psi\) i , u i ) (25)

[0074] \(\gamma\) can be defined by the following formula:

[0075]

[0076]

[0077]

[0078]

[0079]

[0080]

[0081]

[0082]

[0083] When executing \(u\) under the error state \(\psi\) i , the cost \(l(\psi\) i , u i ) is as follows: i ) is as follows:

[0084]

[0085] where \(A\) and \(B\) are diagonal weight matrices, and the last 3 diagonal elements of \(A\) are zero, making the error term in (14) approach zero. For the state \(\psi\), its final cost \(l\) f \((\psi)\) is as follows:

[0086] \(l\) f \((\psi)=\psi\) T \(A\psi\) (28)

[0087] Define the vehicle trajectory tracking problem with a given reference trajectory as finding an optimal control sequence \(\{u_0, u_1, \ldots, u\) N-2 \} within the range of \(N\) to minimize the following cost:

[0088]

[0089] plus the following constraints:

[0090]

[0091] The above control system can be integrated into in-vehicle control equipment to achieve real-time trajectory tracking of driverless vehicles.

[0092] Advantages of the present invention:

[0093] 1. The present invention proposes a method for collecting driving behavior data through in-vehicle equipment, that is, using a real vehicle equipped with in-vehicle equipment such as an inertial measurement unit (IMU) to drive manually for one hour in highway and non-highway environments to complete data collection. The obtained data is used as the input of the vehicle dynamics model. Since the data directly comes from the real vehicle data of human driving, it has higher accuracy and more types than the data obtained from a driving simulator, and also takes into account the driving styles of drivers.

[0094] 2. The present invention proposes to design a neural network dynamics model of a vehicle based on a fully connected feedforward neural network. The model has two hidden layers. Compared with a deep neural network, it not only improves the calculation efficiency, but also can accurately identify various complex dynamic behaviors during vehicle operation and can learn the unmodeled vehicle dynamic responses.

[0095] 3. By combining the designed neural network dynamics model with an iterative linear quadratic regulator control algorithm, the proposed algorithm has stronger interpretability compared with the end-to-end control algorithm, and can achieve tracking control of the reference trajectory under different road conditions and driving conditions. While ensuring the trajectory tracking accuracy, it takes into account the lateral and longitudinal stabilities, laying a good foundation for developing high-performance motion controllers for driverless vehicles. Description of the drawings

[0096] Figure 1 It is a flowchart of the method for trajectory tracking control of a driverless vehicle based on a neural network dynamics model according to an embodiment of the present invention;

[0097] Figure 2 It is a vehicle dynamics data acquisition module;

[0098] Figure 3 It is an error state diagram of the bicycle model of the vehicle and the reference trajectory;

[0099] Figure 4 It is a circular reference trajectory for evaluating the trajectory tracking performance;

[0100] Figure 5 It is an elliptical reference trajectory for evaluating the trajectory tracking performance;

[0101] Figure 6 It is a snake-shaped reference trajectory for evaluating the trajectory tracking performance;

[0102] Figure 7The "8"-shaped reference trajectory for evaluating trajectory tracking performance;

[0103] Figure 8 The hybrid reference trajectory for evaluating trajectory tracking performance. Detailed implementation manners

[0104] The present invention will be further described below with reference to the accompanying drawings.

[0105] It should be noted that all the divisions or partitions involved in the present invention, such as the division / partition of a matrix, etc., are average divisions or partitions.

[0106] Figure 1 The flowchart of the trajectory tracking control method for an autonomous vehicle based on a neural network dynamics model, including model training and learning and using an ILQR controller based on the neural network dynamics model to achieve trajectory tracking. The overall process is as follows:

[0107] Model training and learning: Collect vehicle data by manually driving a real vehicle equipped with in-vehicle devices such as an inertial measurement unit (IMU) for one hour in highway and off-highway environments. Design a vehicle dynamics model based on a fully connected feedforward neural network, and use the established model and vehicle data to train the model.

[0108] Using an ILQR controller based on the neural network dynamics model to achieve trajectory tracking: Train a neural network to learn the vehicle's dynamics equation, design an ILQR controller, and obtain the optimal control by minimizing the cost function to achieve the tracking of the reference trajectory.

[0109] The specific implementation process is as follows:

[0110] Step 1: Establish a dynamics model based on a neural network

[0111] Let the n-dimensional real vector represent the system state at discrete time t, and the m-dimensional real vector represent the system control command at discrete time t. The system dynamics can be given by the following formula:

[0112] x t+1 = f(x t , u t ) (31)

[0113] The vehicle system state is given by , where v t is the linear velocity at time t, and is the steering angular velocity at time t. The control command is given by , where p t is the throttle pedal input, bt is the braking input, is the commanded steering angular velocity at time t. Now, the dynamic equation f of the vehicle is given as follows:

[0114]

[0115] Figure 2 is the vehicle dynamics data acquisition module. In the present invention, the data of the vehicle (x t+1 , x t , u t ) is collected by driving a real vehicle equipped with in-vehicle devices such as an inertial measurement unit (IMU) manually for one hour in highway and off-road environments. By observing the training loss and validation loss during the training process, the driving time is determined by trial and error. The data sampling frequency is determined to be 30 Hz according to the hardware specifications of the vehicle.

[0116] x t , u t are used as the inputs of the neural network, and x t+1 is used as the output of the neural network. The neural network learns the dynamic equation f by minimizing the mean square error between the predicted output state and the observed output state x t+1 . Before providing the data to the input layer of the neural network, the data is whitened to reduce the redundancy between the input data features. The model architecture of the present invention adopts a fully connected neural network with two hidden layers. Among them, each hidden layer has 64 neurons, and each neuron uses the ReLU activation function.

[0117] Step 2: Design the control algorithm of the iterative linear quadratic regulator (ILQR)

[0118] Consider a nonlinear discrete dynamic system:

[0119] x t+1 = f(x t , u t ) (33)

[0120] where is the system state, is the control input at time t.

[0121] The iterative linear quadratic regulator (ILQR) control algorithm can handle nonlinear environments and costs, that is, the ILQR control algorithm locally linearizes the nonlinear environment and cost function through Taylor expansion, and then solves the optimal solution under the linearized environment and cost through the backward pass process of LQR. The ILQR algorithm can be divided into three parts: linearization, backward pass of LQR, and forward pass.

[0122] In the linearization part, the non - linear dynamics in ILQR are expanded to the first order, and the cost is expanded to the second order.

[0123]

[0124]

[0125] where, is the optimal control sequence generated at state , then the next state is is the derivative of the function corresponding to state x t and control u t , c(x t , u t ) is the cost function at state x t and control input u t .

[0126] Perform a simple rearrangement of Equation (34):

[0127]

[0128]

[0129] Taking as the new state, as the new control input, then the next state is Q(δx t , δu t ) is the cost function at state δx t and control input δu t . Thus, we get:

[0130]

[0131]

[0132] where, The coefficient matrix of the quadratic part (where, represents the upper - left part of the average - partition matrix C t , represents the upper - right part of the matrix C t , represents the lower - left part of the matrix C t , represents the lower - right part of the matrix C t ), the coefficient matrix of the linear part (where, represents the average - partition matrix c tThe upper part of represents matrix c t (the lower part of). In this way, the ILQR problem is transformed into a conventional LQR problem.

[0133] In the backward pass of LQR, the present invention obtains the optimal control by minimizing the cost function Q(δx t , δu t ). At time t, the optimal control at this time is obtained by calculating the first derivative of the cost function Q(δx t , δu t ) to be zero for δu t . That is, let

[0134]

[0135] The optimal control at time t can be obtained

[0136]

[0137] Expand Equation (38) and represent it using matrix K t and parameter k t . Then we can get:

[0138]

[0139]

[0140] δu t = K t δx t + k t (40)

[0141] Substitute Equation (40) into the cost function Q(δx t , δu t ) in Equation (36), and denote the newly obtained cost function as V(δx t ):

[0142]

[0143] Expanding Equation (41) gives:

[0144]

[0145] Appropriately simplify Equation (42) and consider it as the sum of a quadratic term and a linear term in the form of , where matrix V t and parameter v t are respectively:

[0146]

[0147]

[0148] Among them, the coefficient matrix represents the lower half of matrix C t .

[0149] At time t - 1, Equation (44) holds:

[0150]

[0151] Then the cost function generated from time t to time t - 1 is:

[0152]

[0153] Then from it can be obtained:

[0154]

[0155] Then the cost function Q(δx t-1 , δu t-1 ) is expressed as:

[0156]

[0157] Among them, the coefficient matrix of the quadratic part at time t - 1 (where represents the upper left part of matrix Q t-1 , represents the upper right part of matrix Q t-1 , represents the lower left part of matrix Q t-1 , represents the lower right part of matrix Q t-1 ), the coefficient matrix of the linear part (where represents the upper half of matrix q t-1 , represents the lower half of matrix q t-1 ). At time t - 1, by calculating the first derivative of the cost function Q(δx t-1 , δu t-1 ) to be zero for δu t-1 to obtain the optimal control at this moment. That is, let

[0158]

[0159] The optimal control at time t - 1 can be obtained:

[0160] δu t-1 = K t-1 δxt-1 +k t-1 (49)

[0161] wherein

[0162] Substituting Equation (50) into Equation (47) and simplifying the expansion, we can obtain:

[0163]

[0164]

[0165] wherein, the coefficient matrix represents the lower half of matrix Q t-1 .

[0166] In the forward pass of LQR, it should be noted that this process needs to interact with the real non - linear system to obtain a new real trajectory.

[0167]

[0168] wherein is the optimal control sequence generated at state , then the next state is The parameter α can be adjusted by backtracking line search.

[0169] Combining the state at time N with to obtain a new trajectory. Among them, the CLIP function is used to limit the upper and lower bounds of a vector, that is, given a range [min, max], if the value in the vector is not within this range, it will be set to the boundary of this range. u min is the lower bound of all control inputs, and u max is the upper bound of all control inputs.

[0170] Step 3: Establish a trajectory tracking controller and evaluate its performance

[0171] This part first introduces the development of the trajectory tracking controller. Let represent the state of a vehicle with wheelbase L at discrete time i, where {x i , y i , θ i} is the attitude, x i and y i respectively represent the longitudinal and lateral coordinates of the vehicle in the world coordinate system, θ i is the heading angle of the vehicle, φ i is the steering angle, v i is the speed, is the steering angle change rate at discrete time i. The control command is given by is given, where p i is the throttle pedal input, b i is the brake input, is the commanded steering angle rate of change at discrete time i. Denote the state transition function f by π:

[0172] s i+1 = π(s i , u i ) (53)

[0173] From the bicycle model of the vehicle in the typical state s i , the dynamic equation of the vehicle π (i.e., the state transition function f) can be defined by the following formula:

[0174] x i+1 = x i + v i cos(θ i )Δt

[0175] y i+1 = y i + v i sin(θ i )Δt

[0176]

[0177]

[0178]

[0179] A set of M ordered poses with velocities is given, and cubic spline interpolation is performed on them to obtain the reference trajectory.

[0180] Figure 3 is the error state diagram of the bicycle model and the reference trajectory of the vehicle in the typical state s i . For each state s i , the error state ψ i relative to this reference trajectory is defined as a 9-tuple as Figure 3 shown, is the vertical distance between the vehicle in the state s i and the reference trajectory, is the heading error of the vehicle relative to the reference trajectory, is the velocity error corresponding to the nearest point on the reference trajectory ( here v p is the velocity of the nearest point on the reference trajectory), v i , and φ i come from the state s i. The present invention takes the error state ψ i for the states of an Iterative Linear Quadratic Regulator (ILQR) to encode all errors with respect to a reference trajectory. Given the error state ψ i and the control u i at the discrete time i, let γ denote the state transition function f, and the error state ψ i+1 at the next time step is given by the following equation:

[0181] ψ i+1 = γ(ψ i , u i ) (55)

[0182] γ can be defined by the following formula:

[0183]

[0184]

[0185]

[0186]

[0187]

[0188]

[0189]

[0190]

[0191] The cost l(ψ i ) of executing u i in the error state ψ i is as follows: i )

[0192]

[0193] where A and B are diagonal weight matrices, and the last 3 diagonal elements of A are zero because the present invention only focuses on making the error terms in (56) approach zero. For the state ψ i , its final cost l f (ψ i ) is as follows:

[0194]

[0195] Now, the vehicle trajectory tracking problem with a given reference trajectory can be defined as finding an optimal control sequence {u0, u1, …, u N-2} in the range N to minimize the following cost:

[0196]

[0197] plus the following constraints:

[0198]

[0199] Equations (59) and (60) can transform the trajectory tracking problem into the conventional ILQR problem defined in Step 2.

[0200] The present invention evaluates the performance of the trajectory tracking algorithm by using four indicators: average cross tracking error, maximum cross tracking error, average speed error, and maximum speed. The present invention calculates the above indicators on five types of reference trajectories, namely circular trajectories (as shown in Figure 4 ), elliptical trajectories (as shown in Figure 5 ), snake-shaped trajectories (as shown in Figure 6 ), figure-eight trajectories (as shown in Figure 7 ), and combined trajectories (as shown in Figure 8 ).

[0201] Table 1 lists the error results on various reference trajectories. Considering the accuracy of in-vehicle devices, the average cross tracking error and maximum cross tracking error on each reference trajectory are acceptable. The reason for the relatively high maximum speed is that the vehicle speed is zero at the start, while the speed at the initial point in the reference trajectory is 1 m / s - 2 m / s.

[0202] Table 1: Error Results of Various Reference Trajectories

[0203]

[0204] The series of detailed descriptions listed above are only specific descriptions of the feasible implementation modes of the present invention, and they are not intended to limit the protection scope of the present invention. Any equivalent modes or changes that do not depart from the technology created by the present invention should be included in the protection scope of the present invention.

Claims

1. A trajectory tracking control method for an autonomous vehicle based on a neural network dynamics model, characterized in that, Including: S1. Establish a dynamic model based on a neural network; Design a neural network model using a fully connected feedforward network. The model has two hidden layers, with 64 neurons in each layer. Each neuron uses a ReLU activation function. The input of the model is the vehicle state and control command at the current moment, and the output is the vehicle state at the next moment. This neural network learns the dynamic equation by minimizing the mean square error between the predicted output state and the observed output state; S2. Design a control algorithm for an iterative linear quadratic regulator; S3. Establish a trajectory tracking controller according to the control algorithm in S2; The specific implementation of S1 includes: Let denote the state, denote the system control command at discrete time t, and the system dynamics are given by: x t+1 = f(x t , u t )(1) Vehicle system status is given by where v t is the linear velocity at time t, is the steering angular velocity at time t, and the control command is given by where p t is the accelerator pedal input, b t is the braking input, is the commanded steering angular velocity at time t, and the dynamic equation f of the vehicle is obtained as follows: where x t , u t is used as the input of the neural network model, and x t+1 is used as the output of the neural network model. The neural network learns the dynamic equation f by minimizing the mean square error between the predicted output state and the observed output state x t+1 ; The specific implementation of S2 includes: For a non-linear discrete dynamic system: x t+1 = f(x t , u t )(3) where is the system state, is the control command at time t; The iterative linear quadratic regulator control algorithm is divided into three parts: linearization, backward pass of LQR, and forward pass: In the linearization part, expand the non-linear dynamics in the linear quadratic regulator to the first order and the cost to the second order; wherein, is the optimal control sequence generated at state , then the next state is is the derivative of the function corresponding to state x t and control u t , c(x t , u t ) is the cost function at state x t and control input u t ; Rearrange the above formula (4): Take as the new state, as the new control input, then the next state is Q(δx t , δu t ) is the cost function at state δx t and control input δu t . Thus, we get: Among them, The coefficient matrix of the quadratic part Among them, Represents the upper left part of matrix C t Of Represents the upper right part of matrix C t Of Represents the lower left part of matrix C t Of Represents the lower right part of matrix C t Of, the coefficient matrix of the linear part Among them, Represents the upper half of matrix c t Of Represents the lower half of matrix c t Of; In the backpropagation part of LQR, the optimal control is obtained by minimizing the cost function Q(δx t , δu t ). At time t, the optimal control at this moment is obtained by calculating δu t , δu t when the first derivative of the cost function Q(δx t ) is zero; that is, let The optimal control at time t can be obtained; Expand Equation (8) and represent it using matrix K t and k t to obtain: Substitute Equation (10) into the cost function \(Q(\delta x t ,\delta u t )\), and denote the newly obtained cost function as \(V(\delta x t )\): Expand formula (11) to get: Appropriately simplify the expansion and regard it as the sum of quadratic terms and linear terms in the form of , where the matrix V t and v t are respectively: Among them, the coefficient matrix represents the lower half of matrix C t ; At time t - 1, formula (14) holds: Then the cost function generated from time t to time t - 1 is: Furthermore, from it can be obtained that: Then the cost function Q(δx t-1 , δu t-1 ) is expressed as: Among them, the coefficient matrix of the quadratic part at time t-1 is in, Represents the matrix Q t-1 The upper left corner of Represents the matrix Q t-1 The upper right corner of Represents the matrix Q t-1 The lower left corner of Represents the matrix Q t-1 The lower right corner of the linear part of the coefficient matrix in, Represents the matrix q t-1 The upper part, Represents the matrix q t-1 The lower half of the time t-1 is calculated by calculating the cost function Q(δx t-1 ,δu t-1 ) when its first-order derivative is zero t-1 To obtain the optimal control at this moment, let Obtain the optimal control at time t - 1; δu t-1 = K t-1 δx t-1 + k t-1 (19) Among them Substitute Equation (20) into Equation (17) and simplify the expansion to obtain: Among them, the coefficient matrix represents the lower half of matrix Q t-1 ; In the forward pass part of LQR, this process needs to interact with the real non-linear system to obtain a new real trajectory; Among them, is the optimal control sequence generated at state , then the next state is The parameter α is adjusted through backtracking line search, combining the state at time N with to obtain a new trajectory.

2. The method for trajectory tracking control of an autonomous vehicle based on a neural network dynamics model according to claim 1, wherein The training method of the neural network model: Collect vehicle data by manually driving a real vehicle equipped with an inertial measurement unit for one hour in highway and non-highway environments. Determine the driving time by observing the training loss and validation loss during the training process, using trial and error; Among them, before providing the data to the input layer of the neural network, whiten the data first to reduce the redundancy between the input data features; 3. The method for trajectory tracking control of an autonomous vehicle based on a neural network dynamics model according to claim 1, characterized in that, The specific implementation of S3 includes: Let denote the state of a vehicle with wheelbase L at discrete time i, where {x i , y i , θ i} is the attitude, x i and y i represent the longitudinal and lateral coordinates of the vehicle in the world coordinate system respectively, θ i is the heading angle of the vehicle, φ i is the steering angle, v i is the speed, is the rate of change of the steering angle at discrete time i, and the control command is given by , where p i is the throttle pedal input, b i is the braking input, is the commanded rate of change of the steering angle at discrete time i. Denote the state transition function f by π: s i+1 = π(s i , u i ) (23) by the bicycle model of the vehicle in the typical state s i The dynamic equation π of the vehicle, i.e., the state transition function f, is defined by the following formula: x i+1 = x i + v i cos(θ i ) Δt y i+1 = y i + v i sin(θ i )Δt Assume a set of M ordered postures with speeds, perform cubic spline interpolation on them to obtain a reference trajectory; For each state s i , the error state ψ with respect to the reference trajectory i is defined as a nine - tuple is the vertical distance between the vehicle at state s i and the reference trajectory, is the heading error of the vehicle with respect to the reference trajectory, is the velocity error corresponding to the closest point on the reference trajectory, where v p is the velocity of the closest point on the reference trajectory, v i , and φ i are from state s i , the error state ψ i is used as the state for the iterative linear - quadratic regulator to encode all the errors with respect to the reference trajectory. Given the error state ψ i and control u i at discrete time i, denoting the state - transition function f by γ, the error state ψ i+1 at the next time step is given by the following equation: ψ i+1 = γ((ψ i , u i ) (25) γ is defined by the following formula: Execute u under the error state ψ i The cost l(ψ i , u i ) is as follows: i ) is as follows: where A and B are diagonal weight matrices, and the last three diagonal elements of A are zero, making the error term in Equation (26) approach zero for the state ψ i , and its final cost l f (ψ i ) is as follows: Define the vehicle trajectory tracking problem with a given reference trajectory as finding an optimal control sequence {u0, u1, …, u N-2} in the range N that minimizes the following cost: Design the following constraints:

4. A system for the trajectory tracking control method of an autonomous vehicle based on the neural network dynamics model according to claim 1, characterized in that, Including: The neural network dynamics model part, the iterative linear quadratic regulator part, and the trajectory tracking controller part; For the neural network dynamics model part, design a neural network dynamics model using a fully connected feedforward neural network. The model has two hidden layers, with 64 neurons in each layer. Each neuron uses a ReLU activation function. The input of the model is the vehicle state and control command at the current moment, and the output is the vehicle state at the next moment. This neural network learns the dynamic equation by minimizing the mean square error between the predicted output state and the observed output state; Design an iterative linear quadratic regulator and a trajectory tracking controller based on the neural network dynamics model. The trajectory tracking controller obtains the optimal control command by minimizing the cost function of the iterative linear quadratic regulator to achieve tracking of the reference trajectory; 5. A vehicle-mounted control device, characterized in that, The on-vehicle control device contains the unmanned vehicle trajectory tracking control system based on the neural network dynamics model described in claim 4.

Citation Information

Patent Citations

  • Automatic driving vehicle trajectory tracking system and method based on neural network dynamics model

    CN114379583A