Disclosure of Invention
In view of the above, the invention provides a method for optimizing the energy of a lithium battery and super capacitor composite power supply system in real time, which can meet the power demand of the composite power supply system and prolong the service life of the lithium battery according to the health state of the lithium battery.
The technical scheme of the invention is realized as follows: the invention provides a method for optimizing the energy of a lithium battery and super capacitor composite power supply system in real time, which comprises the following steps,
s1, inputting variable lithium battery health factor lambda bt,soh And the required power P of the hybrid power system hes,r And super capacitor state of charge SOC sc (ii) a Quantizing and fuzzifying the input variables, and converting the quantized and fuzzified variables into fuzzy quantities;
s2, obtaining the required power P of the lithium battery pack based on the fuzzy energy management rule bt,r The fuzzy quantity is defuzzified and quantized to obtain the required power P of the lithium battery pack bt,r ;
S3, the required power P of the lithium battery bt,r Transmitting to the lithium battery pack module to obtain the output power P of the lithium battery pack bt,a 。
On the basis of the above technical solution, preferably, the method further comprises the following steps,
s4, digitizing the fuzzy energy management rule to obtain an input and output data sample;
and S5, performing off-line learning on the data sample by using the BP neural network to obtain the neural network energy management module memorizing the fuzzy energy management rule.
Further preferably, in step S1,
input variable lithium battery health factor lambda bt,soh The quantized input range is [0,1 ]]The fuzzy set is (L, M, H), H, M and L represent high, middle and low respectively; when lambda is bt,soh The quantized input range is 0,0.33]Then, corresponding to the blur amount L; when lambda is bt,soh The quantized input range is [0.33,0.66 ]]When the value is zero, corresponding to the fuzzy quantity M; when lambda is bt,soh The quantized input range is 0.66,1]When so, corresponding to the fuzzy amount H;
input variable composite power supply system required power P hes,r The quantized input range is [ -1,1]The fuzzy set is (N, L, M, H), H, M, L and N represent high, middle, low and negative respectively; when P is present hes,r The quantized input range is [ -1,0 []Then, corresponding to the fuzzy quantity N; when P is present hes,r The quantized input range is 0,0.33]Then, corresponding to the blur amount L; when P is present hes,r The quantized input range is [0.33,0.66 ]]Then, corresponding to the fuzzy quantity M; when P is present hes,r The quantized input range is 0.66,1]When so, corresponding to the fuzzy amount H;
input variable super capacitor state of charge SOC sc The quantized input range is [0,1 ]]The fuzzy sets are (L, M, H, M and L represent high, middle and low respectively; when the SOC is sc The quantized input range is 0,0.57]Then, corresponding to the blur amount L; when SOC is reached sc The input range after quantization is [0.57,0.81 ]]When the value is zero, corresponding to the fuzzy quantity M; when SOC is reached sc The quantized input range is [0.81,1 ]]When so, corresponding to the fuzzy amount H;
input variable lithium battery pack required power P bt,r The quantized input range is [ -0.3,1]The fuzzy set is (N, L, M, H), H, M, L and N represent high, medium, low and negative respectively; when P is present bt,r The quantized input range is [ -0.3,0]Then, corresponding to the fuzzy quantity N; when P is present bt,r The quantized input range is [0,0.33 ]]Then, corresponding to the blur amount L; when P is present bt,r The quantized input range is [0.33,0.66 ]]When the value is zero, corresponding to the fuzzy quantity M; when P is present bt,r The quantized input range is[0.66,1]When so, corresponding to the fuzzy amount H;
in step S2, the required power P of the lithium battery pack is obtained according to the following fuzzy energy management rule bt,r Amount of blur of (2):
when the health factor lambda of the lithium battery bt,soh When the amount of blurring is set to H,
when the health factor lambda of the lithium battery bt,soh When the amount of blurring is M, the amount of blurring is,
when the health factor lambda of the lithium battery bt,soh When the amount of blurring is L,
still preferably, in step S4, the fuzzy energy management rule is digitalized in the following manner:
when lambda is bt,soh The quantized input range is [0,0.33 ]]Corresponding to the fuzzy quantity L, taking a median value of an input range to be 0.165 during datamation; when lambda is bt,soh The quantized input range is [0.33,0.66 ]]Corresponding to the fuzzy quantity M, taking a median value of an input range to be 0.485 during datamation; when lambda is bt,soh The quantized input range is [0.66, 1']Corresponding to the fuzzy quantity H, taking a median value of an input range to be 0.825 during datamation;
when P is present hes,r The quantized input range is [ -1,0 ]]Corresponding to the fuzzy quantity N, taking a median value of-0.5 in an input range during datamation; when P is present hes,r The quantized input range is 0,0.33]When the fuzzy quantity L is needed, the median value in the input range is 0.165 corresponding to the fuzzy quantity L; when P is present hes,r The quantized input range is [0.33,0.66 ]]Corresponding to the fuzzy quantity M, taking a median value of an input range to be 0.485 during datamation; when P is present hes,r Quantized input rangeIs [0.66,1 ]]Corresponding to the fuzzy quantity H, taking a median value of an input range to be 0.825 during datamation;
when SOC is reached sc The quantized input range is [0,0.57 ]]Corresponding to the fuzzy quantity L, taking E when the data is formed sc Inputting a square root value 0.41 of a median value 0.165 in the range; when SOC is reached sc The input range after quantization is [0.57,0.81 ]]When the data is converted into data, corresponding to the fuzzy quantity M, the value E is taken sc Inputting a square root value of 0.70 of a median value of 0.495 in the range; when SOC is reached sc The quantized input range is [0.81,1 ]]When the data is converted into data, corresponding to the fuzzy quantity H, the fuzzy quantity E is taken sc Inputting a quadratic root value 0.91 of a median value 0.825 in the range;
when P is bt,r The quantized input range is [ -0.3,0]Corresponding to the fuzzy quantity N, taking a median value of-0.15 in an input range during datamation; when P is present bt,r The quantized input range is 0,0.33]Corresponding to the fuzzy quantity L, taking a median value of an input range to be 0.165 during datamation; when P is present bt,r The quantized input range is [0.33,0.66 ]]Corresponding to the fuzzy quantity M, taking a median value of an input range to be 0.485 during datamation; when P is present bt,r The quantized input range is 0.66,1]Corresponding to the fuzzy quantity H, taking a median value of an input range to be 0.825 during datamation;
the input data sample of the neural network is a lithium battery health factor lambda bt,soh Required power P of composite power supply system hes,r And super capacitor state of charge SOC sc The output data sample of the neural network is the required power P of the lithium battery bt,r 。
Further preferably, the method further comprises the following steps,
s6, selecting the root mean square of the output current of the lithium battery as a performance function, utilizing the self-learning capability of the neural network, adopting a BP algorithm to adjust the weight and the threshold of the neural network on line, and optimizing the fuzzy energy management rule in real time to enable the overall performance function to be minimum.
Still more preferably, in step S5,
the quantization module converts the actual value of the input variable into the input range of the neural network, and the weight coefficient from the input layer to the hidden layer is w at the moment of k (2) ij (k)(i=1,2…9,j=1,2,3) The threshold is b (2) i (k) (i =1,2 \82309; 9), hidden-to-output-layer weight coefficient w (3) li (k) (i =1,2 \8230; 9,l = 1), and the threshold value is b (3) l (k)(l=1);
In the step S6, the root mean square of the output current of the lithium battery pack representing the service life of the lithium battery is taken as a performance function J (k) of the neural network,
I bt,a (k) Represents the output current of the lithium battery pack at the moment k, and N represents the output current I of the lithium battery pack at the moment k bt,a The total number of sampling values;
when the input variable is transmitted in the forward direction by using a BP learning algorithm, the input variable is transmitted from an input layer to an output layer through a hidden layer; when reversely propagating, transmitting the performance function J (k) from the output layer to the input layer through the hidden layer, and adjusting the weight and the threshold of the neural network on line according to a gradient descent method; searching the negative gradient direction of the neural network according to J (k), adding an inertia term which enables the search to be rapidly converged, and optimizing an energy management strategy, wherein a weight value and threshold value adjusting formula is as follows:
where η is the learning rate and α is the inertia coefficient.
Further preferably, the method further comprises a step S7 of evaluating the optimization result, and when the optimization result meets the requirement, the optimization is finished; and when the requirements cannot be met, modifying the fuzzy energy management rule, and optimizing according to the steps S1-S6.
On the basis of the technical scheme, preferably, the energy real-time optimization method is completed in ADVISOR software based on MATLAB.
Compared with the prior art, the method for optimizing the energy of the lithium battery and super capacitor composite power supply system in real time has the following beneficial effects:
(1) The health factors of the lithium battery are brought into the fuzzy energy management rule consideration range of the composite power system, the power of the lithium battery and the power of the super capacitor are reasonably distributed, the advantages of the super capacitor and the lithium battery are exerted, and the service life of the lithium battery is prolonged;
(2) The fuzzy variable adopts a triangular membership function, the fuzzy variable is used for measuring the average value of the input range of the fuzzy variable, the datamation of a fuzzy rule is realized, and an input data sample and an output data sample are obtained;
(3) Learning the fuzzy rule after the datamation by using the learning ability of the neural network to obtain a fuzzy energy management module based on the neural network;
(4) On the basis, the root mean square of the output current of the lithium battery is used as a performance function, the weight and the threshold of the neural network are adjusted by using a BP algorithm, the energy management rule of the composite power supply system is optimized, and the service life of the lithium battery is prolonged while the required power of the composite power supply system is met.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments of the present invention, belong to the protection scope of the present invention.
The ADVISOR software is source code open electric vehicle simulation software which is developed based on MATLAB software and can be used for carrying out forward simulation and backward simulation, and is suitable for energy management evaluation and optimization of electric vehicles. The energy real-time optimization method of the lithium battery and super capacitor composite power supply system is completed in ADVISOR2002 software based on MATLAB6.5 environment.
The energy real-time optimization process of the lithium battery and super capacitor composite power supply system is shown in fig. 1, and comprises the following steps:
1. formulating fuzzy energy management rules
According to the characteristics of small energy density of lithium batteries and large power density and small energy density of super capacitors, the fuzzy energy management rule of the composite power supply system considering the health condition of the lithium batteries is as follows:
TABLE 1 (a) lithium cell health factor λ bt,soh When the amount of blurring is H, the amount of blurring is,
TABLE 1 (b) lithium cell health factor λ bt,soh When the amount of blurring is M, the image blur correction is performed,
TABLE 1 (c) lithium cell health factor lambda bt,soh When the amount of blurring is L,
wherein λ is bt,soh Represents the input variable lithium battery health factor, P hes,r Representing the demanded power, SOC, of the input variable hybrid power system sc Representing the input variable super capacitor state of charge; p bt,r Representing the output variable lithium battery pack required power.
As shown in the table above, as the state of health of the lithium battery decreases, the required power of the lithium battery decreases accordingly. The required power of the lithium battery pack is properly adjusted according to the health condition factor of the lithium battery, so that the over-current charging and discharging of the lithium battery are avoided, and the service life of the lithium battery is prolonged.
Thirty-six fuzzy rules are shared in tables 1 (a), 1 (b) and 1 (c). In Table 1 (a), one of the fuzzy energy management rules is described as the lithium battery health factor λ bt,soh H (high), the composite power system requires power P hes,r Is H (high), state of charge SOC of super capacitor sc When M is middle, the lithium battery pack needs power P bt,r Is H (high).
In Table 1 (b), one of the fuzzy energy management rules is describedAs mentioned above, the health factor lambda of lithium battery bt,soh For M (middle), the compound power system requires power P hes,r Is H (high), state of charge SOC of super capacitor sc When M (middle), the lithium battery pack requires power P bt,r Is M (middle).
In Table 1 (C), one of the fuzzy energy management rules is described as the lithium battery health factor λ bt,soh Is L (low), the composite power supply system requires power P hes,r H (high), state of charge SOC of the supercapacitor sc When M is middle, the lithium battery pack needs power P bt,r L (low).
In the three fuzzy energy management rules, the required power P of the lithium battery pack bt,r The health condition of the lithium battery is considered, and the service life of the lithium battery is prolonged.
The structure diagram of the hybrid power system fuzzy energy management module based on the ADVISOR software is shown in FIG. 2. P hes,r Power demand for hybrid power supply system, P hes,a For outputting power, P, to the combined power supply system sc,r Power requirement for super capacitor, P sc,a For output of power, P, from the super-capacitor bt,r Power requirement for lithium battery, P bt,a And outputting power for the lithium battery.
In the power distribution module, the super capacitor bank requires power P sc,r The following formula.
P sc,r =P hes,r -P bt,a (1)
Output power P of composite power supply system hes,a The following formula.
P hes,a =P bt,a +P sc,a (2)
A MATLAB-based fuzzy energy management module is shown in fig. 3. Fuzzy energy management module inputs variable lithium battery health factor lambda bt,soh Required power P of composite power supply system hes,r And super capacitor state of charge SOC sc The input variables are quantized and fuzzified to convert into fuzzy quantities. Obtaining the required power P of the lithium battery by inquiring the fuzzy energy management rules of the table 1 (a), the table 1 (b) and the table 1 (c) bt,r The fuzzy quantity is defuzzified and quantized to obtain the required work of the lithium batteryRate P bt,r . Lithium battery demand power P bt,r Transmitting to the lithium battery pack module to obtain the output power P of the lithium battery pack bt,a 。
The MATLAB-based fuzzy energy management rules are obtained from the fuzzy energy management rules of tables 1 (a), 1 (b), and 1 (c) and are shown in fig. 4.
Required power P of super capacitor bank sc,r The required power P of the super capacitor bank is obtained by the formula (1) sc,r Transmitting to the super capacitor bank module to obtain the output power P of the super capacitor bank sc,a 。
2. Datamation fuzzy energy management rule
Lithium battery health factor lambda based on MATLAB bt,soh The graph of membership functions is shown in FIG. 5, using triangular membership functions. The lithium battery health condition evaluation module obtains a lithium battery health condition factor lambda according to the voltage, the current, the running time and other parameters of the lithium battery bt,soh . Input variable lithium battery health factor lambda bt,soh The quantized input range is [0,1 ]]The fuzzy set is (L, M, H), H, M and L represent high, middle and low respectively; when lambda is bt,soh The quantized input range is [0,0.33 ]]Corresponding to the fuzzy quantity L, taking a median value of an input range to be 0.165 during datamation; when lambda is bt,soh The quantized input range is [0.33,0.66 ]]Corresponding to the fuzzy quantity M, taking a median value of an input range to be 0.485 during datamation; when lambda is bt,soh The quantized input range is [0.66, 1']Corresponding to the fuzzy quantity H, taking a median value of an input range to be 0.825 during datamation; the membership functions of L (low), M (medium) and H (high) are respectively,
y=trimf(x,[0,0.165,0.33])
y=trimf(x,[0.33,0.485,0.66])
y=trimf(x,[0.66,0.825,1])
MATLAB-based composite power supply system required power P hes,r The graph of membership functions is shown in FIG. 6, using triangular membership functions. Input variable composite power supply system required power P hes,r The quantized input range is [ -1,1]The fuzzy set is (N, L, M, H), H, M, L and N represent high, middle, low and negative respectively; when P is hes,r The quantized input range is [ -1,0 ]]Corresponding to the fuzzy quantity N, taking a median value of-0.5 in an input range during datamation; when P is hes,r The quantized input range is [0,0.33 ]]When the fuzzy quantity L is needed, the median value in the input range is 0.165 corresponding to the fuzzy quantity L; when P is present hes,r The quantized input range is [0.33,0.66 ]]Corresponding to the fuzzy quantity M, taking a median value of an input range to be 0.485 during datamation; when P is present hes,r The quantized input range is 0.66,1]Corresponding to the fuzzy quantity H, taking a median value of an input range to be 0.825 during datamation; the membership degree functions of N (negative), L (low), M (medium) and H (high) are respectively,
y=trimf(x,[-1,-0.5,0])
y=trimf(x,[0,0.165,0.33])
y=trimf(x,[0.33,0.485,0.66])
y=trimf(x,[0.66,0.825,1])
super capacitor state of charge SOC based on MATLAB
sc The membership function graph is shown in fig. 7, using triangular membership functions. Input variable super capacitor state of charge SOC
sc The quantized input range is [0,1 ]]The fuzzy sets are (L, M, H, M and L represent high, middle and low respectively; energy E stored due to super capacitor
sc And state of charge SOC of super capacitor
sc Is proportional to the square of when the SOC is
sc The quantized input range is [0,0.57 ]]
Corresponding to the fuzzy quantity L, taking E when the data is formed
sc Inputting a quadratic root value of 0.41 of a median value of 0.165 in the range; when SOC is reached
sc The quantized input range is [0.57,0.81 ]]When the data is converted into data, corresponding to the fuzzy quantity M, the value E is taken
sc Inputting a quadratic root value 0.70 of a range median value 0.495; when SOC is reached
sc The quantized input range is 0.81,1]When the data is converted into data, corresponding to the fuzzy quantity H, the fuzzy quantity E is taken
sc Inputting a square root value 0.91 of a median value 0.825 in the range; the membership functions of L (low), M (medium), H (high) are respectively,
y=trimf(x,[0,0.41,0.57])
y=trimf(x,[0.57,0.7,0.81])
y=trimf(x,[0.81,0.91,1])
lithium battery pack required power P based on MATLAB bt,r The graph of membership functions is shown in FIG. 8, using triangular membership functions. Input variable lithium battery pack required power P bt,r The quantized input range is [ -0.3,1]The fuzzy set is (N, L, M, H), H, M, L and N represent high, middle, low and negative respectively; when P is present bt,r The quantized input range is [ -0.3,0]Corresponding to the fuzzy quantity N, taking a median value of-0.15 in an input range during datamation; when P is present bt,r The quantized input range is 0,0.33]Corresponding to the fuzzy quantity L, taking a median value of an input range to be 0.165 during datamation; when P is present bt,r The quantized input range is [0.33,0.66 ]]Corresponding to the fuzzy quantity M, taking a median value of an input range to be 0.485 during datamation; when P is present bt,r The quantized input range is [0.66, 1']Corresponding to the fuzzy quantity H, taking a median value of an input range to be 0.825 during datamation; the membership functions of N (negative), L (low), M (medium) and H (high) are respectively,
y=trimf(x,[-0.3,-0.15,0])
y=trimf(x,[0,0.165,0.33])
y=trimf(x,[0.33,0.485,0.66])
y=trimf(x,[0.66,0.825,1])
3. input and output data samples
Thirty-six fuzzy control rules in the tables 1 (a), 1 (b) and 1 (c), after data processing, the input data sample of the neural network is the lithium battery health factor lambda bt,soh Required power P of composite power supply system hes,r And super capacitor state of charge SOC sc The output data sample of the neural network is the required power P of the lithium battery bt,r Input data samples P for neural network training as shown in table 2 (a) and output data samples T as shown in table 2 (b) are obtained.
TABLE 2 (a) input samples P of neural networks
P=[0.165 -0.5 0.41;0.165 -0.5 0.70;0.165 -0.5 0.91;0.165 0.165 0.41;0.165 0.165 0.70;0.165 0.165 0.91;0.165 0.495 0.41;0.165 0.495 0.70;0.165 0.495 0.91;0.165 0.825 0.41;0.165 0.825 0.70;0.165 0.825 0.91;0.495 -0.5 0.41;0.495 -0.5 0.70;0.495 -0.5 0.91;0.495 0.165 0.41;0.495 0.165 0.70;0.495 0.165 0.91;0.495 0.495 0.41;0.495 0.495 0.70;0.495 0.495 0.91;0.495 0.825 0.41;0.495 0.825 0.70;0.495 0.825 0.91;0.825 -0.5 0.41;0.825 -0.5 0.70;0.825 -0.5 0.91;0.825 0.165 0.41;0.825 0.165 0.70;0.825 0.165 0.91;0.825 0.495 0.41;0.825 0.495 0.70;0.825 0.495 0.91;0.825 0.825 0.41;0.825 0.825 0.70;0.825 0.825 0.91;]'
TABLE 2 (a) output samples T of neural networks
T = [0.165; -0.15; -0.15;0.495;0.165;0.165;0.825;0.495;0.165;0.825;0.825;0.495;0.165; -0.15; -0.15;0.495; -0.15; -0.15;0.495;0.495; -0.15;0.495;0.495;0.495;0.165; -0.15; -0.15;0.165;0.165;0.165;0.495;0.165;0.165;0.495;0.165;0.165; ' 4. Neural network off-line learning
The structure of the BP neural network is shown in FIG. 9. The input layer is provided with three neuron nodes, the output layer is provided with one neuron node, the number of the neuron nodes of the hidden layer is generally obtained according to an empirical formula and experiments, and 9 nodes can be selected. The input data sample of the neural network is a lithium battery health factor lambda bt,soh And the required power P of the hybrid power system hes,r And super capacitor state of charge SOC sc The output data sample of the neural network is the required power P of the lithium battery bt,r . The quantization module converts the actual value of the input variable into the input range of the neural network, and the weight coefficient from the input layer to the hidden layer is w (2) ij (k) (j =1,2,3, i =1,2 \ 82309; 9), and the threshold value is b (2) i (k) (i =1,2 \82309; 9), the hidden-to-output layer weight coefficient is w (3) li (k) (i =1,2 \8230; 9,l = 1), and the threshold value is b (3) l (k) (l = 1). Based on MATLAB neural network toolbox, using BP learning algorithm to apply input data sample P and output data sample T to neural network off-line training, selecting neural network with minimum error between output quantity of neural network and output data sample T, and realizing mapping between input data sample P and output data sample T by the neural networkAnd the neural network memorizes fuzzy rules and realizes the energy management of the composite power supply system based on the neural network.
5. Energy management online optimization of composite power supply system based on neural network
The energy management structure of the neural network-based hybrid power system is shown in fig. 10.
The root mean square of the output current of the lithium battery pack, which characterizes the life of the lithium battery, is taken as a neural network performance function J (k), which can be expressed as,
I bt,a (k) Represents the output current of the lithium battery pack at the moment k, and N represents the output current I of the lithium battery pack at the moment k bt,a Total number of sample values.
The neural network adopts the trained neural network. By utilizing a BP learning algorithm, when the forward propagation is carried out, an input variable is transmitted to an output layer from an input layer through a hidden layer; during reverse propagation, a performance function J (k) is transmitted from an output layer to an input layer through a hidden layer, and the weight and the threshold of the neural network are adjusted on line according to a gradient descent method; searching the negative gradient direction of the neural network according to J (k), adding an inertia term which enables the search to be rapidly converged, and optimizing an energy management strategy, wherein a weight value and threshold value adjusting formula is as follows:
where η is the learning rate and α is the inertia coefficient.
6. Evaluation of
And evaluating the optimization result, and finishing the optimization when the optimization result meets the requirement. And when the requirements cannot be met, modifying fuzzy energy management rules, and then optimizing according to the flow.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.