A method for detecting charging and discharging states of a battery pack
By acquiring battery pack voltage signals and using wavelet transform analysis, the problem of battery pack voltage dispersion was solved, reducing hardware costs and complexity, and achieving efficient detection of battery pack charge and discharge status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YISHITE ENERGY STORAGE TECH CO LTD
- Filing Date
- 2025-05-21
- Publication Date
- 2026-05-15
AI Technical Summary
Current detection in existing technologies relies on current sensors, which leads to high hardware costs, increases the pressure of building energy storage systems, and cannot effectively solve the problem of battery pack voltage dispersion.
By collecting battery pack voltage signals, wavelet transform analysis, especially Haar wavelets, combined with multi-scale entropy theory and hierarchical threshold processing, is used to determine the charging and discharging state of the battery pack, reducing reliance on current sensors.
No additional current sensor is required, reducing hardware costs and circuit complexity, simplifying battery pack charge and discharge status detection, and improving detection accuracy and efficiency.
Smart Images

Figure CN120446782B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery testing technology, and in particular to a method for detecting the charge and discharge status of a battery pack. Background Technology
[0002] During the long-term operation of energy storage systems, battery pack voltage dispersion is a critical factor that cannot be ignored. Specifically, due to differences in manufacturing processes, operating environments, and inherent characteristics among individual cells within the battery pack, the voltage performance of each cell varies during charging and discharging, resulting in voltage dispersion. This voltage dispersion has a significant negative impact on the performance of the energy storage system. On the one hand, it causes a substantial decrease in the system's energy utilization rate, preventing the full utilization of energy that could be stored and released, leading to energy waste. On the other hand, it accelerates the overall lifespan degradation of the battery pack, shortens its service life, and increases the system's maintenance and replacement costs.
[0003] To effectively address the issue of voltage dispersion in battery packs, the industry has developed and implemented automatic charging systems. The core working principle of this system lies in its precise detection of battery pack current to accurately determine the charging and discharging state of the battery pack. By monitoring parameters such as the magnitude and direction of the current in real time, the system can clearly determine whether the battery pack is currently charging, discharging, or in an idle state. Based on this, the automatic charging system ensures that when the battery pack is in an idle state, it performs timely charging operations on individual cells with lower voltage, thereby balancing the voltage of each cell within the battery pack, maintaining stable battery pack performance, and extending its lifespan.
[0004] However, in practical engineering applications, there is a pressing issue in current detection. Currently, current detection primarily relies on current sensors. As a high-precision measuring device, current sensors require significant investment in procurement, installation, and maintenance. In real-world engineering cases, to meet the accuracy and stability requirements of energy storage systems, the current sensors used are often quite expensive, potentially adding thousands of yuan to the hardware cost alone. This undoubtedly increases the overall construction cost of energy storage systems, placing considerable economic pressure on their promotion and application.
[0005] Therefore, improvements to existing technologies are necessary.
[0006] The above information is provided as background information only to aid in understanding this disclosure and does not constitute an assertion or admission that any of the above content can be used as prior art relative to this disclosure. Summary of the Invention
[0007] This invention provides a method for detecting the charge and discharge state of a battery pack, in order to solve the problems existing in the prior art.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A method for detecting the charge / discharge state of a battery pack, comprising:
[0010] S1. Acquire battery pack voltage signals and buffer them;
[0011] S2. Perform wavelet transform analysis on the collected signals to determine the charging and discharging state of the battery pack.
[0012] Furthermore, in the battery pack charge / discharge state detection method, in step S1, the sampling frequency is 1-100kHz.
[0013] Furthermore, in the battery pack charge / discharge state detection method, the sampling frequency in step S1 is 10Hz.
[0014] Furthermore, in the battery pack charge / discharge state detection method, in step S1, the caching mechanism adopts a dual-buffered circular queue, that is, it is divided into two buffer areas, namely buffer area A and buffer area B. When buffer area A is full, processing is started. While processing buffer area A, buffer area B is continuously filled to achieve parallel operation.
[0015] Furthermore, in the battery pack charge / discharge state detection method, step S2 includes:
[0016] S21. Select the Haar wavelet as the wavelet basis function;
[0017] S22. Using the Haar wavelet, perform wavelet transform analysis on the collected signal to determine the charging and discharging state of the battery pack.
[0018] Furthermore, in the battery pack charge / discharge state detection method, step S22 includes:
[0019] S221. Perform multi-level wavelet decomposition on the acquired signal and extract the approximation coefficients and detail coefficients of each level.
[0020] S222. Based on the approximation coefficients and detail coefficients obtained from multi-level wavelet decomposition, noise is suppressed by hierarchical thresholding. At the same time, the entropy value and approximate slope are calculated using multi-scale entropy theory to extract the feature information of the signal.
[0021] S223. Compare the entropy value and approximate slope obtained in the feature extraction stage with the set threshold, and determine the charging and discharging state of the battery pack according to different conditions.
[0022] Furthermore, in the battery pack charge / discharge state detection method, step S221 includes:
[0023] S2211. Input the original sampled data array;
[0024] S2212. Check if the length is greater than or equal to an integer power of 2 and is even; otherwise, report an error.
[0025] S2213. The initialization process calculates the array, and its length is equal to that of the original data array;
[0026] S2214. For each layer:
[0027] a. Check if the length is greater than or equal to an integer power of 2 and is even; otherwise, report an error.
[0028] b. Decompose to obtain the approximation coefficients and detail coefficients of the current layer;
[0029] c. Save the approximation coefficients and detail coefficients of the current layer;
[0030] d. Store the calculated array into the updated coefficients, and update the length to half of the original length;
[0031] S2215. After three-level decomposition, approximation coefficients and detail coefficients are obtained.
[0032] Furthermore, in the battery pack charge / discharge state detection method, step S222 includes:
[0033] S2221. Strong noise suppression is applied to the primary detail coefficients while retaining the effective signal components in the higher-level coefficients.
[0034] S2222. Using multi-scale entropy theory, the entropy value H is calculated based on the energy distribution of detail coefficients in each layer, and the approximate slope slope_avg is calculated using approximation coefficients.
[0035] Entropy , D j P represents the detail coefficients of the j-th level. j This represents the energy percentage of the corresponding layer.
[0036] Approximate slope A3 is the approximation coefficient for the third layer.
[0037] Furthermore, in the battery pack charge / discharge state detection method, step S223 includes:
[0038] S2231, compare the entropy value H with the entropy threshold H th Compare the approximate slope slope_avg with the slope threshold S. th Compare;
[0039] S2232. Convert the following comparison results into the charge / discharge state of the battery pack:
[0040] When the approximate slope_avg > - the slope threshold S th And the approximate slope slope_avg < slope threshold S th The battery pack is in a static state;
[0041] When the entropy value H ≥ the entropy threshold H th And the approximate slope slope_avg > slope threshold S th The battery pack is in a charging state;
[0042] When the entropy value H ≥ the entropy threshold H th And the approximate slope slope_avg ≤ - slope threshold S th The battery pack is in a discharged state.
[0043] Furthermore, in the battery pack charge / discharge state detection method, after step S2, the method further includes:
[0044] S3. Output the determined charge / discharge state of the battery pack.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] The present invention provides a method for detecting the charge and discharge state of a battery pack. Since there is no need to install an additional current sensor to detect the current of the battery pack, only the voltage signal of the battery pack needs to be detected, and the charge and discharge state of the battery pack can be analyzed by an algorithm. This method reduces additional hardware, simplifies circuit design, and reduces cost and complexity.
[0047] The present invention has other features and advantages, which will be apparent from or will be set forth in detail in the accompanying drawings and the following detailed description, which together serve to explain the particular principles of the invention. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1This is a schematic flowchart of a battery pack charge / discharge state detection method provided in an embodiment of the present invention;
[0050] Figure 2 yes Figure 1 A detailed flowchart of the S2 process;
[0051] Figure 3 yes Figure 2 A detailed flowchart of the S22 process. Detailed Implementation
[0052] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.
[0053] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.
[0054] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.
[0055] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.
[0056] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.
[0057] Unless otherwise specified, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.
[0058] In this application, expressions such as "greater than", "less than", and "exceeding" are understood to exclude the stated number; expressions such as "above", "below", and "within" are understood to include the stated number. Furthermore, in the description of the embodiments of this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times", unless otherwise explicitly specified.
[0059] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0060] Unless otherwise expressly specified or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this application, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. For those skilled in the art to which this application pertains, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0061] In view of the deficiencies in the existing technology, the applicant, based on years of practical experience and professional knowledge in this field, and in conjunction with theoretical application, has actively conducted research and innovation in order to create a technology that can solve the deficiencies in the existing technology. After continuous research, design, and repeated prototype production and improvement, this invention with practical value has finally been created.
[0062] Please refer to Figure 1 This invention provides a method for detecting the charge and discharge state of a battery pack, comprising:
[0063] S1. Collect the battery pack voltage signal and buffer it.
[0064] It should be noted that in S1, the sampling frequency is 1-100kHz, preferably 10Hz.
[0065] The caching mechanism uses a dual-buffered circular queue, which divides the system into two buffer areas, namely buffer area A and buffer area B. When buffer area A is full, processing begins. While buffer area A is being processed, buffer area B is continuously filled to achieve parallel operation.
[0066] S2. Perform wavelet transform analysis on the collected signals to determine the charging and discharging state of the battery pack.
[0067] Please refer to Figure 2 In one embodiment of this example, step S2 can be further refined to include the following steps:
[0068] S21. Select the Haar wavelet as the wavelet basis function.
[0069] It should be noted that in practical applications of wavelet transform, the selection of wavelet basis functions requires comprehensive consideration of signal characteristics and system resource constraints. Based on the implementation requirements of embedded systems, this embodiment prioritizes the Haar wavelet and selects a three-level decomposition. This wavelet basis function, with its compact support and computational efficiency advantages (requiring only addition, subtraction, and shift operations), significantly reduces the consumption of microprocessor resources while ensuring analysis accuracy.
[0070] S22. Using the Haar wavelet, perform wavelet transform analysis on the collected signal to determine the charging and discharging state of the battery pack.
[0071] Please refer to Figure 3 In one embodiment of this example, step S22 can be further refined to include the following steps:
[0072] S221. Perform multi-level wavelet decomposition on the acquired signal and extract the approximation coefficients and detail coefficients of each level.
[0073] It should be noted that, from a time-frequency analysis perspective, the decomposition levels and frequency components exhibit an inverse correspondence: the detail coefficient D1 of the initial decomposition (first level) corresponds to the highest frequency band of the signal (usually including measurement noise), while the corresponding frequency bandwidth gradually decreases as the decomposition level increases (e.g., D2, D3...). It is worth noting that the frequency resolution of the approximation coefficient C increases exponentially with the depth of the decomposition level; this characteristic allows higher-level approximation coefficients to effectively extract the essential features of the signal.
[0074] S222. Based on the approximation coefficients and detail coefficients obtained from multi-level wavelet decomposition, noise is suppressed by hierarchical thresholding. At the same time, the entropy value and approximate slope are calculated using multi-scale entropy theory to extract the feature information of the signal.
[0075] It should be noted that during signal decomposition, multi-level wavelet transforms generate hierarchical coefficient matrices. Specifically, each decomposition level produces two characteristic components: Approximation Coefficients (C): characterizing the low-frequency baseline components of the signal and reflecting the macroscopic trend characteristics of the signal; and Detail Coefficients (D): recording the high-frequency fluctuation components of the signal, including transient features and noise information.
[0076] This embodiment constructs a hierarchical threshold processing mechanism to implement differentiated processing strategies for coefficient matrices at different levels: strong noise suppression is applied to primary detail coefficients while retaining effective signal components in higher-level coefficients. This physically-based hierarchical processing method successfully avoids signal distortion problems caused by traditional filtering methods while ensuring denoising effectiveness.
[0077] S223. Compare the entropy value and approximate slope obtained in the feature extraction stage with the set threshold, and determine the charging and discharging state of the battery pack according to different conditions.
[0078] In one embodiment of this example, step S221 can be further refined to include the following steps:
[0079] S2211. Input the original sampled data array;
[0080] S2212. Check if the length is greater than or equal to an integer power of 2 and is even; otherwise, report an error.
[0081] S2213. The initialization process calculates the array, and its length is equal to that of the original data array;
[0082] S2214. For each layer:
[0083] a. Check if the length is greater than or equal to an integer power of 2 and is even; otherwise, report an error.
[0084] b. Decompose to obtain the approximation coefficients and detail coefficients of the current layer;
[0085] c. Save the approximation coefficients and detail coefficients of the current layer;
[0086] d. Store the calculated array into the updated coefficients, and update the length to half of the original length;
[0087] S2215. After three-level decomposition, approximation coefficients and detail coefficients are obtained.
[0088] In one embodiment of this example, step S222 can be further refined to include the following steps:
[0089] S2221. Strong noise suppression is applied to the primary detail coefficients while retaining the effective signal components in the higher-level coefficients.
[0090] S2222. Using multi-scale entropy theory, the entropy value H is calculated based on the energy distribution of detail coefficients in each layer, and the approximate slope slope_avg is calculated using approximation coefficients.
[0091] Entropy , , where Dj represents the detail coefficient of the j-th layer and Pj is the energy percentage of the corresponding layer;
[0092] Approximate slope A3 is the approximation coefficient for the third layer.
[0093] In one embodiment of this example, step S223 can be further refined to include the following steps:
[0094] S2231, compare the entropy value H with the entropy threshold H th Compare the approximate slope slope_avg with the slope threshold S. th Compare;
[0095] S2232. Convert the following comparison results into the charge / discharge state of the battery pack:
[0096] When the approximate slope_avg > - the slope threshold S th And the approximate slope slope_avg < slope threshold S th The battery pack is in a static state;
[0097] When the entropy value H ≥ the entropy threshold H th And the approximate slope slope_avg > slope threshold S th The battery pack is in a charging state;
[0098] When the entropy value H ≥ the entropy threshold H thAnd the approximate slope slope_avg ≤ - slope threshold S th The battery pack is in a discharged state.
[0099] It should be noted that the key parameters are:
[0100] Entropy threshold H th =H noise +K*σ H H noise σ was obtained through laboratory calibration (wavelet entropy benchmark value under static state). H Let K be the standard deviation of entropy fluctuation, and K be 3 (covering the 99.7% confidence interval).
[0101] Slope threshold S th =S noise +k*σ S S th σ was obtained through laboratory calibration (approximate absolute value of the slope under static conditions). S To approximate the standard deviation of the slope fluctuation, k is set to 3 (covering the 99.7% confidence interval).
[0102] Understandably, based on the characteristic that battery packs will inevitably switch between resting and idling states during charging and discharging, the slope can be calculated using wavelet algorithms or other conventional methods, and the entropy value can be replaced with the sampling voltage jump amplitude value of the battery pack during charging or discharging. The charging and discharging state can also be determined based on the above judgment conditions, but the wavelet algorithm is more accurate and faster.
[0103] The detection method provided in this embodiment does not require a current sensor. It is the first to use an algorithm to analyze the charge / discharge state of a battery pack, with a preferred wavelet algorithm. It is the first to propose using wavelet entropy and approximate slope as combined criteria for charge / discharge state, and proposes a double-buffered real-time processing architecture based on a circular queue. This method, utilizing the characteristics of entropy value, sampling voltage slope, sampling voltage jump amplitude, and battery pack charge / discharge state switching, achieves battery pack charge / discharge state detection using only an algorithm (preferably the Haar algorithm) without a current sensor. Any design that utilizes this principle for system optimization and modification is also applicable to this patent.
[0104] In one embodiment of this example, after step S2, the method further includes:
[0105] S3. Output the determined charge / discharge state of the battery pack.
[0106] Although this application uses terms such as battery pack and voltage signal frequently, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of the invention; interpreting them as any additional limitation would contradict the spirit of the invention.
[0107] The present invention provides a method for detecting the charge and discharge status of a battery pack. Since there is no need to install an additional current sensor to detect the current of the battery pack, only the voltage signal of the battery pack needs to be detected, and the charge and discharge status of the battery pack can be analyzed by an algorithm. This method reduces additional hardware, simplifies circuit design, and reduces cost and complexity.
[0108] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.
Claims
1. A method for detecting the charge / discharge state of a battery pack, characterized in that, include: S1. Acquire battery pack voltage signals and buffer them; S2. Perform wavelet transform analysis on the collected signals to determine the charging and discharging state of the battery pack; S2 includes: S21. Select the Haar wavelet as the wavelet basis function; S22. Using the Haar wavelet, perform wavelet transform analysis on the collected signal to determine the charging and discharging state of the battery pack; S22 includes: S221. Perform multi-level wavelet decomposition on the acquired signal and extract the approximation coefficients and detail coefficients of each level. S222. Based on the approximation coefficients and detail coefficients obtained from multi-level wavelet decomposition, noise is suppressed by hierarchical thresholding. At the same time, the entropy value and approximate slope are calculated using multi-scale entropy theory to extract the feature information of the signal. S223. Compare the entropy value and approximate slope obtained in the feature extraction stage with the set threshold, and determine the charging and discharging state of the battery pack according to different conditions. S223 includes: S2231, compare the entropy value H with the entropy threshold H th Compare the approximate slope slope_avg with the slope threshold S. th Compare; S2232. Convert the following comparison results into the charge / discharge state of the battery pack: When the approximate slope_avg > - the slope threshold S th And the approximate slope slope_avg < slope threshold S th The battery pack is in a static state; When the entropy value H ≥ the entropy threshold H th And the approximate slope slope_avg > slope threshold S th The battery pack is in a charging state; When the entropy value H ≥ the entropy threshold H th And the approximate slope slope_avg ≤ - slope threshold S th The battery pack is in a discharged state.
2. The battery pack charge / discharge state detection method according to claim 1, characterized in that, In S1, the sampling frequency is 1-100kHz.
3. The battery pack charge / discharge state detection method according to claim 2, characterized in that, In S1, the sampling frequency is 10Hz.
4. The battery pack charge / discharge state detection method according to claim 1, characterized in that, In S1, the caching mechanism adopts a dual-buffered circular queue, which is divided into two buffer areas, namely buffer area A and buffer area B. When buffer area A is full, processing is started. While buffer area A is being processed, buffer area B is continuously filled to achieve parallel operation.
5. The battery pack charge / discharge state detection method according to claim 1, characterized in that, S221 includes: S2211. Input the original sampled data array; S2212. Check if the length is greater than or equal to an integer power of 2 and is even; otherwise, report an error. S2213. The initialization process calculates the array, and its length is equal to that of the original data array; S2214. For each layer: a. Check if the length is greater than or equal to an integer power of 2 and is even; otherwise, report an error. b. Decompose to obtain the approximation coefficients and detail coefficients of the current layer; c. Save the approximation coefficients and detail coefficients of the current layer; d. Store the calculated array into the updated coefficients, and update the length to half of the original length; S2215. After three-level decomposition, approximation coefficients and detail coefficients are obtained.
6. The battery pack charge / discharge state detection method according to claim 1, characterized in that, S222 includes: S2221. Strong noise suppression is applied to the primary detail coefficients while retaining the effective signal components in the higher-level coefficients. S2222. Using multi-scale entropy theory, the entropy value H is calculated based on the energy distribution of detail coefficients in each layer, and the approximate slope slope_avg is calculated using approximation coefficients. Entropy , D j P represents the detail coefficients of the j-th level. j This represents the energy percentage of the corresponding layer. Approximate slope A3 is the approximation coefficient for the third layer.
7. The battery pack charge / discharge state detection method according to claim 1, characterized in that, Following S2, the method further includes: S3. Output the determined charge / discharge state of the battery pack.