CN105891722A - Calculation method and device of terminal battery electric quantity - Google Patents

Calculation method and device of terminal battery electric quantity Download PDF

Info

Publication number
CN105891722A
CN105891722A CN201610209240.1A CN201610209240A CN105891722A CN 105891722 A CN105891722 A CN 105891722A CN 201610209240 A CN201610209240 A CN 201610209240A CN 105891722 A CN105891722 A CN 105891722A
Authority
CN
China
Prior art keywords
interpolation
value
default
voltage
parabola
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.)
Granted
Application number
CN201610209240.1A
Other languages
Chinese (zh)
Other versions
CN105891722B (en
Inventor
曾元清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610209240.1A priority Critical patent/CN105891722B/en
Publication of CN105891722A publication Critical patent/CN105891722A/en
Application granted granted Critical
Publication of CN105891722B publication Critical patent/CN105891722B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The present invention discloses a calculation method and device of terminal battery electric quantity, wherein the method comprises the steps of determining a current voltage value of a terminal battery; obtaining a preset interpolation node and a preset interpolation condition corresponding to the current voltage value; calling a preset parabola interpolation calculation process, and based on the current voltage value, the preset interpolation node and the preset interpolation condition, calculating to obtain an output value corresponding to the preset parabola interpolation calculation process; determining the output value as the current electric quantity value of the terminal battery. Compared with a linear interpolation mode of the prior art, the calculation method and device of the terminal battery electric quantity provided by the present invention calculates the current electric quantity value of the terminal battery in a parabola interpolation manner, so that the accuracy for calculating the electric quantity value of the battery can be improved, and an error between the calculated value of the battery electric quantity and an actual value is reduced.

Description

The computational methods of a kind of terminal battery electricity quantity and device
Technical field
The invention belongs to cell art, particularly relate to computational methods and the device of a kind of terminal battery electricity quantity.
Background technology
Typically, the status bar of terminal display screen there is the icon of charge value for display terminal battery.By In this icon, user is it can be understood that arrive the current electric quantity value of terminal and relatively low in current electric quantity value Time, charge for end cell.Therefore, the charge value calculating battery exactly becomes an indispensability of terminal Function.
At present, terminal typically calculates the charge value of battery by the way of linear interpolation.But, actually According to the characteristic of lithium battery, the curve of its voltage and the corresponding relation of electricity close to parabolic shape, rather than Linear relationship.Therefore, in prior art use by the calculated charge value of the method for linear interpolation with Error between the actual charge value of present battery is bigger.
Summary of the invention
It is an object of the invention to provide computational methods and the device of a kind of terminal battery electricity quantity, it is intended to improve meter Calculate the degree of accuracy of battery electric quantity value, reduce the error between value of calculation and the actual value of battery electric quantity.
For solving above-mentioned technical problem, the present invention provides techniques below scheme:
A kind of computational methods of terminal battery electricity quantity, including:
Determine the current voltage value of end cell;
Obtain the default interpolation knot corresponding with described current voltage value and default interpolation condition;
Call default parabola interpolation calculation procedure, and based on described current voltage value, preset interpolation knot and Preset interpolation condition, be calculated the described default corresponding output valve of parabola interpolation calculation procedure;
Described output valve is defined as the current electric quantity value of end cell.
For solving above-mentioned technical problem, the present invention also provides for techniques below scheme:
A kind of calculating device of terminal battery electricity quantity, including:
First determines unit, for determining the current voltage value of end cell;
Acquiring unit, for obtaining the default interpolation knot corresponding with described current voltage value and default interpolation bar Part;
Call unit, is used for calling default parabola interpolation calculation procedure, and based on described current voltage value, Preset interpolation knot and default interpolation condition, be calculated described default parabola interpolation calculation procedure corresponding Output valve;
Second determines unit, for described output valve is defined as the current electric quantity value of end cell.
Relative to prior art, the computational methods of the terminal battery electricity quantity that the present invention provides and device, by throwing The mode of thing line interpolation is come the current electric quantity value of computing terminal battery, i.e. terminal and is first obtained the current electricity of battery Pressure value, and according to this current voltage value, obtain default interpolation knot corresponding thereto and default interpolation condition. Secondly, terminal calls default parabola interpolation calculation procedure, and based on the current electricity got in above-mentioned steps Pressure value, default interpolation knot and default interpolation condition, use the mode of parabola interpolation, be calculated default The corresponding output valve of parabola interpolation calculation procedure.Finally, this output valve is defined as the current electric quantity of battery Value.Therefore, compared to linear interpolation mode of the prior art, the present invention can improve calculating battery electric quantity The degree of accuracy of value, reduces the error between value of calculation and the actual value of battery electric quantity.
Accompanying drawing explanation
Below in conjunction with the accompanying drawings, by the detailed description of the invention of the present invention is described in detail, the skill of the present invention will be made Art scheme and beneficial effect thereof are apparent.
Fig. 1 is the schematic flow sheet of the computational methods of the terminal battery electricity quantity that first embodiment of the invention provides;
Fig. 2 a is the schematic flow sheet of the computational methods of the terminal battery electricity quantity that second embodiment of the invention provides;
Fig. 2 b is the parabola interpolation curve test number with electricity of the electricity that second embodiment of the invention provides Comparison diagram according to curve;
The structural representation calculating device of the terminal battery electricity quantity that Fig. 3 a provides for third embodiment of the invention;
Another structure calculating device of the terminal battery electricity quantity that Fig. 3 b provides for third embodiment of the invention is shown It is intended to.
Detailed description of the invention
Refer to graphic, the most identical element numbers represents identical assembly, and the principle of the present invention is with reality The computing environment that Shi Yi is suitable illustrates.The following description is concrete based on the illustrated present invention Embodiment, it is not construed as limiting other specific embodiment that the present invention is the most detailed herein.
Will be detailed below.
First embodiment
The computational methods of a kind of terminal battery electricity quantity, comprise determining that the current voltage value of end cell;Obtain The default interpolation knot corresponding with this current voltage value and default interpolation condition;Call default parabola interpolation meter Add journey, and based on this current voltage value, default interpolation knot and default interpolation condition, be calculated default The corresponding output valve of parabola interpolation calculation procedure;This output valve is defined as the current electric quantity value of end cell.
Refer to the computational methods that Fig. 1, Fig. 1 are the terminal battery electricity quantities that first embodiment of the invention provides Schematic flow sheet, idiographic flow may include that
In step S101, determine the current voltage value of end cell.
In step s 102, the default interpolation knot corresponding with this current voltage value and default interpolation condition are obtained.
At present, terminal typically calculates the charge value of battery by the way of linear interpolation., according to lithium The curve of the corresponding relation of the characteristic of battery, its voltage and electricity is close to parabolic shape.So, use Between charge value and the actual charge value of the calculated battery of mode of linear interpolation, error is bigger.
Therefore, in order to reduce the error between the value of calculation of terminal battery electricity quantity and actual value, real in the present invention Execute the mode using parabola interpolation in example to calculate the charge value of battery.
Such as, step S101 and S102 can specifically include:
When starting up of terminal, first terminal obtains the current voltage value of battery, and then terminal is the most electric according to this Pressure value, the voltage electricity relation table of one default battery of inquiry, and get relative with this current voltage value The default interpolation knot answered, and the default interpolation condition corresponding with this default interpolation knot.
It should be noted that such as, if function y=f (x) is defined on interval [a, b] and known at an a ≤x0≤x1≤…≤xnFunctional value on≤b is respectively y0, y1..., ynIf there is function p (x), Make p (xi)=yi(i=0,1 ..., n), then just p (x) is called the interpolating function of f (x), put x0,x1,…, xnIt is referred to as interpolation knot, by the functional value y on known interpolation knot0,y1,…,ynIt is referred to as interpolation condition.
Such as, when the current voltage value that terminal gets battery is 3786mV, according to this current voltage value 3786mV, in default voltage electricity relation table (mV, %), terminal can get and this current voltage Three coordinate points (3740,21), (3824,41), (3960,61) that value is corresponding, then 3740mV, 3824mV and 3960mV is the default interpolation knot got, and 21%, 41% and 61% is acquisition The default interpolation condition arrived.It is understood that according to different magnitudes of voltage, presetting that terminal gets is inserted Value node and default interpolation condition are different.
Preferably, in a kind of possible embodiment, the current voltage of end cell is determined in step S101 Before the step of value, it is also possible to comprise the steps:
The charge value corresponding with the magnitude of voltage of end cell is set;
Based on this magnitude of voltage and charge value, generate voltage electricity mapping table, and this magnitude of voltage is defined as Preset interpolation knot, be defined as this charge value presetting interpolation condition.
Based on this, step S102 obtains the default interpolation knot corresponding with this current voltage value and default interpolation bar Part, can be particularly as follows: according to this voltage electricity mapping table, obtain preset corresponding with current voltage value Interpolation knot and default interpolation condition.
It is understood that because the characteristic of every piece of lithium battery is different, it is every for therefore using above-mentioned steps Block lithium battery generates a corresponding voltage electricity mapping table, and according to this voltage electricity corresponding relation The charge value that table calculates can be closest to the actual charge value of battery, namely the degree of accuracy of value of calculation will be big Big raising.
In step s 103, call default parabola interpolation calculation procedure, and based on this current voltage value, pre- If interpolation knot and default interpolation condition, it is calculated the default corresponding output valve of parabola interpolation calculation procedure.
Such as, in a kind of possible embodiment, step S103 can specifically include:
Call default parabola interpolation calculation procedure, based on default interpolation knot, generate Lagrange secondary-plug Value basic function;
Based on default interpolation condition and Lagrange quadratic interpolation basic function, generate Lagrange quadratic interpolation letter Number;
Calculating the dependent variable of Lagrange quadratic interpolation function, wherein Lagrange quadratic interpolation function is with currently Magnitude of voltage is independent variable;
This dependent variable is defined as presetting the output valve of parabola interpolation calculation procedure.
Such as, terminal determines that the current voltage value of battery is 3800mV, and the default interpolation joint got Point is respectively xx、x1、x2, the default interpolation condition corresponding with these default interpolation knots is respectively y0、y1、 y2, i.e. terminal gets three coordinate points and is respectively (x0,y0),(x1,y1),(x2,y2), then terminal Call default parabola interpolation calculation procedure, based on above-mentioned default interpolation knot, generate Lagrange (Lagrange) quadratic interpolation basic function, as follows:
l 0 ( x ) = ( x - x 1 ) ( x - x 2 ) ( x 0 - x 1 ) ( x 0 - x 2 ) ;
l 1 ( x ) = ( x - x 0 ) ( x - x 2 ) ( x 1 - x 0 ) ( x 1 - x 2 ) ;
l 2 ( x ) = ( x - x 0 ) ( x - x 1 ) ( x 2 - x 0 ) ( x 2 - x 1 ) ;
Then, based on above-mentioned default interpolation condition and above-mentioned Lagrange quadratic interpolation basic function, glug is generated Bright twice-daily interpolating function, as follows:
L2(x)=y0·l0(x)+y1·l1(x)+y2·l2(x)
Secondly, using current voltage value 3800mV as above-mentioned Lagrange quadratic interpolation argument of function, Calculate the dependent variable L of above-mentioned Lagrange quadratic interpolation function2(3800)。
Finally, this dependent variable calculated is defined as presetting the output valve of parabola interpolation calculation procedure.
In step S104, this output valve is defined as the current electric quantity value of end cell.
Such as, it is assumed that L2(3800)=35, then terminal determines that the current electric quantity value of battery is the total electricity of battery 35%.
Further, in step S104 terminal, this output valve is defined as the step of the current electric quantity value of end cell After Zhou, it is also possible to comprise the steps:
If detecting, the error of current electric quantity value more than predetermined threshold value, then controls terminal and updates voltage electricity correspondence Relation table.
Such as, the battery of terminal can be elongated and the most aging along with the time of use, then the magnitude of voltage of battery with The corresponding relation of charge value also can change therewith.If so after battery uses the most for a long time, eventually Hold still according to the voltage electricity mapping table initially set up, obtain and preset interpolation knot and default interpolation bar Part, and go to calculate default parabola interpolation calculation procedure based on these default interpolation knots and default interpolation condition Corresponding output valve, and this output valve is defined as the charge value of battery, the most calculated charge value Error also can be gradually increased.
Therefore, it can in the case of terminal detects that the error of calculated charge value is more than predetermined threshold value, Control terminal and update the voltage electricity mapping table of battery, so that terminal is based on the voltage electricity pair after updating Answer relation table to calculate the charge value of battery, between the most calculated charge value and the actual charge value of battery Error can be less.
If it is understood that the error that terminal detects the charge value calculated is not more than predetermined threshold value, Then terminal can update voltage electricity mapping table.
In alternatively possible embodiment, after step s 104, it is also possible to be: according to Preset Time Interval, controls terminal and updates voltage electricity mapping table.
Such as, the voltage electricity mapping table of terminal regular update every month battery is controlled.May be appreciated Be, above-mentioned steps equally make terminal based on update after voltage electricity mapping table, calculated The error of the charge value of battery is less.
From the foregoing, the computational methods of the terminal battery electricity quantity of the present embodiment offer, pass through parabola interpolation Mode carry out the current electric quantity value of computing terminal battery, i.e. first terminal obtains the current voltage value of battery, and According to this current voltage value, obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, Terminal calls default parabola interpolation calculation procedure, and based on the current voltage value got in above-mentioned steps, Preset interpolation knot and default interpolation condition, use the mode of parabola interpolation, be calculated default parabola The corresponding output valve of interpolation calculation process.Finally, this output valve is defined as the current electric quantity value of battery.Cause This, compared to linear interpolation mode of the prior art, the present invention can improve the essence calculating battery electric quantity value Exactness, reduces the error between value of calculation and the actual value of battery electric quantity.
Second embodiment
According to the method described by first embodiment, calculating side to terminal battery electricity quantity as a example by mobile phone below Method is described in further detail.
Refer to the computational methods of the terminal battery electricity quantity that Fig. 2 a, Fig. 2 a provides for second embodiment of the invention Schematic flow sheet, idiographic flow may include that
In step s 201, mobile phone arranges the charge value corresponding with the magnitude of voltage of battery.
In step S202, based on this magnitude of voltage and this charge value, mobile phone generates voltage electricity corresponding relation Table, and be defined as this magnitude of voltage presetting interpolation knot, it is defined as this charge value presetting interpolation condition.
Such as, it is 1% that mobile phone arranges the charge value corresponding with magnitude of voltage 3410mV, with magnitude of voltage 3568mV Corresponding charge value is 5%, and the charge value corresponding with magnitude of voltage 3635mV is 9%, with magnitude of voltage 3740mV Corresponding charge value is 21%, and the charge value corresponding with magnitude of voltage 3824mV is 41%, with magnitude of voltage Charge value corresponding for 3960mV is 61%, and the charge value corresponding with magnitude of voltage 4110mV is 81%, with electricity Charge value corresponding to pressure value 4267mV is 100%.
Then, mobile phone, based on above-mentioned magnitude of voltage and charge value, generates voltage electricity mapping table.At this electricity In piezoelectricity amount mapping table, above-mentioned magnitude of voltage and charge value are referred to as (3410,1), (3568,5), (3635,9), (3740,21), (3824,41), (3960,61), (4110,81), (4267,100).Mobile phone It is defined as above-mentioned magnitude of voltage presetting interpolation knot, is defined as above-mentioned charge value presetting interpolation condition.
It is contemplated that above-mentioned voltage electricity mapping table can be preserved to presetting storage address by mobile phone In, in order to mobile phone, carrying out parabola interpolation calculating when, can call these numerical value.
It should be noted that the linear interpolation mode used in prior art, in order to make the charge value of calculating to the greatest extent Amount, close to actual charge value, needs to arrange more interpolation knot and interpolation condition, and general way is to arrange 29 interpolation knots and interpolation condition.Such as, 29 interpolation knots and the interpolation condition of setting can be distinguished For: (3395,0), (3410,1), (3568,5), (3635,9), (3678,13), (3715,17), (3740,21), (3763,25), (3780,29), (3795,33), (3809,37), (3824,41), (3843,45), (3865,49), (3895,53), (3920,57), (3960,61), (3988,65), (4010,69), (4040,73), (4072,77), (4110,81), (4153,85), (4185,89), (4220,93), (4247,97), (4255,98), (4260,99), (4267,100).
And in embodiments of the present invention, use the mode of parabola interpolation, calculate certain electricity with battery of mobile phone The charge value that pressure value is corresponding, feature based on parabola interpolation, can arrange small number of interpolation knot and Interpolation condition i.e. can reach the effect accurately calculating battery electric quantity value, is provided with the most in embodiments of the present invention 8 default interpolation knots and default interpolation condition.Therefore, in sum, relative to linear interpolation mode, The embodiment of the present invention can save the system resource of mobile phone, improves and calculates speed.
In step S203, mobile phone determines the current voltage value of battery.
Such as, when start, mobile phone obtains the current voltage value of battery.Such as, now mobile phone gets Battery voltage value is 3786mV.
In step S204, mobile phone, according to voltage electricity mapping table, obtains and this current voltage value pair The default interpolation knot answered and default interpolation condition.
It should be noted that because the embodiment of the present invention uses the mode of parabola interpolation to calculate the electricity of battery Value, therefore mobile phone can obtain three default interpolation knots and default interpolation condition.
Such as, mobile phone is from default storage address, and the voltage electricity correspondence generated in read step S202 is closed It it is table.Based on this table, mobile phone gets the default interpolation knot of three corresponding with current voltage value 3786mV And default interpolation condition is respectively (3740,21), (3824,41), (3960,61), i.e. three interpolation Node is respectively 3740mV, 3824mV and 3960mV, and three default interpolation conditions are respectively 21%, 41% And 61%.
In step S205, mobile phone calls default parabola interpolation calculation procedure, and based on this current voltage Value, default interpolation knot and default interpolation condition, be calculated this default parabola interpolation calculation procedure corresponding Output valve.
Such as, mobile phone calls default parabola interpolation calculation procedure, and based on current voltage value 3786mV, And default interpolation knot 3740mV, 3824mV and 3960mV, also have and preset interpolation condition 21%, 41% And 61%, it is calculated this default corresponding output valve of parabola interpolation calculation procedure.
In a kind of possible embodiment, above-mentioned steps can particularly as follows:
Mobile phone calls default parabola interpolation calculation procedure, based on default interpolation knot 3740mV, 3824mV And 3960mV, generate Lagrange quadratic interpolation basic function, as follows:
l 3 ( x ) = ( x - 3824 ) ( x - 3960 ) ( 3740 - 3824 ) ( 3740 - 3960 ) ;
l 4 ( x ) = ( x - 3740 ) ( x - 3960 ) ( 3824 - 3740 ) ( 3824 - 3960 ) ;
l 5 ( x ) = ( x - 3740 ) ( x - 3824 ) ( 3960 - 3740 ) ( 3960 - 3824 ) ;
Based on default interpolation condition 21%, 41%, 61%, and above-mentioned Lagrange quadratic interpolation basic function, Generate Lagrange quadratic interpolation function, as follows:
L2(x)=21 l3(x)+41·l4(x)+61 l5(x)
Calculate the dependent variable of above-mentioned Lagrange quadratic interpolation function, wherein this Lagrange quadratic interpolation function With current voltage value 3786mV as independent variable.Calculated dependent variable is L2(3786)=32.
This dependent variable 32 is defined as presetting the corresponding output valve of parabola interpolation calculation procedure by mobile phone.
In step S206, this output valve is defined as the current electric quantity value of battery by mobile phone.
Such as, the output valve 32 presetting parabola interpolation calculation procedure in step S205 is defined as electricity by mobile phone The current electric quantity value of the current electric quantity value in pond, i.e. mobile phone is the 32% of the total electricity of battery.
See also the parabola interpolation song that Fig. 2 b, Fig. 2 b is the electricity that second embodiment of the invention provides The comparison diagram of the test data curve of line and electricity.
From Fig. 2 b, according to the mode of the parabola interpolation in the embodiment of the present invention, calculated electricity The curve that value is linked to be, the curve that the actual charge value obtained under experimental test with battery is linked to be, the two is basic Coincideing, this shows by between the calculated charge value of the embodiment of the present invention and the actual charge value of battery Error is the least.
In step S207, mobile phone, according to prefixed time interval, updates voltage electricity mapping table.
It is understood that the battery of mobile phone can be elongated and the most aging along with the time of use, then battery Magnitude of voltage also can change therewith with the corresponding relation of charge value.If so made the most for a long time at battery With rear, mobile phone still according to the voltage electricity mapping table initially set up, obtains and presets interpolation knot and pre- If interpolation condition, and go to calculate default parabola interpolation based on these default interpolation knots and default interpolation condition The corresponding output valve of calculation procedure, and this output valve is defined as the charge value of battery, the most calculated The error of charge value also can be gradually increased.
Therefore, mobile phone can be according to prefixed time interval, the most every other month, updates voltage electricity corresponding Relation table, so that terminal calculates the charge value of battery based on the voltage electricity mapping table after updating, this Error between the calculated charge value of sample and the actual charge value of battery can be less.
Such as, in possible embodiment, battery manufacturer can be in presetting database, and timing updates certain Class battery use voltage electricity mapping table corresponding to time with it, consequently, it is possible to when mobile phone needs more During new voltage electricity mapping table, instruction can be directly transmitted in presetting database, obtain up-to-date voltage Electricity mapping table.It addition, numerous voltage electricity corresponding datas that mobile phone can also calculate based on self, By certain algorithm, these data are processed, and generate up-to-date voltage electricity mapping table, Etc..
In alternatively possible embodiment, step S207 can also particularly as follows:
If mobile phone detects that the error of current electric quantity value more than predetermined threshold value, then controls mobile phone and updates voltage electricity Mapping table.
Such as, whether the error of the charge value that mobile phone detection is calculated according to the mode of parabola interpolation is more than Predetermined threshold value.Such as, mobile phone can by the application preset, recorded for the first time the most calculated with Charge value corresponding for 3940mV is 60%.If this application recorded the calculated and 3940mV of second time Corresponding charge value is 58%, i.e. according to identical magnitude of voltage, and twice calculated charge value difference of mobile phone 2%.Now by the application preset, mobile phone can detect whether this error indicated by difference 2% is more than Predetermined threshold value.
If mobile phone detects that the error of the charge value calculated more than predetermined threshold value, then controls mobile phone and updates electricity Piezoelectricity amount mapping table.
If the error that mobile phone detects the charge value calculated is not more than predetermined threshold value, then mobile phone can Update voltage electricity mapping table.
From the foregoing, the computational methods of the terminal battery electricity quantity of the present embodiment offer, pass through parabola interpolation Mode carry out the current electric quantity value of computing terminal battery, i.e. first terminal obtains the current voltage value of battery, and According to this current voltage value, obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, Terminal calls default parabola interpolation calculation procedure, and based on the current voltage value got in above-mentioned steps, Preset interpolation knot and default interpolation condition, use the mode of parabola interpolation, be calculated default parabola The corresponding output valve of interpolation calculation process.Finally, this output valve is defined as the current electric quantity value of battery.Cause This, compared to linear interpolation mode of the prior art, the present invention can improve the essence calculating battery electric quantity value Exactness, reduces the error between value of calculation and the actual value of battery electric quantity.
3rd embodiment
For ease of preferably implementing the computational methods of the terminal battery electricity quantity that the embodiment of the present invention provides, the present invention Embodiment also provides for the device of a kind of computational methods based on above-mentioned terminal battery electricity quantity.The wherein implication of noun Identical with the computational methods of above-mentioned terminal battery electricity quantity, implement details and be referred in embodiment of the method Explanation.
Refer to the calculating device of the terminal battery electricity quantity that Fig. 3 a, Fig. 3 a provides for third embodiment of the invention Structural representation, this device may include that first determines unit 301, acquiring unit 302, call unit 303, and second determine unit 304.
First determines unit 301, for determining the current voltage value of end cell.
Such as, when start, first determines that unit 301 obtains the current voltage value of end cell.Such as, First to determine that unit 301 gets the current voltage value of end cell be 3786mV.
Acquiring unit 302, for obtaining the default interpolation knot corresponding with described current voltage value and presetting slotting Value condition.
Such as, acquiring unit 302 determines, according to first, the magnitude of voltage 3786mV that unit 301 obtains, and reads The voltage electricity relation table of one default battery, and get the default interpolation knot corresponding with 3786mV 3740mV, 3824mV, 3960mV, and the default interpolation condition corresponding with these default interpolation knots divide It is not 21%, 41%, 61%.
Call unit 303, is used for calling default parabola interpolation calculation procedure, and based on described current voltage Value, default interpolation knot and default interpolation condition, be calculated described default parabola interpolation calculation procedure phase The output valve answered.
Such as, get the default interpolation knot corresponding with current voltage value at acquiring unit 302 and preset After interpolation condition, call unit 303 calls default parabola interpolation calculation procedure, and determines based on first Current voltage value, the default interpolation knot of acquiring unit 302 acquisition and the default interpolation bar that unit 301 obtains Part, calculates the described default corresponding output valve of parabola interpolation calculation procedure.
Such as, first call unit 303 calls default parabola interpolation calculation procedure, saves based on default interpolation Point 3740,3824,3960, generates Lagrange quadratic interpolation basic function, as follows:
l 3 , ( x ) = ( x - 3824 ) ( x - 3960 ) ( 3740 - 3824 ) ( 3740 - 3960 ) ;
l 4 , ( x ) = ( x - 3740 ) ( x - 3960 ) ( 3824 - 3740 ) ( 3824 - 3960 ) ;
l 5 , ( x ) = ( x - 3740 ) ( x - 3824 ) ( 3960 - 3740 ) ( 3960 - 3824 ) ;
Secondly, call unit 303 is based on above-mentioned Lagrange quadratic interpolation basic function, and default interpolation bar Part 21%, 41%, 61%, generates Lagrange quadratic interpolation function, as follows:
L2' (x)=21 l3' (x)+41 l4’(x)+61·l5’(x);
Then, call unit 303 calculates the dependent variable of above-mentioned Lagrange quadratic interpolation function, and wherein this draws Lattice bright twice-daily interpolating function is with current voltage value 3786mV as independent variable.Calculated dependent variable is L2' (3786)=32.
Finally, this dependent variable 32 is defined as presetting the output of parabola interpolation calculation procedure by call unit 303 Value.
Second determines unit 304, for described output valve is defined as the current electric quantity value of end cell.
Such as, second determines that the output valve 32 of call unit 303 is defined as working as of end cell by unit 304 Front charge value, i.e. current electric quantity value account for the 32% of the total electricity of battery.
See also the calculating of the terminal battery electricity quantity that Fig. 3 b, Fig. 3 b provides for third embodiment of the invention Another structural representation of device, this device can also include: arranges unit 305, detection control unit 306, And control unit 307.
Unit 305 is set, for arranging the charge value corresponding with the magnitude of voltage of end cell, based on described electricity Pressure value and described charge value, generate voltage electricity mapping table, and described magnitude of voltage be defined as default inserting Value node, is defined as described charge value presetting interpolation condition.
Such as, arranging unit 305 and arranging the charge value corresponding with magnitude of voltage 3410mV is 1%, with voltage Charge value corresponding to value 3568mV is 5%, and the charge value corresponding with magnitude of voltage 3635mV is 9%, with electricity Charge value corresponding to pressure value 3740mV is 21%, and the charge value corresponding with magnitude of voltage 3824mV is 41%, The charge value corresponding with magnitude of voltage 3960mV is 61%, and the charge value corresponding with magnitude of voltage 4110mV is 81%, The charge value corresponding with magnitude of voltage 4267mV is 100%.
Then, based on above-mentioned magnitude of voltage and charge value, unit 305 is set and generates voltage electricity mapping table. In this voltage electricity mapping table, above-mentioned magnitude of voltage and charge value are referred to as (3410,1), (3568,5), (3635,9), (3740,21), (3824,41), (3960,61), (4110,81), (4267,100). Arrange unit 305 to be defined as above-mentioned magnitude of voltage presetting interpolation knot, be defined as above-mentioned charge value presetting and insert Value condition.
Based on this, acquiring unit 302 can according to arrange unit 305 generate voltage electricity mapping table, Obtain the default interpolation knot corresponding with current voltage value and default interpolation condition.
Detection control unit 306, if for detecting that the error of described current electric quantity value is more than predetermined threshold value, Then control terminal and update described voltage electricity mapping table.
It is understood that the battery of terminal can be elongated and the most aging along with the time of use, then battery Magnitude of voltage also can change therewith with the corresponding relation of charge value.If so made the most for a long time at battery With rear, terminal still according to the voltage electricity mapping table initially set up, obtains and presets interpolation knot and pre- If interpolation condition, and go to calculate default parabola interpolation based on these default interpolation knots and default interpolation condition The corresponding output valve of calculation procedure, and this output valve is defined as the charge value of battery, the most calculated The error of charge value also can be gradually increased.Therefore, terminal can be corresponding to the voltage electricity of battery as required Relation table is updated, and makes the error between the value of calculation of electricity and the actual charge value of battery less.
Such as, detection control unit 306 can determine that to second the current electric quantity value that unit 304 is determined is entered Whether row detection, detect the error of this current charge value more than predetermined threshold value.
If detection control unit 306 detects that the error of this current charge value more than predetermined threshold value, then detects Control unit 306 controls terminal and updates described voltage electricity mapping table.
If the error that detection control unit 306 detects this current charge value is not more than predetermined threshold value, then eventually End can update described voltage electricity mapping table.
Control unit 307, for according to prefixed time interval, controls terminal and updates described voltage electricity correspondence Relation table.
Such as, control unit 307 can periodically control terminal renewal described voltage electricity corresponding relation every month Table.
It is contemplated that above-mentioned detection control unit 306 and control unit 307, can with individualism, Can also be integrated in terminal, this can set as required simultaneously.
From the foregoing, the calculating device of the terminal battery electricity quantity of the present embodiment offer, pass through parabola interpolation Mode carry out the current electric quantity value of computing terminal battery, i.e. first terminal obtains the current voltage value of battery, and According to this current voltage value, obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, Terminal calls default parabola interpolation calculation procedure, and based on the current voltage value got in above-mentioned steps, Preset interpolation knot and default interpolation condition, use the mode of parabola interpolation, be calculated default parabola The corresponding output valve of interpolation calculation process.Finally, this output valve is defined as the current electric quantity value of battery.Cause This, compared to linear interpolation mode of the prior art, the present invention can improve the essence calculating battery electric quantity value Exactness, reduces the error between value of calculation and the actual value of battery electric quantity.
For the calculating device of the described terminal battery electricity quantity of the embodiment of the present invention, its each functional module is permissible It is integrated in one to process in chip, it is also possible to be that modules is individually physically present, it is also possible to be two or two Individual it is integrated in a module with upper module.Above-mentioned integrated module both can realize to use the form of hardware, Software function module can also be used to realize.If described integrated module is real with the form of software function module Now and as independent production marketing or use time, it is also possible to be stored in a computer read/write memory medium In, described storage medium is such as read only memory, disk or CD etc..
Computational methods and the device of a kind of terminal battery electricity quantity provided the embodiment of the present invention above are carried out Being discussed in detail, principle and the embodiment of the present invention are set forth by specific case used herein, with The explanation of upper embodiment is only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for this The technical staff in field, according to the thought of the present invention, the most all has and changes In place of change, in sum, this specification content should not be construed as limitation of the present invention.

Claims (10)

1. the computational methods of a terminal battery electricity quantity, it is characterised in that described method includes:
Determine the current voltage value of end cell;
Obtain the default interpolation knot corresponding with described current voltage value and default interpolation condition;
Call default parabola interpolation calculation procedure, and based on described current voltage value, preset interpolation knot and Preset interpolation condition, be calculated the described default corresponding output valve of parabola interpolation calculation procedure;
Described output valve is defined as the current electric quantity value of end cell.
The computational methods of terminal battery electricity quantity the most according to claim 1, it is characterised in that determining Before the step of the current voltage value of end cell, also include:
The charge value corresponding with the magnitude of voltage of end cell is set;
Based on described magnitude of voltage and described charge value, generate voltage electricity mapping table, and by described voltage Value is defined as presetting interpolation knot, is defined as described charge value presetting interpolation condition;
Default interpolation knot and default interpolation condition that described acquisition is corresponding with described current voltage value include: press According to described voltage electricity mapping table, obtain the default interpolation knot corresponding with described current voltage value and pre- If interpolation condition.
The computational methods of terminal battery electricity quantity the most according to claim 2, it is characterised in that described tune By default parabola interpolation calculation procedure, and based on described current voltage value, preset interpolation knot and presetting and insert Value condition, is calculated the described default corresponding output valve of parabola interpolation calculation procedure and includes:
Call default parabola interpolation calculation procedure, based on described default interpolation knot, generate Lagrange two Secondary Interpolation-Radix-Function;
Based on described default interpolation condition and described Lagrange quadratic interpolation basic function, generate Lagrange two Secondary interpolating function;
Calculate the dependent variable of described Lagrange quadratic interpolation function, wherein said Lagrange quadratic interpolation letter Number is with described current voltage value as independent variable;
Described dependent variable is defined as the output valve of described default parabola interpolation calculation procedure.
The computational methods of terminal battery electricity quantity the most according to claim 3, it is characterised in that by institute After stating the step of current electric quantity value that output valve is defined as end cell, also include:
If detecting, the error of described current electric quantity value more than predetermined threshold value, then controls terminal and updates described voltage Electricity mapping table.
The computational methods of terminal battery electricity quantity the most according to claim 3, it is characterised in that by institute After stating the step of current electric quantity value that output valve is defined as end cell, also include:
According to prefixed time interval, control terminal and update described voltage electricity mapping table.
6. the calculating device of a terminal battery electricity quantity, it is characterised in that described device includes:
First determines unit, for determining the current voltage value of end cell;
Acquiring unit, for obtaining the default interpolation knot corresponding with described current voltage value and default interpolation bar Part;
Call unit, is used for calling default parabola interpolation calculation procedure, and based on described current voltage value, Preset interpolation knot and default interpolation condition, be calculated described default parabola interpolation calculation procedure corresponding Output valve;
Second determines unit, for described output valve is defined as the current electric quantity value of end cell.
The calculating device of terminal battery electricity quantity the most according to claim 6, it is characterised in that described dress Put and also include:
Unit is set, for arranging the charge value corresponding with the magnitude of voltage of end cell, based on described magnitude of voltage And described charge value, generate voltage electricity mapping table, and be defined as described magnitude of voltage presetting interpolation joint Point, is defined as described charge value presetting interpolation condition;
Described acquiring unit specifically for: according to described voltage electricity mapping table, obtain with described currently Default interpolation knot that magnitude of voltage is corresponding and default interpolation condition.
The calculating device of terminal battery electricity quantity the most according to claim 7, it is characterised in that described tune It is used for unit:
Call default parabola interpolation calculation procedure, based on described default interpolation knot, generate Lagrange two Secondary Interpolation-Radix-Function;
Based on described default interpolation condition and described Lagrange quadratic interpolation basic function, generate Lagrange two Secondary interpolating function;
Calculate the dependent variable of described Lagrange quadratic interpolation function, wherein said Lagrange quadratic interpolation letter Number is with described current voltage value as independent variable;
Described dependent variable is defined as the output valve of described default parabola interpolation calculation procedure.
The calculating device of terminal battery electricity quantity the most according to claim 8, it is characterised in that described dress Put and also include:
Detection control unit, if for detecting that the error of described current electric quantity value more than predetermined threshold value, is then controlled Terminal processed updates described voltage electricity mapping table.
The calculating device of terminal battery electricity quantity the most according to claim 8, it is characterised in that described Device also includes:
Control unit, for according to prefixed time interval, controls terminal and updates described voltage electricity corresponding relation Table.
CN201610209240.1A 2016-04-06 2016-04-06 The computational methods and device of a kind of terminal battery electricity quantity Expired - Fee Related CN105891722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610209240.1A CN105891722B (en) 2016-04-06 2016-04-06 The computational methods and device of a kind of terminal battery electricity quantity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610209240.1A CN105891722B (en) 2016-04-06 2016-04-06 The computational methods and device of a kind of terminal battery electricity quantity

Publications (2)

Publication Number Publication Date
CN105891722A true CN105891722A (en) 2016-08-24
CN105891722B CN105891722B (en) 2017-11-17

Family

ID=57013337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610209240.1A Expired - Fee Related CN105891722B (en) 2016-04-06 2016-04-06 The computational methods and device of a kind of terminal battery electricity quantity

Country Status (1)

Country Link
CN (1) CN105891722B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140100802A1 (en) * 2012-10-08 2014-04-10 Energy Pass Incorporation Method and computer system for measuring remaining battery capacity
CN104375085A (en) * 2013-08-13 2015-02-25 中兴通讯股份有限公司 Method and device for detecting electric quantity of battery and terminal
CN104597405A (en) * 2014-12-22 2015-05-06 余姚亿威电子科技有限公司 Method for detecting electric quantity of lithium ion battery for electric vehicle

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140100802A1 (en) * 2012-10-08 2014-04-10 Energy Pass Incorporation Method and computer system for measuring remaining battery capacity
CN104375085A (en) * 2013-08-13 2015-02-25 中兴通讯股份有限公司 Method and device for detecting electric quantity of battery and terminal
CN104597405A (en) * 2014-12-22 2015-05-06 余姚亿威电子科技有限公司 Method for detecting electric quantity of lithium ion battery for electric vehicle

Also Published As

Publication number Publication date
CN105891722B (en) 2017-11-17

Similar Documents

Publication Publication Date Title
US8878549B2 (en) AC impedance measuring device
CN102937830B (en) Electric quantity management method and device of mobile equipment and mobile equipment
CN103728516B (en) Soc chip clock detection circuit
CN112216886B (en) Method and device for estimating battery charging time
CN105472135B (en) A kind of display methods and device of mobile terminal electricity
CN109782175A (en) Batteries of electric automobile capacity correction test method and electronic equipment
CN104714181A (en) Method and system for acquiring relationship of voltage and state of charge
CN103473472A (en) Quartile graph-based data quality detection method and system
CN106708621A (en) Method and device for acquiring capacity of application cluster
CN110032483B (en) Method, device and medium for adjusting test parameters
CN106208867A (en) A kind of control system for permanent-magnet synchronous motor pid parameter optimization method
CN108051755A (en) Battery internal resistance acquisition method and device, battery management system and computer storage readable medium
CN109556646A (en) A kind of gas sensor calibration method, device, storage medium and terminal
CN103391362B (en) A kind of application class method based on power consumption and mobile terminal
CN114264941B (en) Reclosing lead time determining method and device and relay protection equipment
CN108802628B (en) Method, device and equipment for measuring battery electric quantity
CN105891722A (en) Calculation method and device of terminal battery electric quantity
WO2016041398A1 (en) Method for storing battery level information of mobile terminal and mobile terminal
CN116885824A (en) Charging method, device, apparatus, storage medium, and program product
CN116933676A (en) Flow numerical simulation method, device, equipment and medium
CN110600823A (en) Method and device for displaying battery electric quantity, computer equipment and storage medium
CN105611078A (en) Electric quantity calculation method and system for reducing standby power consumption of mobile terminal
CN116016225A (en) Information processing method, signal positioning method, device, equipment and medium
CN115436827A (en) Insulation resistance detection method, device and equipment
CN107179506A (en) A kind of method, device, system and vehicle for determining accumulator capacity

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171117

CF01 Termination of patent right due to non-payment of annual fee