[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116559673A - Lithium battery SOC estimation method based on IGWO-EKF algorithm - Google Patents

Lithium battery SOC estimation method based on IGWO-EKF algorithm Download PDF

Info

Publication number
CN116559673A
CN116559673A CN202310280794.0A CN202310280794A CN116559673A CN 116559673 A CN116559673 A CN 116559673A CN 202310280794 A CN202310280794 A CN 202310280794A CN 116559673 A CN116559673 A CN 116559673A
Authority
CN
China
Prior art keywords
wolf
algorithm
lithium battery
ekf
wolves
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
Application number
CN202310280794.0A
Other languages
Chinese (zh)
Inventor
刘勇
任芳
黎民昊
蒋瞻
李小蝶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiangtan University
Original Assignee
Xiangtan University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xiangtan University filed Critical Xiangtan University
Priority to CN202310280794.0A priority Critical patent/CN116559673A/en
Publication of CN116559673A publication Critical patent/CN116559673A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/367Software therefor, e.g. for battery testing using modelling or look-up tables
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/382Arrangements for monitoring battery or accumulator variables, e.g. SoC
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/385Arrangements for measuring battery or accumulator variables
    • G01R31/387Determining ampere-hour charge capacity or SoC

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electric Status Of Batteries (AREA)

Abstract

The invention discloses a lithium battery SOC estimation method based on an improved gray wolf algorithm and an optimized EKF algorithm, which comprises the following steps: establishing a first-order Thevenin equivalent circuit model, and carrying out parameter identification; fitting a correlation curve between the open-circuit voltage and the state of charge of the lithium battery based on an HHPC experiment; introducing a Levy flight strategy in a Tent chaotic map and a cuckoo algorithm, and improving a traditional gray wolf algorithm; optimizing a noise covariance matrix in a traditional EKF algorithm by using an improved gray wolf algorithm to obtain an optimal noise covariance matrix; and inputting the obtained optimal noise covariance matrix into an EKF algorithm to perform lithium battery SOC estimation. According to the improved gray-wolf algorithm-based lithium battery SOC estimation method for optimizing the EKF algorithm, disclosed by the invention, the accuracy of lithium battery SOC estimation is improved, and the accuracy and speed of the optimizing algorithm are improved while noise optimizing is completed through the improvement of the gray-wolf algorithm.

Description

一种基于IGWO-EKF算法的锂电池SOC估算方法A lithium battery SOC estimation method based on IGWO-EKF algorithm

技术领域technical field

本发明属于锂电池SOC估算技术领域,具体涉及一种基于IGWO-EKF的锂电池SOC估算方法。The invention belongs to the technical field of lithium battery SOC estimation, in particular to an IGWO-EKF-based lithium battery SOC estimation method.

背景技术Background technique

近年来,随着能源危机和环境污染问题不断升级,可再生能源代替传统化石能源的需求日益增强。锂电池因具有能量比高、自放电率低和绿色环保等优势,已成为电动汽车能量储存装置的第一选择。电池荷电状态(State of Charge,SOC)的准确估计不仅能够提供与电池性能相关的信息,而且还能够提高电池运行过程中的可靠性与安全性。由于锂电池的内部反应复杂且非线性和时变性强,无法对其SOC进行直接测量,需要一系列的状态估计。由于充放电速率、放电过程、温度等诸多因素的存在,锂电池SOC估算的精度和鲁棒性受到了较大影响。In recent years, with the escalation of energy crisis and environmental pollution, the demand for renewable energy to replace traditional fossil energy has been increasing. Lithium batteries have become the first choice of energy storage devices for electric vehicles due to their advantages such as high energy ratio, low self-discharge rate, and environmental protection. Accurate estimation of battery state of charge (State of Charge, SOC) can not only provide information related to battery performance, but also improve reliability and safety during battery operation. Due to the complex, nonlinear and time-varying internal reactions of lithium batteries, the SOC cannot be directly measured, and a series of state estimations are required. Due to the existence of many factors such as charge and discharge rate, discharge process, temperature, etc., the accuracy and robustness of lithium battery SOC estimation are greatly affected.

目前,围绕锂电池SOC估算的方法较多。其中安时积分法是预测电池剩余容量最基本的方法,该方法在电池放电时对电流进行积分,用电池额定容量减去积分值即可得到电池剩余容量。但是安时积分法具有开环特性,测量电流时容易因误差累积而发散。此外还有开路电压法预测电池剩余容量,通过采集经过长时间静置后的电池端电压,再进行查表或映射关系来反推电池当前的剩余容量。但是开路电压法必须在电池长时间静置达到稳定状态后才能进行准确测量估算,不适合处于连续工作状态下的电池。内阻测量法通过测量电池当前内阻值来预测剩余容量,但是该方法需要专用测量设备,且电池工作时使用内阻测量法会产生较大误差。相比于前面三种方法,扩展卡尔曼滤波(Extended Kalman Filter,EKF)算法具有估算精度高、计算量小等优点,是目前锂电池SOC估算的研究热点。At present, there are many methods for estimating the SOC of lithium batteries. Among them, the ampere-hour integration method is the most basic method to predict the remaining capacity of the battery. This method integrates the current when the battery is discharging, and subtracts the integral value from the rated capacity of the battery to obtain the remaining capacity of the battery. However, the ampere-hour integration method has an open-loop characteristic, and it is easy to diverge due to error accumulation when measuring current. In addition, there is an open-circuit voltage method to predict the remaining capacity of the battery. By collecting the terminal voltage of the battery after a long period of rest, and then performing a table lookup or mapping relationship to reverse the current remaining capacity of the battery. However, the open circuit voltage method can only be accurately measured and estimated after the battery has been left to stand for a long time to reach a stable state, and it is not suitable for batteries that are in continuous operation. The internal resistance measurement method predicts the remaining capacity by measuring the current internal resistance of the battery, but this method requires special measuring equipment, and the internal resistance measurement method will produce large errors when the battery is working. Compared with the previous three methods, the Extended Kalman Filter (EKF) algorithm has the advantages of high estimation accuracy and small calculation amount, and is currently a research hotspot in lithium battery SOC estimation.

EKF算法需要提前设置过程噪声协方差矩阵Q和测量噪声协方差矩阵R,目前通常的做法是在使用时通过多次尝试再随机选取。然而,随机选取噪声协方差矩阵,不仅会影响状态变量修正速率和估算精度,甚至还会导致EKF算法无法收敛。The EKF algorithm needs to set the process noise covariance matrix Q and the measurement noise covariance matrix R in advance. At present, the usual practice is to select randomly after multiple attempts. However, random selection of the noise covariance matrix will not only affect the state variable correction rate and estimation accuracy, but even cause the EKF algorithm to fail to converge.

发明内容Contents of the invention

针对现有技术的不足,本发明提供一种基于IGWO-EKF的锂电池SOC估算方法,该方法基于改进灰狼算法,对EKF算法中的过程噪声协方差矩阵Q和测量噪声协方差矩阵R进行在线优化,选取当前工况下的最优噪声矩阵,能够提高锂电池的SOC估算精度。Aiming at the deficiencies of the prior art, the present invention provides a lithium battery SOC estimation method based on IGWO-EKF. The method is based on the improved gray wolf algorithm, and the process noise covariance matrix Q and the measurement noise covariance matrix R in the EKF algorithm are Online optimization, selecting the optimal noise matrix under the current working conditions, can improve the SOC estimation accuracy of lithium batteries.

本发明提供一种基于IGWO-EKF的锂电池SOC估算方法,包括以下步骤:The present invention provides a method for estimating the SOC of a lithium battery based on IGWO-EKF, comprising the following steps:

步骤1,建立锂电池一阶Thevenin等效电路模型,其状态方程模型为:Step 1, establish the first-order Thevenin equivalent circuit model of the lithium battery, and its state equation model is:

其中,R0为欧姆内阻,R1为极化电阻,C1为极化电容,U1为电容C1两端电压,UL为电池端电压,Uocv为开路电压;Among them, R 0 is the ohmic internal resistance, R 1 is the polarization resistance, C 1 is the polarization capacitance, U 1 is the voltage across the capacitor C 1 , U L is the battery terminal voltage, U ocv is the open circuit voltage;

步骤2,对锂电池一阶Thevenin等效电路模型进行参数辨识,分别得到开路电压Uocv与SOC的关系函数、欧姆内阻R0与SOC的关系函数、极化电阻R1与SOC的关系函数以及极化电容C1与SOC的关系函数;Step 2: Carry out parameter identification on the first-order Thevenin equivalent circuit model of the lithium battery, and obtain the relationship function between open circuit voltage U ocv and SOC, the relationship function between ohmic internal resistance R 0 and SOC, and the relationship function between polarization resistance R 1 and SOC And the relationship function between polarization capacitance C 1 and SOC;

步骤3,在灰狼算法(Grey Wolf Optimization,GWO)的基础上引入Tent混沌映射初始化灰狼种群,并引入布谷鸟算法(Cuckoo Search,CS)中的Levy飞行策略,增强灰狼算法的全局搜索能力与搜索速度,得到改进后的灰狼算法(IGWO);Step 3: On the basis of the Gray Wolf Optimization (GWO), introduce the Tent chaotic map to initialize the gray wolf population, and introduce the Levy flight strategy in the Cuckoo Search (CS) to enhance the global search of the Gray Wolf Algorithm Ability and search speed, get the improved gray wolf algorithm (IGWO);

步骤4,使用步骤3所述的IGWO算法对EKF算法中的过程噪声协方差矩阵Q和测量噪声协方差矩阵R进行在线优化,得到最优的过程噪声协方差矩阵Qk和最优的测量噪声协方差矩阵RkStep 4, use the IGWO algorithm described in step 3 to optimize the process noise covariance matrix Q and the measurement noise covariance matrix R in the EKF algorithm online, and obtain the optimal process noise covariance matrix Q k and the optimal measurement noise covariance matrix R k ;

步骤5,将步骤2得到的参数辨识结果更新锂电池一阶Thevenin等效电路模型,将步骤4得到的最优过程噪声协方差矩阵Qk和最优测量噪声协方差矩阵Rk输入EKF算法,进行锂电池SOC估计,得到不同时刻的锂电池SOC估算值,本步骤具体为:Step 5, update the first-order Thevenin equivalent circuit model of the lithium battery with the parameter identification results obtained in step 2, and input the optimal process noise covariance matrix Q k and the optimal measurement noise covariance matrix R k obtained in step 4 into the EKF algorithm, Estimate the SOC of the lithium battery to obtain the estimated value of the SOC of the lithium battery at different times. This step is specifically as follows:

步骤5.1,假定k时刻系统状态量为xk,系统输入为uk,系统观测量为yk以f(xk,uk)作为系统状态方程,g(xk,uk)为量测方程,得模型系统离散化空间方程为:Step 5.1, assuming that the system state quantity at time k is x k , the system input is u k , the system observation is y k , f(x k ,u k ) is the system state equation, and g(x k ,u k ) is the measurement Equation, the discretization space equation of the model system is:

其中,Dk=R0,kIk,xk=[SOCkU1,k]T,wk为系统过程噪声,vk为系统测量噪声;in, D k =R 0,k I k , x k =[SOC k U 1,k ] T , w k is the system process noise, v k is the system measurement noise;

步骤5.2,设定初值,将步骤4得到的最优过程噪声协方差矩阵Qk和最优测量噪声协方差矩阵Rk作为初值,将状态向量和误差协方差初始化为:Step 5.2, set the initial value, the optimal process noise covariance matrix Q k and the optimal measurement noise covariance matrix R k obtained in step 4 are used as initial values, and the state vector and error covariance are initialized as:

步骤5.3,根据步骤5.2设定的初值启动EKF递推算法,代入步骤5.1确定的锂电池一阶离散化空间方程,得到k时刻状态变量预测矩阵和误差协方差预测矩阵Pk|k-1为:Step 5.3, start the EKF recursive algorithm according to the initial value set in step 5.2, and substitute the first-order discretization space equation of the lithium battery determined in step 5.1 to obtain the state variable prediction matrix at time k And the error covariance prediction matrix P k|k-1 is:

步骤5.4,计算EKF算法的增益状态矩阵KkStep 5.4, calculate the gain state matrix K k of the EKF algorithm:

步骤5.5,根据k时刻的端电压值yk和EKF算法的增益状态矩阵Kk,得到k时刻更新的状态变量输出矩阵和更新的误差协方差矩阵PkStep 5.5, according to the terminal voltage value y k at time k and the gain state matrix K k of the EKF algorithm, obtain the state variable output matrix updated at time k and the updated error covariance matrix P k :

其中,I为单位矩阵;Among them, I is the identity matrix;

由此可求得k时刻锂电池SOC值SOCkThus, the lithium battery SOC value SOC k at time k can be obtained;

步骤5.6,令k=k+1,并返回步骤5.3,开始下一轮锂电池SOC估算,如此迭代即可得到每一时刻的锂电池SOC值。In step 5.6, set k=k+1, and return to step 5.3 to start the next round of lithium battery SOC estimation, so that the lithium battery SOC value at each moment can be obtained through such iterations.

优选的,所述步骤3的IGWO算法具体包括以下步骤:Preferably, the IGWO algorithm in step 3 specifically includes the following steps:

步骤3.1,在灰狼算法中,首先随机生成一个规模为N的灰狼种群,通过计算每个个体的适应度值确定种群α、β和δ狼,剩下的灰狼则称为ω狼,在迭代过程中,α、β和δ狼预测猎物的位置,指挥狼群依据猎物的位置更新自身的位置;Step 3.1, in the gray wolf algorithm, first randomly generate a population of gray wolves with a size N, and determine the populations α, β, and δ wolves by calculating the fitness value of each individual, and the remaining gray wolves are called ω wolves. In the iterative process, α, β and δ wolves predict the position of the prey, and instruct the wolves to update their own position according to the position of the prey;

优选的,为了改善初始种群分布的效果,增加种群的多样性,加快算法的寻优速度,所述步骤3.1采用混沌映射函数产生混沌序列作为初始种群个体的位置,混沌序列Tent映射表达式如下:Preferably, in order to improve the effect of the initial population distribution, increase the diversity of the population, and speed up the optimization speed of the algorithm, the step 3.1 uses the chaotic mapping function to generate the chaotic sequence as the position of the initial population individual, and the chaotic sequence Tent mapping expression is as follows:

其中,u=0.5,灰狼种群个体混沌初始化后,对不同的参数有近似一致的分布密度;Among them, u=0.5, after the individual chaos initialization of the gray wolf population, there is approximately the same distribution density for different parameters;

步骤3.2,狼群在搜索猎物的过程中,会逐渐形成一个包围圈围困猎物,该行为的模型如下:In step 3.2, during the process of searching for prey, wolves will gradually form an encirclement to encircle the prey. The model of this behavior is as follows:

其中,t代表当前迭代次数,tmax为最大迭代次数,表示灰狼与猎物之间的距离,和/>分别为猎物的位置和灰狼的位置,/>和/>为模在[0,1]的随机数,/>为收敛因子,随着不断迭代从2线性减小到0;Among them, t represents the current iteration number, t max is the maximum iteration number, Indicates the distance between a gray wolf and its prey, and /> are the location of the prey and the location of the gray wolf, respectively, /> and /> is a random number modulo [0,1], /> is the convergence factor, which decreases linearly from 2 to 0 with continuous iterations;

步骤3.3,确定猎物位置后,β和δ狼在α狼的指挥下包围猎物,引入CS算法,重新调整α、β和δ狼的位置,其他灰狼个体随之移动,并定义狼群中ω狼向α、β和δ狼靠近的步长,该行为的模型如下:Step 3.3, after determining the location of the prey, the β and δ wolves encircle the prey under the command of the α wolf, introduce the CS algorithm, readjust the positions of the α, β and δ wolves, and other gray wolves move accordingly, and define ω The step size for the wolf to approach the α, β and δ wolves. The model of this behavior is as follows:

其中,和/>分别为采用Levy飞行策略更新后灰狼种群中α、β和δ狼的位置向量,/>为其他灰狼的位置,/>和/>分别代表当前的灰狼与α、β和δ狼之间的距离;in, and /> are the position vectors of α, β, and δ wolves in the gray wolf population after updating with the Levy flight strategy, /> for the location of other gray wolves, /> and /> represent the distances between the current gray wolf and α, β and δ wolves, respectively;

优选的,所述步骤3.3中采用CS算法的灰狼位置更新策略为:Preferably, the gray wolf position update strategy using the CS algorithm in the step 3.3 is:

其中,为Levy随机搜索路径,λ为步长调节系数,Lv为飞行步长;in, is the Levy random search path, λ is the step size adjustment coefficient, and L v is the flight step size;

步骤3.4,灰狼在追逐猎物的过程中,会不断地压缩猎物的活动范围,迫使其停止移动,当猎物停止时,狼群开始攻击,攻击猎物的过程可以表述为:收敛因子a逐渐减小,的值在[-a,a]内变化,当/>的值在[-1,1]区间外时,表示狼群在搜索猎物的位置,当/>的值在[-1,1]区间内时,表示狼群向猎物发起攻击;Step 3.4, during the process of chasing the prey, the gray wolf will continuously compress the range of activities of the prey, forcing it to stop moving. When the prey stops, the wolves start to attack. The process of attacking the prey can be expressed as: the convergence factor a gradually decreases , The value of changes in [-a, a], when /> When the value of is outside the interval [-1,1], it means that the wolves are searching for prey. When /> When the value of is in the interval [-1,1], it means that the wolves attack the prey;

步骤3.5,依据所述式(8)和式(11)更新狼群位置信息,如果α狼已达到最大迭代次数或者满足迭代循环结束条件,则停止循环,输出α狼坐标信息即为寻找到的最优解;Step 3.5: Update the position information of the wolves according to the formula (8) and formula (11). If the alpha wolf has reached the maximum number of iterations or meets the end condition of the iterative loop, stop the loop and output the coordinate information of the alpha wolf as the found Optimal solution;

优选的,所述步骤4中对EKF算法中的过程噪声协方差矩阵Q和测量噪声协方差矩阵R进行在线优化的具体步骤为:Preferably, the specific steps for online optimization of the process noise covariance matrix Q and the measurement noise covariance matrix R in the EKF algorithm in the step 4 are:

步骤4.1,初始时设定灰狼种群规模N、最大迭代次数tmax、寻优变量维度Dim、搜索范围[lb,lu],初始化灰狼种群的位置;Step 4.1, initially set the gray wolf population size N, the maximum number of iterations t max , the optimization variable dimension Dim, the search range [lb, lu], and initialize the position of the gray wolf population;

步骤4.2,计算每个灰狼个体的适应度值,即锂电池一阶Thevenin模型的累计电压误差最小值,并在当前灰狼群体中找出最优解α狼、次最优解β狼和第三最优解δ狼;Step 4.2, calculate the fitness value of each gray wolf individual, that is, the minimum value of the cumulative voltage error of the first-order Thevenin model of the lithium battery, and find out the optimal solution α wolf, suboptimal solution β wolf and The third optimal solution δ wolf;

优选的,所述步骤4.2中适应度函数设置为:Preferably, in the step 4.2, the fitness function is set to:

其中,表示端电压测量方程的预测值,yk表示端电压测量值,L为离散频率点的最大采样点数;in, Represents the predicted value of the terminal voltage measurement equation, y k represents the measured value of the terminal voltage, and L is the maximum number of sampling points at discrete frequency points;

步骤4.3,将最优解α狼对应的Q和R的值代入模型中,求得锂电池一阶Thevenin模型的初始累计电压误差;In step 4.3, the values of Q and R corresponding to the optimal solution α wolf are substituted into the model to obtain the initial cumulative voltage error of the first-order Thevenin model of the lithium battery;

步骤4.4,每次循环采用CS算法调整α、β和δ狼的位置;Step 4.4, using the CS algorithm to adjust the positions of α, β and δ wolves in each cycle;

步骤4.5,每次循环结束后,将本次循环得到的锂电池一阶Thevenin模型的累计电压误差与上次循环求得的最小累计误差相比较,取较小值作为当前锂电池一阶Thevenin模型的最小累计电压误差;Step 4.5, after each cycle, compare the cumulative voltage error of the lithium battery first-order Thevenin model obtained in this cycle with the minimum cumulative error obtained in the previous cycle, and take the smaller value as the current lithium battery first-order Thevenin model The minimum cumulative voltage error;

步骤4.6,重复执行步骤4.2至步骤4.5,直到达到所设置的最大迭代次数,迭代结束后,当前α狼对应的Q和R的值即为最优过程噪声协方差矩阵Qk和最优测量噪声协方差矩阵RkStep 4.6, repeat step 4.2 to step 4.5 until the set maximum number of iterations is reached. After the iteration, the values of Q and R corresponding to the current α wolf are the optimal process noise covariance matrix Q k and the optimal measurement noise covariance matrix R k ;

与现有技术相比,本发明的有益效果是:Compared with prior art, the beneficial effect of the present invention is:

1、利用IGWO算法对EKF算法的过程噪声协方差矩阵Q和测量噪声协方差矩阵R进行优化,能够克服随机选取噪声协方差矩阵对状态变量修正速率和估计精度的不利影响,加快EKF算法的收敛速度;1. Using the IGWO algorithm to optimize the process noise covariance matrix Q and measurement noise covariance matrix R of the EKF algorithm can overcome the adverse effects of randomly selecting the noise covariance matrix on the state variable correction rate and estimation accuracy, and accelerate the convergence of the EKF algorithm speed;

2、引入Tent混沌映射初始化灰狼种群,使初始种群位置在搜索空间分布更加均匀,提高种群多样性;2. Introduce the Tent chaotic map to initialize the gray wolf population, so that the initial population position is more evenly distributed in the search space, and the population diversity is improved;

3、针对GWO算法位置更新公式仅受精英狼影响,种群容易陷入局部最优的问题,引入CS算法中的Levy飞行策略,降低种群陷入局部最优的风险;3. In view of the problem that the position update formula of the GWO algorithm is only affected by elite wolves, and the population is prone to fall into local optimum, the Levy flight strategy in the CS algorithm is introduced to reduce the risk of the population falling into local optimum;

4、本发明采用IGWO算法能够获取噪声协方差矩阵的最优解,再结合EKF算法提高锂电池SOC估算的准确性,具有广阔的应用前景。4. The present invention adopts the IGWO algorithm to obtain the optimal solution of the noise covariance matrix, and then combines the EKF algorithm to improve the accuracy of lithium battery SOC estimation, which has broad application prospects.

附图说明Description of drawings

图1为本发明提出的基于IGWO-EKF算法的锂电池SOC估算方法的流程图;Fig. 1 is the flowchart of the lithium battery SOC estimation method based on IGWO-EKF algorithm proposed by the present invention;

图2为本发明具体实施方式中的IGWO算法流程框图;Fig. 2 is a flow diagram of the IGWO algorithm in the specific embodiment of the present invention;

图3为本发明具体实施方式中的初始种群在[0,1]区间的随机分布图;Fig. 3 is the random distribution diagram of initial population in [0,1] interval in the specific embodiment of the present invention;

图4为本发明具体实施方式中的初始种群在[0,1]区间,利用Tent混沌序列映射后的分布图;Fig. 4 is the initial population in the specific embodiment of the present invention in [0,1] interval, utilizes the distribution diagram after Tent chaotic sequence mapping;

图5为本发明具体实施方式中所给测试函数下GWO算法和IGWO算法在D=10时的适应度曲线图:Fig. 5 is the fitness curve figure of GWO algorithm and IGWO algorithm when D=10 under the given test function in the specific embodiment of the present invention:

图6为本发明具体实施方式中所给测试函数下GWO算法和IGWO算法在D=30时的适应度曲线图:Fig. 6 is the fitness curve figure of GWO algorithm and IGWO algorithm when D=30 under the given test function in the specific embodiment of the present invention:

图7为本发明具体实施方式中的DST工况下IGWO-EKF算法和标准EKF算法对SOC估算曲线对比图;Fig. 7 is a comparison chart of the SOC estimation curve between the IGWO-EKF algorithm and the standard EKF algorithm under the DST working condition in the specific embodiment of the present invention;

图8为本发明具体实施方式中的DST工况下IGWO-EKF算法和标准EKF算法对SOC估算误差图;Fig. 8 is the SOC estimation error figure of IGWO-EKF algorithm and standard EKF algorithm under the DST working condition in the specific embodiment of the present invention;

图9为本发明具体实施方式中的UDDS工况下IGWO-EKF算法和标准EKF算法对SOC估算曲线对比图;Fig. 9 is a comparison chart of the SOC estimation curve between the IGWO-EKF algorithm and the standard EKF algorithm under the UDDS working condition in the specific embodiment of the present invention;

图10为本发明具体实施方式中的UDDS工况下IGWO-EKF算法和标准EKF算法对SOC估算误差图;Fig. 10 is the SOC estimation error diagram of the IGWO-EKF algorithm and the standard EKF algorithm under the UDDS working condition in the specific embodiment of the present invention;

具体实施方式Detailed ways

为了使本发明所解决的技术问题、技术方案及有益效果更加清楚明白,下面结合附图及实施例,对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the technical problems, technical solutions and beneficial effects solved by the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

一个实施例中,如图1所示,本发明提出一种基于IGWO-EKF算法的锂电池SOC估算方法,包括以下步骤:In one embodiment, as shown in Figure 1, the present invention proposes a lithium battery SOC estimation method based on the IGWO-EKF algorithm, comprising the following steps:

步骤1,建立锂电池一阶Thevenin等效电路模型,其状态方程模型为:Step 1, establish the first-order Thevenin equivalent circuit model of the lithium battery, and its state equation model is:

其中,R0为欧姆内阻,R1为极化电阻,C1为极化电容,U1为电容C1两端电压,UL为电池端电压,Uocv为开路电压。Among them, R 0 is the ohmic internal resistance, R 1 is the polarization resistance, C 1 is the polarization capacitance, U 1 is the voltage across the capacitor C 1 , UL is the battery terminal voltage, and U ocv is the open circuit voltage.

步骤2,对锂电池一阶Thevenin等效电路模型进行参数辨识,分别得到开路电压Uocv与SOC的关系函数、欧姆内阻R0与SOC的关系函数、极化电阻R1与SOC的关系函数以及极化电容C1与SOC的关系函数。Step 2: Carry out parameter identification on the first-order Thevenin equivalent circuit model of the lithium battery, and obtain the relationship function between open circuit voltage U ocv and SOC, the relationship function between ohmic internal resistance R 0 and SOC, and the relationship function between polarization resistance R 1 and SOC And the relationship function of polarization capacitance C 1 and SOC.

本步骤具体为:This step is specifically:

开路电压Uocv与SOC的关系辨识采用开路电压充放电实验,具体步骤为:The relationship between the open circuit voltage U ocv and SOC is identified using the open circuit voltage charge and discharge experiment. The specific steps are:

1)电池充满电后静置12h,测得满电状态下的电池开路电压;1) After the battery is fully charged, let it stand for 12 hours, and measure the open circuit voltage of the battery in the fully charged state;

