Human-vehicle cooperative steering control method based on reinforcement learning corner weight allocation
Through the reinforcement learning method based on the cooperation model, the DQN agent and the BP neural network model are used to optimize the corner weight distribution of the driverless vehicle, solving the problem of low efficiency of human-vehicle collaborative corner control in the existing technology, and realizing efficient human-vehicle collaborative corner control. Cooperative steering control.
Patent Information
- Application Number
- CN202210642626.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-06-08
AI Technical Summary
The existing empirically set human-vehicle collaborative steering angle allocation strategy is time-consuming, labor-intensive, and inefficient, and cannot effectively solve the complexity of human-vehicle collaborative steering angle control.
Using a reinforcement learning method based on the cooperation model, by training the DQN agent and BP neural network model, the weights of the driverless car and the driver model are allocated in real time, and the Deep-Q-learning algorithm is used to optimize the corner weight allocation, combined with the vehicle's two degrees of freedom. Dynamic model and Newton's second law, the reward function is designed to improve trajectory tracking accuracy and ride comfort.
It realizes self-iterative training of the human-vehicle collaborative steering control strategy of autonomous vehicles, replacing traditional empirical design, improving the efficiency and accuracy of corner allocation, avoiding waste of manpower and material resources, and reducing design complexity.
Smart Images

