Battery display electric quantity correction method and device for tiny bare computer, storage medium and electronic equipment
By setting up multiple modules in a small bare metal, obtaining power evaluation data and electrochemical parameters, and using open-circuit voltage power correspondence meters to correct power, the problems of power management error and power jump in the existing technology are solved, and the accuracy and cost-effectiveness of power management are achieved.
Patent Information
- Application Number
- CN202510231856.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-06
AI Technical Summary
When managing the battery capacity of small bare metals, the existing technology is affected by the diversification of battery types and different electrochemical parameters, resulting in large errors in power management and power jumps, and the purchased power management chip is high and difficult to match.
By setting up the battery internal resistance measurement module, voltage acquisition module, current acquisition module, charge and discharge control module, clock module and storage module in a small bare metal, obtain the power evaluation data and electrochemical parameters, use the open-circuit voltage power correspondence meter to perform power correction, calculate the power offset and real power increment, and adjust the power change to prevent the power jump.
Accurate calculation of the remaining battery power is achieved, preventing battery power jumps, reducing costs, and improving the accuracy of power management.
Smart Images

Figure CN119936679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management, and in particular to a method, device, storage medium and electronic equipment for correcting battery display power of a tiny bare machine. Background Art
[0002] A tiny bare metal usually refers to an electronic device that is small in size and is not equipped with an operating system or other software. Existing ordinary battery devices generally belong to a tiny bare metal. A tiny bare metal has a microcontroller or microprocessor as its core, and has the characteristics of small size, low cost, and low power consumption. In addition, it has no operating system or only has a simple real-time operating system kernel, which takes up few resources and can start and run quickly.
[0003] Furthermore, for a tiny bare machine, it is usually powered by a battery. In the prior art, in order to manage the power of the battery that provides power to the tiny bare machine, a simple voltage matching remaining power method is usually used or a mature battery power management chip purchased from outside is placed inside the tiny bare machine; however, due to the increasing variety of battery types, the electrochemical parameters of the batteries are also different; the tiny bare machine uses the existing voltage matching remaining power method to manage the battery power, which is affected by the internal resistance of the current, resulting in defects such as large errors and power jumps; and if an external power management chip is placed inside the tiny bare machine, the cost will increase, and the external power management chip is difficult to match the battery placed inside the tiny bare machine. Therefore, there is an urgent need for a method that is conducive to accurately calculating the remaining battery power and can prevent power jumps. Summary of the invention
[0004] The purpose of the present invention is to overcome at least one of the shortcomings of the above-mentioned prior art and to provide a battery display power correction method for a tiny bare machine that is conducive to accurately calculating the remaining battery power and can prevent power jumps; in addition, a battery display power correction device for a tiny bare machine, a computer-readable storage medium and an electronic device are also provided.
[0005] The technical solution of the present invention to solve the above technical problems is as follows:
[0006] According to one aspect of the present application, a method for correcting the battery display power of a tiny bare metal is provided. A battery is provided in the tiny bare metal. The method for correcting the battery display power of the tiny bare metal includes:
[0007] According to the power offset degree between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power offset degree, approaching the real power of the battery, obtaining the power offset of the current real power relative to the last displayed power, wherein different power offset degrees correspond to different preset approach correction rates, and the approach correction period is the interval time between two approach corrections;
[0008] Obtaining a real power increment of the battery according to a power increment of the current real power relative to the last real power, wherein the power increment is a positive value when the battery is being charged, and the power increment is a negative value when the battery is being discharged;
[0009] Adding the obtained power offset to the obtained real power increment to obtain the power change of the battery;
[0010] The obtained power change amount is added to the last displayed power amount to obtain the corrected displayed power amount of the battery.
[0011] According to one embodiment of the present invention, the battery display power correction method for a tiny bare machine also includes:
[0012] The current real power is subtracted from the last displayed power to obtain a power deviation value, an absolute value of the power deviation is taken to obtain a power deviation absolute value, a numerical interval is set for a size range of the power deviation absolute value according to a numerical value, a plurality of different power difference intervals are obtained, and for different power difference intervals, an approach correction rate for approaching the real power of the battery corresponding to the power difference interval is respectively preset to obtain the preset approach correction rate;
[0013] The method of approaching the actual power of the battery according to a preset approach correction rate and an approach correction period corresponding to the power offset degree to obtain the power offset of the current actual power relative to the last displayed power includes:
[0014] The electric quantity offset is obtained by calculating the following formula:
[0015] Formula: Power offset = preset approach correction rate * approach correction period.
[0016] According to an embodiment of the present invention, taking the absolute value of the power deviation value to obtain the absolute value of the power deviation, setting a numerical interval for the size range of the absolute value of the power deviation according to the numerical value, obtaining multiple different power difference intervals, and respectively presetting an approach correction rate for approaching the actual power of the battery corresponding to the power difference interval for different power difference intervals, and obtaining the preset approach correction rate, includes:
[0017] When the absolute value of the electric quantity deviation is greater than 0.00001 and less than or equal to 0.01, the approach correction rate is set to 0.01 / 2400S;
[0018] When the absolute value of the electric quantity deviation is greater than 0.01 and less than or equal to 0.03, the approach correction rate is set to 0.01 / 600S;
[0019] When the absolute value of the power deviation is greater than 0.03 and less than or equal to 0.06, the approach correction rate is set to 0.01 / 360S;
[0020] When the absolute value of the power deviation is greater than 0.06, the approach correction rate is set to 0.01 / 180S;
[0021] When the battery is discharged when the actual power level is lower than 40%, or when the battery is charged and the actual power level is higher than 99%, the approach correction rate is increased by 2 times.
[0022] According to one embodiment of the present invention, the battery display power correction method for a tiny bare machine also includes:
[0023] Acquiring battery power evaluation data of the battery, wherein the battery power evaluation data includes discharge current data and battery voltage data;
[0024] Acquiring electrochemical parameters of the battery, wherein the electrochemical parameters include battery internal resistance and maximum charge capacity;
[0025] Obtaining an open circuit voltage-electricity correspondence table, wherein the open circuit voltage-electricity correspondence table records a plurality of open circuit voltage values of the battery and a plurality of remaining electric capacity values corresponding to the plurality of open circuit voltage values;
[0026] Obtaining the open circuit capacity of the battery according to the capacity evaluation data, the electrochemical parameters and the open circuit voltage and capacity correspondence table;
[0027] The open-circuit power is used to perform real-time correction on the current integral to obtain a corrected current integral value, and the corrected current integral value obtained is used as the current real power of the battery.
[0028] According to an embodiment of the present invention, obtaining the open circuit capacity of the battery according to the capacity evaluation data, the electrochemical parameters and the open circuit voltage and capacity correspondence table includes:
[0029] The open circuit voltage is calculated based on the discharge current data, the battery voltage data and the battery internal resistance, wherein the open circuit voltage is calculated using the following formula:
[0030] OpenV = V - inR * I;
[0031] In the formula, V is the battery voltage, inR is the battery internal resistance, and I is the discharge current;
[0032] The obtained open circuit voltage is looked up in the open circuit voltage-electricity correspondence table, and the open circuit voltage is converted into the open circuit electricity corresponding thereto to obtain the open circuit electricity.
[0033] According to one embodiment of the present invention, the battery display power correction method for a tiny bare machine also includes:
[0034] When the difference between the current real power and the open circuit power is greater than 3%, the current real power is reset to the open circuit power;
[0035] When the difference between the open circuit power and the current real power is greater than 20%, the current real power is reset to the open circuit power;
[0036] When the battery is charged, when the open circuit charge is greater than 100% and the current real charge is less than 99%, the current real charge is reset to 99%.
[0037] According to one embodiment of the present invention, the battery display power correction method for a tiny bare machine also includes:
[0038] When the battery is charged and the charging current is less than 6 mA, and the current real power level is greater than or equal to 100%, the current displayed power level is set to 100% for display;
[0039] When the absolute value of the power deviation is greater than 0.2 or the battery is plugged in or out, the power change is adjusted to a single power change of less than or equal to 0.02% per second.
[0040] According to one embodiment of the present invention, the battery display power correction method for a tiny bare machine also includes:
[0041] When charging the battery, the amount of change in the amount of electricity can only increase by no less than a minimum amount of electricity change and no more than 1.1% during the correction period, and the minimum amount of electricity change is 0.00001%;
[0042] When the battery is discharged, the amount of change in the amount of electricity can only be reduced by no less than a minimum amount of electricity change and no more than 1.1% within a correction period, and the minimum amount of electricity change is 0.00001%.
[0043] According to another aspect of the present application, a battery display power correction device for a tiny bare metal is also provided. The battery display power correction device for a tiny bare metal comprises:
[0044] A battery internal resistance measurement module, used to detect and obtain the battery internal resistance of the battery;
[0045] A voltage acquisition module, used for acquiring the voltage of the battery;
[0046] A current collection module, used for collecting the current of the battery;
[0047] A charge and discharge control module, used for controlling the battery to charge and discharge;
[0048] Clock module, used for timing;
[0049] A storage module, used for storing and recording the displayed power, the current real power, the last displayed power and the last real power;
[0050] A power offset acquisition module, used to approach the real power of the battery according to the power offset degree between the current real power of the battery and the last displayed power, and according to a preset approach correction rate and approach correction period corresponding to the power offset degree, to obtain the offset of the current real power relative to the last displayed power;
[0051] A real power increment acquisition module, used to obtain the real power increment of the battery according to the increment of the current real power relative to the last real power;
[0052] A power change acquisition module, used for adding the acquired power offset to the real power increment to obtain the power change of the battery;
[0053] A display power acquisition module is used to add the last displayed power to the power change to obtain a modified displayed power of the battery;
[0054] The display module is used to display the corrected display power.
[0055] According to another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0056] According to another aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0057] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0058] In the embodiment of the present application, according to the degree of power deviation between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power deviation degree, approaching the real power of the battery is performed, which is conducive to reasonably setting the approach correction rate, and can accelerate the approach to the real power of the battery when the power deviation degree is large, and slow down the approach to the real power of the battery when the power deviation degree is small, which is conducive to the displayed power approaching the real power; further, by obtaining the real power increment and the power change amount, and then adding the obtained power change amount to the last displayed power, the corrected displayed power of the battery is obtained, which is conducive to accurately calculating the remaining power of the battery and can prevent power jumps;
[0059] Furthermore, in the embodiment of the present application, the open-circuit power is used to correct the current integral in real time to obtain a corrected current integral value, and the corrected current integral value is used as the current real power of the battery, which is conducive to improving the accuracy of the real power estimation, avoiding the adverse effects of complex factors such as self-discharge and polarization inside the battery on the accuracy of the current real power estimation, so that the final corrected current integral value is closer to the actual power of the battery;
[0060] Furthermore, in the embodiment of the present application, when the difference between the current real power and the open-circuit power is greater than 3%, the current real power is reset to the open-circuit power, which is beneficial to ensure that the battery power is not falsely high;
[0061] Furthermore, in the embodiment of the present application, when the difference between the open-circuit power and the current real power is greater than 20%, the current real power is reset to the open-circuit power, which is helpful to indicate the replacement of the battery and prevent errors in the power.
[0062] Furthermore, in the embodiment of the present application, when the battery is charged, when the open circuit power is greater than 100% and the current actual power is less than 99%, the current actual power is reset to 99%, which helps prevent the displayed power from being less than 100% for a long time. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0064] Figure 1 It is a flow chart of a battery display power correction method for a tiny bare machine in an embodiment of the present invention;
[0065] Figure 2 A battery charge and power change curve diagram of charging and discharging a battery in an embodiment of the present invention;
[0066] Figure 3 The structure block diagram of the battery display power correction device for a tiny bare machine in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0068] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0069] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0070] This embodiment provides a battery display power correction method for a micro bare machine. The micro bare machine is provided with a battery, such as Figure 1 As shown, the battery display power correction method for a tiny bare machine includes:
[0071] Step S102, according to the degree of power deviation between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power deviation degree, approach the real power of the battery to obtain the power deviation of the current real power relative to the last displayed power, wherein different power deviation degrees correspond to different preset approach correction rates, and the approach correction period is the interval time between two approach corrections;
[0072] Step S104, obtaining the real power increment of the battery according to the power increment of the current real power relative to the last real power, wherein the power increment is a positive value when the battery is being charged, and the power increment is a negative value when the battery is being discharged;
[0073] Step S106, adding the obtained power offset to the obtained real power increment to obtain the battery power change;
[0074] Step S108, adding the obtained power change to the last displayed power to obtain the corrected displayed power of the battery.
[0075] In this embodiment, if Figure 1 As shown, in the embodiment of the present application, the actual power of the battery is approached according to the degree of power deviation between the current actual power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power deviation degree, which is conducive to reasonably setting the approach correction rate, and can speed up the approach to the actual power of the battery when the power deviation degree is large, and slow down the approach to the actual power of the battery when the power deviation degree is small, which is conducive to the displayed power approaching the actual power; further, by obtaining the actual power increment and the power change, and then adding the obtained power change to the last displayed power, the corrected displayed power of the battery is obtained, which is conducive to accurately calculating the remaining power of the battery and preventing power jumps.
[0076] In this embodiment, the last displayed power is specifically the last recorded displayed power, which is also corrected by the battery display power correction method used for micro bare machines. The current displayed power is the last displayed power of the next displayed power. When the micro bare machine or ordinary battery device is just turned on, the last displayed power is the displayed power saved before shutdown.
[0077] In this embodiment, if Figure 2As shown, the abscissa of the battery charge and power change curve diagram in this embodiment is time, and the time unit is S; the battery charge and power change curve diagram includes an upper part and a lower part, the upper part of the battery charge and power change curve diagram is used to display the battery charge and current, and the lower part of the battery charge and power change curve diagram is used to display the voltage and power, and the ordinate of the upper part of the battery charge and power change curve diagram is the charge amount and the current. When the ordinate is used to represent the charge amount, the unit of the ordinate of the battery charge and power change curve diagram is mAH; when the ordinate of the battery charge and power change curve diagram is used to represent the current, the battery charge and power change curve diagram is The unit of the ordinate of the curve graph is mA. The battery charge and power change curve graph shows an open circuit charge change curve 20 and a display charge change curve 21. The open circuit charge change curve 20 reflects the open circuit charge change of the battery within the monitoring time T, and the display charge change curve 21 reflects the display charge change of the battery within the monitoring time T. The real charge change curve in this embodiment coincides with the display charge change curve 21, and the real charge change curve 21 reflects the real charge change of the battery within the monitoring time T. The monitoring time T in this embodiment is 12 hours. In addition, the monitoring time T can also be adjusted as needed. Figure 2 It can be concluded that the charge change curve 21 in this embodiment coincides with the real charge change curve, so that the displayed power corresponding to each power point on the charge change curve 21 can more truly reflect the real power, and each power point on the charge change curve 21 is displayed as a percentage such as the power change curve 24.
[0078] Further, such as Figure 2 As shown, the lower part of the battery charge and power change curve diagram in the present embodiment also shows an open circuit voltage change curve 22 within the monitoring time T, and the units of the ordinate of the lower part of the battery charge and power change curve diagram are mv and %, and the open circuit voltage change curve 22 reflects the open circuit voltage change of the battery within the monitoring time T; the upper part of the battery charge and power change curve diagram also shows a battery voltage change curve 23 within the monitoring time T, and the battery voltage change curve 23 reflects the battery voltage change of the battery within the monitoring time T; the battery charge and power change curve diagram also shows a battery current change curve 25 within the monitoring time T, and the battery current change curve 25 reflects the battery current change of the battery within the monitoring time T.
[0079] Further, such as Figure 2 As shown, the battery charge and power change curve diagram in this embodiment also includes a self-integrated charge change curve, and the self-integrated charge change curve is almost coincident with the displayed charge change curve 21; further, the deviation between the open circuit charge and the actual power is less than 5%, and the battery power transitions smoothly during charging, discharging and standby states without power jumps.
[0080] In one embodiment of the present invention, the battery display power correction method for a tiny bare machine further includes:
[0081] The current real power is subtracted from the last displayed power to obtain a power deviation value, the absolute value of the power deviation is taken to obtain the absolute value of the power deviation, a numerical interval is set for the size range of the absolute value of the power deviation according to the numerical value, a plurality of different power difference intervals are obtained, and for different power difference intervals, an approach correction rate for approaching the real power of the battery corresponding to the power difference interval is preset to obtain a preset approach correction rate;
[0082] And according to the preset approach correction rate and approach correction period corresponding to the degree of power offset, approach the actual power of the battery to obtain the power offset of the current actual power relative to the last displayed power, including:
[0083] The power offset is calculated by the following formula;
[0084] Formula: Power offset = preset approach correction rate * approach correction period.
[0085] In this embodiment, an approach correction period is the time interval from the last approach correction to the current approach correction. The approach correction period can be set to a time value of 1S, 2S or other values according to the approach correction requirements.
[0086] In one embodiment of the present invention, an absolute value of the power deviation value is taken to obtain the absolute value of the power deviation, a numerical interval is set for the size range of the absolute value of the power deviation according to the numerical value, a plurality of different power difference intervals are obtained, and an approach correction rate for approaching the actual power of the battery corresponding to the power difference interval is preset for each different power difference interval, and a preset approach correction rate is obtained, including:
[0087] When the absolute value of the power deviation is greater than 0.00001 and less than or equal to 0.01, the approach correction rate is set to 0.01 / 2400S;
[0088] When the absolute value of the power deviation is greater than 0.01 and less than or equal to 0.03, the approach correction rate is set to 0.01 / 600S;
[0089] When the absolute value of the power deviation is greater than 0.03 and less than or equal to 0.06, the approach correction rate is set to 0.01 / 360S;
[0090] When the absolute value of the power deviation is greater than 0.06, the approach correction rate is set to 0.01 / 180S;
[0091] When the battery is discharged when the actual power level is lower than 40%, or when the battery is charged and the actual power level is higher than 99%, the approach correction rate is increased by 2 times.
[0092] In the present embodiment, by respectively presetting the approach correction rate for approaching the actual power of the battery corresponding to the different power difference intervals, it is possible to speed up the approach to the actual power of the battery when the power deviation is large, and slow down the approach to the actual power of the battery when the power deviation is small, which is conducive to the display power approaching the actual power; in addition, the approach correction rate for approaching the actual power of the battery corresponding to the different power difference intervals can be respectively preset, and can be set to other values according to the specific battery type.
[0093] In this embodiment, if at a certain moment T, the absolute value of the power deviation is greater than 0.03 and less than or equal to 0.06, the approach correction rate is set to 0.01 / 360S; and if the absolute value of the power deviation is greater than 0.03 and less than or equal to 0.06, and if at a moment T, the battery is discharged when the actual power is less than 40%, or when the battery is charged and the actual power of the battery is higher than 99%, and the approach correction rate is increased by 2 times, the approach correction rate becomes 0.02 / 360S; when other absolute values of the power deviation meet the conditions for increasing by 2 times, the approach correction rate is also correspondingly increased by 2 times.
[0094] In one embodiment of the present invention, the battery display power correction method for a tiny bare machine further includes:
[0095] Acquiring battery power evaluation data, wherein the battery power evaluation data includes discharge current data and battery voltage data;
[0096] Obtaining electrochemical parameters of the battery, wherein the electrochemical parameters include the battery internal resistance and maximum charge capacity;
[0097] Obtaining an open circuit voltage-electricity correspondence table, wherein the open circuit voltage-electricity correspondence table records a plurality of open circuit voltage values of the battery and a plurality of remaining electric quantity values corresponding to the plurality of open circuit voltage values one by one;
[0098] Obtain the open circuit capacity of the battery according to the capacity evaluation data, electrochemical parameters and the open circuit voltage and capacity correspondence table;
[0099] The open-circuit power is used to perform real-time correction on the current integral to obtain a corrected current integral value, and the obtained corrected current integral value is used as the current real power of the battery.
[0100] In this embodiment, the open-circuit charge is used in the embodiment of the present application to perform real-time correction on the current integral to obtain a corrected current integral value, and the corrected current integral value obtained is used as the current true charge of the battery, which is beneficial to improving the accuracy of the true charge estimation and avoiding the adverse effects of complex factors such as self-discharge and polarization inside the battery on the accuracy of the current true charge estimation, so that the final corrected current integral value is closer to the actual charge of the battery.
[0101] In this embodiment, obtaining the battery power evaluation data specifically includes collecting the battery discharge current through a collection chip to obtain the battery discharge current data; and also includes collecting the battery voltage through a collection chip to obtain the battery voltage data. Further, there can be multiple collection chips, which can be selected as needed, and will not be described in detail here.
[0102] Furthermore, in the present embodiment, obtaining the electrochemical parameters of the battery includes measuring the battery internal resistance of the battery using a battery parameter measurement tool to obtain the battery internal resistance of the battery; and also includes connecting the battery to the battery parameter measurement tool, and performing charge and discharge operations on the battery through the battery parameter measurement tool to obtain the maximum charge capacity of the battery; in addition, in the present embodiment, charging current data can also be used to replace discharge current data.
[0103] In this embodiment, the electrochemical parameters of the battery can be obtained from the battery manufacturer. When the battery display power correction method for a tiny bare machine in this embodiment is used to correct the battery display power, the modified electrochemical parameters of the battery model provided by the modification personnel can be applied to a variety of batteries. In this embodiment, the electrochemical parameters of the battery are specifically calculated using the battery parameter measurement tool BatteryManager. The electrochemical parameters of the battery in this embodiment also include charge and discharge efficiency, etc.
[0104] In one embodiment of the present invention, the open circuit capacity of the battery is obtained according to the capacity evaluation data, the electrochemical parameters and the open circuit voltage and capacity correspondence table, including:
[0105] The open circuit voltage is calculated based on the discharge current data, the battery voltage data and the battery internal resistance, wherein the open circuit voltage is calculated using the following formula:
[0106] OpenV = V - inR * I;
[0107] In the formula, V is the battery voltage, inR is the battery internal resistance, and I is the discharge current;
[0108] The obtained open circuit voltage is looked up in an open circuit voltage-electricity correspondence table, and the open circuit voltage is converted into the corresponding open circuit electricity to obtain the open circuit electricity.
[0109] In this embodiment, the open circuit voltage and power correspondence table usually includes two columns, one of which is the open circuit voltage value, which has multiple open circuit voltage values, and the other is the power percentage corresponding to the multiple open circuit voltage values. It should be noted that for different types of batteries, the open circuit voltage and power correspondence table is different. For example, for lithium batteries, when the open circuit voltage of the lithium-ion battery is measured to be 4.20V, it can be seen from the corresponding table that its power percentage is 100%. If the open circuit voltage is 3.82V, the power percentage is about 50%. In addition, the open circuit voltage and power correspondence table can be obtained from the battery manufacturer. The battery manufacturer usually provides the open circuit voltage and power correspondence data of the battery model in the product specification manual or technical document. Therefore, after determining the battery model, the open circuit voltage and power correspondence table of the battery model can be determined.
[0110] In one embodiment of the present invention, the battery display power correction method for a tiny bare machine further includes:
[0111] When the difference between the current real power and the open circuit power is greater than 3%, the current real power is reset to the open circuit power;
[0112] When the difference between the open circuit power and the current real power is greater than 20%, the current real power is reset to the open circuit power;
[0113] When charging the battery, when the open circuit charge is greater than 100% and the current real charge is less than 99%, the current real charge is reset to 99%.
[0114] In an embodiment of the present application, when the difference between the current real power and the open-circuit power is greater than 3%, the current real power is reset to the open-circuit power, which is beneficial to ensure that the battery power is not inflated; further, in an embodiment of the present application, when the difference between the open-circuit power and the current real power is greater than 20%, the current real power is reset to the open-circuit power, which is beneficial to indicate battery replacement and prevent errors in power; further, in an embodiment of the present application, when the battery is charged, when the open-circuit power is greater than 100% and the current real power is less than 99%, the current real power is reset to 99%, which is beneficial to prevent the displayed power from being less than 100% for a long time.
[0115] In one embodiment of the present invention, the battery display power correction method for a tiny bare machine further includes:
[0116] When the battery is charged, the charging current is less than 6mA, and the current actual power is greater than or equal to 100%, the current displayed power is set to 100% for display;
[0117] When the absolute value of the power deviation is greater than 0.2 or the battery is plugged in or out, the power change is adjusted to a single power change of less than or equal to 0.02% per second.
[0118] In this embodiment, when the battery is charged and the charging current is less than 6mA, and the current actual power level is greater than or equal to 100%, the currently displayed power level is set to 100% for display, which helps to avoid the current displayed power level failing to reach 100%; in addition, when the absolute value of the power deviation is greater than 0.2 or the battery is plugged in or out, the power change is adjusted to a single power change of less than or equal to 0.02% per second, which helps to make the power change more in line with the actual power level.
[0119] In one embodiment of the present invention, the battery display power correction method for a tiny bare machine further includes:
[0120] When charging the battery, the amount of change in the power within the correction cycle can only increase by no less than the minimum amount of change and no more than 1.1%, and the minimum amount of change in power is 0.00001%;
[0121] When the battery is discharged, the amount of change in the charge within the correction cycle can only be reduced by no less than the minimum amount of change in charge and no more than 1.1%, and the minimum amount of change in charge is 0.00001%.
[0122] Another aspect of the present application provides a battery display power correction device for a tiny bare machine, such as Figure 3 As shown, the battery display power correction device for a tiny bare machine includes:
[0123] A battery internal resistance measuring module 30 is used to detect and obtain the battery internal resistance of the battery;
[0124] A voltage acquisition module 31 is used to acquire the voltage of the battery;
[0125] A current collection module 32, used to collect the current of the battery;
[0126] A charge and discharge control module 33, used to control the charging and discharging of the battery;
[0127] A clock module 34, used for timing;
[0128] The storage module 35 is used to store the displayed power, the current real power, the last displayed power and the last real power;
[0129] The power offset acquisition module 36 is used to approach the actual power of the battery according to the power offset between the current actual power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power offset, to obtain the offset of the current actual power relative to the last displayed power;
[0130] A real power increment acquisition module 37 is used to obtain the real power increment of the battery according to the increment of the current real power relative to the last real power;
[0131] The power change acquisition module 38 is used to add the obtained power offset to the real power increment to obtain the power change of the battery;
[0132] Modify the displayed power acquisition module 39, used for adding the last displayed power to the power change to obtain the modified displayed power of the battery;
[0133] The display module 301 is used to display the corrected display power level.
[0134] In this embodiment, if Figure 3 As shown, the quantity offset acquisition module 36 in the battery display power correction device for a tiny bare machine can be used to approach the real power of the battery according to the degree of power offset between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power offset degree, which is conducive to reasonably setting the approach correction rate, and can accelerate the approach to the real power of the battery when the power offset degree is large, and slow down the approach to the real power of the battery when the power offset degree is small, which is conducive to the displayed power approaching the real power; further, the real power increment can be obtained through the real power increment acquisition module 37, the power change can be obtained through the power change acquisition module 38, and then the corrected displayed power of the battery can be obtained by modifying the display power acquisition module 39, which is conducive to accurately calculating the remaining battery power and preventing power jumps.
[0135] Furthermore, the battery display power correction device for a tiny bare metal in this embodiment is convenient for application on a tiny hardware system, and implements the steps of the above-mentioned battery display power correction method for a tiny bare metal, which can accurately calculate the remaining battery power and display it on the display module 301, and prevent power jumps.
[0136] According to another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0137] In this embodiment, the computer program implements the above method when executed by the processor, such as Figure 1 As shown, including:
[0138] Step S102, according to the degree of power deviation between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power deviation degree, approaching the real power of the battery, to obtain the power deviation of the current real power relative to the last displayed power, wherein different power deviation degrees correspond to different preset approach correction rates;
[0139] Step S104, obtaining the real power increment of the battery according to the power increment of the current real power relative to the last real power, wherein the power increment is a positive value when the battery is being charged, and the power increment is a negative value when the battery is being discharged;
[0140] Step S106, adding the obtained power offset to the obtained real power increment to obtain the battery power change;
[0141] Step S108, adding the obtained power change to the last displayed power to obtain the corrected displayed power of the battery.
[0142] Furthermore, when the computer program in this embodiment is executed by the processor, the steps of implementing the above method also include other steps included in the battery display power correction method for a tiny bare machine.
[0143] In another aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above method is implemented when the processor executes the computer program.
[0144] In this embodiment, the computer program implements the above method when executed by the processor, such as Figure 2 As shown, including:
[0145] Step S102, according to the degree of power deviation between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power deviation degree, approaching the real power of the battery, to obtain the power deviation of the current real power relative to the last displayed power, wherein different power deviation degrees correspond to different preset approach correction rates;
[0146] Step S104, obtaining the real power increment of the battery according to the power increment of the current real power relative to the last real power, wherein the power increment is a positive value when the battery is being charged, and the power increment is a negative value when the battery is being discharged;
[0147] Step S106, adding the obtained power offset to the obtained real power increment to obtain the battery power change;
[0148] Step S108, adding the obtained power change to the last displayed power to obtain the corrected displayed power of the battery.
[0149] Furthermore, when the computer program in this embodiment is executed by the processor, the steps of implementing the above method also include other steps included in the battery display power correction method for a tiny bare machine.
[0150] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For the part not described in detail in one embodiment, please refer to the relevant description of other embodiments. In addition, for the specific operation of program upgrade, please refer to the relevant prior art in this field, which will not be repeated here.
[0151] The technical solution of the present application, or the part that contributes to the relevant technology, or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, magnetic disk or optical disk, etc., which can store program codes.
[0152] A schematic block diagram of an electronic device in this embodiment is shown in FIG. Figure 2 As shown; electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0153] In the present embodiment, the program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0154] In addition, in addition to the technical solutions disclosed in this embodiment, the batteries, memory, battery display power correction devices for micro bare machines, and various modules and their working principles in the present invention may refer to conventional technical solutions in the technical field, and these conventional technical solutions are not the focus of the present invention, and the present invention will not describe them in detail.
[0155] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0156] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions provided by this disclosure can be achieved, and this document does not limit this.
[0157] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for correcting the battery display power of a micro bare machine, wherein a battery is provided in the micro bare machine, characterized in that: The method includes: According to the power offset degree between the current real power of the battery and the last displayed power, and according to the preset approach correction rate and approach correction period corresponding to the power offset degree, approaching the real power of the battery, obtaining the power offset of the current real power relative to the last displayed power, wherein different power offset degrees correspond to different preset approach correction rates, and the approach correction period is the interval time between two approach corrections; Obtaining a real power increment of the battery according to a power increment of the current real power relative to the last real power, wherein the power increment is a positive value when the battery is being charged, and the power increment is a negative value when the battery is being discharged; Adding the obtained power offset to the obtained real power increment to obtain the power change of the battery; The obtained power change amount is added to the last displayed power amount to obtain the corrected displayed power amount of the battery.
2. The method according to claim 1, characterized in that The method further comprises: The current real power is subtracted from the last displayed power to obtain a power deviation value, an absolute value of the power deviation is taken to obtain a power deviation absolute value, a numerical interval is set for a size range of the power deviation absolute value according to a numerical value, a plurality of different power difference intervals are obtained, and for different power difference intervals, an approach correction rate for approaching the real power of the battery corresponding to the power difference interval is respectively preset to obtain the preset approach correction rate; The method of approaching the actual power of the battery according to a preset approach correction rate and an approach correction period corresponding to the power offset degree to obtain the power offset of the current actual power relative to the last displayed power includes: The electric quantity offset is obtained by calculating the following formula: Formula: Power offset = preset approach correction rate * approach correction period.
3. The method according to claim 2, characterized in that The step of taking an absolute value of the power deviation value to obtain the absolute value of the power deviation, setting a numerical interval for the size range of the absolute value of the power deviation according to the numerical value to obtain a plurality of different power difference intervals, respectively presetting an approach correction rate for approaching the actual power of the battery corresponding to the power difference interval for different power difference intervals, and obtaining the preset approach correction rate includes: When the absolute value of the electric quantity deviation is greater than 0.00001 and less than or equal to 0.01, the approach correction rate is set to 0.01 / 2400S; When the absolute value of the electric quantity deviation is greater than 0.01 and less than or equal to 0.03, the approach correction rate is set to 0.01 / 600S; When the absolute value of the power deviation is greater than 0.03 and less than or equal to 0.06, the approach correction rate is set to 0.01 / 360S; When the absolute value of the power deviation is greater than 0.06, the approach correction rate is set to 0.01 / 180S; When the battery is discharged when the actual power level is lower than 40%, or when the battery is charged and the actual power level is higher than 99%, the approach correction rate is increased by 2 times.
4. The method according to claim 1, characterized in that The method further comprises: Acquiring battery power evaluation data of the battery, wherein the battery power evaluation data includes discharge current data and battery voltage data; Acquiring electrochemical parameters of the battery, wherein the electrochemical parameters include battery internal resistance and maximum charge capacity; Obtaining an open circuit voltage-electricity correspondence table, wherein the open circuit voltage-electricity correspondence table records a plurality of open circuit voltage values of the battery and a plurality of remaining electric capacity values corresponding to the plurality of open circuit voltage values; Obtaining the open circuit capacity of the battery according to the capacity evaluation data, the electrochemical parameters and the open circuit voltage and capacity correspondence table; The open-circuit power is used to perform real-time correction on the current integral to obtain a corrected current integral value, and the corrected current integral value obtained is used as the current real power of the battery.
5. The method according to claim 4, characterized in that The step of obtaining the open circuit capacity of the battery according to the capacity evaluation data, the electrochemical parameters and the open circuit voltage and capacity correspondence table comprises: The open circuit voltage is calculated based on the discharge current data, the battery voltage data and the battery internal resistance, wherein the open circuit voltage is calculated using the following formula: OpenV = V - inR * I; In the formula, V is the battery voltage, inR is the battery internal resistance, and I is the discharge current; The obtained open circuit voltage is looked up in the open circuit voltage-electricity correspondence table, and the open circuit voltage is converted into the open circuit electricity corresponding thereto to obtain the open circuit electricity.
6. The method according to claim 4, characterized in that The method further comprises: When the difference between the current real power and the open circuit power is greater than 3%, the current real power is reset to the open circuit power; When the difference between the open circuit power and the current real power is greater than 20%, the current real power is reset to the open circuit power; When the battery is charged, when the open circuit charge is greater than 100% and the current real charge is less than 99%, the current real charge is reset to 99%.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the battery is charged and the charging current is less than 6 mA, and the current real power level is greater than or equal to 100%, the current displayed power level is set to 100% for display; When the absolute value of the power deviation is greater than 0.2 or the battery is plugged in or out, the power change is adjusted to a single power change of less than or equal to 0.02% per second.
8. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When charging the battery, the amount of change in the amount of electricity can only increase by no less than a minimum amount of electricity change and no more than 1.1% during the correction period, and the minimum amount of electricity change is 0.00001%; When the battery is discharged, the amount of change in the amount of electricity can only be reduced by no less than a minimum amount of electricity change and no more than 1.1% within a correction period, and the minimum amount of electricity change is 0.00001%.
9. A battery display power correction device for a tiny bare machine, characterized in that: The evaluation device comprises: A battery internal resistance measurement module, used to detect and obtain the battery internal resistance of the battery; A voltage acquisition module, used for acquiring the voltage of the battery; A current collection module, used for collecting the current of the battery; A charge and discharge control module, used for controlling the battery to charge and discharge; Clock module, used for timing; A storage module, used for storing and recording the displayed power, the current real power, the last displayed power and the last real power; A power offset acquisition module, used to approach the real power of the battery according to the power offset degree between the current real power of the battery and the last displayed power, and according to a preset approach correction rate and approach correction period corresponding to the power offset degree, to obtain the offset of the current real power relative to the last displayed power; A real power increment acquisition module, used to obtain the real power increment of the battery according to the increment of the current real power relative to the last real power; A power change acquisition module, used for adding the acquired power offset to the real power increment to obtain the power change of the battery; A display power acquisition module is used to add the last displayed power to the power change to obtain a modified displayed power of the battery; The display module is used to display the corrected display power.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the method described in any one of claims 1 to 8 when executed by a processor.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method described in any one of claims 1 to 8 is implemented.