2)以1C电流恒流放电,当电池SOC下降0.1时静置3600s,测得此时电池的端电压即为SOC=0.9时的开路电压;2) Discharge with a constant current of 1C. When the battery SOC drops by 0.1, let it stand for 3600s. The measured terminal voltage of the battery at this time is the open circuit voltage when SOC=0.9;

3)返回步骤2),至电池电量完全放完,实验结束。3) Return to step 2) until the battery is completely discharged, and the experiment ends.

接着进行电池充电实验,步骤与放电实验基本一致。得到充放电实验下的Uocv数据后,取二者平均值即可得到Uocv的最终数据。使用cftool工具箱对OCV曲线进行五次多项式拟合得:Then carry out the battery charging experiment, the steps are basically the same as the discharging experiment. After obtaining the U ocv data under the charging and discharging experiment, the final data of U ocv can be obtained by taking the average value of the two. Use the cftool toolbox to fit the OCV curve to a quintic polynomial:

Uocv=3.44003+1.71448soc-3.51247soc2+5.70868soc3-5.06869soc4+1.86699soc5 (2)U ocv =3.44003+1.71448soc-3.51247soc 2 +5.70868soc 3 -5.06869soc 4 +1.86699soc 5 (2)

对于模型阻抗参数R0、R1和C1的辨识,采用离线参数辨识法,基于HPPC脉冲实验的电流和电压值,将脉冲过程中的特定电压曲线按照最适合的函数曲线进行拟合,进而获得该模型的参数值,辨识结果如表1所示:For the identification of the model impedance parameters R 0 , R 1 and C 1 , the off-line parameter identification method is adopted, based on the current and voltage values of the HPPC pulse experiment, the specific voltage curve during the pulse process is fitted according to the most suitable function curve, and then The parameter values of the model are obtained, and the identification results are shown in Table 1:

