CN114429041A - Battery electric quantity calculation method and device, electronic equipment and storage medium - Google Patents

Battery electric quantity calculation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114429041A
CN114429041A CN202210007279.0A CN202210007279A CN114429041A CN 114429041 A CN114429041 A CN 114429041A CN 202210007279 A CN202210007279 A CN 202210007279A CN 114429041 A CN114429041 A CN 114429041A
Authority
CN
China
Prior art keywords
information
power consumption
battery
consumption mode
compensation
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.)
Pending
Application number
CN202210007279.0A
Other languages
Chinese (zh)
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.)
Shenzhen Guanxu Industrial Design Co ltd
Shenzhen Grandsun Electronics Co Ltd
Original Assignee
Shenzhen Guanxu Industrial Design Co ltd
Shenzhen Grandsun Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Guanxu Industrial Design Co ltd, Shenzhen Grandsun Electronics Co Ltd filed Critical Shenzhen Guanxu Industrial Design Co ltd
Priority to CN202210007279.0A priority Critical patent/CN114429041A/en
Publication of CN114429041A publication Critical patent/CN114429041A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/04Ageing analysis or optimisation against ageing

Abstract

The embodiment of the disclosure provides a battery electric quantity calculation method and device, electronic equipment and a storage medium, and relates to the technical field of batteries. The battery electric quantity calculation method comprises the following steps: acquiring measurement voltage information of a battery; obtaining power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode; obtaining first compensation information according to the power consumption mode information; performing first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information; according to the technical scheme, the accuracy of electric quantity calculation can be improved.

Description

