Disclosure of Invention
Therefore, the invention aims to provide the battery temperature control method for the electric automobile based on the self-adaptive dynamic programming, which not only ensures that the battery temperature is reduced to be within a reasonable range, but also reduces the energy consumption of a thermal management system.
In order to achieve the above purpose, the present invention provides the following technical solutions:
an electric automobile battery temperature control method based on self-adaptive dynamic programming comprises the following steps:
step one, establishing a control-oriented electric automobile battery thermal management system model
Respectively establishing a battery model, a refrigerant cooling model and a battery electric heating coupling model, and outputting the battery temperature and the battery state of charge (SOC) according to the battery electric heating coupling model;
establishing a global optimization problem of electric vehicle battery thermal management
21 Establishing a dynamic programming mathematical model and determining constraint conditions of the optimization problem;
22 Discretizing the driving working condition, the state variable and the decision variable respectively to obtain a state variable set of any stage;
23 Inverse solving the optimal objective function and corresponding decision variables of each stage;
24 Given an initial state variable, forward solving a global optimal solution;
Step three, establishing an online thermal management optimization controller
31 Constructing an optimal thermal management policy dataset under a variety of conditions
Aiming at different driving working conditions, an optimal thermal management strategy data set is constructed by an optimal decision sequence and an optimal state quantity sequence based on a dynamic programming optimization problem of thermal management of the battery of the electric automobile and obtained by the control variable;
32 Training neural networks
And training the neural network by using the constructed optimal thermal management strategy data set, and constructing to obtain the online thermal management optimal controller.
Further, in the first step, in the refrigerant cooling model, heat transferred from the refrigerant to the battery packExpressed as:
mr=λVcηcncρc/60
Wherein C r is the heat capacity of the refrigerant, m r is the flow of the refrigerant flowing in the battery loop, h n,in is the inlet enthalpy of the battery cold plate, h h,out is the outlet enthalpy of the battery cold plate, lambda is the opening degree of the electronic expansion valve of the battery loop, V c is the displacement of the compressor, eta c is the volumetric efficiency of the compressor, n c is the rotating speed of the compressor, and rho c is the density of the refrigerant.
Further, in the first step, in the battery model, the charge-discharge state SOC is expressed as:
wherein U oc is the external voltage, P bat is the battery power, P hp is the thermal management system energy consumption, R bat is the internal resistance, and C bat is the total battery charge.
In the first step, in the electrothermal coupling model of the battery, the influence of heat generated and radiated by the refrigerant flowing around the battery module on the temperature of the battery is obtained to obtain a thermodynamic equilibrium equation of the electrothermal coupling model of the battery:
Wherein m bat is the battery mass, C bat is the total battery charge; T bat is the temperature of the battery; Heat generated inside the battery pack; is the heat transferred to the battery pack by the refrigerant, I bat is the charge-discharge current, R bat is the internal resistance, and U oc is the external voltage.
Further, in the step 21), the dynamic programming mathematical model is constructed to meet the condition of the system terminal, that the battery thermal management accumulated energy consumption is within the minimum global time range:
J*=minJ=min{∑L(x(k),u(k))}
L(x(k),u(k))=ω1Php+ω2|Tbat―T* bat|
Wherein J * is an optimal objective function, J is an objective function, omega 1 and omega 2 are weight coefficients, P hp is energy consumption of a thermal management system, and T bat is battery temperature; is a battery target temperature, x (k) and u (k) are a state variable and a control variable, respectively, and:
constraint conditions of the optimization problem are as follows:
Wherein Q bc_max is the maximum refrigerating capacity allocated to the battery loop by the air conditioning system, SOC min and SOC max are the lower limit and the upper limit of the battery SOC, and T bat_min and T bat_max are the lower limit and the upper limit of the battery temperature.
Further, in the step 22), the running condition is discretized into N stages according to time, the battery temperature T bat and the battery state of charge SOC in the state variables are discretized respectively, and the number of the discretized grids is a and b respectively, and the state variable set of any k stages is:
Wherein X k represents the state variable set of the kth stage; representing a state variable at the kth stage, T bat_i representing the battery temperature at the ith grid point, and SOC j representing the battery state of charge at the jth grid point.
Further, in the step 23), the inverse solution of the optimal objective function of each stage is started from the N-1 stage;
when k=n-1 phase, the objective function is:
When k e [1,., N-2 ] phase, the objective function is:
wherein F (·) is the state transfer function.
Further, in the step 24), the method for forward solving the global optimal solution is as follows:
When k=1, according to the result obtained by inverse solution, finding a decision variable u (1) of the initial state, enabling the decision variable u to act on the state variable, and calculating the battery temperature T bat and the battery state of charge SOC of the next stage by using a state transition equation;
When the k epsilon [ 2. ], N-1 ] stage, searching the optimal decision variable corresponding to the current stage according to the state variable T bat (k) and the SOC (k) of the current stage obtained by calculation of the previous stage, if the searched optimal decision variable is not the state variable of the current stage, obtaining the optimal decision variable u (k) of the current stage by adopting an interpolation method, gradually recursively estimating to the final stage to obtain an optimal control sequence { u *(1),u*(2),...,u* (k) } and an optimal state quantity sequence { x *(1),x*(2),...,x* (k) }, namely the optimal battery temperature track And an optimal battery state trajectory SOC *.
Further, with the battery temperature T bat and the battery state of charge SOC as state variables and the battery circuit cooling capacity Q bc (k) as control variables, the state transition equation is obtained as follows:
Wherein U oc is external voltage, P bat represents battery power, P hp represents energy consumption of a thermal management system, the energy is obtained by table lookup of values of a vehicle speed v and a battery loop refrigerating capacity Q bc, R bat is internal resistance, and C bat is total battery charge; Heat generated inside the battery pack; is the heat transferred to the battery by the refrigerant, m bat is the battery mass, C bat is the total charge of the battery, and T bat is the battery temperature.
The invention has the beneficial effects that:
Compared with a temperature control strategy based on a rule, the temperature control method for the electric automobile battery based on the self-adaptive dynamic programming improves the economical efficiency of a battery thermal management system, and compared with a temperature control strategy based on a dynamic programming algorithm, the temperature control method for the electric automobile battery based on the self-adaptive dynamic programming solves the defect of lack of real-time, and by designing a controller based on a neural network and the dynamic programming to adjust the refrigerating capacity of a battery loop, the characteristics of battery and heat coupling are utilized, so that the temperature requirement and energy-saving requirement of the battery can be met, the temperature of the battery is reduced to a reasonable range, and the energy consumption of a thermal management system is reduced.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and specific examples, which are not intended to limit the invention, so that those skilled in the art may better understand the invention and practice it.
As shown in fig. 1, the method for controlling the battery temperature of the electric vehicle based on the adaptive dynamic programming in this embodiment includes the following steps.
Step one, establishing a control-oriented electric automobile battery thermal management system model
As shown in fig. 2, the electric vehicle battery thermal management system includes a battery thermal management system for supplying a refrigerant to a battery, the battery thermal management system including a condenser, an evaporator, a compressor, an expansion valve, and the like. In this embodiment, when the control-oriented electric vehicle battery thermal management system model is established, it is necessary to respectively establish a battery model, a refrigerant cooling model and a battery electrothermal coupling model, and output the battery temperature and the battery state of charge SOC according to the battery electrothermal coupling model.
(1) Refrigerant cooling model
As shown in fig. 3, the steady-state model of the air conditioning system and the operating point cloud chart are shown. Specifically, in the refrigerant cooling model, the refrigerant flow rate m r flowing into the battery circuit is:
mr=λVcηcncρc/60
Heat transferred from the refrigerant to the battery pack Expressed as:
Wherein C r is the heat capacity of the refrigerant, m r is the flow of the refrigerant flowing in the battery loop, h n,in is the inlet enthalpy of the battery cold plate, h h,out is the outlet enthalpy of the battery cold plate, lambda is the opening degree of the electronic expansion valve of the battery loop, V c is the displacement of the compressor, eta c is the volumetric efficiency of the compressor, eta c is the rotating speed of the compressor, and rho c is the density of the refrigerant.
(2) Battery model
As shown in fig. 4, a battery SOC graph is shown. Specifically, in the battery model, the equivalent circuit model is composed of an external voltage U oc and an internal resistance R bat, where the charge-discharge current I bat is expressed as:
Ibat=Pbat/Ubat
Wherein I bat is charge-discharge current, P bat is battery power, U bat is external voltage;
The battery power P bat is expressed as:
Pbat=Pmot+Php
Wherein P mot is motor power, P hp is thermal management system energy consumption;
The external voltage U bat is expressed as:
Ubat=Uoc―IbatRbat
wherein the external voltages U oc and R bat are affected by the battery temperature and SOC, and their values can be obtained through off-line testing, i.e. the actual values of U oc and R bat are obtained through table look-up interpolation.
In summary, the charge-discharge current I bat can be expressed as:
the charge-discharge state SOC is expressed as:
the charge-discharge state SOC can be obtained as:
wherein U oc is the external voltage, P bat is the battery power, P hp is the thermal management system energy consumption, R bat is the internal resistance, and C bat is the total battery charge.
(3) Electric heating coupling model of battery
In the electric heating coupling model of the battery, the heat generated in the battery pack isThe method comprises the following steps:
the influence of heat generated and radiated by the refrigerant flowing around the battery module on the battery temperature can be obtained to obtain a thermodynamic equilibrium equation of the battery electrothermal coupling model:
Wherein m bat is the battery mass, C bat is the total battery charge; T bat is the temperature of the battery; Heat generated inside the battery pack; is the heat transferred to the battery pack by the refrigerant, I bat is the charge-discharge current, R bat is the internal resistance, and U oc is the external voltage.
And secondly, establishing a global optimization problem of electric vehicle battery thermal management. Selecting a proper control input quantity, establishing a thermal management optimization problem, and determining the state quantity and control quantity constraint of the optimization problem;
21 A dynamic programming mathematical model is established, and constraint conditions of the optimization problem are determined.
In this embodiment, the dynamic programming mathematical model is constructed to satisfy the accumulated energy consumption of battery thermal management within the minimum global time range under the constraint condition of the system terminal:
J*=min J=min{∑L(x(k),u(k))}
L(x(k),u(k))=ω1Php+ω2|Tbat―T* bat|
Wherein J * is an optimal objective function, J is an objective function, omega 1 and omega 2 are weight coefficients, P hp is energy consumption of a thermal management system, and T bat is battery temperature; is a battery target temperature, x (k) and u (k) are a state variable and a control variable, respectively, and:
constraint conditions of the optimization problem are as follows:
Wherein Q bc_max is the maximum refrigerating capacity allocated to the battery loop by the air conditioning system, SOC min and SOC max are the lower limit and the upper limit of the battery SOC, and T bat_min and T bat_max are the lower limit and the upper limit of the battery temperature.
22 Discretizing the driving working condition, the state variable and the decision variable respectively to obtain a state variable set of any stage.
Specifically, the driving condition is discretely processed into N stages in time, for example, the time interval of the discrete processing is defined to be 1 second, and at this time, N stages are generated by one driving condition with N seconds. And discretizing the battery temperature T bat and the battery state of charge SOC in the state variables, wherein the number of discretized grids is a and b respectively. Thus, a grid of N x a x b time-varying state variables is formed. The state variable set for any k phases is:
Wherein X k represents the state variable set of the kth stage; representing a state variable at the kth stage, T bat_i representing the battery temperature at the ith grid point, and SOC j representing the battery state of charge at the jth grid point.
In the embodiment, the state quantity and the control quantity are divided into grids, the state quantity of the electric automobile battery SOC is increased from 0 to 100, the grid quantity is 100, the state quantity of the electric automobile battery temperature T bat is increased from 32 ℃ to 36 ℃, the grid quantity is 1000, and the control variable Q bc is increased from 0w to 1000w, and the grid quantity is 5.
23 Inverse solving the optimal objective function of each stage and the corresponding decision variables.
The inverse solution is to calculate the optimal objective function and decision variables of each stage from the final stage to the initial stage. The cost of the final stage is regarded as 0 by the inverse solution of dynamic programming, and the optimal objective function of each stage of inverse solution is started by the N-1 stage;
when k=n-1 phase, the objective function is:
When k e [1,., N-2 ] phase, the objective function is:
wherein F (·) is the state transfer function.
Specifically, when k=n-1, all discrete decision variables Q bc are applied to each state variable battery temperature T bat and battery SOC, an optimal objective function is calculated, and a corresponding decision variable sequence is recorded and denoted as u (N-1).
When the k e1, N-2 phase, the objective function of all decision variables is traversed and all state variable grid points are calculated, unlike the k=n-1 phase, which contains not only the objective function of the k phase but also the optimal objective function of the k+1 phase. Therefore, the optimal objective function of the whole stage can be calculated, the optimal objective function of the system in the whole stage can be calculated, and the decision variable sequence adopted by the system is recorded after the calculation is completed and is recorded as u (k).
24 Given the initial state variables, forward solve the globally optimal solution.
The forward calculation is to give an initial value of a state variable, calculate the optimal decision variable obtained by reverse calculation from an initial stage to a final stage, and finally obtain a global optimal state variable sequence. Specifically, the method for forward solving the global optimal solution comprises the following steps:
When k=1, according to the result obtained by the inverse solution, the decision variable u (1) of the initial state is found to act on the state variable, and the battery temperature T bat and the battery state of charge SOC of the next stage are calculated by using the state transition equation. In this embodiment, the initial state variable battery temperature T bat (0) is set to 35 ℃, and the battery SOC (0) is set to 0.9.
When the k epsilon [ 2..once, N-1 ] stage, according to the state variables T bat (k) and SOC (k) of the current stage obtained by adopting the state transition equation in the previous stage, searching the optimal decision variables corresponding to the state variables, if the searched optimal decision variables are not the state variables of the current stage, obtaining the optimal decision variables u (k) of the current stage by adopting an interpolation method, gradually recursively estimating to the final stage to obtain an optimal control sequence { u *(1),u*(2),...,u* (k) } and an optimal state quantity sequence { x *(1),x*(2),...,x* (k) }, namely the optimal battery temperature trackAnd an optimal battery state trajectory SOC *.
In this embodiment, the state transition equation is obtained by using the battery temperature T bat and the battery state of charge SOC as state variables and the battery loop cooling capacity Q bc (k) as control variables:
wherein U oc is external voltage, P bat represents battery power, P hp represents energy consumption of a thermal management system, the energy is obtained by table lookup of values of a vehicle speed v and a battery loop refrigerating capacity Q bc, a MAP is obtained by identification of a high simulation model, R bat is internal resistance, and C bat is total charge of the battery; Heat generated inside the battery pack; is the heat transferred to the battery by the refrigerant, m bat is the battery mass, C bat is the total charge of the battery, and T bat is the battery temperature.
Step three, establishing an online thermal management optimization controller
31 Constructing an optimal thermal management policy dataset under a variety of conditions
As shown in fig. 5, the offline optimization program is solved for the different representative drive cycle data sets, obtaining the inputs and outputs required to train the neural network. Specifically, a standard driving cycle data set including UDDS, NEDC, WLTC and other driving conditions is firstly obtained, an optimal decision sequence and an optimal state quantity sequence of a control variable are obtained based on a dynamic programming optimization problem of electric vehicle battery thermal management for each driving cycle of different driving conditions, and then an optimal thermal management strategy data set is constructed according to the driving condition data, the optimal decision sequence and the optimal state quantity sequence. As shown in fig. 6, a vehicle speed profile of a vehicle running condition driving cycle (WLTC) selected for the present embodiment.
32 Training neural networks
And training the neural network by using the constructed optimal thermal management strategy data set, and constructing to obtain the online thermal management optimal controller.
In this embodiment, the driving condition data is used as input of the neural network model, the optimal state quantity sequence is used as output of the neural network model, and the neural network training software is used to design and train the neural network model. Specifically, to train the neural network, the present embodiment employs the Levenberg-Marquardt algorithm because of its fast convergence and robustness characteristics, and the neural network model uses the mean quadratic error (MSE) as a fitness function. The trained and verified neural network model is used as an intelligent online thermal management controller, and the neural network outputs the optimal track of the battery temperature and the optimal track of the battery SOC by acquiring real-time data input by the neural network, as shown in figures 7-8.
The above-described embodiments are merely preferred embodiments for fully explaining the present invention, and the scope of the present invention is not limited thereto. Equivalent substitutions and modifications will occur to those skilled in the art based on the present invention, and are intended to be within the scope of the present invention. The protection scope of the invention is subject to the claims.