Summary of the invention
In order to overcome the above problems, provide a kind of method of remaining battery time and volume calculation.
The evaluation method that the invention discloses a kind of remaining battery time, comprising:
S1. read battery with reference to curve, described is to generate according to the nominal capacity of battery with reference to curve initial;
S2. obtain current battery parameter, described parameter comprises: current voltage, current electric current, discharge time;
S3. judge that battery status is floating charge and discharge or all fills, if floating charge enters step S4; If electric discharge, enters step S5; If all fill, enter step S6;
T remaining time while S4. calculating floating charge:
Remaining time T=Tz,
Wherein, Tz is with reference to Curves time cumulative sum a little;
Ta remaining time while S5. calculating electric discharge is:
When voltage changes:
Ta=Ix×Tx×Ty,
Wherein, Ix be using described with reference to curve average current/current electric current as load factor, Tx is usingd current electric discharge duration/with reference to the electric discharge duration of curve point from ceiling voltage to current voltage as time coefficient, Ty be calculate described with reference to curve below current voltage point partly time cumulative sum a little;
When voltage does not change:
Tn=Tn-1-ΔT*K,
Wherein, Δ T is the current voltage duration, and K is range of decrease coefficient; N is each acquisition time, is positive integer;
S51 judges whether to stop electric discharge, if not, returns to step S2, if so, enters step S52;
S52. by current effective discharge curve section, upgrade reference curve corresponding voltage section;
S6. calculate the remaining time while all filling:
If the remaining battery time is less than the cumulative time with reference to curve calculating, Tb remaining time calculating while all filling is:
T
k=T
k-1+I*ΔT/Iz,
Wherein: I is current electric current, the current current charges cumulative time of Δ T, Iz is the average current with reference to curve, and k is each acquisition time, is positive integer;
If the remaining battery time is not less than the cumulative time with reference to curve calculating, T remaining time while calculating electric discharge
kfor the cumulative time with reference to curve calculating.
It should be noted that, the present invention calculates the next round circulation of remaining battery time again from step S2.
In the method for remaining battery time estimation of the present invention, between described step S2 and S3, also comprise step S21, according to described current voltage, current electric current and duration generate current discharge curve.
In the method for remaining battery time estimation of the present invention, described step S21 comprises and carries out denoising, finds out effective voltage curved section.
In the method for remaining battery time estimation of the present invention, after described step S5, also comprise step S51, while being judged as unsaturated electric discharge, need not upgrade reference curve by current discharge curve.
A kind of method that the invention discloses battery remaining power estimation, the residual capacity for estimating battery, comprising:
A1. read battery with reference to curve, described is to generate according to the nominal capacity of battery with reference to curve;
A2. obtain current battery parameter, described parameter comprises: current voltage, current electric current, discharge time;
A3. judge that battery status is floating charge and discharge or all fills; If floating charge, enters steps A 4; If electric discharge, enters steps A 5; If all fill, enter steps A 6;
While A4. calculating floating charge, residual capacity M1 is:
M1=∑In×Tn,
Wherein, In is described with reference to the electric current recording in curve; Tn is described with reference to the time of recording in curve; N is each acquisition time, is positive integer.
While A5. calculating electric discharge, residual capacity M2 is:
If voltage changes, the capacity of the following curved portion of current voltage point position m in computing reference curve:
M2=∑Im×Tm,
Wherein, Im is the described electric current with reference to the following curved section record of current voltage point in curve; Tm is the described time with reference to the following curved section record of current voltage point in curve; M is each acquisition time, is positive integer.
According to the difference amplitude of current residual capacity M and M2, adjust residual capacity range of decrease COEFFICIENT K c
If voltage does not change: M2=M-I * Δ T*Kc,
Wherein, M is current residual capacity, and I is current electric current; The time that Δ T current voltage is lasting; Kc is capacity range of decrease coefficient;
Whether A51 judgement electric discharge stops, and if not, returns to steps A 2, if so, enters steps A 52;
A52. by current effective discharge curve section, upgrade reference curve corresponding voltage section;
A6. calculating residual capacity M3 while all filling is:
If be no more than the electric current of all electrical voltage points and the integration of time of described reference curve:
M3=K+∑Is×Ts,
Wherein, K is the residual capacity of electric discharge last moment, and Is is current charging current, and Ts is the current charging interval;
If surpass the electric current of all electrical voltage points and the integration of time of the reference curve of stating, M3 is the described total capacity with reference to curve.
It should be noted that, the present invention calculates the circulation of next round battery capacity again from steps A 2.
In the method for battery remaining power of the present invention estimation, during described electric discharge, residual capacity M2 also comprises denoising step, specifically:
When occurring that residual capacity is less than next electrical voltage point and estimates the capability value drawing by algorithm, adjust the range of decrease of current residual capacity, negligent decrease speed;
When occurring that residual capacity is far longer than next electrical voltage point and estimates the capability value drawing by algorithm, adjust the range of decrease of current residual capacity, make to accelerate decrease speed.
Through practice, confirm, utilize the experimental result of this method to be:
Remaining time:
200-199-198-197--...172-170-169-168--...151-150-149--148-150--149-148-147--...102--101-100-99--...82-81-80-79-78--... 3-2-1--0 (minute)
Residual capacity:
120-119-117--116--...--102.3-101.9-101.5-101.1-100.8-100.6-100.3-99.7-99.2-98.6-...92.2-91.5-90.4-89.6--...-81-80-78-77--76-75-74--...--61--60--59--...--51--50-49......3-2-1-0(AH)
Method and the device of implementing a kind of remaining battery time of the present invention and volume calculation, have following useful technique effect:
Estimate that result and residual capacity result are coherent remaining time, precision is higher, when guaranteeing availability, has greatly increased user's experience.
Embodiment
By describing technology contents of the present invention, structural feature in detail, being realized object and effect, below in conjunction with execution mode and coordinate accompanying drawing to be explained in detail.
A kind of method that refers to Fig. 1, remaining battery time estimation, comprising:
S1. read battery with reference to curve
If without with reference to curve, generate initial cells reference curve according to the nominal capacity of battery;
S2. obtain current battery parameter, described parameter comprises: current voltage, current electric current, discharge time
Battery is a general designation herein, can refer to a batteries, a Battery pack or batteries in parallel connection group.
Battery discharge status: when battery connects power consumption equipment, in the situation that not having other power supplys to power to power consumption equipment (such as mains failure), the battery power supply to the device of discharging, makes the normal continuous running of equipment, now claims that battery status is discharge condition.
Battery current: use the measuring instrument (the Hall element YDG-HSD-4-30A reaching as refined) of electric current, powered battery circuit is measured, can effectively collect the current value of battery pack.If under battery discharge status, the current value of collection is for just, and battery all fills under state, and the current value of collection is for negative, otherwise contrary.When battery is under floating charge state, the current value of collection can be hovered between ± 3A (adjusting this parameter according to certainty of measurement or battery capacity).
Discharging current feature: the electric current under battery discharge status, be called discharging current, discharging current is different and different according to the power of power consumption equipment, generally, the power of power consumption equipment is constant, so battery is in single step of releasing electric process, electric current is also generally constant, and amplitude of variation is very little.
Discharge voltage feature: the voltage under battery discharge status, be called discharge voltage, discharge voltage is along with the consumption meeting slow decreasing of battery electric quantity.When voltage drop is to a certain extent time (as 40V), will not drive equipment normal operation (possible damage equipment).Battery discharge is excessively dark, and charging is difficult to return to the front level of electric discharge, will greatly reduce the useful life of battery.
Battery discharge curve: battery discharge curve changes precision with total voltage and records, when changing precision, total voltage surpasses 0.1V (capable of regulating), record current voltage, electric current, and the time interval of this electrical voltage point and last electrical voltage point (being the lasting time of last electrical voltage point).
With reference to curve: the remaining time of battery and the foundation of Residual capacity prediction are that to take the curve of history electric discharge be reference, and we cry its battery with reference to curve, and abbreviation is with reference to curve.
With reference to curve, have self-learning function, after discharge, first program analyzes effective voltage curved section at every turn, replaces the voltage section with reference to correspondence in curve, after renewal with reference to curve as the basis for forecasting of battery discharge next time.
S21, according to described current voltage, electric current, the time generates current discharge curve;
The unsaturated electric discharge of battery: if battery just discharges, enter the state that all fills, under the state of battery underfill, discharge again, claim this time electric discharge for unsaturated electric discharge.
Unsaturated electric discharge is very large on the estimation impact of battery, is now difficult to reference to curve, do Accurate Prediction with reference to what discharged under saturation condition last time.After having discharged, if the curve of this unsaturated electric discharge is updated to reference to curve, also the estimation of electric discharge next time will be had influence on.Therefore in algorithm, add:
(1) time conversion factor, processes by voltage in this discharge process, duration and with reference to the voltage in curve, duration, draws a time conversion factor, makes estimation be tending towards accurate.
(2) judge the whether unsaturated electric discharge of battery, do different disposal, if unsaturated electric discharge is not updated to reference in curve, otherwise be updated to reference in curve.
S3. judge that battery status is floating charge and discharge or all fills, if floating charge enters step S4, if electric discharge enters step S5; If all fill, enter step S6;
Battery all fills state: in battery discharge procedure, when having power supply that other voltages are higher to power consumption equipment power supply (such as the mains supply comes out), battery will no longer discharge, and the power supply that voltage is higher can charge to battery, the now electric current of battery pack and the current opposite in direction under battery discharge status, current value is larger, claims that this state is battery charging state.
Battery float state: battery all fills under state, charged electrical fails to be convened for lack of a quorum with very long the reducing of capacity increase of battery, and after battery is full of, the electric current of battery can be hovered in 0A left and right, with very little current discharge or charging, claims that this state is the floating charge state of battery.
T remaining time while S4. calculating floating charge:
Remaining time T=Tz,
Wherein, Tz is with reference to Curves time cumulative sum a little;
Ta remaining time while S5. calculating electric discharge is:
When voltage changes:
Ta=Ix×Tx×Ty,
Wherein, Ix be using described with reference to curve average current/current electric current as load factor, Tx is usingd current electric discharge duration/with reference to the electric discharge duration of curve point from ceiling voltage to current voltage as time coefficient, Ty be calculate described with reference to curve below current voltage point partly time cumulative sum a little;
When voltage does not change:
Tn=Tn-1-ΔT*K,
Wherein, Δ T is the current voltage duration, and K is range of decrease coefficient; N is each acquisition time, is positive integer;
S51 judges whether to stop electric discharge
If do not stop, entering step S2
If stop electric discharge, analyze current effective discharge curve section, enter step S52;
S52. by current effective discharge curve section, upgrade reference curve corresponding voltage section
Refer to Fig. 2, the G point voltage of battery discharge curve (crest in discharge curve): program reads cell voltage data by the circulation of certain hour interval, the difference of voltage and this voltage reading more last time, if difference voltage becomes positive number from negative, last time voltage is G point voltage.Find after this G point voltage again and the G point voltage comparison of battery with reference to curve, if this discharge voltage is greater than the G point voltage with reference to curve, the G point voltage that the G point voltage of take with reference to curve is this electric discharge.
If continuous, read voltage 3 times by precision and do not occur G point voltage, and be continuous downward trend, getting first point voltage of discharge curve is G point voltage;
If read the G point voltage that voltage > has found, upgrading this voltage is G point voltage.
The D point voltage of battery discharge curve (trough in discharge curve): program reads cell voltage data by the circulation of certain hour interval, the difference of voltage and this voltage reading more last time, find after G point voltage, if last time voltage and this voltage difference became negative from positive number, last time voltage is D point voltage.Find after this D point voltage again and the D point voltage comparison of battery with reference to curve:
If current voltage is less than the D point discharge voltage with reference to curve, the D point voltage that the D point voltage of current discharge curve of take is this electric discharge.
If read the D point voltage that voltage < has found, upgrading this voltage is D point voltage.
Curved section between G point voltage and D point voltage is effective discharge curve section, and G point and D point voltage are the foundations of the effective discharge curve section of judgement, after electric discharge completes, by effective discharge curve section, upgrades curved section corresponding in reference curve.
S6. calculate the remaining time while all filling:
If the remaining battery time is less than the cumulative time with reference to curve calculating, Tb remaining time calculating while all filling is:
T
k=T
K-1+I*ΔT/Iz,
Wherein: I is current electric current, the current current charges cumulative time of Δ T, Iz is the average current with reference to curve, and k is each acquisition time, is positive integer;
If the remaining battery time is not less than the cumulative time with reference to curve calculating, TK remaining time while calculating electric discharge is the cumulative time with reference to curve calculating.
Refer to Fig. 3, a kind of method of battery remaining power estimation, the residual capacity for estimating battery, comprising:
A1. read battery with reference to curve
If without with reference to curve, generate initial cells reference curve according to the nominal capacity of battery;
A2. obtain current battery parameter, described parameter comprises: current voltage, current electric current, discharge time
A3. judge that battery status is floating charge and discharge or all fills; If floating charge, enters steps A 4, if electric discharge enters steps A 5, if all fill, enter steps A 6,
While A4. calculating floating charge, residual capacity M1 is:
M1=∑In×Tn,
Wherein, In is described with reference to the electric current recording in curve; Tn is described with reference to the time of recording in curve; N is each acquisition time, is positive integer.
While A5. calculating electric discharge, residual capacity M2 is:
If voltage changes, the capacity of the following curved portion of current voltage point position m in computing reference curve:
M2=∑Im×Tm;
Wherein, Im is the described electric current with reference to the following curved section record of current voltage point in curve; Tm is the described time with reference to the following curved section record of current voltage point in curve; M is each acquisition time, is positive integer.
According to the difference amplitude of current residual capacity M and M2, adjust residual capacity range of decrease COEFFICIENT K c;
If voltage does not change: M2=M-I * Δ T*Kc,
Wherein, M is current residual capacity, and I is current electric current; The time that Δ T current voltage is lasting; Kc is capacity range of decrease coefficient;
A51 judges whether to stop electric discharge, if not, returns to steps A 2, if so, enters steps A 52;
A52. by current effective discharge curve section, upgrade reference curve corresponding voltage section,
A6. calculating residual capacity M3 while all filling is:
If be no more than the electric current of all electrical voltage points and the integration of time of described reference curve:
M3=K+∑Is×Ts,
Wherein, K is the residual capacity of electric discharge last moment, and Is is current charging current, and Ts is the current charging interval;
If surpass the electric current of all electrical voltage points and the integration of time of the reference curve of stating, M3 is the described total capacity with reference to curve.
In the method for battery remaining power of the present invention estimation, during described electric discharge, residual capacity M2 also comprises denoising step, specifically:
When occurring that residual capacity is less than next electrical voltage point and estimates the capability value drawing by algorithm, adjust the range of decrease of current residual capacity, negligent decrease speed;
When occurring that residual capacity is far longer than next electrical voltage point and estimates the capability value drawing by algorithm, adjust the range of decrease of current residual capacity, make to accelerate decrease speed.
This algorithm is suitable for (but being not limited to) various conventional lead acid accumulators: the estimation of a batteries (free voltage), the remaining time of a Battery pack and volume calculation (joint number arbitrarily).
This algorithm has been done a large amount of evolutions and improvement on the basis of original other algorithms, continuous test and the improvement of a year and a half have been passed through, have essence different from original algorithm, the various burrs that battery predictive the possibility of result is occurred have been done a large amount of denoisings, and these all belong to my creativity and innovation.
This algorithm is verified in the battery applications of the communications field: use 4 joint 12V battery pack, 24 joint 2.2V battery pack, single-unit 12V battery, single-unit 2.2V battery, large capacity batteries in parallel connection group, for battery discharge, all fill with floating charge state and carried out in a large number test repeatedly, and in the situation that load in discharge process is repeatedly changed, carried out test repeatedly in a large number, can effectively address the above problem, and the result of controlled estimation is in certain accuracy rating, when guaranteeing availability, greatly strengthen user's experience.
This algorithm also can be applied in other battery applications occasions, as: 40 joint 12V batteries, 40 joint 6V batteries, the remaining time of situation and the predictions of residual capacity such as 49 joint 2V batteries, the parallel connection of many Battery packs.
When system starts for the first time, can according to battery nominal capacity automatically generate an experience with reference to curve.
After battery has discharged at every turn, this electric discharge of process analysis effectively record is upgraded automatically with reference to curve, with this discharge curve, upgrades the corresponding voltage section curved portion with reference to curve, and we claim that this is the self-learning function with reference to curve.
Renewal with reference to curve has following constraint:
1, the voltage of the current electric discharge efficiency curve record > 10 (can revise) that counts
2, the non-unsaturated electric discharge of battery.
A real discharge curve record (curve A) of program record below, if electric discharge for the first time, it be electric discharge next time with reference to curve:
The calculating of remaining time
1) remaining time during floating charge
According to reference curve data, to the cumulative remaining time as battery discharge of all writing times in reference curve.
2) remaining time while discharging
While 1, discharging, according to current voltage point at the relative position with reference to curved portion, using with reference to curve average current/current electric current as load factor Ix remaining time.Using current electric discharge duration/with reference to the electric discharge duration of curve point from ceiling voltage to current voltage as time coefficient Tx, calculate with reference to curve below current voltage point partly time cumulative sum T a little,
Current residual time=Ix*Tx*T;
For example: suppose that curve A is above with reference to curve, the average current with reference to curve calculating is 25.20A, if during electric discharge, current voltage 49.100V, current electric current 40A, the current duration that discharged is T1, and calculating is T2 with reference to being put into the duration cumulative sum of each electrical voltage point of 49.100V in curve from 52.500V, supposing to calculate duration.
The current residual time (minute)=(25.2/40) * (T1/T2) * (268.0+265.0+260.0)/60,
During electric discharge, when certain electrical voltage point is lasting constant, during current residual time=current residual, m-current voltage is put lasting time * K;
When remaining time, be less than the time value that next electrical voltage point draws by algorithm, will dynamically adjust (reducing) time range of decrease coefficient, avoid the significantly saltus step of remaining time of next electrical voltage point.
The denoising of remaining time:
If there is being less than the time value that next electrical voltage point draws by algorithm in the current residual time, adjust the range of decrease speed of current residual time, as adjust effect and reach with every 5 minutes and decline 1 minute, according to reality, test shows, 2 electrical voltage point estimation duration differ not too large with reality, after processing like this, the decline that the residual time curve drawing can be very level and smooth or the fluctuation of very little floating, otherwise there will be, after certain electrical voltage point decline remaining time is a lot, load is constant, during to next electrical voltage point, suddenly increase a lot remaining time, do not meet convention.
After processing like this, understand at most saltus step remaining time and increase 1,2 minute, then level and smooth decline, estimates that result is more accurate remaining time, greatly strengthens user's experience simultaneously.
3) remaining time while all filling
While all filling, to take remaining time of electric discharge last moment be basic point remaining time, according to current charging interval and current integration/add up with reference to the average current of curve.
Constraint: during charging, can not surpass the time cumulation summation with reference to all electrical voltage points in curve remaining time.
The calculating of residual capacity
1) residual capacity during floating charge
According to reference curve data, to the cumulative electric current of records all in reference curve and the product of time, be the residual capacity of battery.
2) residual capacity while discharging
During electric discharge residual capacity initial value be according to current electric discharge effective voltage point at the relative position with reference to curved portion, calculate with reference to curve below current voltage point part electric current and time product accumulation a little.
For example: suppose that curve A is above with reference to curve, if during electric discharge, current effective voltage point 49.100V, calculating with reference to being put into from 49.000V electric current and the integration of time that between minimum voltage point 48.7.100V, curved portion records in curve is current residual volume calculation value.:
Current residual capacity (AH)=(25.257*265.0+25.241*264.0+25.205*260.0)/3600;
If voltage changes, the capacity of the following curved portion of current voltage point position m in computing reference curve:
Mz=∑Im×Tm,
Wherein, Im is the described electric current with reference to the following curved section record of current voltage point in curve; Tm is the described time with reference to the following curved section record of current voltage point in curve; M is each acquisition time, is positive integer.
According to the difference amplitude of current residual capacity M and Mz, adjust residual capacity range of decrease COEFFICIENT K c
During electric discharge when certain electrical voltage point continues when constant, current residual capacity=current residual capacity-(current voltage is put the lasting current electric current of time *) * Kc;
The denoising of residual capacity:
When occurring that residual capacity is less than next electrical voltage point and estimates the capability value drawing by algorithm, dynamically adjust the range of decrease of (reducing) current residual capacity, negligent decrease speed.
When occurring that residual capacity is far longer than next electrical voltage point and estimates the capability value drawing by algorithm, dynamically adjust the range of decrease of (increase) current residual capacity, make to accelerate decrease speed.
3) residual capacity while charging
During charging, to take the residual capacity of electric discharge last moment be basic point to residual capacity, according to current charging interval and current integration, adds up.
Constraint: in charging process, residual capacity can not surpass with reference to the electric current of all electrical voltage points in curve and the integration of time, otherwise the total capacity of take with reference to curve is current residual capacity.
1, discharge condition judgement:
Battery is defaulted as floating charge state, and program cycle reads voltage, current value, according to the value of electric current, judges whether battery discharges, if electric current <-3A, be judged to be discharge condition, if electric current > is 3A, for all filling state.If be greater than-3A of electric current and be less than 3A,, according to the state judgement of upper primary cell, if be electric discharge last time, this is discharge condition.If last time, this was floating charge state in order all to fill.Program enters corresponding estimation process module according to the state of battery.
2, the calculating of remaining battery time under floating charge state
According to reference curve data, to cumulative predicted value remaining time as next battery discharge all writing times in reference curve.
T=(∑ΔT)/60)
For example: below with reference to curve data, T=remaining time (11+12+10+8)/60 (minute)
[discharge time]
Time1=2008-10-21?15∶10∶39
[battery reference curve record]
2, the calculating of battery remaining power under floating charge state
According to reference curve data, to records all in reference curve, cumulative electric current and the product of time.
C=(∑(I*ΔT))/3600;
For example: below with reference to curve data, current voltage 52.0, residual capacity=(10.1*12+10.2*10+9.9*8)/3600 (AH)
[discharge time]
Time1=2008-10-21?15∶10∶39
[battery reference curve record]
Method and the device of implementing a kind of remaining battery time of the present invention and volume calculation, have following useful technique effect:
Estimate that result and residual capacity result are coherent remaining time, precision is higher, when guaranteeing availability, has greatly increased user's experience.
By reference to the accompanying drawings embodiments of the invention are described above; but the present invention is not limited to above-mentioned embodiment; above-mentioned embodiment is only schematic; rather than restrictive; those of ordinary skill in the art is under enlightenment of the present invention; not departing from the scope situation that aim of the present invention and claim protect, also can make a lot of forms, these all belong to the row of protection scope of the present invention.