Battery electric quantity calculation method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of batteries, in particular to a battery electric quantity calculation method and device, electronic equipment and a storage medium.
Background
With the spread of various mobile devices, batteries have also been widely used. People are very concerned about the remaining battery power of a mobile device when using the device. If the battery power is insufficient, the battery needs to be charged in time so as to avoid delaying use. If the system can accurately display the battery level, the user can accurately know the battery state of the device. The calculation of the battery power is also a technical difficulty in the industry.
The method for calculating the electric quantity of the battery is generally a voltage lookup table method, and the electric quantity of the battery can be calculated through the open-circuit voltage of the battery according to a battery discharge curve, but the accuracy of electric quantity calculation is often low due to inaccuracy of open-circuit voltage measurement in the voltage lookup table method.
Disclosure of Invention
The embodiment of the disclosure mainly aims to provide a method and a device for calculating battery power, an electronic device and a storage medium, which can improve the accuracy of power calculation.
In order to achieve the above object, a first aspect of the embodiments of the present disclosure provides a battery level calculation method, including:
acquiring measurement voltage information of a battery;
obtaining power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode;
obtaining first compensation information according to the power consumption mode information;
performing first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information;
and obtaining battery electric quantity information according to the target voltage information.
In some embodiments, the obtaining power consumption mode information of the battery according to the measured voltage information includes:
acquiring measurement current information of the battery;
obtaining the power consumption information according to the measured current information and the measured voltage information;
and obtaining the power consumption mode information according to the power consumption information and a preset power consumption threshold value.
In some embodiments, the deriving first compensation information from the power consumption mode information includes:
if the power consumption mode information is detected to meet a power consumption increasing condition, calculating to obtain voltage difference information corresponding to the first power consumption mode and the second power consumption mode; the power consumption increasing condition includes: the power consumption mode information at a first time is the first power consumption mode, and the power consumption mode information at a second time is detected to be the second power consumption mode, wherein the first time is less than the second time;
acquiring voltage difference default data;
acquiring historical data of the voltage difference;
and carrying out average calculation processing on the voltage difference information, the voltage difference default data and the voltage difference historical data to obtain the first compensation information.
In some embodiments, the obtaining voltage difference history data comprises:
carrying out initialization detection on the voltage difference historical data to obtain a detection result; the detection result comprises historical data and no historical data;
and if the detection result is the historical data, taking the voltage difference default data as the historical data of the voltage difference.
In some embodiments, the obtaining battery level information according to the target voltage information includes:
acquiring attribute information of the battery;
obtaining an electric quantity calculation comparison table of the battery according to the attribute information;
and matching in the electric quantity calculation comparison table according to the target voltage information to obtain the battery electric quantity information.
In some embodiments, the method further comprises:
acquiring the working time length information of the battery;
obtaining second compensation information according to the working duration information and a preset battery aging compensation rule;
and performing second compensation processing on the measured voltage information according to the second compensation information to obtain the target voltage information.
In some embodiments, the method further comprises:
acquiring real-time temperature information of the battery;
obtaining third compensation information according to the real-time temperature information and a preset temperature compensation rule;
and performing third compensation processing on the measured voltage information according to the third compensation information to obtain the target voltage information.
To achieve the above object, a second aspect of the present disclosure provides a battery level calculation apparatus including:
the voltage measuring module is used for acquiring the measured voltage information of the battery;
the power consumption mode detection module is used for obtaining the power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode;
the first compensation information generation module is used for obtaining first compensation information according to the power consumption mode information;
the voltage compensation module is used for carrying out first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information;
and the electric quantity calculating module is used for obtaining the battery electric quantity information according to the target voltage information.
To achieve the above object, a third aspect of the present disclosure provides an electronic device, including:
at least one memory;
at least one processor;
at least one program;
the program is stored in a memory and a processor executes the at least one program to implement the method of the present disclosure as described in the above first aspect.
To achieve the above object, a fourth aspect of the present disclosure proposes a storage medium that is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform:
the method of the first aspect as described above.
The battery capacity calculation method and device, the electronic device and the storage medium provided by the embodiment of the disclosure can calculate the battery capacity by obtaining the measured voltage information of the battery, then obtaining power consumption mode information of the battery according to the measured voltage information, then obtaining first compensation information according to the power consumption mode information, and the first compensation processing is carried out on the measured voltage information according to the first compensation information to obtain target voltage information, and finally the battery electric quantity information is obtained according to the target voltage information, on a low-cost mobile device without a current meter, the voltage under various scenes is compensated and corrected according to the power consumption mode of the device, the temperature of the battery and the aging data of the battery, more accurate battery voltage is obtained, therefore, the residual electric quantity of the battery is accurately calculated, the service life of the battery is prolonged, and the accuracy of electric quantity calculation is improved.
Drawings
Fig. 1 is a flowchart of a battery power calculation method according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of step S120 in fig. 1.
Fig. 3 is a flowchart of step S130 in fig. 1.
Fig. 4 is a flowchart of step S330 in fig. 3.
Fig. 5 is a flowchart of step S150 in fig. 1.
Fig. 6 is a partial flowchart of a battery power calculation method according to another embodiment of the disclosure.
Fig. 7 is a partial flowchart of a battery power calculation method according to another embodiment of the present disclosure.
Fig. 8 is a block diagram of a battery power calculating device provided in an embodiment of the present disclosure.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present disclosure.
Reference numerals: the power consumption detection circuit comprises a voltage measurement module 810, a power consumption mode detection module 820, a first compensation information generation module 830, a voltage compensation module 840, an electric quantity calculation module 850, a processor 901, a memory 902, an input/output interface 903, a communication interface 904 and a bus 905.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
As various mobile devices have been popularized, batteries have also been widely used. People are very concerned about the remaining battery power of a mobile device when using the device. If the battery power is insufficient, the battery needs to be charged in time so as to avoid delaying use. If the system can accurately display the battery level, the user can accurately know the battery state of the device. The calculation of the battery power is also a technical difficulty in the industry.
The battery capacity is calculated by a voltage look-up table method and an amperometric measurement method. According to the battery discharge curve, the battery electric quantity can be calculated through the battery open-circuit voltage; and the current meter can accurately measure the amount of electricity flowing into or out of the battery.
In the existing internet of things equipment, because of cost limitation, an ammeter cannot be generally equipped, and when the remaining capacity of a battery is calculated, the remaining capacity of the battery can be calculated only according to the voltage of the battery. Due to the fact that power consumption of the device is dynamically changed during operation, the measured voltage deviation of the battery is large under the condition, and the problems that the calculation of the residual electric quantity of the battery is inaccurate and the accuracy is not high exist, so that the accuracy of electric quantity calculation is low.
In addition, the battery level is also affected by battery temperature and battery aging. The temperature rises, and the usable electric quantity of the battery is increased; the temperature is reduced, and the usable electric quantity of the battery is reduced; after the battery ages, the amount of usable power of the battery decreases, which also results in less accurate power calculation.
Based on this, the embodiments of the present disclosure provide a method and an apparatus for calculating battery power, an electronic device, and a storage medium, which are used in a low-cost mobile device without an ammeter, and compensate and correct voltages in various scenes according to a power consumption mode of the device, a battery temperature, and battery aging data, so as to obtain a more accurate battery voltage, thereby accurately calculating the remaining battery power, prolonging the service life of the battery, and improving the accuracy of power calculation.
The embodiment of the disclosure provides a battery power calculation method, which divides a system into a plurality of power consumption modes according to power consumption characteristics of a mobile device in different use scenes, calculates voltage difference values in different power consumption modes by dynamically monitoring voltage, temperature and aging information of a battery, compensates the battery voltage, and calculates the remaining power of the battery. According to the scheme, the data such as the individual use temperature, the accumulated use time length, the power consumption difference and the like of the equipment are considered, the accurate electric quantity is calculated in real time through dynamic monitoring, and the individual difference among the equipment is avoided.
The embodiment of the present disclosure provides a method and an apparatus for calculating battery power, an electronic device, and a storage medium, which are specifically described in the following embodiments, and first, a method for calculating battery power in the embodiment of the present disclosure is described.
The embodiment of the disclosure provides a battery electric quantity calculation method, and relates to the technical field of batteries. The battery power calculation method provided by the embodiment of the disclosure can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, smart watch, or the like; the server can be an independent server, and can also be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and artificial intelligence platform and the like; the software may be an application or the like that implements the battery charge amount calculation method, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiment of the disclosure provides a method for calculating battery power, which includes: acquiring measurement voltage information of a battery; obtaining power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode; obtaining first compensation information according to the power consumption mode information; performing first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information; and obtaining battery electric quantity information according to the target voltage information.
Fig. 1 is an optional flowchart of a method for calculating battery power according to an embodiment of the present disclosure, where the method in fig. 1 may include, but is not limited to, step S110 to step S120, and specifically includes:
s110, acquiring the measured voltage information of the battery;
s120, obtaining power consumption mode information of the battery according to the measured voltage information;
s130, obtaining first compensation information according to the power consumption mode information;
s140, performing first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information;
and S150, obtaining battery power information according to the target voltage information.
In step S110, the measured voltage information of the battery is read through an Analog-to-Digital Converter (ADC).
In step S120, the power consumption mode information includes a first power consumption mode and a second power consumption mode, where in general, the battery power consumption in the first power consumption mode is smaller than the battery power consumption in the second power consumption mode, and specifically, if the first power consumption mode is the low power consumption mode, the second power consumption mode is the medium power consumption mode or the high power consumption mode; if the first power consumption mode is the medium power consumption mode, the second power consumption mode is the high power consumption mode; the division rule and the division quantity of the power consumption mode can be self-defined and adjusted according to the actual situation.
In steps S130 to S140, the first compensation information is compensation of a voltage value according to a change in the power consumption mode.
In a specific embodiment, the device is divided into a plurality of modes, such as a low power consumption mode, a medium power consumption mode, and a high power consumption mode, in the low power consumption mode, the system power consumption is very low, and the current output by the battery is small, so the voltage drop on the battery is small; in the medium power consumption mode, the system power consumption is increased, the current output by the battery is increased, and the voltage drop on the battery is large due to the influence of the board-level line resistance and the internal resistance of the battery; in the high power consumption mode, the system power consumption is very high, and the current output by the battery is the largest, so the voltage drop on the battery is the largest.
If the voltage drop of the battery is very small, the battery voltage read by the system under the condition is very close to the open-circuit voltage of the battery, and the residual capacity of the battery can be calculated according to a battery discharge curve. However, in the high power consumption mode, the voltage drop across the battery is large, the difference between the battery voltage read by the system and the open-circuit voltage of the battery is large, and the remaining battery capacity cannot be directly calculated according to a battery discharge curve.
In step S150, the target voltage information is a voltage value after the first compensation process, and the battery capacity information is a battery remaining capacity calculated according to the compensated voltage value.
According to the method for calculating the battery power, the measurement voltage information of the battery is obtained, the power consumption mode information of the battery is obtained according to the measurement voltage information, the first compensation information is obtained according to the power consumption mode information, the first compensation processing is carried out on the measurement voltage information according to the first compensation information, the target voltage information is obtained, and the battery power information is obtained according to the target voltage information.
In some embodiments, deriving power consumption mode information of the battery from the measured voltage information includes: acquiring measurement current information of a battery; obtaining power consumption information according to the measured current information and the measured voltage information; and obtaining power consumption mode information according to the power consumption information and a preset power consumption threshold value.
Fig. 2 is a flow chart of step S120 in some embodiments, and step S120 illustrated in fig. 2 includes, but is not limited to, steps S210 to S230:
s210, obtaining the measurement current information of the battery;
s220, obtaining power consumption information according to the measured current information and the measured voltage information;
and S230, obtaining power consumption mode information according to the power consumption information and a preset power consumption threshold value.
In step S210, current information, that is, a measured current value at the time of battery operation, is measured.
In step S220, the power consumption information is power consumption when the battery operates, specifically, a value of the power consumption information is a product of measured current information and a measured voltage information value.
In step S230, the power consumption threshold is a threshold for determining which power consumption mode the power consumption belongs to, such as when the power consumption information is greater than the power consumption threshold (10mw), the power consumption mode in which the battery is in is the high power consumption mode.
In some embodiments, deriving the first compensation information from the power consumption mode information comprises: if the power consumption mode information is detected to meet the power consumption increasing condition, calculating to obtain voltage difference information corresponding to the first power consumption mode and the second power consumption mode; the power consumption increasing condition includes: the power consumption mode information of the first time is a first power consumption mode, the power consumption mode information of the second time is detected to be a second power consumption mode, and the first time is less than the second time; acquiring voltage difference default data; acquiring historical data of the voltage difference; and carrying out average calculation processing on the voltage difference information, the voltage difference default data and the voltage difference historical data to obtain first compensation information.
Fig. 3 is a flowchart of step S130 in some embodiments, and step S130 illustrated in fig. 3 includes, but is not limited to, step S310 to step S340:
s310, if the power consumption mode information is detected to meet the power consumption increasing condition, calculating to obtain voltage difference information corresponding to the first power consumption mode and the second power consumption mode;
s320, acquiring voltage difference default data;
s330, acquiring voltage difference historical data;
and S340, carrying out average calculation processing on the voltage difference information, the voltage difference default data and the voltage difference historical data to obtain first compensation information.
In step S310, the power consumption increasing condition includes: the power consumption mode information of the first time is the first power consumption mode, the power consumption mode information of the second time is detected to be the second power consumption mode, and the first time is smaller than the second time. The first time is the previous time of the time of collecting the battery power, the second time is the time of collecting the battery power, namely, the power consumption mode of the battery at the moment is compared with the power consumption mode of the battery at the previous time, if the power consumption is found to be increased, the first compensation processing is carried out on the flow measurement voltage information according to the voltage difference between the two modes, and therefore the electric quantity calculation is more accurate.
It should be noted that, when the power consumption is changed from high to low, an average calculation is required, and when the power consumption is changed from high to low, the average calculation is not required, but the voltage value in the self mode needs to be recorded for calculating the voltage difference as the voltage difference history data.
In step S320, the default data is the theoretical voltage difference calculated in the early stage test process in the two modes, and the real-time measured voltage difference is averaged according to the theoretical voltage difference, so as to compensate for the inaccuracy of the real-time measured data. In addition, when the system has just started to operate without history data, the default data may be used as an initial value of the history data calculated for the first time.
In step S330, the historical data is data obtained by recording historical voltage difference data of the device, and the real-time measured voltage difference is averaged according to the historical data, so as to compensate for inaccuracy of the real-time measured data.
In step S340, the average calculation process includes, but is not limited to, direct averaging, weighted averaging by configuring a weighting coefficient for each term, and the like.
In a specific embodiment, the voltage difference between the high power mode and the low power mode is generally in the range of 200mv-400 mv.
In some embodiments, obtaining voltage difference history data comprises: carrying out initialization detection on the voltage difference historical data to obtain a detection result; the detection result comprises historical data and no historical data; and if the detection result is no history data, the voltage difference default data is used as voltage difference history data.
Fig. 4 is a flowchart of step S330 in some embodiments, and step S330 illustrated in fig. 4 includes, but is not limited to, step S410 to step S430:
s410, performing initialization detection on the voltage difference historical data to obtain a detection result;
and S420, if the detection result is no history data, using the voltage difference default data as the voltage difference history data.
In step S410, the history data is data in which the history voltage difference data of the own device is recorded, and the detection result includes history data and no history data.
In step S420, when the system has just started to operate without history data, the default data may also be used as an initial value of the history data calculated for the first time.
In some embodiments, obtaining battery charge information from the target voltage information includes: acquiring attribute information of a battery; obtaining a battery electric quantity calculation comparison table according to the attribute information; and matching in the electric quantity calculation comparison table according to the target voltage information to obtain the battery electric quantity information.
Fig. 5 is a flow chart of step S150 in some embodiments, and step S150 illustrated in fig. 5 includes, but is not limited to, step S510 to step S530:
s510, acquiring attribute information of the battery;
s520, obtaining an electric quantity calculation comparison table of the battery according to the attribute information;
and S530, matching in the electric quantity calculation comparison table according to the target voltage information to obtain the battery electric quantity information.
In step S510, the attribute information of the battery includes, but is not limited to, the type and capacity of the battery.
In step S520, the electric quantity calculation comparison table is used to represent electric quantity calculation rules corresponding to different batteries, and different electric quantity calculation comparison tables are matched with different batteries according to the different batteries, so as to make an individualized electric quantity calculation scheme for a specific battery.
In step S530, the calculation method of the electric quantity includes, but is not limited to, a table look-up method, and specifically, the target voltage information after compensation is matched in the electric quantity calculation look-up table, and the battery electric quantity information corresponding to the target voltage information is matched.
In some embodiments, the method further comprises: acquiring the working time length information of the battery; obtaining second compensation information according to the working duration information and a preset battery aging compensation rule; and carrying out second compensation processing on the measured voltage information according to the second compensation information to obtain target voltage information.
As shown in fig. 6, fig. 6 is a flowchart of a battery power calculation method according to another embodiment, where the battery power calculation method further includes:
s610, acquiring the working time length information of the battery;
s620, obtaining second compensation information according to the working duration information and a preset battery aging compensation rule;
and S630, performing second compensation processing on the measured voltage information according to the second compensation information to obtain target voltage information.
In step S610, the operating time information of the battery is the accumulated service time of the battery from factory to test time, and the accumulated service time represents the aging degree of the battery.
In steps S620 to S630, the preset battery aging compensation rule is a corresponding relationship between the operating duration information and the second compensation information to be compensated, specifically, if the operating duration information is within 6 months, the total battery capacity is 100% of the factory total capacity, and the corresponding second compensation information is 0 at this time; if the working duration information is 6 months to 2 years, the total capacity of the battery is 90% of the factory total capacity, and the corresponding second compensation information is 10% of the target voltage information; if the working duration information is 2 years to 3 years, the total capacity of the battery is 80% of the factory total capacity, and the corresponding second compensation information is 20% of the target voltage information; if the working duration information is 3 years, the total capacity of the battery is 75% of the factory total capacity, and the corresponding second compensation information is 25% of the target voltage information.
In some embodiments, the method further comprises: acquiring real-time temperature information of a battery; obtaining third compensation information according to the real-time temperature information and a preset temperature compensation rule; and performing third compensation processing on the measured voltage information according to the third compensation information to obtain target voltage information.
As shown in fig. 7, fig. 7 is a flowchart of a battery power calculation method according to another embodiment, where the battery power calculation method further includes:
s710, acquiring real-time temperature information of the battery;
s720, obtaining third compensation information according to the real-time temperature information and a preset temperature compensation rule;
and S730, performing third compensation processing on the measured voltage information according to the third compensation information to obtain target voltage information.
In step S710, the real-time temperature information is the measured temperature of the battery, and specifically, the real-time temperature information of the battery is read through an Analog-to-Digital Converter (ADC).
In steps S720 to S730, the preset temperature compensation rule is a corresponding relationship between the temperature and the third compensation information to be compensated, specifically, 25 degrees celsius is a normal temperature for the battery to work, and if the battery works in a range from 0 degree celsius to 40 degrees celsius, the third compensation information is 0; if the battery works below 0 ℃, the third compensation information is 10% of the target voltage information; if the battery works above 40 ℃, the third compensation information is 20% of the target voltage information.
The battery charge calculation method is described in detail below in a specific embodiment. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting.
In a specific embodiment, the battery power calculation method is applied to a battery system, and the battery system includes a battery module, a mode conversion module, a processor module, other load modules, a software initialization module, a monitoring module, a mode switching monitoring module, a power compensation algorithm module, an end module, and the like.
The battery module is responsible for supplying power to the whole system; the processor module is used for reading the voltage and the temperature of the battery through the ADC module, then executing a software algorithm according to the running state and the use scene of the system in combination with the temperature and the aging information, and calculating the residual electric quantity of the battery; other load modules in the system are used to implement other device functions.
The system reads the accumulated service time from the memory to calculate the aging information of the battery, and reads the temperature and the voltage of the battery to calculate the initial electric quantity of the battery; the monitoring module is used for periodically reading the temperature and the voltage of the battery, calculating the accumulated running time and then calculating and displaying the residual electric quantity of the battery; the mode switching monitoring module is used for triggering one-time mode switching; the electric quantity compensation algorithm module is used for executing a software algorithm to compensate the electric quantity of the battery after the operation mode of the system is changed; the end module is used for storing the battery aging information into the storage device when the system is shut down.
The embodiment of the present disclosure provides a battery power calculating apparatus, including:
the voltage measuring module is used for acquiring the measured voltage information of the battery;
the power consumption mode detection module is used for obtaining power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode;
the first compensation information generation module is used for obtaining first compensation information according to the power consumption mode information;
the voltage compensation module is used for carrying out first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information;
and the electric quantity calculating module is used for obtaining the battery electric quantity information according to the target voltage information.
Referring to fig. 8, fig. 8 illustrates a battery power calculating apparatus according to an embodiment, the battery power calculating apparatus includes: the voltage compensation device comprises a voltage measurement module 810, a power consumption mode detection module 820, a first compensation information generation module 830, a voltage compensation module 840 and an electric quantity calculation module 850, wherein the voltage measurement module 810 is connected with the power consumption mode detection module 820, the power consumption mode detection module 820 is connected with the first compensation information generation module 830, the first compensation information generation module 830 is connected with the voltage compensation module 840, and the voltage compensation module 840 is connected with the electric quantity calculation module 850.
Specifically, the voltage measuring module 810 is configured to obtain measured voltage information of the battery; a power consumption mode detection module 820, configured to obtain power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode; a first compensation information generating module 830, configured to obtain first compensation information according to the power consumption mode information; the voltage compensation module 840 is configured to perform first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information; and an electric quantity calculating module 850, configured to obtain battery electric quantity information according to the target voltage information.
The specific implementation of the battery power calculating apparatus of the present embodiment is substantially the same as the specific implementation of the battery power calculating method, and belongs to the same inventive concept, and is not described herein again.
An embodiment of the present disclosure further provides an electronic device, including:
at least one memory;
at least one processor;
at least one program;
the programs are stored in the memory, and the processor executes the at least one program to implement the present disclosure to implement the battery level calculation method described above. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA for short), a vehicle-mounted computer and the like.
Referring to fig. 9, fig. 9 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 901 may be implemented by a general-purpose CPU (central processing unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute a relevant program to implement the technical solution provided by the embodiment of the present disclosure;
the memory 902 may be implemented in a form of a ROM (read only memory), a static storage device, a dynamic storage device, or a RAM (random access memory). The memory 902 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present disclosure is implemented by software or firmware, the relevant program codes are stored in the memory 902 and called by the processor 901 to execute the battery power calculation method according to the embodiments of the present disclosure;
an input/output interface 903 for implementing information input and output;
a communication interface 904, configured to implement communication interaction between the device and another device, where communication may be implemented in a wired manner (e.g., USB, network cable, etc.), or in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.); and
a bus 905 that transfers information between various components of the device (e.g., the processor 901, the memory 902, the input/output interface 903, and the communication interface 904);
wherein the processor 901, the memory 902, the input/output interface 903 and the communication interface 904 are communicatively connected to each other within the device via a bus 905.
The embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used for causing a computer to execute the above battery power calculating method.
The battery capacity calculation method and device, the electronic device and the storage medium provided by the embodiment of the disclosure can calculate the battery capacity by obtaining the measured voltage information of the battery, then obtaining power consumption mode information of the battery according to the measured voltage information, then obtaining first compensation information according to the power consumption mode information, and the first compensation processing is carried out on the measured voltage information according to the first compensation information to obtain target voltage information, and finally the battery electric quantity information is obtained according to the target voltage information, on a low-cost mobile device without a current meter, the voltage under various scenes is compensated and corrected according to the power consumption mode of the device, the temperature of the battery and the aging data of the battery, more accurate battery voltage is obtained, therefore, the residual electric quantity of the battery is accurately calculated, the service life of the battery is prolonged, and the accuracy of electric quantity calculation is improved.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present disclosure are for more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation to the technical solutions provided in the embodiments of the present disclosure, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present disclosure are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
It will be appreciated by those skilled in the art that the solutions shown in fig. 1-7 are not intended to limit the embodiments of the present disclosure, and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, and therefore do not limit the scope of the claims of the embodiments of the present disclosure. Any modifications, equivalents and improvements within the scope and spirit of the embodiments of the present disclosure should be considered within the scope of the claims of the embodiments of the present disclosure by those skilled in the art.

