Curiosity-driven deep reinforcement learning approach for energy management of hybrid powertrains
Through the curiosity-driven deep reinforcement learning method, combined with pre-training and the A3C agent model, the reward function is optimized, which solves the problem of in-depth exploration and slow training speed of the A3C algorithm in hybrid vehicles, and achieves fuel economy and neural network The rapid convergence effect improves the control effect and robustness of energy management.
Patent Information
- Application Number
- CN202011451706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-10
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-12-10
AI Technical Summary
The existing A3C algorithm has problems with in-depth exploration and slow training speed in hybrid vehicle energy management, resulting in poor fuel economy performance and difficulty in achieving real-time control and rapid convergence.
Adopting a curiosity-driven deep reinforcement learning method, by pre-training Actor and Critic networks, combined with the curiosity-driven A3C agent model, global and local neural networks are used to interact, and the reward function is optimized to improve exploration efficiency and training speed, and realize neural Rapid network convergence.
On the premise of ensuring power, the fuel economy is improved, the rapid convergence of the neural network is achieved, the control effect of the energy management strategy and the speed of the algorithm are improved, and the robustness and adaptability to working conditions are enhanced.
Smart Images

Figure CN112765723B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of hybrid vehicle energy management, and in particular to a curiosity-driven hybrid system deep reinforcement learning energy management method. Background Art
[0002] In today's society, energy crisis and environmental pollution are becoming more and more serious. For the automotive industry, the challenges it faces are also increasing. Pure fuel vehicles have the problems of high energy consumption and high emissions. In order to better solve these problems, hybrid vehicles have gradually become the focus of people's research. Hybrid vehicles are composed of multiple power sources, generally two, namely internal combustion engines and motors. The energy management system can coordinate the relationship between the two power sources well, achieving lower fuel consumption while meeting the power requirements, thereby reducing energy consumption and greenhouse gas emissions. Therefore, it is a very important task to develop an efficient energy management controller to coordinate the work of the energy management system.
[0003] Under current research, the energy management strategies for HEVs are generally divided into three categories: First, rule-based strategies. Rule-based strategies have the advantages of low technical difficulty, high real-time performance, and low online computing. Rule-based strategies generally only need to formulate relevant rules, that is, set certain thresholds to achieve energy management for hybrid vehicles. Therefore, the application difficulty is relatively low, so they are widely used in the industrial field of hybrid vehicles. However, the formulation of relevant rules needs to rely on expert experience. Second, energy management strategies based on optimization, the most representative of which is the DP (dynamic programming) algorithm. Energy management strategies based on DP can obtain global optimality, but the premise requires that the global working conditions are known, and the calculation time is also long. Therefore, they can generally only be used as a benchmark for evaluating other strategies and cannot be applied to real-time control of vehicles. In recent years, learning-based algorithms have begun to appear in large numbers, especially the A3C algorithm.
[0004] However, the A3C method also has many problems in practical applications. Its biggest disadvantage is that it cannot be deeply explored to obtain better fuel economy performance. At the same time, the training time of the A3C algorithm is also relatively long when it is applied. Therefore, better solutions to these two problems can achieve rapid convergence of neural networks, and at the same time can effectively improve the control effect of energy management strategies based on deep reinforcement learning and improve the performance of the entire vehicle. Summary of the invention
[0005] The present invention provides a curiosity-driven hybrid power system deep reinforcement learning energy management method. Under the premise of ensuring the power of the vehicle, through the A3C algorithm based on pre-training and curiosity-driven, not only the problem that the A3C algorithm cannot explore deeply can be solved, but also the problem that the A3C algorithm has a slow training speed can be solved. It can achieve rapid convergence of the neural network on the basis of ensuring the fuel economy of the vehicle.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0007] The curiosity-driven deep reinforcement learning energy management method for hybrid power systems includes the following steps:
[0008] Step 1: Establish a series-parallel hybrid electric vehicle model;
[0009] Step 2: Establish a curiosity-driven A3C agent model;
[0010] Step 3: Set the state, action, and reward of the curiosity-driven A3C agent model to obtain the curiosity-driven A3C agent model.
[0011] Step 4: Establish an Actor and Critic network with the same network structure as the curiosity-driven A3C agent model, obtain the relevant optimal training data set, pre-train the Actor and Critic network separately, and use the relevant parameters of the trained Actor and Critic network to initialize the curiosity-driven A3C agent model to obtain the pre-trained and curiosity-driven A3C agent model;
[0012] Step 5: Obtain relevant training data sets, and train the pre-trained and curiosity-driven A3C proxy model according to the obtained relevant training data sets to fine-tune the pre-trained and curiosity-driven A3C proxy model, thereby obtaining a trained pre-trained and curiosity-driven A3C proxy model;
[0013] Step 6: Use the trained pre-trained and curiosity-driven A3C agent model for energy management of hybrid vehicles.
[0014] In the above steps, the series-parallel hybrid vehicle model in step 1 includes a vehicle dynamics model, a planetary gear model, a motor model, a battery model and an engine model.
[0015] The vehicle dynamics model is shown in the following formula:
[0016]
[0017] Where G is the gravity of the hybrid vehicle, Ff , F w , F i , F a are the rolling resistance, air resistance, slope resistance and acceleration resistance of the car, R is the wheel radius, f is the rolling resistance coefficient, ρ is the air density, A f is the frontal area, v is the longitudinal speed of the car, i is the slope resistance coefficient, m is the mass of the car, and a is the acceleration of the car.
[0018] The planetary gear model is shown in the following formula:
[0019] n g +k·n out =(1+k)·n e
[0020] T g :T out :T e =1:k:-(k+1)
[0021] Among them, n g is the ISG motor speed; k is the planetary gear parameter, that is, the ratio of the number of teeth on the ring gear to the number of teeth on the sun gear; n out is the transmission shaft speed; n e is the engine speed; T g , T e They are ISG motor torque and engine torque respectively.
[0022] The motor model is shown in the following formula:
[0023]
[0024] Among them, P m (t) is the power of the motor, T m (t) is the torque of the motor, n m (t) is the speed of the motor, η m is the efficiency of the motor.
[0025] The battery model is shown in the following formula:
[0026]
[0027] Among them, P batt (t) is the battery power, V oc (t) is the battery open circuit voltage, R in (t) is the internal resistance of the battery, I(t) is the battery current, SOC is the battery state of charge, Q max is the nominal capacity of the battery;
[0028] The engine model is shown in the following formula:
[0029]
[0030] in, is the instantaneous fuel consumption rate of the engine, T e (t) is the engine torque, n e (t) is the engine speed.
[0031] The curiosity-driven A3C agent model described in step 2 includes: There are mainly two types of networks, global neural network and local neural network, which have the same structure, and both contain an Actor network and a Critic network. The global neural network is responsible for obtaining the accumulated gradient calculated by the local neural network to complete the update of the relevant parameters of the neural network, and at the same time pass the updated neural network parameters to the local neural network; the local neural network is responsible for interacting with the environment;
[0032] The state variables in step 3 are: vehicle speed v, vehicle acceleration a, power battery SOC and slope i. The state variable vector is s = {v, a, SOC, i} T ; Since the controlled object is a series-parallel hybrid electric vehicle, the engine torque T is selected e With engine torque n e is the action variable, and the action variable vector is a={T e ,n e} T ; The reward function is composed of the external reward function r e With the internal reward function r i composition, that is, r = r e +r i ; The external reward function is used to evaluate the current state s t Next, perform action a t There are two goals for performance: first, to avoid overcharging or over-discharging of the battery, it is necessary to ensure that the SOC is maintained within a certain range; second, on the basis of ensuring stable operation of the battery, the fuel consumption is minimized to ensure the fuel economy of the engine. In addition, since deep reinforcement learning determines the optimal control strategy based on the maximum cumulative reward optimization, the external reward function is defined as the negative value of the cost function. The reward function is shown in the following formula:
[0033] r=-{fuel(t)+α[SOC ref -SOC(t)] 2}
[0034] Among them, fuel(t) is the fuel consumption of the car at the current moment, SOC ref is the reference value of the expected SOC, SOC(t) is the battery SOC value at the current moment, and α is the weight of battery charging maintenance;
[0035] The internal reward function represents the predicted difference of the state at the next moment. The definition of the internal reward function is as follows:
[0036]
[0037] Among them, φ(s t ) is trained by a convolutional neural network on s t Encode to get; a t is the control variable; θ I is the I neural network parameter;
[0038] In step 4, an Actor and Critic network with the same network structure as the curiosity-driven A3C agent model is established, and the relevant optimal training data set is obtained. The Actor and Critic networks are pre-trained separately, and the curiosity-driven A3C agent model is initialized using the relevant parameters of the trained Actor and Critic networks to obtain the pre-trained and curiosity-driven A3C agent model, which specifically includes the following steps:
[0039] Step I: Establish the Actor and Critic network with the same network structure as the curiosity-driven A3C agent model mentioned above;
[0040] Step II: Obtain relevant historical working conditions and use the DP algorithm to solve and obtain the optimal training data set (s t ,a t ,r t ,s t+1 );
[0041] Step III: In the obtained optimal training data set, the Actor and Critic networks established in Step I are trained separately by using the random sampling method to obtain the trained Actor and Critic networks;
[0042] Step IV: Assign the relevant parameters of the Actor and Critic networks trained in step III to the curiosity-driven A3C agent model for initialization to obtain the pre-trained and curiosity-driven A3C agent model.
[0043] In step 5, a relevant training data set is obtained, and the A3C proxy model based on pre-training and curiosity-driven is trained according to the obtained relevant training data set to achieve fine-tuning of the A3C proxy model based on pre-training and curiosity-driven, and obtain the trained A3C proxy model based on pre-training and curiosity-driven; specifically, the following steps are included:
[0044] Step A: The initialized A3C agent model based on pre-training and curiosity-driven interacts with the controlled object (hybrid vehicle) in real time to obtain the relevant training data set (s t ,a t ,r t ,s t+1 );
[0045] Step B: training the pre-trained and curiosity-driven A3C proxy model according to the obtained relevant training data set, fine-tuning the pre-trained and curiosity-driven A3C proxy model, and obtaining a trained pre-trained and curiosity-driven A3C proxy model.
[0046] The above step A specifically includes: the Actor network and Critic network parameters in the global neural network are represented by θ and ω respectively; the Actor network and Critic network parameters in the local neural network are represented by θ′ and ω′ respectively, and the accumulated gradients dθ←0 and dω←0; the initialized pre-trained and curiosity-driven A3C agent model interacts with the controlled object (hybrid electric vehicle) in real time to obtain a training data set Specifically, the local neural network interacts with the environment individually, that is, the current state set s t ={v,a,SOC,i} T Input the local neural network, according to the current strategy π(a t |s t ;θ′) get action a t , the current action a t Acting on the hybrid vehicle to get the current return r t And the state set s at the next moment t+1 ; Finally, according to the above relevant data t , a t , r t and t+1 , get the training data set (s t ,a t ,r t ,s t+1 ) for the subsequent neural network training process;
[0047] In the above step B, the A3C proxy model based on pre-training and curiosity-driven is trained according to the obtained relevant training data set to achieve fine-tuning of the A3C proxy model based on pre-training and curiosity-driven, and obtain the trained A3C proxy model based on pre-training and curiosity-driven, which specifically includes the following steps:
[0048] Step ①: When the number of running steps reaches the maximum number of steps or when the current state of the vehicle reaches the final state, the reverse sampling method is used to sample in reverse order and the action value at each sampling moment is calculated;
[0049] Step ②: The loss of the Critic neural network is calculated using the gradient descent method. The loss calculation formula is:
[0050]
[0051] Step 3: The loss calculation of the Actor neural network uses the gradient ascent method. At the same time, the entropy value of the strategy π is added to the loss function to achieve better exploration and prevent falling into the local optimal solution. The gradient of the entire objective function includes the entropy regularization term related to the strategy parameters. The formula used is:
[0052]
[0053] Step ④: According to the gradients obtained at a single sampling time in the above steps, the accumulated gradient values dθ and dω in a certain time period are accumulated and the global neural network parameters are updated according to the accumulated gradient values dθ and dω. Then the parameters of the global neural network are passed to the local neural network, i.e., θ′=θ and ω′=ω, and the accumulated gradients are set to 0, i.e., dθ←0 and dω←0, so as to carry out the next environmental interaction.
[0054] Step 5: Repeat steps 1 to 4 until the training requirements are met, and finally obtain the trained A3C agent model based on pre-training and curiosity-driven.
[0055] In step 6 above, the trained pre-trained and curiosity-driven A3C agent model is used to perform energy management of a parallel hybrid vehicle, specifically including the following steps:
[0056] Step 1: Obtain the current state quantity set s of the car through relevant sensors t ={v,a,SOC,i} T ;
[0057] Step 2: Get the current state set s of the car t ={v,a,SOC,i} T Input the trained A3C agent model based on pre-training and curiosity-driven, and then output the control variable engine torque T e and engine torque n e ;
[0058] Step 3: The obtained control variable engine torque T e and engine torque n eAct on the car, drive the car to move, and then get the car state set s at the next moment t+1 ={v,a,SOC,i} T ;
[0059] Step 4: Repeat steps 1 to 3 until the car completes the driving task.
[0060] The hybrid power system energy management method based on the pre-trained and curiosity-driven A3C algorithm described above is theoretically data-driven and model-free, is generally insensitive to any specific topology of the hybrid power system, and is applied to a series-parallel hybrid power system.
[0061] Beneficial effect: The present invention provides a curiosity-driven hybrid power system deep reinforcement learning energy management method. First, a curiosity-driven A3C agent model is established; second, the state, action and reward of the curiosity-driven A3C agent model are set to obtain the curiosity-driven A3C agent model after setting; then, an Actor and Critic network with the same network structure as the curiosity-driven A3C agent model is established, and the relevant optimal training data set is obtained at the same time, the Actor and Critic network are pre-trained separately, and the trained Actor and Critic network are used to train the energy management method of the hybrid power system. The relevant parameters of the network are used to initialize the curiosity-driven A3C proxy model to obtain the pre-trained and curiosity-driven A3C proxy model; secondly, the relevant training data set is obtained, and the pre-trained and curiosity-driven A3C proxy model is trained according to the obtained relevant training data set to achieve fine-tuning of the pre-trained and curiosity-driven A3C proxy model, and the trained pre-trained and curiosity-driven A3C proxy model is obtained. Finally, the trained pre-trained and curiosity-driven A3C proxy model is used to perform energy management of a hybrid vehicle to obtain a better control effect. The method of the present invention can effectively solve the problem of insufficient exploration in the A3C method. Similarly, the pre-training method can make the neural network converge quickly, effectively improve the control effect of the energy management strategy and the rapidity of the algorithm, improve the robustness of the energy management algorithm and the adaptability to the working conditions, and further improve the fuel economy of the vehicle. The method of the present invention can not only solve the problem of insufficient exploration of the A3C algorithm, but also solve the problem of slow training speed of the A3C algorithm. On the premise of ensuring the power of the vehicle, on the basis of obtaining higher fuel economy, the rapid convergence of the neural network is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a structural diagram of a series-parallel hybrid electric vehicle provided in an embodiment of the present invention;
[0063] Figure 2is a schematic diagram of the training and application process of the hybrid vehicle energy management method based on pre-training and curiosity-driven A3C provided in an embodiment of the present invention;
[0064] Figure 3 It is a flow chart of a hybrid vehicle energy management design method based on pre-training and curiosity-driven A3C provided in an embodiment of the present invention;
[0065] Figure 4 is an average cumulative reward graph of different energy management strategies provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments:
[0067] like Figure 1 As shown, according to the structural diagram, it can be seen that the parallel-parallel hybrid electric vehicle includes a battery, a motor, an engine, a generator, a main reducer and an energy management system controller.
[0068] like Figure 2 As shown in FIG, a schematic diagram of the training and application process of the curiosity-driven hybrid system deep reinforcement learning energy management method is shown. The basic working principle is: first, the relevant optimal training set (s, a, r, s′) is solved according to the DP algorithm, and the Actor network is trained separately by the imitation learning method. At the same time, the Critic network is trained separately by the TD error minimum method. After the training, the relevant parameters of the Actor network and the Critic network are initialized for the curiosity-based A3C algorithm. Subsequently, the parameters affecting energy management are obtained through relevant sensors, which are the driving state of the car. The relevant state quantities are obtained, which are the car speed v, the car acceleration a, the power battery SOC and the slope i, which constitute the state variable vector s at the current moment. t ={v,a,SOC,i} T , and then the state variable vector s t ={v,a,SOC,i} T Input to PC-A3C agent, then PC-A3C agent outputs control signal, and the control amount a t Acting on the hybrid vehicle, the state variable vector s at the next moment is obtained t+1 ={v,a,SOC,i} T and the current reward r t According to the above relevant data t , a t , r t and t+1 , get the training data set (s t ,a t ,rt ,s t+1 ), the training data set (s t ,a t ,r t ,s t+1 ) is stored in the local buffer area. When the termination condition is reached, samples are taken from the local buffer area in reverse order, the cumulative gradient is calculated, and the global neural network updates the parameters. At this moment, the local neural network parameters remain unchanged. After the global neural network parameters are updated, the local neural network synchronizes the parameters of the global neural network to guide the subsequent environmental interaction process until the training goal is achieved and the training is terminated, that is, the optimal control strategy is obtained for the driving of the hybrid vehicle.
[0069] Figure 3 It is a flow chart of a hybrid vehicle energy management design method based on pre-training and curiosity-driven A3C provided in an embodiment of the present invention. According to the flow chart, the design of the hybrid vehicle energy management structure system based on pre-training and curiosity-driven A3C is completed.
[0070] like Figure 3 As shown, a hybrid vehicle energy management design method based on pre-training and curiosity-driven A3C includes the following steps:
[0071] Step 201, establishing a series-parallel hybrid electric vehicle model, which includes a vehicle dynamics model, a planetary gear model, a motor model, a battery model and an engine model;
[0072] The vehicle dynamics model is shown in the following formula:
[0073]
[0074] Where G is the gravity of the hybrid vehicle, F f , F w , F i , F a are the rolling resistance, air resistance, slope resistance and acceleration resistance of the car, R is the wheel radius, f is the rolling resistance coefficient, ρ is the air density, A f is the frontal area, v is the longitudinal speed of the car, i is the slope resistance coefficient, m is the mass of the car, and a is the acceleration of the car.
[0075] The planetary gear model is shown in the following formula:
[0076] n g +k·n out =(1+k)·n e
[0077] T g :T out :Te =1:k:-(k+1)
[0078] Among them, n g is the ISG motor speed; k is the planetary gear parameter, that is, the ratio of the number of teeth on the ring gear to the number of teeth on the sun gear; n out is the transmission shaft speed; n e is the engine speed; T g , T e They are ISG motor torque and engine torque respectively.
[0079] The motor model is shown in the following formula:
[0080]
[0081] Among them, P m (t) is the power of the motor, T m (t) is the torque of the motor, n m (t) is the speed of the motor, η m is the efficiency of the motor.
[0082] The battery model is shown in the following formula:
[0083]
[0084] Among them, P batt (t) is the battery power, V oc (t) is the battery open circuit voltage, R in (t) is the internal resistance of the battery, I(t) is the battery current, SOC is the battery state of charge, Q max is the nominal capacity of the battery.
[0085] The engine model is shown in the following formula:
[0086]
[0087] in, is the instantaneous fuel consumption rate of the engine, T e (t) is the engine torque, n e (t) is the engine speed.
[0088] Step 202, establish a curiosity-driven A3C agent model, wherein the curiosity-driven A3C agent model includes two neural networks, namely a global neural network and a local neural network, both of which have the same neural network structure, and both contain an Actor network and a Critic network. Its working process: Each local neural network will independently interact with the environment to obtain experience data, and these threads do not interfere with each other and run independently; the local neural network interacts with the environment and calculates the cumulative loss gradient, and passes the cumulative loss gradient to the global neural network. The global neural network updates the global neural network parameters according to the cumulative gradient, and then, after the global neural network parameters are updated, the local neural network synchronizes the parameters of the global neural network;
[0089] Step 203 sets the state, action and return of the A3C proxy model to obtain the set A3C proxy model.
[0090] When setting the state, action and reward of the A3C agent model, the set A3C agent model is obtained, including: vehicle speed v, vehicle acceleration a, power battery SOC and slope i, and the state variable vector is s = {v, a, SOC, i} T ; Since the controlled object is a series-parallel hybrid electric vehicle, the engine torque T is selected e With engine torque n e is the action variable, and the action variable vector is a={T e ,n e} T ; The reward function is composed of the external reward function r e With the internal reward function r i composition, that is, r = r e +r i ; The external reward function is used to evaluate the current state s t Next, perform action a t There are two goals for performance: first, to avoid overcharging or over-discharging of the battery, it is necessary to ensure that the SOC is maintained within a certain range; second, on the basis of ensuring stable operation of the battery, the fuel consumption is minimized to ensure the fuel economy of the engine. In addition, since deep reinforcement learning determines the optimal control strategy based on the maximum cumulative reward optimization, the external reward function is defined as the negative value of the cost function. The reward function is shown in the following formula:
[0091] r=-{fuel(t)+α[SOC ref -SOC(t)] 2}
[0092] Among them, fuel(t) is the fuel consumption of the car at the current moment, SOC refis the reference value of the expected SOC, SOC(t) is the battery SOC value at the current moment, and α is the weight of battery charging maintenance;
[0093] The internal reward function represents the predicted difference of the state at the next moment. The definition of the internal reward function is as follows:
[0094]
[0095] Among them, φ(s t ) is trained by a convolutional neural network on s t Encode to get; a t is the control variable; θ I is the neural network parameter.
[0096] Step 204: establish an Actor and Critic network with the same network structure as the curiosity-driven A3C agent model, obtain relevant optimal training data sets, pre-train the Actor and Critic networks separately, and use the relevant parameters of the trained Actor and Critic networks to initialize the curiosity-driven A3C agent model, and obtain the initialized pre-trained and curiosity-driven A3C agent model.
[0097] When obtaining the relevant optimal training data set and pre-training the constructed model, the following steps are specifically included:
[0098] Step I: Establish the Actor and Critic network with the same network structure as the curiosity-driven A3C agent model mentioned above;
[0099] Step II: Obtain relevant historical working conditions and use the DP algorithm to solve and obtain the optimal training data set (s t ,a t ,r t ,s t+1 );
[0100] Step III: In the obtained optimal training data set, the Actor and Critic networks established in Step I are trained separately by using the random sampling method to obtain the trained Actor and Critic networks;
[0101] Step IV: Assign the relevant parameters of the Actor and Critic networks trained in Step III to the curiosity-driven A3C agent model for initialization to obtain the pre-trained and curiosity-driven A3C agent model.
[0102] Step 205, obtaining a relevant training data set, training the A3C proxy model based on pre-training and curiosity-driven according to the obtained relevant training data set, fine-tuning the A3C proxy model based on pre-training and curiosity-driven, and obtaining a trained A3C proxy model based on pre-training and curiosity-driven
[0103] The implementation of the above step 205 specifically includes the following steps:
[0104] Step A: The initialized A3C agent model based on pre-training and curiosity-driven interacts with the controlled object (hybrid vehicle) in real time to obtain the relevant training data set (s t ,a t ,r t ,s t+1 );
[0105] Step B: training the pre-trained and curiosity-driven A3C proxy model according to the obtained relevant training data set, fine-tuning the pre-trained and curiosity-driven A3C proxy model, and obtaining a trained pre-trained and curiosity-driven A3C proxy model.
[0106] In step A of the above step 205, the initialized A3C agent model based on pre-training and curiosity-driven interacts with the controlled object (hybrid vehicle) in real time to obtain a relevant training data set (s t ,a t ,r t ,s t+1 ), specifically including: the Actor network and Critic network parameters in the global neural network are represented by θ and ω respectively; the Actor network and Critic network parameters in the local neural network are represented by θ′ and ω′ respectively, and the accumulated gradients dθ←0 and dω←0; the initialized pre-trained and curiosity-driven A3C agent model interacts with the controlled object (hybrid electric vehicle) in real time to obtain the training data set (s t ,a t ,r t ,s t+1 ), specifically including: the local neural network interacts with the environment alone, the process is: the current state set s t ={v,a,SOC,i} T Input the local neural network, according to the current strategy π(a t |s t ;θ′) get action a t , the current action a t Acting on the hybrid vehicle to get the current return r t And the state set s at the next moment t+1; Finally, according to the above relevant data t , a t , r t and t+1 , get the training data set (s t ,a t ,r t ,s t+1 ) for the subsequent neural network training process.
[0107] The step of training the pre-trained and curiosity-driven A3C proxy model according to the obtained relevant training data set in step B of step 205 above to fine-tune the pre-trained and curiosity-driven A3C proxy model to obtain the trained pre-trained and curiosity-driven A3C proxy model specifically includes:
[0108] Step ①: When the number of running steps reaches the maximum number of steps or when the current state of the vehicle reaches the final state, the reverse sampling method is used to sample in reverse order and the action value at each sampling moment is calculated;
[0109] Step ②: The loss of the Critic neural network is calculated using the gradient descent method. The loss calculation formula is:
[0110]
[0111] Step 3: The loss calculation of the Actor neural network uses the gradient ascent method. At the same time, the entropy value of the strategy π is added to the loss function to achieve better exploration and prevent falling into the local optimal solution. The gradient of the entire objective function includes the entropy regularization term related to the strategy parameters. The formula used is:
[0112]
[0113] Step ④: According to the gradient obtained at a single sampling time in the above steps, accumulate it to obtain the cumulative gradient values dθ and dω in a certain time period, and complete the update of the global neural network parameters according to the obtained cumulative gradient values dθ and dω. Then, the parameters of the global neural network are passed to the local neural network, that is, θ′=θ and ω′=ω, and the cumulative gradient is set to 0, that is, dθ←0 and dω←0, so as to carry out the next environmental interaction.
[0114] Step 5: Repeat steps 1 to 4 until the training requirements are met, and finally obtain the trained A3C agent model based on pre-training and curiosity-driven.
[0115] Step 206, using the trained pre-trained and curiosity-driven A3C agent model to perform energy management of the hybrid vehicle, specifically includes the following steps:
[0116] Step 1: Obtain the current state quantity set s of the car through relevant sensors t ={v,a,SOC,i} T ;
[0117] Step 2: Get the current state set s of the car t ={v,a,SOC,i} T Input the trained A3C agent model based on pre-training and curiosity-driven, and output the control variable engine torque T according to the relevant control strategy. e and engine torque n e ;
[0118] Step 3: The obtained control variable engine torque T e and engine torque n e Act on the car, drive the car to move, and then get the car state set s at the next moment t+1 ={v,a,SOC,i} T ;
[0119] Step 4: Repeat steps 1 to 3 until the car completes the driving task.
[0120] Figure 4 : is the average cumulative reward graph of different energy management strategies provided in the embodiment of the present invention. According to the result graph, it can be seen that the three different energy management strategies are: the energy management strategy based on A3C (A3C), the energy management strategy based on curiosity driven A3C (C-A3C) and the A3C based on pretraining and curiosity driven (PC-A3C); on the basis of ensuring the consistency of terminal SOC, the average cumulative reward graphs of different energy management strategies are as follows: Figure 4 As shown, it can be seen from the figure that the number of convergence rounds of A3C and C-A3C is close, but because C-A3C adds a curiosity exploration mechanism, the average cumulative reward will be higher than A3C when converging, so better control performance can be obtained; PC-A3C has a significantly reduced number of convergence rounds compared to the other two control strategies, so PC-A3C can achieve faster convergence, so it can be better for practical application, and at the same time, the average cumulative reward of PC-A3C during convergence is higher than that of traditional A3C, and is close to that of C-A3C, so it can be explained that the control effect of PC-A3C can achieve faster convergence speed on the basis of achieving lower fuel consumption. Therefore, the method of the present invention can effectively improve the control effect of the energy management strategy and the rapidity of the algorithm, improve the robustness of the energy management algorithm and its adaptability to working conditions, and further improve the fuel economy of the vehicle.
[0121] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0122] The above are only preferred embodiments of the present invention. It is obvious that those familiar with the technology in the field can easily make various modifications to these embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments. Improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the protection scope of the present invention.
Claims
1. Curiosity-driven deep reinforcement learning energy management method for hybrid power systems, characterized by: The following steps are involved: Step 1: Establish a series-parallel hybrid electric vehicle model; Step 2: Establish a curiosity-driven A3C agent model; Step 3: Set the state, action, and reward of the curiosity-driven A3C agent model to obtain the curiosity-driven A3C agent model. Step 4: Establish an Actor and Critic network with the same network structure as the curiosity-driven A3C agent model, obtain the relevant optimal training data set, pre-train the Actor and Critic network separately, and use the relevant parameters of the trained Actor and Critic network to initialize the curiosity-driven A3C agent model to obtain the pre-trained and curiosity-driven A3C agent model; Step 5: Obtain relevant training data sets, and train the pre-trained and curiosity-driven A3C proxy model according to the obtained relevant training data sets to fine-tune the pre-trained and curiosity-driven A3C proxy model, thereby obtaining a trained pre-trained and curiosity-driven A3C proxy model; Step 6: Use the trained pre-trained and curiosity-driven A3C agent model for energy management of hybrid vehicles.
2. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 1, characterized in that: The series-parallel hybrid electric vehicle model in step 1 includes a vehicle dynamics model, a planetary gear model, a motor model, a battery model and an engine model; The vehicle dynamics model is shown in the following formula: Where G is the gravity of the hybrid vehicle, F f , F w , F i , F a are the rolling resistance, air resistance, slope resistance and acceleration resistance of the car, R is the wheel radius, f is the rolling resistance coefficient, ρ is the air density, A f is the frontal area, v is the longitudinal speed of the car, i is the slope resistance coefficient, m is the mass of the car, and a is the acceleration of the car; The planetary gear model is shown in the following formula: n g +k·n out =(1+k)·n e T g :T out :T e =1:k:-(k+1) Among them, n g is the ISG motor speed; k is the planetary gear parameter, that is, the ratio of the number of teeth on the ring gear to the number of teeth on the sun gear; n out is the transmission shaft speed; n e is the engine speed; T g , T e They are ISG motor torque and engine torque; The motor model is shown in the following formula: Among them, P m (t) is the power of the motor, T m (t) is the torque of the motor, n m (t) is the speed of the motor, η m is the efficiency of the motor; The battery model is shown in the following formula: Among them, P batt (t) is the battery power, V oc (t) is the battery open circuit voltage, R in (t) is the internal resistance of the battery, I(t) is the battery current, SOC is the battery state of charge, Q max is the nominal capacity of the battery; The engine model is shown in the following formula: in, is the instantaneous fuel consumption rate of the engine, T e (t) is the engine torque, n e (t) is the engine speed.
3. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 1, characterized in that: The curiosity-driven A3C agent model described in step 2 includes: a global neural network and a local neural network; the global neural network and the local neural network have the same structure, both including an Actor network and a Critic network.
4. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 1, characterized in that: The state variables of the curiosity-driven A3C agent model described in step 3 are: vehicle speed v, vehicle acceleration a, power battery SOC and slope i. The state variable vector is s = {v, a, SOC, i} T ; The action variable is the engine torque T e With engine torque n e , the action variable vector is a={T e ,n e } T ; The reward function is composed of the external reward function r e With the internal reward function r i composition, that is, r = r e +r i .
5. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 4, characterized in that: The external reward function is defined as the negative value of the cost function, and the reward function is shown as follows: r=-{fuel(t)+α[SOC ref -SOC(t)] 2 } Among them, fuel(t) is the fuel consumption of the car at the current moment, SOC ref is the reference value of the expected SOC, SOC(t) is the battery SOC value at the current moment, and α is the weight of battery charging maintenance; The internal reward function is expressed as the predicted difference of the state at the next moment. The definition of the internal reward function is as follows: Among them, φ(s t ) is trained by a convolutional neural network on s t Encode to get; a t is the control variable; θ I is the neural network parameter.
6. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step I: Establish the Actor and Critic network with the same network structure as the curiosity-driven A3C agent model mentioned above; Step II: Obtain relevant historical working conditions and use the DP algorithm to solve and obtain the optimal training data set (s t ,a t ,r t ,s t+1 ), s t is the state variable vector at the current moment, a t is the current acceleration, r t is the current moment reward, s t+1 is the state variable vector at the next moment; Step III: In the obtained optimal training data set, the Actor and Critic networks established in Step I are trained separately by using the random sampling method to obtain the trained Actor and Critic networks; Step IV: Assign the relevant parameters of the Actor and Critic networks trained in step III to the curiosity-driven A3C agent model for initialization to obtain the pre-trained and curiosity-driven A3C agent model.
7. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 1, characterized in that: Step 5 specifically includes the following steps: Step A: The initialized A3C agent model based on pre-training and curiosity-driven interacts with the controlled object in real time to obtain the relevant training data set (s t ,a t ,r t ,s t+1 ), s t is the state variable vector at the current moment, a t is the current acceleration, r t is the current moment reward, s t+1 is the state variable vector at the next moment; Step B: training the pre-trained and curiosity-driven A3C proxy model according to the obtained relevant training data set, fine-tuning the pre-trained and curiosity-driven A3C proxy model, and obtaining a trained pre-trained and curiosity-driven A3C proxy model.
8. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 7, characterized in that: Step A specifically includes: the parameters of the Actor network and the Critic network in the global neural network are represented by θ and ω respectively; the parameters of the Actor network and the Critic network in the local neural network are represented by θ′ and ω′ respectively, and the accumulated gradients dθ←0 and dω←0 are accumulated; the initialized pre-trained and curiosity-driven A3C agent model interacts with the controlled object in real time to obtain a training data set (s t ,a t ,r t ,s t+1 ), specifically including: the local neural network interacts with the environment alone, the process is: the current state set s t ={v,a,SOC,i} T Input local neural network, where v is the vehicle speed, a is the vehicle acceleration, SOC is the battery state of charge, and i is the slope. According to the current strategy π(a t |s t ;θ′) get action a t , the current action a t Acting on the hybrid vehicle to get the current return r t And the state set s at the next moment t+1 ; Finally, according to the above relevant data t , a t , r t and t+1 , get the training data set (s t ,a t ,r t ,s t+1 ) for the subsequent neural network training process; Step B specifically includes the following steps: Step ①: When the number of running steps reaches the maximum number of steps or when the current state of the vehicle reaches the final state, the reverse sampling method is used to sample in reverse order and the action value at each sampling moment is calculated; Step ②: The loss of the Critic neural network is calculated using the gradient descent method. The loss calculation formula is: Step 3: The loss calculation of the Actor neural network uses the gradient ascent method. At the same time, the entropy value of the strategy π is added to the loss function to achieve better exploration and prevent falling into the local optimal solution. The gradient of the entire objective function includes the entropy regularization term related to the strategy parameters. The formula used is: Where π(a t |s t ; θ') is the current strategy Step ④: According to the gradients obtained at a single sampling time in the above steps, the accumulated gradient values dθ and dω in a certain time period are accumulated and the global neural network parameters are updated according to the accumulated gradient values dθ and dω. Then the parameters of the global neural network are passed to the local neural network, i.e., θ′=θ and ω′=ω, and the accumulated gradients are set to 0, i.e., dθ←0 and dω←0, so as to carry out the next environmental interaction. Step 5: Repeat steps 1 to 4 until the training requirements are met, and finally obtain the trained A3C agent model based on pre-training and curiosity-driven.
9. The curiosity-driven hybrid power system deep reinforcement learning energy management method according to claim 1, characterized in that: In step 6, the trained A3C agent model based on pre-training and curiosity-driven is used to manage the energy of parallel hybrid vehicles. The following steps are involved: Step 1: Obtain the current state quantity set s of the car through relevant sensors t ={v,a,SOC,i} T , where v is the vehicle speed, a is the vehicle acceleration, SOC is the battery state of charge, and i is the slope; Step 2: Get the current state set s of the car t ={v,a,SOC,i} T Input the trained A3C agent model based on pre-training and curiosity-driven, and then output the control variable engine torque T e and engine torque n e ; Step 3: The obtained control variable engine torque T e and engine torque n e Act on the car, drive the car to move, and then get the car state set s at the next moment t+1 ={v,a,SOC,i} T ; Step 4: Repeat steps 1 to 3 until the car completes the driving task.
10. The curiosity-driven hybrid power system deep reinforcement learning energy management method described in any one of claims 1-9 is theoretically data-driven and model-free, insensitive to any specific topology of the hybrid power system, and is applied to a series-parallel hybrid power system.
Citation Information
Patent Citations
Intelligent variable time domain model prediction energy management method for hybrid power vehicle
CN111267831A
HEV energy management method based on deep reinforcement learning A3C algorithm
CN111731303A
