CN115963407A - A lithium battery SOC estimation method based on ICGWO optimized ELM - Google Patents
A lithium battery SOC estimation method based on ICGWO optimized ELM Download PDFInfo
- Publication number
- CN115963407A CN115963407A CN202211628353.7A CN202211628353A CN115963407A CN 115963407 A CN115963407 A CN 115963407A CN 202211628353 A CN202211628353 A CN 202211628353A CN 115963407 A CN115963407 A CN 115963407A
- Authority
- CN
- China
- Prior art keywords
- wolf
- elm
- algorithm
- icgwo
- lithium battery
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 title claims abstract description 21
- 229910052744 lithium Inorganic materials 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 title claims abstract description 21
- 241000282461 Canis lupus Species 0.000 claims abstract description 68
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 58
- 230000006870 function Effects 0.000 claims abstract description 25
- 238000005457 optimization Methods 0.000 claims abstract description 11
- 230000007423 decrease Effects 0.000 claims abstract description 7
- 230000035772 mutation Effects 0.000 claims description 15
- 239000013598 vector Substances 0.000 claims description 12
- 238000013507 mapping Methods 0.000 claims description 8
- 230000000739 chaotic effect Effects 0.000 claims description 7
- 230000006872 improvement Effects 0.000 claims description 6
- 241000894007 species Species 0.000 claims description 4
- 230000009191 jumping Effects 0.000 claims 1
- 230000002028 premature Effects 0.000 abstract description 4
- 239000010410 layer Substances 0.000 description 24
- 241000282421 Canidae Species 0.000 description 10
- 238000012549 training Methods 0.000 description 10
- 238000012360 testing method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 4
- 230000004913 activation Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 238000007599 discharging Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- HBBGRARXTFLTSG-UHFFFAOYSA-N Lithium ion Chemical compound [Li+] HBBGRARXTFLTSG-UHFFFAOYSA-N 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 229910001416 lithium ion Inorganic materials 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 230000010287 polarization Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000002356 single layer Substances 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/60—Other road transportation technologies with climate change mitigation effect
- Y02T10/70—Energy storage systems for electromobility, e.g. batteries
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明提供了一种基于ICGWO优化ELM的锂电池SOC估计方法,包括以下步骤:步骤1:针对灰狼算法在进化后期因种群多样性迅速下降而经常遇到早熟现象和局部收敛的问题,通过引入改进策略,构建一种具有良好全局寻优性能的改进灰狼算法;步骤2:利用改进灰狼算法,以模型输出均方根误差最小化为目标函数,对极限学习机的隐层阈值及输入权值参数进行优化,建立起基于ICGWO优化ELM的锂电池SOC估计模型;应用本技术方案可实现更好的预测精度和泛化能力,能够新能源汽车的电池管理系统提供重要的反馈信息。
The present invention provides a lithium battery SOC estimation method based on ICGWO optimized ELM, which includes the following steps: Step 1: Aiming at the problems that the gray wolf algorithm often encounters premature phenomenon and local convergence due to the rapid decline of population diversity in the later stage of evolution, through Introduce an improved strategy to construct an improved gray wolf algorithm with good global optimization performance; step 2: use the improved gray wolf algorithm, and take the minimum root mean square error of the model output as the objective function, and set the threshold value of the hidden layer of the extreme learning machine and The input weight parameters are optimized, and the lithium battery SOC estimation model based on ICGWO optimized ELM is established; the application of this technical solution can achieve better prediction accuracy and generalization ability, and can provide important feedback information for the battery management system of new energy vehicles.
Description
技术领域Technical Field
本发明涉及电池系统管理技术领域,特别是一种基于ICGWO优化ELM的锂电池SOC估计方法。The invention relates to the technical field of battery system management, and in particular to a lithium battery SOC estimation method based on ICGWO optimized ELM.
背景技术Background Art
纯电动汽车(EV)和混动电动汽车(HEV)作为一种可替代的交通工具越来越受欢迎,它具有环境友好,无尾气污染、变速切换流畅,震动幅度小等优点。EV和HEV目前面临的主要问题是与传统ICE车辆相比,整体续航里程明显偏少。而缺少一种可以有效估计和预测电池的实际剩余电量的电池管理系统,是增加续航里程的瓶颈所在。为了描述锂离子电池储存电能的状态,提出一种衡量电池剩余电量的指标表示电池荷电状态(state ofcharge,SOC),Klein等人给出了电池SOC的定义:在给定时间内的可用电池容量与电池标称容量的比率,100%表示电池完全充电,0%表示空状态。如何准确的确定和计算SOC成为搭建电池管理系统(battery management system,BMS)的关键。Pure electric vehicles (EV) and hybrid electric vehicles (HEV) are becoming more and more popular as an alternative means of transportation. They are environmentally friendly, have no exhaust pollution, smooth speed switching, and small vibration amplitude. The main problem currently faced by EV and HEV is that the overall cruising range is significantly shorter than that of traditional ICE vehicles. The lack of a battery management system that can effectively estimate and predict the actual remaining power of the battery is the bottleneck for increasing the cruising range. In order to describe the state of lithium-ion batteries storing electrical energy, an indicator to measure the remaining power of the battery is proposed to represent the battery state of charge (SOC). Klein et al. gave the definition of battery SOC: the ratio of the available battery capacity to the nominal battery capacity at a given time, 100% means that the battery is fully charged, and 0% means that it is empty. How to accurately determine and calculate SOC has become the key to building a battery management system (BMS).
近年来,随着人工智能和机器学习理论的迅速发展,以神经网络和支持向量机为代表的基于数据驱动的智能建模方法成为了电池SOC估计的一种主流方法。极限学习机(Extreme Learning Machine,ELM)是基于广义逆矩阵理论提出的一种性能优良的新型单隐层前馈神经网络模型(Single Hidden Layer Feedforward Networks,SLFNs)。相比传统神经网络和支持向量机回归模型,ELM具有数学模型简单、学习速度快、泛化能力强的优点,目前已在模式识别、故障诊断等领域得到了广泛应用,也成为锂电池SOC估计领域的一个重要的研究方向。但是,发明人发现,锂电池的充放电过程具有机理复杂和强非线性等特征,诸多因素都会影响充放电效率,进而影响SOC估计模型的精度。传统极限学习机可能因为损失函数不是凸函数而陷入局部最优解。同时,若算法参数设置不当,可能会造成过拟合,是泛化能力变差等问题。In recent years, with the rapid development of artificial intelligence and machine learning theory, data-driven intelligent modeling methods represented by neural networks and support vector machines have become a mainstream method for battery SOC estimation. Extreme Learning Machine (ELM) is a new single hidden layer feedforward neural network model (SLFNs) with excellent performance proposed based on generalized inverse matrix theory. Compared with traditional neural networks and support vector machine regression models, ELM has the advantages of simple mathematical model, fast learning speed and strong generalization ability. It has been widely used in pattern recognition, fault diagnosis and other fields, and has become an important research direction in the field of lithium battery SOC estimation. However, the inventors found that the charging and discharging process of lithium batteries has the characteristics of complex mechanism and strong nonlinearity. Many factors will affect the charging and discharging efficiency, and then affect the accuracy of the SOC estimation model. Traditional extreme learning machines may fall into local optimal solutions because the loss function is not a convex function. At the same time, if the algorithm parameters are not set properly, it may cause overfitting, which is a problem of poor generalization ability.
发明内容Summary of the invention
有鉴于此,本发明的目的在于提供一种基于ICGWO优化ELM的锂电池SOC估计方法,实现更好的预测精度和泛化能力,能够新能源汽车的电池管理系统提供重要的反馈信息。In view of this, the purpose of the present invention is to provide a lithium battery SOC estimation method based on ICGWO optimized ELM, to achieve better prediction accuracy and generalization ability, and to provide important feedback information for the battery management system of new energy vehicles.
为实现上述目的,本发明采用如下技术方案:一种基于ICGWO优化ELM的锂电池SOC估计方法,包括以下步骤:To achieve the above object, the present invention adopts the following technical solution: a lithium battery SOC estimation method based on ICGWO optimized ELM, comprising the following steps:
步骤1:针对灰狼算法在进化后期因种群多样性迅速下降而经常遇到早熟现象和局部收敛的问题,通过引入改进策略,构建一种具有良好全局寻优性能的改进灰狼算法;Step 1: In view of the fact that the gray wolf algorithm often encounters premature phenomenon and local convergence problems due to the rapid decline of population diversity in the late stage of evolution, an improved gray wolf algorithm with good global optimization performance is constructed by introducing an improvement strategy;
步骤2:利用改进灰狼算法,以模型输出均方根误差最小化为目标函数,对极限学习机的隐层阈值及输入权值参数进行优化,建立起基于ICGWO优化ELM的锂电池SOC估计模型。Step 2: Using the improved grey wolf algorithm, with the minimization of the root mean square error of the model output as the objective function, the hidden layer threshold and input weight parameters of the extreme learning machine are optimized to establish a lithium battery SOC estimation model based on ICGWO optimized ELM.
在一较佳的实施例中:步骤1中,所述的ICGWO算法的改进策略为:In a preferred embodiment: in
利用混沌序列的随机性和遍历性,选择Tent映射方程产生初始种群;设置算法参数并记录当前迭代次数下的最优的前三个位置α、β和δ,其余的记为ω狼;Using the randomness and ergodicity of chaotic sequences, the Tent mapping equation is selected to generate the initial population; the algorithm parameters are set and the optimal first three positions α, β and δ under the current number of iterations are recorded, and the rest are recorded as ω wolves;
根据非线性因子调整策略确定狼群位置,以增加算法的局部搜索能力;最后对当前最优解进行柯西变异扰动,增加种群多样性,提高算法的全局搜索能力。The location of the wolf pack is determined according to the nonlinear factor adjustment strategy to increase the local search ability of the algorithm; finally, the current optimal solution is perturbed by Cauchy mutation to increase population diversity and improve the global search ability of the algorithm.
在一较佳的实施例中:步骤1中,所属的ICGWO算法的具体步骤为:In a preferred embodiment: in
步骤S11:设定ICGWO算法初始种群规模N,最大迭代次数Tmax,调节系数λ等参数,并确定优化变量的上下限;Step S11: setting the initial population size N, the maximum number of iterations T max , the adjustment coefficient λ and other parameters of the ICGWO algorithm, and determining the upper and lower limits of the optimization variables;
步骤S12:利用Tent混沌映射公式产生满足变量上下限约束的初始灰狼种群,令t=1;Step S12: using the Tent chaotic mapping formula to generate an initial gray wolf population that satisfies the upper and lower limit constraints of the variables, and setting t=1;
式中,xt为第t个狼的位置;Where xt is the position of the tth wolf;
步骤S13:计算出各个种狼的适应度,选取适应度最低的前三头种狼分别记为α、β和δ,其余的记为ω狼;Step S13: Calculate the fitness of each wolf species, select the first three wolves with the lowest fitness and record them as α, β and δ respectively, and the rest are recorded as ω wolves;
步骤S14:判断是否达到最大迭代次,是,输出α狼对应适应度,算法结束,否则跳转到步骤S15;Step S14: Determine whether the maximum number of iterations has been reached. If yes, output the fitness corresponding to the α wolf and the algorithm ends. Otherwise, jump to step S15.
步骤S15:根据式计算非线性收敛因子a,然后根据式A=2a·r1-a和C=2·r2计算出系数向量A和C;Step S15: According to the formula Calculate the nonlinear convergence factor a, and then calculate the coefficient vectors A and C according to the formula A = 2a·r 1 -a and C = 2·r 2 ;
式中,a为非线性收敛因子,A和C为系数向量;Where a is the nonlinear convergence factor, A and C are coefficient vectors;
步骤S16:根据下式依次更新灰狼群各个种狼的位置:Step S16: Update the positions of the various species of wolves in the gray wolf pack in sequence according to the following formula:
D=|C·Xp(t)-X(t)|D=|C· Xp (t)-X(t)|
X(t+1)=Xp(t)-A·DX(t+1)= Xp (t)-A·D
其中t为当前迭代次数,D表示种狼与猎物之间的距离,A和C为系数向量,Xp(t)为猎物的位置,X表示种狼的位置;特别地狼群下一次迭代中的起始出发点由下式确定;Where t is the current iteration number, D is the distance between the wolf and the prey, A and C are coefficient vectors, Xp (t) is the position of the prey, and X is the position of the wolf. In particular, the starting point of the wolf pack in the next iteration is determined by the following formula:
式中,X1,X2,X3分别为α,β和δ狼位置;Where X 1 , X 2 , and X 3 are the α, β, and δ wolf positions, respectively;
步骤S17:根据下式对α狼进行柯西变异操作,判断是否达到最大迭代次数,若未达到则返回步骤S12继续运算;Step S17: Perform Cauchy mutation operation on α wolf according to the following formula to determine whether the maximum number of iterations has been reached. If not, return to step S12 to continue the calculation;
Xg(t)=Xg(t)+η×C(0,1) Xg (t)= Xg (t)+η×C(0,1)
其中 in
式中,Xg(t)为在t代全局最优解;η为变异权重;λ为调节因子;C(0,1为比例参数t=1的柯西变异的随机数。Where Xg (t) is the global optimal solution in the tth generation; η is the mutation weight; λ is the adjustment factor; C(0,1 is the random number of the Cauchy mutation with the proportional parameter t=1.
在一较佳的实施例中:步骤2中,所属的ICGWO算法的目标函数为:In a preferred embodiment: in step 2, the objective function of the ICGWO algorithm is:
ELM模型预测输出值和实测值之间的均方误差反映了模型预测精度和泛化性能,因此,本文选取优化目标函数以ELM输出均方根误差fRMSE最小化,从而能够有效提高ELM回归模型的拟合精度和泛化性能;目标函数定义如式The mean square error between the ELM model predicted output value and the measured value reflects the model prediction accuracy and generalization performance. Therefore, this paper selects the optimization objective function to minimize the ELM output root mean square error f RMSE , which can effectively improve the fitting accuracy and generalization performance of the ELM regression model; the objective function is defined as follows:
其中,j=1,…,N,L为隐层节点数,g(x)为激励函数,wj=[wj1,wj2,…,wjn]T为第j个隐层节点和输入节点之间的权值,βj=[βj1,βj2,…,βjm]T表示第j个隐层节点和输出节点之间的权值,bj为第j个隐层节点的阈值;xi=[xi1,xi2,…,xin]T∈Rn表示输入数据,yi=yi1,yi2,…,yim]T∈Rm表示为期望输出值。Wherein, j=1,…,N, L is the number of hidden layer nodes, g(x) is the activation function, wj =[ wj1 , wj2 ,…, wjn ] T is the weight between the jth hidden layer node and the input node, βj =[ βj1 , βj2 ,…, βjm ] T is the weight between the jth hidden layer node and the output node, bj is the threshold of the jth hidden layer node; xi =[ xi1 , xi2 ,…, xin ] T∈Rn represents the input data, yi = yi1 , yi2 ,…, yim ] T∈Rm represents the expected output value.
与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
(1)本发明将改进灰狼算法和ELM相结合,利用改进灰狼算法的全局搜索能力优化ELM的参数,避免了ELM算法出现易陷入局部最优的问题。(1) The present invention combines the improved grey wolf algorithm with ELM and utilizes the global search capability of the improved grey wolf algorithm to optimize the parameters of the ELM, thereby avoiding the problem that the ELM algorithm is prone to falling into local optimality.
(2)本发明采用Tent混沌映射产生灰狼算法的初始种群,使得初始个体将尽可能均匀分布在搜索区域中,以此来提高初始种群的多样性和适应性,加快种群进化进程(2) The present invention uses Tent chaotic mapping to generate the initial population of the gray wolf algorithm, so that the initial individuals will be distributed as evenly as possible in the search area, thereby improving the diversity and adaptability of the initial population and accelerating the population evolution process.
(3)本发明采用非线性调整策略设计收敛因子,使收敛因子前期递减速度缓慢,有利于增强算法的全局探索能力;后期递减速度加快,能够有效提高算法的收敛性。(3) The present invention adopts a nonlinear adjustment strategy to design the convergence factor, so that the convergence factor decreases slowly in the early stage, which is conducive to enhancing the global exploration ability of the algorithm; and the decrease speed is accelerated in the later stage, which can effectively improve the convergence of the algorithm.
(4)本发明引入柯西变异算子,保证了灰狼算法种群的多样性,避免了早熟现象的发生。(4) The present invention introduces the Cauchy mutation operator to ensure the diversity of the Grey Wolf Algorithm population and avoid the occurrence of premature phenomenon.
(5)本发明具有更好的收敛精度和更快的收敛速度,结果表明,本发明的基于ICGWO-ELM模型的SOC预测方法,有更好的预测精度和泛化能力,能够为新能源汽车的电池管理系统提供重要的反馈信息。(5) The present invention has better convergence accuracy and faster convergence speed. The results show that the SOC prediction method based on the ICGWO-ELM model of the present invention has better prediction accuracy and generalization ability, and can provide important feedback information for the battery management system of new energy vehicles.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明优选实施例的算法流程图。FIG1 is a flow chart of an algorithm according to a preferred embodiment of the present invention.
图2为本发明优选实施例的ICGWO-ELM模型流程。FIG. 2 is an ICGWO-ELM model process of a preferred embodiment of the present invention.
图3为本发明优选实施例的模拟行驶工况时刻——速度图。FIG. 3 is a time-speed diagram of a simulated driving condition according to a preferred embodiment of the present invention.
图4为本发明优选实施例的不同算法的训练结果对比图。FIG. 4 is a diagram comparing training results of different algorithms according to a preferred embodiment of the present invention.
图5为本发明优选实施例的不同算法的估计结果对比图。FIG. 5 is a comparison diagram of estimation results of different algorithms according to a preferred embodiment of the present invention.
图6为本发明优选实施例的不同算法的相对误差比较图。FIG. 6 is a diagram comparing relative errors of different algorithms according to a preferred embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
下面结合附图及实施例对本发明做进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
应该指出,以下详细说明都是例示性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式;如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and/or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and/or their combinations.
一种基于ICGWO优化ELM的锂电池SOC估计方法参考图1至6,包括以下步骤:A lithium battery SOC estimation method based on ICGWO optimized ELM, referring to Figures 1 to 6, comprises the following steps:
步骤1:针对灰狼算法在进化后期因种群多样性迅速下降而经常遇到早熟现象和局部收敛的问题,通过引入改进策略,构建一种具有良好全局寻优性能的改进灰狼算法;Step 1: In view of the fact that the gray wolf algorithm often encounters premature phenomenon and local convergence problems due to the rapid decline of population diversity in the late stage of evolution, an improved gray wolf algorithm with good global optimization performance is constructed by introducing an improvement strategy;
步骤2:利用改进灰狼算法,以模型输出均方根误差最小化为目标函数,对极限学习机的隐层阈值及输入权值参数进行优化,建立起基于ICGWO优化ELM的锂电池SOC估计模型。Step 2: Using the improved grey wolf algorithm, with the minimization of the root mean square error of the model output as the objective function, the hidden layer threshold and input weight parameters of the extreme learning machine are optimized to establish a lithium battery SOC estimation model based on ICGWO optimized ELM.
步骤1中,所述的ICGWO算法的主要改进策略为:In
利用混沌序列的随机性和遍历性,选择Tent映射方程产生初始种群;Using the randomness and ergodicity of chaotic sequences, the Tent mapping equation is selected to generate the initial population.
其次,根据非线性因子调整策略确定狼群位置,以增加算法的局部搜索能力;最后对当前最优解进行柯西变异扰动,增加种群多样性,提高算法的全局搜索能力。Secondly, the wolf pack location is determined according to the nonlinear factor adjustment strategy to increase the local search capability of the algorithm. Finally, the current optimal solution is perturbed by Cauchy mutation to increase population diversity and improve the global search capability of the algorithm.
步骤1中,所属的ICGWO算法的具体步骤为:In
步骤S11:设定ICGWO算法初始种群规模N,最大迭代次数Tmax,调节系数λ等参数,并确定优化变量的上下限;Step S11: setting the initial population size N, the maximum number of iterations T max , the adjustment coefficient λ and other parameters of the ICGWO algorithm, and determining the upper and lower limits of the optimization variables;
步骤S12:利用Tent混沌映射公式产生满足变量上下限约束的初始灰狼种群,令t=1;Step S12: using the Tent chaotic mapping formula to generate an initial gray wolf population that satisfies the upper and lower limit constraints of the variables, and setting t=1;
式中,xt为第t个狼的位置;Where xt is the position of the tth wolf;
步骤S13:计算出各个种狼的适应度,选取适应度最低的前三头种狼分别记为α、β和δ,其余的记为ω狼;Step S13: Calculate the fitness of each wolf species, select the first three wolves with the lowest fitness and record them as α, β and δ respectively, and the rest are recorded as ω wolves;
步骤S14:判断是否达到最大迭代次,是,输出α狼对应适应度,算法结束,否则跳转到步骤S15;Step S14: Determine whether the maximum number of iterations has been reached. If yes, output the fitness corresponding to the α wolf and the algorithm ends. Otherwise, jump to step S15.
步骤S15:根据式计算非线性收敛因子a,然后根据式A=2a·r1-a和C=2·r2计算出系数向量A和C;Step S15: According to the formula Calculate the nonlinear convergence factor a, and then calculate the coefficient vectors A and C according to the formula A = 2a·r 1 -a and C = 2·r 2 ;
式中,a为非线性收敛因子,A和C为系数向量;Where a is the nonlinear convergence factor, A and C are coefficient vectors;
步骤S16:根据下式依次更新灰狼群各个种狼的位置:Step S16: Update the positions of the various species of wolves in the gray wolf pack in sequence according to the following formula:
D=|C·Xp(t)-X(t)|D=|C· Xp (t)-X(t)|
X(t+1)=Xp(t)-A·DX(t+1)= Xp (t)-A·D
其中t为当前迭代次数,D表示种狼与猎物之间的距离,A和C为系数向量,Xp(t)为猎物的位置,X表示种狼的位置;特别地狼群下一次迭代中的起始出发点由下式确定;Where t is the current iteration number, D is the distance between the wolf and the prey, A and C are coefficient vectors, Xp (t) is the position of the prey, and X is the position of the wolf. In particular, the starting point of the wolf pack in the next iteration is determined by the following formula:
式中,X1,X2,X3分别为α,β和δ狼位置;Where X 1 , X 2 , and X 3 are the α, β, and δ wolf positions, respectively;
步骤S17:根据下式对α狼进行柯西变异操作,判断是否达到最大迭代次数,若未达到则返回步骤S12继续运算;Step S17: Perform Cauchy mutation operation on α wolf according to the following formula to determine whether the maximum number of iterations has been reached. If not, return to step S12 to continue the calculation;
Xg(t)=Xg(t)+η×C(0,1) Xg (t)= Xg (t)+η×C(0,1)
其中 in
式中,Xg(t)为在t代全局最优解;η为变异权重;λ为调节因子;C(0,1)为比例参数t=1的柯西变异的随机数。Where Xg (t) is the global optimal solution in generation t; η is the mutation weight; λ is the adjustment factor; C(0,1) is the random number of the Cauchy mutation with a proportional parameter of t=1.
步骤2中,所属的ICGWO算法的目标函数为:In step 2, the objective function of the ICGWO algorithm is:
ELM模型预测输出值和实测值之间的均方误差反映了模型预测精度和泛化性能,因此,本文选取优化目标函数以ELM输出均方根误差fRMSE最小化,从而能够有效提高ELM回归模型的拟合精度和泛化性能;目标函数定义如式The mean square error between the ELM model predicted output value and the measured value reflects the model prediction accuracy and generalization performance. Therefore, this paper selects the optimization objective function to minimize the ELM output root mean square error f RMSE , which can effectively improve the fitting accuracy and generalization performance of the ELM regression model; the objective function is defined as follows:
其中,j=1,…,N,L为隐层节点数,g(x)为激励函数,wj=[wj1,wj2,…,wjn]T为第j个隐层节点和输入节点之间的权值,βj=[βj1,βj2,…,βjm]T表示第j个隐层节点和输出节点之间的权值,bj为第j个隐层节点的阈值;xi=[xi1,xi2,…,xin]T∈Rn表示输入数据,yi=[yi1,yi2,…,yim]T∈Rm表示为期望输出值。Wherein, j=1,…,N, L is the number of hidden layer nodes, g(x) is the activation function, wj =[ wj1 , wj2 ,…, wjn ] T is the weight between the jth hidden layer node and the input node, βj =[ βj1 , βj2 ,…, βjm ] T is the weight between the jth hidden layer node and the output node, bj is the threshold of the jth hidden layer node; xi =[ xi1 , xi2 ,…, xin ] T∈Rn represents the input data, yi =[ yi1 , yi2 ,…, yim ] T∈Rm represents the expected output value.
本发明具体步骤如下:The specific steps of the present invention are as follows:
S1.采集电池数据包括端电压、电流、内阻、开路电压和SOC,得到多个不同工况下的样本数据,建立训练数据集和测试数据集。S1. Collect battery data including terminal voltage, current, internal resistance, open circuit voltage and SOC, obtain sample data under multiple different working conditions, and establish training data sets and test data sets.
S2.构建包含输入层、隐含层和输出层组成的单层前馈神经网络并设置各个神经元的权值和阈值。S2. Construct a single-layer feedforward neural network consisting of an input layer, a hidden layer, and an output layer, and set the weights and thresholds of each neuron.
S3.设置灰狼算法中种群的个数与问题维度,构建表示ELM模型的灰狼种群。设置灰狼算法的最大迭代次数Tmax,适应度函数F,随机初始化灰狼算法中的种群个体位置,同时将适应度值最优的前三头狼作为初始α、β和δ狼。S3. Set the number of populations and problem dimensions in the gray wolf algorithm, and construct a gray wolf population representing the ELM model. Set the maximum number of iterations T max of the gray wolf algorithm, the fitness function F, randomly initialize the positions of the population individuals in the gray wolf algorithm, and use the top three wolves with the best fitness values as the initial α, β, and δ wolves.
S4.将构建出的ELM中的权值和阈值按顺序赋到狼群位置中每个维度的值中。将S1中所述的训练集输入到ELM中,而后通过适应度函数F来计算预测SOC的误差值。若迭代次数未达到最大迭代次数Tmax,则迭代次数t+1,否则结束迭代,输出结果。S4. Assign the weights and thresholds in the constructed ELM to the values of each dimension in the wolf pack position in order. Input the training set described in S1 into the ELM, and then calculate the error value of the predicted SOC through the fitness function F. If the number of iterations does not reach the maximum number of iterations T max , then the number of iterations is t+1, otherwise the iteration is terminated and the result is output.
S5.更新灰狼群各个种狼的位置S5. Update the location of each wolf species in the gray wolf pack
S6.对α狼进行柯西变异操作S6. Perform Cauchy mutation on α wolf
S7.将算法的输出结果作为狼群最优个体,将个体的每个维度的值赋给ELM中的权值和阈值中,即可得到优化后的ELM模型。S7. Take the output of the algorithm as the optimal individual of the wolf pack, assign the value of each dimension of the individual to the weight and threshold in ELM, and then you can get the optimized ELM model.
S8.将步骤S1中所述的测试集导入到优化后的IGGWO-ELM算法中训练,得到动力锂电池SOC预测结果。S8. Import the test set described in step S1 into the optimized IGGWO-ELM algorithm for training to obtain the power lithium battery SOC prediction result.
所述步骤S1中步骤具体包含:The steps in step S1 specifically include:
S9.先通过电池检测仪和上位机测试出多种工况下锂电池的电流,电压,温度等数据,然后根据安时积分法,计算电池在每一个时刻的SOC:S9. First, use the battery tester and the host computer to test the current, voltage, temperature and other data of the lithium battery under various working conditions, and then calculate the SOC of the battery at each moment according to the ampere-hour integration method:
式中,z(t)表示电池在t时刻的SOC,i(t)表示电池在t时刻的电流,Cn表示锂电池的名义电容量,ηi表示锂电池的库伦系数。将电流、电压、温度作为输入,SOC作为输出,构建极限学习机模型。In the formula, z(t) represents the SOC of the battery at time t, i(t) represents the current of the battery at time t, Cn represents the nominal capacity of the lithium battery, and ηi represents the Coulomb coefficient of the lithium battery. The extreme learning machine model is constructed by taking current, voltage, and temperature as input and SOC as output.
所述步骤S2中步骤具体包含:The steps in step S2 specifically include:
给定样本数据集设定ELM隐层节点数L,激励函数g(x);Given a sample dataset Set the number of ELM hidden layer nodes L and the activation function g(x);
进一步地,训练样本集其中xi=[xi1,xi2,…,xin]T∈Rn表示输入数据,yi=[yi1,yi2,…,yim]T∈Rm表示为期望输出值。如果含有L个隐层节点的ELM模型能够学习N个训练样本,且无残差存在,则存在wi使得:Furthermore, the training sample set Where x i = [ xi1 , x i2 , …, x in ] T ∈ R n represents the input data, and y i = [y i1 , y i2 , …, y im ] T ∈ R m represents the expected output value. If the ELM model with L hidden nodes can learn N training samples and there is no residual, then there exists wi such that:
其中,j=1,…,N,L为隐层节点数,g(x)为Sigmoid函数,wj=[wj1,wj2,…,wjn]T为第j个隐层节点和输入节点之间的权值,βj=[βj1,βj2,…,βjm]T表示第j个隐层节点和输出节点之间的权值,bj为第j个隐层节点的阈值。Among them, j = 1,…,N, L is the number of hidden layer nodes, g(x) is the Sigmoid function, w j = [w j1 ,w j2 ,…,w jn ] T is the weight between the jth hidden layer node and the input node, β j = [β j1 ,β j2 ,…,β jm ] T represents the weight between the jth hidden layer node and the output node, and b j is the threshold of the jth hidden layer node.
进一步地,公式可改写为矩阵向量形式:Hβ=YFurthermore, the formula can be rewritten as a matrix vector form: Hβ=Y
其中:in:
由此,隐层节点和输出层节点之间的连接权值β可由下式的极小二范数最小二乘解得:Therefore, the connection weight β between the hidden layer nodes and the output layer nodes can be obtained by the minimum two-norm least squares solution of the following formula:
其中H+为隐层输出矩阵H的广义逆矩阵。Where H + is the generalized inverse matrix of the hidden layer output matrix H.
所述步骤S3中随机初始化灰狼算法中的种群个体位置步骤具体包含:The step of randomly initializing the positions of individuals in the population in the grey wolf algorithm in step S3 specifically includes:
运用Tent映射方程产生初始种群,能够使得初始个体将尽可能均匀分布在搜索区域中,具体公式为:Using the Tent mapping equation to generate the initial population can make the initial individuals distributed as evenly as possible in the search area. The specific formula is:
所述步骤S4中适应度函数F具体是指:The fitness function F in step S4 specifically refers to:
优化目标函数以ELM输出均方根误差(fRMSE)最小化,从而能够有效提高ELM回归模型的拟合精度和泛化性能。目标函数定义如下:The objective function is optimized to minimize the root mean square error (f RMSE ) of the ELM output, which can effectively improve the fitting accuracy and generalization performance of the ELM regression model. The objective function is defined as follows:
所述步骤S4中更新灰狼群各个种狼的位置具体是指:The updating of the positions of the various species of wolves in the gray wolf pack in step S4 specifically refers to:
灰狼群各个种狼的位置更新公式如下:The position update formula of each wolf species in the gray wolf pack is as follows:
D=|C·Xp(t)-X(t)|D=|C· Xp (t)-X(t)|
X(t+1)=Xp(t)-A·DX(t+1)= Xp (t)-A·D
其中t为当前迭代次数,D表示种狼与猎物之间的距离,A和C为系数向量,Xp(t)为猎物的位置,X表示种狼的位置。A和C由下式计算得到:Where t is the current iteration number, D is the distance between the wolf and the prey, A and C are coefficient vectors, Xp (t) is the position of the prey, and X is the position of the wolf. A and C are calculated by the following formula:
A=2a·r1-aA=2a·r 1 -a
C=2·r2 C=2· r2
式中,a为2到0线性递减的收敛因子,由式(5)计算得到,r1和r2是[0,1]中的随机向量。Where a is a convergence factor that decreases linearly from 2 to 0, calculated by equation (5), and r1 and r2 are random vectors in [0,1].
其中,t为当前迭代次数,Tmax为最大迭代次数。Among them, t is the current iteration number, and T max is the maximum iteration number.
所述步骤S5中对α狼进行柯西变异操作具体是指:The Cauchy mutation operation on the α wolf in step S5 specifically refers to:
柯西变异算子以维持进化过程中种群的多样性和算法收敛性之间的平衡,变异公式如下式:The Cauchy mutation operator is used to maintain a balance between the diversity of the population and the convergence of the algorithm during the evolution process. The mutation formula is as follows:
Xg(t)=Xg(t)+η×C(0,1) Xg (t)= Xg (t)+η×C(0,1)
式中,Xg(t)——在t代全局最优解;Where, X g (t) – the global optimal solution in generation t;
η——变异权重;η——variation weight;
λ——调节因子;λ——regulation factor;
C(0,1)——比例参数t=1的柯西变异的随机数。C(0,1)——Cauchy mutation of random numbers with scale parameter t=1.
具体来说:Specifically:
S1:本发明为达到预估动力电池SOC的目的,算法流程如图1所示,电池荷电状态ICGWO-ELM估计模型流程如图2所示,动力电池的工况数据采用美国城市动态循环驱动工况(UDDS),其时刻——速度图如图3所示。S1: In order to achieve the purpose of estimating the SOC of the power battery, the algorithm flow of the present invention is shown in FIG1 , the battery state of charge ICGWO-ELM estimation model flow is shown in FIG2 , and the operating condition data of the power battery adopts the American Urban Dynamic Drive Cycle (UDDS), and its time-speed diagram is shown in FIG3 .
S2:将模拟测试工况分别运行一次,得到相对应的数据,选择电流、端电压、内阻、开路电压和电池温度作为输入,SOC作为输出,构成一个5输入单输出的ELM模型。采样频率设置为1Hz。UDDS工况共有1370组样本。由于锂电池在低SOC阶段由于极化效应导致数据不准确,所以选择前1000组数据作为样本。筛选出750组数据作为训练集,其余250组数据作为测试集。S2: Run the simulation test conditions once to obtain the corresponding data, select current, terminal voltage, internal resistance, open circuit voltage and battery temperature as input, and SOC as output to form a 5-input single-output ELM model. The sampling frequency is set to 1Hz. There are 1370 sets of samples in the UDDS condition. Since the data of lithium batteries is inaccurate due to the polarization effect in the low SOC stage, the first 1000 sets of data are selected as samples. 750 sets of data are selected as training sets, and the remaining 250 sets of data are used as test sets.
由于各个输入输出的数量级差距较大,用于训练的样本先由下式进行归一化,然后再进行训练。Since the order of magnitude of each input and output differs greatly, the samples used for training are first normalized by the following formula before training.
式中X为待归一化数据;Xmin——归一化数据组中的最小值;Xmax——归一化数据组中的最大值;X′——归一化后的数据。Where X is the data to be normalized; X min is the minimum value in the normalized data set; X max is the maximum value in the normalized data set; X′ is the normalized data.
S3:进一步地为了验证本文提出的基于ICGWO-ELM电池SOC估计模型的有效性,首先根据训练样本利用ICGWO算法确定ELM回归模型的最优初始输入权值和隐层阈值,然后再利用测试数据样本进行电池SOC预测,最后将预测结果与IGWO-ELM、GWO-ELM模型、PSO-ELM模型、ELM模型的预测结果进行对比。在仿真实验中,种群规模N=30,最大迭代次数Tmax=200,ICGWO算法中,调节因子λ=1000;PSO算法学习因子c1=c2=2。ICGWO-ELM、GWO-ELM、PSO-ELM和ELM四种回归模型中隐层节点个数均取L=10,得到的结果对比见图4,图5。S3: To further verify the effectiveness of the ICGWO-ELM battery SOC estimation model proposed in this paper, the optimal initial input weights and hidden layer thresholds of the ELM regression model are first determined using the ICGWO algorithm based on the training samples, and then the battery SOC is predicted using the test data samples. Finally, the prediction results are compared with those of the IGWO-ELM, GWO-ELM, PSO-ELM, and ELM models. In the simulation experiment, the population size N = 30, the maximum number of iterations T max = 200, the adjustment factor λ = 1000 in the ICGWO algorithm, and the learning factor c 1 = c 2 = 2 in the PSO algorithm. The number of hidden layer nodes in the four regression models of ICGWO-ELM, GWO-ELM, PSO-ELM, and ELM is L = 10, and the results are compared in Figures 4 and 5.
S4:进一步地为了清晰的反映SOC估计结果的准确程度,由下式计算得到相对误差进行比较,得到结果如图6。S4: In order to further clearly reflect the accuracy of the SOC estimation result, the relative error is calculated by the following formula for comparison, and the result is shown in Figure 6.
式中,ε——相对误差,yi——第i项数据的真实值,——第i项数据的预测值。In the formula, ε is the relative error, y i is the true value of the i-th data, ——The predicted value of the ith data item.
从图中可以看出,ELM模型全程误差最大,PSO-ELM模型的精度较ELM有较大提升,但中后期产生了发散现象,使得误差升高。GWO—ELM、IGWO-ELM和ICGWO-ELM总体预测效果要优于前两种算法,GWO-ELM在预测中后期的误差虽然低于PSO-ELM,但仍然高于IGWO-ELM和ICGWO-ELM。ICGWO-ELM模型成功的将相对误差控制在2%以内,几乎所有样本点上的预测值都与实际值非常接近。这表明ICGWO-ELM模型的SOC估计效果显著优于其他四种模型。As can be seen from the figure, the ELM model has the largest error throughout the process, and the accuracy of the PSO-ELM model is greatly improved compared with the ELM, but divergence occurs in the middle and late stages, which increases the error. The overall prediction effect of GWO-ELM, IGWO-ELM and ICGWO-ELM is better than that of the first two algorithms. Although the error of GWO-ELM in the middle and late stages of prediction is lower than that of PSO-ELM, it is still higher than that of IGWO-ELM and ICGWO-ELM. The ICGWO-ELM model successfully controls the relative error within 2%, and the predicted values at almost all sample points are very close to the actual values. This shows that the SOC estimation effect of the ICGWO-ELM model is significantly better than that of the other four models.
S5.为了更准确地评估所提出的模型的性能,使用误差指标平均绝对误差(MAE)、平均相对误差(MRE)和均方根误差(RMSE)来评价软测量模型。表达式分别为下式:S5. In order to more accurately evaluate the performance of the proposed model, the error indicators mean absolute error (MAE), mean relative error (MRE) and root mean square error (RMSE) are used to evaluate the soft sensor model. The expressions are as follows:
式中,N表示样本数;yi表示第i个样本的实际值;表示第i个样本的预测值。性能指标计算结果如表1所示:Where N represents the number of samples; yi represents the actual value of the i-th sample; Represents the predicted value of the i-th sample. The performance index calculation results are shown in Table 1:
表1四种电池SOC估计模型性能比较结果Table 1 Performance comparison results of four battery SOC estimation models
从表中可以看出,ICGWO性能最优,精度最高。这说明ICGWO-ELM电池SOC估计模型具有较高的预报精度和较强的泛化能力。It can be seen from the table that ICGWO has the best performance and the highest accuracy, which shows that the ICGWO-ELM battery SOC estimation model has high prediction accuracy and strong generalization ability.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211628353.7A CN115963407A (en) | 2022-12-17 | 2022-12-17 | A lithium battery SOC estimation method based on ICGWO optimized ELM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211628353.7A CN115963407A (en) | 2022-12-17 | 2022-12-17 | A lithium battery SOC estimation method based on ICGWO optimized ELM |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115963407A true CN115963407A (en) | 2023-04-14 |
Family
ID=87362592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211628353.7A Pending CN115963407A (en) | 2022-12-17 | 2022-12-17 | A lithium battery SOC estimation method based on ICGWO optimized ELM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115963407A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117276600A (en) * | 2023-09-05 | 2023-12-22 | 淮阴工学院 | PSO-GWO-DELM-based proton exchange membrane fuel cell system fault diagnosis method |
CN117726461A (en) * | 2024-02-07 | 2024-03-19 | 湖南招采猫信息技术有限公司 | Financial risk prediction method and system for electronic recruitment assistance |
CN118469147A (en) * | 2024-05-29 | 2024-08-09 | 山东大学 | Intelligent prediction method and system for power demand of fuel cell hybrid power assembly |
-
2022
- 2022-12-17 CN CN202211628353.7A patent/CN115963407A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117276600A (en) * | 2023-09-05 | 2023-12-22 | 淮阴工学院 | PSO-GWO-DELM-based proton exchange membrane fuel cell system fault diagnosis method |
CN117276600B (en) * | 2023-09-05 | 2024-06-11 | 淮阴工学院 | Fault diagnosis method of proton exchange membrane fuel cell system based on PSO-GWO-DELM |
CN117726461A (en) * | 2024-02-07 | 2024-03-19 | 湖南招采猫信息技术有限公司 | Financial risk prediction method and system for electronic recruitment assistance |
CN118469147A (en) * | 2024-05-29 | 2024-08-09 | 山东大学 | Intelligent prediction method and system for power demand of fuel cell hybrid power assembly |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110341690B (en) | PHEV energy management method based on deterministic strategy gradient learning | |
CN109993270B (en) | Lithium-ion battery remaining life prediction method based on gray wolf pack optimized LSTM network | |
CN115963407A (en) | A lithium battery SOC estimation method based on ICGWO optimized ELM | |
CN113253116A (en) | Lithium ion battery state of charge estimation method and storage medium | |
CN116804706B (en) | A method and device for predicting temperature of lithium battery in electric vehicle | |
CN108510074A (en) | A kind of implementation method for improving GWO algorithms | |
CN111458646A (en) | A Lithium Battery SOC Estimation Method Based on PSO-RBF Neural Network | |
CN115219906B (en) | Multi-model fusion battery state of charge prediction method and system based on GA-PSO optimization | |
CN110888059A (en) | An Algorithm Based on Improved Random Forest Combined Volumetric Kalman Power Battery State of Charge Estimation | |
Ge et al. | A novel data-driven IBA-ELM model for SOH/SOC estimation of lithium-ion batteries | |
CN115308606B (en) | A method for estimating the health state of lithium-ion batteries based on neighboring features | |
CN113884936A (en) | A method for predicting the state of health of lithium-ion batteries based on ISSA coupled DELM | |
CN116774088A (en) | Lithium ion battery health state estimation method based on multi-objective optimization | |
CN113687242A (en) | Lithium ion battery SOH estimation method for optimizing and improving GRU neural network based on GA algorithm | |
CN112526354A (en) | Lithium battery health state estimation method | |
CN117572236A (en) | A method for estimating the state of charge of lithium batteries based on transfer learning | |
Zhang et al. | Lithium battery SOC prediction based on mproved BP eural etwork algorithm | |
Lyu et al. | State-of-charge estimation of lithium-ion batteries based on deep neural network | |
CN114895206A (en) | SOH estimation method of lithium-ion battery based on RBF neural network based on improved gray wolf optimization algorithm | |
CN116029183A (en) | A power battery temperature prediction method based on iPSO-LSTM model | |
CN119538741B (en) | A method, system, device and medium for optimizing global trajectory of battery temperature in electric vehicles | |
CN110232432B (en) | Lithium battery pack SOC prediction method based on artificial life model | |
CN118980954B (en) | A SOH estimation method for lithium-ion batteries based on impedance feature selection and optimized support vector regression | |
CN113376541B (en) | Lithium ion battery health state prediction method based on CRJ network | |
CN113495214B (en) | A method for estimating the state of charge of a supercapacitor based on a temperature change model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |