CN105891722B - The computational methods and device of a kind of terminal battery electricity quantity - Google Patents
The computational methods and device of a kind of terminal battery electricity quantity Download PDFInfo
- Publication number
- CN105891722B CN105891722B CN201610209240.1A CN201610209240A CN105891722B CN 105891722 B CN105891722 B CN 105891722B CN 201610209240 A CN201610209240 A CN 201610209240A CN 105891722 B CN105891722 B CN 105891722B
- Authority
- CN
- China
- Prior art keywords
- interpolation
- default
- voltage
- value
- electricity
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/36—Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
- G01R31/367—Software therefor, e.g. for battery testing using modelling or look-up tables
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- Secondary Cells (AREA)
Abstract
The invention discloses a kind of computational methods of terminal battery electricity quantity and device, wherein this method includes:Determine the current voltage value of end cell;Obtain default interpolation knot corresponding with the current voltage value and default interpolation condition;Default parabola interpolation calculation procedure is called, and based on the current voltage value, default interpolation knot and default interpolation condition, the default corresponding output valve of parabola interpolation calculation procedure is calculated;The output valve is defined as to the voltage value of end cell.Compared to linear interpolation mode of the prior art, the computational methods and device of terminal battery electricity quantity provided by the invention, come the voltage value of computing terminal battery by way of parabola interpolation.Therefore, the present invention can improve the accuracy for calculating battery electric quantity value, reduce the error between the calculated value of battery electric quantity and actual value.
Description
Technical field
The invention belongs to the computational methods and device of cell art, more particularly to a kind of terminal battery electricity quantity.
Background technology
Typically, there is the icon of the charge value for display terminal battery on the status bar of terminal display screen.By means of this
Icon, user can be understood that the voltage value of terminal, and when voltage value is relatively low, be filled for end cell
Electricity.Therefore, calculating the charge value of battery exactly turns into a necessary functions of terminal.
At present, terminal calculates the charge value of battery typically by way of linear interpolation.However, indeed according to lithium electricity
The curve of the corresponding relation of the characteristic in pond, its voltage and electricity is close to parabolic shape, and non-linear relation.Therefore, it is existing
Mistake between the charge value being calculated by the method for linear interpolation and the actual charge value of present battery that are used in technology
Difference is larger.
The content of the invention
It is an object of the invention to provide a kind of computational methods of terminal battery electricity quantity and device, it is intended to improves and calculates battery
The accuracy of charge value, reduce the error between the calculated value of battery electric quantity and actual value.
In order to solve the above technical problems, the present invention provides following technical scheme:
A kind of computational methods of terminal battery electricity quantity, including:
Determine the current voltage value of end cell;
Obtain default interpolation knot corresponding with the current voltage value and default interpolation condition;
Default parabola interpolation calculation procedure is called, and is based on the current voltage value, default interpolation knot and presets to insert
Value condition, the default corresponding output valve of parabola interpolation calculation procedure is calculated;
The output valve is defined as to the voltage value of end cell.
In order to solve the above technical problems, the present invention also provides following technical scheme:
A kind of computing device of terminal battery electricity quantity, including:
First determining unit, for determining the current voltage value of end cell;
Acquiring unit, for obtaining default interpolation knot corresponding with the current voltage value and default interpolation condition;
Call unit, for calling default parabola interpolation calculation procedure, and based on the current voltage value, default interpolation
Node and default interpolation condition, the default corresponding output valve of parabola interpolation calculation procedure is calculated;
Second determining unit, for the output valve to be defined as to the voltage value of end cell.
Relative to prior art, the computational methods and device of terminal battery electricity quantity provided by the invention, inserted by parabola
The mode of value carrys out the voltage value of computing terminal battery, i.e. terminal obtains the current voltage value of battery first, and according to deserving
Preceding magnitude of voltage, obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, terminal calls default parabola to insert
It is worth calculation procedure, and based on the current voltage value got in above-mentioned steps, default interpolation knot and default interpolation condition, uses
The mode of parabola interpolation, the default corresponding output valve of parabola interpolation calculation procedure is calculated.Finally, it is the output valve is true
It is set to the voltage value of battery.Therefore, compared to linear interpolation mode of the prior art, the present invention can improve calculating electricity
The accuracy of pond charge value, reduce the error between the calculated value of battery electric quantity and actual value.
Brief description of the drawings
Below in conjunction with the accompanying drawings, by the way that the embodiment of the present invention is described in detail, technical scheme will be made
And its advantage is apparent.
Fig. 1 is the schematic flow sheet of the computational methods for the terminal battery electricity quantity that first embodiment of the invention provides;
Fig. 2 a are the schematic flow sheets of the computational methods for the terminal battery electricity quantity that second embodiment of the invention provides;
Fig. 2 b are the parabola interpolation curve of electricity and the test data curve of electricity that second embodiment of the invention provides
Comparison diagram;
Fig. 3 a are the structural representation of the computing device for the terminal battery electricity quantity that third embodiment of the invention provides;
Fig. 3 b are another structural representation of the computing device for the terminal battery electricity quantity that third embodiment of the invention provides.
Embodiment
Schema is refer to, wherein identical element numbers represent identical component, and principle of the invention is to implement one
Illustrated in appropriate computing environment.The following description is based on the illustrated specific embodiment of the invention, and it should not be by
It is considered as the limitation present invention other specific embodiments not detailed herein.
It will be detailed below.
First embodiment
A kind of computational methods of terminal battery electricity quantity, including:Determine the current voltage value of end cell;Obtain current with this
Interpolation knot and default interpolation condition are preset corresponding to magnitude of voltage;Default parabola interpolation calculation procedure is called, and is based on deserving
Preceding magnitude of voltage, default interpolation knot and default interpolation condition, are calculated default parabola interpolation calculation procedure and export accordingly
Value;The output valve is defined as to the voltage value of end cell.
Referring to Fig. 1, Fig. 1 is the flow signal of the computational methods for the terminal battery electricity quantity that first embodiment of the invention provides
Figure, idiographic flow can include:
In step S101, the current voltage value of end cell is determined.
In step s 102, default interpolation knot corresponding with the current voltage value and default interpolation condition are obtained.
At present, terminal calculates the charge value of battery typically by way of linear interpolation.But according to the spy of lithium battery
Property, the curve of the corresponding relation of its voltage and electricity is close to parabolic shape.So calculated by the way of linear interpolation
Error is larger between the charge value of the battery arrived and actual charge value.
Therefore, in order to reduce the error between the calculated value of terminal battery electricity quantity and actual value, in embodiments of the present invention
The charge value of battery is calculated by the way of parabola interpolation.
For example step S101 and S102 can be specifically included:
In starting up of terminal, terminal obtains the current voltage value of battery first, and then terminal is looked into according to the current voltage value
The voltage electricity relation table of a default battery is ask, and gets the default interpolation knot corresponding with the current voltage value,
And preset the corresponding default interpolation condition of interpolation knot with this.
It should be noted that for example, if function y=f (x) is defined on section [a, b], and it is known in point a≤x0≤x1
≤…≤xnFunctional value on≤b is respectively y0, y1..., ynIf in the presence of a function p (x) so that p (xi)=yi(i=0,
1 ..., n), then just p (x) be referred to as f (x) interpolating function, point x0,x1,…,xnReferred to as interpolation knot, by known interpolation knot
On functional value y0,y1,…,ynReferred to as interpolation condition.
For example, when the current voltage value that terminal gets battery is 3786mV, according to current voltage value 3786mV,
In default voltage electricity relation table (mV, %), terminal can get three coordinate points corresponding with the current voltage value
(3740,21), (3824,41), (3960,61), then 3740mV, 3824mV and 3960mV are the default interpolation section got
Point, 21%, 41% and 61% is the default interpolation condition got.It is understood that according to different magnitudes of voltage, terminal
The default interpolation knot and default interpolation condition got is different.
Preferably, in a kind of possible embodiment, the step of the current voltage value of end cell is determined in step S101
Before rapid, it can also comprise the following steps:
Charge value corresponding with the magnitude of voltage of end cell is set;
Based on the magnitude of voltage and charge value, voltage electricity mapping table is generated, and the magnitude of voltage is defined as default insert
Value node, the charge value is defined as default interpolation condition.
Based on this, step S102 obtains default interpolation knot corresponding with the current voltage value and default interpolation condition, can
To be specially:According to the voltage electricity mapping table, obtain default interpolation knot corresponding with current voltage value and preset and insert
Value condition.
It is understood that since the characteristic of every piece of lithium battery is different, therefore above-mentioned steps are used as every block of lithium electricity
Pond generates a corresponding voltage electricity mapping table, and the electricity calculated according to this voltage electricity mapping table
Value be able to will greatly improve closest to the actual charge value of battery, namely the accuracy of calculated value.
In step s 103, default parabola interpolation calculation procedure is called, and based on the current voltage value, default interpolation section
Point and default interpolation condition, are calculated the default corresponding output valve of parabola interpolation calculation procedure.
For example in a kind of possible embodiment, step S103 can be specifically included:
Default parabola interpolation calculation procedure is called, based on default interpolation knot, generates Lagrangian quadratic interpolation base letter
Number;
Based on default interpolation condition and Lagrangian quadratic interpolation basic function, Lagrangian quadratic interpolation function is generated;
The dependent variable of Lagrangian quadratic interpolation function is calculated, wherein Lagrangian quadratic interpolation function is with current voltage value
For independent variable;
The dependent variable is defined as to the output valve of default parabola interpolation calculation procedure.
For example, terminal determines that the current voltage value of battery is 3800mV, and the default interpolation knot got is respectively
xx、x1、x2, it is respectively y to preset the corresponding default interpolation condition of interpolation knot with these0、y1、y2, i.e. terminal gets three seats
Punctuate is respectively (x0,y0),(x1,y1),(x2,y2), then terminal calls default parabola interpolation calculation procedure, based on above-mentioned default
Interpolation knot, generate Lagrangian (Lagrange) quadratic interpolation basic function, i.e., it is as follows:
Then, based on above-mentioned default interpolation condition and above-mentioned Lagrangian quadratic interpolation basic function, generation Lagrange two
Secondary interpolating function, i.e., it is as follows:
L2(x)=y0·l0(x)+y1·l1(x)+y2·l2(x)
Secondly, using current voltage value 3800mV as above-mentioned Lagrangian quadratic interpolation argument of function, calculate above-mentioned
The dependent variable L of Lagrangian quadratic interpolation function2(3800)。
Finally, the dependent variable being calculated is defined as to the output valve of default parabola interpolation calculation procedure.
In step S104, the output valve is defined as to the voltage value of end cell.
Such as, it is assumed that L2(3800)=35, then terminal determines that the voltage value of battery is the 35% of battery total electricity.
Further, the output valve is defined as the voltage value of end cell by step S104 terminals the step of it
Afterwards, can also comprise the following steps:
If detecting, the error of voltage value is more than predetermined threshold value, control terminal renewal voltage electricity corresponding relation
Table.
For example the battery of terminal can be with the elongated and gradual aging of usage time, then the magnitude of voltage and charge value of battery
Corresponding relation can also change therewith.If so after battery long-time use, terminal is still according to most preliminary design
Fixed voltage electricity mapping table, default interpolation knot and default interpolation condition are obtained, and based on these default interpolation knots
And default interpolation condition goes to calculate the corresponding output valve of default parabola interpolation calculation procedure, and the output valve is defined as electricity
The charge value in pond, the then error for the charge value being calculated also can gradually increase.
Therefore, can be in the case where terminal detect that the error for the charge value being calculated is more than predetermined threshold value, control
Terminal updates the voltage electricity mapping table of battery, so that terminal is calculated based on the voltage electricity mapping table after renewal
The charge value of battery, the error between the actual charge value of charge value and battery being so calculated can be smaller.
It is understood that if terminal detects that the error of the charge value calculated is not more than predetermined threshold value, terminal
Voltage electricity mapping table may not necessarily be updated.
In alternatively possible embodiment, after step s 104, it can also be:According to prefixed time interval, control
Terminal processed updates voltage electricity mapping table.
For example control terminal regularly updates the voltage electricity mapping table of battery every month.It is it is understood that above-mentioned
Step can equally make terminal based on the voltage electricity mapping table after renewal, the error of the charge value for the battery being calculated
It is smaller.
From the foregoing, the computational methods for the terminal battery electricity quantity that the present embodiment provides, by way of parabola interpolation
Carry out the voltage value of computing terminal battery, i.e. terminal obtains the current voltage value of battery first, and according to the current voltage value,
Obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, terminal call default parabola interpolation calculate into
Journey, and based on the current voltage value got in above-mentioned steps, default interpolation knot and default interpolation condition, inserted with parabola
The mode of value, the default corresponding output valve of parabola interpolation calculation procedure is calculated.Finally, the output valve is defined as battery
Voltage value.Therefore, compared to linear interpolation mode of the prior art, the present invention, which can improve, calculates battery electric quantity value
Accuracy, reduce the error between the calculated value of battery electric quantity and actual value.
Second embodiment
Method according to described by first embodiment, the computational methods of terminal battery electricity quantity are made by taking mobile phone as an example below into
One step describes in detail.
Fig. 2 a are referred to, Fig. 2 a are that the flow of the computational methods for the terminal battery electricity quantity that second embodiment of the invention provides is shown
It is intended to, idiographic flow can include:
In step s 201, mobile phone sets charge value corresponding with the magnitude of voltage of battery.
In step S202, based on the magnitude of voltage and the charge value, mobile phone generates voltage electricity mapping table, and should
Magnitude of voltage is defined as default interpolation knot, and the charge value is defined as into default interpolation condition.
For example it is 1% that mobile phone, which sets charge value corresponding with magnitude of voltage 3410mV, electricity corresponding with magnitude of voltage 3568mV
It is worth for 5%, charge value corresponding with magnitude of voltage 3635mV is 9%, and charge value corresponding with magnitude of voltage 3740mV is 21%, with electricity
Charge value corresponding to pressure value 3824mV is 41%, and charge value corresponding with magnitude of voltage 3960mV is 61%, with magnitude of voltage 4110mV
Corresponding charge value is 81%, and charge value corresponding with magnitude of voltage 4267mV is 100%.
Then, mobile phone is based on above-mentioned magnitude of voltage and charge value, generates voltage electricity mapping table.In the voltage electricity pair
To answer in relation 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).Above-mentioned magnitude of voltage is defined as default interpolation knot by mobile phone,
Above-mentioned charge value is defined as default interpolation condition.
It is contemplated that mobile phone can preserve above-mentioned voltage electricity mapping table into default storage address, with
Just mobile phone can call these numerical value when parabola interpolation calculating is carried out.
It should be noted that the linear interpolation mode used in the prior art, in order that the charge value calculated is as far as possible close
For actual charge value, it is necessary to set more interpolation knot and interpolation condition, in general way is to set 29 interpolation knots and insert
Value condition.For example, 29 interpolation knots and interpolation condition that set can be respectively:(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, by the way of parabola interpolation, calculate some magnitude of voltage pair with battery of mobile phone
The charge value answered, the characteristics of based on parabola interpolation, small number of interpolation knot and interpolation condition can be set to can reach
It is accurate to calculate the effect of battery electric quantity value, such as 8 default interpolation knots and default interpolation are provided with embodiments of the present invention
Condition.Therefore, in summary, relative to linear interpolation mode, the embodiment of the present invention can save the system resource of mobile phone, improve
Calculating speed.
In step S203, mobile phone determines the current voltage value of battery.
For example in start, mobile phone obtains the current voltage value of battery.For example, the cell voltage that now mobile phone is got
It is worth for 3786mV.
In step S204, mobile phone obtains corresponding with the current voltage value default according to voltage electricity mapping table
Interpolation knot and default interpolation condition.
It should be noted that because the embodiment of the present invention calculates the charge value of battery by the way of parabola interpolation, because
This mobile phone can obtain three default interpolation knots and default interpolation condition.
For example, the voltage electricity mapping table that mobile phone from default storage address, generates in read step S202.It is based on
The table, mobile phone gets three default interpolation knots corresponding with current voltage value 3786mV and default interpolation condition is respectively
(3740,21), (3824,41), (3960,61), i.e. three interpolation knots are respectively 3740mV, 3824mV and 3960mV, three
Default interpolation condition is respectively 21%, 41% and 61%.
In step S205, mobile phone calls default parabola interpolation calculation procedure, and is based on the current voltage value, presets and insert
Value node and default interpolation condition, the corresponding output valve of default parabola interpolation calculation procedure is calculated.
For example, mobile phone calls default parabola interpolation calculation procedure, and current voltage value 3786mV is based on, and it is default slotting
Value node 3740mV, 3824mV and 3960mV, also default interpolation condition 21%, 41% and 61%, the default throwing is calculated
The corresponding output valve of thing line interpolation calculation process.
In a kind of possible embodiment, above-mentioned steps can be specially:
Mobile phone calls default parabola interpolation calculation procedure, based on default interpolation knot 3740mV, 3824mV and 3960mV,
Lagrangian quadratic interpolation basic function is generated, it is as follows:
Based on default interpolation condition 21%, 41%, 61%, and above-mentioned Lagrangian quadratic interpolation basic function, generation is drawn
The bright twice-daily interpolating function of lattice, it is as follows:
L2(x)=21l3(x)+41·l4(x)+61l5(x)
The dependent variable of above-mentioned Lagrangian quadratic interpolation function is calculated, wherein the Lagrangian quadratic interpolation function is with current
Magnitude of voltage 3786mV is independent variable.The dependent variable being calculated is L2(3786)=32.
The dependent variable 32 is defined as the corresponding output valve of default parabola interpolation calculation procedure by mobile phone.
In step S206, the output valve is defined as the voltage value of battery by mobile phone.
For example, the output valve 32 that parabola interpolation calculation procedure is preset in step S205 is defined as the current of battery by mobile phone
The voltage value of charge value, i.e. mobile phone is the 32% of battery total electricity.
Also referring to Fig. 2 b, Fig. 2 b are the parabola interpolation curve and electricity for the electricity that second embodiment of the invention provides
Test data curve comparison diagram.
From Fig. 2 b, according to the mode of the parabola interpolation in the embodiment of the present invention, the charge value being calculated is linked to be
Curve, the curve that the actual charge value obtained with battery under experimental test is linked to be, the two coincide substantially, and this shows to pass through this
Error very little between charge value and the actual charge value of battery that inventive embodiments are calculated.
In step S207, mobile phone updates voltage electricity mapping table according to prefixed time interval.
It is understood that the battery of mobile phone can be with the elongated and gradual aging of usage time, then the magnitude of voltage of battery
It can also be changed therewith with the corresponding relation of charge value.If so after battery long-time use, mobile phone is still pressed
According to the voltage electricity mapping table initially set up, default interpolation knot and default interpolation condition are obtained, and it is default based on these
Interpolation knot and default interpolation condition go to calculate the corresponding output valve of default parabola interpolation calculation procedure, and by the output valve
It is defined as the charge value of battery, then the error for the charge value being calculated also can gradually increase.
Therefore, mobile phone can be according to prefixed time interval, such as every other month, updates voltage electricity mapping table,
So that terminal calculates the charge value of battery based on the voltage electricity mapping table after renewal, the charge value being so calculated
Error between the actual charge value of battery can be smaller.
For example in possible embodiment, battery manufacturer can regularly update certain class battery in presetting database
Voltage electricity mapping table corresponding with its usage time, consequently, it is possible to when mobile phone needs to update voltage electricity corresponding relation
During table, instruction can be directly transmitted newest voltage electricity mapping table is obtained into presetting database.In addition, mobile phone also may be used
With the numerous voltage electricity corresponding datas calculated based on itself, by certain algorithm, these data are handled, and it is raw
Into newest voltage electricity mapping table, etc..
In alternatively possible embodiment, step S207 can also be specially:
If mobile phone detects that the error of voltage value is more than predetermined threshold value, control mobile phone renewal voltage electricity is corresponding to close
It is table.
For example whether mobile phone detects the error of the charge value calculated according to the mode of parabola interpolation more than default threshold
Value.For example, mobile phone can be by default application, recorded the charge value corresponding with 3940mV being calculated for the first time is
60%.If it is 58% that the application, which recorded the charge value corresponding with 3940mV being calculated for the second time, i.e., according to identical electricity
Pressure value, the charge value that mobile phone is calculated twice have differed 2%.Now mobile phone can detect the difference by default application
Whether the error indicated by 2% is more than predetermined threshold value.
If mobile phone detects that the error of the charge value calculated is more than predetermined threshold value, control mobile phone renewal voltage electricity
Mapping table.
If mobile phone detects that the error of the charge value calculated is not more than predetermined threshold value, mobile phone may not necessarily update electricity
Piezoelectricity amount mapping table.
From the foregoing, the computational methods for the terminal battery electricity quantity that the present embodiment provides, by way of parabola interpolation
Carry out the voltage value of computing terminal battery, i.e. terminal obtains the current voltage value of battery first, and according to the current voltage value,
Obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, terminal call default parabola interpolation calculate into
Journey, and based on the current voltage value got in above-mentioned steps, default interpolation knot and default interpolation condition, inserted with parabola
The mode of value, the default corresponding output valve of parabola interpolation calculation procedure is calculated.Finally, the output valve is defined as battery
Voltage value.Therefore, compared to linear interpolation mode of the prior art, the present invention, which can improve, calculates battery electric quantity value
Accuracy, reduce the error between the calculated value of battery electric quantity and actual value.
3rd embodiment
For ease of preferably implementing the computational methods of terminal battery electricity quantity provided in an embodiment of the present invention, the embodiment of the present invention
A kind of device of the computational methods based on above-mentioned terminal battery electricity quantity is also provided.The wherein implication of noun and above-mentioned end cell electricity
Identical in the computational methods of amount, specific implementation details may be referred to the explanation in embodiment of the method.
Fig. 3 a are referred to, Fig. 3 a are that the structure of the computing device for the terminal battery electricity quantity that third embodiment of the invention provides is shown
It is intended to, the device can include:First determining unit 301, acquiring unit 302, call unit 303, and the second determining unit
304。
First determining unit 301, for determining the current voltage value of end cell.
For example in start, the first determining unit 301 obtains the current voltage value of end cell.For example, first determines list
The current voltage value that member 301 gets end cell is 3786mV.
Acquiring unit 302, for obtaining default interpolation knot corresponding with the current voltage value and default interpolation condition.
For example, the magnitude of voltage 3786mV that acquiring unit 302 obtains according to the first determining unit 301, reading one is default
The voltage electricity relation table of battery, and default interpolation knot 3740mV, 3824mV, 3960mV corresponding with 3786mV are got,
And it is respectively 21%, 41%, 61% to preset the corresponding default interpolation condition of interpolation knot with these.
Call unit 303, for calling default parabola interpolation calculation procedure, and it is based on the current voltage value, presets
Interpolation knot and default interpolation condition, the default corresponding output valve of parabola interpolation calculation procedure is calculated.
For example get default interpolation knot corresponding with current voltage value and default interpolation bar in acquiring unit 302
After part, call unit 303 calls default parabola interpolation calculation procedure, and based on the current of the first determining unit 301 acquisition
The default interpolation knot and default interpolation condition that magnitude of voltage, acquiring unit 302 obtain, calculate the default parabola interpolation and calculate
The corresponding output valve of process.
For example, call unit 303 calls default parabola interpolation calculation procedure first, based on default interpolation knot 3740,
3824th, 3960, Lagrangian quadratic interpolation basic function is generated, it is as follows:
Secondly, call unit 303 is based on above-mentioned Lagrangian quadratic interpolation basic function, and default interpolation condition 21%,
41%th, 61%, Lagrangian quadratic interpolation function is generated, it is as follows:
L2' (x)=21l3' (x)+41l4’(x)+61·l5’(x);
Then, call unit 303 calculates the dependent variable of above-mentioned Lagrangian quadratic interpolation function, the wherein Lagrange two
Secondary interpolating function is using current voltage value 3786mV as independent variable.The dependent variable being calculated is L2' (3786)=32.
Finally, the dependent variable 32 is defined as the output valve of default parabola interpolation calculation procedure by call unit 303.
Second determining unit 304, for the output valve to be defined as to the voltage value of end cell.
For example, the output valve 32 of call unit 303 is defined as the current electric quantity of end cell by the second determining unit 304
Value, i.e., voltage value accounts for the 32% of battery total electricity.
Also referring to Fig. 3 b, Fig. 3 b are the another of the computing device for the terminal battery electricity quantity that third embodiment of the invention provides
One structural representation, the device can also include:Setting unit 305, detection control unit 306, and control unit 307.
Setting unit 305, for setting charge value corresponding with the magnitude of voltage of end cell, based on the magnitude of voltage and institute
Charge value is stated, generates voltage electricity mapping table, and the magnitude of voltage is defined as default interpolation knot, by the charge value
It is defined as default interpolation condition.
For example it is 1% that setting unit 305, which sets corresponding with magnitude of voltage 3410mV charge value, with 3568mV pairs of magnitude of voltage
The charge value answered is 5%, and charge value corresponding with magnitude of voltage 3635mV is 9%, and charge value corresponding with magnitude of voltage 3740mV is
21%, charge value corresponding with magnitude of voltage 3824mV is 41%, and charge value corresponding with magnitude of voltage 3960mV is 61%, with voltage
Charge value corresponding to value 4110mV is 81%, and charge value corresponding with magnitude of voltage 4267mV is 100%.
Then, voltage electricity mapping table is generated based on above-mentioned magnitude of voltage and charge value, setting unit 305.In the 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).Above-mentioned magnitude of voltage is defined as pre- by setting unit 305
If interpolation knot, above-mentioned charge value is defined as default interpolation condition.
Based on this, acquiring unit 302 can according to setting unit 305 generate voltage electricity mapping table, obtain with
Interpolation knot and default interpolation condition are preset corresponding to current voltage value.
Detection control unit 306, if for detecting that the error of the voltage value is more than predetermined threshold value, control is eventually
End updates the voltage electricity mapping table.
It is understood that the battery of terminal can be with the elongated and gradual aging of usage time, then the magnitude of voltage of battery
It can also be changed therewith with the corresponding relation of charge value.If so after battery long-time use, terminal is still pressed
According to the voltage electricity mapping table initially set up, default interpolation knot and default interpolation condition are obtained, and it is default based on these
Interpolation knot and default interpolation condition go to calculate the corresponding output valve of default parabola interpolation calculation procedure, and by the output valve
It is defined as the charge value of battery, then the error for the charge value being calculated also can gradually increase.Therefore, terminal can be as needed
The voltage electricity mapping table of battery is updated, makes the error between the calculated value of electricity and the actual charge value of battery
It is smaller.
For example the voltage value that detection control unit 306 can be determined to the second determining unit 304 detects,
Whether the error for detecting the voltage value is more than predetermined threshold value.
If detection control unit 306 detects that the error of the voltage value is more than predetermined threshold value, detection control is single
Member 306 controls terminal to update the voltage electricity mapping table.
If detection control unit 306 detects the error of the voltage value and is not more than predetermined threshold value, terminal can be with
The voltage electricity mapping table need not be updated.
Control unit 307, for updating the voltage electricity mapping table according to prefixed time interval, control terminal.
For example control unit 307 can periodically control terminal to update the voltage electricity mapping table with every month.
It is contemplated that above-mentioned detection control unit 306 and control unit 307, can be with individualism, can also be simultaneously
It is integrated in terminal, this can set as needed.
From the foregoing, the computing device for the terminal battery electricity quantity that the present embodiment provides, by way of parabola interpolation
Carry out the voltage value of computing terminal battery, i.e. terminal obtains the current voltage value of battery first, and according to the current voltage value,
Obtain default interpolation knot corresponding thereto and default interpolation condition.Secondly, terminal call default parabola interpolation calculate into
Journey, and based on the current voltage value got in above-mentioned steps, default interpolation knot and default interpolation condition, inserted with parabola
The mode of value, the default corresponding output valve of parabola interpolation calculation procedure is calculated.Finally, the output valve is defined as battery
Voltage value.Therefore, compared to linear interpolation mode of the prior art, the present invention, which can improve, calculates battery electric quantity value
Accuracy, reduce the error between the calculated value of battery electric quantity and actual value.
For the computing device of the terminal battery electricity quantity of the embodiment of the present invention, its each functional module can be integrated in
In one process chip or modules are individually physically present or two or more modules are integrated in
In one module.Above-mentioned integrated module can both be realized in the form of hardware, software function module can also be used to realize.
If the integrated module is realized in the form of software function module and is used as independent production marketing or in use, can also
It is stored in a computer read/write memory medium, the storage medium is for example read-only storage, disk or CD etc..
The computational methods and device of a kind of terminal battery electricity quantity provided above the embodiment of the present invention have been carried out in detail
Introduce, specific case used herein is set forth to the principle and embodiment of the present invention, the explanation of above example
It is only intended to help the method and its core concept for understanding the present invention;Meanwhile for those skilled in the art, according to the present invention
Thought, there will be changes in specific embodiments and applications, in summary, this specification content should not be understood
For limitation of the present invention.
Claims (3)
1. a kind of computational methods of terminal battery electricity quantity, it is characterised in that methods described includes:
Charge value corresponding with the magnitude of voltage of end cell is set;
Based on the magnitude of voltage and the charge value, voltage electricity mapping table is generated, and the magnitude of voltage is defined as pre-
If interpolation knot, the charge value is defined as default interpolation condition;
Determine the current voltage value of end cell;
According to the voltage electricity mapping table, obtain default interpolation knot corresponding with the current voltage value and preset and insert
Value condition, according to different magnitudes of voltage, the default interpolation knot got and default interpolation condition are different;
Default parabola interpolation calculation procedure is called, based on the default interpolation knot, generates Lagrangian quadratic interpolation base letter
Number;
Based on the default interpolation condition and the Lagrangian quadratic interpolation basic function, Lagrangian quadratic interpolation letter is generated
Number;
The dependent variable of the Lagrangian quadratic interpolation function is calculated, wherein the Lagrangian quadratic interpolation function is worked as with described
Preceding magnitude of voltage is independent variable;
The dependent variable is defined as to the output valve of the default parabola interpolation calculation procedure.;
The output valve is defined as to the voltage value of end cell;
If detecting, the error of voltage value is more than predetermined threshold value, control terminal renewal voltage electricity mapping table.
2. a kind of computing device of terminal battery electricity quantity, it is characterised in that described device includes:
Setting unit, for setting charge value corresponding with the magnitude of voltage of end cell, based on the magnitude of voltage and the electricity
Value, voltage electricity mapping table is generated, and the magnitude of voltage is defined as default interpolation knot, the charge value is defined as
Default interpolation condition;
First determining unit, for determining the current voltage value of end cell;
Acquiring unit, according to the voltage electricity mapping table, obtain default interpolation section corresponding with the current voltage value
Point and default interpolation condition, according to different magnitudes of voltage, the default interpolation knot got and default interpolation condition are different;
Call unit, default parabola interpolation calculation procedure is called, it is secondary based on the default interpolation knot, generation Lagrange
Interpolation-Radix-Function;
Based on the default interpolation condition and the Lagrangian quadratic interpolation basic function, Lagrangian quadratic interpolation letter is generated
Number;
The dependent variable of the Lagrangian quadratic interpolation function is calculated, wherein the Lagrangian quadratic interpolation function is worked as with described
Preceding magnitude of voltage is independent variable;
The dependent variable is defined as to the output valve of the default parabola interpolation calculation procedure;
Second determining unit, for the output valve to be defined as to the voltage value of end cell;
Detection control unit, if for detecting that the error of the voltage value is more than predetermined threshold value, control terminal renewal
The voltage electricity mapping table.
3. a kind of storage medium, it is characterised in that the storage medium includes program, and described program is applied to be added by computer
Carry, to perform the computational methods of terminal battery electricity quantity as claimed in claim 1.
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 CN105891722A (en) | 2016-08-24 |
CN105891722B true 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 (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (1)
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 |
-
2016
- 2016-04-06 CN CN201610209240.1A patent/CN105891722B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
---|---|
CN105891722A (en) | 2016-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108475935B (en) | Battery charging management method and terminal | |
CN102298119B (en) | Battery electric quantity display device and method | |
CN107290674A (en) | A kind of calibration method and terminal for showing charge value | |
CN111183561A (en) | Charging control method and device, electronic equipment and computer readable storage medium | |
CN104166505B (en) | A kind of information inspection method, device and mobile terminal | |
CN105472135B (en) | A kind of display methods and device of mobile terminal electricity | |
US9066310B2 (en) | Non-visual representation of a current gauge value of an electronic device on a continuum | |
CN104850398A (en) | Control method for terminal screen | |
US20210099002A1 (en) | Techniques for software implemented gas-gauging | |
CN107359380B (en) | Charging method and device | |
CN105891722B (en) | The computational methods and device of a kind of terminal battery electricity quantity | |
CN103473001B (en) | cell adjusting method and device | |
CN106970328B (en) | SOC estimation method and device | |
CN114264941A (en) | Reclosing leading time determining method and device and relay protection equipment | |
CN117031292A (en) | Battery health state prediction method, device, computer equipment and storage medium | |
CN109643831A (en) | Portable electronic device with addressable charge indicator | |
CN105573746B (en) | A kind of control property processing method and processing device | |
CN103885697A (en) | Page operating system and method | |
CN116187510A (en) | Ammeter box fault prediction method, device, computer equipment and storage medium | |
CN111222248B (en) | Hysteresis determination method and device for piezoceramic actuator | |
CN104270630A (en) | Terminal testing method and terminal | |
CN112117953A (en) | Method for adjusting and driving drive waveform of linear motor and drive control circuit | |
CN112130082A (en) | Method and equipment for calculating battery electric quantity and device with storage function | |
CN112213652A (en) | Method and system for estimating remaining capacity | |
EP4372565A1 (en) | Method and apparatus for displaying charging capacity of battery, and electrical terminal and storage medium |
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 |