This application relates to the field of energy storage device management, and in particular, to a method and apparatus for calculating a discharge remaining time, and a computer device.
The descriptions herein merely provide background information related to this application, and do not necessarily constitute exemplary techniques.
When an energy storage device (such as a battery) is discharging, it is generally calculated based on a current remaining power and discharge current of the energy storage device to obtain a discharge remaining time. However, when the discharge current is sampled, current sampling jitter is likely to occur, which leads to an inaccurate discharge remaining time obtained in subsequent calculations.
According to various embodiments of this application, a method and apparatus for calculating a discharge remaining time, and a computer device are provided.
This application provides a method for calculating a discharge remaining time, applied to an energy storage device, including:
This application further provides an apparatus for calculating a discharge remaining time, applied to an energy storage device, including:
This application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when executing the computer program, the processor implements the steps of any one of the methods described above.
This application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of any one of the methods described above is implemented.
Details of one or more embodiments of this application are set forth in the accompanying drawings and the description below. Other features, purposes and advantages of this application will be apparent from the description, drawings and claims.
To describe technical solutions in embodiments or exemplary techniques of this application more clearly, the following briefly describes the accompanying drawings for describing the embodiments or the exemplary techniques. It is clear that the accompanying drawings in the following description are merely some embodiments of this application, and a person of ordinary skilled in the art may still derive drawings of other embodiments from these accompanying drawings without creative efforts.
The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
To make purposes, technical solutions, and advantages of this application clearer, the following further describes this application in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are intended only to explain this application and are not intended to have a limitation on the application.
Refer to
In this embodiment, a management system of the energy storage device samples the discharge current of the battery module of the energy storage device based on the preset frequency, and after collecting a new discharge current each time, calculates the discharge remaining time based on the discharge current and the remaining power of the energy storage device. In this embodiment, a discharge remaining time at a certain moment is taken as an example to describe in detail. After sampling the discharge current at the current moment, the management system calls a discharge current at an adjacent previous moment. Then, calculate a current difference between the discharge current at the current moment and the discharge current at the previous moment (where the current difference represents an amplitude of change between discharge currents collected at two adjacent moments), and determine whether the current difference is greater than a current threshold. A specific value of the current threshold is set based on standby power consumption of the energy storage device and a sampling error range of the current during standby, and is not specified here. If the current difference between the discharge current at the current moment and the discharge current at the previous moment is not greater than the current threshold, it is considered that the discharge current sampled at the two adjacent moments has not changed, and there is no need to re-perform a first-order filtering calculation of the discharge current. At this time, the management system obtains the target discharge current at the previous moment, and calculates the target discharge current at the previous moment based on the remaining power of the energy storage device at the current moment and the target discharge current at the previous moment, to obtain a discharge remaining time. In this application, the target discharge current represents the discharge current obtained by filtering the discharge current that is output by the battery module of the energy storage device. Specifically, the target discharge current of the discharge current can be obtained by bringing the discharge current of the battery module into a filter formula.
If the current difference between the discharge current at the current moment and the discharge current at the previous moment is greater than the current threshold, it is necessary to calculate a new target discharge current based on the discharge current at the current moment, to enable the target discharge current at the current moment after calculation to be close to an actual current as soon as possible. In this application, a first-order, second-order or high-order filtering algorithm can be used for filtering processing on the discharge current. The first-order filtering and second-order filtering will not have too much lag in data processing. In this application, the first-order filtering algorithm is used to filter the discharge current. In other embodiments, if an amplitude of change in time is required to be more stable, the second-order filtering algorithm or a higher-order filtering algorithm can be used. In this application, the management system calls the first-order filtering algorithm after modifying a filter coefficient, and calculates the target discharge current at the current moment based on the discharge current at the current moment. A general formula of the first-order filtering algorithm is Y(n)=aX(n)+(1−a)Y(n−1), where Y(n) is an output value of this filtering, Y(n−1) is an output value of last filtering, X(n) is a sampling value of this time, and a is the filter coefficient. In an actual application, a corresponding type of sampling value and filter coefficient can be set based on an actual requirement, and no specific limitation is made thereto. Finally, the management system calculates the remaining discharge time based on the target discharge current at the current moment and the remaining power of the energy storage device.
In this embodiment, the management system performs amplitude limiting jitter processing on the sampled discharge current. When the current difference between the discharge current at the current moment and the discharge current at the previous moment is not greater than the current threshold, it is considered that the sampled discharge current has not changed, so the target discharge current at the previous moment is directly used to calculate the discharge remaining time, which is convenient and efficient. However, when the current difference between the discharge current at the current moment and the discharge current at the previous moment is greater than the current threshold, a new target discharge current (that is, the target discharge current at the current moment) is recalculated to make the filtered current close to the actual current as soon as possible, thus improving an update speed and accuracy of the discharge remaining time. It should be noted that in this application, the energy storage device includes a display module, and the display module includes a display screen that can display relevant data based on a preset display mode. After calculating the discharge remaining time of the energy storage device, the management system sends the discharge remaining time to the display module, and the display module will display the discharge remaining time based on the preset display mode. In this application, the management system collects a discharge current of a power module of the energy storage device and calculates a discharge remaining time every 250 milliseconds, and then updates a display value of the display module of the energy storage device every 1 second. In other embodiments, if there is a speed requirement for the calculation of the remaining time, a current sampling frequency and a time calculation frequency can be modified.
Further, the step of filtering the discharge current at the current moment to obtain a target discharge current includes the following steps.
The preset filter formula is: I=K1×I1+(1−K1)×I0, where I represents the target discharge current at the current moment, K1 represents the first filter coefficient, I1 represents the discharge current at the current moment, and I0 represents the discharge current at the previous moment.
In this embodiment, the management system calls the first filter coefficient, and the first filter coefficient is preferably 0.95. The management system substitutes the discharge current at the current moment, the discharge current at the previous moment and the first filter coefficient into the preset filter formula for calculation, to obtain the required target discharge current at the current moment. The preset filter formula is: I=K1×I1+(1−K1)×I0, where I is the target discharge current at the current moment, K1 is the first filter coefficient, I1 is the discharge current at the current moment, and I0 is the discharge current at the previous moment. In this embodiment, 0.95 is preferred as the first filter coefficient with high sensitivity, and the calculated target discharge current at the current moment is less affected by the sampled discharge current at the previous moment, which can be closer to an actual discharge current of the energy storage device to the greatest extent, thus improving the update speed and accuracy of the discharge remaining time.
Further, after the step of calculating a target discharge current at the current moment, the method further includes the following steps.
Preferably, the step of obtaining a target discharge current at the previous moment includes the following steps.
In this embodiment, after calculating the target discharge current at the current moment, the management system stores the target discharge current at the current moment in a pre-constructed target current database. That is, after the target discharge current is calculated each time, the target discharge current is put into the target current database and stored to form a historical record, which is convenient for technicians to retrieve and view when needed. Preferably, in an actual application process, the management system reads a discharge current corresponding to a previous moment adjacent to a current moment from the target current database based on the current moment, and takes the discharge current as the target discharge current at the previous moment, and adds the subsequent discharge remaining time to the calculation.
Further, after the step of collecting a discharge current and remaining power of a battery module of the energy storage device based on a preset frequency, the method includes the following steps.
In this embodiment, the management system determines whether it is the first time to collect the discharge current of the battery module of the energy storage device. If the discharge current of the battery module is collected for the first time, there is no comparison between the discharge current at the previous moment and the discharge current at the current moment. At this time, the management system calls a default second filter system to filter and calculate the discharge current, where the second filter coefficient is smaller than the first filter coefficient, and the second filter coefficient is preferably 0.05, which is less sensitive than the first filter coefficient, but a filtering result is more stable. The management system calculates the target discharge current that is collected for the first time based on the discharge current of the battery module, the second filter coefficient and the preset filter algorithm. Finally, the management system obtains a current remaining power of the energy storage device, divides the current remaining power by the target discharge current that is collected for the first time, and a resulting value is the discharge remaining time of the energy storage device at the current moment. In this embodiment, the preset filter algorithm is a first-order filter algorithm.
Further, the step of calculating the discharge remaining time based on the target discharge current of the discharge current at the current moment includes the following steps.
In this embodiment, the management system obtains the current remaining power of the energy storage device, and substitutes the current remaining power and the target discharge current of the discharge current at the current moment into a calculation formula, to obtain a discharge remaining time. The calculation formula is
Further, after the step of calculating the discharge remaining time of the energy storage device based on the target discharge current at the current moment and the remaining power of the battery module, the method includes the following steps.
In this embodiment, the time threshold is set in the management system. The time threshold represents an alarm limit of the discharge remaining time of the energy storage device, and can be customized by the user as needed. Each time the management system obtains a new discharge remaining time, it will compare the discharge remaining time with the time threshold. The management system determines whether the discharge remaining time is less than the time threshold. If the discharge remaining time is not less than the time threshold, the discharge remaining time is output to the display interface for display without reminding the user, so that the user can timely understand the discharge remaining time of the energy storage device. If the discharge remaining time is less than the time threshold, in order to remind the user, the management system will not only output the discharge remaining time to the display interface, but also perform the reminder action (such as alarm sound, light flashing, etc.) to remind the user, so that the user can timely replace the energy storage device, or charge the energy storage device.
Further, the step of outputting the discharge remaining time of the energy storage device to the display interface, and performing a reminder action includes the following steps.
In this embodiment, the reminder action is preferably to change the display color of the discharge remaining time. Specifically, the management system uses the time threshold as a denominator and the discharge remaining time as a numerator, to calculate the ratio of the discharge remaining time to the time threshold. Then, match the corresponding display color based on the ratio, where an internal database of the management system stores a ratio-display color mapping table, and the ratio-display color mapping table includes a plurality of sets of one-to-one corresponding ratios and display colors. Based on the ratio calculated at the current time, the management system selects the corresponding display color from the ratio-display color mapping table. Then, the discharge remaining time is output to the display interface in a matched display color for display. In this embodiment, by displaying the discharge remaining time in different display colors, the user is enabled to more intuitively understand a change of the discharge remaining time of the energy storage device.
Further, after the step of calculating the discharge remaining time of the energy storage device based on the target discharge current at the current moment and the remaining power of the battery module, the method further includes the following steps.
In this embodiment, the management system sequentially obtains the discharge remaining times at the several adjacent collection time points from a historical records of the discharge remaining time of the energy storage device. The management system calculates the difference between the two adjacent discharge remaining times, and obtains the several time change values. The time change value represents an amplitude of change of the discharge remaining time of the energy storage device. That is, the greater the time change value, the greater the amplitude of change of the discharge remaining time between two adjacent moments. The management system determines whether the attenuation trend of the discharge remaining time increases based on each time change value sorted in order. Specifically, the management system calculates a difference between two adjacent time change values. If the difference is not 0 or greater than an amplitude threshold (where the amplitude threshold is set by a developer based on parameters of the energy storage device and the discharge device), the management system determines that the attenuation trend of the discharge remaining time increases. The management system outputs the prompt information, and the prompt information is used for prompting the user to limit the power of the discharge device connected to the energy storage device, to avoid damage to the energy storage device due to excessive discharge.
Refer to
Further, the third calculation module 4 includes:
The preset filter formula is: I=K1×I1+(1−K1)×I0, where I represents the target discharge current at the current moment, K1 represents the first filter coefficient, I1 represents the discharge current at the current moment, and I0 represents the discharge current at the previous moment.
Further, the third calculation module 4 further includes:
Further, the second calculation module 3 includes:
Further, as shown in
Further, the apparatus for calculating a discharge remaining time includes:
Further, the reminder module includes:
Further, the apparatus for calculating a discharge remaining time further includes:
In this embodiment, each module and unit in the apparatus is obtained to correspondingly execute each step in the foregoing method for calculating a discharge remaining time, and the specific implementation process is not described in detail here.
This embodiment provides an apparatus for calculating a discharge remaining time. For the beneficial effects of the apparatus for calculating a discharge remaining time performing the method for calculating a discharge remaining time, reference may be made to any of the foregoing embodiments. The apparatus for calculating a discharge remaining time may be provided in the energy storage device. The apparatus for calculating a discharge remaining time may obtain a discharge current and remaining power of a battery module of the energy storage device, and calculate a discharge remaining time of the battery module accordingly.
Refer to
An embodiment of this application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the method for calculating a discharge remaining time provided by any of the foregoing embodiments is implemented. A person of ordinary skill in the art may understand that all or some of the processes of the method embodiments may be implemented by instructing relevant hardware through a computer program. The computer program may be stored in a non-volatile computer-readable storage medium. When executed, the computer program may include the processes of the foregoing method embodiments. Any references to memories, storage, databases or other media provided in this application and used in embodiments may include a non-volatile and/or volatile memory. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM) or an external cache. As an illustration rather than a limitation, the RAM is available in many forms, such as a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), a double data rate SDRAM (DDRSDRAM), an enhanced SDRAM (ESDRAM), a synchlink (Synchlink) DRAM (SLDRAM), a rambus (Rambus) direct RAM (RDRAM), a direct rambus dynamic RAM (DRDRAM), and a rambus dynamic RAM (RDRAM).
It should be noted that the terms “include”, “comprise”, or any other variation thereof in this specification is intended to cover a non-exclusive inclusion, such that processes, apparatuses, first objects or methods including a series of elements not only include those elements, but also other elements not expressly listed or elements inherent to the processes, apparatuses, first objects or methods. Without more limitations, elements defined by the sentence “including one . . . ” does not exclude that there are still other same elements in the processes, apparatuses, first objects, or methods including the elements.
The above are only preferred embodiments of this application, and do not limit the patent scope of this application. Any equivalent structure or equivalent process transformation that is made using the contents of the specification and the accompanying drawings of this application, or directly or indirectly used in other related technical fields is equally included in the patent protection scope of this application.
Number | Date | Country | Kind |
---|---|---|---|
202110763349.0 | Jul 2021 | CN | national |
This application is a continuation application of PCT patent application No. PCT/CN2022/093236, filed on May 17, 2022, which claims priority to Chinese Patent Application No. 202110763349.0, filed on Jul. 6, 2021, which is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2022/093236 | May 2022 | US |
Child | 18404595 | US |