A power and energy display control method and system, electronic device and storage medium
Patent Information
- Application Number
- CN202610465801.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-09
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本发明实施例提供一种低功耗且电量计量精准的电量及功率显示控制方法、系统、电子设备及存储介质,以解决现有技术中损耗大且误差大的问题
[0019] The beneficial effects of the power and energy display control method provided in this embodiment of the invention are as follows: by pre-setting the power and energy calculation algorithms, and combining the accurate acquisition of the total current of the main circuit and the battery voltage and the effective identification of the current direction, the total power is calculated in real time and accurately and the power of each interface is accurately split and displayed in the bidirectional charging and discharging scenario of the mobile power bank. On the one hand, it eliminates the superposition error caused by the traditional multi-port independent sampling, and solves the problems of inaccurate power and energy statistics, false power, and power outage in the traditional solution. On the other hand, it eliminates the need to configure independent sampling circuits for each interface, thereby reducing power consumption and hardware costs.
Smart Images

Figure CN122553478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile power technology, and in particular to a power and energy display control method, system, electronic device, and storage medium. Background Technology
[0002] The conventional solution for displaying the power and charge level of a multi-port power bank is as follows: each output port has an independent sampling resistor for unidirectional current detection; to avoid detecting negative voltage, an additional overcurrent detection module for charging or discharging is required; and to ensure sampling accuracy, the sampling resistor value is too large, which will bring additional losses and reduce power efficiency; at the same time, when there are multiple output ports, the logic for summarizing and calculating the sampling data from each port is simple, and the power and charge level are estimated only by the total current, and the error will increase with the number of output ports.
[0003] Therefore, designing a low-power and accurate power metering power display control method, system, electronic device, and storage medium is of great importance to those skilled in the art. Summary of the Invention
[0004] This invention provides a low-power and highly accurate power metering and display control method, system, electronic device, and storage medium to solve the problems of high power loss and large error in the prior art.
[0005] This invention discloses a method for controlling battery level and power display, applied in a power bank. The method includes the following steps:
[0006] Preset power calculation algorithm and energy calculation algorithm; Acquire battery voltage data and total current data of the main circuit, and identify the current direction; The power calculation algorithm is invoked to calculate and display the total power in real time based on battery voltage data, total current data of the main circuit, and current direction. The power calculation algorithm is invoked to calculate and display the real-time power of each interface based on battery voltage data and total current data of the main circuit.
[0007] Optionally, the following steps are also included: The total charging and discharging current of the main circuit is sampled to obtain the sampling voltage signal; The sampled voltage signal is amplified and the total current is calculated to obtain the total current data of the main circuit.
[0008] Optionally, the power calculation algorithm includes the following steps: The total current of the main circuit is integrated using the Coulomb integral algorithm to obtain the basic remaining power. Obtain the battery's current operating temperature and current internal resistance; Based on the battery's current operating temperature and internal resistance, a dynamic internal resistance correction algorithm is used to dynamically compensate the base remaining power in real time to obtain an accurate remaining power.
[0009] Optionally, the compensation formula of the battery dynamic internal resistance correction algorithm is:
[0010] in, For the corrected and accurate remaining battery power, Let be the remaining charge at time t. Here, T represents the coefficient of temperature affecting battery capacity, and T is the current operating temperature of the battery. This is the coefficient representing the influence of battery internal resistance on the charge capacity. For reference temperature, This represents the current internal resistance of the battery. The reference temperature is 25°C, which is the standard internal resistance of the battery.
[0011] Optionally, the calculation formula of the Coulomb integral algorithm is as follows:
[0012] in, This represents the remaining battery power at the initial moment. For a moment The total current in the main circuit.
[0013] Optionally, the power calculation algorithm includes the following steps: The total power of the main circuit is obtained based on battery voltage data and total current data of the main circuit. The real-time power of each interface is calculated according to the power splitting formula, which is:
[0014] in, Let i be the power of the i-th interface. The output voltage of the i-th interface The output current of the i-th interface.
[0015] To address the problems existing in the prior art, the present invention also provides a power calculation system, the solution of which is used to implement the power and energy display control method described above, comprising: A sampling module is installed in the main current circuit of the power bank for sampling the bidirectional current of charging and discharging. An operational amplifier module, connected to the sampling module, is used to amplify the voltage signal across the sampling resistor. The main control module is connected to the output of the operational amplifier module and the battery of the power bank to obtain sampled current data and battery status data. The main control module has a preset power calculation algorithm and a power calculation algorithm to perform power calculation and power calculation based on the sampled current data and battery status data.
[0016] Optionally, the sampling module is an alloy sampling resistor.
[0017] To address the problems existing in the prior art, the present invention also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of any of the methods described above.
[0018] To address the problems existing in the prior art, the present invention also provides a computer-readable storage medium, wherein the medium stores a computer program, which, when executed by a processor, causes the processor to perform the steps of any of the methods described above.
[0019] The beneficial effects of the power and energy display control method provided in this embodiment of the invention are as follows: by pre-setting the power and energy calculation algorithms, and combining the accurate acquisition of the total current of the main circuit and the battery voltage and the effective identification of the current direction, the total power is calculated in real time and accurately and the power of each interface is accurately split and displayed in the bidirectional charging and discharging scenario of the mobile power bank. On the one hand, it eliminates the superposition error caused by the traditional multi-port independent sampling, and solves the problems of inaccurate power and energy statistics, false power, and power outage in the traditional solution. On the other hand, it eliminates the need to configure independent sampling circuits for each interface, thereby reducing power consumption and hardware costs. Attached Figure Description
[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of the power and energy display control method in an embodiment of the present invention; Figure 2 This is a flowchart of the power calculation algorithm in an embodiment of the present invention; Figure 3 This is a flowchart of the power calculation algorithm in an embodiment of the present invention; Figure 4 This is a block diagram of the power calculation system in an embodiment of the present invention; Figure 5 This is a circuit diagram of the sampling module and the operational amplifier module in an embodiment of the present invention; Figure 6 This is a circuit diagram of the main control module in an embodiment of the present invention; Figure 7This is a circuit diagram of the lithium protection module and battery in an embodiment of the present invention.
[0021] The labels for the attached figures are as follows: 1. Sampling module; 2. Operational amplifier module; 3. Main control module; 4. Battery; 5. Lithium battery protection module; R11, sampling resistor. Detailed Implementation
[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0023] like Figure 1 As shown, the present invention provides a specific embodiment of a power and energy display control method.
[0024] A power and energy display control method, applied in a power bank, referenced. Figure 1 This includes the following steps: S1, Preset power calculation algorithm and energy calculation algorithm; S2. Acquire battery voltage data and total current data of the main circuit, and identify the current direction of current; S3. Call the power calculation algorithm to calculate and display the total power in real time based on battery voltage data, main circuit total current data and current direction; S4. Call the power calculation algorithm to calculate and display the real-time power of each interface based on the battery voltage data and the total current data of the main circuit.
[0025] Step 1: Pre-write the power calculation algorithm and the power calculation algorithm into the main control module of the power bank. After the preset, the main control module of the power bank can call the algorithm to perform direct calculation based on the real-time collected data, without the need for secondary programming, which effectively improves the timeliness and convenience of the calculation.
[0026] Step 2: Since the remaining battery capacity is essentially the total amount of internal movable charge, the core of the charging and discharging process is the inflow or outflow of charge, and the current is the amount of charge movement per unit time. The total current of the main circuit directly reflects the overall charge transfer rate and total amount during the charging and discharging of the power bank. By obtaining the total current, the total charge transferred by the battery in any time period can be accurately calculated using the Coulomb integral method, thereby deriving the remaining capacity. Addressing the pain points of multi-port power banks, the traditional method of independent sampling and data aggregation for each port is abandoned. Instead, the total current of the main circuit is directly collected. The main circuit is the convergence point of all input and output currents. This method effectively avoids the superposition errors caused by the accuracy deviation of the sampling resistors at each port, circuit interference, signal delay, etc., and also effectively solves the problem that the power statistical deviation increases with the number of ports when there are multiple outputs, making the power calculation more accurate. Among them, the power bank has two working states: discharging and charging. The total current of the main circuit can distinguish between the discharging and charging states by the current direction, thereby realizing bidirectional power measurement, that is, deducting the corresponding charge when the power bank is discharging and adding the corresponding charge when the power bank is charging.
[0027] Specifically, the total current of the main circuit can be acquired using a small-value alloy sampling resistor and a high-precision operational amplifier. Using a small-value alloy sampling resistor significantly reduces energy loss when current flows through it while ensuring sampling accuracy, and eliminates the need for an additional charging / discharging overcurrent detection module. The small-value alloy sampling resistor is connected in series in the main current circuit of the power bank. When the power bank charges or discharges, all current flows through this resistor, generating a weak voltage signal proportional to the total current of the main circuit. This weak voltage signal is differentially amplified by a high-precision operational amplifier. The amplified voltage signal is then converted from digital to analog and transmitted to the main control module of the power bank. The main control module reverses the voltage signal to obtain a real-time, accurate total current value of the main circuit, providing basic data for subsequent power calculation. Simultaneously, the virtual open / virtual short characteristics of the operational amplifier are used to identify the current direction, enabling accurate detection of bidirectional current during charging or discharging. Current direction identification clarifies the charging / discharging status of the power bank, providing a basis for bidirectional dynamic power calculation.
[0028] Furthermore, the real-time voltage of the battery is acquired by a voltage divider detection circuit connected in parallel with the two ends of the power bank battery, and the analog voltage signal is converted into a corresponding weak current signal and transmitted to the main control module. After conversion by the analog-to-digital converter built into the main control module, the battery voltage data is obtained.
[0029] Step 3: The main control module calls the corresponding power calculation algorithm, and calculates the current total power of the power bank in real time based on the battery voltage data, the total current data of the main circuit and the current direction, and displays it through the power bank's display module.
[0030] Step 4: The main control module calls the corresponding power calculation algorithm. Based on the battery voltage data, the total current data of the main circuit and the current direction, it calculates the total charging and discharging power of the power bank in real time. Then, combined with the load impedance characteristics of each interface of the power bank and the real-time voltage drop data of each interface, the total charging and discharging power is broken down into the real-time power of each interface and displayed through the display module of the power bank.
[0031] In this embodiment, by pre-setting the power calculation algorithm and the battery voltage calculation algorithm, and combining the accurate acquisition of the total current of the main circuit and the battery voltage and the effective identification of the current direction, the real-time accurate calculation of the total power and the accurate split display of the power of each interface in the bidirectional charging and discharging scenario of the mobile power bank are realized. On the one hand, the superposition error caused by the traditional multi-port independent sampling is eliminated, and the problems of inaccurate power and power statistics, false power, and power outages in the traditional solution are solved. On the other hand, there is no need to configure an independent sampling circuit for each interface, which reduces power consumption and hardware cost.
[0032] In one embodiment, reference Figure 2 The power calculation algorithm includes the following steps: S11. Integrate the total current of the main circuit based on the Coulomb integral algorithm to obtain the basic remaining power. S12. Based on the battery dynamic internal resistance correction algorithm, the basic remaining power is dynamically compensated in real time to obtain accurate remaining power.
[0033] Step 11: The Coulomb integration method essentially calculates the total charge transferred within the battery by integrating the current during the charging and discharging process over time, thereby deriving the remaining charge. Specifically, the main control module collects the total main circuit current obtained in Step 1 at fixed time intervals and performs integration calculations according to the Coulomb integration formula. The Coulomb integration formula is:
[0034] in, This represents the remaining battery power at the initial moment. For a moment The total current in the main circuit.
[0035] Specifically, the main control module at equal time intervals (Etc. 100ms, 200ms, etc. can be selected and adjusted according to accuracy requirements) Collect the total current of the main circuit to obtain the real-time total circuit current value at each time point. ,in, For any sampling time; by taking each time interval internal charge transfer amount The calculation is performed using the following formula: ; among them, during discharge For positive, A positive value indicates that the battery charge has decreased during charging. Negative, A negative value indicates an increase in battery charge.
[0036] By starting from the initial moment, all time periods Accumulate the total amount, combined with the initial remaining power. To obtain the basic remaining charge at any time t This means completing the integral calculation; for example, the initial remaining power of the power bank. The capacity is 5000mAh, the sampling interval of the main control module is 1 hour, and the real-time current during discharge is recorded. If the current is 1000mA, then at the end of the first hour, the cumulative current is... It has a capacity of 1000mAh. The capacity is 4000mAh; by the end of the second hour, the cumulative capacity is... It has a capacity of 2000mAh. It has a capacity of 3000mAh; if charging starts at this time, the charging current will be... If the current is -2000mA, and sampling is performed for another hour, then at the end of the third hour, the newly added... -2000mA, cumulative =0, It has a capacity of 5000mAh and is fully charged.
[0037] In this embodiment, by performing coulomb integration on the total current of the main circuit, there is no need for summarization calculation. Compared with the traditional method of sampling the current of each port separately, summarizing it, and then performing coulomb integration, this effectively avoids the superposition of sampling errors of each port, ensures the accuracy of the current, and makes the integration result more consistent with the actual charge transfer of the battery. By defining positive and negative values for the total current of the main circuit, the coulomb integration method can achieve bidirectional charge accumulation. The integration result is positive during discharge to deduct the initial charge, and negative during charging to replenish the initial charge.
[0038] Step 12: Since the basic remaining power obtained in Step 11 is the power value under ideal conditions, in actual use, the remaining power of the battery will be affected by factors such as battery aging, ambient temperature, and charge / discharge rate. Among these factors, the battery internal resistance is the core influencing factor. Battery aging will lead to an increase in internal resistance, and low temperature or high charge / discharge rate will also cause temporary changes in internal resistance, thus affecting the actual usable power. Traditional power calculation does not take this dynamic change into account, resulting in a large deviation between the displayed power and the actual usable power. This step uses a battery dynamic internal resistance correction algorithm, combined with the battery's real-time operating status parameters, to perform real-time and dynamic error compensation on the basic remaining power, and finally obtain an accurate remaining power.
[0039] The compensation formula for the battery dynamic internal resistance correction algorithm is as follows:
[0040] in, For the corrected and accurate remaining battery power, Let be the remaining charge at time t. Here, T represents the coefficient of temperature affecting battery capacity, and T is the current operating temperature of the battery. This is the coefficient representing the influence of battery internal resistance on the charge capacity. For reference temperature, This represents the current internal resistance of the battery. The reference temperature is 25°C, which is the standard internal resistance of the battery.
[0041] First, the main control module collects the battery's current operating temperature T and actual dynamic internal resistance in real time. Then, substitute the values into the formula and use the temperature influence coefficient. and internal resistance influence coefficient These compensate for electrical errors caused by changes in temperature and internal resistance, respectively, where the reference temperature... The default value is 25℃, and the reference internal resistance is... The standard internal resistance of the battery in its brand-new state; the calculated result after compensation. The battery's actual and accurate remaining power can be directly used for display or subsequent power calculation. It should be noted that the battery dynamic internal resistance correction and coulomb integration can be performed synchronously. The main control module performs one battery dynamic internal resistance correction after completing one coulomb integration at the same fixed time interval.
[0042] Specifically, a reference temperature is preset within the main control module. Battery standard internal resistance Temperature influence coefficient and internal resistance influence coefficient The above parameters are all fixed empirical values calibrated based on the cell characteristics before the battery leaves the factory; after completing a single coulomb integral calculation, the main control module obtains the basic remaining capacity at the current moment. Simultaneously, the current operating temperature of the battery is acquired via an NTC temperature sensor with a sampling accuracy of ±1℃, and the sampling interval is consistent with that of the main circuit current. Furthermore, the actual internal resistance of the battery is calculated by combining the real-time changes in the main circuit battery terminal voltage with voltage or current detection circuitry. The main control module first calculates the temperature difference based on preset parameters, that is... , where, when T> hour, It is positive when T < hour, It is negative; based on the temperature difference value. and temperature influence coefficient The temperature correction term is obtained, which is the temperature influence coefficient. Multiply by temperature difference For example, the battery temperature influence coefficient. Taking -0.009 / ℃, at the current temperature T=0℃, If the value is 0.225, it means that at 0℃, due to the low temperature, the battery's usable capacity needs to be reduced by 22.5%.
[0043] Furthermore, the main control module first calculates the internal resistance deviation based on preset parameters, i.e. Among them, when the battery ages or is discharged at a high rate, Greater than , A positive value indicates a brand new battery or a low-rate discharge. Approximately equal to 0; based on the internal resistance deviation and the preset internal resistance influence coefficient. Calculate the internal resistance deviation correction term, which is the internal resistance deviation. Multiply by the internal resistance influence coefficient For example, the influence coefficient of battery internal resistance. Take -0.007 / Ω as the standard internal resistance of the battery. If it is 0.18Ω, then A value of -0.007 indicates that the usable power needs to be reduced by 7% due to increased internal resistance caused by battery aging.
[0044] Furthermore, the temperature correction term and the internal resistance correction term are superimposed and combined with the reference value 1 to obtain the total capacity correction coefficient. If the total correction coefficient is less than 1, it means that under the current operating conditions, the actual usable capacity of the battery is lower than the basic remaining capacity of the coulomb integral, and it needs to be deducted proportionally. If the total correction coefficient is close to 1, it means that the current operating conditions are normal temperature, the battery internal resistance is not deviated, the basic remaining capacity does not need to be significantly corrected, and it is basically consistent with the actual usable capacity.
[0045] Furthermore, the basic remaining charge obtained by the Coulomb integral method is multiplied by the total correction factor to obtain the final accurate remaining charge. The main control module directly transmits this value to the display module and for subsequent power calculations.
[0046] By employing a battery dynamic internal resistance correction algorithm to correct the charge value calculated by the coulomb integration method, accurate charge calculation can be achieved throughout the entire process. Traditional charge calculation does not consider the effect of temperature. At low temperatures, the coulomb integration shows remaining charge, but the sudden increase in battery internal resistance results in the actual inability to release charge (i.e., "phantom charge"). This algorithm, through a temperature correction term, deducts / slightly increases the invalid charge caused by temperature deviation in real time, solving the problem of charge display distortion of power banks under non-standard operating conditions such as outdoor low temperatures and indoor high temperatures. The algorithm, through the internal resistance correction term, can also perform real-time correction of permanent or temporary deviations. The quantitative correction not only solves the problem of discrepancies between the displayed battery level and the actual battery life caused by battery aging after long-term use, but also addresses the calculation deviation caused by the temporary increase in internal resistance when a multi-port power bank discharges at a high rate (such as charging a phone and tablet simultaneously). The correction algorithm is executed at the same frequency as the coulomb integration method (fixed time interval, such as 100ms / time), which can quickly respond to real-time changes in battery temperature and internal resistance (such as when the power bank is moved from a room temperature environment to a low temperature outdoor environment, or when it switches from a single port light load to a multi-port heavy load), avoiding the problem that traditional static correction (fixed coefficient) cannot adapt to changes in operating conditions.
[0047] In this embodiment, by collecting the total charging and discharging current of the main circuit instead of independent multi-port sampling, the error of multi-port data superposition is eliminated, realizing bidirectional detection of charging and discharging, and adapting to all working scenarios; the total charge transfer during charging and discharging is calculated by accumulating the charge transfer using the coulomb integral method to obtain the basic remaining capacity, and dynamic compensation is performed by combining the current battery temperature and actual internal resistance to quantitatively correct the capacity error caused by temperature changes, battery aging, and charge / discharge rate fluctuations, so as to solve the problems of virtual charge and power outage, thereby improving the accuracy of capacity calculation; and single-channel main circuit sampling can effectively simplify the hardware architecture, reduce sampling loss and hardware cost, and balance calculation accuracy and low loss.
[0048] In one embodiment, reference Figure 3 The power calculation algorithm includes the following steps: S13. Based on battery voltage data and total current data of the main circuit, obtain the total power of the main circuit; S14. Calculate the real-time power of each interface according to the power splitting formula.
[0049] The power splitting formula is as follows:
[0050] in, Let i be the power of the i-th interface. The output voltage of the i-th interface The output current of the i-th interface.
[0051] Step 13: The main control module reads the collected real-time battery voltage data and main circuit total current data, and calculates the total power of the main circuit according to the power calculation formula.
[0052] Step 14: The main control module obtains the working enable status, real-time current distribution ratio, or voltage sampling data of each interface, and distributes the total power of the main circuit to each interface according to the actual working load ratio, so as to calculate the real-time power of each interface separately, so that the sum of the power of each interface is equal to the total power. For the single interface working state, the real-time power of the interface is equal to the total power of the main circuit. For the multiple interfaces working at the same time, the power distribution and calculation are completed according to the actual load of each interface, and finally the independent real-time power data of all interfaces are obtained.
[0053] like Figures 4 to 7 As shown, the present invention also provides a specific embodiment of a power calculation system.
[0054] A power and energy display control system is provided to implement the above-mentioned power and energy display control method, with reference to... Figure 4 The power calculation system includes a sampling module 1, an operational amplifier module 2, and a main control module 3. The sampling module 1 is located in the main current loop of the power bank for sampling bidirectional charging and discharging current. The operational amplifier module 2 is connected to the sampling module 1 to amplify the voltage signal across the sampling resistor. The main control module 3 is connected to the output of the operational amplifier module 2 and the power module 4 of the power bank to obtain the sampled current data and the status data of the power module 4. The main control module 3 has a preset power calculation algorithm and a power calculation algorithm to perform power calculation and power calculation based on the sampled current data and the status data of the power module 4. It should be noted that the main control module 3 can use the main control chip that comes with the power bank.
[0055] Specifically, refer to Figures 4 to 7The sampling module 1 uses a small-value alloy sampling resistor R11 connected in series in the main current loop. The power module 4 includes a battery 41 and a lithium protection module 42. The sampling resistor R11 is connected in series at the voltage output terminal of the lithium protection module 42 for sampling the bidirectional current of the power bank's charging and discharging, converting the real-time total current signal of the main loop into a detectable weak voltage signal. The signal input terminal of the operational amplifier module 2 is connected to the sampling module 1 for high-precision differential amplification of the weak voltage signal output by the sampling module 1, amplifying the weak voltage signal to a range recognizable by the main control module 3. Simultaneously, utilizing its own circuit characteristics, it identifies the polarity change of the voltage signal, realizing the monitoring of the charging and discharging current direction, providing a basis for subsequent bidirectional power calculation. The signal output terminal of module 2 is connected to the main control module 3 to transmit the amplified voltage signal to the main control module 3. The main control module 3 is connected to the signal output terminal of the operational amplifier module 2 and the battery 41 of the power bank. On the one hand, it receives the amplified voltage signal transmitted by the operational amplifier module 2 and restores the real-time sampling current data of the main circuit. On the other hand, it collects the status data of the battery 41 (including the real-time voltage, current operating temperature, and actual dynamic internal resistance of the battery 41). Based on the above-mentioned collected data, it completes the basic remaining power calculation and accurate remaining power correction through the built-in pre-stored coulomb integral algorithm and battery dynamic internal resistance correction algorithm. At the same time, it can also calculate the total power and the power of each port, and output the final power and power calculation results.
[0056] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0057] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0058] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the appended claims of the present invention.
Claims
1. A power and energy display control method applied to a mobile power supply, characterized in that, Includes the following steps: Preset power calculation algorithm and energy calculation algorithm; Acquire battery voltage data and total current data of the main circuit, and identify the current direction; The power calculation algorithm is invoked to calculate and display the total power in real time based on battery voltage data, total current data of the main circuit, and current direction. The power calculation algorithm is invoked to calculate and display the real-time power of each interface based on battery voltage data and total current data of the main circuit.
2. The charge and power display control method according to claim 1, wherein It also includes the following steps: The total charging and discharging current of the main circuit is sampled to obtain the sampling voltage signal; The sampled voltage signal is amplified and the total current is calculated to obtain the total current data of the main circuit.
3. The charge and power display control method according to claim 1, wherein The power calculation algorithm includes the following steps: The total current of the main circuit is integrated using the Coulomb integral algorithm to obtain the basic remaining power. Obtain the battery's current operating temperature and current internal resistance; Based on the battery's current operating temperature and internal resistance, a battery dynamic internal resistance correction algorithm is used to dynamically compensate the basic remaining power in real time to obtain an accurate remaining power.
4. The charge and power display control method according to claim 3, wherein The compensation formula for the battery dynamic internal resistance correction algorithm is as follows: wherein, is the corrected accurate remaining power, is the remaining power at time t, is the temperature impact coefficient on the power, T is the current working temperature of the battery, is the battery internal resistance impact coefficient on the power, is the reference temperature, is the current internal resistance of the battery, is the standard internal resistance of the battery; wherein the reference temperature is 25°.
5. The power and energy display control method according to claim 4, characterized in that, The calculation formula for the Coulomb integral algorithm is as follows: in, This represents the remaining battery power at the initial moment. For a moment The total current in the main circuit.
6. The power and energy display control method according to claim 1, characterized in that, The power calculation algorithm includes the following steps: The total power of the main circuit is obtained based on battery voltage data and total current data of the main circuit. The real-time power of each interface is calculated according to the power splitting formula, which is: in, Let i be the power of the i-th interface. The output voltage of the i-th interface The output current of the i-th interface.
7. A power and energy display control system, characterized in that, The method for implementing the power and energy display control method as described in any one of claims 1-6 includes: A sampling module is installed in the main current circuit of the power bank for sampling the bidirectional current of charging and discharging. An operational amplifier module is connected to the sampling module to amplify the voltage signal across the sampling resistor and identify the current direction. The main control module is connected to the output of the operational amplifier module and the battery of the power bank to obtain sampled current data and battery status data. The main control module has a preset power calculation algorithm and a power calculation algorithm to perform power calculation and power calculation based on the sampled current data and battery status data.
8. The power calculation system according to claim 7, characterized in that, The sampling module is an alloy sampling resistor.
9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that: The system stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1-6.