表1 HPPC脉冲实验各参数离线辨识结果Table 1 Off-line identification results of each parameter in HPPC pulse experiment

步骤3,在灰狼算法(Grey Wolf Optimizer,GWO)的基础上引入Tent混沌映射初始化灰狼种群,并引入布谷鸟算法(Cuckoo Search,CS)中的Levy飞行策略,增强灰狼算法的全局搜索能力与搜索速度,得到改进后的灰狼算法(IGWO),算法流程图如图2所示。Step 3: On the basis of the Gray Wolf Optimizer (GWO), introduce the Tent chaotic map to initialize the gray wolf population, and introduce the Levy flight strategy in the Cuckoo Search (CS) to enhance the global search of the Gray Wolf Algorithm Ability and search speed, the improved gray wolf algorithm (IGWO) is obtained, and the algorithm flow chart is shown in Figure 2.

步骤3具体为:Step 3 is specifically:

步骤3.1,在灰狼算法中,首先随机生成一个规模为N的灰狼种群,通过计算每个个体的适应度值确定种群α、β和δ狼,剩下的灰狼则称为ω狼。α狼最大程度上决定狼群的行为方式,对应最优适应度的位置,其次是β狼与δ狼,分别对应第2优适应度位置与第3优适应度位置。前三头精英狼负责追踪猎物和引导狼群,ω狼负责包围与捕杀猎物,在每次迭代过程中依据上一迭代中精英狼的位置信息更新自身位置。Step 3.1, in the gray wolf algorithm, first randomly generate a population of gray wolves with a size N, and determine the populations α, β, and δ wolves by calculating the fitness value of each individual, and the remaining gray wolves are called ω wolves. α wolf determines the behavior of wolves to the greatest extent, corresponding to the position of optimal fitness, followed by β wolf and δ wolf, corresponding to the second optimal fitness position and the third optimal fitness position respectively. The first three elite wolves are responsible for tracking the prey and guiding the wolf pack, and the ω wolf is responsible for encircling and killing the prey. In each iteration, its position is updated according to the position information of the elite wolf in the previous iteration.

