CN115728641B - OCV electric quantity calculation method with self-learning and self-calibration functions - Google Patents

OCV electric quantity calculation method with self-learning and self-calibration functions Download PDF

Info

Publication number
CN115728641B
CN115728641B CN202211418491.2A CN202211418491A CN115728641B CN 115728641 B CN115728641 B CN 115728641B CN 202211418491 A CN202211418491 A CN 202211418491A CN 115728641 B CN115728641 B CN 115728641B
Authority
CN
China
Prior art keywords
ocv
charge
vbat
self
cap
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
CN202211418491.2A
Other languages
Chinese (zh)
Other versions
CN115728641A (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.)
Zhuhai Yingji Semiconductor Co ltd
Original Assignee
Zhuhai Yingji Semiconductor Co ltd
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 Zhuhai Yingji Semiconductor Co ltd filed Critical Zhuhai Yingji Semiconductor Co ltd
Priority to CN202211418491.2A priority Critical patent/CN115728641B/en
Publication of CN115728641A publication Critical patent/CN115728641A/en
Application granted granted Critical
Publication of CN115728641B publication Critical patent/CN115728641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention provides an OCV electric quantity calculation method with self-learning and self-calibration functions, which comprises the steps of starting to enter a charging self-calibration mode when a system is charged, collecting battery voltage and battery current during charging every period T, and storing data of OCV voltage VBAT_OCV_TMP into an array every period T; judging whether the electric quantity is 100, if so, counting the total charging time T1 of the N value of the accumulated charge_CAP_TMP [ N ] and the charging time T2 of each electric quantity, obtaining an updated electric quantity-voltage table charge_CAP_TMP [ N ], and updating the value of the table into a preset CHARGE-electric quantity-voltage table charge_CAP [ N ] [ M ]; when the system is discharging, starting to enter a discharging self-calibration mode; and after the self-calibration of charging and the self-calibration of discharging are completed each time, a self-learning process of charging and a self-learning process of discharging are carried out. The invention has the function of self-learning and self-calibration OCV calculation electric quantity, and the electric quantity can be changed smoothly during charge-discharge conversion, so that the charge-discharge electric quantity calculation is more accurate.

Description

OCV electric quantity calculation method with self-learning and self-calibration functions
Technical Field
The invention relates to the technical field of battery electric quantity measurement, in particular to an OCV electric quantity calculation method with self-learning and self-calibration functions.
Background
Batteries are now used in many electronic devices in life, from small to consumer electronics to large to energy storage power sources such as inverters, and batteries are required to provide energy. Therefore, reasonable division of the energy of the battery is very important, so that a user can accurately predict the energy of the battery, and accurate calculation of the electric quantity of the battery is an important research direction.
Currently, there are two main methods for calculating the battery power, one is coulomb meter, that is, integrating current in real time to calculate the power, and the other is OCV, that is, calculating the power with OCV, which is the battery voltage after compensation.
The existing method for calculating the electric quantity by using the OCV adopts a single look-up table to calculate the electric quantity, so that the electric quantity calculation has errors under different charge and discharge conditions, the electric quantity is easy to change suddenly when the battery voltage changes suddenly, the electric quantity cannot be smoothly converted, in addition, when the battery is lost in the use process of the battery, the longer the service time of the battery is, the less accurate the electric quantity calculation is, and the function of self-calibration of the electric quantity is not provided. Also, the OCV varies differently with different discharge and charge currents, so a self-learning function is required.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide the OCV electric quantity calculation method with the self-learning and self-calibration functions, which can solve the problems of large calculation error, unsmooth electric quantity conversion, inaccurate electric quantity calculation, no self-calibration and self-learning functions and the like in the prior art.
In order to solve the problems, the technical scheme adopted by the invention is as follows:
the OCV electric quantity calculation method with self-learning and self-calibration functions is applied to an OCV electric quantity calculation system with self-learning and self-calibration functions, and the system comprises a charge calculation model, a charge-to-discharge calculation model, a discharge calculation model and a discharge-to-charge calculation model, and comprises the following steps:
the system starts to run, when the system is charged, the system starts to enter a charging self-calibration mode, the battery voltage and the battery current during charging are collected every period T, the OCV voltage during charging is determined to be VBAT_OCV_TMP, the data of the OCV voltage VBAT_OCV_TMP is stored in an array charge_CAP_TMP [ N ] every period T, and the data of the battery current is stored in an array charge_IBAT_TMP [ N ];
Judging whether the electric quantity is 100, if so, counting the total charging time T1 of the N value of the accumulated charge_CAP_TMP [ N ] and the charging time T2 of each electric quantity, obtaining an updated electric quantity-voltage table charge_CAP_TMP [ N ], and updating the value of the table into a preset CHARGE-electric quantity-voltage table charge_CAP [ N ] [ M ];
when the system discharges, starting to enter a discharge self-calibration mode;
after the self-calibration of charging and the self-calibration of discharging are completed each time, obtaining the average battery current of the self-calibration of charging each time and the average battery current of the self-calibration of discharging each time, and completing a self-learning flow of charging and a self-learning flow of discharging.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, when the electric quantity is 0 and is charging, the self-calibration mode of charging is started.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, when the electric quantity is 100 and the electric quantity is discharged, the self-calibration mode starts to be started to be in a discharge self-calibration mode.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, after a discharge self-calibration mode is entered, the OCV voltage VBAT_OCV_TMP during discharge is recorded every period T, the data of the OCV voltage VBAT_OCV_TMP is stored in an array BOOST_CAP_TMP [ N ], and the data of battery current is recorded in an array BOOST_IBAT_TMP [ N ];
Starting discharging until the electric quantity is reduced to 0, obtaining a total discharging time T3 and a discharging time T4 of each electric quantity by counting N values of accumulated BOOST_CAP_TMP [ N ], obtaining an updated electric quantity-voltage meter BOOST_CAP_TMP [ N ], updating the values of the meter to a preset discharging-electric quantity-voltage meter BOOST_CAP [ N ] [ M ], wherein the latter M value represents self-learning information, the N value in BOOST_CAP_NUMBER [ N ] corresponds to the N value in BOOST_CAP_NUMBER [ N ], namely, when the system operates, the self-calibration can be known under the condition that the average battery current is more than the average battery current, the system firstly checks the closest to the battery current in BOOST_CAP_NUMBER [ N ] according to the average battery current when the discharging is equal to 100, and the self-calibration is determined by the BOOST_NUMBER in the system when the system operates.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions provided by the invention, after the self-calibration of charging is completed, the average battery current IBAT_AVE of the self-calibration of charging is obtained through an array of charge_IBAT_TMP [ N ], and is expressed as a formula (11):
IBAT_AVE=(CHARGE_IBAT_TMP[1]+...+CHARGE_IBAT_TMP[N])/N (1)
If this time the first CHARGE self-calibration is started, the value is stored in the array charge_cap_number [ M ], and then there is equation (12):
CHARGE_CAP_NUMBER[1]=IBAT_AVE (12)
if the charging self-calibration is the second time and the difference between the average battery current ibat_ave of the second time and the average battery current ibat_ave of the first time is out of the error range, the charging self-calibration is considered to be different from the last self-calibration data, the charging self-calibration data is recorded to be valid, and the formula (13) is given:
CHARGE_CAP_NUMBER[2]=IBAT_AVE (13)
if the difference between the average battery current IBAT_AVE of the second time and the average battery current IBAT_AVE of the first time is not out of the error range, the data group closest to the average battery current IBAT_AVE of the array charge_CAP_NUMBER [ M ] is covered.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions provided by the invention, after the discharge self-calibration is completed, the average battery current IBAT_AVE of the discharge self-calibration is obtained through an array BOOST_IBAT_TMP [ N ], and is expressed as a formula (21):
IBAT_AVE=(BOOST_IBAT_TMP[1]+...+BOOST_IBAT_TMP[N])/N (21)
if this time the first discharge self-calibration is started, the value is stored in the array BOOST_CAP_NUMBER [ M ], and then the formula (22) is given:
BOOST_CAP_NUMBER[1]=IBAT_AVE (22)
if the discharge self-calibration is the second discharge self-calibration and the difference between the average battery current IBAT_AVE of the second and the average battery current IBAT_AVE of the first is out of the error range, the discharge self-calibration is considered to be different from the last self-calibration data, and the discharge self-calibration data is recorded to be valid, the formula (23) is provided
BOOST_CAP_NUMBER[2]=IBAT_AVE (23)
If the difference between the average battery current IBAT_AVE of the second time and the average battery current IBAT_AVE of the first time is not out of the error range, the data set closest to the average battery current IBAT_AVE of the array BOOST_CAP_NUMBER [ M ] is covered.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions provided by the invention, if more than two data exist in charge_CAP_NUMBER [ M ] or BOOST_CAP_NUMBER [ M ], the charge_CAP_NUMBER [ M ] or BOOST_CAP_NUMBER [ M ] needs to be ordered, namely the values in charge_CAP_NUMBER [ M ] or BOOST_CAP_NUMBER [ M ] are ordered from small to large.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, the charging calculation model is used for:
the battery voltage VBAT and the battery current IBAT are sampled every period T, and assuming that the current charge is CAP, the OCV voltage vbat_ocv_tmp at the time of charging is expressed as formula (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
setting the comparison value vbat_ocv, expressed as formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
wherein VBAT_OCV is the compensated battery voltage, VBAT is the collected battery voltage, IBAT is the collected battery current, and R_charge is the internal resistance during charging;
when charging continues until vbat_ocv_tmp is greater than vbat_ocv, the charge is increased by 1, and the next comparison value is updated.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, the charge-to-discharge calculation model is used for:
when the charge is changed into discharge, the charge-discharge calculation model process is entered, including:
if the discharge light-load state is kept all the time, the system enters standby after the appointed time, and the electric quantity is kept unchanged;
if the load insertion is detected to discharge at the moment, the electric quantity is reduced according to the BOOST_CAP [ N ] [ M ], which comprises the following steps:
assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, expressed as equation (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
wherein R_boost is the internal resistance during charging;
setting the comparison value vbat_ocv, expressed as formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
if vbat_ocv_tmp is smaller than vbat_ocv, the power is reduced by 1 after every period T5, and it is continuously determined whether vbat_ocv_tmp is smaller than vbat_ocv: if VBAT_OCV_TMP is larger than VBAT_OCV, entering a discharge calculation model;
if VBAT_OCV_TMP is greater than VBAT_OCV, then the discharge calculation model is entered directly.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, the discharge calculation model is used for:
the battery voltage VBAT and the battery current IBAT are sampled once every period T, and assuming that the current charge is CAP, the OCV voltage vbat_ocv_tmp at the time of discharging is expressed as formula (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
Setting the comparison value vbat_ocv, expressed as formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
when discharging continues until vbat_ocv_tmp is smaller than vbat_ocv, the charge is reduced by 1, and the next comparison value is updated.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, the discharging-charging calculation model is used for:
when discharging is changed into charging, entering a discharging-charging calculation model process, including:
assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, expressed as equation (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
setting the comparison value vbat_ocv, expressed as formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
if vbat_ocv_tmp is greater than vbat_ocv, after every period T6, the power is added 1, and the power CAP is updated, and whether vbat_ocv_tmp is greater than vbat_ocv is continuously determined. If the VBAT_OCV_TMP is smaller than the VBAT_OCV, entering a charging calculation model;
if VBAT_OCV_TMP is less than VBAT_OCV, the charge calculation model is entered directly.
According to the OCV electric quantity calculation method with self-learning and self-calibration functions, the invention further comprises the following steps: obtaining internal resistance compensation values under different currents according to actual measurement, and calling according to different battery currents when calling is needed, wherein the method comprises the following steps:
assuming that the voltage of the BAT terminal of the board is VBAT1 and the voltage of the real battery cell terminal is VBAT2, the internal resistance of the charging current I is represented by formula (5):
R_charge=(VBAT2-VBAT1)/I (5)
Assuming the board BAT terminal voltage VBAT1 and the real cell terminal voltage VBAT2, the internal resistance of the discharge current I is formula (6):
R_boost=(VBAT1-VBAT2)/I (6)
internal resistances of the battery under different battery currents can be calculated according to formulas (5) and (6), the calculated values are put into the internal resistance tables R_charge [ M ] and R_boost [ M ], and the waiting program calls the two tables according to the different battery currents.
Therefore, the invention discloses a method with the functions of self-learning and self-calibration, OCV double-check electric quantity-voltmeter and voltage abrupt change smooth change and the like, which is applied to a system for calculating electric quantity by the OCV with the functions of self-learning and self-calibration. The system calculates the electric quantity and divides the electric quantity into four models: a charge calculation model, a charge-to-discharge calculation model, a discharge calculation model, and a discharge-to-charge calculation model. The charge-discharge calculation model and the discharge-charge calculation model are used for realizing smooth electric quantity switching when the electric quantity is switched between charge and discharge, so that the situation that the electric quantity is suddenly changed due to sudden change of voltage during charge-discharge conversion can be avoided; the CHARGE calculation model and the discharge calculation model are independent, and the electric quantity-voltmeter is respectively charge_CAP [ N ] [ M ] and boost_CAP [ N ] [ M ], so that the calculation of the electric quantity can be more accurate.
Therefore, the method is simple and feasible, has high speed and high OCV electric quantity calculation efficiency, and can effectively save time cost and equipment use cost; the method has high calculation accuracy, and the OCV obtained by the method has smaller error than the OCV obtained by the conventional method under the same charge quantity.
The invention is described in further detail below with reference to the drawings and the detailed description.
Drawings
FIG. 1 is a schematic circuit diagram of an embodiment of an OCV power calculation method with self-learning and self-calibration functions according to the present invention.
FIG. 2 is a flow chart of a method implemented in an embodiment of an OCV power calculation system with self-learning and self-calibration capabilities in accordance with the present invention.
FIG. 3 is a flow chart of charge self-calibration in an embodiment of an OCV charge calculation method with self-learning and self-calibration functions according to the present invention.
FIG. 4 is a flow chart of the self-calibration of discharge in an embodiment of the OCV power calculation method with self-learning and self-calibration functions of the present invention.
FIG. 5 is a flow chart of a charge calculation model in an embodiment of an OCV power calculation system with self-learning and self-calibration capabilities according to the present invention.
FIG. 6 is a flow chart of a discharge calculation model in an embodiment of an OCV power calculation system with self-learning and self-calibration capabilities according to the present invention.
FIG. 7 is a flow chart of a charge-to-discharge calculation model in an OCV power calculation system with self-learning and self-calibration functions according to an embodiment of the present invention.
FIG. 8 is a flow chart of a calculation model for discharging to charging in an OCV power calculation system with self-learning and self-calibration functions according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 and 2, the present invention provides an OCV electric quantity calculating method with self-learning and self-calibration functions, which is applied to the OCV electric quantity calculating system with self-learning and self-calibration functions, and the system includes a charge calculating model, a charge-to-discharge calculating model, a discharge calculating model, and a discharge-to-charge calculating model, and the method includes the following steps:
Step S1, the system starts to operate, when the electric quantity is 0 and the system is charged, the system starts to enter a charging self-calibration mode, the battery voltage and the battery current during charging are collected every period T, the OCV voltage during charging is determined to be VBAT_OCV_TMP, the data of the OCV voltage VBAT_OCV_TMP are stored in an array charge_CAP_TMP [ N ] every period T, and the data of the battery current IBAT is stored in an array charge_IBAT_TMP [ N ];
step S2, judging whether the electric quantity is 100, if so, counting the total charging time T1 of the N value of the accumulated charge_CAP_TMP [ N ] and the charging time T2 of each electric quantity, obtaining an updated electric quantity-voltage table charge_CAP_TMP [ N ], and updating the value of the table into a preset CHARGE-electric quantity-voltage table charge_CAP [ N ] [ M ];
step S3, when the electric quantity is 100 and the electric quantity is discharged, starting to enter a discharging self-calibration mode, collecting battery voltage and battery current during charging every period T, determining that OCV voltage during charging is VBAT_OCV_TMP, storing data of OCV voltage VBAT_OCV_TMP into an array BOOST_CAP_TMP [ N ] every period T, and storing data of battery current into an array BOOST_IBAT_TMP [ N ];
step S4, starting discharging until the electric quantity is reduced to 0, obtaining the total discharging time T3 and the discharging time T4 of each electric quantity by counting the N value of the accumulated BOOST_CAP_TMP [ N ], obtaining an updated electric quantity-voltage meter BOOST_CAP_TMP [ N ], and updating the value of the meter into a preset BOOST_CAP [ N ] [ M ] of the electric quantity-voltage meter;
Step S5, obtaining the average battery current of each CHARGE self-calibration or discharge self-calibration according to the charge_IBAT_TMP [ N ] and the BOOST_IBAT_TMP [ N ], thereby completing a CHARGE self-learning process and a discharge self-learning process and determining the M value of the electric quantity-voltmeter;
and S6, the system determines M values in two tables of charge_CAP [ N ] [ M ] and BOOST_CAP [ N ] [ M ] according to the charge_CAP [ N ] [ M ] and the BOOST_CAP [ N ] [ M ] obtained by self-calibration and self-learning, wherein the CHARGE capacity is 0 or the discharge capacity is 100 each time, and determines which table is used for calculating the battery capacity according to the battery current of the system and the closest battery current in the two tables of charge_CAP_NUMBER [ M ] and BOOST_CAP_NUMBER [ M ].
In the two-dimensional array of CHARGE-voltage meter, M value represents self-learning information, M value in CHARGE-CAP-NUMBER is correspondent to M value in CHARGE-CAP-NUMBER, and N value is correspondent to N value in CHARGE-CAP-TMP [ N ], that is, when updating said meter it can know that self-calibration is self-calibrated under the condition of how much average battery current is used, when the system is running, according to the average battery current when the CHARGE quantity is equal to 0, firstly, the M value in CHARGE-CAP-NUMBER is recorded, and said M value is the M value in CHARGE-CAP-NUMBER at this moment, and said M value is the decision of which CHARGE-voltage meter is used.
In the two-dimensional array of the discharge-charge-voltmeter BOOST_CAP [ N ] [ M ], the M value represents self-learning information, the N value in the BOOST_CAP_NUMBER [ N ] corresponds to the N value in the BOOST_CAP_TMP [ N ], that is to say, when the table is updated, the self-calibration can be known to be performed under the condition of the average battery current, the system firstly checks the closest average battery current in the BOOST_CAP_NUMBER [ N ] according to the average battery current when the discharge charge is equal to 100 when in operation, and records the M value in the BOOST_CAP_NUMBER [ M ] at the moment, and the M value is the decision of which discharge-charge-voltmeter is adopted.
After the CHARGE self-calibration is completed, the CHARGE self-calibrated average battery current ibat_ave is obtained through the array charge_ibat_tmp [ N ], expressed as equation (11):
IBAT_AVE=(CHARGE_IBAT_TMP[1]+...+CHARGE_IBAT_TMP[N])/N (1)
if this time the first CHARGE self-calibration is started, the value is stored in the array charge_cap_number [ M ], and then there is equation (12):
CHARGE_CAP_NUMBER[1]=IBAT_AVE (12)
if the charging self-calibration is the second time and the difference between the average battery current ibat_ave of the second time and the average battery current ibat_ave of the first time is out of the error range, the charging self-calibration is considered to be different from the last self-calibration data, the charging self-calibration data is recorded to be valid, and the formula (13) is given:
CHARGE_CAP_NUMBER[2]=IBAT_AVE (13)
If the difference between the average battery current IBAT_AVE of the second time and the average battery current IBAT_AVE of the first time is not out of the error range, the data group closest to the average battery current IBAT_AVE of the array charge_CAP_NUMBER [ M ] is covered.
After the discharge self-calibration is completed, the discharge self-calibrated average battery current ibat_ave is obtained through an array boost_ibat_tmp [ N ], expressed as formula (21):
IBAT_AVE=(BOOST_IBAT_TMP[1]+...+BOOST_IBAT_TMP[N])/N (21)
if this time the first discharge self-calibration is started, the value is stored in the array BOOST_CAP_NUMBER [ M ], and then the formula (22) is given:
BOOST_CAP_NUMBER[1]=IBAT_AVE (22)
if the self-calibration is the second discharge and the difference between the average battery current ibat_ave of the second time and the average battery current ibat_ave of the first time is out of the error range, the self-calibration is considered to be different from the last self-calibration data, the data of the self-calibration is recorded to be valid, and the formula (23) is given:
BOOST_CAP_NUMBER[2]=IBAT_AVE (23)
if the difference between the average battery current IBAT_AVE of the second time and the average battery current IBAT_AVE of the first time is not out of the error range, the data set closest to the average battery current IBAT_AVE of the array BOOST_CAP_NUMBER [ M ] is covered.
If there are more than two data in charge_cap_number [ M ] or in boost_cap_number [ M ], then the charge_cap_number [ M ] or the boost_cap_number [ M ] needs to be ordered, i.e. the values inside the charge_cap_number [ M ] or the boost_cap_number [ M ] are ordered from small to large.
In this embodiment, the system calculates the increase or decrease of the electric quantity during charging and discharging according to the charge_cap [ N ] [ M ] and the boost_cap [ N ] [ M ] of the electric quantity-voltage table, respectively, and self-learns the M value in the determination table from the data corresponding to the N value in the self-calibration determination table; self-calibration means that a charge or discharge cycle curve is recorded completely every time, battery current and battery voltage of the whole cycle are collected in real time, total charge and discharge time is obtained, 100 parts are divided equally, battery voltage corresponding to each equal part of time is obtained, electric quantity of the system is calculated according to the battery voltage, and data corresponding to N values in a table are corresponded; self-learning refers to: after each self-calibration is completed, it is recorded at what battery current this is self-calibrating, corresponding to the value of M in the table.
In the present embodiment, the charge calculation model is used for:
the battery voltage VBAT and the battery current IBAT are sampled every period T, and assuming that the current charge is CAP, the OCV voltage vbat_ocv_tmp at the time of charging is expressed as formula (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
setting the comparison value vbat_ocv, expressed as formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
wherein VBAT_OCV is the compensated battery voltage, VBAT is the collected battery voltage, IBAT is the collected battery current, and R_charge is the internal resistance during charging;
When charging continues until vbat_ocv_tmp is greater than vbat_ocv, the charge is increased by 1, and the next comparison value is updated.
Specifically, as shown in fig. 5, the charge calculation model is used to perform:
sampling the battery voltage VBAT and the battery current IBAT once every period T, assuming that the current electric quantity is CAP, wherein VBAT_OCV_TMP is in formula (1), the comparison value is VBAT_OCV, if the self-learning function is available, the value closest to IBAT in charge_CAP_NUMBER [ M ] is found according to the battery current IBAT at the moment, and then the M value in charge_CAP_NUMBER [ M ] is obtained, and then the formula (2) is available:
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
the charge of the above formula is added by 1, because the value of the next charge is compared, and the battery voltage only increases during charging, so when charging is continued until vbat_ocv_tmp is greater than vbat_ocv, the charge is added by 1, and the next comparison value is updated.
In the present embodiment, the charge-to-discharge calculation model is used for:
when the charge is changed into discharge, the charge-discharge calculation model process is entered, including:
if the discharge light-load state is kept all the time, the system enters standby after the appointed time, and the electric quantity is kept unchanged;
if the load insertion is detected to discharge at the moment, the electric quantity is reduced according to the BOOST_CAP [ N ] [ M ], which comprises the following steps:
Assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, expressed as equation (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
wherein R_boost is the internal resistance during charging;
setting the comparison value vbat_ocv, expressed as formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
if vbat_ocv_tmp is smaller than vbat_ocv, the power is reduced by 1 after every period T5, and it is continuously determined whether vbat_ocv_tmp is smaller than vbat_ocv: if VBAT_OCV_TMP is larger than VBAT_OCV, entering a discharge calculation model;
if VBAT_OCV_TMP is greater than VBAT_OCV, then the discharge calculation model is entered directly.
Specifically, as shown in fig. 6, the charge-to-discharge calculation model is used to perform:
when charging is changed into discharging, the charging-discharging calculation model processing is entered, and different processing is corresponding to the following cases:
1. if the discharge light-load state is always kept, the system enters standby after a period of time, so that the electric quantity is kept unchanged;
2. if at this time, the load is inserted for discharging, the power is decremented according to the boost_cap [ N ] [ M ], but here, different treatments are performed in several cases:
assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, and the sampled battery voltage VBAT and battery current IBAT are expressed as equation (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
the vbat_ocv value to be compared is formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
The power is reduced by 1 here because the value of the next power is compared.
And (3) a step of: if VBAT_OCV_TMP is less than VBAT_OCV, after the alternate period T5, the charge is decremented by 1, after which the determination continues: if VBAT_OCV_TMP is smaller than VBAT_OCV, after the interval period T5, the electric quantity is continuously reduced by 1, and if VBAT_OCV_TMP is larger than VBAT_OCV, the electric quantity enters a discharge calculation model, and the electric quantity can be smoothly excessively changed through the process;
and II: if VBAT_OCV_TMP is greater than VBAT_OCV, the discharge calculation model is entered.
In the present embodiment, the discharge calculation model is used for:
the battery voltage VBAT and the battery current IBAT are sampled once every period T, and assuming that the current charge is CAP, the OCV voltage vbat_ocv_tmp at the time of discharging is expressed as formula (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
setting the comparison value vbat_ocv, expressed as formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
when discharging continues until vbat_ocv_tmp is smaller than vbat_ocv, the charge is reduced by 1, and the next comparison value is updated.
Specifically, as shown in fig. 7, the discharge calculation model is used to perform:
the battery voltage VBAT and the battery current IBAT are sampled once every period T, and vbat_ocv_tmp is formula (3) assuming that the current charge is CAP:
VBAT_OCV_TMP=VBAT+IBAT*R_boost[M](3)
if the self-learning function exists, the value closest to the IBAT in the BOOST_CAP_NUMBER [ N ] is found according to the battery current IBAT at the moment, then the M value in the BOOST_CAP_NUMBER [ M ] closest to the IBAT value is determined, and the VBAT_OCV value to be compared is shown as a formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
The power of the above equation is reduced by 1, because the value of the next power is compared, and the battery voltage is only reduced when discharging, so when discharging is continued until vbat_ocv_tmp is smaller than vbat_ocv, the power is reduced by 1, and the next comparison value is updated.
In the present embodiment, the discharge-to-charge calculation model is used for:
when discharging is changed into charging, entering a discharging-charging calculation model process, including:
assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, expressed as equation (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
setting the comparison value vbat_ocv, expressed as formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
if vbat_ocv_tmp is greater than vbat_ocv, after every period T6, the power is added 1, and the power CAP is updated, and whether vbat_ocv_tmp is greater than vbat_ocv is continuously determined. If the VBAT_OCV_TMP is smaller than the VBAT_OCV, entering a charging calculation model;
if VBAT_OCV_TMP is less than VBAT_OCV, the charge calculation model is entered directly.
Specifically, as shown in fig. 8, the discharge-to-charge calculation model is used to perform:
when discharging is changed into charging, the discharging-charging calculation model processing is entered, wherein the processing corresponds to different processing in several cases:
at intervals of the period T, the battery voltage VBAT and the battery current IBAT are sampled, and assuming that the current charge is CAP, vbat_ocv_tmp is formula (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
The vbat_ocv value to be compared is formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
and (3) a step of: if vbat_ocv_tmp is greater than vbat_ocv, after the interval period T6, the power is added 1, and the power CAP is updated, and then the following steps are continued: if VBAT_OCV_TMP is larger than VBAT_OCV, after a period T6, the electric quantity is continuously increased by 1, and if VBAT_OCV_TMP is smaller than VBAT_OCV, the electric quantity enters a charge calculation model, and the electric quantity can be smoothly excessively changed through the processing;
and II: if VBAT_OCV_TMP is less than VBAT_OCV, then the charge calculation model is entered directly.
In this embodiment, the method further performs: obtaining internal resistance compensation values under different currents according to actual measurement, and calling according to different battery currents when calling is needed, wherein the method comprises the following steps:
assuming that the voltage of the BAT terminal of the board is VBAT1 and the voltage of the real battery cell terminal is VBAT2, the internal resistance of the charging current I is represented by formula (5):
R_charge=(VBAT2-VBAT1)/I (5)
assuming the board BAT terminal voltage VBAT1 and the real cell terminal voltage VBAT2, the internal resistance of the discharge current I is formula (6):
R_boost=(VBAT1-VBAT2)/I (6)
internal resistances of the battery under different battery currents can be calculated according to formulas (5) and (6), the calculated values are put into the internal resistance tables R_charge [ M ] and R_boost [ M ], and the waiting program calls the two tables according to the different battery currents.
In this embodiment, the calculated electric quantity of the system is divided into four models: a charge calculation model, a charge-to-discharge calculation model, a discharge calculation model, and a discharge-to-charge calculation model. The charge-discharge calculation model and the discharge-charge calculation model are used for realizing smooth electric quantity switching when the electric quantity is switched between charge and discharge, so that the electric quantity is not suddenly changed due to sudden change of voltage during charge-discharge switching. The CHARGE calculation model and the discharge calculation model use independent electric quantity-voltmeter, namely charge_CAP [ N ] [ M ] and boost_CAP [ N ] [ M ], which can make the calculation of electric quantity more accurate.
In the first battery power-up, the system calculates the increase or decrease of the electric quantity according to the initial preset charge_cap [ N ] [ M ] and boost_cap [ N ] [ M ] tables. The system collects battery voltage VBAT and battery current IBAT at intervals of a period T, and calculates VBAT_OCV_TMP during charging and discharging according to the following two formulas:
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
as shown in fig. 3, when the electric quantity is 0 and the charging is performed, the vbat_ocv_tmp is stored in the array charge_cap_tmp [ N ] every period T until the electric quantity is 100, a charging self-calibration process is completed, and if the discharging state is changed, the self-calibration fails. At the completion of the self-calibration of the CHARGE, the value of charge_cap_tmp [ N ] is updated into charge_cap [ N ] [ M ]. In the two-dimensional array of CHARGE-voltage meter, M value represents self-learning information, M value in CHARGE-CAP-NUMBER is correspondent to M value in CHARGE-CAP-NUMBER, and N value is correspondent to N value in CHARGE-CAP-TMP [ N ], that is, when updating said meter it can know that this self-calibration is self-calibrated under the condition of how much average battery current, when the system is running, according to the average battery current when the CHARGE quantity is equal to 0, firstly, it can check the battery current closest to the battery current at this moment in CHARGE-CAP-NUMBER [ M ], and record M value in CHARGE-CAP-NUMBER at this moment, and said M value is the CHARGE-voltage meter.
As shown in fig. 4, when the electric quantity is 100 and the electric quantity is discharged at this time, vbat_ocv_tmp is stored in the array boost_cap_tmp [ N ] every period T until the electric quantity is equal to 0, a discharging self-calibration process is completed, and if the electric quantity is changed to a charging state, the self-calibration fails this time. When the discharge self-calibration is completed, the value of BOOST_CAP_TMP [ N ] is updated into BOOST_CAP [ N ] [ M ]. Wherein. In the two-dimensional array of the discharge-charge-voltage meter, M represents self-learning information, the N value in the BOOST_CAP_NUMBER [ N ] corresponds to the N value in the BOOST_CAP_TMP [ N ], that is, when the meter is updated, the self-calibration can be known under the condition of how much average battery current is, and the system firstly checks the closest average battery current in the BOOST_CAP_NUMBER [ N ] according to the average battery current when the discharge charge is equal to 100 in operation, and records the M value in the BOOST_CAP_NUMBER [ M ] at the moment, wherein the M value is the decision of which discharge-charge-voltage meter to use.
Of course, considering that the change trend of OCV will be different under different charging current and discharging current, this embodiment further adds a self-learning process, after each calibration is completed, it will learn that this is self-calibrated under the charging and discharging of that battery current, when the calculation model calculates the electric quantity, and according to the principle of closest battery current, the table closest to the actual current in the self-calibrated and self-learned charge_cap [ N ] [ M ] and boost_cap [ N ] [ M ] tables is called to calculate the electric quantity.
In the present embodiment, when the calculation and specification of the OCV voltage are performed, since the battery voltage may be suddenly changed in several cases:
1. heavy load is carried out during discharging, the load is suddenly removed, and the battery voltage can be raised;
2. when discharging, the load is suddenly increased by light load, and the battery voltage is lowered;
3. during charging, as the charging current rises, the battery voltage rises;
4. when charging is suddenly removed, the battery voltage is pulled down.
If the VBAT voltage of the board terminal is directly used to calculate the power, it is obvious that in the above cases, the power will fluctuate back and forth, which is an unreasonable way to calculate the power.
Based on the above, it is reasonable to calculate the power by using the OCV, which is the compensated battery voltage, and a rule needs to be added:
when the battery is charged, the electric quantity is only increased, and the VBAT_OCV is only increased;
when discharging, the electric quantity is only reduced, and VBAT_OCV is only reduced;
the OCV calculation has two basic formulas:
when in charging: vbat_ocv=vbat-ibat_r_charge
When discharging, the following steps are carried out: vbat_ocv=vbat+ibat_r_boost
The vbat_ocv is the compensated battery voltage, and is used for table lookup to calculate the electric quantity, VBAT is the collected battery voltage, IBAT is the collected battery current, r_charge is the internal resistance during charging, and r_boost is the internal resistance during charging.
In this embodiment, when calculating the charge-discharge internal resistance table, since the two internal resistance values of r_charge and r_boost will change according to the change of the battery current, it is necessary to obtain the internal resistance compensation values at different currents according to actual measurement, and when calling is required, calling is performed according to different battery currents.
Assuming the board BAT terminal voltage VBAT1 and the real cell terminal voltage VBAT2, the internal resistance of this charging current I is formula (5):
R_charge=(VBAT2-VBAT1)/I (5)
also assuming that the board BAT terminal voltage VBAT1, the real cell terminal voltage VBAT2, the internal resistance of this discharge current I is formula (6):
R_boost=(VBAT1-VBAT2)/I (6)
according to the two formulas, the internal resistances of the battery under different battery currents can be calculated, and the values are put into the internal resistance tables R_charge [ M ] and R_boost [ M ], and the waiting program calls the two tables according to the different battery currents.
Specifically, the charge-discharge self-calibration procedure provided in this embodiment includes:
step 1: the system is powered on for the first time, the increase or the decrease of the electric quantity is calculated according to an initial electric quantity-voltmeter, and when the system is powered off for the first time until the electric quantity is 0, the system starts charging self-calibration;
step 2: the CHARGE starts from 0, vbat_ocv_tmp is recorded every period T, vbat_ocv_tmp is recorded as a value in the array charge_cap_tmp [ N ], and the battery current IBAT is recorded as a value in the array charge_ibat_tmp [ N ], expressed as formula (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M] (1)
Step 3: starting charging until the CHARGE is added to 100, counting the accumulated charge_cap_tmp [ N ] value, from which the total time of charging T1 can be obtained: t1=n×t;
the charging total time T is averaged to 100 electric quantity, and then there is a charging time T2 of each electric quantity 1: t2=t1/100;
the new OCV voltage relationship corresponding to 1% charge after mathematical averaging is: vbat_ocv=charge_cap_tmp [ T2];
the new OCV voltage relationship corresponding to 2% charge after mathematical averaging is: vbat_ocv=charge_cap_tmp [ t2×2];
the new OCV voltage relationship corresponding to the mathematically averaged charge CAP is: vbat_ocv=charge_cap_tmp [ T2 CAP ]
From the above formula, a new CHARGE-to-voltage table charge_cap_tmp [ N ] is obtained, and after the self-calibration of the CHARGE is completed, the value of this table is updated into charge_cap [ N ] [ M ], which looks at the value of M in charge_cap_number [ M ].
Step 4: the electric quantity starts discharging from 100, self-calibration of discharging is started, VBAT_OCV_TMP is recorded once every period T, VBAT_OCV_TMP is recorded in an array BOOST_CAP_TMP [ N ] as a numerical value, and battery current IBAT is recorded in an array BOOST_IBAT_TMP [ N ] as a numerical value;
step 5: starting discharging until the electric quantity is reduced to 0, and counting the accumulated value of BOOST_CAP_TMP [ N ], wherein the total time T3 of discharging can be obtained through the value of N: t3=n×t; then for the total discharge time T3 to average to 100 charges, there is a discharge time T4 for each charge 1: t4=t/100;
The new OCV voltage relationship corresponding to 1% charge after mathematical averaging is: vbat_ocv=boost_cap_tmp [ T4];
the new OCV voltage relationship corresponding to 2% charge after mathematical averaging is: vbat_ocv=boost_cap_tmp [ t4×2];
the new OCV voltage relationship corresponding to the mathematically averaged charge CAP is: vbat_ocv=boost_cap_tmp [ t4×cap ];
from the above formula, a new discharge charge-voltage table BOOST_CAP_TMP [ N ] is obtained, and after the discharge self-calibration is completed, the value of the table BOOST_CAP_TMP [ N ] is updated into BOOST_CAP [ N ] [ M ], and the M is the M value in BOOST_CAP_NUMBER [ M ].
Step 6: the step 2-3 is completed as a charging self-calibration, the step 4-5 is completed as a discharging self-calibration, and the battery is completely charged and discharged self-calibration, so that the battery is worn after long-term use, but the capacity of the battery can be calibrated only through one charging and discharging self-calibration each time, and the charging and discharging display is uniform.
Since the change trend of OCV is different in consideration of the battery under different charge current and discharge current. In the case that the space resources are sufficient, if more accurate calculation of the electric quantity is desired, a self-learning process is added in the embodiment.
For example, in the discharge of the output constant currents 3A and 5A, the change trend of the OCV is certainly different;
For example, when different powers are input, the change trend of the OCV is certainly different;
a self-learning process is added, and after each time of charge self-calibration and discharge self-calibration, the self-calibration is recorded at the same time under the condition of charging or discharging battery current.
In this embodiment, after the self-calibration of charging is completed, the average battery current ibat_ave of this self-calibration of charging can be obtained by charge_ibat_tmp [ N ]:
IBAT_AVE=(CHARGE_IBAT_TMP[1]+...+CHARGE_IBAT_TMP[N])/N。
if the CHARGE self-calibration is the first time, the initial value is stored toward charge_cap_number [ M ], then there are: charge_cap_number [1] =ibat_ave.
If the self-calibration is the second charge self-calibration and the phase difference of the second IBAT_AVE and the first IBAT_AVE is more than OFFSET (MA), the self-calibration is considered to be different from the last self-calibration data, the second data is recorded to be valid, and the method comprises the following steps: charge_cap_number [2] =ibat_ave.
Otherwise, the set of data closest to this IBAT_AVE in charge_CAP_NUMBER [ M ] is overwritten, which is done in order to ensure that the self-calibrating data is all up-to-date.
If there are more than two data sets in charge_cap_number [ M ], then the ordering of charge_cap_number [ M ] is required, with the values inside charge_cap_number [ M ] ordered from small to large.
After the discharge self-calibration is completed, the average battery current ibat_ave of this discharge self-calibration can be obtained by boost_ibat_tmp [ N ]:
IBAT_AVE=(BOOST_IBAT_TMP[1]+...+BOOST_IBAT_TMP[N])/N。
if the first discharge self-calibration is performed, the initial value is stored in the BOOST_CAP_NUMBER [ M ], and the following steps are performed: boost_cap_number [1] =ibat_ave.
If the self-calibration is the second discharge self-calibration and the phase difference between the second IBAT_AVE and the first IBAT_AVE is more than OFFSET (MA), the self-calibration is considered to be different from the last self-calibration data, the second data is recorded to be effective, and the BOOST_CAP_NUMBER [2] =IBAT_AVE is available.
Otherwise, the set of data closest to this IBAT_AVE in BOOST_CAP_NUMBER [ M ] is overwritten, which is done in order to ensure that the self-calibrating data is all up-to-date.
If there are more than two pieces of data in the BOOST_CAP_NUMBER [ M ], then the BOOST_CAP_NUMBER [ M ] needs to be ordered from small to large.
Therefore, the invention discloses a method with the functions of self-learning and self-calibration, OCV double-check electric quantity-voltmeter and voltage abrupt change smooth change and the like, which is applied to a system for calculating electric quantity by the OCV with the functions of self-learning and self-calibration. The system calculates the electric quantity and divides the electric quantity into four models: a charge calculation model, a charge-to-discharge calculation model, a discharge calculation model, and a discharge-to-charge calculation model. The charge-discharge calculation model and the discharge-charge calculation model are used for realizing smooth electric quantity switching when the electric quantity is switched between charge and discharge, so that the situation that the electric quantity is suddenly changed due to sudden change of voltage during charge-discharge conversion can be avoided; the CHARGE calculation model and the discharge calculation model are independent, and the electric quantity-voltmeter is respectively charge_CAP [ N ] [ M ] and boost_CAP [ N ] [ M ], so that the calculation of the electric quantity can be more accurate.
Therefore, the method is simple and feasible, has high speed and high OCV electric quantity calculation efficiency, and can effectively save time cost and equipment use cost; the method has high calculation accuracy, and the OCV obtained by the method has smaller error than the OCV obtained by the conventional method under the same charge quantity.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above embodiments are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but any insubstantial changes and substitutions made by those skilled in the art on the basis of the present invention are intended to be within the scope of the present invention as claimed.

Claims (11)

1. The OCV electric quantity calculation method with the self-learning and self-calibration functions is characterized by being applied to an OCV electric quantity calculation system with the self-learning and self-calibration functions, wherein the system comprises a charge calculation model, a charge-to-discharge calculation model, a discharge calculation model and a discharge-to-charge calculation model, and the method comprises the following steps:
The system starts to run, when the system is charged, the system starts to enter a charging self-calibration mode, the battery voltage and the battery current during charging are collected every period T, the OCV voltage during charging is determined to be VBAT_OCV_TMP, the data of the OCV voltage VBAT_OCV_TMP is stored in an array charge_CAP_TMP [ N ] every period T, and the data of the battery current is stored in an array charge_IBAT_TMP [ N ];
judging whether the electric quantity is 100, if so, counting the total charging time T1 of the N value of the accumulated charge_CAP_TMP [ N ] and the charging time T2 of each electric quantity, obtaining an updated electric quantity-voltage table charge_CAP_TMP [ N ], and updating the value of the table into a preset CHARGE-electric quantity-voltage table charge_CAP [ N ] [ M ];
when the system discharges, starting to enter a discharge self-calibration mode; after entering the discharge self-calibration mode, recording the OCV voltage VBAT_OCV_TMP when discharging once every period T, storing the data of the OCV voltage VBAT_OCV_TMP into an array BOOST_CAP_TMP [ N ], and recording the data of the battery current into the array BOOST_IBAT_TMP [ N ];
starting discharging until the electric quantity is reduced to 0, obtaining the total discharging time T3 and the discharging time T4 of each electric quantity by counting the N value of the accumulated BOOST_CAP_TMP [ N ], obtaining an updated electric quantity-voltage meter BOOST_CAP_TMP [ N ], and updating the value of the meter into a preset BOOST_CAP [ N ] [ M ] of the electric quantity-voltage meter;
After the self-calibration of charging and the self-calibration of discharging are completed each time, obtaining the average battery current of the self-calibration of charging each time and the average battery current of the self-calibration of discharging each time, and completing a self-learning flow of charging and a self-learning flow of discharging.
2. The method according to claim 1, characterized in that:
when the charge is 0 and is charging, a charging self-calibration mode is started.
3. The method according to claim 1 or 2, characterized in that:
when the charge is 100 and is discharged, a discharge self-calibration mode is started.
4. A method according to claim 3, characterized in that:
after the CHARGE self-calibration is completed, the CHARGE self-calibrated average battery current ibat_ave is obtained through the array charge_ibat_tmp [ N ], expressed as equation (11):
IBAT_AVE=(CHARGE_IBAT_TMP[1]+...+CHARGE_IBAT_TMP[N])/N (11)
if this time the first CHARGE self-calibration is started, the value is stored in the array charge_cap_number [ M ], and then there is equation (12):
CHARGE_CAP_NUMBER[1]=IBAT_AVE (12)
if the charging self-calibration is the second time and the difference between the average battery current ibat_ave of the second time and the average battery current ibat_ave of the first time is out of the error range, the charging self-calibration is considered to be different from the last self-calibration data, the charging self-calibration data is recorded to be valid, and the formula (13) is given:
CHARGE_CAP_NUMBER[2]=IBAT_AVE(13)
If the difference between the average battery current IBAT_AVE of the second time and the average battery current IBAT_AVE of the first time is not out of the error range, the data group closest to the average battery current IBAT_AVE of the array charge_CAP_NUMBER [ M ] is covered.
5. The method according to claim 4, wherein:
after the discharge self-calibration is completed, the discharge self-calibrated average battery current ibat_ave is obtained through an array boost_ibat_tmp [ N ], expressed as formula (21):
IBAT_AVE=(BOOST_IBAT_TMP[1]+...+BOOST_IBAT_TMP[N])/N (21)
if this time the first discharge self-calibration is started, the value is stored in the array BOOST_CAP_NUMBER [ M ], and then the formula (22) is given:
BOOST_CAP_NUMBER[1]=IBAT_AVE(22)
if the discharge self-calibration is the second discharge self-calibration and the difference between the average battery current IBAT_AVE of the second and the average battery current IBAT_AVE of the first is out of the error range, the discharge self-calibration is considered to be different from the last self-calibration data, and the discharge self-calibration data is recorded to be valid, the formula (23) is provided
BOOST_CAP_NUMBER[2]=IBAT_AVE(23)
If the difference between the average battery current IBAT_AVE of the second time and the average battery current IBAT_AVE of the first time is not out of the error range, the data set closest to the average battery current IBAT_AVE of the array BOOST_CAP_NUMBER [ M ] is covered.
6. The method according to claim 5, wherein:
If there are more than two data in charge_cap_number [ M ] or in boost_cap_number [ M ], then the charge_cap_number [ M ] or the boost_cap_number [ M ] needs to be ordered, i.e. the values inside the charge_cap_number [ M ] or the boost_cap_number [ M ] are ordered from small to large.
7. A method according to claim 3, characterized in that:
the charge calculation model is used for:
the battery voltage VBAT and the battery current IBAT are sampled every period T, and assuming that the current charge is CAP, the OCV voltage vbat_ocv_tmp at the time of charging is expressed as formula (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M](1)
setting the comparison value vbat_ocv, expressed as formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M](2)
wherein VBAT_OCV is the compensated battery voltage, VBAT is the collected battery voltage, IBAT is the collected battery current, and R_charge is the internal resistance during charging;
when charging continues until vbat_ocv_tmp is greater than vbat_ocv, the charge is increased by 1, and the next comparison value is updated.
8. The method according to claim 7, wherein:
the charge-to-discharge calculation model is used for:
when the charge is changed into discharge, the charge-discharge calculation model process is entered, including:
if the discharge light-load state is kept all the time, the system enters standby after the appointed time, and the electric quantity is kept unchanged;
If the load insertion is detected to discharge at the moment, the electric quantity is reduced according to the BOOST_CAP [ N ] [ M ], which comprises the following steps:
assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, expressed as equation (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M] (3)
wherein R_boost is the internal resistance during charging;
setting the comparison value vbat_ocv, expressed as formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M](4)
if vbat_ocv_tmp is smaller than vbat_ocv, the power is reduced by 1 after every period T5, and it is continuously determined whether vbat_ocv_tmp is smaller than vbat_ocv: if VBAT_OCV_TMP is larger than VBAT_OCV, entering a discharge calculation model;
if VBAT_OCV_TMP is greater than VBAT_OCV, then the discharge calculation model is entered directly.
9. The method according to claim 8, wherein:
the discharge calculation model is used for:
the battery voltage VBAT and the battery current IBAT are sampled once every period T, and assuming that the current charge is CAP, the OCV voltage vbat_ocv_tmp at the time of discharging is expressed as formula (3):
VBAT_OCV_TMP=VBAT+ IBAT* R_boost[M](3)
setting the comparison value vbat_ocv, expressed as formula (4):
VBAT_OCV=BOOST_CAP[T4*(CAP-1)][M] (4)
when discharging continues until vbat_ocv_tmp is smaller than vbat_ocv, the charge is reduced by 1, and the next comparison value is updated.
10. The method according to claim 9, wherein:
the discharge-to-charge calculation model is used for:
When discharging is changed into charging, entering a discharging-charging calculation model process, including:
assuming the current charge is CAP, the current OCV voltage is VBAT_OCV_TMP, expressed as equation (1):
VBAT_OCV_TMP=VBAT- IBAT* R_charge[M](1)
setting the comparison value vbat_ocv, expressed as formula (2):
VBAT_OCV=CHARGE_CAP[T2*(CAP+1)][M] (2)
if vbat_ocv_tmp is greater than vbat_ocv, after every period T6, the power is added 1, and the power CAP is updated, and whether vbat_ocv_tmp is greater than vbat_ocv is continuously determined. If the VBAT_OCV_TMP is smaller than the VBAT_OCV, entering a charging calculation model;
if VBAT_OCV_TMP is less than VBAT_OCV, the charge calculation model is entered directly.
11. The method of claim 7, further performing:
obtaining internal resistance compensation values under different currents according to actual measurement, and calling according to different battery currents when calling is needed, wherein the method comprises the following steps:
assuming that the voltage of the BAT terminal of the board is VBAT1 and the voltage of the real battery cell terminal is VBAT2, the internal resistance of the charging current I is represented by formula (5):
R_charge=(VBAT2-VBAT1)/I(5)
assuming the board BAT terminal voltage VBAT1 and the real cell terminal voltage VBAT2, the internal resistance of the discharge current I is formula (6):
R_boost=(VBAT1-VBAT2)/I (6)
internal resistances of the battery under different battery currents can be calculated according to formulas (5) and (6), the calculated values are put into the internal resistance tables R_charge [ M ] and R_boost [ M ], and the waiting program calls the two tables according to the different battery currents.
CN202211418491.2A 2022-11-14 2022-11-14 OCV electric quantity calculation method with self-learning and self-calibration functions Active CN115728641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211418491.2A CN115728641B (en) 2022-11-14 2022-11-14 OCV electric quantity calculation method with self-learning and self-calibration functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211418491.2A CN115728641B (en) 2022-11-14 2022-11-14 OCV electric quantity calculation method with self-learning and self-calibration functions

Publications (2)

Publication Number Publication Date
CN115728641A CN115728641A (en) 2023-03-03
CN115728641B true CN115728641B (en) 2023-09-01

Family

ID=85295410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211418491.2A Active CN115728641B (en) 2022-11-14 2022-11-14 OCV electric quantity calculation method with self-learning and self-calibration functions

Country Status (1)

Country Link
CN (1) CN115728641B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007282457A (en) * 2006-04-12 2007-10-25 Yamaha Motor Co Ltd Device for calculating battery residual capacity
JP2012058088A (en) * 2010-09-09 2012-03-22 Calsonic Kansei Corp Charge rate estimation apparatus for battery
CN103048629A (en) * 2013-01-24 2013-04-17 圣邦微电子(北京)股份有限公司 Method and device for metering lithium battery electric quantity
CN103792490A (en) * 2013-11-22 2014-05-14 广州视源电子科技股份有限公司 Method for measuring and calculating battery capacity of system
DE102014206112A1 (en) * 2014-04-01 2015-10-01 Robert Bosch Gmbh Method for monitoring a state of charge or a charging or discharging current of an accumulator
CN105589042A (en) * 2015-12-10 2016-05-18 希姆通信息技术(上海)有限公司 Calculation method for calculating residual electricity quantity of battery
EP3207388A1 (en) * 2014-10-17 2017-08-23 Jaguar Land Rover Limited Battery condition monitoring
CN109799461A (en) * 2019-01-29 2019-05-24 珠海迈科智能科技股份有限公司 A kind of measurement of battery dump energy and evaluation method
CN109884545A (en) * 2019-03-27 2019-06-14 奇瑞商用车(安徽)有限公司 A kind of SOC estimation method based on dynamic electric voltage calibration
CN111142028A (en) * 2020-02-20 2020-05-12 广东天波信息技术股份有限公司 Method and device for measuring electric quantity of lithium battery
CN111245242A (en) * 2020-03-26 2020-06-05 珠海英集芯半导体有限公司 Average current mode-based BUCK-BOOST converter and conversion method thereof
CN111245241A (en) * 2020-03-26 2020-06-05 珠海英集芯半导体有限公司 Low-voltage high-noise-resistant BUCK-BOOST converter and conversion method thereof
CN111426965A (en) * 2020-05-15 2020-07-17 深圳英集芯科技有限公司 Method for calculating electric quantity of battery
CN112782735A (en) * 2020-12-30 2021-05-11 大运汽车股份有限公司 Self-learning endurance mileage correction calculation method
WO2022183399A1 (en) * 2021-03-03 2022-09-09 深圳市大疆创新科技有限公司 Electric quantity display method, electronic device and storage medium
CN115248391A (en) * 2022-09-21 2022-10-28 深圳英集芯科技股份有限公司 Constant-voltage charging electric quantity calculation method and system and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9869724B2 (en) * 2013-07-24 2018-01-16 Rohm Co., Ltd. Power management system

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007282457A (en) * 2006-04-12 2007-10-25 Yamaha Motor Co Ltd Device for calculating battery residual capacity
JP2012058088A (en) * 2010-09-09 2012-03-22 Calsonic Kansei Corp Charge rate estimation apparatus for battery
CN103048629A (en) * 2013-01-24 2013-04-17 圣邦微电子(北京)股份有限公司 Method and device for metering lithium battery electric quantity
CN103792490A (en) * 2013-11-22 2014-05-14 广州视源电子科技股份有限公司 Method for measuring and calculating battery capacity of system
DE102014206112A1 (en) * 2014-04-01 2015-10-01 Robert Bosch Gmbh Method for monitoring a state of charge or a charging or discharging current of an accumulator
EP3207388A1 (en) * 2014-10-17 2017-08-23 Jaguar Land Rover Limited Battery condition monitoring
CN105589042A (en) * 2015-12-10 2016-05-18 希姆通信息技术(上海)有限公司 Calculation method for calculating residual electricity quantity of battery
CN109799461A (en) * 2019-01-29 2019-05-24 珠海迈科智能科技股份有限公司 A kind of measurement of battery dump energy and evaluation method
CN109884545A (en) * 2019-03-27 2019-06-14 奇瑞商用车(安徽)有限公司 A kind of SOC estimation method based on dynamic electric voltage calibration
CN111142028A (en) * 2020-02-20 2020-05-12 广东天波信息技术股份有限公司 Method and device for measuring electric quantity of lithium battery
CN111245242A (en) * 2020-03-26 2020-06-05 珠海英集芯半导体有限公司 Average current mode-based BUCK-BOOST converter and conversion method thereof
CN111245241A (en) * 2020-03-26 2020-06-05 珠海英集芯半导体有限公司 Low-voltage high-noise-resistant BUCK-BOOST converter and conversion method thereof
CN111426965A (en) * 2020-05-15 2020-07-17 深圳英集芯科技有限公司 Method for calculating electric quantity of battery
CN112782735A (en) * 2020-12-30 2021-05-11 大运汽车股份有限公司 Self-learning endurance mileage correction calculation method
WO2022183399A1 (en) * 2021-03-03 2022-09-09 深圳市大疆创新科技有限公司 Electric quantity display method, electronic device and storage medium
CN115248391A (en) * 2022-09-21 2022-10-28 深圳英集芯科技股份有限公司 Constant-voltage charging electric quantity calculation method and system and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电池电量精确测量方法的研究;李申飞;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》(第05期);C042-221 *

Also Published As

Publication number Publication date
CN115728641A (en) 2023-03-03

Similar Documents

Publication Publication Date Title
JP5605717B2 (en) Cell balance apparatus and method using voltage change behavior of battery cell
CN108663621B (en) Charge state calculation method and system for power battery pack
US7362076B2 (en) Remaining capacity calculating device and method for electric power storage
US6841972B2 (en) Method for resetting a state of charge of a battery of a hybrid electric vehicle
CN102565716B (en) Apparatus for calculating residual capacity of secondary battery
CN108206560B (en) Battery equalization method
KR101402802B1 (en) Apparatus and Method for cell balancing based on battery's voltage variation pattern
CN110061531B (en) Energy storage battery equalization method
CN109143099B (en) Method and device for estimating health condition of battery system
KR101500547B1 (en) Apparatus and method for balancing of battery cell's charging capacity
CN110895310A (en) SOC (state of charge) estimation system of lithium iron phosphate battery
CN103217651B (en) A kind of evaluation method of storage battery charge state and system
CN113009346B (en) Battery system and SOC value correction method thereof
CN112098893B (en) Internal short-circuit fault diagnosis method based on initial capacity difference and suitable for electric automobile
CN112858924B (en) Power battery remaining energy estimation method, device, vehicle and storage medium
CN110729797A (en) Vehicle and battery pack balance control method, device and system thereof
CN112379282A (en) Method for improving SOC estimation precision of power battery based on ampere-hour integration method
CN111537901B (en) Battery power state measuring and calculating method, battery pack and vehicle
CN116520162A (en) Correction method, system and storage medium for SOC of lithium iron phosphate battery
CN113075558B (en) Battery SOC estimation method, device and system
CN117420463B (en) Method and device for updating chemical capacity of battery, electronic equipment and storage medium
CN115728641B (en) OCV electric quantity calculation method with self-learning and self-calibration functions
CN112213649B (en) Method and system for constructing open-circuit voltage curve
CN112433156A (en) SOC estimation method
KR20150043265A (en) Apparatus and method for controlling charging of secondary battery

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