CN116203432B - Method for predicting battery state of charge based on CSO optimized unscented Kalman filter - Google Patents

Method for predicting battery state of charge based on CSO optimized unscented Kalman filter Download PDF

Info

Publication number
CN116203432B
CN116203432B CN202310302474.0A CN202310302474A CN116203432B CN 116203432 B CN116203432 B CN 116203432B CN 202310302474 A CN202310302474 A CN 202310302474A CN 116203432 B CN116203432 B CN 116203432B
Authority
CN
China
Prior art keywords
battery
population
state
algorithm
unscented kalman
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.)
Active
Application number
CN202310302474.0A
Other languages
Chinese (zh)
Other versions
CN116203432A (en
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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202310302474.0A priority Critical patent/CN116203432B/en
Publication of CN116203432A publication Critical patent/CN116203432A/en
Application granted granted Critical
Publication of CN116203432B publication Critical patent/CN116203432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries

Landscapes

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

Abstract

The invention discloses a CSO optimization-based unscented Kalman filtering method for predicting the state of charge of a battery, which comprises the following steps: s1: calculating relevant parameters affecting the prediction accuracy when predicting the state of charge (SOC) of the battery by adopting Unscented Kalman Filtering (UKF) algorithm; s2: testing the predicted battery to obtain UUUDS data of the urban road circulation condition; s3: adopting a criss-cross algorithm CSO to optimize an unscented Kalman filter UKF algorithm; s4: the optimized unscented Kalman filter UKF algorithm is applied to the prediction of the state of charge (SOC) of the battery to obtain a more accurate battery working state, so that the service life and the service efficiency of the battery are improved. The invention utilizes the advantages of fast convergence speed and strong global searching capability of the crisscross algorithm, can rapidly and accurately obtain the optimal UKF fitting parameters under different battery working condition data, avoids the parameters from sinking into local optimum, ensures the prediction precision of the battery state of charge to be as high as possible, and realizes the accurate tracking of the battery working state.

Description

基于CSO优化的无迹卡尔曼滤波预测电池荷电状态的方法Method for predicting battery state of charge based on CSO optimized unscented Kalman filter

技术领域Technical field

本发明涉及电动汽车电池状态监控的技术领域,尤其涉及到一种基于CSO优化的无迹卡尔曼滤波预测电池荷电状态的方法。The present invention relates to the technical field of electric vehicle battery status monitoring, and in particular to a method for predicting battery state of charge based on CSO-optimized unscented Kalman filtering.

背景技术Background technique

为了实现电池荷电状态(State of Charge,SOC)的精确预测,国内外学者提出了基于卡尔曼滤波算法(Kalman filter,KF)的预测方案。由于电池的荷电状态为非线性系统,需要使用无迹变换将非线性系统转变为线性系统再进行卡尔曼滤波,即使用无迹卡尔曼滤波算法(Unscented Kalman Filter,UKF)。无迹卡尔曼滤波算法需要先进行参数整定优化才能进行预测,传统的优化算法有遗传算法、粒子群算法等,然而这些算法在求解复杂优化问题时,收敛速度慢、易陷入局部最优,限制了电池荷电状态预测精度的进一步提升。为此,本发明提出了一种基于纵横交叉算法优化的无迹卡尔曼滤波(CrisscrossOptimized Unscented Kalman Filter,CUKF)的预测方法。In order to achieve accurate prediction of battery state of charge (State of Charge, SOC), domestic and foreign scholars have proposed a prediction scheme based on the Kalman filter algorithm (Kalman filter, KF). Since the battery's state of charge is a nonlinear system, it is necessary to use unscented transformation to convert the nonlinear system into a linear system and then perform Kalman filtering, that is, use the Unscented Kalman Filter algorithm (Unscented Kalman Filter, UKF). The unscented Kalman filter algorithm requires parameter tuning and optimization before it can make predictions. Traditional optimization algorithms include genetic algorithms, particle swarm algorithms, etc. However, when solving complex optimization problems, these algorithms have slow convergence speeds and are prone to falling into local optima, which has limitations. This further improves the accuracy of battery state-of-charge prediction. To this end, the present invention proposes a prediction method based on CrisscrossOptimized Unscented Kalman Filter (CUKF) optimized by the cross-cross algorithm.

发明内容Contents of the invention

本发明的目的在于克服现有技术的不足,提出一种基于CSO优化的无迹卡尔曼滤波预测电池荷电状态的方法。通过引入纵横交叉算法(Crisscross OptimizationAlgorithm,CSO)对个体间变量全交叉思想,优化无迹卡尔曼滤波UKF算法的参数整定方式,实现电池荷电状态的精准预测,实现电池工作状态的精确跟踪。The purpose of the present invention is to overcome the shortcomings of the existing technology and propose a method for predicting the battery state of charge based on CSO-optimized unscented Kalman filtering. By introducing the idea of full cross-over of inter-individual variables using the Crisscross Optimization Algorithm (CSO), the parameter setting method of the unscented Kalman filter UKF algorithm is optimized to achieve accurate prediction of battery state of charge and accurate tracking of battery working status.

为实现上述目的,本发明所提供的技术方案为:In order to achieve the above objects, the technical solutions provided by the present invention are:

基于CSO优化的无迹卡尔曼滤波预测电池荷电状态的方法,其特征在于,包括以下步骤:The method of predicting battery state of charge based on CSO optimized unscented Kalman filter is characterized by including the following steps:

S1:采用无迹卡尔曼滤波UKF算法预测电池荷电状态SOC时,计算影响预测精度的相关参数;S1: When using the unscented Kalman filter UKF algorithm to predict the battery state of charge SOC, calculate the relevant parameters that affect the prediction accuracy;

S2:对被预测电池进行测试,获取其城市道路循环工况UUDS数据;S2: Test the predicted battery and obtain its urban road cycle condition UUDS data;

S3:采用纵横交叉算法CSO对无迹卡尔曼滤波UKF算法进行优化;S3: Use the vertical and horizontal crossover algorithm CSO to optimize the unscented Kalman filter UKF algorithm;

S4:将优化后的无迹卡尔曼滤波UKF算法应用于预测电池荷电状态SOC中,获得更为精确的电池工作状态,从而提高电池寿命和使用效率;S4: Apply the optimized unscented Kalman filter UKF algorithm to predict the battery state of charge SOC to obtain a more accurate battery working state, thereby improving battery life and efficiency;

所述步骤S1中,计算影响预测精度的相关参数的具体步骤如下:In step S1, the specific steps for calculating relevant parameters that affect prediction accuracy are as follows:

S1-1:在无迹卡尔曼滤波UKF算法的无迹变换UT参数初始化阶段,需要进行Sigma点集合的对称性参数λ,近似均值Sigma点权重矩阵Wm和近似协方差Sigma点权重矩阵Wc的计算分别为:S1-1: In the unscented transformation UT parameter initialization stage of the unscented Kalman filter UKF algorithm, it is necessary to carry out the symmetry parameter λ of the Sigma point set, the approximate mean Sigma point weight matrix W m and the approximate covariance Sigma point weight matrix W c The calculations are:

(1)式中,i为无迹变换的维度,α为Sigma点的采样参数,β为高斯分布的一个特性参数,L为状态向量的维度,k为控制Sigma点距离均值的距离的特性参数;(1) In the formula, i is the dimension of the unscented transformation, α is the sampling parameter of the Sigma point, β is a characteristic parameter of the Gaussian distribution, L is the dimension of the state vector, and k is the characteristic parameter that controls the distance of the Sigma point from the mean. ;

S1-2:在无迹卡尔曼滤波UKF算法的预测阶段,滤波器采用上一状态的后验估计,计算出对当前状态的先验估计,在此过程中需要计算出先验估计协方差 S1-2: In the prediction stage of the unscented Kalman filter UKF algorithm, the filter uses the posterior estimate of the previous state to calculate the prior estimate of the current state. In this process, the prior estimate covariance needs to be calculated.

(2)式中,为t时刻i维度的先验概率分布Sigma点采样结果,/>为t时刻的先验估计均值,T为逆矩阵符号,Q为过程噪声的协方差矩阵;(2) In the formula, is the Sigma point sampling result of the prior probability distribution of i dimension at time t,/> is the a priori estimated mean at time t, T is the inverse matrix symbol, and Q is the covariance matrix of the process noise;

S1-3:在无迹卡尔曼滤波UKF算法的更新阶段,滤波器利用当前状态的观测值,优化在预测阶段获得的预测值,以获得一个更精确的新估计值,在此过程中需要计算t时刻观测量zt的协方差 S1-3: In the update stage of the unscented Kalman filter UKF algorithm, the filter uses the observation value of the current state to optimize the prediction value obtained in the prediction stage to obtain a more accurate new estimate value. In this process, calculation is required Covariance of observation z t at time t

(3)式中,为t时刻i维度的观测向量,μzt为t时刻观测量zt的均值,R为测量噪声的协方差矩阵;(3) In the formula, is the i-dimensional observation vector at time t, μ zt is the mean value of observation z t at time t, and R is the covariance matrix of measurement noise;

S1-4:进行无迹卡尔曼滤波UKF算法的优化参数分析:S1-4: Perform optimization parameter analysis of the unscented Kalman filter UKF algorithm:

根据无迹卡尔曼滤波UKF算法,存在以下需要在算法开始运行前确定的参数:According to the unscented Kalman filter UKF algorithm, there are the following parameters that need to be determined before the algorithm starts running:

过程噪声的协方差矩阵Q用于估计系统模型的误差和不确定性,其通常为一个对角矩阵,无迹卡尔曼滤波UKF算法预测电池荷电状态SOC的过程中,过程噪声的协方差矩阵Q为:The covariance matrix Q of the process noise is used to estimate the error and uncertainty of the system model, which is usually a diagonal matrix. In the process of predicting the battery state of charge SOC by the unscented Kalman filter UKF algorithm, the covariance matrix of the process noise Q is:

则在(4)式中,需要整定的参数为3个,分别为过程噪声的协方差Q1,Q2,Q3Then in equation (4), there are three parameters that need to be tuned, namely the covariances Q 1 , Q 2 , and Q 3 of the process noise;

测量噪声的协方差矩阵R用于估计测量模型的误差和不确定性,其通常为一个对角矩阵,无迹卡尔曼滤波UKF算法预测电池荷电状态SOC的过程中,测量噪声的协方差矩阵R为:The covariance matrix R of the measurement noise is used to estimate the error and uncertainty of the measurement model. It is usually a diagonal matrix. In the process of predicting the battery state of charge SOC by the unscented Kalman filter UKF algorithm, the covariance matrix of the measurement noise R is:

R=[R1] (5)R=[R 1 ] (5)

则在(5)式中,需要整定的参数为1个,为测量噪声的协方差R1Then in equation (5), there is one parameter that needs to be tuned, which is the covariance R 1 of the measurement noise;

采样参数α用于控制Sigma点的分布密度,应选取合适的值以保证UT点的充分覆盖,采样参数α的取值范围为0到1之间;The sampling parameter α is used to control the distribution density of Sigma points. Appropriate values should be selected to ensure sufficient coverage of UT points. The value range of the sampling parameter α is between 0 and 1;

所述步骤S2对被预测电池进行测试,获取其城市道路循环工况UUDS数据,具体步骤如下:The step S2 tests the predicted battery and obtains its UUDS data of urban road cycle conditions. The specific steps are as follows:

S2-1:确定待测定电池的额定容量和额定电压,确定测试装置的参数,包括负载电阻及负载电抗;S2-1: Determine the rated capacity and rated voltage of the battery to be measured, and determine the parameters of the test device, including load resistance and load reactance;

S2-2:将待测定的电池充电至100%电量,并静置1-2小时以稳定电池状态;S2-2: Charge the battery to be measured to 100% capacity and leave it alone for 1-2 hours to stabilize the battery state;

S2-3:将电池从充电器上取下,让其在室温下静置至少30分钟,以便电池内部温度达到室温;S2-3: Remove the battery from the charger and let it sit at room temperature for at least 30 minutes so that the internal temperature of the battery reaches room temperature;

S2-4:将电池放在城市道路循环工况UUDS测试装置上,确保电池的两端正确接触测试装置的电极;S2-4: Place the battery on the UUDS test device under urban road cycle conditions and ensure that both ends of the battery are in correct contact with the electrodes of the test device;

S2-5:按照城市道路循环工况UUDS的要求设置测试条件,包括电流范围、电压范围、温度及时间,确保测试条件符合电池使用情况;S2-5: Set test conditions according to the requirements of UUDS under urban road cycle conditions, including current range, voltage range, temperature and time, to ensure that the test conditions meet the battery usage conditions;

S2-6:开始测试,记录测试数据,包括电流、电压及时间,直至电池电量降至一定程度或测试时间到达预设值;S2-6: Start the test and record the test data, including current, voltage and time, until the battery power drops to a certain level or the test time reaches the preset value;

S2-7:分析测试数据,评估该数据的有效性,并取其中的电流数据和电压数据用于步骤S3的计算;S2-7: Analyze the test data, evaluate the validity of the data, and obtain the current data and voltage data for the calculation of step S3;

所述步骤S3采用纵横交叉算法CSO对无迹卡尔曼滤波UKF算法进行优化,具体步骤如下:The step S3 uses the vertical and horizontal crossover algorithm CSO to optimize the unscented Kalman filter UKF algorithm. The specific steps are as follows:

S3-1:初始化步骤S1中五个参数的上限与下限,包括过程噪声的协方差Q1,Q2,Q3,测量噪声的协方差R1和采样参数α,在该区间内随机生成N个数据对,称之为种群;S3-1: The upper and lower limits of the five parameters in the initialization step S1, including the covariance Q 1 , Q 2 , Q 3 of the process noise, the covariance R 1 of the measurement noise and the sampling parameter α, randomly generate N within this interval Data pairs are called populations;

S3-2:采用步骤S3-1生成的N个数据对进行第一次种群适应度计算,种群适应度越大代表该组参数的在拟合过程中的误差越小,种群适应度的具体计算步骤如下:S3-2: Use the N data pairs generated in step S3-1 to perform the first population fitness calculation. The greater the population fitness, the smaller the error in the fitting process of the group of parameters. Specific calculation of population fitness. Proceed as follows:

S3-2-1:根据步骤S2-1确定的测试条件,得到观测矩阵Z;S3-2-1: Obtain the observation matrix Z according to the test conditions determined in step S2-1;

S3-2-2:根据输入的待整定的参数数据对,进行无迹变换UT参数的初始化;S3-2-2: Initialize the unscented transformation UT parameters based on the input parameter data pairs to be tuned;

S3-2-3:把步骤S2得到的城市道路循环工况UUDS的电流数据,加上一定的正态噪声以模拟实际工作环境;S3-2-3: Add a certain amount of normal noise to the UUDS current data of urban road cycle conditions obtained in step S2 to simulate the actual working environment;

S3-2-4:根据步骤S3-2-3得到的加上噪声的电流数据,进行Sigma点的生成;S3-2-4: Generate Sigma points based on the noise-added current data obtained in step S3-2-3;

S3-2-5:根据步骤S3-2-4得到的Sigma点进行卡尔曼滤波KF的状态预测;S3-2-5: Predict the state of Kalman filter KF based on the Sigma points obtained in step S3-2-4;

S3-2-6:根据步骤S3-2-5得到的状态预测结果进行Sigma点重构;S3-2-6: Perform Sigma point reconstruction based on the state prediction results obtained in step S3-2-5;

S3-2-7:根据步骤S2得到的城市道路循环工况UUDS的电压数据和步骤S3-2-6得到的状态预测重构后的点,进行卡尔曼滤波KF的观测更新;S3-2-7: Based on the voltage data of the urban road cycle condition UUDS obtained in step S2 and the reconstructed point of state prediction obtained in step S3-2-6, perform the observation update of the Kalman filter KF;

S3-2-8:重复从步骤S3-2-4到步骤S3-2-7,直到得到整个测试时间周期的电池荷电状态的预测值;S3-2-8: Repeat steps S3-2-4 to S3-2-7 until the predicted value of the battery state of charge for the entire test time period is obtained;

S3-2-9:采用安时积分法计算电池荷电状态,并作为电池荷电状态的真实参考值;S3-2-9: Use the ampere-hour integration method to calculate the battery state of charge and use it as a true reference value for the battery state of charge;

S3-2-10:将S3-2-8的预测结果,以S3-2-9的安时积分法的结果为标准,进行误差均值计算;S3-2-10: Calculate the mean error based on the prediction results of S3-2-8 and the results of the ampere-hour integration method of S3-2-9 as the standard;

S3-2-11:将步骤S3-2-4到步骤S3-2-10重复5次,以排除由于电流噪声导致的偶发性预测过好或过差,将5次的误差均值取平均值再取倒数作为该种群的种群适应度,并输出给步骤S3-3使用;S3-2-11: Repeat steps S3-2-4 to S3-2-10 5 times to eliminate occasional over- or under-predictions caused by current noise, and average the errors of the 5 times. Take the reciprocal as the population fitness of the population, and output it to step S3-3 for use;

S3-3:进行纵横交叉法CSO的纵向交叉运算,纵向交叉过程是把不同维度的趋优参数进行交叉的一种算术运算,其表达式为:S3-3: Perform the vertical crossover operation of the vertical and horizontal crossover method CSO. The vertical crossover process is an arithmetic operation that crosses the optimization parameters of different dimensions. Its expression is:

Mvc(m,d1)=r×X(m,d1)+(1-r)×X(m,d2)+c(X(m,d1)-X(m,d2)) (6)M vc (m,d 1 )=r×X(m,d 1 )+(1-r)×X(m,d 2 )+c(X(m,d 1 )-X(m,d 2 ) ) (6)

(6)式中,r和c为在0~1之间的随机数,X(m,d1)和X(m,d2)为不同维度的父代趋优参数,Mvc(m,d1)为父代不同维度进行纵向交叉产生的子代趋优参数,参数m=1,2,…,N,N为种群规模;d1,d2=1,2,...,C,C为种群的维度数量;In the formula (6), r and c are random numbers between 0 and 1, X(m,d 1 ) and X(m,d 2 ) are parent optimization parameters of different dimensions, M vc (m, d 1 ) is the optimization parameter of the offspring generated by vertical cross of different dimensions of the parent, the parameter m=1,2,...,N, N is the population size; d 1 ,d 2 =1,2,...,C , C is the number of dimensions of the population;

S3-4:计算步骤S3-3生成的子代的种群适应度,与父代的种群适应度比较,保留种群适应度较大的种群,使得整体种群朝着更好的方向进化;S3-4: Calculate the population fitness of the offspring generated in step S3-3, compare it with the population fitness of the parent, and retain the population with greater population fitness so that the overall population evolves in a better direction;

S3-5:进行纵横交叉法CSO的横向交叉运算,横向交叉过程是把不同解的所有趋优参数交叉的一种算术运算,其表达式为:S3-5: Perform the horizontal crossover operation of the vertical and horizontal crossover method CSO. The horizontal crossover process is an arithmetic operation that crosses all the optimization parameters of different solutions. Its expression is:

(7)式中,参数n=1,2,…,N,N为种群规模;In the formula (7), the parameters n=1,2,…,N, N is the population size;

S3-6:计算步骤S3-5生成的子代的种群适应度,与父代的种群适应度比较,保留种群适应度较大的种群,使得整体种群朝着更好的方向进化;S3-6: Calculate the population fitness of the offspring generated in step S3-5, compare it with the population fitness of the parent, and retain the population with greater population fitness, so that the overall population evolves in a better direction;

S3-7:采用以下步骤对种群进行重新生成:S3-7: Use the following steps to regenerate the population:

S3-7-1:如无迹卡尔曼滤波UKF算法预测过程终止,则标记该种群的种群适应度为0;S3-7-1: If the unscented Kalman filter UKF algorithm prediction process terminates, the population fitness of the population will be marked as 0;

S3-7-2:在每一轮迭代结束前,将统计种群适应度为0的种群进行重新生成;S3-7-2: Before the end of each iteration, regenerate the population with a statistical population fitness of 0;

S3-7-3:获取每个维度i,分别取种群适应度不为0的种群在该维度下的最大值maxi与最小值miniS3-7-3: Obtain each dimension i, and respectively obtain the maximum value max i and minimum value min i of the population whose fitness is not 0 in this dimension;

S3-7-4:新的种群生成时,每个维度i的参数分别在(1+ks)maxi到(1-ks)mini中重新生成,ks为重生成扩散系数,使得该种群不容易趋同导致种群适应度陷入局部最优;S3-7-4: When a new population is generated, the parameters of each dimension i are regenerated from (1+k s )max i to (1-k s )min i respectively, and k s is the regeneration diffusion coefficient, so that This population is not easy to converge, causing the population fitness to fall into a local optimum;

S3-8:重复步骤S3-3到步骤S3-7,直到迭代次数达到系统设定的最大迭代次数;S3-8: Repeat steps S3-3 to S3-7 until the number of iterations reaches the maximum number of iterations set by the system;

S3-9:获取此时的种群适应度最优的种群为最优种群,作为步骤S4的模型应用参数;S3-9: Obtain the population with the best population fitness at this time as the optimal population, and use it as the model application parameter in step S4;

所述步骤S4将优化后的无迹卡尔曼滤波UKF算法应用于预测电池荷电状态SOC中,获得更为精确的电池工作状态,从而提高电池寿命和使用效率。The step S4 applies the optimized unscented Kalman filter UKF algorithm to predict the battery state of charge SOC to obtain a more accurate battery working state, thereby improving battery life and usage efficiency.

从上述技术方案可以看出,本发明实施例具有以下有益效果:It can be seen from the above technical solutions that the embodiments of the present invention have the following beneficial effects:

1.优化电池性能:精确的电池荷电状态SOC预测可以帮助优化电池的使用和维护,从而延长电池的使用寿命和性能;1. Optimize battery performance: Accurate battery state-of-charge SOC prediction can help optimize battery use and maintenance, thereby extending battery life and performance;

2.提高电池效率:通过准确预测电池的荷电状态SOC,可以更好地管理充电和放电过程,以提高电池的能量利用率和效率;2. Improve battery efficiency: By accurately predicting the battery's state of charge SOC, the charging and discharging process can be better managed to improve the battery's energy utilization and efficiency;

3.增加行驶里程:对于电动汽车而言,精确的电池荷电状态SOC预测可以帮助确定剩余的可行驶里程,从而增加行驶的安全性和可靠性;3. Increase driving range: For electric vehicles, accurate battery state-of-charge SOC prediction can help determine the remaining driving range, thereby increasing driving safety and reliability;

4.避免电池过充或欠放电:准确预测电池荷电状态SOC还可以帮助避免电池过充或欠放电的情况,这些情况可能会损害电池的性能或导致安全问题。4. Avoid battery overcharging or under-discharging: Accurately predicting battery state-of-charge (SOC) can also help avoid battery overcharging or under-discharging situations that may harm battery performance or cause safety issues.

附图说明Description of the drawings

图1为本发明基于CSO优化的无迹卡尔曼滤波预测电池荷电状态的方法的流程图;Figure 1 is a flow chart of the method of predicting battery state of charge based on CSO optimized unscented Kalman filter according to the present invention;

图2为人工经验整定、粒子群算法PSO整定和纵横交叉算法CSO整定三种方法在预测的每一时刻的误差;Figure 2 shows the errors at each moment of prediction by the three methods of artificial experience tuning, particle swarm algorithm PSO tuning and cross-horizontal algorithm CSO tuning;

图3为人工经验整定、粒子群算法PSO整定和纵横交叉算法CSO整定三种方法代入无迹卡尔曼滤波进行电池荷电状态SOC预测结果曲线;Figure 3 shows the curves of battery state-of-charge SOC prediction results using three methods: artificial experience tuning, particle swarm algorithm PSO tuning and cross-over algorithm CSO tuning.

图4为粒子群算法PSO整定和纵横交叉算法CSO整定的收敛速度。Figure 4 shows the convergence speed of particle swarm algorithm PSO tuning and cross-horizontal algorithm CSO tuning.

具体实施方式Detailed ways

下面结合具体实施例对本发明作进一步说明:The present invention will be further described below in conjunction with specific examples:

参见图1所示,本实施例所述的基于CSO优化的无迹卡尔曼滤波预测电池荷电状态的方法,包括以下步骤:As shown in Figure 1, the method of predicting the battery state of charge based on CSO optimized unscented Kalman filter described in this embodiment includes the following steps:

S1:采用无迹卡尔曼滤波UKF算法预测电池荷电状态SOC时,计算影响预测精度的相关参数;S1: When using the unscented Kalman filter UKF algorithm to predict the battery state of charge SOC, calculate the relevant parameters that affect the prediction accuracy;

S2:对被预测电池进行测试,获取其城市道路循环工况UUDS数据;S2: Test the predicted battery and obtain its urban road cycle condition UUDS data;

S3:采用纵横交叉算法CSO对无迹卡尔曼滤波UKF算法进行优化;S3: Use the vertical and horizontal crossover algorithm CSO to optimize the unscented Kalman filter UKF algorithm;

S4:将优化后的无迹卡尔曼滤波UKF算法应用于预测电池荷电状态SOC中,获得更为精确的电池工作状态,从而提高电池寿命和使用效率;S4: Apply the optimized unscented Kalman filter UKF algorithm to predict the battery state of charge SOC to obtain a more accurate battery working state, thereby improving battery life and efficiency;

所述步骤S1中,计算影响预测精度的相关参数的具体步骤如下:In step S1, the specific steps for calculating relevant parameters that affect prediction accuracy are as follows:

S1-1:在无迹卡尔曼滤波UKF算法的无迹变换UT参数初始化阶段,需要进行Sigma点集合的对称性参数λ,近似均值Sigma点权重矩阵Wm和近似协方差Sigma点权重矩阵Wc的计算分别为:S1-1: In the unscented transformation UT parameter initialization stage of the unscented Kalman filter UKF algorithm, it is necessary to carry out the symmetry parameter λ of the Sigma point set, the approximate mean Sigma point weight matrix W m and the approximate covariance Sigma point weight matrix W c The calculations are:

(1)式中,i为无迹变换的维度,α为Sigma点的采样参数,β为高斯分布的一个特性参数,L为状态向量的维度,k为控制Sigma点距离均值的距离的特性参数;(1) In the formula, i is the dimension of the unscented transformation, α is the sampling parameter of the Sigma point, β is a characteristic parameter of the Gaussian distribution, L is the dimension of the state vector, and k is the characteristic parameter that controls the distance of the Sigma point from the mean. ;

S1-2:在无迹卡尔曼滤波UKF算法的预测阶段,滤波器采用上一状态的后验估计,计算出对当前状态的先验估计,在此过程中需要计算出先验估计协方差 S1-2: In the prediction stage of the unscented Kalman filter UKF algorithm, the filter uses the posterior estimate of the previous state to calculate the prior estimate of the current state. In this process, the prior estimate covariance needs to be calculated.

(2)式中,为t时刻i维度的先验概率分布Sigma点采样结果,/>为t时刻的先验估计均值,T为逆矩阵符号,Q为过程噪声的协方差矩阵;(2) In the formula, is the Sigma point sampling result of the prior probability distribution of i dimension at time t,/> is the a priori estimated mean at time t, T is the inverse matrix symbol, and Q is the covariance matrix of the process noise;

S1-3:在无迹卡尔曼滤波UKF算法的更新阶段,滤波器利用当前状态的观测值,优化在预测阶段获得的预测值,以获得一个更精确的新估计值,在此过程中需要计算t时刻观测量zt的协方差PztS1-3: In the update stage of the unscented Kalman filter UKF algorithm, the filter uses the observation value of the current state to optimize the prediction value obtained in the prediction stage to obtain a more accurate new estimate value. In this process, calculation is required Covariance P zt of observation quantity z t at time t:

(3)式中,为t时刻i维度的观测向量,/>为t时刻观测量zt的均值,R为测量噪声的协方差矩阵;(3) In the formula, is the observation vector of dimension i at time t,/> is the mean value of the observation quantity z t at time t, and R is the covariance matrix of the measurement noise;

S1-4:进行无迹卡尔曼滤波UKF算法的优化参数分析:S1-4: Perform optimization parameter analysis of the unscented Kalman filter UKF algorithm:

根据无迹卡尔曼滤波UKF算法,存在以下需要在算法开始运行前确定的参数:According to the unscented Kalman filter UKF algorithm, there are the following parameters that need to be determined before the algorithm starts running:

过程噪声的协方差矩阵Q用于估计系统模型的误差和不确定性,其通常为一个对角矩阵,无迹卡尔曼滤波UKF算法预测电池荷电状态SOC的过程中,过程噪声的协方差矩阵Q为:The covariance matrix Q of the process noise is used to estimate the error and uncertainty of the system model, which is usually a diagonal matrix. In the process of predicting the battery state of charge SOC by the unscented Kalman filter UKF algorithm, the covariance matrix of the process noise Q is:

则在(4)式中,需要整定的参数为3个,分别为过程噪声的协方差Q1,Q2,Q3Then in equation (4), there are three parameters that need to be tuned, namely the covariances Q 1 , Q 2 , and Q 3 of the process noise;

测量噪声的协方差矩阵R用于估计测量模型的误差和不确定性,其通常为一个对角矩阵,无迹卡尔曼滤波UKF算法预测电池荷电状态SOC的过程中,测量噪声的协方差矩阵R为:The covariance matrix R of the measurement noise is used to estimate the error and uncertainty of the measurement model. It is usually a diagonal matrix. In the process of predicting the battery state of charge SOC by the unscented Kalman filter UKF algorithm, the covariance matrix of the measurement noise R is:

R=[R1] (5)R=[R 1 ] (5)

则在(5)式中,需要整定的参数为1个,为测量噪声的协方差R1Then in equation (5), there is one parameter that needs to be tuned, which is the covariance R 1 of the measurement noise;

采样参数α用于控制Sigma点的分布密度,应选取合适的值以保证UT点的充分覆盖,采样参数α的取值范围为0到1之间;The sampling parameter α is used to control the distribution density of Sigma points. Appropriate values should be selected to ensure sufficient coverage of UT points. The value range of the sampling parameter α is between 0 and 1;

所述步骤S2对被预测电池进行测试,获取其城市道路循环工况UUDS数据,具体步骤如下:The step S2 tests the predicted battery and obtains its UUDS data of urban road cycle conditions. The specific steps are as follows:

S2-1:确定待测定电池的额定容量和额定电压,确定测试装置的参数,包括负载电阻及负载电抗;S2-1: Determine the rated capacity and rated voltage of the battery to be measured, and determine the parameters of the test device, including load resistance and load reactance;

S2-2:将待测定的电池充电至100%电量,并静置1-2小时以稳定电池状态;S2-2: Charge the battery to be measured to 100% capacity and leave it alone for 1-2 hours to stabilize the battery state;

S2-3:将电池从充电器上取下,让其在室温下静置至少30分钟,以便电池内部温度达到室温;S2-3: Remove the battery from the charger and let it sit at room temperature for at least 30 minutes so that the internal temperature of the battery reaches room temperature;

S2-4:将电池放在城市道路循环工况UUDS测试装置上,确保电池的两端正确接触测试装置的电极;S2-4: Place the battery on the UUDS test device under urban road cycle conditions and ensure that both ends of the battery are in correct contact with the electrodes of the test device;

S2-5:按照城市道路循环工况UUDS的要求设置测试条件,包括电流范围、电压范围、温度及时间,确保测试条件符合电池使用情况;S2-5: Set test conditions according to the requirements of UUDS under urban road cycle conditions, including current range, voltage range, temperature and time, to ensure that the test conditions meet the battery usage conditions;

S2-6:开始测试,记录测试数据,包括电流、电压及时间,直至电池电量降至一定程度或测试时间到达预设值;S2-6: Start the test and record the test data, including current, voltage and time, until the battery power drops to a certain level or the test time reaches the preset value;

S2-7:分析测试数据,评估该数据的有效性,并取其中的电流数据和电压数据用于步骤S3的计算;S2-7: Analyze the test data, evaluate the validity of the data, and obtain the current data and voltage data for the calculation of step S3;

所述步骤S3采用纵横交叉算法CSO对无迹卡尔曼滤波UKF算法进行优化,具体步骤如下:The step S3 uses the vertical and horizontal crossover algorithm CSO to optimize the unscented Kalman filter UKF algorithm. The specific steps are as follows:

S3-1:初始化步骤S1中五个参数的上限与下限,包括过程噪声的协方差Q1,Q2,Q3,测量噪声的协方差R1和采样参数α,在该区间内随机生成N个数据对,称之为种群;S3-1: The upper and lower limits of the five parameters in the initialization step S1, including the covariance Q 1 , Q 2 , Q 3 of the process noise, the covariance R 1 of the measurement noise and the sampling parameter α, randomly generate N within this interval Data pairs are called populations;

S3-2:采用步骤S3-1生成的N个数据对进行第一次种群适应度计算,种群适应度越大代表该组参数的在拟合过程中的误差越小,种群适应度的具体计算步骤如下:S3-2: Use the N data pairs generated in step S3-1 to perform the first population fitness calculation. The greater the population fitness, the smaller the error in the fitting process of the group of parameters. Specific calculation of population fitness. Proceed as follows:

S3-2-1:根据步骤S2-1确定的测试条件,得到观测矩阵Z;S3-2-1: Obtain the observation matrix Z according to the test conditions determined in step S2-1;

S3-2-2:根据输入的待整定的参数数据对,进行无迹变换UT参数的初始化;S3-2-2: Initialize the unscented transformation UT parameters based on the input parameter data pairs to be tuned;

S3-2-3:把步骤S2得到的城市道路循环工况UUDS的电流数据,加上一定的正态噪声以模拟实际工作环境;S3-2-3: Add a certain amount of normal noise to the UUDS current data of urban road cycle conditions obtained in step S2 to simulate the actual working environment;

S3-2-4:根据步骤S3-2-3得到的加上噪声的电流数据,进行Sigma点的生成;S3-2-4: Generate Sigma points based on the noise-added current data obtained in step S3-2-3;

S3-2-5:根据步骤S3-2-4得到的Sigma点进行卡尔曼滤波KF的状态预测;S3-2-5: Predict the state of Kalman filter KF based on the Sigma points obtained in step S3-2-4;

S3-2-6:根据步骤S3-2-5得到的状态预测结果进行Sigma点重构;S3-2-6: Perform Sigma point reconstruction based on the state prediction results obtained in step S3-2-5;

S3-2-7:根据步骤S2得到的城市道路循环工况UUDS的电压数据和步骤S3-2-6得到的状态预测重构后的点,进行卡尔曼滤波KF的观测更新;S3-2-7: Based on the voltage data of the urban road cycle condition UUDS obtained in step S2 and the reconstructed point of state prediction obtained in step S3-2-6, perform the observation update of the Kalman filter KF;

S3-2-8:重复从步骤S3-2-4到步骤S3-2-7,直到得到整个测试时间周期的电池荷电状态的预测值;S3-2-8: Repeat steps S3-2-4 to S3-2-7 until the predicted value of the battery state of charge for the entire test time period is obtained;

S3-2-9:采用安时积分法计算电池荷电状态,并作为电池荷电状态的真实参考值;S3-2-9: Use the ampere-hour integration method to calculate the battery state of charge and use it as a true reference value for the battery state of charge;

S3-2-10:将S3-2-8的预测结果,以S3-2-9的安时积分法的结果为标准,进行误差均值计算;S3-2-10: Calculate the mean error based on the prediction results of S3-2-8 and the results of the ampere-hour integration method of S3-2-9 as the standard;

S3-2-11:将步骤S3-2-4到步骤S3-2-10重复5次,以排除由于电流噪声导致的偶发性预测过好或过差,将5次的误差均值取平均值再取倒数作为该种群的种群适应度,并输出给步骤S3-3使用;S3-2-11: Repeat steps S3-2-4 to S3-2-10 5 times to eliminate occasional over- or under-predictions caused by current noise, and average the errors of the 5 times. Take the reciprocal as the population fitness of the population, and output it to step S3-3 for use;

S3-3:进行纵横交叉法CSO的纵向交叉运算,纵向交叉过程是把不同维度的趋优参数进行交叉的一种算术运算,其表达式为:S3-3: Perform the vertical crossover operation of the vertical and horizontal crossover method CSO. The vertical crossover process is an arithmetic operation that crosses the optimization parameters of different dimensions. Its expression is:

Mvc(m,d1)=r×X(m,d1)+(1-r)×X(m,d2)+c(X(m,d1)-X(m,d2)) (6)M vc (m,d 1 )=r×X(m,d 1 )+(1-r)×X(m,d 2 )+c(X(m,d 1 )-X(m,d 2 ) ) (6)

(6)式中,r和c为在0~1之间的随机数,X(m,d1)和X(m,d2)为不同维度的父代趋优参数,Mvc(m,d1)为父代不同维度进行纵向交叉产生的子代趋优参数,参数m=1,2,…,N,N为种群规模;d1,d2=1,2,...,C,C为种群的维度数量;In the formula (6), r and c are random numbers between 0 and 1, X(m,d 1 ) and X(m,d 2 ) are parent optimization parameters of different dimensions, M vc (m, d 1 ) is the optimization parameter of the offspring generated by vertical cross of different dimensions of the parent, the parameter m=1,2,...,N, N is the population size; d 1 ,d 2 =1,2,...,C , C is the number of dimensions of the population;

S3-4:计算步骤S3-3生成的子代的种群适应度,与父代的种群适应度比较,保留种群适应度较大的种群,使得整体种群朝着更好的方向进化;S3-4: Calculate the population fitness of the offspring generated in step S3-3, compare it with the population fitness of the parent, and retain the population with greater population fitness so that the overall population evolves in a better direction;

S3-5:进行纵横交叉法CSO的横向交叉运算,横向交叉过程是把不同解的所有趋优参数交叉的一种算术运算,其表达式为:S3-5: Perform the horizontal crossover operation of the vertical and horizontal crossover method CSO. The horizontal crossover process is an arithmetic operation that crosses all the optimization parameters of different solutions. Its expression is:

(7)式中,参数n=1,2,…,N,N为种群规模;In the formula (7), the parameters n=1,2,...,N, N is the population size;

S3-6:计算步骤S3-5生成的子代的种群适应度,与父代的种群适应度比较,保留种群适应度较大的种群,使得整体种群朝着更好的方向进化;S3-6: Calculate the population fitness of the offspring generated in step S3-5, compare it with the population fitness of the parent, and retain the population with greater population fitness, so that the overall population evolves in a better direction;

S3-7:采用以下步骤对种群进行重新生成:S3-7: Use the following steps to regenerate the population:

S3-7-1:如无迹卡尔曼滤波UKF算法预测过程终止,则标记该种群的种群适应度为0;S3-7-1: If the unscented Kalman filter UKF algorithm prediction process terminates, the population fitness of the population will be marked as 0;

S3-7-2:在每一轮迭代结束前,将统计种群适应度为0的种群进行重新生成;S3-7-2: Before the end of each iteration, regenerate the population with a statistical population fitness of 0;

S3-7-3:获取每个维度i,分别取种群适应度不为0的种群在该维度下的最大值maxi与最小值miniS3-7-3: Obtain each dimension i, and respectively obtain the maximum value max i and minimum value min i of the population whose fitness is not 0 in this dimension;

S3-7-4:新的种群生成时,每个维度i的参数分别在(1+ks)maxi到(1-ks)mini中重新生成,ks为重生成扩散系数,使得该种群不容易趋同导致种群适应度陷入局部最优;S3-7-4: When a new population is generated, the parameters of each dimension i are regenerated from (1+k s )max i to (1-k s )min i respectively, and k s is the regeneration diffusion coefficient, so that This population is not easy to converge, causing the population fitness to fall into a local optimum;

S3-8:重复步骤S3-3到步骤S3-7,直到迭代次数达到系统设定的最大迭代次数;S3-8: Repeat steps S3-3 to S3-7 until the number of iterations reaches the maximum number of iterations set by the system;

S3-9:获取此时的种群适应度最优的种群为最优种群,作为步骤S4的模型应用参数;S3-9: Obtain the population with the best population fitness at this time as the optimal population, and use it as the model application parameter in step S4;

所述步骤S4将优化后的无迹卡尔曼滤波UKF算法应用于预测电池荷电状态SOC中,获得更为精确的电池工作状态,从而提高电池寿命和使用效率。The step S4 applies the optimized unscented Kalman filter UKF algorithm to predict the battery state of charge SOC to obtain a more accurate battery working state, thereby improving battery life and usage efficiency.

为验证基于CSO优化的无迹卡尔曼滤波预测电池荷电状态方法的有效性,在Matlab环境中使用无迹卡尔曼滤波对电池荷电状态进行预测,无迹卡尔曼滤波的参数分别使用人工经验整定、粒子群算法PSO整定和纵横交叉算法CSO整定。同时使用安时积分法Ah计算电池的荷电状态,作为该电池荷电状态的真实参考值。PSO与CSO进行相同的200次迭代,评估方法为使用同一参数组重复进行5次预测,对5次预测结果与真实值的误差均值取平均,作为该参数组的误差均值,该误差均值越小越好。人工经验整定、粒子群算法PSO整定和纵横交叉算法CSO整定三种方法得出的最优参数组及其对应的误差均值如表1所示。人工经验整定、粒子群算法PSO整定和纵横交叉算法CSO整定三种方法在预测的每一时刻的误差如图2所示。人工经验整定、粒子群算法PSO整定和纵横交叉算法CSO整定三种方法代入无迹卡尔曼滤波进行电池荷电状态SOC预测结果曲线如图3所示。粒子群算法PSO整定和纵横交叉算法CSO整定的收敛速度如图4所示。In order to verify the effectiveness of the unscented Kalman filter method for predicting the battery state of charge based on CSO optimization, the unscented Kalman filter was used to predict the battery state of charge in the Matlab environment. The parameters of the unscented Kalman filter were determined using artificial experience. tuning, particle swarm algorithm PSO tuning and cross-horizontal algorithm CSO tuning. At the same time, the ampere-hour integration method Ah is used to calculate the battery's state of charge as a true reference value for the battery's state of charge. PSO and CSO perform the same 200 iterations. The evaluation method is to use the same parameter group to repeat 5 predictions. The average error between the 5 prediction results and the true value is averaged as the error average of the parameter group. The smaller the error average. The better. The optimal parameter group and its corresponding error mean obtained by the three methods of artificial experience tuning, particle swarm algorithm PSO tuning and cross-horizontal algorithm CSO tuning are shown in Table 1. The errors of the three methods of artificial experience tuning, particle swarm algorithm PSO tuning and cross-horizontal algorithm CSO tuning at each moment of prediction are shown in Figure 2. The three methods of artificial experience tuning, particle swarm algorithm PSO tuning and cross-horizontal algorithm CSO tuning are substituted into the unscented Kalman filter to predict the battery state of charge SOC. The result curve is shown in Figure 3. The convergence speeds of particle swarm algorithm PSO tuning and vertical-horizontal crossover algorithm CSO tuning are shown in Figure 4.

表1三种整定方法的最优参数组及其对应的误差均值Table 1 The optimal parameter groups of the three tuning methods and their corresponding error averages

结合表1和图2~4可知,相较于人工经验整定和粒子群算法PSO整定的参数组,纵横交叉算法CSO整定的参数组用于无迹卡尔曼滤波预测电池荷电状态时,预测准确度分别提升了26520倍和7.63倍,CSO算法的收敛速度较PSO算法提升了91.7%,这表明CSO算法全局收敛速度更快,且能使无迹卡尔曼滤波参数有效脱离局部最优,全局寻优能力更强。Combining Table 1 and Figures 2 to 4, it can be seen that compared with the parameter set set by manual experience and the parameter set set by the particle swarm algorithm PSO, the parameter set set by the cross-horizontal algorithm CSO is used for unscented Kalman filtering to predict the battery state of charge, and the prediction is accurate. The degrees are increased by 26520 times and 7.63 times respectively. The convergence speed of the CSO algorithm is 91.7% higher than that of the PSO algorithm. This shows that the global convergence speed of the CSO algorithm is faster, and the unscented Kalman filter parameters can effectively escape from the local optimum, and the global search The superior ability is stronger.

以上所述之实施例子只为本发明之较佳实施例,并非以此限制本发明的实施范围,故凡依本发明之形状、原理所作的变化,均应涵盖在本发明的保护范围内。The implementation examples described above are only preferred embodiments of the present invention and do not limit the scope of the present invention. Therefore, any changes made based on the shape and principle of the present invention should be covered by the protection scope of the present invention.

Claims (1)

1. The method for predicting the battery state of charge based on CSO optimization by unscented Kalman filtering is characterized by comprising the following steps:
step S1: calculating relevant parameters affecting the prediction accuracy when predicting the state of charge (SOC) of the battery by adopting Unscented Kalman Filtering (UKF) algorithm;
step S2: testing the predicted battery to obtain UUUDS data of the urban road circulation condition;
step S3: adopting a criss-cross algorithm CSO to optimize an unscented Kalman filter UKF algorithm;
step S4: the optimized unscented Kalman filter UKF algorithm is applied to the prediction of the battery state of charge (SOC) to obtain a more accurate battery working state, so that the service life and the service efficiency of the battery are improved;
in the step S1, the specific steps of calculating the relevant parameters affecting the prediction accuracy are as follows:
s1-1: in the unscented transformation UT parameter initialization stage of unscented Kalman filtering UKF algorithm, symmetry parameter lambda of Sigma point set is needed to be performed, and approximate mean Sigma point weight matrix W is approximated m And approximate covariance Sigma Point weight matrix W c The calculation of (1) is as follows:
(1) Wherein i is the dimension of unscented transformation, alpha is the sampling parameter of Sigma points, beta is one characteristic parameter of Gaussian distribution, L is the dimension of state vectors, and k is the characteristic parameter for controlling the distance from Sigma points to the mean value;
s1-2: in the prediction stage of unscented Kalman filtering UKF algorithm, the filter adopts the posterior estimation of the last state to calculate the prior estimation of the current state, and the prior estimation covariance needs to be calculated in the process
(2) In the method, in the process of the invention,sigma point sampling result for a priori probability distribution of dimension i at time t,>the prior estimated mean value at the moment T is represented by an inverse matrix symbol, and the covariance matrix of the process noise is represented by Q;
s1-3: in the updating stage of unscented Kalman filtering UKF algorithm, the filter optimizes the predicted value obtained in the predicting stage by using the observed value of the current state to obtain a more accurate new estimated value, and in the process, the observed value z at the moment t needs to be calculated t Covariance of (2)
(3) In the method, in the process of the invention,for the observation vector of dimension i at time t, +.>For the observation of the quantity z at time t t R is the covariance matrix of the measured noise;
s1-4: and (3) carrying out optimization parameter analysis of unscented Kalman filtering UKF algorithm:
according to unscented kalman filter UKF algorithm, there are the following parameters that need to be determined before the algorithm starts to run:
the covariance matrix Q of the process noise is used for estimating the error and uncertainty of the system model, and is usually a diagonal matrix, and in the process of predicting the battery state of charge SOC by using the unscented kalman filter UKF algorithm, the covariance matrix Q of the process noise is:
in equation (4), the parameters to be set are 3, the covariance Q of the process noise 1 ,Q 2 ,Q 3
The covariance matrix R of the measurement noise is used for estimating the error and uncertainty of a measurement model, and is usually a diagonal matrix, and in the process of predicting the battery charge state SOC by using the unscented Kalman filter UKF algorithm, the covariance matrix R of the measurement noise is as follows:
R=[R 1 ] (5)
then in equation (5), the parameters to be set are 1, which is the covariance R of the measurement noise 1
The sampling parameter alpha is used for controlling the distribution density of Sigma points, and proper values are selected to ensure the full coverage of UT points, and the value range of the sampling parameter alpha is between 0 and 1;
step S2 tests the predicted battery to obtain UUDS data of the urban road circulation working condition, and the specific steps are as follows:
s2-1: determining rated capacity and rated voltage of a battery to be measured, and determining parameters of a testing device, including load resistance and load reactance;
s2-2: charging the battery to be measured to 100% of electric quantity, and standing for 1-2 hours to stabilize the battery state;
s2-3: removing the battery from the charger and allowing it to stand at room temperature for at least 30 minutes so that the internal temperature of the battery reaches room temperature;
s2-4: placing the battery on a UUDS testing device under the urban road circulation working condition, and ensuring that two ends of the battery are correctly contacted with electrodes of the testing device;
s2-5: setting testing conditions including a current range, a voltage range, a temperature and a time according to the UUUDS requirement of the urban road circulation working condition, and ensuring that the testing conditions accord with the service condition of the battery;
s2-6: starting a test, and recording test data including current, voltage and time until the electric quantity of the battery is reduced to a certain degree or the test time reaches a preset value;
s2-7: analyzing the test data, evaluating the validity of the data, and taking the current data and the voltage data in the test data for calculating in the step S3;
the step S3 adopts a criss-cross algorithm CSO to optimize an unscented Kalman filter UKF algorithm, and comprises the following specific steps:
s3-1: initializing upper and lower limits of five parameters in step S1, including covariance Q of process noise 1 ,Q 2 ,Q 3 Covariance R of measurement noise 1 And sampling parameter alpha, randomly generating N data pairs, called population, in the interval;
s3-2: and (3) carrying out first population fitness calculation by adopting the N data pairs generated in the step (S3-1), wherein the larger the population fitness is, the smaller the error of the group of parameters in the fitting process is represented, and the specific calculation steps of the population fitness are as follows:
s3-2-1: obtaining an observation matrix Z according to the test conditions determined in the step S2-1;
s3-2-2: initializing unscented transformation UT parameters according to the input parameter data pair to be set;
s3-2-3: adding certain normal noise to the current data of the UUDS of the urban road circulation working condition obtained in the step S2 to simulate the actual working environment;
s3-2-4: generating Sigma points according to the current data added with noise obtained in the step S3-2-3;
s3-2-5: carrying out state prediction of Kalman filtering KF according to the Sigma points obtained in the step S3-2-4;
s3-2-6: performing Sigma point reconstruction according to the state prediction result obtained in the step S3-2-5;
s3-2-7: according to the voltage data of the UUZDS of the urban road circulation working condition obtained in the step S2 and the point after the state prediction reconstruction obtained in the step S3-2-6, carrying out the observation updating of the Kalman filtering KF;
s3-2-8: repeating steps S3-2-4 to S3-2-7 until a predicted value of the battery state of charge is obtained for the whole test time period;
s3-2-9: calculating the state of charge of the battery by adopting an ampere-hour integration method, and taking the state of charge as a true reference value of the state of charge of the battery;
s3-2-10: calculating an error mean value by taking the prediction result of the S3-2-8 and the result of the ampere-hour integration method of the S3-2-9 as a standard;
s3-2-11: repeating the steps S3-2-4 to S3-2-10 for 5 times to eliminate accidental prediction too good or too bad caused by current noise, taking the average value of error means of 5 times, taking the reciprocal value as the population fitness of the population, and outputting the population fitness to the step S3-3 for use;
s3-3: the longitudinal crossover operation of the longitudinal crossover method CSO is carried out, the longitudinal crossover process is an arithmetic operation of crossing the preference parameters with different dimensions, and the expression is as follows:
M vc (m,d 1 )=r×X(m,d 1 )+(1-r)×X(m,d 2 )+c(X(m,d 1 )-X(m,d 2 )) (6)
(6) Wherein r and c are random numbers ranging from 0 to 1, X (m, d 1 ) And X (m, d) 2 ) For parent preference parameters of different dimensions, M vc (m,d 1 ) The offspring trending parameters generated by longitudinally crossing parent different dimensions are represented by parameters m=1, 2, …, N and N being population sizes; d, d 1 ,d 2 =1, 2,..c, C is the number of dimensions of the population;
s3-4: calculating the population fitness of the offspring generated in the step S3-3, and comparing the population fitness with the population fitness of the father, and reserving the population with larger population fitness to enable the whole population to evolve towards a better direction;
s3-5: the transverse crossover operation of the crisscross CSO is carried out, the transverse crossover process is an arithmetic operation of crossing all the optimal parameters of different solutions, and the expression is as follows:
(7) Wherein, the parameter n=1, 2, …, N is population size;
s3-6: calculating the population fitness of the offspring generated in the step S3-5, and comparing the population fitness with the population fitness of the father, and reserving the population with larger population fitness to enable the whole population to evolve towards a better direction;
s3-7: the population is regenerated by the following steps:
s3-7-1: if the unscented Kalman filtering UKF algorithm prediction process is terminated, marking the population fitness of the population as 0;
s3-7-2: regenerating the population with the statistical population fitness of 0 before each round of iteration is finished;
s3-7-3: obtaining each dimension i, and respectively obtaining the maximum value max of the population with the population fitness not being 0 in the dimension i And minimum value min i
S3-7-4: when generating new population, the parameters of each dimension i are respectively in (1+k) s )max i To (1-k) s )min i Is regenerated, k s For generating the diffusion coefficient, the population is not easy to converge to cause the population fitness to fall into local optimum;
s3-8: repeating the steps S3-3 to S3-7 until the iteration number reaches the maximum iteration number set by the system;
s3-9: acquiring a population with optimal population fitness at the moment as an optimal population, and taking the optimal population as a model application parameter of the step S4;
and step S4, applying the optimized unscented Kalman filtering UKF algorithm to the predicted battery state of charge SOC to obtain a more accurate battery working state, thereby improving the service life and the service efficiency of the battery.
CN202310302474.0A 2023-03-23 2023-03-23 Method for predicting battery state of charge based on CSO optimized unscented Kalman filter Active CN116203432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310302474.0A CN116203432B (en) 2023-03-23 2023-03-23 Method for predicting battery state of charge based on CSO optimized unscented Kalman filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310302474.0A CN116203432B (en) 2023-03-23 2023-03-23 Method for predicting battery state of charge based on CSO optimized unscented Kalman filter