Claims (10)

1. A battery power calculation method, comprising:
acquiring measurement voltage information of a battery;
obtaining power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode;
obtaining first compensation information according to the power consumption mode information;
performing first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information;
and obtaining battery electric quantity information according to the target voltage information.
2. The method of claim 1, wherein the deriving power consumption mode information of the battery from the measured voltage information comprises:
acquiring measurement current information of the battery;
obtaining the power consumption information according to the measured current information and the measured voltage information;
and obtaining the power consumption mode information according to the power consumption information and a preset power consumption threshold value.
3. The method of claim 1, wherein the deriving first compensation information according to the power consumption mode information comprises:
if the power consumption mode information is detected to meet a power consumption increasing condition, calculating to obtain voltage difference information corresponding to the first power consumption mode and the second power consumption mode; the power consumption increasing condition includes: the power consumption mode information at a first time is the first power consumption mode, and the power consumption mode information at a second time is detected to be the second power consumption mode, wherein the first time is less than the second time;
acquiring voltage difference default data;
acquiring historical data of voltage difference;
and carrying out average calculation processing on the voltage difference information, the voltage difference default data and the voltage difference historical data to obtain the first compensation information.
4. The method of claim 3, wherein obtaining voltage difference history data comprises:
carrying out initialization detection on the voltage difference historical data to obtain a detection result; the detection result comprises historical data and no historical data;
and if the detection result is the historical data, taking the voltage difference default data as the historical data of the voltage difference.
5. The method of claim 1, wherein obtaining battery charge information from the target voltage information comprises:
acquiring attribute information of the battery;
obtaining an electric quantity calculation comparison table of the battery according to the attribute information;
and matching in the electric quantity calculation comparison table according to the target voltage information to obtain the battery electric quantity information.
6. The method according to any one of claims 1 to 5, further comprising:
acquiring the working time length information of the battery;
obtaining second compensation information according to the working duration information and a preset battery aging compensation rule;
and performing second compensation processing on the measured voltage information according to the second compensation information to obtain the target voltage information.
7. The method according to any one of claims 1 to 5, further comprising:
acquiring real-time temperature information of the battery;
obtaining third compensation information according to the real-time temperature information and a preset temperature compensation rule;
and performing third compensation processing on the measured voltage information according to the third compensation information to obtain the target voltage information.
8. A battery level calculating device, comprising:
the voltage measuring module is used for acquiring the measured voltage information of the battery;
the power consumption mode detection module is used for obtaining the power consumption mode information of the battery according to the measured voltage information; the power consumption mode information comprises a first power consumption mode and a second power consumption mode;
the first compensation information generation module is used for obtaining first compensation information according to the power consumption mode information;
the voltage compensation module is used for carrying out first compensation processing on the measured voltage information according to the first compensation information to obtain target voltage information;
and the electric quantity calculating module is used for obtaining the battery electric quantity information according to the target voltage information.
9. An electronic device, comprising:
at least one memory;
at least one processor;
at least one program;
the programs are stored in a memory, and a processor executes the at least one program to implement:
the method of any one of claims 1 to 7.
10. A storage medium that is a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform:
the method of any one of claims 1 to 7.
CN202210007279.0A 2022-01-05 2022-01-05 Battery electric quantity calculation method and device, electronic equipment and storage medium Pending CN114429041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210007279.0A CN114429041A (en) 2022-01-05 2022-01-05 Battery electric quantity calculation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210007279.0A CN114429041A (en) 2022-01-05 2022-01-05 Battery electric quantity calculation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114429041A true CN114429041A (en) 2022-05-03