具体的,为了改善初始种群分布的效果,增加种群的多样性,加快算法的寻优速度,采用混沌映射函数产生混沌序列作为初始种群个体的位置,混沌序列Tent映射表达式如下:Specifically, in order to improve the effect of the initial population distribution, increase the diversity of the population, and speed up the optimization speed of the algorithm, the chaotic sequence generated by the chaotic mapping function is used as the position of the initial population individual. The Tent mapping expression of the chaotic sequence is as follows:

其中,u=0.5,灰狼种群个体混沌初始化后,对不同的参数有近似一致的分布密度。Among them, u=0.5, after the individual chaos initialization of the gray wolf population, there is approximately the same distribution density for different parameters.

图3为将数量是5000的种群在[0,1]区间内采用随机初始化,图4为采用Tent映射初始化后的分布情况图,从图3和图4中可以看出,采用Tent映射后的初始种群在[0,1]区间内分布较为均匀,能够增强初始解的遍历均匀性,更快寻得最优解。Figure 3 is a random initialization of a population of 5000 in the interval [0,1], and Figure 4 is a distribution diagram after initialization using Tent mapping. It can be seen from Figure 3 and Figure 4 that after using Tent mapping The initial population is more evenly distributed in the [0,1] interval, which can enhance the ergodic uniformity of the initial solution and find the optimal solution faster.

步骤3.2,狼群在搜索猎物的过程中,会逐渐形成一个包围圈围困猎物,该行为的模型如下:In step 3.2, during the process of searching for prey, wolves will gradually form an encirclement to encircle the prey. The model of this behavior is as follows:

其中,t代表当前迭代次数,tmax为最大迭代次数,表示灰狼与猎物之间的距离,和/>分别为猎物的位置和灰狼的位置,/>和/>为模在[0,1]的随机数,/>为收敛因子,随着不断迭代从2线性减小到0。Among them, t represents the current iteration number, t max is the maximum iteration number, Indicates the distance between a gray wolf and its prey, and /> are the location of the prey and the location of the gray wolf, respectively, /> and /> is a random number modulo [0,1], /> is the convergence factor, which decreases linearly from 2 to 0 with continuous iterations.

GWO算法在位置更新过程中,只考虑灰狼个体位置信息与种群的最优解、优解、次优解位置信息,灰狼种群始终向全局最优的前三个解靠近,导致其全局搜索能力较弱。布谷鸟算法是一种新型元启发式搜索算法。布谷鸟通过随机游走的方式搜索得到一个最优的巢穴来孵化鸟蛋,这种方式可以达到一种高效的寻优模式。本发明引入CS算法来改进GWO算法,使用CS算法中Levy飞行策略对GWO进行改进,提高算法全局搜索能力及增强收敛到全局最优的能力。In the process of location updating, the GWO algorithm only considers the location information of the gray wolf individual and the location information of the optimal solution, the optimal solution, and the suboptimal solution of the population. less capable. Cuckoo algorithm is a new meta-heuristic search algorithm. The cuckoo searches for an optimal nest to incubate eggs by random walk, which can achieve an efficient optimization mode. The invention introduces the CS algorithm to improve the GWO algorithm, uses the Levy flight strategy in the CS algorithm to improve the GWO, improves the global search ability of the algorithm and enhances the ability to converge to the global optimum.

步骤3.3,确定猎物位置后,β和δ狼在α狼的指挥下包围猎物,引入CS算法,重新调整α、β和δ狼的位置,其他灰狼个体随之移动,并定义狼群中ω狼向α、β和δ狼靠近的步长,该行为的模型如下:Step 3.3, after determining the location of the prey, the β and δ wolves encircle the prey under the command of the α wolf, introduce the CS algorithm, readjust the positions of the α, β and δ wolves, and other gray wolves move accordingly, and define ω The step size for the wolf to approach the α, β and δ wolves. The model of this behavior is as follows:

其中,和/>分别为采用Levy飞行策略更新后灰狼种群中α、β和δ狼的位置向量,/>为其他灰狼的位置,/>和/>分别代表当前的灰狼与α、β和δ狼之间的距离。in, and /> are the position vectors of α, β, and δ wolves in the gray wolf population after updating with the Levy flight strategy, /> for the location of other gray wolves, /> and /> represent the distances between the current gray wolf and α, β, and δ wolves, respectively.

具体的,采用CS算法的灰狼位置更新策略为:Specifically, the gray wolf position update strategy using the CS algorithm is:

其中,为Levy随机搜索路径,λ为步长调节系数,Lv为飞行步长。in, is the Levy random search path, λ is the step size adjustment coefficient, and L v is the flight step size.

步骤3.4,灰狼在追逐猎物的过程中,会不断地压缩猎物的活动范围,迫使其停止移动,当猎物停止时,狼群开始攻击,攻击猎物的过程可以表述为:收敛因子a逐渐减小,的值在[-a,a]内变化,当/>的值在[-1,1]区间外时,表示狼群在搜索猎物的位置,当/>的值在[-1,1]区间内时,表示狼群向猎物发起攻击。Step 3.4, during the process of chasing the prey, the gray wolf will continuously compress the range of activities of the prey, forcing it to stop moving. When the prey stops, the wolves start to attack. The process of attacking the prey can be expressed as: the convergence factor a gradually decreases , The value of changes in [-a, a], when /> When the value of is outside the interval [-1,1], it means that the wolves are searching for prey. When /> When the value of is in the interval [-1,1], it means that the wolves are attacking the prey.

步骤3.5,依据所述式(4)和式(7)更新狼群位置信息,如果α狼已达到最大迭代次数或者满足迭代循环结束条件,则停止循环,输出α狼坐标信息即为寻找到的最优解。Step 3.5: Update the position information of the wolves according to the formula (4) and formula (7). If the alpha wolf has reached the maximum number of iterations or meets the end condition of the iterative loop, stop the loop and output the coordinate information of the alpha wolf as the found Optimal solution.

为了测试步骤3所提出的IGWO算法的性能,在MATLAB上进行了相关的实验,选取测试函数如下:In order to test the performance of the IGWO algorithm proposed in step 3, relevant experiments were carried out on MATLAB, and the test function was selected as follows:

将传统GWO算法与本发明所提出的IGWO算法进行比较,统一设置灰狼种群规模为50,迭代次数为500。分别在维度D=10和D=30时对两种算法的精度进行比较。在维度D=10和D=30时,适应度曲线分别如图5和图6所示。从图5和图6中可以看出,本发明所提出的IGWO算法收敛速度更快,适应度值更小,具有更加优异的性能。Comparing the traditional GWO algorithm with the IGWO algorithm proposed by the present invention, the gray wolf population size is uniformly set to 50, and the number of iterations is 500. The accuracy of the two algorithms is compared when the dimension D=10 and D=30 respectively. When dimensions D=10 and D=30, the fitness curves are shown in Figure 5 and Figure 6 respectively. It can be seen from Fig. 5 and Fig. 6 that the IGWO algorithm proposed by the present invention has a faster convergence speed, a smaller fitness value, and more excellent performance.

步骤4,使用步骤3所述的IGWO算法对EKF算法中的过程噪声协方差矩阵Q和测量噪声协方差矩阵R进行在线优化,得到最优的过程噪声协方差矩阵Qk和最优的测量噪声协方差矩阵RkStep 4, use the IGWO algorithm described in step 3 to optimize the process noise covariance matrix Q and the measurement noise covariance matrix R in the EKF algorithm online, and obtain the optimal process noise covariance matrix Q k and the optimal measurement noise Covariance matrix R k .

步骤4具体为:Step 4 is specifically:

步骤4.1,初始时设定灰狼种群规模N、最大迭代次数tmax、寻优变量维度Dim、搜索范围[lb,lu],设置寻优变量矩阵为F=[Q R]T,使用Tent映射初始化灰狼种群的位置。Step 4.1. Initially set the gray wolf population size N, the maximum number of iterations t max , the optimization variable dimension Dim, and the search range [lb,lu], set the optimization variable matrix to F=[QR] T , and use Tent mapping to initialize Location of gray wolf populations.

步骤4.2,计算每个灰狼个体的适应度值,即锂电池一阶Thevenin模型的累计电压误差最小值,并在当前灰狼群体中按照适应度大小进行排列,确定最优解α狼、次最优解β狼和第三最优解δ狼。Step 4.2, calculate the fitness value of each gray wolf individual, that is, the minimum value of the cumulative voltage error of the lithium battery first-order Thevenin model, and arrange them according to the fitness in the current gray wolf group to determine the optimal solution α wolf, second The optimal solution β wolf and the third optimal solution δ wolf.

具体的,IGWO-EKF算法的适应度函数设置为:Specifically, the fitness function of the IGWO-EKF algorithm is set as:

其中,表示端电压测量方程的预测值,yk表示端电压测量值,L为离散频率点的最大采样点数。in, Represents the predicted value of the terminal voltage measurement equation, y k represents the measured value of the terminal voltage, and L is the maximum number of sampling points at discrete frequency points.

步骤4.3,将最优解α狼对应的Q和R的值代入模型中,求得锂电池一阶Thevenin模型的初始累计电压误差。In step 4.3, the values of Q and R corresponding to the optimal solution α wolf are substituted into the model to obtain the initial cumulative voltage error of the first-order Thevenin model of the lithium battery.

步骤4.4,每次循环采用CS算法调整α、β和δ狼的位置。In step 4.4, the CS algorithm is used to adjust the positions of α, β and δ wolves in each cycle.

步骤4.5,每次循环结束后,将本次循环得到的锂电池一阶Thevenin模型的累计电压误差与上次循环求得的最小累计误差相比较,取较小值作为当前锂电池一阶Thevenin模型的最小累计电压误差。Step 4.5, after each cycle, compare the cumulative voltage error of the lithium battery first-order Thevenin model obtained in this cycle with the minimum cumulative error obtained in the previous cycle, and take the smaller value as the current lithium battery first-order Thevenin model The minimum accumulated voltage error.

步骤4.6,重复执行步骤4.2至步骤4.5,直到达到所设置的最大迭代次数,迭代结束后,当前α狼对应的Q和R的值即为最优过程噪声协方差矩阵Qk和最优测量噪声协方差矩阵RkStep 4.6, repeat step 4.2 to step 4.5 until the set maximum number of iterations is reached. After the iteration, the values of Q and R corresponding to the current α wolf are the optimal process noise covariance matrix Q k and the optimal measurement noise Covariance matrix R k .

步骤5,将步骤2得到的参数辨识结果更新锂电池一阶Thevenin等效电路模型,将步骤4得到的最优过程噪声协方差矩阵Qk和最优测量噪声协方差矩阵Rk输入EKF算法,进行锂电池SOC估计,得到不同时刻的锂电池SOC估算值。Step 5, update the first-order Thevenin equivalent circuit model of the lithium battery with the parameter identification results obtained in step 2, and input the optimal process noise covariance matrix Q k and the optimal measurement noise covariance matrix R k obtained in step 4 into the EKF algorithm, Estimate the SOC of the lithium battery to obtain the estimated value of the SOC of the lithium battery at different times.

步骤5具体为:Step 5 is specifically:

步骤5.1,假定k时刻系统状态变量xk=[SOCk U1,k]T,系统输入为uk,系统观测量为yk以f(xk,uk)作为系统状态方程,g(xk,uk)为量测方程,得模型系统离散化空间方程为:Step 5.1, assuming that the system state variable x k =[SOC k U 1,k ] T at time k, the system input is u k , the system observation is y k , and f(x k ,u k ) is used as the system state equation, g( x k ,u k ) is the measurement equation, and the discretization space equation of the model system is:

其中,Dk=R0,kIk,wk为系统过程噪声,vk为系统测量噪声。in, D k =R 0,k I k , w k is the system process noise, and v k is the system measurement noise.

步骤5.2,设定初值,将步骤4得到的最优过程噪声协方差矩阵Qk和最优测量噪声协方差矩阵Rk作为初值,将状态向量和误差协方差初始化为:Step 5.2, set the initial value, the optimal process noise covariance matrix Q k and the optimal measurement noise covariance matrix R k obtained in step 4 are used as initial values, and the state vector and error covariance are initialized as:

步骤5.3,根据步骤5.2设定的初值启动EKF递推算法,代入步骤5.1确定的锂电池一阶离散化空间方程,得到k时刻状态变量预测矩阵和误差协方差预测矩阵Pk|k-1为:Step 5.3, start the EKF recursive algorithm according to the initial value set in step 5.2, and substitute the first-order discretization space equation of the lithium battery determined in step 5.1 to obtain the state variable prediction matrix at time k And the error covariance prediction matrix P k|k-1 is:

步骤5.4,计算EKF算法的增益状态矩阵KkStep 5.4, calculate the gain state matrix K k of the EKF algorithm:

步骤5.5,根据k时刻的端电压值yk和EKF算法的增益状态矩阵Kk,得到k时刻更新的状态变量输出矩阵和更新的误差协方差矩阵Pk为:Step 5.5, according to the terminal voltage value y k at time k and the gain state matrix K k of the EKF algorithm, obtain the state variable output matrix updated at time k and the updated error covariance matrix P k is:

其中,I为单位矩阵。Among them, I is the identity matrix.

由于xk=[SOCk U1,k]T,可求得k时刻锂电池SOC值SOCkSince x k =[SOC k U 1,k ] T , the lithium battery SOC value SOC k at time k can be obtained.

步骤5.6,令k=k+1,并返回步骤5.3,开始下一轮锂电池SOC估算,如此迭代即可得到每一时刻的锂电池SOC值。In step 5.6, set k=k+1, and return to step 5.3 to start the next round of lithium battery SOC estimation, so that the lithium battery SOC value at each moment can be obtained through such iterations.

在EKF算法下,电池SOC估算过程是一个不断递推的过程,通过每一次迭代得到的估计值、测量值和滤波增益对初始值不断进行修正,逐步去除噪声,使得估计值更加接近真实值,得到状态变量的最优估计,即得到SOC的最优估算值。Under the EKF algorithm, the battery SOC estimation process is a continuous recursive process. The initial value is continuously corrected through the estimated value, measured value and filter gain obtained in each iteration, and the noise is gradually removed to make the estimated value closer to the real value. Obtain the optimal estimate of the state variable, that is, obtain the optimal estimated value of the SOC.

步骤6,仿真实验验证。为验证本发明所提出的IGWO-EKF算法对SOC估计的准确性,选用电池DST循环工况和UDDS动力工况作为验证工况,在MATLAB/Simulink仿真平台进行验证。将实际得出的SOC估算值与传统EKF算法和IGWO-EKF算法得出的SOC估算值作对比。Step 6, simulation experiment verification. In order to verify the accuracy of the SOC estimation by the IGWO-EKF algorithm proposed in the present invention, the battery DST cycle condition and the UDDS power condition are selected as the verification conditions, and the verification is carried out on the MATLAB/Simulink simulation platform. Compare the actual estimated SOC with the estimated SOC obtained by the traditional EKF algorithm and the IGWO-EKF algorithm.

首先,在DST循环工况下,传统EKF算法和IGWO-EKF算法实现SOC在线估算的结果如图7,估算结果误差如图8所示。两种算法的SOC估算误差如下表2所示:First, under the DST cycle condition, the results of the traditional EKF algorithm and the IGWO-EKF algorithm to realize the online SOC estimation are shown in Figure 7, and the error of the estimation result is shown in Figure 8. The SOC estimation errors of the two algorithms are shown in Table 2 below:

