A mecha vehicle automatic driving training and control method based on offline reinforcement learning

Through offline reinforcement learning algorithms and generative models, the automatic driving strategy of the mecha vehicle is optimized, which solves the problem of difficult control in complex environments by traditional methods and achieves more accurate and safe automatic driving.

CN116430860BActive Publication Date: 2024-09-24LANZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310315829.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-09-24
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

In complex ground environments, traditional automatic driving control methods are difficult to effectively control mecha vehicles, which may lead to collisions and motor short circuits. Deep reinforcement learning will suffer significant losses when interacting in real environments.

Method used

Using offline reinforcement learning algorithms, we collect driving data by human-controlled mecha vehicles to build a data set, train and test agents, limit states and actions that do not exist in the data set, reduce Q value estimation errors, and use generative models and variational autoencoders. Add perturbations and optimize the policy network to improve the accuracy of autonomous driving.

Benefits of technology

It achieves the reduction of intelligent agent estimation errors in complex environments, improves the safety and stability of automatic driving of mecha vehicles, and avoids collisions and damage until the mecha vehicles can complete driving tasks autonomously.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116430860B
    Figure CN116430860B
Patent Text Reader

Abstract

The present invention discloses a method for training and controlling automatic driving of a mecha vehicle based on offline reinforcement learning, which mainly includes: (1) manually controlling the mecha vehicle to drive according to a set route, obtaining camera images, position information and status information of the mecha vehicle during the driving process, and constructing a data set; (2) using an offline reinforcement learning algorithm to train on the mecha vehicle driving data set, and adding action disturbances to the driving control instructions during the training process; (3) obtaining camera image information of the mecha vehicle, using a feature network to extract feature information of the mecha vehicle's own position and obstacle position, the Q network and the strategy network respectively output Q values ​​and mecha vehicle driving instructions according to the feature information, setting a safety reward function and an accuracy reward function, and the intelligent agent adjusting the next driving instruction according to the environmental reward feedback; (4) using the trained mecha vehicle control strategy to test and evaluate in a real environment, and iterating the training until the mecha vehicle can perform automatic driving and obstacle avoidance tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of off-line reinforcement learning and automatic driving and control of mecha vehicles, and specifically relates to an automatic driving training and control method for mecha vehicles based on off-line reinforcement learning. Background Art

[0002] Deep reinforcement learning has achieved remarkable results in Go, games, intelligent control and decision-making. Its learning and training process is through trial and error interaction between the intelligent agent and the environment. The purpose is to learn to maximize the cumulative expected reward to complete the corresponding task. It relies on the advantage of neural networks to fit policy functions and value functions, and is therefore widely used in continuous control and decision-making problems.

[0003] Due to its strong mobility and flexibility, armored vehicles have been widely used in the fields of field detection, search and rescue, and material distribution. In addition, due to its high speed and the ability to use infrared and armored bullets for shooting, it has also attracted widespread attention in racing competitions and machine-shooting competitions. When the ground road conditions are unknown, the traditional automatic driving control method can only achieve starting and stopping in a simple environment, but it is difficult to obtain satisfactory results in a complex ground environment full of obstacles. The deep reinforcement learning method is suitable for solving decision-making and control problems in complex environmental scenarios, which is conducive to improving the safety and stability of the automatic driving of armored vehicles. However, due to the interaction in the real environment, the armored vehicle may collide with obstacles in the environment, causing damage or motor short circuit, resulting in large losses. This is also a huge challenge faced by the deep reinforcement learning method in the field of automatic driving of armored vehicles. The present invention adopts an offline reinforcement learning algorithm for training, artificially controls the armored vehicle to collect driving data to produce a data set, uses this data set to train and evaluate the intelligent agent, and continuously iterates the training process and the testing process until the armored vehicle can complete the driving task autonomously. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the present invention provides a mecha vehicle automatic driving training and control method based on offline reinforcement learning. Use an offline reinforcement learning algorithm to train and test on the dataset, limiting the use of states and actions that do not exist in the dataset, thereby reducing the agent's inference error on its Q-value and making its estimate more accurate.

[0005] A method for training and controlling an automatic driving of a mecha vehicle based on offline reinforcement learning comprises the following steps:

[0006] Step 1: Use the mecha car remote control or APP to control the mecha car to drive along the designated route on the ground. When the mecha car encounters an obstacle, manually control it to avoid the obstacle. Collect the data during the driving process of the mecha car and store the environmental status s of the mecha car at each moment during the driving process. e , own status m , Mecha vehicle control driving instruction a and reward information R t , that is, storing the trajectory data t of the mecha vehicle's driving process, and using these stored data to construct a mecha vehicle driving data set

[0007] Step 2: In the mecha car driving dataset The offline reinforcement learning algorithm BCQ is used to train the automatic driving control strategy of the mecha vehicle; first, from the mecha vehicle driving data set Samples are collected in the process, each sample includes the observation s of the mecha at the current moment, the action a made by the mecha, the observation s′ at the next moment, and the reward r of the current action t ; The mecha vehicle's observation s at the current moment includes the environmental state s e and its own status m ; The action a made by the mecha vehicle is the mecha vehicle control driving instruction; the collected samples are generated by using the generation model G ω (s) Regenerate and add perturbation neural network ξ φ (s,a,φ) adds disturbance to the action, the disturbance range is [-φ,φ], and the variational autoencoder VAE (E w1 ,D w2 ), so that the generated state-action pairs are more similar to the state-action pairs of the mecha vehicle during automatic driving.

[0008] Step 3: Combine the state-action pairs of the mecha vehicle during automatic driving with the mecha vehicle driving dataset The similarity of the state-action pair in is modeled as a state conditional probability The strategy is represented as π. During the strategy training process, the mecha vehicle driving data set is minimized. states and actions that do not exist in the agent, thereby reducing the agent’s inference error on its Q-value and making its estimate more accurate.

[0009] Step 4: Train two action-value networks The Q value of the action is evaluated and their minimum value is taken as the estimate of the action value; the agent executes the action a returned by this network, and the environment returns a reward to the agent based on the offset distance from the center of the mecha to the specified route and whether it collides with an obstacle, and then updates the parameters θ of the target network and the parameters φ of the perturbation network algorithm.

[0010] Step 5: Use the trained model to switch to another route to test the automatic driving control strategy of the mecha vehicle. The operator monitors the automatic driving status of the mecha vehicle at all times, collects the data with better completion, and adds it to the mecha vehicle driving data set For the dataset Random distribution.

[0011] Step 6: Iterate the training and testing processes until the mecha vehicle can complete the driving task autonomously during the test process.

[0012] The hardware required for the mecha vehicle automatic driving training and control method in step 1 includes: a camera, a mechanical gimbal, a Mecanum wheel, a motor, an induction armor, and a remote control.

[0013] The environmental state observed during the driving of the mecha vehicle in step 1 includes the image and video information acquired by the camera carried by the mecha vehicle; the state of the mecha vehicle itself includes the driving speed (v), the engine speed of the four Mecanum wheels (ω1, ω2, ω3, ω4), the position of the mecha vehicle (x, y), the rotation angle of the mechanical gimbal (θ), and the distance from the mecha vehicle to the obstacle (d); the control driving instructions a of the mecha vehicle include forward, backward, left, right, and the direction of the mechanical gimbal.

[0014] The reward R returned to the agent in step 4 t It is composed of a safety reward function R1 and an accuracy reward function R2; the safety reward function refers to whether the sensing armor of the mecha vehicle hits an obstacle arranged in the route, and the state of the mecha vehicle itself after hitting the obstacle. The environment feeds back the safety reward R1 to the intelligent body. If no collision occurs, it means that the mecha vehicle can accurately identify obstacles and avoid them, and the more safety rewards it obtains; the accuracy reward function refers to the offset distance between the mecha vehicle and the designated route. The environment feeds back the accuracy reward R2 to the intelligent body. If the offset of the mecha vehicle is smaller, it means that the gap between it and the designated route is smaller, then the mecha vehicle will get more accuracy rewards.

[0015] In the training and testing process in step 6, the environmental observation information and the self-state obtained by the camera of the mecha vehicle are input into the feature network to extract the state features. Then the strategy network outputs the corresponding mecha vehicle control instructions according to the state features. The training and testing process is repeated many times until the mecha vehicle can complete the driving task autonomously. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the overall framework of the present invention;

[0017] Figure 2 It is a schematic diagram of the feature network, Q network and strategy network of the present invention;

[0018] Figure 3 This is a training flow chart for the automatic driving control strategy of the mecha vehicle of the present invention. DETAILED DESCRIPTION