Publications (2)

Publication Number Publication Date
CN116203432A CN116203432A (en) 2023-06-02
CN116203432B true CN116203432B (en) 2023-10-20

Family

ID=86512867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310302474.0A Active CN116203432B (en) 2023-03-23 2023-03-23 Method for predicting battery state of charge based on CSO optimized unscented Kalman filter

Country Status (1)

Country Link
CN (1) CN116203432B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117929840B (en) * 2023-12-26 2025-03-11 国网湖北省电力有限公司信息通信公司 Harmonic estimation method and device suitable for large-scale electric automobile access

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107064811A (en) * 2017-03-01 2017-08-18 华南理工大学 A kind of lithium battery SOC On-line Estimation methods
CN107505574A (en) * 2017-08-08 2017-12-22 中华人民共和国成都出入境检验检疫局 The UKF lithium battery evaluation methods with fading factor based on maximum likelihood
CN109143093A (en) * 2018-06-29 2019-01-04 广东工业大学 Based on the battery SOC evaluation method for intersecting optimization neural network in length and breadth
CN109492814A (en) * 2018-11-15 2019-03-19 中国科学院深圳先进技术研究院 A kind of Forecast of Urban Traffic Flow prediction technique, system and electronic equipment
CN111220920A (en) * 2019-11-22 2020-06-02 国网浙江省电力有限公司台州供电公司 State-of-charge calculation method for retired lithium-ion batteries based on H∞ unscented Kalman filter algorithm
CN111505506A (en) * 2020-05-15 2020-08-07 吉林大学 A battery SOC estimation method based on fusion of multi-scale Kalman filter and unscented Kalman filter
CN111555387A (en) * 2020-05-12 2020-08-18 广东工业大学 Circulation-free optimization control method for reconfigurable battery pack
CN111650517A (en) * 2020-04-20 2020-09-11 北京理工大学 A method of battery state of charge estimation
CN111856282A (en) * 2019-04-19 2020-10-30 武汉理工大学 State estimation method of vehicle lithium battery based on improved genetic unscented Kalman filter
CN113589177A (en) * 2021-06-29 2021-11-02 广东工业大学 SOC estimation method for vehicle-mounted power battery
CN114740375A (en) * 2022-04-08 2022-07-12 浙江大学 Online lithium battery state of charge estimation method based on state estimation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11360147B2 (en) * 2020-03-03 2022-06-14 Karma Automotive Llc Method of determining the state of charge of a battery used in an electric vehicle

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107064811A (en) * 2017-03-01 2017-08-18 华南理工大学 A kind of lithium battery SOC On-line Estimation methods
CN107505574A (en) * 2017-08-08 2017-12-22 中华人民共和国成都出入境检验检疫局 The UKF lithium battery evaluation methods with fading factor based on maximum likelihood
CN109143093A (en) * 2018-06-29 2019-01-04 广东工业大学 Based on the battery SOC evaluation method for intersecting optimization neural network in length and breadth
CN109492814A (en) * 2018-11-15 2019-03-19 中国科学院深圳先进技术研究院 A kind of Forecast of Urban Traffic Flow prediction technique, system and electronic equipment
CN111856282A (en) * 2019-04-19 2020-10-30 武汉理工大学 State estimation method of vehicle lithium battery based on improved genetic unscented Kalman filter
CN111220920A (en) * 2019-11-22 2020-06-02 国网浙江省电力有限公司台州供电公司 State-of-charge calculation method for retired lithium-ion batteries based on H∞ unscented Kalman filter algorithm
CN111650517A (en) * 2020-04-20 2020-09-11 北京理工大学 A method of battery state of charge estimation
CN111555387A (en) * 2020-05-12 2020-08-18 广东工业大学 Circulation-free optimization control method for reconfigurable battery pack
CN111505506A (en) * 2020-05-15 2020-08-07 吉林大学 A battery SOC estimation method based on fusion of multi-scale Kalman filter and unscented Kalman filter
CN113589177A (en) * 2021-06-29 2021-11-02 广东工业大学 SOC estimation method for vehicle-mounted power battery
CN114740375A (en) * 2022-04-08 2022-07-12 浙江大学 Online lithium battery state of charge estimation method based on state estimation

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于扩展PSO 优化的SVM 铅酸蓄电池荷电状态估测;邓建威;工业控制计算机;126-129 *
基于改进卡尔曼滤波算法的锂电池参数辨识与SOC估算;李振鹏;CNKI优秀硕士论文全文库;全文 *
电动汽车锂离子电池荷电状态评估方法研究;陈风;CNKI优秀硕士学位论文全文库;全文 *

Also Published As

Publication number Publication date
CN116203432A (en) 2023-06-02

Similar Documents

Publication Publication Date Title
Lin et al. State of charge estimation with the adaptive unscented Kalman filter based on an accurate equivalent circuit model
CN103399276B (en) A kind of capacity of lithium ion battery is estimated and cycles left life-span prediction method
CN113189490B (en) Lithium battery health state estimation method based on feature screening and Gaussian process regression
CN106055775B (en) A kind of service life of secondary cell prediction technique that particle filter is combined with mechanism model
CN113109729B (en) Vehicle power battery SOH evaluation method based on accelerated aging test and real vehicle working condition
CN113009349A (en) Lithium ion battery health state diagnosis method based on deep learning model
CN116680983A (en) Lithium ion residual life prediction method based on improved particle filter model
CN113702843A (en) Lithium battery parameter identification and SOC estimation method based on suburb optimization algorithm
CN104569844B (en) Valve-regulated sealed lead-acid batteries health status monitoring method
CN107367699A (en) A kind of lithium battery SOC estimation new methods based on fractional model
CN111220920B (en) State of charge calculation method for decommissioned lithium-ion batteries based on H∞ unscented Kalman filter algorithm
Zhao et al. Estimation of the SOC of energy-storage lithium batteries based on the voltage increment
CN113406525B (en) Lithium battery pack residual life prediction method based on optimization variation modal decomposition
CN106772067A (en) The method that Multiple Time Scales IAPF filters estimated driving force battery charge state and health status
CN113484771A (en) Method for estimating wide-temperature full-life SOC and capacity of lithium ion battery
CN115047368B (en) Learning method of state estimation model, state estimation method and state estimation device
CN117825970B (en) Battery degradation analysis method, device, equipment and storage medium
CN112083346B (en) LSTM-based parallel battery pack internal current distribution estimation method and system
CN116203432B (en) Method for predicting battery state of charge based on CSO optimized unscented Kalman filter
CN114200333A (en) A kind of lead-acid battery capacity prediction method
CN112698217B (en) Battery cell capacity estimation method based on particle swarm optimization algorithm
CN112287597B (en) Lead-acid storage battery SOH estimation method based on VPGA-GPR algorithm
CN117110884A (en) Remaining service life prediction method of lithium battery based on multi-core correlation vector machine
CN118519059A (en) Improved gating cycle unit algorithm-based lithium ion battery SOH estimation method
CN114861545B (en) Online estimation method of lithium battery SOP based on RNN neural network and multi-parameter constraints

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
GR01 Patent grant
GR01 Patent grant