表2 DST工况下标准EKF算法与IGWO-EKF算法的误差分析Table 2 Error analysis of standard EKF algorithm and IGWO-EKF algorithm under DST working conditions

根据图7和图8可知,在DST循环工况下,IGWO-EKF算法、EKF算法和试验SOC曲线趋势基本一致。但IGWO-EKF算法对SOC的估算比EKF算法更接近真实值,且在放电初期,IGWO-EKF算法下的SOC曲线能快速收敛至真实SOC值附近,能够较好地实现SOC的精确估算。根据表2可知,在DST工况下,相比于传统的EKF算法,IGWO-EKF算法对锂电池SOC估算的最大误差降低了22.26%,平均误差降低了28.62%,均方根误差降低了42.88%,表现出了更强的准确性。According to Figure 7 and Figure 8, under the DST cycle condition, the trend of IGWO-EKF algorithm, EKF algorithm and test SOC curve is basically the same. However, the estimation of SOC by IGWO-EKF algorithm is closer to the real value than that of EKF algorithm, and in the early stage of discharge, the SOC curve under IGWO-EKF algorithm can quickly converge to the real SOC value, which can better realize the accurate estimation of SOC. According to Table 2, under DST conditions, compared with the traditional EKF algorithm, the maximum error of the IGWO-EKF algorithm for lithium battery SOC estimation is reduced by 22.26%, the average error is reduced by 28.62%, and the root mean square error is reduced by 42.88%. %, showing a stronger accuracy.

然后,在UDDS动力工况下,传统EKF算法和IGWO-EKF算法实现SOC在线估计的结果如图9所示,估算结果误差如图10所示。两种算法的SOC估算误差如下表3所示:Then, under the UDDS power condition, the results of the traditional EKF algorithm and the IGWO-EKF algorithm to realize the online SOC estimation are shown in Figure 9, and the error of the estimation result is shown in Figure 10. The SOC estimation errors of the two algorithms are shown in Table 3 below:

表3 UDDS工况下标准EKF算法与IGWO-EKF算法的误差分析Table 3 Error analysis of standard EKF algorithm and IGWO-EKF algorithm under UDDS working conditions

由图9和图10可知,在UDDS工况下,IGWO-EKF算法、EKF算法和试验SOC曲线虽然整体趋势相似,但IGWO-EKF算法对SOC的估算比EKF算法更接近真实值。通过局部放大图可知,EKF算法的跟踪能力较差,但IGWO-EKF算法能准确收敛至真实SOC值附近,能够较好地实现SOC的精确估算。根据表3可知,在UDDS工况下,相比于传统的EKF算法,IGWO-EKF算法对锂电池SOC估算的最大误差降低了25.63%,平均误差降低了38.34%,均方根误差降低了41.14%。整体来看,优化后的算法能够更好的估算出实时的SOC,并且误差较小,即使出现误差较大的点,也能快速收敛至真实值附近。It can be seen from Fig. 9 and Fig. 10 that under the UDDS working condition, although the overall trends of the IGWO-EKF algorithm, EKF algorithm and test SOC curve are similar, the estimation of SOC by the IGWO-EKF algorithm is closer to the real value than the EKF algorithm. It can be seen from the partial enlarged picture that the tracking ability of the EKF algorithm is poor, but the IGWO-EKF algorithm can accurately converge to the vicinity of the real SOC value, and can better realize the accurate estimation of SOC. According to Table 3, under the UDDS working condition, compared with the traditional EKF algorithm, the maximum error of the IGWO-EKF algorithm for lithium battery SOC estimation is reduced by 25.63%, the average error is reduced by 38.34%, and the root mean square error is reduced by 41.14%. %. On the whole, the optimized algorithm can better estimate the real-time SOC, and the error is small. Even if there is a point with a large error, it can quickly converge to the real value.

本发明以EKF算法和IGWO算法为理论基础,结合锂电池一阶Thevenin等效电路模型,提出了基于IGWO-EKF算法的锂电池SOC估算方法,并通过仿真实验验证了该方法具有较高的精度及实用性。Based on the EKF algorithm and the IGWO algorithm, the present invention proposes a lithium battery SOC estimation method based on the IGWO-EKF algorithm in combination with the first-order Thevenin equivalent circuit model of the lithium battery, and verifies that the method has higher accuracy through simulation experiments and practicality.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that, for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.

Claims (6)

