Intelligent connected vehicle path tracking control method based on deep reinforcement learning
By using a deep reinforcement learning-based approach, a horizontally and vertically decoupled vehicle state space model and a reinforcement learning agent environment model are established. Combined with the Actor-Critic architecture's dual-delay deep deterministic policy gradient algorithm, the problems of insufficient vehicle dynamics constraints and model accuracy in existing technologies are solved, thereby achieving the safety and stability of path tracking control for intelligent connected vehicles.
Patent Information
- Application Number
- CN202310234762.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-03-13
AI Technical Summary
Existing path tracking control methods are insufficient in terms of vehicle dynamics constraints and model accuracy, making it difficult to guarantee the safety and stability of intelligent connected vehicles.
Based on deep reinforcement learning, a horizontally and vertically decoupled vehicle state space model and reinforcement learning agent environment model are established. Combined with the Actor-Critic architecture's dual-delay deep deterministic policy gradient algorithm, end-to-end path tracking control is achieved through multi-objective reward function design and simulation environment verification.
While ensuring vehicle stability, the robustness and control accuracy of path tracking control are improved, the system model design is simplified, the controller design difficulty and computational complexity are reduced, and the real-time performance of the system is improved.
Smart Images

Figure CN116859905B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent connected vehicles and relates to a path tracking control method for intelligent connected vehicles based on deep reinforcement learning. Background Technology
[0002] With the development of intelligent and connected vehicles (ICVs), path-following control (PFC) technology, as a further enhancement of traditional advanced driver assistance systems (ADAS), essentially enables intelligent vehicles to drive safely and smoothly along a navigator's or predetermined trajectory in a modern communication and network environment. Based on existing technological accumulation, the challenge lies in designing a path-following controller based on dynamics (the vehicle's structural characteristics), primarily including constraints on vehicle dynamics (such as the center of gravity sideslip angle threshold) and vehicle steering system margins.
[0003] Currently, existing technologies, including publicly available patents, largely focus on breakthroughs in control methods. Traditional sliding mode control, PID algorithms, aiming and tracking control, and robust control are all geared towards achieving better control performance. These methods often design models while ignoring the structural limitations of the vehicle itself, leading to inherent flaws. With the development of reinforcement learning, the emergence of Deep Reinforcement Learning (DRL) methods, which combine deep learning to achieve end-to-end control, offers a new approach to solving the problem of building accurate system models. For example, patent application CN11322017A, entitled "Trajectory Tracking Control Strategy for Autonomous Intelligent Vehicles Based on Deep Reinforcement Learning," focuses on improving traditional control model algorithms using deep reinforcement learning. While this technical solution achieves path tracking control from a strategic perspective, it still neglects the acquisition of navigation trajectory information, control system coordinates, and vehicle dynamic constraints. It only focuses on achieving end-to-end control, making it difficult to guarantee driving safety for the entire path tracking control system. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a path tracking control method for intelligent connected vehicles based on deep reinforcement learning, which takes into account both vehicle dynamics constraints and model accuracy, and achieves path tracking control while ensuring vehicle stability.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A path tracking control method for intelligent connected vehicles based on deep reinforcement learning includes the following steps:
[0007] S1. Based on the vehicle dynamics constraint characteristics, establish a vehicle state space model with horizontal and vertical decoupling and build a reinforcement learning agent environment model based on the coordinate system.
[0008] S2. Establish a reinforcement learning training framework for the agent, including: establishing the agent's state-action space, defining the algorithm, building the agent module and path tracking module, and designing and configuring the neural network parameters;
[0009] S3. Train the agent and perform automated policy verification;
[0010] S4. Build a simulation environment to verify the effectiveness of the strategy. By establishing a joint simulation environment and introducing sensor and communication systems, the effectiveness of the strategy under different operating conditions can be verified.
[0011] Furthermore, step S1 specifically includes:
[0012] S11. Establish the state space model of the following vehicle, as shown in the following equation:
[0013]
[0014] The input to this state-space model is the vehicle acceleration a. ego and the front wheel steering angle θ steer The output is the longitudinal velocity v at the vehicle's center of gravity. x Lateral velocity v y and yaw rate e yaw ;
[0015] Simultaneously, a safe following model is established for longitudinal control of the following vehicle:
[0016] d des =d safe +T A ×v ego
[0017] In the formula, d des d represents the desired workshop spacing. safe T represents the minimum stationary distance. A v represents the desired workshop time interval constant. ego Indicates the speed of the following vehicle;
[0018] S12. Establish an environment model:
[0019] 1) Based on the geodetic coordinate system, a sensing system is built using vehicle-mounted sensors to detect lanes and acquire road and vehicle information, including road curvature rho, lateral deviation e1 of following vehicles, relative yaw angle e2, etc.
[0020] 2) Based on the geodetic coordinate system and the vehicle coordinate system, and in conjunction with sensors, detect the set speed v of the navigator vehicle. lead Navigator position p lead Following the longitudinal speed v of the vehicle ego Following the vehicle's position p ego The relative distance d between the front and rear vehicles rel and the relative speed v between the vehicles in front and behind. err .
[0021] Furthermore, the vehicle state space model is formed by coupling a longitudinal state space model and a lateral state space model;
[0022] The vertical state-space model is shown in the following equation:
[0023]
[0024] In the formula, τ represents the vehicle longitudinal acceleration tracking time constant;
[0025] The input to the longitudinal state-space model is the longitudinal acceleration a. ego The output is the longitudinal velocity v. x ;
[0026] The lateral state-space model is shown in the following equation:
[0027]
[0028]
[0029] In the formula, m represents the vehicle mass, and L... F and L R C represents the distance from the vehicle's center of gravity to the front and rear axles, respectively. F and C R I represents the lateral stiffness of the front and rear wheels, respectively. Z This represents the yaw moment of inertia of a vehicle.
[0030] The input to the lateral state-space model is the front wheel steering angle θ. steer The output is the lateral velocity v. y and yaw rate e yaw .
[0031] Furthermore, step S2 specifically includes:
[0032] S21. Establish the state space and action space of the intelligent agent;
[0033] The state space is shown below:
[0034] S = [v ego ,d rel ,v lead [e1,e2]
[0035] In the formula, v ego Indicates the longitudinal velocity of the vehicle, v lead This indicates the set speed of the navigator, d. rel E1 indicates the relative distance between the vehicles in front and behind, E2 indicates the lateral deviation of the following vehicle, and E1 indicates the relative yaw angle.
[0036] The motion space is shown below:
[0037] A = [a ego ,θ ego ]
[0038] In the formula, a ego θ represents the longitudinal acceleration of the vehicle. ego Indicates the steering angle of the front wheels of the following vehicle; a ego and θ ego The amplitude range is determined by the vehicle characteristics;
[0039] S22. Perform algorithm design and neural network construction.
[0040] 1) Based on the state space and action space determined in step S21, establish the Markov decision process:
[0041] <S,A,P,R,Γ>
[0042] Where P represents the state transition probability matrix, which is the probability that the agent will execute policy π to select action a in state s and transition to state s′; R represents the reward function, which is the expected reward that the agent will obtain by executing action a in state s; Γ represents the discount factor, which is used to calculate the cumulative reward value.
[0043] 2) The agent is trained using the dual-delay deep deterministic policy gradient algorithm (TD3) based on the Actor-Critic (AC) architecture;
[0044] 3) Building a Neural Network: The neural network has one input layer and one output layer. The number of neurons is determined by the agent's state space and action space. The number of hidden layers and neurons in the neural network are calculated using the following formula:
[0045]
[0046] Y num =β1Y lay +β2
[0047] In the formula, Y num Y represents the number of neurons in the hidden layer. lay α represents the number of hidden layers, a represents the number of input nodes in the neural network, b represents the number of output nodes, and α and β represent the weight parameters used for calculation.
[0048] S23. Building the agent module: The inputs to the agent module include: agent state, reward value, and training termination condition; the output includes the actions performed by the agent.
[0049] S24. Construct a path tracking module, including a coordinate transformation module and a position update module; the coordinate transformation module is used to convert parameters in the vehicle coordinate system to parameters in the geodetic coordinate system; the position update module is used to output the position of the following vehicle in the geodetic coordinate system at the next moment;
[0050] S25. Connect the various modules, build a reinforcement learning training framework, and connect the built agent module and path tracking module into the simulation environment. Configure and connect them according to requirements to complete the overall module construction.
[0051] S26. Configure training parameters and start training; the training parameters include:
[0052] Maximum number of iterations: the maximum number of training iterations that can be performed.
[0053] Training termination condition: Training stops when the agent's average reward or round reward reaches a certain value.
[0054] Training cessation condition reached: i.e., the value that the average reward needs to reach;
[0055] Average reward data length: This refers to the cumulative number of reward rounds used for the average reward.
[0056] Furthermore, in step S23, the reward function of the agent module is a multi-objective reward function, as shown in the following equation:
[0057]
[0058] In the formula, u t-1 v represents the action output by the agent in the previous moment. err The velocity difference, v, represents the relative velocity difference from the set trajectory. err =v lead -v ego a t-1 ρ represents the output acceleration of the vehicle at the previous moment, e represents the scientific notation;
[0059] and:
[0060] Ct =I, if isdone=η1
[0061]
[0062]
[0063] Where isdone represents the training termination condition, I represents the fixed reward value, and η represents the reward calculation weight;
[0064] The training termination condition is:
[0065] 1) Excessive lateral error: |e1| > B1;
[0066] 2) Following the vehicle's longitudinal speed, a small speed or even a deceleration to 0 occurs: |v ego |<B2;
[0067] 3) A collision occurs between two vehicles: d rel <B3;
[0068] Where B represents the computational parameters in the training conditions.
[0069] Furthermore, step S3 specifically includes:
[0070] S31. Introduce noise to the initial training state of the navigating and following vehicles during path tracking:
[0071] p′ lead (0)=p lead (0)+random[-Δ1,Δ1]
[0072] p′ ego (0)=p ego (0)+random[-Δ2,Δ2]
[0073] v′ ego (0)=v ego (0)+random[-Δ3,Δ3]
[0074] In the formula, p lead and p′ lead p represents the position of the navigator vehicle before and after the noise was introduced. ego and p′ ego These represent the positions of the following vehicle before and after the addition of noise, respectively. ego and v′ ego These represent the longitudinal speeds of the following vehicle before and after adding noise, respectively; random(·) represents a random function; and Δ represents the limit for generating random numbers.
[0075] S32. Perform round-based training on the agent;
[0076] S33. Test the deep reinforcement learning model of the agent, automatically verify the executable policies generated during the deep reinforcement learning training convergence process, and save the effective policies.
[0077] Furthermore, in step S4, closed-loop testing is conducted using a simulation environment (Matlab / Simulink+PreScan); Matlab is responsible for providing the configuration of the agent's state-action space and neural network structure; Simulink is responsible for building the vehicle agent module and path tracking module; and PreScan is responsible for providing the entire environment model.
[0078] The beneficial effects of this invention are as follows:
[0079] (1) The present invention can complete path tracking control while ensuring vehicle stability and has strong robustness;
[0080] (2) Since the present invention adopts the end-to-end control method of deep reinforcement learning and designs the controller through the multi-objective reward function design method, it does not need to rely on the precise vehicle mathematical model, which simplifies the system model, reduces the difficulty of controller design and the complexity of calculation, effectively improves the real-time performance of the system, and can also achieve high control accuracy.
[0081] (3) The path tracking method of the present invention has a simple algorithm and the overall system is easy to implement in engineering.
[0082] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0083] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0084] Figure 1 This is a flowchart of the method of the present invention;
[0085] Figure 2 This is a schematic diagram of path tracking based on a geodetic coordinate system;
[0086] Figure 3 This is a schematic diagram of the vehicle dynamics model;
[0087] Figure 4 A diagram illustrating the reinforcement learning and training framework;
[0088] Figure 5 A schematic diagram of the training process for a reinforcement learning agent;
[0089] Figure 6 This is a schematic diagram illustrating the effectiveness results of the agent test. Figure 6 (a) To follow the vehicle's intelligent agent output acceleration. Figure 6 (b) is the speed of the lead vehicle and the following vehicle. Figure 6 (c) represents the safe distance error between the lead vehicle and the following vehicles. Figure 6 (d) represents the lateral error of the following vehicle. Figure 6 (e) represents the yaw angle error of the following vehicle. Figure 6 (f) outputs the front wheel steering angle for the vehicle-following intelligent agent. Detailed Implementation
[0090] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0091] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0092] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0093] To balance model accuracy and vehicle dynamics constraints, this invention decouples the following vehicle dynamics model into two parts: a lateral control model and a longitudinal control model, facilitating the limitation of constraints. Simultaneously, based on the environment model and the constructed reinforcement learning agent training model, the constrained state-action set time-series decision network is trained using the Twin Delayed Deep Deterministic Policy Gradient (TD3) algorithm in reinforcement learning. The trained policy is then automatically validated to obtain a high-performance agent. Finally, the effectiveness of the algorithm is verified in a co-simulation environment closely resembling a real-world scenario. Experimental results demonstrate that the algorithm of this invention possesses advantages such as strong robustness, simplicity, and high accuracy.
[0094] like Figure 1 The image shows a path tracking control method for intelligent connected vehicles based on deep reinforcement learning. The specific content of this method is as follows:
[0095] I. Establishment of Vehicle Dynamics Model and Environmental Model
[0096] Since a vehicle is a complex system, the path tracking control problem was simplified to some extent when performing dynamic modeling of the vehicle in this invention. Simultaneously, a foundational supporting model is provided for the subsequent interaction between the reinforcement learning agent and the environment, including representing the lateral and longitudinal decoupled motion states of the following vehicle using a continuous state-space model, and establishing a coordinate system and facilitating information exchange within the environment, as detailed below:
[0097] 1. For the path tracking control problem, the longitudinal control of the following vehicle can be decomposed into longitudinal adaptive cruise control (ACC), using the following state-space model:
[0098]
[0099] In the formula, τ represents the vehicle's longitudinal acceleration tracking time constant; the input to this longitudinal state-space model is the longitudinal acceleration a. ego The output is the longitudinal velocity v. x .
[0100] Simultaneously, a safe following model needs to be established for longitudinal control to maintain a safe distance between the following vehicle and the lead vehicle. This invention employs a safe time-distance strategy to ensure the safety of following behavior:
[0101] d des =d safe +T A ×v ego
[0102] In the formula, d des d represents the desired workshop spacing. safe T represents the minimum stationary distance. A v represents the desired workshop time interval constant. ego Indicates the speed of the following vehicle.
[0103] 2. Similarly, the lateral control of the following vehicle can be decomposed into Lane Keeping Assist (LKA), using the following state-space model:
[0104]
[0105]
[0106] In the formula, m represents the vehicle mass, and L... F and L R C represents the distance from the vehicle's center of gravity to the front and rear axles, respectively. F and C R I represents the lateral stiffness of the front and rear wheels, respectively. Z This represents the vehicle's yaw moment of inertia. The input to this lateral state-space model is the front wheel steering angle θ. steer The output is the lateral velocity v. y and yaw rate e yaw .
[0107] In summary, the state-space model of the following vehicle can be represented as follows:
[0108]
[0109] The control input for following the vehicle is the vehicle acceleration a. ego and the front wheel steering angle θ steer The control output is the longitudinal velocity v at the vehicle's center of gravity. x Lateral velocity v y and yaw rate e yaw .
[0110] 3. Environmental Model Establishment
[0111] The environment model is responsible for interacting with the reinforcement learning agent, updating vehicle state information, and providing rewards for vehicle actions. Its main functions are: 1) providing detection information of surrounding objects based on environmental perception technology, while also providing high-precision maps and high-precision positioning technology for agent training (this invention provides a basic road model based on simulation conditions, using a ring road model with fixed road curvature); and 2) providing vehicle-to-vehicle information sharing and collaborative control based on V2X communication technology.
[0112] (1) Based on the geodetic coordinate system, a sensing system is constructed using vehicle-mounted sensors (usually cameras, radar, etc.) to perform lane detection, obtain information such as road curvature rho, lateral deviation e1 and relative yaw angle e2 of the following vehicle;
[0113] (2) Based on the geodetic coordinate system and the vehicle coordinate system, combined with sensor fusion, the set speed v of the navigator vehicle is detected. lead Position p lead Following the vehicle's longitudinal speed v ego Position p ego The relative distance d between the front and rear vehicles rel The relative speed v between the vehicles in front and behind err This information is transmitted between the lead vehicle and the following vehicles via V2X communication technology.
[0114] II. Strengthening the Learning and Training Framework
[0115] This training framework is mainly responsible for training modules that enable interaction between the agent and the environment, forming a closed-loop simulation flow framework with the provided environment model.
[0116] 1. Establish the state space and action space of the intelligent agent.
[0117] As a control method characterized by end-to-end, the reinforcement learning training framework first needs to establish the input state and output action of the entire control system.
[0118] (1) As can be seen from the first part, the environmental model provides the state information of the lead vehicle and the following vehicle. Since the decision of the DRL agent is based on the current state and the reward, and the neural network is used to perform nonlinear fitting of the "state-action pair", too many "state-action pairs" will affect the convergence rate of the neural network, and too little state information is insufficient for the agent to make decisions. Therefore, this invention combines the path tracking control objective and establishes the following state space of the following vehicle agent:
[0119] S = [v ego ,d rel ,v lead [e1,e2]
[0120] In the formula, v ego Indicates the longitudinal velocity of the vehicle, v lead This indicates the set speed of the navigator, d. rel The values represent the relative distance between the vehicles in front and behind, e1 represents the lateral deviation of the following vehicle, and e2 represents the relative yaw angle. All this information can be obtained from the environment model.
[0121] (2) Similarly, the motion space for following vehicles is established as follows:
[0122] A = [a ego ,θ ego ]
[0123] In the formula, a ego θ represents the longitudinal acceleration of the vehicle. ego Indicates the steering angle of the front wheels of the following vehicle; a ego and θ ego The range of amplitude is determined by vehicle characteristics.
[0124] 2. Design the algorithm and build the neural network.
[0125] (1) Establish Markov Decision Processes (MDPs). The MDP process is responsible for mathematically analyzing path tracking control into a time-series decision process in reinforcement learning. Based on the state space and action space determined above, the Markov decision process is established:
[0126] <S,A,P,R,Γ>
[0127] This process can describe the iterative training loop of the following vehicle in the path tracking control process, and:
[0128] P: Represents the state transition probability matrix, i.e., the probability that the agent, in state s, executes policy π(s,a) and chooses action a, and the state transitions to s′.
[0129]
[0130] R: Represents the reward function, i.e., the expected reward that the agent will obtain by performing action a in state s:
[0131]
[0132] Γ: Represents the discount factor, used to calculate the cumulative reward value. The long-term cumulative reward is represented as follows:
[0133]
[0134] Where E represents the expected value of the long-term cumulative reward, and γ represents the discount factor in the calculation of the cumulative reward.
[0135] In summary, the goal of reinforcement learning is to maximize long-term rewards, as shown below:
[0136]
[0137] Where, π * This refers to a strategy that maximizes long-term cumulative rewards.
[0138] (2) The algorithm architecture is finalized. As can be seen from 2.(1) above, the state space and action space of the agent are both continuously changing quantities. Therefore, the algorithm should be designed based on the Actor-Critic (AC) architecture. The AC architecture combines the value function network and the policy function network. It can directly train the current policy network (Actor Network), while another set of value function networks (Critic Network) is responsible for evaluating the merits of the current policy in real time.
[0139] In this invention, the dual-delay deep deterministic policy gradient algorithm (TD3) based on the AC architecture is used to train the agent. The TD3 algorithm uses two sets of Critic networks and one set of Actor networks, and each set of networks is further divided into a current (online) network and a target (target) network for gradient update of network parameters.
[0140]
[0141]
[0142] Ф represents the neural network parameters, μ and μ′ represent the policy network (current network and target network), and Q and Q′ represent the value function network (current network and target network).
[0143] All three networks require configuration of algorithm parameters to ensure that the entire network meets the needs of the current path tracking control decision. This mainly includes: 1) the single-step iteration step size T in time-series decision-making. s ;2) Noise smoothing factor θ;3) Cumulative reward discount factor γ;4) Experience pool size M;5) Mini-batch size;6) Standard deviation of the reinforcement learning noise model and the noise model.
[0144] (3) Neural Network Setup: Based on the established algorithm, three sets of neural networks need to be configured. The input and output layers of the neural networks have been confirmed and fixed in Section II.1. This part mainly involves determining the number of hidden layers and neurons. In path tracking control, a multi-layer neural network is used to fit the nonlinear function between the input and output. The specific calculation method is as follows:
[0145]
[0146] Y num =β1Y lay +β2
[0147] In the formula, Y num Y represents the number of neurons in the hidden layer. lay α represents the number of hidden layers, 'a' represents the number of input nodes in the neural network, 'b' represents the number of output nodes, and α and β represent the weight parameters used for calculation.
[0148] This calculation method is suitable for roughly determining the number of hidden layers and neurons. In practice, it can be adjusted according to the specific input / output nodes and training results. Meanwhile, to prevent oversaturation and zero values among the activation layers, the ReLU activation function is used to weight the neurons in the hidden layers. Other neural network parameters (learning rate, optimizer, optimizer parameters, gradient threshold) will be described in detail in subsequent examples.
[0149] (4) Build an agent module. Based on the above 2.(1) to (3), the input of the agent module mainly includes: agent state, reward value and training termination condition, and the output is the action performed by the agent.
[0150] Therefore, the first step is to process the agent's input signals, obtain valid information about the agent's state from the environment, and calculate the agent's relative state in the environment. This is mainly done through the environmental model described in Section 1.3 above. Secondly, after the signal input, a reward function needs to be designed for the currently calculated state and other input information (including the agent's past actions). The safety, comfort, and economy of the vehicle must also be considered to calculate the reward value for each iteration. Finally, during training, to minimize invalid training iterations and ensure the agent converges towards maximizing the cumulative reward, a termination condition needs to be designed for the training process.
[0151] The input state and output action of the intelligent agent module have been given in section 2.1.(1).
[0152] For the reward function, this invention designs the following multi-objective reward function expression:
[0153]
[0154] In the formula, u t-1 v represents the action output by the agent in the previous moment. err The velocity difference, v, represents the relative velocity difference from the set trajectory. err =v lead -v ego a t-1 This represents the output acceleration of the following vehicle at the previous moment, ρ represents the calculation weight parameter, e1 represents the lateral deviation of the following vehicle, and e represents scientific notation.
[0155] and:
[0156] C t =I, if isdone=η1
[0157]
[0158]
[0159] Where isdone represents the training termination condition, I represents the fixed reward value, and η represents the reward calculation weight;
[0160] The training termination condition is:
[0161] 1) Excessive lateral error: |e1| > B1;
[0162] 2) Following the vehicle's longitudinal speed, a small speed or even a deceleration to 0 occurs: |v ego |<B2;
[0163] 3) A collision occurs between two vehicles: d rel <B3;
[0164] Where B represents the computational parameters in the training conditions.
[0165] (5) Build a path tracking module.
[0166] The path tracking module mainly outputs the real state of the following vehicle in the environment based on the actions output by the intelligent agent, including the horizontal and vertical coordinates, speed, and yaw angle in the geodetic coordinate system.
[0167] This module is divided into the following sections:
[0168] Coordinate Transformation Module: Since the output parameters in the vehicle dynamics model are based on the vehicle body coordinate system, they need to be transformed into the vehicle's longitudinal and lateral velocities in an absolute coordinate system (geocentric coordinate system). This is mainly achieved by outputting the longitudinal velocity v of the following vehicle from the vehicle dynamics model in section 1.1. x Lateral velocity v y and yaw rate e yaw Then, the coordinates are transformed into the vehicle's longitudinal velocity v in the absolute coordinate system. X Lateral velocity v Y ;
[0169] Position update module: Updates the position based on the X and Y axis velocities after coordinate transformation, and outputs the vehicle position in the absolute coordinate system at the next moment.
[0170] (6) Connect the various modules, build a reinforcement learning training framework, connect the built intelligent agent module and path tracking module into the simulation environment, configure and connect them according to requirements, and complete the construction of the overall module.
[0171] (7) Configure training parameters and start training. The main training parameters to be configured include:
[0172] Maximum number of iterations: the maximum number of training iterations that can be performed.
[0173] Training termination condition: Training stops when the agent's average reward or round reward reaches a certain value.
[0174] Training stopping condition reaches a certain value: This invention uses the average reward as the training stopping condition, that is, the average reward needs to reach a certain value;
[0175] The length of the average reward data is calculated as the cumulative number of reward rounds used to calculate the average reward.
[0176] III. Training of Vehicle-Following Intelligent Agents and Automated Validation of Policies
[0177] To enhance the generalization ability of the model after the agent training is completed, noise was introduced into the initial training states of both the lead vehicle and the following vehicle during the path tracking process.
[0178] 1. Training of vehicle-following intelligent agents
[0179] (1) Noise and motion limiting are introduced to enhance the generalization ability of the model after the agent is trained. Noise is introduced into the initial training state of both the lead car and the follower car during the path tracking process:
[0180] p′ lead (0)=p lead (0)+random[-Δ1,Δ1]
[0181] p′ ego (0)=p ego (0)+random[-Δ2,Δ2]
[0182] v′ ego (0)=v ego (0)+random[-Δ3,Δ3]
[0183] In the formula, p lead and p′ lead p represents the position of the navigator vehicle before and after the noise was introduced. ego and p′ ego These represent the positions of the following vehicle before and after the addition of noise, respectively. ego and v′ ego represents the longitudinal speed of the following vehicle before and after adding noise, respectively; random(·) represents a random function; and Δ represents the limit for generating random numbers.
[0184] Furthermore, due to the limitations of the dynamic model, the range of actions that the following vehicle can perform needs to be limited, with the acceleration output limited by ±Δa. ego m / s 2 The front wheel steering angle limit is: ±Δθ ego rad.
[0185] (2) Agent round training, the steps for a single training round are as follows:
[0186] 1) Randomly initialize the online neural network parameters Φ of the actor / critic. μ Ф Q ;
[0187] 2) Initialize the parameters of the target neural network Φ μ →Φ μ′ ;
[0188] 3) Initialize the experience cache unit M;
[0189] 4) Rounds from 1 to the maximum number of rounds:
[0190] 5) Initialize the random action exploration strategy π and enter the initial state s;
[0191] 6) Single step from 1 to maximum number of steps:
[0192] 7) Perform actions that randomly introduce noise.
[0193] 8) Enter the state transition process, obtain reward r, and enter the new state s′;
[0194] 9) Save this state transition trajectory (s,a,r,s′) into the experience pool M;
[0195] 10) Select N sample trajectories from the experience pool M as a mini-batch training data;
[0196] 11) Introduce noise into the actor network for training and use the Bellman equation. Calculate the minimum value of the two critic networks;
[0197] 12) Update the actor network accordingly.
[0198] 13) Internal network updates:
[0199] 14) Based on the gradient of the deterministic policy Update the online network;
[0200] 15) Use soft update τΦ Q +(1-τ)Φ Q′ →Φ Q′ ,τΦ μ +(1-τ)Φ μ′ →Φ μ′ Update the target network in this way;
[0201] 16) End of single step;
[0202] 17) End of round.
[0203] 2. Automated verification of vehicle-following intelligent agent strategy
[0204] Because a large number of executable policies are generated during the DRL training convergence process, but these policies are actions performed based on the current state under different noise conditions, the convergence of their reward values does not mean that a locally optimal action has been executed under the current conditions. Further testing of the model under different conditions is still needed. The specific testing steps are as follows:
[0205] 1) Input: The strategy saved during training.
[0206] 2) Output: Policy network model, cumulative reward value under this policy, and experimental data.
[0207] 3) Clear the workspace;
[0208] 4) Extract and save all policies of the following vehicle intelligent agents;
[0209] 5) Start the simulation environment;
[0210] 6) For each save strategy, execute:
[0211] A. Loading strategy;
[0212] B. Enter the cyclic test condition, if:
[0213] a. Successfully pass the test conditions and save the output reward value; save the valid experimental data under the test scenario;
[0214] b. If the strategy fails, exit the current strategy and proceed to the next strategy;
[0215] 7) Close the simulation environment;
[0216] 8) Save effective strategies.
[0217] IV. Validation of the Follow-the-Vehicle Intelligent Agent Strategy
[0218] After training the agent, to test its actual performance under real driving conditions, it is necessary to conduct real-vehicle verification or closed-loop testing in a professional vehicle ADAS simulation environment. To save costs, this invention uses a simulation environment (Matlab / Simulink + PreScan) for closed-loop testing. Matlab is responsible for providing the agent's state-action space and configuring the neural network structure; Simulink is responsible for building the vehicle agent module and path tracking module; and PreScan is responsible for providing the entire environment model.
[0219] Simultaneously, this invention also requires the use of various sensors from PreScan for precise vehicle information acquisition and transmission, including: 1) Self Sensor / GPS Receiver: outputting precise GPS location information; 2) Beacon / OBU: enabling V2I communication and bidirectional communication between vehicles; 3) Air Sensor: outputting target detection information (range from sensor coordinate system to detected object, azimuth, target ID, target longitudinal velocity, and target heading angle); 4) Lane Maker Sensor: providing information required for environmental modeling; 5) V2X Transceiver: providing communication between two vehicles.
[0220] To ensure the reliability of the experiment, a Detailed Sensor can be further adopted, which corresponds to the actual sensor model and takes into account the loss of sensor information during use. It can be used for robustness testing under actual working conditions.
[0221] To verify the effectiveness of the method proposed in this invention in real-world scenarios, the implementation scheme is described in conjunction with the accompanying drawings.
[0222] First, configure the detailed parameters for each part. The parameters configured in this embodiment are for reference only, and the parameters can be adjusted according to the actual scenario.
[0223] In the first part, regarding the establishment of the vehicle dynamics model and the environmental model, the detailed vehicle dynamics model parameters used are: m = 1600 kg, I Z =2875mNs 2 L F =1.4m, L R =1.6m, C F =19000N / rad, C R =33000N / rad, τ=0.5;
[0224] Safety car-following model parameters: d safe =10, T A =1.4;
[0225] Dynamic model constraints: a min = -3m / s 2 a max =2m / s 2 θ min = -0.2618 rad, θ max = 0.2618 rad.
[0226] In the second part, regarding the construction of the reinforcement learning training framework, in Section 2, the computational parameters used for building the neural network are: α1 = 0.43, α2 = 0.12, α3 = 2.54, α4 = 0.77, α5 = 0.35, α6 = 0.51, β1 = 2, β2 = 1.
[0227] Multi-objective reward function calculation parameters: ρ1=100, ρ2=500, ρ3=10, ρ4=100, ρ5=1, ρ6=10, ρ7=2, ρ8=1, I=1, η1=1, η2=0.01, ρ3=1.
[0228] Training termination condition parameters: B1=1, B2=0.5, B3=0.
[0229] Training configuration parameters: T s =0.1, θ=1000, γ=0.99, M=1000000, mini-batch=64, T=60s.
[0230] The maximum number of training iterations is 1000, and the average reward is used as the training stopping condition. Meanwhile, the learning rate of the AC network is set to 0.001, the Adam optimizer is used for network optimization, the gradient threshold is set to 1, and the l2norm gradient thresholding method is used.
[0231] In Part Three, regarding agent training and automated policy verification, Section 1 introduces the training parameters x introduced during agent training. lead =20m, v lead =15m / s, x ego =0m,v ego =15m / s, e1=0.2rad, e2=-0.1rad.
[0232] Introduce noise parameters: Δ1 = 4, Δ2 = 4, Δ3 = 5.
[0233] Test parameter: x lead =22m, v lead =15m / s, x ego =0m,v ego =12m / s, e1=-0.4rad, e = =0.2 rad.
[0234] Combining the above parameters and Figure 2 and Figure 3 As shown, the first part of the vehicle path tracking scenario environment (the simulation environment used in this invention) model and the vehicle dynamics model are established. Combining the above parameters and... Figure 4As shown, the reinforcement learning training framework for the second part is constructed. This is done by combining the parameters mentioned above and... Figure 5 As shown, the third part involves training the reinforcement learning agent and automatically validating the policy.
[0235] To verify the effectiveness of the reinforcement learning agent in Part 4, such as... Figure 6 As shown in the figure, the information includes the following vehicle's intelligent agent output acceleration, the speed between the navigating vehicle and the following vehicle, the safe distance error between the navigating vehicle and the following vehicle, the following vehicle's lateral error, the following vehicle's yaw angle error, and the following vehicle's intelligent agent output front wheel steering angle. The figure demonstrates that the experimental results guarantee the path tracking control effect of the following vehicle, and the overall performance is stable.
[0236] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A path tracking control method for intelligent connected vehicles based on deep reinforcement learning, characterized in that: The method includes the following steps: S1. Based on the vehicle dynamics constraint characteristics, establish a vehicle state space model with horizontal and vertical decoupling and build a reinforcement learning agent environment model based on the coordinate system. S11. Establish the state space model of the following vehicle, as shown in the following equation: The input to this state-space model is the vehicle acceleration. and front wheel steering angle The output is the longitudinal velocity at the vehicle's center of gravity. lateral velocity and yaw rate ; Simultaneously, a safe following model is established for longitudinal control of the following vehicle: In the formula, Indicates the desired workshop spacing. Indicates the minimum stationary distance. Represents the desired workshop time interval constant. Indicates the speed of the following vehicle; S12. Establish an environment model: 1) Based on the geodetic coordinate system, a sensing system is built using vehicle-mounted sensors to detect lanes and acquire road and vehicle information; 2) Based on the geodetic coordinate system and the vehicle coordinate system, and in conjunction with sensors, detect the set speed of the navigator vehicle. Navigation vehicle position Following the longitudinal speed of the vehicle Follow vehicle position Relative distance between vehicles and the relative speed between vehicles in front and behind. ; The following vehicle state space model is composed of a longitudinal state space model and a lateral state space model coupled together. The longitudinal state space model takes longitudinal acceleration as input and longitudinal velocity as output. The lateral state space model takes the front wheel steering angle as input and lateral velocity and yaw rate as output. S2. Establish a reinforcement learning training framework for the agent, including: establishing the agent's state-action space, defining the algorithm, building the agent module and path tracking module, and designing and configuring the neural network parameters; Step S2 includes: S21. Establish the state space and action space of the intelligent agent; The state space is shown below: In the formula, Indicates following the longitudinal speed of the vehicle. This indicates the set speed of the navigator vehicle. Indicates the relative distance between vehicles in front and behind. This indicates the lateral deviation of the following vehicle. Indicates the relative yaw angle; The motion space is shown below: In the formula, Indicates the longitudinal acceleration of the vehicle. Indicates the steering angle of the front wheels of the following vehicle; and The amplitude range is determined by the vehicle characteristics; S22. Design the algorithm and build the neural network; 1) Based on the state space and action space determined in step S21, establish the Markov decision process: in, P This represents the state transition probability matrix, i.e., the probability of the agent transitioning between states. s Execution strategy Select Action a and transition to state The probability of; This represents the reward function, i.e., the function of the agent in the state. Next action Expected reward to be obtained; This represents the discount factor, used to calculate the cumulative reward value; 2) The agent is trained using the dual-delay deep deterministic policy gradient algorithm (TD3) based on the Actor-Critic (AC) architecture. The TD3 algorithm uses two Critic networks and one Actor network. Each network includes the current network and the target network for gradient updates of network parameters. 3) Building the Neural Network: The neural network has one input layer and one output layer. The number of neurons is determined by the agent's state space and action space. The number of hidden layers and neurons in the neural network are calculated using the following formula: In the formula, This indicates the number of neurons in the hidden layer. Indicates the number of hidden layers. This indicates the number of input nodes in the neural network. Indicates the number of output nodes. and This indicates the calculation of weight parameters; S23. Building the agent module: The inputs to the agent module include: agent state, reward value, and training termination condition; the output includes the actions performed by the agent. S24. Construct a path tracking module, including a coordinate transformation module and a position update module; the coordinate transformation module is used to convert parameters in the vehicle coordinate system to parameters in the geodetic coordinate system; the position update module is used to output the position of the following vehicle in the geodetic coordinate system at the next moment; S3. Introduce amplitude-limited random noise into the initial position of the navigator, the initial position of the follower, and the initial longitudinal velocity of the follower respectively, perform round-based training on the agent, and save multiple executable policies during the training process. After training is completed, the multiple executable policies saved are loaded one by one into the loop test case for automated verification. For policies that pass the loop test case, the corresponding reward value, experimental data and policy network model are saved. For policies that fail the loop test case, the current policy is exited and the next policy is loaded. Finally, the effective policies that pass the loop test case are saved. S4. Build a simulation environment to verify the effectiveness of the strategy. By establishing a joint simulation environment and introducing sensor and communication systems, the effectiveness of the strategy under different working conditions can be verified. Closed-loop testing was conducted using a simulation environment (Matlab / Simulink + PreScan). Matlab was responsible for providing the agent's state-action space and configuring the neural network structure; Simulink was responsible for building the vehicle agent module and path tracking module; and PreScan was responsible for providing the entire environment model. The system acquires information about the lead vehicle, following vehicle, and road environment through an onboard sensor system, and transmits vehicle status information between the lead vehicle, following vehicle, and the reinforcement learning agent environment model through a V2X communication system to verify the effectiveness of the path tracking strategy under different working conditions.
2. The intelligent connected vehicle path tracking control method according to claim 1, characterized in that: The following vehicle state space model is formed by coupling a longitudinal state space model and a lateral state space model; The vertical state-space model is shown in the following equation: In the formula, This represents the vehicle's longitudinal acceleration tracking time constant; The input to the longitudinal state-space model is longitudinal acceleration. The output is the longitudinal velocity. ; The lateral state-space model is shown in the following equation: In the formula, Indicates vehicle mass. and These represent the distances from the vehicle's center of gravity to the front and rear axles, respectively. and These represent the lateral stiffness of the front and rear wheels, respectively. This represents the yaw moment of inertia of a vehicle. The input to the lateral state-space model is the front wheel steering angle. The output is the lateral velocity. and yaw rate .
3. The intelligent connected vehicle path tracking control method according to claim 1, characterized in that: Step S2 further includes: S25. Connect the various modules, build a reinforcement learning training framework, and connect the built agent module and path tracking module into the simulation environment. Configure and connect them according to requirements to complete the overall module construction. S26. Configure training parameters and start training; The training parameters include: Maximum number of iterations: the maximum number of training iterations that can be performed. Training termination condition: Training stops when the agent's average reward or round reward reaches a certain value. Training cessation condition reached: i.e., the value that the average reward needs to reach; Average reward data length: This refers to the cumulative number of reward rounds used for the average reward.
4. The intelligent connected vehicle path tracking control method according to claim 3, characterized in that: In step S23, the reward function of the agent module is a multi-objective reward function, as shown in the following equation: In the formula, This indicates the action output by the agent in the previous moment. This represents the difference in speed relative to the set trajectory. , This indicates the acceleration output by the vehicle at the previous moment. This indicates the calculation of weight parameters. This indicates the lateral deviation of the following vehicle; 'e' indicates a scientific notation. and: Where isdone represents the training termination condition, and I represents the fixed reward value. Indicates the weight for reward calculation; The training termination condition is: 1) Excessive lateral error: ; 2) The longitudinal speed of the vehicle decreases to a low level or even decelerates to zero: ; 3) A collision occurs between two vehicles: ; in, This represents the calculated parameters in the training termination condition.
5. The intelligent connected vehicle path tracking control method according to claim 1, characterized in that: Step S3 specifically involves: S31. Introduce noise to the initial training state of the navigating and following vehicles during path tracking: In the formula, and These represent the positions of the lead vehicle before and after the noise was introduced, respectively. and These represent the positions of the following vehicle before and after the noise was added, respectively. and These represent the longitudinal velocities of the following vehicle before and after the addition of noise, respectively. Represents a random function. Indicates the limit for generating random numbers; S32. Perform round-based training on the agent; S33. Test the deep reinforcement learning model of the agent, automatically verify the executable policies generated during the deep reinforcement learning training convergence process, and save the effective policies.
