A kind of dynamic lithium battery SOC storage method

文档序号:1755012 发布日期:2019-11-29 浏览:3次 中文

阅读说明:本技术 一种动力锂电池soc存储方法 (A kind of dynamic lithium battery SOC storage method ) 是由 沈永柏 王翰超 王云 孙艳 康义 尹坤 李享 刘欢 于 2019-07-18 设计创作,主要内容包括:本发明涉及动力电池管理系统领域,尤其涉及一种动力锂电池SOC存储方法,该方法包括运行数据保存的步骤,所述运行数据保存的步骤为:首先判断电池管理系统BMS是否为下电状态,当不是为下电状态时,计算电池SOC的变化量,当电池SOC变化达到设定值时,在带电可擦可编程只读存储器(EEPROM)中的第一存储单元存储剩余容量,对于第一存储单元中的剩余容量,增加数据存储故障标志,每次存储后回读保存数据。当下电时,将剩余容量保存到第三存储单元中。该发明的优点在于:电池管理系统BMS正常运行中存储数据时,增加回读机制,保证存储数据的正确性。(The present invention relates to power battery management system fields, more particularly to a kind of dynamic lithium battery SOC storage method, this method includes the steps that operation data saves, the step of operation data saves are as follows: first determine whether battery management system BMS is power-down state, when not being for power-down state, calculate the variable quantity of battery SOC, when battery SOC variation reaches setting value, residual capacity is being stored with the first storage unit in Electrically Erasable Programmable Read-Only Memory (EEPROM), for the residual capacity in the first storage unit, increase data failure memory mark, readback saves data after storage every time.Instantly when electric, residual capacity is saved in third storage unit.The advantages of invention, is: in battery management system BMS normal operation when storing data, increasing readback mechanism, guarantees the correctness of storing data.)

1. a kind of dynamic lithium battery SOC storage method, which is characterized in that include the steps that operation data saves, the operation number It is as follows according to the step of saving:

SA1, the variable quantity for calculating battery SOC, into SA2, otherwise enter SA1 when battery SOC variation reaches setting value;

SA2, residual capacity is being stored with the first storage unit in Electrically Erasable Programmable Read-Only Memory (EEPROM), entered SA3;

The data saved in SA3, the first storage unit of readback, compare the storage value of readback value and step SA2, if storage value is not Equal to readback value, into SA4, otherwise enter SA6;

SA4, data storage is carried out again, readback, is compared, if repeatedly circulation storage value and readback value are unequal, number is set According to malfunction is saved, into SA5;

SA5, the second unit records malfunction mark in band Electrically Erasable Programmable Read-Only Memory (EEPROM), and A data is recorded in log file system, into SA8;

SA6, judge malfunction mark whether is stored in the second storage unit, if there is malfunction mark then enters SA7, Otherwise enter SA8;

Malfunction mark in SA7, the second storage unit of reset, into SA8;

SA8, judge whether battery management system BMS enters lower electric current journey, if entering SA9 into lower electric current Cheng Ze, otherwise into Enter SA1;

SA9, residual capacity is stored in third storage unit in band Electrically Erasable Programmable Read-Only Memory (EEPROM);

SA10, end.

2. a kind of dynamic lithium battery SOC storage method according to claim 1, which is characterized in that be in step SA2 One storage unit stores residual capacity at the form of pacifying, and third storage unit is the shape to pacify millisecond in step SA9 Formula stores residual capacity.

3. a kind of dynamic lithium battery SOC storage method according to claim 1, which is characterized in that calculated in step SA1 The method of the variable quantity of battery SOC are as follows: in each cycle of operation, add up after the variable quantity of this period battery SOC is taken absolute value, When accumulation amount reaches setting value, accumulation amount is reset.

4. a kind of dynamic lithium battery SOC storage method according to claim 1, which is characterized in that setting in step SA1 Definite value is 1%.

5. a kind of dynamic lithium battery SOC storage method according to claim 1, which is characterized in that in step SA2 and SA9 When storage, to every kind of data, true form, radix-minus-one complement, four parts of backup true form, backup radix-minus-one complement data are saved every time.

6. a kind of dynamic lithium battery SOC storage method according to claim 1, which is characterized in that further include powering on data It is the step of recovery, specific as follows:

SB1, battery management system BMS are powered on, and obtain the residual capacity in third storage unit;

Malfunction mark in SB2, the second storage unit of reading, according to the data to be restored of malfunction mark determination, such as There are malfunction marks for fruit, into SB3, otherwise enter SB10;

SB3, a data is recorded in log file system, into SB4;

SB4, judge whether to have in battery management system BMS and completely put mark, if there is mark is completely put, into SB5, otherwise enter SB6;

SB5, the residual capacity in the first storage unit and the second storage unit is all reverted to 0, into SB9;

SB6, judge whether the residual capacity in third storage unit is 0, enter SB7 if it is 0, otherwise enter SB8;

Residual capacity in SB7, the first storage unit and third storage unit occurs storing mistake, will both revert to silent Value is recognized, into SB9;

SB8, restore residual capacity data in the first storage unit using the residual capacity data in third storage unit, enter SB9;

SB9, setting residual capacity initialization error malfunction are stored in the second storage unit, and deposit in log file system A record is stored up, into SB15;

SB10, the residual capacity data for restoring the first storage unit;

SB11, the validity of residual capacity in the first storage unit is verified, if validity check does not pass through, is entered Otherwise SB7 enters SB12;

SB12, according to the accuracy selection reset mode of data in the first storage unit and third storage unit, if the first storage Otherwise residual capacity difference≤total capacity/100 in unit and third storage unit enter SB14 into SB13;

SB13, restore residual capacity data in the first storage unit using the residual capacity data in third storage unit, enter SB15;

SB14, restore the residual capacity data in third storage unit using the residual capacity data in the first storage unit, into Enter SB15;

SB15, battery SOC is calculated according to residual capacity;

Storage error flag in SB16, reset strap Electrically Erasable Programmable Read-Only Memory (EEPROM) in the second storage unit;

SB17, end.

7. a kind of dynamic lithium battery SOC storage method according to claim 6, which is characterized in that right in step SB11 The method that the validity of residual capacity is verified in first storage unit is backed up using true form, radix-minus-one complement, true form and backup The validity of radix-minus-one complement verification data.

8. a kind of dynamic lithium battery SOC storage method according to claim 6, which is characterized in that the default in step SB7 Value is the half of battery rated capacity.

Technical field

The present invention relates to power battery management system field more particularly to a kind of dynamic lithium battery SOC storage methods.

Background technique

It is current that the nuclear power state (State Of Charge, SOC) of electric automobile power battery can be used to portray battery State is most important for the operation of vehicle.Battery management system (Battery Management System, BMS) powers on When, need to read the SOC data of last time from storage medium;It needs SOC data storage medium is written when lower electricity;Vehicle operation In the process, SOC is changing always, is also required to SOC data storage medium is written when meeting certain condition.Due to hardware fault or Reasons, the battery management system BMS storing data such as battery management system BMS power-off are possible to malfunction in person's data storing procedure.

Summary of the invention

In order to reduce error probability, reduce the influence that storage failure operates normally vehicle, the present invention is to battery management system BMS data access of uniting increases fault tolerant mechanism.For this purpose, the present invention provides a kind of dynamic lithium battery SOC storage method.

Specifically use following technical scheme:

A kind of dynamic lithium battery SOC storage method includes the steps that the step that operation data saves, and the operation data saves It is rapid as follows:

SA1, the variable quantity for calculating battery SOC, into SA2, otherwise enter when battery SOC variation reaches setting value SA1;

SA2, residual capacity is being stored with the first storage unit in Electrically Erasable Programmable Read-Only Memory (EEPROM), into Enter SA3;

The data saved in SA3, the first storage unit of readback, compare the storage value of readback value and step SA2, if storage Value is not equal to readback value, into SA4, otherwise enters SA6;

SA4, data storage is carried out again, readback, is compared, if repeatedly circulation storage value and readback value are unequal, if It sets data and saves malfunction, into SA5;

SA5, the second unit records malfunction mark in band Electrically Erasable Programmable Read-Only Memory (EEPROM), And a data is recorded in log file system, into SA8;

SA6, judge malfunction mark whether is stored in the second storage unit, if there is malfunction mark then enters Otherwise SA7 enters SA8;

Malfunction mark in SA7, the second storage unit of reset, into SA8;

SA8, judge whether battery management system BMS enters lower electric current journey, it is no if entering SA9 into lower electric current Cheng Ze Then enter SA1;

SA9, residual capacity is stored in third storage unit in band Electrically Erasable Programmable Read-Only Memory (EEPROM);

SA10, end.

Specifically, being that the first storage unit stores residual capacity at the form of pacifying in step SA2, in step Third storage unit is the storage residual capacity in the form of pacifying millisecond in SA9.

Specifically, the method for calculating the variable quantity of battery SOC in step SA1 are as follows: in each cycle of operation, by this week The variable quantity of phase battery SOC adds up after taking absolute value, and when accumulation amount reaches setting value, accumulation amount is reset.

Specifically, the setting value in step SA1 is 1%.

Specifically, in step SA2 and SA9 storage, to every kind of data, save every time true form, radix-minus-one complement, backup true form, Four parts of data of backup radix-minus-one complement.

Further include the steps that powering on data recovery, specific as follows:

SB1, battery management system BMS are powered on, and obtain the residual capacity in third storage unit;

Malfunction mark in SB2, the second storage unit of reading, according to the malfunction mark determination number to be restored According to if there is malfunction mark, into SB3, otherwise into SB10;

SB3, a data is recorded in log file system, into SB4;

SB4, judge whether to have in battery management system BMS and completely put mark, if there is mark is completely put, into SB5, otherwise Into SB6;

SB5, the residual capacity in the first storage unit and the second storage unit is all reverted to 0, into SB9;

SB6, judge whether the residual capacity in third storage unit is 0, enter SB7 if it is 0, otherwise enter SB8;

Residual capacity in SB7, the first storage unit and third storage unit occurs storing mistake, will both restore At default value, into SB9;

SB8, restore residual capacity data in the first storage unit using the residual capacity data in third storage unit, into Enter SB9;

SB9, setting residual capacity initialization error malfunction are stored in the second storage unit, and in log file system One record of middle storage, into SB15;

SB10, the residual capacity data for restoring the first storage unit;

SB11, the validity of residual capacity in the first storage unit is verified, if validity check does not pass through, into Enter SB7, otherwise enters SB12;

SB12, according to the accuracy selection reset mode of data in the first storage unit and third storage unit, if first Otherwise residual capacity difference≤total capacity/100 in storage unit and third storage unit enter SB14 into SB13;

SB13, restore residual capacity data in the first storage unit using the residual capacity data in third storage unit, Into SB15;

SB14, restore the residual capacity number in third storage unit using the residual capacity data in the first storage unit According into SB15;

SB15, battery SOC is calculated according to residual capacity;

Storage mistake mark in SB16, reset strap Electrically Erasable Programmable Read-Only Memory (EEPROM) in the second storage unit Will;

SB17, end.

Specifically, the method verified in step SB11 to the validity of residual capacity in the first storage unit is Utilize true form, radix-minus-one complement, the validity of true form backup and the radix-minus-one complement of backup verification data.

Specifically, the default value in step SB7 is the half of battery rated capacity.

The present invention has the advantages that

(1) increase readback mechanism when storing data in battery management system BMS normal operation, guarantee storing data just True property.

(2) preservation of electric process data may be abnormal under, have verification scheme when power up reads data, to verification The data of failure, it is necessary to Restoration Mechanism, and the event is recorded in document data record.

(3) electric process may save data not in time under, it is possible to which the data need to be updated in each run, powered on The validity that read data should be able to be judged in journey, to invalid data, it is necessary to Restoration Mechanism, and remember in log file system Record the event.

(4) electric stored data uses reasonable resolution ratio under, loses precision when avoiding powering on reading, jumps.

(5) the step of readback setting can prevent from when powering to band Electrically Erasable Programmable Read-Only Memory (EEPROM) Existing voltage is lower to cause data storage to fail to the first storage unit, and the value being at this moment stored in the first storage unit is mistake , it is not desired value, by readback mechanism, judges whether the data being stored in the first storage unit are equal with desired value, from And guarantee the accuracy of data.

Detailed description of the invention

Fig. 1 is the flow chart that data store in operational process of the present invention.

Fig. 2 is the flow chart that the present invention powers on data recovery.

Specific embodiment

A kind of dynamic lithium battery SOC storage method includes the steps that operation data saves and power on the step of data are restored. It is described individually below.

As shown in Figure 1, the operation data is as follows the step of preservation:

SA1, the variable quantity for calculating battery SOC, into SA2, otherwise enter when battery SOC variation reaches setting value SA1;In this embodiment, setting value is for 1%.Other setting values are within the scope of the invention.

Specifically, the method for calculating the variable quantity of battery SOC are as follows: each cycle of operation, by the variation of this period battery SOC It adds up after measuring absolute value, when accumulation amount reaches setting value, accumulation amount is reset.

SA2, with the first storage unit in Electrically Erasable Programmable Read-Only Memory (EEPROM) with ampere-hour (Ah) Form stores residual capacity, stores residual capacity into SA3;

The data saved in SA3, the first storage unit of readback, compare the storage value of readback value and step SA2, if storage Value is not equal to readback value, into SA4, otherwise enters SA6;

SA4, the data storage of step S2 is carried out again, readback, is compared, if repeatedly circulation storage value and readback value are not Equal, setting data save malfunction, into SA5;

SA5, the second unit records malfunction mark in band Electrically Erasable Programmable Read-Only Memory (EEPROM), And a data is recorded in log file system, it is convenient for subsequent positioning, into SA8;

SA6, judge malfunction mark whether is stored in the second storage unit, if there is malfunction mark then enters Otherwise SA7 enters SA8;

Malfunction mark in SA7, the second storage unit of reset, into SA8;

SA8, judge whether battery management system BMS enters lower electric current journey, it is no if entering SA9 into lower electric current Cheng Ze Then enter SA1;

SA9, residual capacity is stored in third storage unit in band Electrically Erasable Programmable Read-Only Memory (EEPROM);The Three storage units store residual capacity in the form for pacifying millisecond (Ams).

SA10, end.

In step SA2 and SA9 storage, to every kind of data, true form, radix-minus-one complement, backup true form, backup radix-minus-one complement four are saved every time Part data.Stored respectively in corresponding four addresses in the first storage unit and the second storage unit respectively.

As shown in Fig. 2, it is specific as follows to power on the step of data are restored:

SB1, battery management system BMS are powered on, and obtain the residual capacity in third storage unit;

Malfunction mark in SB2, the second storage unit of reading illustrates remaining in electric first storage unit under last time hold Amount saves error, according to the data to be restored of malfunction mark determination, if there is malfunction mark, into SB3, otherwise Into SB10;

SB3, if there is malfunction mark, illustrated under last time that residual capacity saves error in electric first storage unit, A data is recorded in log file system, into SB4;

SB4, judge whether to have in battery management system BMS and completely put mark, if there is mark is completely put, into SB5, otherwise Into SB6;

SB5, the residual capacity in the first storage unit and the second storage unit is all reverted to 0, into SB9;

SB6, judge whether the residual capacity in third storage unit is 0, enter SB7 if it is 0, otherwise enter SB8;

SB7, if there is no residual capacity is completely put in mark and third storage unit be 0, illustrate the first storage unit with Residual capacity in third storage unit occurs storing mistake, default value will be both reverted to, into SB9;In the program In, default value is the half of battery rated capacity;

SB8, restore residual capacity data in the first storage unit using the residual capacity data in third storage unit, into Enter SB9;

SB9, setting residual capacity initialization error malfunction are stored in the second storage unit, and in log file system One record of middle storage, into SB15;

SB10, the residual capacity data for restoring the first storage unit;

SB11, using true form, radix-minus-one complement, true form back up and backup radix-minus-one complement in the first storage unit residual capacity it is effective Property verified, if validity check does not pass through, illustrate just to have malfunctioned when storing malfunction mark, third storage at this time is single Data in member are also insincere, into SB7, otherwise enter SB12;

SB12, according to the accuracy selection reset mode of data in the first storage unit and third storage unit, if first Otherwise residual capacity difference≤total capacity/100 in storage unit and third storage unit enter SB14 into SB13;

SB13, restore residual capacity data in the first storage unit using the residual capacity data in third storage unit, Into SB15;

SB14, restore the residual capacity number in third storage unit using the residual capacity data in the first storage unit According into SB15;

SB15, battery SOC is calculated according to residual capacity;

Storage mistake mark in SB16, reset strap Electrically Erasable Programmable Read-Only Memory (EEPROM) in the second storage unit Will;

SB17, end.

The present invention ensure that the correctness of storing data by readback mechanism, and storage failure logging is got off, and be convenient for Post analysis orientation problem.When powering on recovery, either data check does not pass through or Effective judgement fails, and has corresponding Restoration Mechanism, avoid reading less than vehicle of lying prone caused by data.It when data are restored, is compared to each other, is selected using two parts of data The higher result of precision will not lose precision because of power-on and power-off as final result.

The above is only the preferred embodiments of the invention, are not intended to limit the invention creation, all in the present invention Made any modifications, equivalent replacements, and improvements etc., should be included in the guarantor of the invention within the spirit and principle of creation Within the scope of shield.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于云存储的云磁盘挂载方法、装置、设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类