1. The lithium battery SOC estimation method based on the IGWO-EKF is characterized by comprising the following steps of:
step 1, a first-order Thevenin equivalent circuit model of a lithium battery is established, and a state equation model is as follows:
wherein ,R0 Is ohm internal resistance, R 1 For polarization resistance, C 1 For polarizing capacitance, U 1 Is a capacitor C 1 Voltage at two ends, U L For battery terminal voltage, U ocv Is an open circuit voltage.
Step 2, carrying out parameter identification on a first-order Thevenin equivalent circuit model of the lithium battery to respectively obtain open-circuit voltage U ocv Relation function with SOC, ohmic internal resistance R 0 Relation function with SOC, polarization resistance R 1 Relation function with SOC and polarization capacitance C 1 Relationship function with SOC.
And 3, introducing a Tent chaotic map to initialize a wolf population on the basis of a wolf algorithm (Grey Wolf Optimization, GWO), introducing a Levy flight strategy in a Cuckoo Search (CS), and enhancing the global searching capability and searching speed of the wolf algorithm to obtain an improved wolf algorithm (IGWO).
Step 4, performing online optimization on the process noise covariance matrix Q and the measurement noise covariance matrix R in the EKF algorithm by using the IGWO algorithm in step 3 to obtain an optimal process noise covariance matrix Q k And an optimal measurement noise covariance matrix R k
Step 5, updating the first-order Thevenin equivalent circuit model of the lithium battery by the parameter identification result obtained in the step 2, and obtaining an optimal process noise covariance matrix Q in the step 4 k And an optimal measurement noise covariance matrix R k And (3) inputting an EKF algorithm, and carrying out lithium battery SOC estimation to obtain lithium battery SOC estimation values at different moments.
The step 5 is specifically as follows:
step 5.1, assume that the system state quantity at k time is x k The system input is u k The observed quantity of the system is y k With f (x) k ,u k ) As a system state equation, g (x k ,u k ) For the measurement equation, the discretized space equation of the model system is obtained as follows:
wherein ,D k =R 0,k I k ,x k =[SOC k U 1,k ] T ,w k v for system process noise k Noise is measured for the system.
Step 5.2, setting an initial value, and obtaining an optimal process noise covariance matrix Q from the step 4 k Optimum measurement noise covarianceMatrix R k As an initial value, the state vector and the error covariance are initialized to:
step 5.3, starting an EKF recursive algorithm according to the initial value set in the step 5.2, substituting the initial value into the lithium battery first-order discretization space equation determined in the step 5.1 to obtain a k-moment state variable prediction matrixAnd error covariance prediction matrix P k|k-1 The method comprises the following steps:
step 5.4, calculating the gain state matrix K of the EKF algorithm k
Step 5.5, according to the terminal voltage value y at the moment k k And the gain state matrix K of the EKF algorithm k Obtaining a state variable output matrix updated at k momentAnd an updated error covariance matrix P k The method comprises the following steps:
wherein I is an identity matrix.
From this, the SOC value SOC of the lithium battery at the k moment can be obtained k
And 5.6, let k=k+1, return to step 5.3, start the next round of lithium battery SOC estimation, and iterate in this way to obtain the lithium battery SOC value at each moment.
2. The lithium battery SOC estimation method based on IGWO-EKF according to claim 1, wherein step 3 specifically comprises:
step 3.1, in the wolf algorithm, a wolf population with a scale of N is randomly generated, the population alpha, beta and delta wolf are determined by calculating the fitness value of each individual, the rest wolves are called omega wolves, and in the iteration process, the alpha, beta and delta wolves predict the position of a game, and command the wolf population to update the position of the wolf population according to the position of the game.
Step 3.2, the wolf group gradually forms a surrounding trapped hunting object in the hunting process, and the behavior model is as follows:
wherein t represents the current iteration number, t max For the maximum number of iterations to be performed,indicating the distance between the wolf and the prey, < ->Andthe position of prey and the position of the wolf, respectively,> and />Is molded in [0,1]]Random number of->As a convergence factor, decreases linearly from 2 to 0 with successive iterations.
Step 3.3, after determining the position of the prey, surrounding the prey by beta and delta wolves under the command of alpha wolves, introducing a CS algorithm, readjusting the positions of the alpha, beta and delta wolves, moving other gray wolves along with the position of the alpha, beta and delta wolves, and defining the step length of approaching the alpha, beta and delta wolves by the omega wolves in the wolf cluster, wherein the behavior model is as follows:
wherein , and />The position vectors of alpha, beta and delta wolves in the wolf population after being updated by adopting the Levy flight strategy are respectively +.>For the position of other wolves +.> and />Representing the current distance between the wolf and alpha, beta and delta wolves, respectively.
Step 3.4, the wolf will not be in the process of chasing the preyThe movable range of the hunting body is compressed to force the hunting body to stop moving, when the hunting body stops, the wolf group starts to attack, and the process of attacking the hunting body can be expressed as follows: convergence factorGradually decrease (S) of (B)>The value of (a) is [ -a, a]Internal variation, when the value of A is [ -1,1]When the interval is out, the position of the wolf group in searching for hunting is shown as +.>The value of (2) is [ -1,1]Within the interval, it is shown that the wolf group is attacking the prey.
And 3.5, updating the wolf group position information according to the formula (7) and the formula (10), stopping the circulation if the alpha wolf reaches the maximum iteration times or meets the iteration circulation ending condition, and outputting alpha wolf coordinate information, namely the found optimal solution.
3. The lithium battery SOC estimation method based on IGWO-EKF according to claim 1, wherein step 4 is specifically:
step 4.1, initially setting the population scale N of the wolf and the maximum iteration number t max Optimizing variable dimension Dim, search range [ lb, lu]The position of the wolf population is initialized.
And 4.2, calculating the fitness value of each gray wolf individual, namely, the minimum value of the accumulated voltage error of the first-order Thevenin model of the lithium battery, and finding out an optimal solution alpha wolf, a suboptimal solution beta wolf and a third optimal solution delta wolf in the current gray wolf group.
And 4.3, substituting the values of Q and R corresponding to the optimal solution alpha wolf into the model to obtain the initial accumulated voltage error of the first-order Thevenin model of the lithium battery.
And 4.4, adjusting the positions of alpha, beta and delta wolf by adopting a CS algorithm every time of circulation.
And 4.5, after each cycle is finished, comparing the accumulated voltage error of the first-order Thevenin model of the lithium battery obtained in the current cycle with the minimum accumulated error obtained in the last cycle, and taking a smaller value as the minimum accumulated voltage error of the first-order Thevenin model of the current lithium battery.
Step 4.6, repeatedly executing the steps 4.2 to 4.5 until the set maximum iteration number is reached, and after the iteration is finished, obtaining the values of Q and R corresponding to the current alpha wolf as the optimal process noise covariance matrix Q k And an optimal measurement noise covariance matrix R k
4. The lithium battery SOC estimation method based on the IGWO-EKF according to claim 2, wherein in order to improve the effect of initial population distribution, the diversity of the population is increased, the optimizing speed of an algorithm is accelerated, and step 3.1 adopts a chaotic mapping function to generate a chaotic sequence as the position of an initial population individual:
wherein u=0.5, and the wolf population individuals have approximately consistent distribution densities for different parameters after chaos initialization.
5. The IGWO-EKF based lithium battery SOC estimation method of claim 2, wherein the gray wolf position update strategy using CS algorithm in step 3.3 is:
wherein ,for Levy random search path, lambda is stepLong adjustment coefficient, L v Is the flight step length.
6. The lithium battery SOC estimation method based on IGWO-EKF according to claim 3, wherein the fitness function in step 4.2 is set as follows:
wherein ,representing the predicted value, y, of the terminal voltage measurement equation k Representing the terminal voltage measurement, L is the maximum number of samples at the discrete frequency point.
CN202310280794.0A 2023-03-22 2023-03-22 Lithium battery SOC estimation method based on IGWO-EKF algorithm Pending CN116559673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310280794.0A CN116559673A (en) 2023-03-22 2023-03-22 Lithium battery SOC estimation method based on IGWO-EKF algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310280794.0A CN116559673A (en) 2023-03-22 2023-03-22 Lithium battery SOC estimation method based on IGWO-EKF algorithm

Publications (1)

Publication Number Publication Date
CN116559673A true CN116559673A (en) 2023-08-08

Family

ID=87490517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310280794.0A Pending CN116559673A (en) 2023-03-22 2023-03-22 Lithium battery SOC estimation method based on IGWO-EKF algorithm

Country Status (1)

Country Link
CN (1) CN116559673A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117195946A (en) * 2023-09-08 2023-12-08 兰州理工大学 A WSN maneuvering target tracking method based on extended Kalman filtering

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117195946A (en) * 2023-09-08 2023-12-08 兰州理工大学 A WSN maneuvering target tracking method based on extended Kalman filtering
CN117195946B (en) * 2023-09-08 2024-06-18 兰州理工大学 A WSN maneuvering target tracking method based on extended Kalman filter

Similar Documents

Publication Publication Date Title
CN113030764B (en) A method and system for estimating the state of health of a battery pack
CN110596593B (en) Lithium ion battery SOC estimation method based on intelligent adaptive extended Kalman filtering
CN109256834B (en) Active balancing method of battery pack based on battery state of health and state of charge
CN105974323B (en) A kind of algorithm model improving electric car SOC estimation precision
CN111722118B (en) Lithium ion battery SOC estimation method based on SOC-OCV optimization curve
CN110554324B (en) SOC and SOH joint estimation method
US20210167620A1 (en) Adaptive charging protocol for fast charging of batteries and fast charging system implementing this protocol
CN110704790A (en) Lithium battery SOC estimation method based on IFA-EKF
CN111220920B (en) State of charge calculation method for decommissioned lithium-ion batteries based on H∞ unscented Kalman filter algorithm
CN111428433B (en) Lithium ion battery state calculation method based on hybrid filtering
CN109387784B (en) Method for estimating effective quasi-SOC (state of charge) by using multi-dimensional state and method for dynamically correcting SOC
CN107153163A (en) A kind of lithium battery SOC estimation method based on adaptive UKF
CN110929464B (en) Storage battery parameter identification method based on improved dragonfly algorithm
CN109633456B (en) A SOC estimation method for power lithium battery pack based on segmented voltage identification method
CN107505574A (en) The UKF lithium battery evaluation methods with fading factor based on maximum likelihood
CN108829911A (en) A kind of open-circuit voltage and SOC functional relation optimization method
Zhao et al. Estimation of the SOC of energy-storage lithium batteries based on the voltage increment
CN113777501A (en) SOH estimation method of battery module
CN110579714A (en) A battery SOC double-state switching estimation method based on BAS optimization ElmanNN-AH method
CN108872865B (en) A method for estimating SOC of lithium battery with anti-filtering divergence
CN114089193A (en) On-line estimation method, device and computer equipment for battery temperature and negative electrode potential
CN116559673A (en) Lithium battery SOC estimation method based on IGWO-EKF algorithm
CN116754959A (en) SOC estimation method based on improved GWO optimized forgetting factor on-line parameter identification
CN116908691A (en) A method for identifying parameters of lithium battery model
CN113109725B (en) State-of-charge estimation method for self-regulating parallel-connected batteries based on state-noise matrix

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