[0019] In order to better understand the technical features and implementation effects of the present invention, the present invention is further described below with reference to the accompanying drawings.

[0020] Figure 1 This is the overall framework diagram of the present invention. First, the remote control or APP is used to control the mecha vehicle to travel on the specified route. The camera carried by the mecha vehicle can obtain image information of the road surface. According to the received road surface information and the location of obstacles, the mecha vehicle driving control instructions are adjusted and the status of the mecha vehicle is stored, including the driving speed, the engine speed of the four Mecanum wheels, the location of the mecha vehicle, the rotation angle of the mechanical gimbal, and the distance from the mecha vehicle to the obstacle. Construct a mecha vehicle driving data set based on the stored data information Use offline reinforcement learning algorithms to train on the data set, put the mecha car in the real environment for testing, the mecha car obtains image information and state information, extracts the feature information of the environment through the feature network, and the Q network and policy network output the control driving instructions of the mecha car based on the feature information. The mecha car drives in the real environment, and the environment feeds back rewards to the mecha car to adjust the next driving instructions of the mecha car. Iterate the training and testing process, and collect performance comparison data and re-add it to the mecha car driving data set until the mecha car can perform automatic driving and obstacle avoidance tasks.

[0021] Figure 2 It is a schematic diagram of the feature network, Q network and strategy network of the present invention. The input observation information includes the image video information, position information and status information of the mecha vehicle captured by the camera on the mechanical pan-tilt platform. The image is input into the feature network to extract the image features. The center distance of the mecha vehicle to the specified route on the ground and the distance to the obstacle are calculated by the image features. At the same time, the input observation information also includes the mecha vehicle's own status information. The image feature information and the mecha vehicle's status information are added together as the output of the feature network. The strategy network outputs a four-dimensional vector, representing the front, rear, left and right mecha vehicle control driving instructions, and controls the Mecanum wheels to move forward.

[0022] like Figure 3 The figure shows the training flow chart of the automatic driving control strategy of the mecha vehicle, which is described as follows. First, the mecha vehicle automatic driving data set is initialized, and then the mecha vehicle is manually controlled to collect driving data, added to the automatic driving data set, and samples are collected from the mecha vehicle driving data set, and the hyper parameters in the training process such as learning rate and discount rate are input.

[0023] Initialize two Q networks, two target networks, a perturbation network, and a generation network, and use the state-action pairs of the mecha vehicle during automatic driving and the mecha vehicle driving data set The similarity of the state-action pair in is modeled as a state conditional probability In order to avoid the problem of overestimation of Q value caused by state-action pairs outside the distribution, it is necessary to minimize the state-action pairs in the automatic driving process and the mecha vehicle driving data set. The distribution deviation between the state actions in , that is, maximizing the state conditional probability By reducing the inference error of the Q value, the estimation is more accurate; using the generative model G ω (s) for the dataset The state-action pairs in are sampled and the perturbation network ξ is increased φ (s,a,φ), the disturbance range added to action a is [-φ,φ], and the variational autoencoder VAE is used to make the generated state-action pairs more similar to the state-action pairs of the mecha vehicle during automatic driving, and then maximize Using the generative model, the strategy at this time is represented by π, and the training goal of the strategy is to maximize the Q value, where action a i Produced by a generative network.

[0024]

[0025] The training target of the perturbation network algorithm is φ;

[0026]

[0027] Drawing on the Clipped Double Q-Learning approach, we use the minimum value of the two Q network estimates

[0028]

[0029] Update Parameters

[0030] θ←argmin θ ∑(yQ θ (s,a)) 2 ;

[0031] θ′ i ←τθ+(1-τ)θ′ i ;

[0032] Reward function R t It consists of a safety reward function R1 and an accuracy reward function R2, where R1 is expressed as follows:

[0033]

[0034] The accuracy reward function R2 is as follows:

[0035]

[0036] Where x is the distance from the vertical center of the mecha to the specified route on the road.

[0037] The automatic driving strategy of the mecha vehicle is trained through an offline reinforcement learning algorithm, and then obstacles are set up on another route for testing. The training and testing processes are iterated until the mecha vehicle can successfully complete the task of automatic driving.

[0038] Although the embodiments of the present invention have been described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present invention.

Claims