Family

ID=81311923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210007279.0A Pending CN114429041A (en) 2022-01-05 2022-01-05 Battery electric quantity calculation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114429041A (en)

Similar Documents

Publication Publication Date Title
US6388450B2 (en) Method for determining the state of charge of storage batteries
TWI426288B (en) Method for estimating battery degradation
US10001528B1 (en) Battery deterioration degree estimating apparatus and estimating method
US8234087B2 (en) Apparatus and method for detecting a status of a secondary battery connected to a load
US8643331B1 (en) Enhanced voltage-based fuel gauges and methods
TWI420126B (en) Device for battery capacity prediction and method for the same
CN102739845B (en) Electronic device capable of detecting battery power and battery power detection method
KR20140106436A (en) Battery state of charge tracking, equivalent circuit selection and benchmarking
US20120323512A1 (en) Battery Charge Determination
KR20190027609A (en) Apparatus and method for estimating state of charge for battery and method thereof
CN110888065B (en) Battery pack state of charge correction method and device
JP2011220900A (en) Battery deterioration estimation method, battery capacity estimation method, battery capacity equalization method and battery deterioration estimation device
CN102914744B (en) Mobile terminal, battery power display system of mobile terminal, and method for acquiring battery power
CN102918409B (en) The method of the dump energy of the battery of estimation mancarried device
CN111983495A (en) Battery pack health degree determination method and related device
JP2012185124A (en) State-of-charge estimation device, state-of-charge estimation method, and program
JP5960017B2 (en) Battery deterioration determination device, resistance value calculation device, battery deterioration determination method, and program
US10578675B2 (en) Estimation method for battery capacity
TWI528043B (en) Battery SOC/SOH estimation circuit
US20170261561A1 (en) Device and method for computing residual capacity of cell, and recording medium
CN115107566A (en) Method and device for calculating driving range of vehicle, vehicle and storage medium
JP2023101509A (en) Semiconductor device and method for detecting remaining amount of battery
CN114429041A (en) Battery electric quantity calculation method and device, electronic equipment and storage medium
CN116298927B (en) Battery capacity estimation method and device, computer equipment and storage medium
US11035902B2 (en) Advanced fuel gauge

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination