Unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance control method
Through the method based on deep deterministic policy gradient, the problem of insufficient control accuracy and anti-interference ability of driverless vehicles in lane keeping and dynamic obstacle avoidance control is solved, and higher lane keeping accuracy and dynamic obstacle avoidance effect are achieved. , which improves the driving stability and safety of unmanned autonomous vehicles.
Patent Information
- Application Number
- CN202410668481.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-03
AI Technical Summary
Self-driving cars have problems such as limited control accuracy, difficulty in parameter adjustment, and poor anti-interference ability in lane keeping and dynamic obstacle avoidance control.
An unmanned autonomous car lane keeping and dynamic obstacle avoidance control method based on deep deterministic policy gradient is adopted. By establishing a three-degree-of-freedom dynamic model, designing a convolutional neural network architecture and using dynamic splicing technology and Ornstein-Uhlenbeck noise , design the reward function to constrain the motion state and generate continuous control signals.
It improves the lane keeping and dynamic obstacle avoidance performance of the unmanned autonomous vehicle, ensures that the lateral error between the vehicle body and the lane centerline is within a small range, improves driving stability and safety, and has higher control accuracy and effectiveness.
Smart Images

Figure CN118579077A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of lane keeping and dynamic obstacle avoidance control of unmanned vehicles, and in particular relates to a lane keeping and dynamic obstacle avoidance control method for an unmanned autonomous vehicle. Background Art
[0002] Since German engineer Karl Benz invented the world's first automobile in 1886, the automotive industry has undergone revolutionary changes. In recent years, with the promotion of new energy vehicles and the development of autonomous driving technology, the automotive industry is gradually entering a new era of intelligent and green development. Against this backdrop, autonomous driving, as a cutting-edge technology, has attracted widespread attention from research institutions and commercial companies around the world.
[0003] The research and development of autonomous driving technology is not only of great significance for improving road safety, reducing traffic congestion, and optimizing energy utilization, but also plays a key role in promoting the development of intelligent transportation systems and facilitating the transformation and upgrading of the automotive industry. However, autonomous vehicles still face many challenges in achieving precise control and safe driving. Lane keeping and dynamic obstacle avoidance control technologies are key to achieving precise driving, but traditional PID linear control suffers from limited effectiveness, difficult parameter adjustment, poor anti-interference capabilities, and, in particular, limited control accuracy. Summary of the Invention
[0004] In order to overcome the above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide a lane keeping and dynamic obstacle avoidance control method for an unmanned autonomous vehicle, which is based on deep deterministic policy gradient and can effectively improve the lane keeping and dynamic obstacle avoidance performance of the unmanned vehicle.
[0005] To achieve the above objectives, the present invention adopts a technical solution: a lane keeping and dynamic obstacle avoidance control method for an unmanned autonomous vehicle, comprising the following steps:
[0006] Step 1: Establish a three-degree-of-freedom dynamic model of the unmanned autonomous vehicle;
[0007] Step 2: Design the network architecture of the convolutional neural network. Use the dynamic splicing method to splice a set of environmental state information into the fully connected layer. Use the black frame clipping technique to deal with the black frame phenomenon in the environment initialization to prevent the agent from falling into the local optimum. And balance exploration and exploitation by adding self-attenuating Ornstein-Uhlenbeck noise.
[0008] Step 3: Design the lane keeping and dynamic obstacle avoidance controller of the unmanned autonomous vehicle by constraining the reward function of the unmanned autonomous vehicle's motion state;
[0009] Step 4: Use the 84*84 image information around the unmanned autonomous vehicle as the input of the unmanned autonomous vehicle's lane keeping and dynamic obstacle avoidance controller. The unmanned autonomous vehicle's lane keeping and dynamic obstacle avoidance controller makes decisions and outputs the longitudinal acceleration and front wheel steering angle. A proportional integral differential controller is then used to process the longitudinal acceleration and front wheel steering angle. The longitudinal acceleration and front wheel steering angle are input into the unmanned autonomous vehicle's three-degree-of-freedom dynamic model to realize the motion control of the unmanned autonomous vehicle and update the status information.
[0010] In step 1, the three-degree-of-freedom dynamic model of the unmanned autonomous vehicle is the dynamic state space equation of the unmanned vehicle. The specific establishment process is as follows:
[0011] When the vehicle speed is very high, the velocity vectors of the front and rear wheels in the bicycle model are no longer consistent with the wheel direction. At this time, the kinematic model cannot accurately describe the vehicle's motion state. A dynamic model is needed to model the vehicle. Under the premise of the bicycle model assumption, a simple dynamic model of the vehicle can be constructed under the following conditions:
[0012] 1) Only consider the pure sideways tire characteristics, ignoring the longitudinal and lateral coupling relationship of the tire forces;
[0013] 2) Using a bicycle model to describe the motion of the vehicle without considering the left-right transfer of load;
[0014] 3) Ignore lateral and longitudinal aerodynamics;
[0015] According to the above conditions and Newton's second law, the dynamic equilibrium equation on the x-axis can be obtained as follows:
[0016]
[0017] Among them, m represents the vehicle mass, represents the vehicle body yaw angular velocity, represents the acceleration on the x-axis, Indicates the speed on the y-axis, F xf represents the resultant force of the front wheel on the x-axis, F xr The resultant force of the rear wheel on the x-axis and the equilibrium equation on the y-axis are:
[0018]
[0019] in, represents the acceleration on the y-axis, Indicates the speed on the x-axis, F yf represents the resultant force of the front wheel on the y-axis, F yr The resultant force of the rear wheel on the y-axis and the equilibrium equation around the z-axis are:
[0020]
[0021] Among them, I z is the moment of inertia of the vehicle around the z-axis, represents the angular acceleration of the vehicle body, a represents the length from the center of mass of the vehicle body to the front axle, and b represents the length from the center of mass of the vehicle body to the rear axle. The relationship between the lateral force, longitudinal force, and resultant force on the tire in the x-axis and y-axis directions is shown in formula (4):
[0022]
[0023] Where: δ f is the front wheel deflection angle, δ r is the rear wheel slip angle, F with the subscript c representing lateral, subscript l representing longitudinal, subscript r representing rear wheel, and subscript f representing front wheel. The longitudinal force and lateral force of the tire are expressed as complex functions of the tire slip angle, slip rate, road friction coefficient, and vertical load parameters:
[0024] F l =f l (α,s,μ′,F z ) (5)
[0025] F c =f c (α,s,μ′,F z ) (6)
[0026] Where α is the wheel lateral slip angle, μ′ is the road friction coefficient, s is the slip rate, and F z is the vertical load on the tire, and the tire slip angle α is calculated from the geometric relationship:
[0027]
[0028] Where, v c and v l are the lateral and longitudinal speeds of the tire, respectively, which are converted by trigonometric functions:
[0029] v c =v y cosδ f -v x sinδ f (8)
[0030] v l =v f sinδ+v x cosδ f (9)
[0031] In the formula, the parameter δ fThe front wheel deflection angle is also called the front wheel steering angle. Using the vehicle speed to approximate the tire speed, we can get:
[0032]
[0033]
[0034] Where, is the vehicle body yaw angular velocity, and the tire slip rate s on the ground is calculated by the following formula:
[0035]
[0036] Where r is the wheel radius, ω t is the wheel rotation angular velocity,
[0037] Finally, considering the transformation relationship between the vehicle body coordinate system and the inertial coordinate system, we can get:
[0038]
[0039]
[0040] in, and Represents the components of the vehicle speed along the Y-axis and X-axis in the inertial coordinate system. In the actual control process, the road friction coefficient μ and the slip rate s are known quantities. This model is the basis of the control model in the reinforcement learning controller. In Equations (1) to (14), there are many trigonometric functions, which makes it difficult to simplify the model. Therefore, a small angle assumption is proposed in the calculation of tire force, namely:
[0041]
[0042] Where θ vf Represents the angle between the vehicle velocity vector and the longitudinal axis of the vehicle body. For the two lateral forces acting on the tire, considering the assumption of a small slip angle, the lateral force exerted by the ground on the tire is linearly related to the tire slip angle. The front wheel slip angle is:
[0043] α f =δ f -θ vf (16)
[0044] The rear wheel slip angle is:
[0045] α r =-θ vr (17)
[0046] Therefore, the net force of the front and rear wheels on the y-axis is:
[0047]
[0048] Where C cf and C cr Refers to the cornering stiffness of the front and rear wheels respectively. Combining equations (7) to (11) and according to equation (15), we have:
[0049]
[0050] Through the above simplification, equations (16) and (17) are transformed into the following form for calculating the tire side slip angle:
[0051]
[0052]
[0053] According to equations (20) to (21) and the linear tire model, the lateral forces of the front and rear wheels are obtained:
[0054]
[0055]
[0056] Without considering the longitudinal stiffness of the front and rear wheels, the simplified results above are substituted into equations (1) to (3), and the vehicle three-degree-of-freedom dynamic nonlinear model based on the assumption of a small front wheel deflection angle and a linear tire model is obtained:
[0057]
[0058] Discretize Equation (24):
[0059]
[0060] Among them, the subscript t represents the state at the previous moment, the subscript t+1 represents the state at the next moment, dt is a time step, which represents the vehicle state update step, v x,t+1 represents the velocity on the x-axis at time t+1, v y,t+1 represents the velocity on the y-axis at time t+1, ω t+1 represents the angular velocity at time t+1, v x,t represents the velocity on the x-axis at time t, v y,t represents the velocity on the y-axis at time t, ω t represents the angular velocity at time t, and Equation (25) represents the discretized updated vehicle motion state information. Equation (24) is organized into the form of Equation (25) for the design of the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller in step 3.
[0061] In the process of constructing the unmanned autonomous vehicle dynamics model, this patent simplifies it into a single track model in order to reduce the computational complexity of the control algorithm. Then, in order to ensure the stability of the vehicle during driving, the tire model is introduced into it. Based on the small angle assumption, the nonlinear dynamics equation of the three-degree-of-freedom unmanned vehicle is finally determined. Its state quantity The main control quantity of the unmanned autonomous car is selected as u dyn =[a x ,δ f ], these two variables are chosen based on the directness and efficiency of their impact on vehicle motion; by adjusting the acceleration, the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller can maintain vehicle speed or respond quickly, while the adjustment of the front wheel angle is directly related to the vehicle's lateral motion and steering response.
[0062] Note: The dot above a letter in this patent is the first derivative of that letter, e.g. for The first derivative of . In this patent, the two dots on a letter are the second derivative of the letter, for example, &x& is the first derivative of x.
[0063] The above step 2 is to design the network architecture of the convolutional neural network. The specific steps are:
[0064] The formula for calculating the size of the feature map produced after convolution is:
[0065]
[0066] Among them, w is the input matrix size, k is the convolution kernel size, s′ is the stride, and p is the number of zero-filling layers. Dynamic splicing technology is used to splice a set of environmental state information into the fully connected layer as follows: Figure 3 As shown in the figure, the black frame cutting technology is used to deal with the black frame phenomenon in the environment initialization to prevent the intelligent agent from falling into the local optimum;
[0067] The agent adds Ornstein-Uhlenbeck noise externally when outputting actions. The deep deterministic policy gradient algorithm uses the Ornstein-Uhlenbeck process to generate time-dependent exploration to improve the exploration efficiency of the control task in the environment. The characteristic autocorrelation performance of the Ornstein-Uhlenbeck noise makes the output control action signal more continuous. Its continuous form is:
[0068] dx t =-ε(x t -μ1)dt+σdW t (27)
[0069] Where μ1 is the mean, σ is the variance, and W t represents the Wiener process, x t is the state, ε is the rate of mean reversion, dxt is the change of state, dt is a time step. In order to better analyze and study, Equation (27) is written in discrete form, and the disturbance term W is temporarily not considered. t :
[0070] dx t =x(t+Δt)-x(t)=-θ(x t -μ1)Δt (28)
[0071] Where Δt is the time interval. According to formula (28), when x t When it is larger than the mean μ1, the value x(t+Δt) at the next moment will become smaller; otherwise, it will increase. In other words, when the state deviates, it will be pulled closer to the mean. Integrating Equation (28) yields:
[0072] x t =μ1+(x0-μ)e -θt (29)
[0073] According to formula (29), the larger the ε value is, the faster it approaches the mean, and the approach is exponential. Considering the disturbance term - Wiener process, the increment in each time interval obeys the Gaussian distribution, and the formula is as follows:
[0074] W(t)-W(s)~N(0,σ 2 (ts)) (30)
[0075] Among them, σ 2 is the parameter of the Wiener process, represents the variance, and N is a Gaussian distribution. Therefore, the action strategy becomes:
[0076] a=μ(s;θ μ )+N (31)
[0077] Where a is the output action, N is the Ornstein-Uhlenbeck noise. In the research on lane keeping and dynamic obstacle avoidance control of unmanned autonomous vehicles, the lane keeping and dynamic obstacle avoidance controller of the unmanned autonomous vehicle needs to increase the exploration intensity in the early stage of training. As the training process progresses, the exploration rate needs to be gradually reduced to maintain the stability of the output action. Because an attenuation coefficient η∈[0,1) is added to the noise of the random Ornstein-Uhlenbeck noise, the final action output strategy is:
[0078] a=μ(s;θ μ )+ηN (32)
[0079] Where θ μ are the action network parameters.
[0080] The specific method of the reward function for constraining the motion state of the unmanned autonomous vehicle in step 3 is:
[0081]
[0082] Among them, f, b, c, d, e are the set reward item coefficients, represents the lateral deviation between the center of mass of the vehicle and the centerline of the lane, ||action||2 represents the 2-norm of the action, crash represents the collision term, and offroad represents the autonomous vehicle driving out of the lane. If the autonomous vehicle collides, it will receive a large negative reward and the current round of simulation will end. The further the autonomous vehicle deviates from the centerline of the lane, the greater the penalty it receives. If the autonomous vehicle's action changes significantly, it indicates poor vehicle stability and will receive a small negative reward. Finally, the reward function is normalized as shown in Equation (34):
[0083] r=clip(Reward,[0,1]) (34)
[0084] Design a lane keeping and dynamic obstacle avoidance controller for an unmanned autonomous vehicle based on deep deterministic policy gradient. First, initialize the target network parameters:
[0085]
[0086] Among them, θ Q′ and θ Q are the target judgment network and the judgment network parameters, θ μ′ and θ μ are the parameters of the action network and the action network respectively, and then update the target Q value:
[0087] y i =r i +γQ′(s i+1 ,μ′(s i+1 θ μ′ );θ Q′ ) (36)
[0088] Among them, r i is the reward value obtained in the current state, γ is the discount rate ranging from [0,1], s i+1 is the next state, μ′(s i+1 θ μ′ ) is to the next state s i+1 Action to be taken, y i For the target Q value of the output, update the judgment network by minimizing the loss function L:
[0089]
[0090] Where s i is the current state, a i For state s i The action taken, subscript i represents the current moment, Q(s,a;θ Q ) is the estimated value given by the evaluation network, D represents the collected data, represents the gradient information,
[0091] Then use the policy gradient to update the action network:
[0092]
[0093] Where, represents the objective function, a=μ(s i ) means that in state s, the strategy μ is adopted i The action a will be taken,
[0094] Finally, the target network is updated through equations (39) and (40):
[0095] θ Q′ ←τθ Q +(1-τ)θ Q′ τ∈[0,1] (39)
[0096] θ μ′ ←τθ μ +(1-τ)θ μ′ τ∈[0,1] (40) where τ is the scale parameter of the soft update, which ranges from 0 to 1, and θ Q is the evaluation network parameter, θ Q′ is the target judgment network parameter, θ μ is the action network parameter, θ μ′ are the target action network parameters.
[0097] The beneficial effects of the present invention are:
[0098] In the process of constructing the unmanned autonomous vehicle dynamics model, the present invention simplifies it into a single-track model in order to reduce the computational complexity of the control algorithm. Then, in order to ensure the stability of the vehicle during driving, the tire model is introduced into it. Based on the small angle assumption, the nonlinear dynamics equation of the three-degree-of-freedom unmanned vehicle is finally determined. Its state quantity The main control quantity of the unmanned autonomous car is selected as u dyn =[a x ,δ f], these two variables are chosen based on the directness and efficiency of their impact on vehicle motion; by adjusting the acceleration, the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller can maintain vehicle speed or respond quickly, while the adjustment of the front wheel angle is directly related to the vehicle's lateral motion and steering response.
[0099] The present invention addresses the issues of lane keeping and dynamic obstacle avoidance control for unmanned autonomous vehicles and adopts a controller for lane keeping and dynamic obstacle avoidance control for unmanned autonomous vehicles based on a deep deterministic gradient strategy. This controller can effectively constrain the motion state of the unmanned autonomous vehicle and generate continuous control signals. Compared with PID algorithms, sliding mode algorithms, and model predictive control algorithms, this method has higher control accuracy and effectiveness, and can ensure that the lateral error between the vehicle body and the lane centerline always remains within a small range. This control method can effectively improve the driving stability and safety of unmanned autonomous vehicles and is of great significance for accurate lane keeping and dynamic obstacle avoidance control. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] Figure 1 This is a workflow diagram of the lane keeping and dynamic obstacle avoidance control method for an unmanned autonomous vehicle of the present invention.
[0101] Figure 2 This is the three-degree-of-freedom dynamic model of the unmanned autonomous vehicle in the present invention.
[0102] Figure 3 This is a structural diagram of the convolutional neural network combined with dynamic splicing technology used in the present invention.
[0103] Figure 4 Schematic diagram of the black frame cutting technology used in the present invention.
[0104] Figure 5 Block diagram of the lane keeping and dynamic obstacle avoidance controller for the unmanned autonomous vehicle based on the deep deterministic gradient strategy designed for this invention.
[0105] Figure 6 PID control flow chart designed for the present invention.
[0106] Figure 7 Schematic diagrams of three different working conditions in the present invention.
[0107] Figure 8 This is a diagram describing the vehicle status information in the present invention.
[0108] Figure 9 It is a structural diagram of the experimental system in the present invention.
[0109] Figure 10 This is an exploded diagram of the hardware system of the ROS unmanned vehicle used in this invention.
[0110] Figure 11 The figure shows the average reward, average number of steps, fps, and critic network loss curve obtained during the training process of different controllers under runway conditions.
[0111] Figure 12 These are the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by different controllers under runway conditions and the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by a deep deterministic policy gradient controller under simulation and experimental conditions respectively.
[0112] Figure 13 This is a curve diagram of the state changes of different controllers controlling the unmanned autonomous vehicle in simulation under runway conditions in the present invention.
[0113] Figure 14 This is a comparison chart of various state quantities of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller in the simulation and actual environment under runway conditions of the present invention.
[0114] Figure 15 The figure shows the average reward, average number of steps, fps, and critic network loss curve obtained during the training process of different controllers under the bone working condition of the present invention.
[0115] Figure 16 These are the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by different controllers under bone working conditions and the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller under simulation and experimental conditions respectively.
[0116] Figure 17 This is a curve diagram of the state changes of different controllers controlling the unmanned autonomous vehicle in simulation under the bone working condition of the present invention.
[0117] Figure 18 This is a comparison of the various state quantities of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller in the simulation and actual environment under the bone working condition of the present invention.
[0118] Figure 19 The figure shows the average reward, average number of steps, fps, and critic network loss curve obtained during the training process of different controllers under irregular lane conditions in the present invention.
[0119] Figure 20 These are the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by different controllers under irregular lane conditions in the present invention, and the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller under simulation and experimental conditions respectively.
[0120] Figure 21 This is a curve diagram of the state changes of different controllers controlling the unmanned autonomous vehicle in the simulation under irregular lane conditions of the present invention.
[0121] Figure 22 This is a comparison chart of various state quantities of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller in the simulation and actual environment under irregular lane conditions of the present invention.
[0122] Figure 23 Flowchart of the method of the present invention. DETAILED DESCRIPTION
[0123] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. Lane keeping and dynamic obstacle avoidance are key technical challenges in the development of autonomous vehicles. Stable lane keeping and effective dynamic obstacle avoidance control have become recognized in the automotive industry and academia as core technologies for achieving autonomous vehicle motion control.
[0124] The present invention provides a lane keeping and dynamic obstacle avoidance control method for an unmanned autonomous vehicle based on a deep deterministic gradient strategy, which is specifically implemented according to the following steps:
[0125] Step 1: Construct a three-degree-of-freedom dynamic model of the unmanned autonomous vehicle, such as Figure 2 As shown, according to the dynamic relationship of the unmanned vehicle and combined with Newton's second law, the dynamic equilibrium equation on the x-axis can be obtained as follows:
[0126]
[0127] Among them, m represents the vehicle mass, represents the vehicle body yaw angular velocity, represents the acceleration on the x-axis, Indicates the speed on the y-axis, F xf represents the resultant force of the front wheel on the x-axis, F xr The resultant force of the rear wheel on the x-axis and the equilibrium equation on the y-axis are:
[0128]
[0129] in, represents the acceleration on the y-axis, Indicates the speed on the x-axis, F yf represents the resultant force of the front wheel on the y-axis, F yr The resultant force of the rear wheel on the y-axis and the equilibrium equation around the z-axis are:
[0130]
[0131] Among them, I z is the moment of inertia of the vehicle around the z-axis, represents the angular acceleration of the vehicle body, a represents the length from the center of mass of the vehicle body to the front axle, and b represents the length from the center of mass of the vehicle body to the rear axle. The relationship between the lateral force, longitudinal force, and resultant force on the tire in the x-axis and y-axis directions is shown in formula (4):
[0132]
[0133] Where: δ f is the front wheel deflection angle, δ r is the rear wheel slip angle, F with the subscript c representing lateral, subscript l representing longitudinal, subscript r representing rear wheel, and subscript f representing front wheel. The longitudinal force and lateral force of the tire are expressed as complex functions of the tire slip angle, slip rate, road friction coefficient, and vertical load parameters:
[0134] F l =f l (α,s,μ′,F z ) (5)
[0135] F c =f c (α,s,μ′,F z ) (6)
[0136] Where α is the wheel lateral slip angle, μ′ is the road friction coefficient, s is the slip rate, and F z is the vertical load on the tire, and the tire slip angle α is calculated from the geometric relationship:
[0137]
[0138] Where, v c and v l are the lateral and longitudinal speeds of the tire, respectively, which are converted by trigonometric functions:
[0139] v c =v y cosδ f -v x sinδ f (8)
[0140] v l =v f sinδ+v x cosδ f (9)
[0141] In the formula, the parameter δ f The front wheel deflection angle is also called the front wheel steering angle. Using the vehicle speed to approximate the tire speed, we can get:
[0142]
[0143]
[0144] Where, is the vehicle body yaw angular velocity, and the tire slip rate s on the ground is calculated by the following formula:
[0145]
[0146] Where r is the wheel radius, ω t is the wheel rotation angular velocity,
[0147] Finally, considering the transformation relationship between the vehicle body coordinate system and the inertial coordinate system, we can get:
[0148]
[0149]
[0150] in, and Represents the components of the vehicle speed along the Y-axis and X-axis in the inertial coordinate system. In the actual control process, the road friction coefficient μ and the slip rate s are known quantities. This model is the basis of the control model in the reinforcement learning controller. In Equations (1) to (14), there are many trigonometric functions, which makes it difficult to simplify the model. Therefore, a small angle assumption is proposed in the calculation of tire force, namely:
[0151]
[0152] Where θ vf Represents the angle between the vehicle velocity vector and the longitudinal axis of the vehicle body. For the two lateral forces acting on the tire, considering the assumption of a small slip angle, the lateral force exerted by the ground on the tire is linearly related to the tire slip angle. The front wheel slip angle is:
[0153] α f =δ f -θ vf (16)
[0154] The rear wheel slip angle is:
[0155] α r =-θ vr (17)
[0156] Therefore, the net force of the front and rear wheels on the y-axis is:
[0157]
[0158] Where C cf and C cr Refers to the cornering stiffness of the front and rear wheels respectively. Combining equations (7) to (11) and according to equation (15), we have:
[0159]
[0160] Through the above simplification, equations (16) and (17) are transformed into the following form for calculating the tire side slip angle:
[0161]
[0162]
[0163] According to equations (20) to (21) and the linear tire model, the lateral forces of the front and rear wheels are obtained:
[0164]
[0165]
[0166] Without considering the longitudinal stiffness of the front and rear wheels, the simplified results above are substituted into equations (1) to (3), and the vehicle three-degree-of-freedom dynamic nonlinear model based on the assumption of a small front wheel deflection angle and a linear tire model is obtained:
[0167]
[0168] Discretize Equation (24):
[0169]
[0170] Among them, the subscript t represents the state at the previous moment, the subscript t+1 represents the state at the next moment, dt is a time step, which represents the vehicle state update step, v x,t+1 represents the velocity on the x-axis at time t+1, v y,t+1 represents the velocity on the y-axis at time t+1, ω t+1 represents the angular velocity at time t+1, v x,t represents the velocity on the x-axis at time t, v y,t represents the velocity on the y-axis at time t, ω t represents the angular velocity at time t, and Equation (25) represents the discretized updated vehicle motion state information. Equation (24) is organized into the form of Equation (25) for the design of the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller in step 3.
[0171] In the process of constructing the unmanned autonomous vehicle dynamics model, this patent simplifies it into a single track model in order to reduce the computational complexity of the control algorithm. Then, in order to ensure the stability of the vehicle during driving, the tire model is introduced into it. Based on the small angle assumption, the nonlinear dynamics equation of the three-degree-of-freedom unmanned vehicle is finally determined. Its state quantity The main control quantity of the unmanned autonomous car is selected as u dyn =[a x ,δ f ], these two variables are chosen based on the directness and efficiency of their impact on vehicle motion; by adjusting the acceleration, the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller can maintain vehicle speed or respond quickly, while the adjustment of the front wheel angle is directly related to the vehicle's lateral motion and steering response.
[0172] Note: The dot above a letter in this patent is the first derivative of that letter, e.g. for The first derivative of . In this patent, the two dots on the letters are the second derivatives of the letters, for example is the first derivative of x.
[0173] The above step 2 is to design the network architecture of the convolutional neural network. The specific steps are:
[0174] The formula for calculating the size of the feature map produced after convolution is:
[0175]
[0176] Among them, w is the input matrix size, k is the convolution kernel size, s′ is the stride, and p is the number of zero-filling layers. Dynamic splicing technology is used to splice a set of environmental state information into the fully connected layer as follows: Figure 3 As shown in , the black frame cutting technology is used to deal with the black frame phenomenon in the environment initialization to prevent the intelligent agent from falling into the local optimum, as shown in Figure 4 As shown;
[0177] The agent adds Ornstein-Uhlenbeck noise externally when outputting actions. The deep deterministic policy gradient algorithm uses the Ornstein-Uhlenbeck process to generate time-dependent exploration to improve the exploration efficiency of the control task in the environment. The characteristic autocorrelation performance of the Ornstein-Uhlenbeck noise makes the output control action signal more continuous. Its continuous form is:
[0178] dx t =-ε(x t -μ1)dt+σdW t (27)
[0179] Where μ1 is the mean, σ is the variance, and W t represents the Wiener process, x t is the state, ε is the rate of mean reversion, dx t is the change of state, dt is a time step. In order to better analyze and study, Equation (27) is written in discrete form, and the disturbance term W is temporarily not considered. t :
[0180] dx t =x(t+Δt)-x(t)=-θ(x t -μ1)Δt (28)
[0181] Where Δt is the time interval. According to formula (28), when x t When it is larger than the mean μ1, the value x(t+Δt) at the next moment will become smaller; otherwise, it will increase. In other words, when the state deviates, it will be pulled closer to the mean. Integrating Equation (28) yields:
[0182] x t =μ1+(x0-μ)e -θt (29)
[0183] According to formula (29), the larger the ε value is, the faster it approaches the mean, and the approach is exponential. Considering the disturbance term - Wiener process, the increment in each time interval obeys the Gaussian distribution, and the formula is as follows:
[0184] W(t)-W(s)~N(0,σ 2 (ts)) (30)
[0185] Among them, σ 2 is the parameter of the Wiener process, represents the variance, and N is a Gaussian distribution. Therefore, the action strategy becomes:
[0186] a=μ(s;θ μ )+N (31)
[0187] Where a is the output action, N is the Ornstein-Uhlenbeck noise. In the research on lane keeping and dynamic obstacle avoidance control of unmanned autonomous vehicles, the lane keeping and dynamic obstacle avoidance controller of the unmanned autonomous vehicle needs to increase the exploration intensity in the early stage of training. As the training process progresses, the exploration rate needs to be gradually reduced to maintain the stability of the output action. Because an attenuation coefficient η∈[0,1) is added to the noise of the random Ornstein-Uhlenbeck noise, the final action output strategy is:
[0188] a=μ(s;θ μ )+ηN (32)
[0189] Where θ μ are the action network parameters.
[0190] The specific method of the reward function for constraining the motion state of the unmanned autonomous vehicle in step 3 is:
[0191]
[0192] Among them, f, b, c, d, e are the set reward item coefficients, represents the lateral deviation between the center of mass of the vehicle and the centerline of the lane, ||action||2 represents the 2-norm of the action, crash represents the collision term, and offroad represents the autonomous vehicle driving out of the lane. If the autonomous vehicle collides, it will receive a large negative reward and the current round of simulation will end. The further the autonomous vehicle deviates from the centerline of the lane, the greater the penalty it receives. If the autonomous vehicle's action changes significantly, it indicates poor vehicle stability and will receive a small negative reward. Finally, the reward function is normalized as shown in Equation (34):
[0193] r=clip(Reward,[0,1]) (34)
[0194] Design a lane keeping and dynamic obstacle avoidance controller for an unmanned autonomous vehicle based on deep deterministic policy gradient. First, initialize the target network parameters:
[0195]
[0196] Among them, θ Q′ and θ Q are the target judgment network and the judgment network parameters, θ μ′ and θ μ are the parameters of the action network and the action network respectively, and then update the target Q value:
[0197] y i =r i +γQ′(s i+1 ,μ′(s i+1 θ μ′ );θ Q′ ) (36)
[0198] Among them, r i is the reward value obtained in the current state, γ is the discount rate ranging from [0,1], s i+1 is the next state, μ′(s i+1 θ μ′ ) is to the next state s i+1 Action to be taken, y i For the target Q value of the output, update the judgment network by minimizing the loss function L:
[0199]
[0200] Where s i is the current state, a i For state s i The action taken, subscript i represents the current moment, Q(s,a;θ Q ) is the estimated value given by the evaluation network, D represents the collected data, ▽ represents the gradient information,
[0201] Then use the policy gradient to update the action network:
[0202]
[0203] Where, represents the objective function, a=μ(s i ) means that in state s, the strategy μ is adopted i The action a will be taken,
[0204] Finally, the target network is updated through equations (39) and (40):
[0205] θ Q′ ←τθ Q +(1-τ)θ Q′ τ∈[0,1] (39)
[0206] θ μ′ ←τθ μ +(1-τ)θ μ′ τ∈[0,1] (40) where τ is the scaling parameter of the soft update, which ranges from 0 to 1. θ Q is the evaluation network parameter, θ Q′ is the target judgment network parameter, θ μ is the action network parameter, θ μ′ are the target action network parameters.
[0207] In order to verify the effectiveness of the algorithm constructed by the present invention, the lane keeping and dynamic obstacle avoidance of three different lane types, namely runway, skeleton and irregular lane conditions, were tried in the code written in Python to study and analyze the performance of the controller. Figure 8 As shown, we build a model of an unmanned autonomous vehicle and a lane keeping and dynamic obstacle avoidance controller for the unmanned autonomous vehicle based on a deep deterministic strategy, as shown in Figure 6 and Figure 7 As shown in Figure 2, an unmanned vehicle experimental platform based on the Robot Operating System (ROS) is built. Figure 10 As shown in the figure, under the same network segment of the Wi-Fi connection, the longitudinal acceleration and front wheel steering angle output by the deep deterministic policy gradient controller are transmitted to the ROS unmanned vehicle in the form of a message through a topic to update the vehicle's motion state. Finally, the effectiveness of the proposed controller is verified in a real environment. Figure 9 This is a schematic diagram of the present invention implementing lane keeping and dynamic obstacle avoidance for an unmanned autonomous vehicle. Figure 11 This is an exploded diagram of the ROS unmanned vehicle hardware system structure used in the experiment.
[0208] The longitudinal acceleration and steering angle of the unmanned autonomous vehicle are selected as control inputs;
[0209] In order to verify the effectiveness of the constructed controller, the designed controller was verified in the Racetrack-env simulation environment and the actual experimental platform. The results show that the control method performs well under different lane conditions, improves the driving stability of the unmanned autonomous vehicle, and ensures the timeliness of autonomous obstacle avoidance. Figure 12 The average reward, average step size, fps and critic network loss curves of different controllers obtained during the training process of the unmanned autonomous car under runway conditions are shown in Figure 2. Figure 12 It can be seen that the deep deterministic policy gradient controller designed in this patent has the highest performance; Figure 13 The displacement trajectory diagrams of the unmanned autonomous vehicle controlled by different controllers under runway conditions and the displacement trajectory diagrams of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller under simulation and experimental conditions respectively. It can be seen that the unmanned autonomous vehicle under the deep deterministic policy gradient controller designed in this patent is more stable and has better autonomous obstacle avoidance effect. The curve fitting degree of the simulation and experiment is high, indicating that the designed controller also has high stability and effectiveness in the actual environment; Figure 14 The graphs of the state changes of the unmanned autonomous vehicle controlled by different controllers in the simulation are as follows: Figure 14 It can be seen that the designed deep deterministic policy gradient controller has better control effect and is more stable than other controllers. Figure 15 The comparison of the state variables of the unmanned autonomous vehicle controlled by the deep deterministic policy gradient controller in the simulation and actual environment shows that the experimental curve is highly consistent with the simulation curve, indicating that the designed controller has strong anti-interference ability and still has sufficient control stability under actual conditions. Figure 16-Figure 22 It can be clearly seen that the simulation and experimental results of the controller proposed in this invention under the conditions of skeleton and irregular lanes indirectly verify that the designed unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller based on deep deterministic policy gradient is more stable than other controllers, and has better dynamic obstacle avoidance effect. Overall, the results show that under the simulation conditions of three different working conditions, the proposed deep deterministic policy gradient lane keeping and dynamic obstacle avoidance controller has high effectiveness and control stability, and the fluctuations of the various state quantity curves of the unmanned autonomous vehicle are small, indicating that the control algorithm proposed in this invention has sufficient stability and effectiveness.
[0210] Simulation and experimental results show that the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller based on deep deterministic policy gradient proposed in the present invention can make the unmanned autonomous vehicle drive on the lane more stably, and has smaller state fluctuation errors and better dynamic obstacle avoidance capabilities during driving, thereby verifying the effectiveness and stability of the controller of the present invention, improving the driving stability and safety of the unmanned autonomous vehicle, and having great significance for lane keeping and dynamic obstacle avoidance control applied to unmanned vehicles.
Claims
1. A method for lane keeping and dynamic obstacle avoidance control of an unmanned autonomous vehicle, characterized in that: The following steps are involved: Step 1, establish a three-degree-of-freedom dynamic model of the unmanned autonomous vehicle; Step 2: Design the network architecture of the convolutional neural network, use the dynamic splicing method to splice a set of environmental state information into the fully connected layer, use the black frame cutting technology to deal with the black frame phenomenon in the environment initialization to prevent the agent from falling into the local optimum, and balance exploration and exploitation by adding self-attenuating Ornstein-Uhlenbeck noise; Step 3, designing the lane keeping and dynamic obstacle avoidance controller of the unmanned autonomous vehicle by constraining the motion state of the unmanned autonomous vehicle; Step 4, using the 84*84 size image information around the unmanned autonomous vehicle as the input of the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller, the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller makes decisions and outputs the longitudinal acceleration and front wheel steering angle, and then uses a proportional integral differential controller to process the longitudinal acceleration and front wheel steering angle, and inputs the longitudinal acceleration and front wheel steering angle into the three-degree-of-freedom dynamics model of the unmanned autonomous vehicle to realize the motion control of the unmanned autonomous vehicle and update the status information.
2. The method for lane keeping and dynamic obstacle avoidance control of an unmanned autonomous vehicle according to claim 1, characterized in that: In the step 1, the three-degree-of-freedom dynamic model of the unmanned autonomous vehicle is the dynamic state space equation of the unmanned vehicle, and the specific establishment process is as follows: When the vehicle speed is very high, the velocity vectors of the front and rear wheels in the bicycle model are no longer consistent with the wheel direction. At this time, the kinematic model cannot accurately describe the vehicle's motion state. It is necessary to use a dynamic model to model the vehicle. Under the premise of the bicycle model assumption, the dynamic model of the vehicle can be simply built under the following conditions: 1) Only the pure side slip tire characteristics are considered, ignoring the longitudinal and lateral coupling relationship of the tire forces; 2) Using a bicycle model to describe the motion of the vehicle without considering the left-right transfer of the load; 3) Ignore lateral and longitudinal aerodynamics; According to the above conditions combined with Newton's second law, the dynamic equilibrium equation on the x-axis is: Where m represents the vehicle mass, represents the vehicle body yaw angular velocity, represents the acceleration on the x-axis, represents the speed on the y-axis, F xf represents the resultant force of the front wheel on the x-axis, F xr Represents the resultant force of the rear wheel on the x-axis, and the equilibrium equation on the y-axis is: in, represents the acceleration on the y-axis, represents the speed on the x-axis, F yf represents the resultant force of the front wheel on the y-axis, F yr Represents the resultant force of the rear wheel on the y-axis, and the equilibrium equation around the z-axis is: Among them, I z is the moment of inertia of the vehicle around the z-axis, represents the angular acceleration of the vehicle body, a represents the length from the center of mass of the vehicle body to the front axle, b represents the length from the center of mass of the vehicle body to the rear axle, and the relationship between the lateral force, longitudinal force and resultant force on the tire in the x-axis and y-axis directions is shown in formula (4): Where: f is the front wheel deflection angle, δ r is the rear wheel slip angle, F with the subscript c representing lateral, subscript l representing longitudinal, subscript r representing rear wheel, and subscript f representing front wheel. The longitudinal force and lateral force of the tire are expressed as complex functions of the tire slip angle, slip rate, road friction coefficient, and vertical load parameters: F l =f l (α,s,μ′,F z ) (5) F c =f c (α,s,μ′,F z ) (6) Where α is the wheel lateral slip angle, μ′ is the road friction coefficient, s is the slip rate, and F z is the vertical load on the tire, and the tire slip angle α is calculated from the geometric relationship: In the formula, v c and v l are the lateral and longitudinal speeds of the tire, respectively, which are converted by trigonometric functions: v c =v y cosδ f -v x sinδ f (8) v l =v f sinδ+v x cosδ f (9) In the formula, the parameter δ f The front wheel deflection angle is also called the front wheel steering angle. Using the vehicle speed to approximate the tire speed, we can get: In the formula, is the yaw rate of the vehicle body, and the slip rate s of the tire on the ground is calculated by the following formula: Where r is the wheel radius, ω t is the wheel rotation angular velocity, Finally, considering the conversion relationship between the vehicle body coordinate system and the inertial coordinate system, we can get: in, and Represents the components of the vehicle speed along the Y-axis and the X-axis in the inertial coordinate system. In the actual control process, the road friction coefficient μ and the slip rate s are known quantities. This model is the basis of the control model in the reinforcement learning controller. In equations (1) to (14), there are many trigonometric functions, and it is difficult to simplify the model. Therefore, a small angle assumption is proposed in the calculation process of the tire force, that is: In the formula, θ vf Represents the angle between the vehicle velocity vector and the longitudinal axis of the vehicle body. For the two lateral forces on the tire, considering the assumption of a small slip angle, the lateral force applied to the tire by the ground is linearly related to the tire slip angle, so the front wheel slip angle is: a f =d f -θ vf (16) The rear wheel slip angle is: a r =-θ vr (17) Therefore, the resultant force of the front and rear wheels on the y-axis is: In the formula, C cf and C cr They refer to the cornering stiffness of the front and rear wheels respectively. Combining equations (7) to (11) and according to equation (15), we have: Through the above simplification, equations (16) and (17) are transformed into the following form for calculating the tire side slip angle: According to equations (20) to (21) and the linear tire model, the lateral forces of the front and rear wheels are obtained: Without considering the longitudinal stiffness of the front wheel and the rear wheel, the simplified results above are substituted into equations (1) to (3), and the three-degree-of-freedom nonlinear dynamic model of the vehicle based on the assumption of a small front wheel deflection angle and a linear tire model is obtained: Discretize equation (24): Among them, the subscript t represents the state at the previous moment, the subscript t+1 represents the state at the next moment, dt is a time step, representing the vehicle state update step, v x,t+1 represents the velocity on the x-axis at time t+1, v y,t+1 represents the speed on the y-axis at time t+1, ω t+1 represents the angular velocity at time t+1, v x,t represents the velocity on the x-axis at time t, v y,t represents the speed on the y-axis at time t, ω t represents the angular velocity at time t, and equation (25) represents the discretized updated vehicle motion state information. Equation (24) is organized into the form of equation (25) for the design of the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller in step 3.
3. The method for lane keeping and dynamic obstacle avoidance control of an unmanned autonomous vehicle according to claim 1, characterized in that: The step 2 is to design the network architecture of the convolutional neural network. The specific steps are: The formula for calculating the size of the feature map produced after convolution is: Among them, w is the input matrix size, k is the convolution kernel size, s′ is the stride, and p is the number of zero-padding layers. A set of environmental state information is spliced into the fully connected layer using dynamic splicing technology, and the black frame cutting technology is used to handle the black frame phenomenon in the environment initialization to prevent the intelligent agent from falling into the local optimum. The agent adds Ornstein-Uhlenbeck noise from the outside when outputting actions. The deep deterministic policy gradient algorithm uses the Ornstein-Uhlenbeck process to generate time-related exploration to improve the exploration efficiency of control tasks in the environment. The characteristic autocorrelation performance of the Ornstein-Uhlenbeck noise makes the output control action signal more continuous. Its continuous form is: dx t =-ε(x t -μ1)dt+σdW t (27) In the formula, μ1 is the mean, σ represents the variance, and W t represents the Wiener process, x t is the state, ε is the rate of mean reversion, dx t is the change of state, dt is a time step. For better analysis and research, formula (27) is written in discrete form, and the disturbance term W is temporarily ignored. t : dx t =x(t+Δt)-x(t)=-θ(x t -μ1)Δt (28) Where Δt is the time interval. According to formula (28), when x t When it is larger than the mean μ1, the value x(t+Δt) at the next time point will become smaller; otherwise, it will increase. In other words, when the state deviates, it will be pulled closer to the mean. Integrating equation (28) yields: x t =μ1+(x0-μ)e -θt (29) According to formula (29), the larger the ε value is, the faster it approaches the mean, and it approaches exponentially. Considering the disturbance term - the Wiener process, the increment in each time interval obeys the Gaussian distribution, and the formula is as follows: W(t)-W(s)~N(0,σ 2 (ts)) (30)where σ 2 is the parameter of the Wiener process, represents the variance, and N is a Gaussian distribution. Therefore, the action strategy becomes: a=μ(s;θ μ )+N (31) Where a is the output action, N is the Ornstein-Uhlenbeck noise. In the research on lane keeping and dynamic obstacle avoidance control of unmanned autonomous vehicles, the unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller needs to increase the exploration intensity in the early stage of training. As the training process progresses, the exploration rate needs to be gradually reduced, that is, to maintain the stability of the output action, because an attenuation coefficient η∈[0,1) is added to the noise of the random Ornstein-Uhlenbeck noise, and the final action output strategy is: a=μ(s;θ μ )+ηN (32) In the formula, θ μ are the action network parameters.
4. The method for controlling lane keeping and dynamic obstacle avoidance of an unmanned autonomous vehicle according to claim 1, characterized in that: The specific method of the reward function for constraining the motion state of the unmanned autonomous vehicle in step 3 is: Among them, f, b, c, d, e are the set reward item coefficients, represents the lateral deviation between the center of mass of the vehicle body and the center line of the lane, ||action||2 represents the 2-norm of the action, crash represents the collision term, and offroad represents the unmanned autonomous vehicle driving out of the lane. If the unmanned autonomous vehicle collides, it will receive a large negative reward and end the simulation of the current round. If the unmanned autonomous vehicle deviates further from the center line of the lane, the penalty it receives will increase accordingly; if the unmanned autonomous vehicle's action changes greatly, it means that the vehicle's driving stability is poor, and it will receive a small negative reward; finally, the reward function is normalized, as shown in formula (34): r = clip(Reward, [0, 1]) (34) Design an unmanned autonomous vehicle lane keeping and dynamic obstacle avoidance controller based on deep deterministic policy gradient. First, initialize the target network parameters: Among them, θ Q′ and θ Q are the target judgment network and the judgment network parameters respectively, θ μ′ and θ μ are the parameters of the action network and the action network respectively, and then update the target Q value: y i =r i +γQ′(s i+1 ,μ′(s i+1 ;θ μ′ );i Q′ ) (36) Among them, r i is the reward value obtained in the current state, γ is the discount rate ranging from [0,1], s i+1 is the next state, μ′(s i+1 θ μ′ ) is to the next state s i+1 Action to be taken, y i For the target Q value of the output, update the judgment network by minimizing the loss function L: In the formula, s i is the current state, a i For state s i The action taken, the subscript i represents the current moment, Q(s,a; θ Q ) is the estimated value given by the evaluation network, D represents the collected data, ▽ represents the gradient information, Then use the policy gradient to update the action network: In the formula, ▽ θμ J represents the objective function, a=μ(s i ) means that in state s, when strategy μ is adopted i The action a will be taken, Finally, the target network is updated through equations (39) and (40): i Q′ ←tth Q +(1-τ)θ Q′ τ∈[0,1] (39) i μ′ ←tth μ +(1-τ)θ μ′ τ∈[0,1] (40) Where τ is the scale parameter of the soft update, which ranges from 0 to 1. Q is the judgment network parameter, θ Q′ is the target judgment network parameter, θ μ is the action network parameter, θ μ′ are the target action network parameters.
Citation Information
Cited By
Vehicle trajectory tracking control method suitable for soft road surface
CN119176139A
A vehicle trajectory tracking control method suitable for soft road surfaces
CN119176139B
Longitudinal and transverse cooperative control method for unmanned autonomous vehicle queue
CN120161763A