Figure CN115062539B
Abstract
Description
Technical Field
[0001] The present invention relates to a human-vehicle collaborative steering control method in the field of unmanned driving, and in particular to a human-vehicle collaborative steering control method based on cooperative mode reinforcement learning angle weight distribution. Background Art
[0002] With the development of science and technology, driverless driving has become an indispensable part of future transportation. Although in theory driverless driving technology can solve the problem of accidents caused by driver misoperation, whether from the current technical level or from the perspective of human ethics, full autonomous driving will lead to many problems. Comprehensively considering, it is very necessary to keep the driver in the loop in real time. Among them, the human-vehicle collaborative corner control strategy is a hot topic of research, but most of the existing human-vehicle collaborative technologies are strategies obtained based on experience and consideration of rules. Summary of the invention
[0003] In order to solve the technical problem that the existing empirically set human-vehicle cooperative steering angle allocation strategy is time-consuming and labor-intensive, the present invention provides a human-vehicle cooperative steering control method based on cooperative mode reinforcement learning angle weight allocation.
[0004] The present invention is implemented by the following technical solutions: a human-vehicle cooperative steering control method based on cooperative mode reinforcement learning angle weight distribution, which includes two parts: training in progress and training end;
[0005] During the training, the driver model of the driverless car participates in the iterative training process, the DQN agent is used to assign weights of the controller of the driverless car and the driver model in real time, and the policy network of the driverless car is updated in real time through the vehicle state and evaluation network of the driverless car;
[0006] After a certain number of iterations, the strategy network iteration is completed, the training is ended, and the network parameters of the last updated strategy network are kept unchanged. At this time, the evaluation network does not participate in the weight allocation process of the controller and the driver model. The DQN agent allocates the weights of the controller and the driver model in real time through the last updated strategy network.
[0007] As a further improvement of the above scheme, for the driverless car, a driver model based on BP neural network is designed to participate in the self-iteration process of reinforcement learning, and the self-iteration process is:
[0008] The input feature quantity s of the BP neural network is defined as:
[0009]
[0010] Among them, edis is the lateral error of the driverless car; e yaw is the heading angle error of the driverless car; is the lateral error change rate of the driverless car; is the rate of change of the heading angle error of the driverless car; k is the path curvature;
[0011] Define the i-th layer output h of the BP neural network i for:
[0012] h i =σ i (w i h i-1 +b i ) (2)
[0013] Among them, w i represents the network weight of the i-th layer; b i represents the network bias of the i-th layer; σ i is the activation function of the i-th layer; h i-1 is the neuron value of the i-1th layer;
[0014] The first layer output h1 of the BP neural network is defined as:
[0015] h1=s (3)
[0016] Define the driver's final output turning angle δ through the BP neural network f for:
[0017] δ f =net(s) (4)
[0018] Wherein, net(s) is the network function of the BP neural network;
[0019] The activation function σ1 of the first layer is defined as:
[0020]
[0021] The activation functions σ2 and σ3 of the second and third layers are defined as:
[0022]
[0023] The BP neural network is used for linear fitting. The number of neurons in the output layer of the BP neural network is 1, and the loss function loss is defined as:
[0024]
[0025] Among them, m1 is the number of selected samples, is the front wheel target turning angle of the i1th driverless car sample output by the BP neural network net, is the actual turning angle of the front wheel of the i1th driverless car sample;
[0026] Calculating the corresponding gradient of the BP neural network according to the loss function, updating the network weights and the network deviations, and generating a driver model network that meets expectations after a certain training cycle;
[0027] Iteratively train the front wheel target turning angle
[0028] As a further improvement of the above scheme, the specific structure of the BP neural network is shown in the following table:
[0029] Number of neurons Activation Function Input Layer 5 tanh Hidden layer 1 10~20 relu Hidden layer 2 3~10 relu Output Layer 1 none
[0030] As a further improvement of the above scheme, according to the vehicle two-degree-of-freedom dynamics model and Newton's second law, we can get:
[0031]
[0032]
[0033]
[0034] Wherein, m is the vehicle mass of the driverless car, is the vehicle lateral acceleration, is the vehicle longitudinal velocity, is the vehicle yaw angular velocity, is the lateral force on the front wheel of the vehicle, is the lateral force of the rear wheel of the vehicle, is the vehicle longitudinal acceleration, is the vehicle lateral speed, is the longitudinal force of the front wheel of the vehicle, is the longitudinal force of the rear wheel of the vehicle, is the vehicle yaw angular acceleration, I z is the moment of inertia of the vehicle around the z-axis; a is the distance between the center of mass of the vehicle and the center of the front axle; b is the distance between the center of mass of the vehicle and the center of the rear axle;
[0035] Based on the assumption of a small front wheel turning angle and a linear tire model, and combining the two-dimensional plane transformation relationship between the vehicle coordinate system and the global coordinate system, we can obtain the following equation based on (8)-(10):
[0036]
[0037]
[0038]
[0039]
[0040]
[0041] Among them, C cf is the lateral stiffness of the front wheel of the vehicle, δ f is the front wheel turning angle of the vehicle, C cr is the lateral stiffness of the rear wheel of the vehicle, C lf is the longitudinal stiffness of the front wheel of the vehicle, s f is the vehicle front wheel slip rate, C lr is the longitudinal stiffness of the rear wheel of the vehicle, s r is the rear wheel slip rate of the vehicle, X is the horizontal coordinate in the vehicle global coordinate system, Y is the vertical coordinate in the vehicle global coordinate system, is the velocity in the horizontal direction of the vehicle global coordinate system, is the velocity in the ordinate direction of the vehicle's global coordinate system; is the vehicle heading angle;
[0042] Set the vehicle state ξ to:
[0043]
[0044] Where T is the transposition symbol;
[0045] The actual control amount u of the vehicle is:
[0046] u=δ f (17)
[0047] Then the nonlinear model expressed by equations (11)-(15) can be written as:
[0048]
[0049] The nonlinear model is linearized to obtain:
[0050]
[0051] in:
[0052]
[0053]
[0054] in, is the longitudinal velocity at the current time t, is the state equation about the vehicle lateral velocity The partial guide, is the vehicle longitudinal speed The partial derivative of f,t-1 is the front wheel turning angle of the vehicle at the previous moment t-1, is the state equation about the vehicle longitudinal velocity The partial guide, is the lateral velocity at the current time t, is the state equation about the yaw rate The partial guide, is the vehicle yaw rate at the current time t.
[0055] As a further improvement of the above scheme, in the actual control algorithm deployment, it is necessary to convert equation (19) into a discrete state function:
[0056]
[0057] in, is the discrete state function of sampling point k+1, is the discrete state function of sampling point k; is the actual control value u of the vehicle at sampling point k (k) and the vehicle target control quantity u (k,ref) The vehicle control deviation between (k) =I+ΔT.A (23)
[0058] B (k) =ΔT.B (24)
[0059] I is the identity matrix, ΔT is the sampling time interval;
[0060] Formula (22) is further processed to convert the actual control quantity into an incremental form:
[0061]
[0062] Among them, ε (k+1) is the incremental function of sampling point k+1, ε (k) is the incremental function of sampling point k, Δu (k) is the vehicle control increment at sampling point k relative to the previous moment, η (k) Vehicle state extraction function at sampling point k;
[0063]
[0064]
[0065]
[0066]
[0067] is the actual control value u of the vehicle at sampling point k-1 (k-1) and the vehicle target control quantity u (k-1,ref) The vehicle control amount deviation between
[0068] According to formula (25), it can be iterated to obtain:
[0069] Y(k)=Ψ s ε (k) +Θ s ΔU(k) (30)
[0070] in:
[0071]
[0072] η (k+1) The vehicle state extraction function at sampling point k+1, η (k+2) The vehicle state extraction function at sampling point k+2, Sampling point k+N c The vehicle state extraction function, N c is the control domain of the objective function for controlling vehicle tracking, Sampling point k+N p The vehicle state extraction function, N p is the prediction domain of the objective function;
[0073]
[0074]
[0075]
[0076] Δu (k+1) is the increment of vehicle control amount at sampling point k+1 relative to the previous moment, Δu (k+Nc) is the increment of vehicle control amount at sampling point k+Nc relative to the previous moment;
[0077] As a further improvement of the above scheme, the objective function J is set to be solved:
[0078]
[0079] i2 represents the prediction domain N p The serial number, i3 represents the control domain N c The serial number, η (k1+i2) is the vehicle state extraction function at sampling point k+i2, η ref(k+i2) is the vehicle reference state quantity extraction function of sampling point k+i2; Δu(k+i3) is the vehicle control quantity increment of sampling point k+i3 relative to the previous moment; Q is the state quantity weight matrix, and R is the control quantity weight matrix;
[0080] The constraint equation is set for the control amount of the front wheel target turning angle:
[0081] Δu min ≤Δu≤Δu max (36)
[0082] u min ≤u≤u max (37)
[0083] α min ≤α≤α max (38)
[0084] Solving the objective function (35) under constraint equations (36)-(38) to obtain the front wheel target turning angle;
[0085] Δu is the control quantity increment sequence, Δu min , Δu max are the minimum and maximum values of the control quantity increment sequence Δu respectively; u min , u max are the minimum and maximum values of the actual control amount u of the vehicle respectively; α is the vehicle sideslip angle, α min , α max are the minimum and maximum values of the vehicle sideslip angle α, respectively.
[0086] As a further improvement of the above scheme, the weight allocation method is:
[0087] Select the input feature quantity s as the state quantity of the reinforcement learning algorithm:
[0088]
[0089] The reward function is designed as:
[0090]
[0091] Among them, τ dis is the lateral error weight coefficient, e dis is the lateral error, τ yaw is the heading error weight coefficient, e yaw is the heading angle error, τ disr is the weight coefficient of the lateral error change rate, e disr is the lateral error change rate, τ yawr is the weight coefficient of the heading error change rate, is the weight coefficient of the heading error change rate, e yawr is the rate of change of heading angle error; the first two terms of the reward function Represents trajectory tracking accuracy, the last three items Represents ride comfort;
[0092] The number of state variables corresponds to the number of input layer neurons of the policy network actorNet, and the number of output layer neurons represents the number of control weight intervals. The weight w of the driver model described here is driver , the controller weight w mpc Through formula (41), we can indirectly obtain:
[0093] w driver +w mpc =1 (41)
[0094] As a further improvement of the above solution, the final output turning angle of the driverless car is:
[0095] δ deal =w driver δ driver +w mpc δ mpc
[0096] w driver is the weight coefficient of the driver model; mpc is the weight coefficient of the controller; δ driver is the output turning angle of the driver model; δ mpc is the output angle of the controller; δ deal is the target angle after coordination.
[0097] As a further improvement of the above scheme, the DQN hyperparameters of the DQN agent are set as shown in the following table:
[0098] parameter value Sampling time(s) 0.1~0.25 Single round time (s) 25~35 Network learning rate 0.001~0.005 Update parameter interval 1000~2000 Number of experience pools 2000~5000 Number of samples 32~64
[0099] The present invention also discloses a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of any of the above-mentioned human-vehicle collaborative steering control methods based on cooperative mode reinforcement learning angle weight distribution are implemented.
[0100] The present invention also discloses a computer terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of any of the above-mentioned human-vehicle collaborative steering control methods based on cooperative mode reinforcement learning angle weight distribution are implemented.
[0101] Compared with the traditional technology, the present invention has the following beneficial effects:
[0102] 1. Replace the traditional experience-based cooperative model with the human-vehicle collaborative corner allocation strategy through reinforcement learning.
[0103] 2. Design a driver model based on BP neural network to participate in the self-iteration process of reinforcement learning, avoiding the waste of manpower and material resources.
[0104] 3. The application of Deep-Q-learning algorithm in the weight distribution of human-vehicle collaboration in intelligent vehicles is established, but it does not directly control the intelligent vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] Figure 1 This is a diagram showing the change in the root mean square error of the human-vehicle cooperative steering control method of the present invention during the network training process.
[0106] Figure 2 It is a schematic diagram for comparing the actual output of the driver and the predicted output of the network according to the present invention.
[0107] Figure 3 It is a schematic diagram of a two-degree-of-freedom dynamic model applied to the human-vehicle cooperative steering control method of the present invention.
[0108] Figure 4 It is a schematic diagram of the angle weight distribution of the cooperative mode reinforcement learning of the human-vehicle cooperative steering control method of the present invention.
[0109] Figure 5 This is the DQN iterative training diagram of the present invention.
[0110] Figure 6 This is a comparison diagram of the lateral errors before and after training of the present invention.
[0111] Figure 7 This is a comparison diagram of the heading error before and after training of the present invention. DETAILED DESCRIPTION
[0112] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0113] The steering angle allocation strategy for collaborative steering between human and vehicle, which is set based on experience, is time-consuming and labor-intensive, and needs to be considered differently for different working conditions. Therefore, it is proposed to utilize the self-learning characteristics of reinforcement learning to formulate an objective function for the steering angle allocation strategy for judging collaborative steering between human and vehicle, select a suitable reinforcement learning strategy, and generate an intelligent agent that meets the expected standards during the iteration process to coordinate the output steering angles of the driver and controller, thereby avoiding determining the allocation strategy based on experience.
[0114] The human-vehicle cooperative corner allocation strategy mainly includes three aspects: driver, trajectory tracking corner controller, and weight allocation strategy. The driver model is trained using BP neural network, and the trajectory tracking controller uses model predictive control (MPC). The weight allocation scheme is designed based on reinforcement learning. Reinforcement learning requires a self-iterative process. If real people are kept in the loop in real time, it is time-consuming, labor-intensive, and inefficient. Therefore, during the self-iterative training of the intelligent agent, the driver model needs to be used instead of the driver to operate. After the self-iterative training of the intelligent agent, the driver model can be replaced by the actual driver to verify whether the weight allocation strategy is reasonable.
[0115] 1. Driver model based on BP neural network:
[0116] e dis ——Lateral error
[0117] e yaw ——Heading angle error
[0118] ——Transverse error change rate
[0119] ——Rate of change of heading angle error
[0120] k——path curvature
[0121] δ f ——Front wheel turning angle
[0122] δ net ——Front wheel predicted turning angle
[0123] δ ref ——Actual turning angle of front wheel
[0124] net - Driver Turn Angle Prediction Network
[0125] s——prediction network input feature quantity
[0126] w——prediction network weight
[0127] b——Prediction network bias
[0128] σ — activation function
[0129] h——Single-layer network
[0130] m1——Number of samples selected
[0131] The driver’s characteristic data is collected through the driving simulator, and the appropriate characteristic quantity s is selected as the input of the neural network net, where:
[0132]
[0133] Among them, e dis is the lateral error of the driverless car; e yaw is the heading angle error of the driverless car; is the lateral error change rate of the driverless car; is the rate of change of the heading angle error of the driverless car; k is the path curvature.
[0134] Define the i-th layer output h of the BP neural network i for:
[0135] h i =σ i (w i h i-1 +b i ) (2)
[0136] Among them, w i represents the network weight of the i-th layer; b i represents the network bias of the i-th layer; σ i is the activation function of the i-th layer; h i-1 is the neuron value of the i-1th layer.
[0137] The first layer output h1 of the BP neural network is defined as:
[0138] h1=s (3)
[0139] Define the driver's final output turning angle δ through the BP neural network f for:
[0140] δ f =net(s) (4)
[0141] Wherein, net(s) is the network function of the BP neural network.
[0142] The specific structure of the BP neural network is shown in Table 1:
[0143] Number of neurons Activation Function Input Layer 5 tanh Hidden layer 1 10 relu Hidden layer 2 3 relu Output Layer 1 none
[0144] Table 1 Neural network structure
[0145] Among them, the activation function σ1 of the first layer is:
[0146]
[0147] The activation functions σ2 and σ3 of the second and third layers are:
[0148]
[0149] The BP neural network is used for linear fitting. The number of neurons in the output layer of the BP neural network is 1, and the loss function loss is defined as:
[0150]
[0151] Among them, m1 is the number of selected samples, is the front wheel target turning angle of the i1th driverless car sample output by the BP neural network net, is the actual steering angle of the front wheel of the i1th driverless car sample.
[0152] The corresponding gradient of the BP neural network is calculated according to the loss function, and the network weight and the network deviation are updated. After a certain training cycle, a driver model network that meets the expectations is generated.
[0153] The network training process is as follows Figure 1 As shown in the figure, the comparison between the driver's actual output and the network's predicted output is Figure 2 The actual output of the driver and the output predicted by the network have basically the same trend, which proves that the designed network can replace the real driver to participate in the iterative training process.
[0154] 2. The control principle of the model predictive controller is as follows:
[0155] L——Vehicle wheelbase
[0156] m——Vehicle mass
[0157] I z ——Vehicle moment of inertia around the z-axis
[0158] ——Side force on the front wheel of the vehicle
[0159] ——Vehicle rear wheel lateral force
[0160] ——Longitudinal force of the front wheel of the vehicle
[0161] ——Longitudinal force of the rear wheel of the vehicle
[0162] a——The distance between the center of mass of the vehicle and the center of the front axle
[0163] b——The distance between the vehicle's center of mass and the center of the rear axle
[0164] C cf ——Vehicle front wheel lateral stiffness
[0165] C cr ——Vehicle rear wheel lateral stiffness
[0166] Clf ——Longitudinal stiffness of the vehicle's front wheels
[0167] C lr ——Vehicle rear wheel longitudinal stiffness
[0168] δ f ——Vehicle front wheel turning angle
[0169] s f ——Vehicle front wheel slip rate
[0170] s r ——Vehicle rear wheel slip rate
[0171] X——The horizontal coordinate of the vehicle's global coordinate system
[0172] Y——Vertical coordinate in the vehicle's global coordinate system
[0173] ——Vehicle longitudinal speed
[0174] ——Vehicle longitudinal acceleration
[0175] - Vehicle lateral speed
[0176] - Vehicle lateral acceleration
[0177] ——Vehicle heading angle
[0178] ——Vehicle yaw rate
[0179] ——Vehicle yaw angular acceleration
[0180] N p ——Prediction domain
[0181] N c ——Control domain
[0182] Δu——Control quantity increment
[0183] u——Control quantity
[0184] α——Vehicle side slip angle
[0185] I——Identity Matrix
[0186] ΔT——Sampling time
[0187]
[0188]
[0189]
[0190] Wherein, m is the vehicle mass of the driverless car, is the vehicle lateral acceleration, is the vehicle longitudinal velocity, is the vehicle yaw angular velocity, is the lateral force on the front wheel of the vehicle, is the lateral force of the rear wheel of the vehicle, is the vehicle longitudinal acceleration, is the vehicle lateral speed, is the longitudinal force of the front wheel of the vehicle, is the longitudinal force of the rear wheel of the vehicle, is the vehicle yaw angular acceleration, I z is the moment of inertia of the vehicle around the z-axis; a is the distance between the center of mass of the vehicle and the center of the front axle; b is the distance between the center of mass of the vehicle and the center of the rear axle.
[0191] Based on the assumption of a small front wheel turning angle and a linear tire model, and combining the two-dimensional plane transformation relationship between the vehicle coordinate system and the global coordinate system, we can obtain the following equation based on (8)-(10):
[0192]
[0193]
[0194]
[0195]
[0196]
[0197] Among them, C cf is the lateral stiffness of the front wheel of the vehicle, δ f is the front wheel turning angle of the vehicle, C cr is the lateral stiffness of the rear wheel of the vehicle, C lf is the longitudinal stiffness of the front wheel of the vehicle, s f is the vehicle front wheel slip rate, C lr is the longitudinal stiffness of the rear wheel of the vehicle, s r is the rear wheel slip rate of the vehicle, X is the horizontal coordinate in the vehicle global coordinate system, Y is the vertical coordinate in the vehicle global coordinate system, is the velocity in the horizontal direction of the vehicle global coordinate system, is the velocity in the ordinate direction of the vehicle's global coordinate system; is the vehicle heading angle.
[0198] Set the vehicle state ξ to:
[0199]
[0200] Where T is the transposition symbol;
[0201] The actual control amount u of the vehicle is:
[0202] u=δ f (17)
[0203] Then the nonlinear model expressed by equations (11)-(15) can be written as:
[0204]
[0205] The nonlinear model is linearized to obtain:
[0206]
[0207] in:
[0208]
[0209]
[0210] in, is the longitudinal velocity at the current time t, is the state equation about the vehicle lateral velocity The partial guide, is the vehicle longitudinal speed The partial derivative of f,t-1 is the front wheel turning angle of the vehicle at the previous moment t-1, is the state equation about the vehicle longitudinal velocity The partial guide, is the lateral velocity at the current time t, is the state equation about the yaw rate The partial guide, is the vehicle yaw rate at the current time t.
[0211] In the actual control algorithm deployment, it is necessary to convert equation (19) into a discrete state:
[0212]
[0213] in, is the discrete state function of sampling point k+1, is the discrete state function of sampling point k; is the actual control value u of the vehicle at sampling point k (k) and the vehicle target control quantity u (k,ref) The vehicle control amount deviation between
[0214] A (k) =I+ΔT.A (23)
[0215] B (k) =ΔT.B (24)
[0216] I is the identity matrix, and ΔT is the sampling time interval.
[0217] Formula (22) is further processed to convert the actual control quantity into an incremental form:
[0218]
[0219] Among them, ε (k+1) is the incremental function of sampling point k+1, ε (k) is the incremental function of sampling point k, Δu (k) is the vehicle control increment at sampling point k relative to the previous moment, η (k) Vehicle state extraction function at sampling point k.
[0220]
[0221]
[0222]
[0223]
[0224] is the actual control value u of the vehicle at sampling point k-1 (k-1) and the vehicle target control quantity u (k-1,) The vehicle control amount deviation between them.
[0225] According to formula (25), it can be iterated to obtain:
[0226] Y(k)=Ψ s ε (k) +Θ s ΔU(k) (30)
[0227] in:
[0228]
[0229] η (k+1) The vehicle state extraction function at sampling point k+1, η (k+2) The vehicle state extraction function at sampling point k+2, Sampling point k+N c The vehicle state extraction function, N c is the control domain of the objective function for controlling vehicle tracking, Sampling point k+N p The vehicle state extraction function, N pis the prediction domain of the objective function.
[0230]
[0231]
[0232]
[0233] Δu (k+1) is the increment of vehicle control amount at sampling point k+1 relative to the previous moment, It is the increment of vehicle control amount at sampling point k+Nc relative to the previous moment.
[0234] Set the objective function to be solved:
[0235]
[0236] i2 represents the prediction domain N p The serial number, i3 represents the control domain N c The serial number, η (k1+i2) is the vehicle state extraction function at sampling point k+i2, η ref(k+i2) is the vehicle reference state quantity extraction function of the sampling point k+i2; Δu(k+i3) is the vehicle control quantity increment of the sampling point k+i3 relative to the previous moment; Q is the state quantity weight matrix, and R is the control quantity weight matrix.
[0237] Set constraint equations for the control quantity:
[0238] Δu min ≤Δu≤Δu max (36)
[0239] u min ≤u≤u max (37)
[0240] α min ≤α≤α max (38)
[0241] Solving the objective function (35) under constraint equations (36)-(38) to obtain the front wheel target turning angle;
[0242] Δu is the control quantity increment sequence, Δu min , Δu max are the minimum and maximum values of the control quantity increment sequence Δu respectively; u min , u max are the minimum and maximum values of the actual control amount u of the vehicle respectively; α is the vehicle sideslip angle, α min , α max are the minimum and maximum values of the vehicle sideslip angle α, respectively.
[0243] 3. Cooperation model reinforcement learning human-vehicle weight allocation strategy:
[0244] D——Experience Storage Pool
[0245] N——Number of experience in the experience storage pool
[0246] M——Number of iterations
[0247] ∈——current iteration round
[0248] T——Total number of steps in a single round
[0249] t——Number of steps in the current round
[0250] σ random ——Random Numbers
[0251] σ——Greedy strategy threshold
[0252] m——Select the number of training experiences
[0253] C——Evaluate the network weight assignment interval
[0254] actorNet — Policy Network
[0255] targeNet——Evaluation Network
[0256] θ — Policy network weights
[0257] θ - ——Evaluate network weights
[0258] Q——Strategy network output value
[0259] Q - ——Evaluate network output value
[0260] s——input state quantity
[0261] a——Execute action
[0262] r——Get a single step reward
[0263] e dis ——Lateral error
[0264] e yaw ——Heading angle error
[0265] ——Transverse error change rate
[0266] ——Rate of change of heading angle error
[0267] k——path curvature
[0268] τdis ——Lateral error weight coefficient
[0269] τ yaw ——Heading error weight coefficient
[0270] τ disr ——Weight coefficient of lateral error change rate
[0271] τ yawr ——Heading error change rate weight coefficient
[0272] ——Heading error change rate weight coefficient
[0273] w driver ——Pure tracking output angle weight coefficient
[0274] w mpc ——MPC output angle weight coefficient
[0275] δ driver ——Pure tracking controller output angle
[0276] δ mpc ——MPC controller output angle
[0277] δ deal ——Target turning angle after coordination
[0278] Since the state of smart cars is relatively complex, it is necessary to select a reinforcement learning strategy that can adapt to complex working conditions according to actual conditions. Here, the Deep-Q-learning (hereinafter referred to as DQN) algorithm is selected as the reinforcement learning strategy.
[0279] DQN algorithm pseudo code:
[0280]
[0281] Select the state quantity:
[0282]
[0283] Here we consider the problem of weight allocation of human-vehicle collaboration in the cooperative mode, mainly taking the trajectory tracking accuracy and riding comfort of the smart car as evaluation indicators, so the reward function is designed as:
[0284]
[0285] Among them, τ dis is the lateral error weight coefficient, e dis is the lateral error, τ yaw is the heading error weight coefficient, e yaw is the heading angle error, τ disris the weight coefficient of the lateral error change rate, e disr is the lateral error change rate, τ yawr is the weight coefficient of the heading error change rate, is the weight coefficient of the heading error change rate, e yawr is the rate of change of heading angle error; the first two terms of the reward function Represents trajectory tracking accuracy, the last three items Represents ride comfort.
[0286] The number of state quantities corresponds to the number of input layer neurons of the policy network actorNet, and the number of output layer neurons represents the number of control weight intervals. Assuming that the number of output layer neurons is 100, and neuron 1 is selected to perform an action, then the corresponding weight is 0.01, and the other side corresponds to a weight of 0.99. Here, the weight w directly controlled by the driver is driver , the weight w of MPC mpc It can be obtained indirectly through formula (41):
[0287] w driver +w mpc =1 (41)
[0288] Reinforcement learning is a process of continuous self-iteration and parameter updating. Therefore, in iterative training, the driver model established by the BP neural network needs to participate in the training process. According to the designed objective function, actorNet gradually meets the design goal during the iterative training process. After the training is completed, the trained weight allocation strategy is evaluated by the actual driver. The specific process is as follows Figure 4 shown.
[0289] After receiving the road information, the environmental sensor sends it to the controller and the driver (driver model) respectively. The controller is the orange part and the driver (driver model) is the blue part. The weight allocation strategy is divided into two parts: training in progress and training end. During the training, the driver model participates in the iterative training process, the DQN agent allocates the weights of the controller and the driver model in real time, and updates the policy network in real time through the vehicle status and the evaluation network; after a certain number of iterations, the policy network iteration is completed, keeping the network parameters unchanged, at this time the evaluation network does not participate in the weight allocation process, and the DQN agent allocates the weights of the controller and the driver in real time through the fixed policy network.
[0290] The final output angle is:
[0291] δ deal =w driver δ driver +w mpc δ mpc (41)
[0292] wdriver is the weight coefficient of the driver model; mpc is the weight coefficient of the controller; δ driver is the output turning angle of the driver model; δ mpc is the output angle of the controller; δ deal is the target angle after coordination.
[0293] DQN hyperparameter settings are shown in Table 2:
[0294] parameter value Sampling time(s) 0.1 Single round time (s) 30 Network learning rate 0.001 Update parameter interval 1000 Number of experience pools 2000 Number of samples 64
[0295] Table 2 DQN hyper parameters
[0296] The cumulative round rewards during the training process are as follows: Figure 5 As the training progresses, actorNet gradually meets expectations. The trained actorNet is used as the weight distribution strategy for the cooperation mode and compared with the initial strategy before training, as shown in Figure 6 , Figure 7 As shown: After the agent completes self-iteration, it can obtain a weight distribution scheme that meets the design goals, thus avoiding manual specification of distribution rules.
[0297] When the human-vehicle collaborative steering control method based on cooperative mode reinforcement learning corner weight distribution of the present invention is designed as a program to implement the function, a computer-readable storage medium can be used. A computer program is stored on the computer-readable storage medium. The computer terminal may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the human-vehicle collaborative steering control method based on cooperative mode reinforcement learning corner weight distribution of the present invention are implemented. The computer terminal can be a computer, a smart phone, etc. It can also be designed as an embedded program and installed on a computer terminal, such as a single-chip microcomputer.
[0298] When the human-vehicle collaborative steering control method based on cooperative mode reinforcement learning angle weight distribution of the present invention is designed as a program to implement functions, it can also be designed as a program that can run independently on a computer-readable storage medium. The computer-readable storage medium can be a USB flash drive, designed as a USB shield, and the USB flash drive is designed to start the program of the entire method through external triggering.
[0299] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A human-vehicle cooperative steering control method based on cooperative mode reinforcement learning angle weight distribution, characterized in that: It includes two parts: training in progress and training end; During the training, the driver model of the driverless car participates in the iterative training process, the DQN agent is used to assign weights of the controller of the driverless car and the driver model in real time, and the policy network of the driverless car is updated in real time through the vehicle state and evaluation network of the driverless car; After a certain number of iterations, the strategy network iteration is completed, the training is finished, and the network parameters of the last updated strategy network are kept unchanged. At this time, the evaluation network does not participate in the weight allocation process of the controller and the driver model, and the DQN agent allocates the weights of the controller and the driver model in real time through the last updated strategy network; Among them, for the driverless car, a driver model based on BP neural network is designed to participate in the self-iteration process of reinforcement learning, and the self-iteration process is: The input feature quantity s of the BP neural network is defined as: Among them, e dis is the lateral error of the driverless car; e yaw is the heading angle error of the driverless car; is the lateral error change rate of the driverless car; is the rate of change of the heading angle error of the driverless car; k is the path curvature; Define the i-th layer output h of the BP neural network i for: h i =σ i (w i h i-1 +b i ) (2) Among them, w i represents the network weight of the i-th layer; b i represents the network bias of the i-th layer; σ i is the activation function of the i-th layer; h i-1 is the neuron value of the i-1th layer; The first layer output h1 of the BP neural network is defined as: h1=s (3) Define the driver's final output turning angle δ through the BP neural network f for: δ f =net(s) (4) Wherein, net(s) is the network function of the BP neural network; The activation function σ1 of the first layer is defined as: The activation functions σ2 and σ3 of the second and third layers are defined as: The BP neural network is used for linear fitting. The number of neurons in the output layer of the BP neural network is 1, and the loss function loss is defined as: Among them, m1 is the number of selected samples, is the front wheel target turning angle of the i1th driverless car sample output by the BP neural network net, is the actual turning angle of the front wheel of the i1th driverless car sample; Calculating the corresponding gradient of the BP neural network according to the loss function, updating the network weights and the network deviations, and generating a driver model network that meets expectations after a certain training cycle; Iteratively train the front wheel target turning angle The weight distribution method is: Select the input feature quantity s as the state quantity of the reinforcement learning algorithm: The reward function is designed as: Among them, τ dis is the lateral error weight coefficient, e dis is the lateral error, τ yaw is the heading error weight coefficient, e yaw is the heading angle error, τ disr is the weight coefficient of the lateral error change rate, e disr is the lateral error change rate, τ yawr is the weight coefficient of the heading error change rate, τ δf is the weight coefficient of the heading error change rate, e yawr is the rate of change of heading angle error; the first two terms of the reward function Represents trajectory tracking accuracy, the last three items Represents ride comfort; The number of state variables corresponds to the number of input layer neurons of the policy network actorNet, and the number of output layer neurons represents the number of control weight intervals. The weight w of the driver model described here is driver , the weight w of the controller mpc Through formula (41), we can indirectly obtain: In driver +in mpc =1 (41) The final output turning angle of the driverless car is: d deal =w driver d driver +w mpc d mpc w driver is the weight coefficient of the driver model; mpc is the weight coefficient of the controller; δ driver is the output turning angle of the driver model; δ mpc is the output angle of the controller; δ deal is the target angle after coordination.
2. The human-vehicle cooperative steering control method based on cooperative mode reinforcement learning angle weight distribution as claimed in claim 1, characterized in that: The specific structure of the BP neural network is shown in the following table:
3. The human-vehicle cooperative steering control method based on cooperative mode reinforcement learning angle weight distribution as claimed in claim 1, characterized in that: According to the vehicle two-degree-of-freedom dynamics model and Newton's second law: Wherein, m is the vehicle mass of the driverless car, is the vehicle lateral acceleration, is the vehicle longitudinal velocity, is the vehicle yaw angular velocity, is the lateral force on the front wheel of the vehicle, is the lateral force of the rear wheel of the vehicle, is the vehicle longitudinal acceleration, is the vehicle lateral speed, is the longitudinal force of the front wheel of the vehicle, is the longitudinal force of the rear wheel of the vehicle, is the vehicle yaw angular acceleration, I z is the moment of inertia of the vehicle around the z-axis; a is the distance between the center of mass of the vehicle and the center of the front axle; b is the distance between the center of mass of the vehicle and the center of the rear axle; Based on the assumption of a small front wheel turning angle and a linear tire model, and combining the two-dimensional plane transformation relationship between the vehicle coordinate system and the global coordinate system, we can obtain the following equation based on (8)-(10): Among them, C cf is the lateral stiffness of the front wheel of the vehicle, δ f is the front wheel turning angle of the vehicle, C cr is the lateral stiffness of the rear wheel of the vehicle, is the longitudinal stiffness of the front wheel of the vehicle, s f is the vehicle front wheel slip rate, C lr is the longitudinal stiffness of the rear wheel of the vehicle, s r is the rear wheel slip rate of the vehicle, X is the horizontal coordinate in the vehicle global coordinate system, Y is the vertical coordinate in the vehicle global coordinate system, is the velocity in the horizontal direction of the vehicle global coordinate system, is the velocity in the ordinate direction of the vehicle's global coordinate system; is the vehicle heading angle; Set the vehicle state ζ to: Where T is the transposition symbol; The actual control amount u of the vehicle is: u=δ f (17) Then the nonlinear model expressed by equations (11)-(15) can be written as: The nonlinear model is linearized to obtain: in: in, is the longitudinal velocity at the current time t, is the state equation about the vehicle lateral velocity The partial guide, is the vehicle longitudinal speed The partial derivative of f,t-1 is the front wheel turning angle of the vehicle at the previous moment t-1, is the state equation about the vehicle longitudinal velocity The partial guide, is the lateral velocity at the current time t, is the state equation about the yaw rate The partial guide, is the vehicle yaw rate at the current time t.
4. The human-vehicle coordinated steering control method based on cooperative mode reinforcement learning angle weight distribution as claimed in claim 3, characterized in that: In the actual control algorithm deployment, it is necessary to convert equation (19) into a discrete state function: in, is the discrete state function of sampling point k+1, is the discrete state function of sampling point k; is the actual control value u of the vehicle at sampling point k (k) and the vehicle target control quantity u (k,ref) The vehicle control amount deviation between A (k) = I+ΔT.A (23) B (k) =ΔT.B (24) I is the identity matrix, ΔT is the sampling time interval; Formula (22) is further processed to convert the actual control quantity into an incremental form: Among them, ε (k+1) is the incremental function of sampling point k+1, ε (k) is the incremental function of sampling point k, Δu (k) is the vehicle control increment at sampling point k relative to the previous moment, η (k) Vehicle state extraction function at sampling point k; is the actual control value u of the vehicle at sampling point k-1 (k-1) and the vehicle target control quantity u (k-1,ref) The vehicle control amount deviation between According to formula (25), it can be iterated to obtain: Y(k)=Ψ s e (k) +Θ s ΔU(k) (30) in: η (k+1) The vehicle state extraction function at sampling point k+1, η (k+2) The vehicle state extraction function at sampling point k+2, Sampling point k+N c The vehicle state extraction function, N c is the control domain of the objective function for controlling vehicle tracking, Sampling point k+N p The vehicle state extraction function, N p is the prediction domain of the objective function; Δu (k+1) is the increment of vehicle control amount at sampling point k+1 relative to the previous moment, Δu (k+Nc) It is the increment of vehicle control amount at sampling point k+Nc relative to the previous moment.
5. The human-vehicle coordinated steering control method based on cooperative mode reinforcement learning angle weight distribution as claimed in claim 4, characterized in that: Set the objective function J to be solved: i2 represents the prediction domain N p The serial number, i3 represents the control domain N c The serial number, η (k1+i2) is the vehicle state extraction function at sampling point k+i2, η ref(k+i2) Extraction function of the vehicle reference state quantity at sampling point k+i2; Δu(k+i3) is the increment of vehicle control quantity at sampling point k+i3 relative to the previous moment; Q is the state quantity weight matrix, and R is the control quantity weight matrix; The constraint equation is set for the control amount of the front wheel target turning angle: Δu min ≤Δu≤Δu max (36) in min Oh, oh. max (37) α min ≤α≤α max (38) Solving the objective function (35) under constraint equations (36)-(38) to obtain the front wheel target turning angle; Δu is the control quantity increment sequence, Δu min , Δu max are the minimum and maximum values of the control quantity increment sequence Δu respectively; u min 、u max are the minimum and maximum values of the actual control amount u of the vehicle respectively; α is the vehicle sideslip angle, α min , α max are the minimum and maximum values of the vehicle sideslip angle α, respectively.
6. The human-vehicle coordinated steering control method based on cooperative mode reinforcement learning angle weight distribution as claimed in claim 1, characterized in that: The DQN hyperparameter settings of the DQN agent are shown in the following table: 。 7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the steps of the human-vehicle collaborative steering control method based on cooperative mode reinforcement learning angle weight distribution as described in any one of claims 1 to 6 are implemented.