1. A mecha vehicle automatic driving training and control method based on offline reinforcement learning, characterized in that: The following steps are involved: Step 1: Use the mecha car remote control or APP to control the mecha car to drive along the designated route on the ground. When the mecha car encounters an obstacle, manually control it to avoid the obstacle. Collect the data during the driving process of the mecha car and store the environmental status s of the mecha car at each moment during the driving process. e , own status m , mecha vehicle control driving instructions and reward information t , that is, storing the trajectory data t of the mecha vehicle's driving process, and using these stored data to construct a mecha vehicle driving data set Step 2: In the mecha car driving dataset The offline reinforcement learning algorithm BCQ is used to train the automatic driving control strategy of the mecha vehicle, and the strategy is represented as π; first, from the mecha vehicle driving data set Samples are collected in the process, each sample includes the observation s of the mecha vehicle at the current moment, the action a made by the mecha vehicle, the observation s′ at the next moment, and the reward information r of the current action t ; The mecha vehicle's observation s at the current moment includes the environmental state s e and its own status m The environmental state includes the image and video information obtained by the camera on the mecha vehicle, and the self-state includes the driving speed, the engine speed of the four Mecanum wheels, the location of the mecha vehicle, the rotation angle of the mechanical gimbal, and the distance from the mecha vehicle to the obstacle; according to the control driving instructions of the mecha vehicle, the action a is performed, including forward, backward, left, right, and the direction of the mechanical gimbal; the collected samples are generated by using the generative model G ω (s) Regenerate and add perturbation neural network ξ φ (s,a,v) adds disturbance to the action, the disturbance range is [-φ,φ], and the variational autoencoder VAE (E w1 ,D w2 ), so that the generated state-action pairs are more similar to the state-action pairs of the mecha vehicle during automatic driving; The automatic driving control strategy π of the mecha vehicle is expressed as Step 3: Combine the state-action pairs of the mecha vehicle during automatic driving with the mecha vehicle driving dataset The similarity of the state-action pair in is modeled as a state conditional probability During the strategy training process, try to reduce the number of mecha vehicle driving data sets The non-existent states and actions in the game can be used to reduce the error in the robot's estimation of its Q value, making its estimation more accurate. Step 4: Train two action-value networks The Q value of the action is evaluated, and their minimum value is taken as the estimate of the action value; the mecha vehicle executes the action a returned by this network, and the environment returns reward information to the mecha vehicle based on the offset distance from the center of the mecha vehicle to the specified route and whether it collides with an obstacle, and then updates the parameters θ of the target network and φ of the perturbation network algorithm; Step 5: Use the trained model to switch to another route to test the automatic driving control strategy of the mecha vehicle. The operator monitors the automatic driving status of the mecha vehicle at all times, collects the data with better completion, and adds it to the mecha vehicle driving data set For the dataset Perform random distribution; Step 6: Iterate the training and testing processes until the mecha vehicle can complete the driving task autonomously during the test process.

2. According to claim 1, a mecha vehicle automatic driving training and control method based on offline reinforcement learning is characterized in that: The hardware required for the mecha vehicle automatic driving training and control method includes: camera, mechanical gimbal, Mecanum wheel, motor, induction armor, and remote control.

3. According to claim 1, a mecha vehicle automatic driving training and control method based on offline reinforcement learning is characterized in that: Reward function R during policy update t It is composed of a safety reward function R1 and an accuracy reward function R2; the safety reward function R1 refers to whether the sensing armor of the mecha vehicle hits an obstacle arranged in the route, and the state of the mecha vehicle itself after hitting the obstacle. The environment feeds back the safety reward information r1 to the mecha vehicle. If no collision occurs, it means that the mecha vehicle can accurately identify obstacles and avoid them, and more safety reward information will be obtained; the accuracy reward function R2 refers to the offset distance between the mecha vehicle and the designated route. The environment feeds back the accuracy reward information r2 to the mecha vehicle. If the offset of the mecha vehicle is smaller, it means that the gap between the mecha vehicle and the designated route is smaller, then the mecha vehicle will obtain more accuracy reward information.

4. According to claim 1, a mecha vehicle automatic driving training and control method based on offline reinforcement learning is characterized in that: The environmental observation information and its own state obtained by the mecha vehicle’s camera are input into the feature network to extract the state features. Then the strategy network outputs the corresponding mecha vehicle control instructions based on the state features. The training and testing process is repeated many times until the mecha vehicle can complete the driving task autonomously.