Lithium battery pack SOC prediction method based on artificial life model
Technical Field
The invention relates to the field of battery energy management systems, in particular to a lithium battery pack SOC prediction method based on an artificial life model.
Background
The noun explains:
cellular automata: the cellular automata is a grid dynamics model with discrete time, space and state, and local space interaction and time causal relationship, has the capability of simulating the space-time evolution of a complex system, and is a typical artificial life model.
SOC: the state of charge, also called the remaining capacity, represents the ratio of the remaining capacity of the battery after being used for a period of time or left unused for a long time to the capacity of the battery in its fully charged state, expressed in common percentage;
BP neural network: the Back Propagation neural network is a multi-layer feedforward network trained according to an error inverse Propagation algorithm.
QPSO algorithm: quantum-behaved Particle Swarm Optimization (QOS) is an improved PSO (Particle Swarm Optimization) algorithm, overcomes the defects that a PSO algorithm is limited in search space and easy to fall into local extrema, and has the advantages of being few in parameters, easy to achieve, high in convergence speed and the like.
In recent years, haze continuously appears because more and more traditional fuel automobiles generate more automobile exhaust, and the environmental problem is increasingly prominent along with gradual exhaustion of fossil energy. The appearance of the lithium battery can just meet the requirements of modern society on green and environment-friendly new energy, the lithium battery is widely applied to a battery system of an electric automobile due to high energy density and high specific power, and the performance of the battery not only determines the safety of the electric automobile system, but also determines the reliability and efficiency of the electric automobile system. The Battery Management System (BMS) needs to provide accurate battery state information for human reference, and the core of the BMS is battery state of charge (SOC), which can accurately predict the remaining capacity of the battery only by accurate SOC prediction of the lithium battery, while determining an effective battery management strategy, thereby avoiding overcharge and overdischarge conditions of the battery and extending the service life of the battery.
However, SOC cannot be measured directly, and must be predicted by measurable voltage and current, and the accuracy of SOC prediction has a decisive influence on the use efficiency, service life and safety of the battery.
At present, there are many research methods for SOC, and common measurement or prediction methods include an open-circuit voltage method, an ampere-hour integration method, a discharge experiment method, a neural network algorithm, kalman filtering, and the like. The analysis shows that the defects of the existing method are listed as follows: 1. the open-circuit voltage method can be used for obtaining the SOC of the battery by looking up a table, but the operation is simple, but the battery pack is intermittently kept still, is only suitable for a laboratory and cannot meet the online requirement of the electric automobile; 2. the ampere-hour integration method can be used for on-line testing and is simple to use, but the method can cause the estimation error to increase along with the accumulation of time; 3. the discharge experiment method can measure and obtain reliable SOC, but the method needs off-line test, needs a charge and discharge machine, and has long charge and discharge time, thereby increasing the cost; 4. neural network algorithm prediction, wherein the prediction accuracy of the method depends on a large amount of training data and a proper training method; 5. the Kalman filtering algorithm is suitable for the working condition of severe operation of the electric vehicle, but the traditional Kalman filtering algorithm is only suitable for a linear system and is not suitable for a lithium battery which becomes severe nonlinear in operation.
In general, the problems of large error, low precision, high cost, low modeling accuracy and the like exist in the conventional online measurement or prediction method for the SOC of the lithium battery pack of the electric vehicle, and the SOC of the lithium battery of the electric vehicle is difficult to accurately obtain.
Disclosure of Invention
In view of the above problems in the prior art, an object of the present invention is to provide a method for predicting SOC of a lithium battery pack based on an artificial life model.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a lithium battery SOC prediction method based on an artificial life model comprises the following steps:
s1, establishing a basic artificial living body model;
s2, improving the structure of the basic artificial living body model;
and S3, improving the learning algorithm of the artificial living body model.
S4, collecting historical charging and discharging data of the lithium battery pack and corresponding SOC data;
s5, carrying out normalization processing on the historical charging and discharging data of the lithium battery pack and the corresponding SOC data;
and S6, inputting the processed data into each individual cell, giving each cell in the cell space a set of network weight coefficients, calculating the actual output of each cell by using the weight network, ending the algorithm if the average actual output of the cell space reaches the standard or the training steps are completed, or continuing the algorithm if the average actual output of the cell space reaches the standard.
And S7, calculating the fitness. The expected output is compared with the actual output of each unit cell, and the fitness of each unit cell is calculated.
S8, selecting and copying. Each cell selects the individual with the maximum fitness in the neighbor range as a learning object, copies the excellent individual in the selected neighbor by each cell, updates the network weight coefficient of the cell, and returns to step S6
Further, in step S1, it specifically includes:
an n multiplied by n grid Moore type cellular automaton is established, wherein n is 20, and the n is used as an artificial life model of the patent.
Further, in step S2, it specifically includes:
the artificial neural network is introduced into each cell, the neural network to be trained is stored in each cell, and the neural network is of a three-layer structure and comprises an input layer, a hidden layer and an output layer.
Further, in step S3, it specifically includes:
the QPSO algorithm is used as a learning algorithm of the cells, and the steps are as follows:
s31, where n is 0. Initializing a particle swarm, including the number of particles and a search space, and randomly initializing the initial position of each particle;
and S32, in the first iteration, the initial position of each particle is the best position of the individual. The position of each particle is a parameter in the neural network, the actual output of the neural network of all input group data is calculated, the objective function value corresponding to the particle is obtained according to the actual output and the expected output, the objective function values of all the particles are compared to find the particle with the minimum objective function value, the position of the particle is the best global position, and a conclusion parameter matrix corresponding to the particle is stored;
s33, calculating the average best position of the individual from the individual best positions of all the particles, updating the position of each particle, calculating the objective function value of each particle, and updating the individual best position. Finally, comparing the individual best positions of all the particles to obtain a global best position, and simultaneously storing a parameter matrix corresponding to the particle with the global best position;
and S34, when the iteration ending condition is met, training is ended, the global best position is the neural network parameter value to be determined, and the stored conclusion parameter matrix is the conclusion parameter to be determined. When the iteration end condition is not reached, let n be n +1, go to step S33.
Further, in step S4, it specifically includes:
the charge and discharge data comprise charge and discharge currents and monomer voltages of each monomer battery of the lithium battery pack.
Further, in step S5, it specifically includes:
according to the following formula, the historical charging and discharging data of the lithium battery pack of the electric automobile is subjected to normalization processing, and meanwhile, the SOC data is subjected to inverse normalization processing:
in the above formula, X represents normalized data, and X k Representing the actually input historical charging and discharging data, k is a natural number, representing a serial number, x max Denotes x k Maximum value, x, in the data sequence min Denotes x k The minimum value in the data sequence.
Further, the step S6 includes:
s61, according to the collected historical charging and discharging data of the lithium battery pack of the electric automobile and the corresponding SOC data, taking the SOC data at any moment as output data of a BP neural network, and simultaneously taking the historical charging and discharging data within preset time before the moment as input data of the BP neural network, so as to determine the number of input and output nodes in the network structure of the cell body;
s62, giving each cell in the cell space a set of self network weight coefficient
And S63, providing the same data processed in the step S5 for each cell, calculating the actual output of each cell by using a weight network, and ending the algorithm if the average actual output of the cell space reaches the standard or the training steps are completed, or continuing the algorithm if the average actual output of the cell space reaches the standard.
Further, in step S7, it specifically includes:
each cell compares the difference between the actual output and the expected output, and calculates the fitness by the following method:
in the above formula, the fitness, out, is the fitness a Is the actual output of the cell, out q Is the desired output.
Further, in step S8, it specifically includes:
each cell selects a fitness fit within the neighborhood (including itself) star =max{fit j J belongs to omega as a learning object, each cell selects a cell individual with the maximum fitness to copy, and updates the network weight coefficient of the cell:
W i,t ′=W star,t
V i,t ′=V star,t
and then returns to step S6.
The invention has the beneficial effects that: the invention relates to a lithium battery pack SOC prediction method based on an artificial life model, which accurately models the SOC value of the lithium battery pack of an electric vehicle through the artificial life model and obtains the online predicted value of the SOC, and has the advantages of no error accumulation, high prediction precision, small error, low prediction cost and convenience for wide use.
Drawings
The invention will be further explained with reference to the drawings and examples
FIG. 1 is a flow chart of a lithium battery pack SOC prediction method based on an artificial life model according to the present invention;
FIG. 2 is a Moore cellular automaton of the present invention, which is a life model
FIG. 3 is a diagram of a cellular automaton-cellular genetic neural network structure improved by the present invention
Detailed Description
Referring to fig. 1, the invention provides a lithium battery pack SOC prediction method based on an artificial life model, comprising the steps of:
s1, establishing a basic artificial living body model;
s2, improving the structure of the basic artificial living body model;
and S3, improving the learning algorithm of the artificial living body model.
S4, collecting historical charging and discharging data of the lithium battery pack and corresponding SOC data;
s5, carrying out normalization processing on the historical charging and discharging data of the lithium battery pack and the corresponding SOC data;
and S6, inputting the processed data into each individual cellular, giving each cellular in the cellular space a set of network weight coefficients, calculating the actual output of each cellular by using the weight network, and ending the algorithm if the average actual output of the cellular space reaches the standard or the training steps are completed, or continuing the algorithm if the average actual output of the cellular space reaches the standard or the training steps are completed.
And S7, calculating the fitness. The expected output is compared with the actual output of each cell, and the fitness of each cell is calculated.
S8, selecting and copying. Each cell selects the individual with the maximum fitness as a learning object in the neighbor range, copies the excellent individuals in the selected neighbor range, updates the network weight coefficient of the cell, and returns to step S6.
Further preferably, the step S1 includes:
referring to fig. 2, an artificial life model of n × n Moore type cellular automata is established, where n is 20.
Further preferably, the step S2 includes:
referring to fig. 3, an artificial neural network is introduced into each cell, the neural network to be trained is stored in each cell, and the neural network has a three-layer structure, namely an input layer, a hidden layer and an output layer.
In a further preferred embodiment, the step S3 includes:
the QPSO algorithm is used as a learning algorithm of the cells, and the specific steps are as follows:
s31, the number of iterations n is 0. Initializing a particle swarm, including the number of particles and a search space, and randomly initializing the initial position of each particle;
and S32, in the first iteration, the initial position of each particle is the best position of the individual. The position of each particle is a parameter in the neural network, the actual output of the neural network of all input group data is calculated, the objective function value corresponding to the particle is obtained according to the actual output and the expected output, the objective function values of all the particles are compared to find the particle with the minimum objective function value, the position of the particle is the best global position, and a conclusion parameter matrix corresponding to the particle is stored;
s33, calculating the average best position of the individual from the individual best positions of all the particles, updating the position of each particle, calculating the objective function value of each particle, and updating the individual best position. Finally, comparing the individual best positions of all the particles to obtain a global best position, and simultaneously storing a parameter matrix corresponding to the particle with the global best position;
and S34, when the iteration end condition is reached, training is ended, the global best position is the neural network parameter value to be determined, and the stored conclusion parameter matrix is the conclusion parameter to be determined. When the iteration end condition is not reached, let n be n +1, go to step S33.
In a further preferred embodiment, the step S4 includes:
the charge and discharge data comprise charge and discharge currents and monomer voltages of each monomer battery of the lithium battery pack.
Further preferably, the step S5 includes:
according to the following formula, the historical charging and discharging data of the lithium battery pack of the electric automobile is subjected to normalization processing, and meanwhile, the SOC data is subjected to inverse normalization processing:
in the above formula, X represents normalized data, and X k Representing the actually input historical charging and discharging data, k is a natural number and represents a serial number, x max Represents x k Maximum value in data sequence, x min Denotes x k The minimum value in the data sequence.
Further preferably, the step S6 includes:
s61, according to the collected historical charging and discharging data of the lithium battery pack of the electric automobile and the corresponding SOC data, taking the SOC data at any moment as output data of the BP neural network, and simultaneously taking the historical charging and discharging data within preset time before the moment as input data of the BP neural network, so as to determine the number of input and output nodes in the network structure of the cell body;
s62, giving each cell in the cell space a set of self network weight coefficient
And S63, providing the same data processed in the step S5 for each cell, calculating the actual output of each cell by using a weight network, ending the algorithm if the average actual output of the cell space reaches the standard or the training step number is completed, or continuing the algorithm if the average actual output of the cell space reaches the standard or the training step number is completed.
Further preferably, the step S7 includes:
each cell compares the difference between the actual output and the expected output, and calculates the fitness by the following method:
in the above formula, the fitness, out, is the fitness a Is the actual output of the cell, out q Is the desired output.
Further preferably, the step S8 includes:
each one of which isThe cells all select fitness fit within the neighborhood (including themselves) star =max{fit j J belongs to omega as a learning object, each cell selects a cell individual with the maximum fitness to copy, and updates the network weight coefficient of the cell:
W i,t ′=W star,t
V i,t ′=V star,t
and then returns to step S6.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.