Battery charge / discharge status detection methods, battery management systems and storage media
By acquiring reference data from batteries and energy storage devices, and combining membership functions and fuzzy rule tables, the problem of inaccurate battery charging and discharging status determination was solved, achieving higher judgment accuracy and a better user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN POWEROAK NEWENER CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, the determination of battery charge and discharge status relies on the accuracy and stability of current sampling, which makes it impossible to make accurate judgments under certain operating conditions, resulting in low accuracy and a poor user experience.
By obtaining the reference current and reference capacity difference of the battery and the reference power difference of the energy storage device, and combining them with the corresponding membership functions, a fuzzy rule table is constructed to determine the charging and discharging state of the battery, thereby improving the accuracy of the judgment.
It enables accurate determination of battery charging and discharging status under various operating conditions, thus improving the user experience.
Smart Images

Figure CN121856834B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery testing technology, and in particular to a battery charge / discharge state detection method, a battery management system, and a storage medium. Background Technology
[0002] Currently, in most cases, the direction of the battery current is used as a direct basis for determining the battery's charge / discharge state. This method determines the battery's charge / discharge state directly whenever the detected battery current falls within a defined range of charging and discharging currents, based on the magnitude and direction of the battery current. While this method is simple to implement and has low technical requirements, it relies heavily on the accuracy and stability of current sampling. In some operating conditions, the inability to obtain high-precision and stable battery current samples may lead to inaccurate determination of the battery's charge / discharge state, resulting in low accuracy and a poor user experience. Summary of the Invention
[0003] One objective of this application is to provide a battery charge / discharge state detection method, a battery management system, and a storage medium, in order to improve the situation in related technologies where the inability to accurately determine the battery charge / discharge state is due to the inability to sample and obtain high-precision, stable battery current.
[0004] In a first aspect, embodiments of this application provide a method for detecting the charge / discharge state of a battery, comprising: acquiring a reference current and a reference capacity difference of the battery, and a reference power difference of an energy storage device, wherein the reference current is the sum of multiple reference sampling currents obtained by sampling the battery current during a reference sampling time, the reference capacity difference is the difference between a second capacity and a first capacity, the first capacity is the battery capacity value at the start of the reference sampling time, the second capacity is the battery capacity value at the end of the reference sampling time, and the reference power difference is the difference between the input power and the output power of the energy storage device; determining a first fuzzy state corresponding to the reference current based on a first membership function corresponding to the reference current; determining a second fuzzy state corresponding to the reference capacity difference based on a second membership function corresponding to the reference capacity difference; determining a third fuzzy state corresponding to the reference power difference based on a third membership function corresponding to the reference power difference; determining a target state of the battery by defining the comprehensive state corresponding to the first fuzzy state, the second fuzzy state, and the third fuzzy state in a preset fuzzy rule table, wherein the first fuzzy state, the second fuzzy state, the third fuzzy state, and the target state are all one of a charging state, a non-charging / non-discharging state, and a discharging state, and the fuzzy rule table is used to characterize the correspondence between the fuzzy states and the comprehensive state of the battery.
[0005] In some embodiments, obtaining a reference current for the battery includes: obtaining reference data, the reference data including a plurality of reference sampled currents obtained by sampling the current of the battery within a reference sampling time; and determining a reference current based on the sum of the plurality of reference sampled currents.
[0006] In some embodiments, obtaining a reference capacity difference of the battery includes: obtaining candidate data, which includes multiple candidate sampled currents obtained by sampling the battery current within a candidate sampling time, wherein the candidate sampling time is a time period that is prior to and adjacent to the reference sampling time; determining a candidate capacity value of the battery based on the candidate data and the candidate sampling time using an ampere-hour integration method, wherein the candidate capacity value is a first capacity; determining a reference capacity value of the battery based on the reference data and the reference sampling time using an ampere-hour integration method, wherein the reference capacity value is a second capacity; and determining a reference capacity difference based on the difference between the second capacity and the first capacity.
[0007] In some embodiments, obtaining a reference power difference of an energy storage device includes: acquiring electrical data, including input current and output current obtained by sampling the current of the energy storage device within a reference sampling time, and input voltage and output voltage obtained by sampling the voltage of the energy storage device; determining a first initial power based on the product of the input current and the input voltage; determining a second initial power based on the product of the output current and the output voltage; filtering the first initial power and the second initial power to obtain the input power and the output power; and determining a reference power difference based on the difference between the input power and the output power.
[0008] In some embodiments, the first membership function includes a first current boundary value and a second current boundary value, wherein the first current boundary value is less than the second current boundary value. Determining a first fuzzy state corresponding to the reference current based on the first membership function corresponding to the reference current includes: in response to the reference current being less than or equal to the first current boundary value, determining the discharge state represented by the first value of the first membership function as the first fuzzy state corresponding to the reference current; in response to the reference current being greater than the first current boundary value and less than the second current boundary value, determining the non-charging and non-discharging state represented by the second value of the first membership function as the first fuzzy state corresponding to the reference current, wherein the second value of the first membership function is the quotient of the difference between the reference current and the first current boundary value divided by the difference between the second current boundary value and the first current boundary value; and in response to the reference current being greater than or equal to the second current boundary value, determining the charging state represented by the third value of the first membership function as the first fuzzy state corresponding to the reference current.
[0009] In some embodiments, the second membership function includes a first capacity boundary value and a second capacity boundary value, wherein the first capacity boundary value is less than the second capacity boundary value. Determining a second fuzzy state corresponding to the reference capacity difference based on the second membership function corresponding to the reference capacity difference includes: in response to the reference capacity difference being less than or equal to the first capacity boundary value, determining that the discharge state represented by the first value of the second membership function is the second fuzzy state corresponding to the reference capacity difference; in response to the reference capacity difference being greater than the first capacity boundary value and less than the second capacity boundary value, determining that the non-charging and non-discharging state represented by the second value of the second membership function is the second fuzzy state corresponding to the reference capacity difference, wherein the second value of the second membership function is the quotient of the difference between the reference capacity difference and the first capacity boundary value divided by the difference between the second capacity boundary value and the first capacity boundary value; and in response to the reference capacity difference being greater than or equal to the second capacity boundary value, determining that the charging state represented by the third value of the second membership function is the second fuzzy state corresponding to the reference capacity difference.
[0010] In some embodiments, the third membership function includes a first power boundary value and a second power boundary value, wherein the first power boundary value is less than the second power boundary value. Determining the third fuzzy state corresponding to the reference power difference based on the third membership function corresponding to the reference power difference includes: in response to the reference power difference being less than or equal to the first power boundary value, determining the discharge state represented by the first value of the third membership function as the third fuzzy state corresponding to the reference power difference; in response to the reference power difference being greater than the first power boundary value and less than the second power boundary value, determining the non-charging and non-discharging state represented by the second value of the third membership function as the third fuzzy state corresponding to the reference power difference, wherein the second value of the third membership function is the quotient of the difference between the reference power difference and the first power boundary value divided by the difference between the second power boundary value and the first power boundary value; and in response to the reference power difference being greater than or equal to the second power boundary value, determining the charging state represented by the third value of the third membership function as the third fuzzy state corresponding to the reference power difference.
[0011] In some embodiments, the method further includes: constructing a target membership function corresponding to the battery performance parameters based on the gradient membership function; and determining the boundary parameters of the target membership function based on the gradient descent method; wherein the battery performance parameters include a reference current, a reference capacity difference, and a reference power difference; when the battery performance parameter is the reference current, the target membership function is a first membership function; when the battery performance parameter is the reference capacity difference, the target membership function is a second membership function; and when the battery performance parameter is the reference power difference, the target membership function is a third membership function.
[0012] Secondly, embodiments of this application provide a battery management system, including a processor and a memory. The processor is communicatively connected to the memory, and the memory stores computer program instructions executable by the processor. When the computer program instructions are executed by the processor, the battery management system performs the battery charge / discharge state detection method provided in the first aspect.
[0013] Thirdly, embodiments of this application provide a computer-readable storage medium storing processor-executable computer program instructions, which, when executed by the processor, cause the processor to perform the battery charge / discharge state detection method provided in the first aspect.
[0014] The embodiments of this application have the following beneficial effects: Unlike related technologies, the embodiments of this application obtain the reference current and reference capacity difference of the battery, the reference power difference of the energy storage device, and combine the membership functions corresponding to the reference current, reference capacity difference, and reference power difference to determine the fuzzy state corresponding to the reference current, reference capacity difference, and reference power difference. Thus, the final comprehensive state is determined as the target state of the battery based on the fuzzy state corresponding to the reference current, reference capacity difference, and reference power difference. In this way, the charging and discharging state of the battery can be accurately determined, improving the accuracy of the charging and discharging state determination and enhancing the user experience. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the related technologies or embodiments will be briefly introduced below. Obviously, the drawings described below only show some embodiments of this application and should not be considered as limiting the scope of protection. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the structure of a battery state detection system provided in some embodiments of this application;
[0017] Figure 2 This is a schematic diagram of the structure of a battery management system provided in some embodiments of this application;
[0018] Figure 3 This is a flowchart illustrating the battery charge / discharge state detection method in some embodiments of this application;
[0019] Figure 4 yes Figure 3 A schematic diagram of a sub-process of step S31 in the battery charge / discharge state detection method shown in the embodiment;
[0020] Figure 5 yes Figure 3 Another sub-process diagram of step S31 in the battery charge / discharge state detection method shown in the embodiment;
[0021] Figure 6 yes Figure 3 A schematic diagram of another sub-process of step S31 in the battery charge / discharge state detection method shown in the embodiment;
[0022] Figures 7 to 9 This is a statistical chart of battery charge and discharge states in some embodiments of this application. Detailed Implementation
[0023] To make the objectives and advantages of the embodiments of this application more readily understood, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. The detailed description of the embodiments of this application in the accompanying drawings is not intended to limit the scope of protection claimed by this application, but only represents selected embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] It should be noted that, unless there is a conflict, the various technical features involved in the embodiments of this application described below can be combined with each other, and all are within the protection scope of this application. Furthermore, although functional modules are divided in the device or structural schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," "third," and other similar expressions used herein do not limit the data or execution order, but are only for illustrative purposes and to distinguish identical or similar items with substantially the same function and effect, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features.
[0025] Unless otherwise defined, the technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. It should be understood that the term "and / or" as used in this specification includes any and all combinations of one or more of the listed items.
[0026] Currently, in most cases, the direction of the battery current is used as a direct basis for determining the battery's charge / discharge state. This method determines the battery's charge / discharge state directly whenever the detected battery current falls within a defined range of charging and discharging currents, based on the magnitude and direction of the battery current. While this method is simple to implement and has low technical requirements, it relies heavily on the accuracy and stability of current sampling. In some operating conditions, the inability to obtain high-precision and stable battery current samples may lead to inaccurate determination of the battery's charge / discharge state, resulting in low accuracy and a poor user experience.
[0027] The inventors discovered that when using the above method, to prevent frequent switching between charging and discharging states, a relatively wide range of charging and discharging currents needs to be defined. This results in a fuzzy range (i.e., the critical segment of charging and discharging current) where the battery's charging and discharging state cannot be accurately determined. Related technologies directly determine a state of neither charging nor discharging within this fuzzy range, leading to abnormal status display results. When the current is in the critical segment, the actual charging and discharging state of the battery does not match the state determined by this method, resulting in excessive error in state judgment. Narrowing the defined range leads to frequent switching between charging and discharging states, all of which are inconsistent with the actual charging and discharging state of the battery.
[0028] Currently, the above methods can only satisfy the need to determine the charging and discharging state of the battery in the non-critical segment of the defined range. The critical segment lacks a judgment logic algorithm and cannot meet the needs of determining the charging and discharging state of the battery.
[0029] In view of this, embodiments of this application provide a battery charge / discharge state detection method. By acquiring the reference current and reference capacity difference of the battery and the reference power difference of the energy storage device, and combining the membership functions corresponding to the reference current, reference capacity difference, and reference power difference, the fuzzy state corresponding to the reference current, reference capacity difference, and reference power difference is determined. Thus, the final comprehensive state is determined as the target state of the battery based on the fuzzy state corresponding to the reference current, reference capacity difference, and reference power difference. This method can accurately determine the charge / discharge state of the battery, improve the accuracy of charge / discharge state determination, and enhance the user experience.
[0030] Please see Figure 1 , Figure 1 The schematic diagram illustrates the structure of a battery state detection system provided in some embodiments of this application.
[0031] like Figure 1 As shown, the battery state monitoring system 1000 includes a battery management system 100 and an energy storage device 200, the energy storage device 200 including one or more batteries 300. Figure 1 Only one battery 300 is shown; the battery management system 100 is connected to both the energy storage device 200 and the battery 300. It is understood that... Figure 1 Only one battery 300 is shown; in practical applications, there can be multiple batteries 300. It is easy to understand that battery 300 includes rechargeable batteries, lithium batteries, nickel-metal hydride batteries, or any other suitable battery.
[0032] In this embodiment, the battery management system 100 is equipped with a current detection circuit and a voltage detection circuit. The battery management system 100 uses its current detection circuit to sample the current of the battery 300 within a reference sampling time (i.e., to sample the current of the battery 300), obtaining multiple reference sampled currents. The multiple reference sampled currents are summed to obtain the reference current of the battery 300. It should be understood that the multiple reference sampled currents obtained by sampling the current of the battery 300 within the reference sampling time are reference data.
[0033] In this embodiment, the capacity value of battery 300 at the start time of the reference sampling time is obtained by ampere-hour integration method as the first capacity, and the capacity value of battery 300 at the end time of the reference sampling time is obtained by ampere-hour integration method as the second capacity. The reference capacity difference of battery 300 is determined based on the first capacity and the second capacity, that is, the reference capacity difference of battery 300 is equal to the difference between the second capacity and the first capacity.
[0034] In this embodiment, the battery management system 100 uses its current detection circuit and voltage detection circuit to sample and acquire the current and voltage of the energy storage device 200 (i.e., to sample the current and voltage of the battery 300) within a reference sampling time, obtaining the input current, output current, input voltage, and output voltage of the energy storage device 200. The input power of the energy storage device 200 is determined based on its input current and input voltage; that is, the input power of the energy storage device 200 is equal to the product of its input current and input voltage. The output power of the energy storage device 200 is determined based on its output current and output voltage; that is, the output power of the energy storage device 200 is equal to the product of its output current and output voltage. A reference power difference of the energy storage device 200 is determined based on its input power and output power; that is, the reference power difference of the energy storage device 200 is equal to the difference between its input power and output power.
[0035] In some embodiments, a first membership function corresponding to the reference current is obtained based on the reference current of the battery 300, and a first fuzzy state corresponding to the reference current is determined based on the first membership function. A second membership function corresponding to the reference capacity difference is obtained based on the reference capacity difference of the battery 300, and a second fuzzy state corresponding to the reference capacity difference is determined based on the second membership function. A third membership function corresponding to the reference power difference is obtained based on the reference power difference of the energy storage device 200, and a third fuzzy state corresponding to the reference power difference is determined based on the third membership function. Obviously, the first fuzzy state, the second fuzzy state, and the third fuzzy state are all one of the following: charging state, no charging and discharging state, and discharging state.
[0036] In some embodiments, a pre-set fuzzy rule table is obtained, which is used to characterize the correspondence between the fuzzy states and the comprehensive states of the battery. The comprehensive states corresponding to the first, second, and third fuzzy states are found in the fuzzy rule table, and the comprehensive states corresponding to the first, second, and third fuzzy states are determined as the target states of the battery 300. The target state is one of a charging state, a non-charging / non-discharging state, and a discharging state.
[0037] It should be understood that Figure 1 This illustration is merely schematic of the structure of the battery state detection system 1000 and shows one scenario in which the battery management system 100 detects the charge / discharge state of the battery 300 of the energy storage device 200 according to an embodiment of this application. It does not limit the structure, type, or number of the battery management system 100 and the energy storage device 200 in other embodiments. For example, in some other embodiments, there are multiple batteries 300, and the battery management system 100 can detect multiple batteries 300 simultaneously to determine the charge / discharge state of multiple batteries 300.
[0038] To facilitate understanding of the battery charge / discharge state detection method provided in the embodiments of this application, the battery management system provided in the embodiments of this application will be described in detail first.
[0039] Please see Figure 2 , Figure 2 The schematic diagram illustrates the structure of a battery management system provided in some embodiments of this application.
[0040] See Figure 2 As shown, the battery management system 100 includes at least one processor 110 and a memory 120 connected in communication. Figure 2Taking a bus system 130 and a processor 110 as an example, the various components in the battery management system 100 are coupled together through the bus system 130, which is used to realize the connection and communication between the various components. It is easy to understand that the bus system 130 may include not only a data bus, but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity and brevity, in... Figure 2 All buses are labeled as Bus System 130. This is understandable. Figure 2 The structures shown in the embodiments are merely illustrative and do not limit the structure of the battery management system described above. For example, the battery management system may also include... Figure 2 The structure shown has more or fewer components, or has the same as Figure 2 The diagram shows different configurations of the structure.
[0041] Specifically, the processor 110 is configured to provide computational and control capabilities to support the battery management system 100 in executing corresponding business logic and functions. For example, it supports the battery management system 100 in executing the battery charge / discharge state detection method provided in the embodiments of this application, or in executing the steps in any possible implementation of the battery charge / discharge state detection method provided in the embodiments of this application. It should be understood that the processor 110 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0042] The memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, instructions, and modules, such as the program, instructions, and modules corresponding to the battery charge / discharge state detection method in the embodiments of this application. In some embodiments, the memory 120 may include a program storage area and a data storage area. The program storage area may store an operating system, an application program required for at least one function, and the data storage area may store data created according to the use of the processor 110. The processor 110 executes various functional applications and data processing of the battery management system 100 by running the non-transitory software programs, instructions, and modules stored in the memory 120, so as to implement the battery charge / discharge state detection method provided in the embodiments of this application, or execute the steps in any possible implementation of the battery charge / discharge state detection method provided in the embodiments of this application. In some embodiments, the memory 120 may include high-speed random access memory and may also include non-transitory memory. For example, at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 120 may also include memory remotely located relative to the processor 110, and these remotely located memories may be connected to the processor 110 through a communication network. It is understood that examples of the aforementioned communication networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0043] As can be understood from the above, the battery charge / discharge state detection method provided in this application embodiment can be implemented by any suitable type of battery management system with certain computing and control capabilities, such as the battery management system 100 described above. In some feasible implementations, the battery charge / discharge state detection method provided in this application embodiment can be implemented by a processor executing computer program instructions stored in memory.
[0044] The battery charge / discharge state detection method provided in this application will be described in detail below with reference to exemplary applications and implementations of the battery management system provided in the embodiments of this application.
[0045] It is understood that the battery charge / discharge state detection method provided in this application embodiment can be applied to the aforementioned battery management system (e.g., battery management system 100). Specifically, the execution entity of the battery charge / discharge state detection method is one or at least two processors of the battery management system.
[0046] See Figure 3 As shown, in this embodiment of the application, the battery status of the energy storage device is detected through steps S31 to S35.
[0047] Step S31: Obtain the reference current and reference capacity difference of the battery, and the reference power difference of the energy storage device.
[0048] In this embodiment, the reference current is the sum of multiple reference sampled currents obtained by sampling the battery current within a reference sampling time. That is, the reference current is obtained by summing the multiple reference sampled currents obtained by sampling the battery current within the reference sampling time. Here, the reference sampling time refers to the duration for which the battery current data is sampled and acquired.
[0049] In this embodiment, the reference capacity difference is the difference between the second capacity and the first capacity; that is, the reference capacity difference is obtained by subtracting the first capacity from the second capacity. The first capacity is the battery capacity value corresponding to the start time of the reference sampling time, and the second capacity is the battery capacity value corresponding to the end time of the reference sampling time.
[0050] In this embodiment, the reference power difference is the difference between the input power and the output power of the energy storage device, that is, the input power of the energy storage device minus the output power of the energy storage device to obtain the reference power difference.
[0051] For example, in this embodiment of the application, the battery current is continuously sampled within a reference sampling time according to a preset unit time to obtain multiple reference sampling currents. The multiple reference sampling currents are summed to obtain the reference current. Here, the unit time is the interval between sampling the battery current; therefore, the ratio of the reference sampling time to the unit time is the number of samplings (i.e., the number of reference sampling currents obtained).
[0052] For example, reference sampling time unit time The number of sampling times (i.e., the number of reference sampling currents) is calculated. This process involves sampling 500 reference currents. These 500 reference currents are then summed to obtain the battery's reference current.
[0053] Understandably, the reference sampling current obtained through sampling is a signed current. The sign of the reference sampling current (including positive + and negative -) indicates the direction of the current, and the value of the reference sampling current indicates the magnitude of the current. Engineers can set the current direction represented by the sign of the reference sampling current according to actual needs. For example, positive + indicates the first direction of the current, and negative - indicates the second direction of the current, with the first direction being opposite to the second direction. When summing multiple reference sampling currents, the signed reference sampling current is used to calculate the reference current.
[0054] For example, in this embodiment, the battery capacity value corresponding to the start time of the reference sampling time is obtained using the ampere-hour integration method as the first capacity. For instance, the battery current is sampled during a sampling period before the reference sampling time, resulting in multiple sampled currents. The battery capacity value corresponding to the start time of the reference sampling time is obtained by integrating the sampling period and the multiple sampled currents obtained during that period. In this embodiment, the battery capacity value corresponding to the end time of the reference sampling time is obtained using the ampere-hour integration method as the second capacity. That is, the battery capacity value corresponding to the end time of the reference sampling time is obtained by integrating the reference sampling time and the multiple reference sampled currents obtained during the reference sampling period.
[0055] For example, in this embodiment of the application, the current and voltage of the energy storage device are sampled and acquired within a reference sampling time to obtain the input current, output current, input voltage, and output voltage of the energy storage device. The input power of the energy storage device is determined based on the input current and input voltage; that is, the input power of the energy storage device is equal to the product of the input current and the input voltage. The output power of the energy storage device is determined based on the output current and output voltage; that is, the output power of the energy storage device is equal to the product of the output current and the output voltage. A reference power difference is determined based on the input power and output power of the energy storage device; that is, the reference power difference is equal to the difference between the input power and the output power of the energy storage device.
[0056] See Figure 4 As shown, in this embodiment of the application, the reference current of the battery is obtained through steps S311 to S312.
[0057] Step S311: Obtain reference data.
[0058] Step S312: Determine the reference current based on the sum of multiple reference sampled currents.
[0059] In this embodiment, the reference data includes multiple reference sampling currents obtained by sampling the battery current within a reference sampling time.
[0060] In this embodiment, multiple reference sampling currents obtained by sampling the battery current within a reference sampling time are used as reference data. The reference current is determined based on the sum of these multiple reference sampling currents, i.e.: In the formula, This represents the sum of multiple reference sampled currents. This refers to the number of sampling times (i.e., the number of reference sampling currents). For the first One reference sampling current, Less than or equal to And greater than or equal to 1.
[0061] See Figure 5 As shown, in this embodiment of the application, the reference capacity difference of the battery is obtained through steps S313 to S316.
[0062] Step S313: Obtain candidate data.
[0063] In this embodiment, the candidate data includes multiple candidate sampled currents obtained by sampling the battery current within the candidate sampling time. The candidate sampling time is a time period that is prior to and adjacent to the reference sampling time.
[0064] In this embodiment, multiple candidate sampling currents obtained by sampling the battery current during the candidate sampling time are used as candidate data.
[0065] Step S314: Using the ampere-hour integration method, based on the candidate data and candidate sampling time, determine the candidate capacity value of the battery.
[0066] Step S315: Using the ampere-hour integration method, based on the reference data and reference sampling time, determine the reference capacity value of the battery.
[0067] In this embodiment, the candidate capacity value is the first capacity. The formula for calculating the ampere-hour integral is: The candidate sampling time is Time to Sampling time within a given moment For the first One candidate sampling current, The candidate capacity value is calculated by integrating the candidate sampling time with the multiple candidate sampling currents obtained during the candidate sampling time according to the ampere-hour integral formula. The candidate capacity value is the first capacity (i.e., the capacity value of the battery at the end of the candidate sampling time / the capacity value of the battery at the beginning of the reference sampling time).
[0068] In this embodiment, the reference capacity value is the second capacity. The formula for calculating the ampere-hour integral is: The reference sampling time is Time to Sampling time within a given moment For the first One reference sampling current, As a reference capacity value, according to the ampere-hour integral calculation formula, the reference sampling time is integrated with the multiple reference sampling currents obtained during the reference sampling time to obtain the reference capacity value of the battery. The reference capacity value is the second capacity (i.e. the battery capacity value at the end of the reference sampling time).
[0069] Step S316: Determine the reference capacity difference based on the difference between the second capacity and the first capacity.
[0070] In this embodiment, the reference capacity difference is used. Equal to the second capacity With the first capacity The difference, that is: .
[0071] See Figure 6 As shown, in this embodiment of the application, the reference power difference of the energy storage device is obtained through steps S31A to S31E.
[0072] Step S31A: Obtain electrical data.
[0073] In this embodiment, the electrical data includes the input current and output current obtained by sampling the current of the energy storage device within the reference sampling time, and the input voltage and output voltage obtained by sampling the voltage of the energy storage device.
[0074] In this application embodiment, multiple input currents and output currents obtained by sampling the current of the energy storage device within a reference sampling time, and input voltages and output voltages obtained by sampling the voltage of the energy storage device are used as electrical data.
[0075] Step S31B: Determine the first initial power based on the product of the input current and the input voltage.
[0076] Step S31C: Determine the second initial power based on the product of the output current and the output voltage.
[0077] In this embodiment of the application, the first initial power Equal to input current With input voltage The product of, i.e.: .
[0078] In this embodiment of the application, the second initial power Equal to input current With input voltage The product of, i.e.: .
[0079] Step S31D: Filter the first initial power and the second initial power to obtain the input power and the output power.
[0080] The first initial power is obtained through calculation. and the second initial power Then, the first initial power and the second initial power The calculation performs first-order filtering to reduce frequent jitter caused by sampling accuracy issues.
[0081] In this embodiment of the application, the first-order filtering formula is: , in the formula, The first initial power Or the second initial power , This refers to the input or output power of the energy storage device after the previous first-order filtering. This refers to the input or output power of the energy storage device after first-order filtering. These are the first-order filter coefficients. The value can be a number between 0 and 1. In this embodiment, The value is 0.25, that is It is understandable that this first-order filtering is the first time the filter has been applied. .
[0082] This application embodiment will use the first initial power After substituting the values into the first-order filtering formula and filtering, the output is the input power of the energy storage device after this first-order filtering. The embodiments of this application will use the second initial power. After substituting the values into the first-order filtering formula and filtering, the output power of the energy storage device after this first-order filtering is obtained. .
[0083] Step S31E: Determine the reference power difference based on the difference between the input power and the output power.
[0084] In this embodiment, the reference power difference equal to input power With output power The difference, that is: .
[0085] For example, the battery charge / discharge state detection method provided in this application embodiment further includes steps S301 to S302.
[0086] Step S301: Based on the gradient membership function, construct the target membership function corresponding to the battery performance parameters.
[0087] Step S302: Determine the boundary parameters of the target membership function based on the gradient descent method.
[0088] The battery performance parameters include reference current, reference capacity difference, and reference power difference. When the battery performance parameter is the reference current, the target membership function is the first membership function. When the battery performance parameter is the reference capacity difference, the target membership function is the second membership function. When the battery performance parameter is the reference power difference, the target membership function is the third membership function.
[0089] In this embodiment, the solution process for the first membership function, the second membership function, and the third membership function is the same. The following explanation will take the solution of the first membership function as an example.
[0090] For example, in this embodiment of the application, a first membership function corresponding to the reference current is constructed based on the gradient membership function. The boundary parameters (i.e., current boundary values) of the first membership function are determined by using the gradient descent method through a certain number of data and result iterations, and the final first membership function corresponding to the reference current is obtained.
[0091] The following details the process of determining the boundary parameters (i.e., current boundary values) of the first membership function corresponding to the reference current using the gradient descent method.
[0092] First, define the objective function. Measure the predicted output and actual output The difference, in which the predicted output This refers to the preset current value, the actual output. This refers to the reference current. Based on the principle of the gradient descent algorithm, the objective function is defined using the mean square error (MSE). for: , Refers to predicted output and actual output The mean square error between them.
[0093] Secondly, a trapezoidal membership function (i.e., the first membership function) corresponding to the reference current is constructed based on the charging state, the non-charging / non-discharging state, and the discharging state. The first membership function is: , For reference current, , For current boundary values, This represents the function value of the first membership function. It can be understood that the purpose of solving for the first membership function is to ensure that the preset current value (i.e., the predicted output) is achieved each time. Approximately the actual output (i.e., reference current) ), and update the boundary parameters (i.e., current boundary values) of the first membership function. and This process continues until the optimal boundary parameters are finally determined.
[0094] In this embodiment, when the function value of the first membership function is 0, the battery state is a discharge state; that is, the first value of 0 represents the battery state as a discharge state. The function value of the first membership function is a second value between 0 and 1 (i.e.,...). When the value of the first membership function is 1, the battery is in a state of neither charging nor discharging; that is, the second value represents the battery's state of neither charging nor discharging. When the function value of the first membership function is the third value 1, the battery is in a charging state; that is, the third value 1 represents the battery's state of charging.
[0095] Next, the mean square error is calculated based on the first membership function. For current boundary values and The partial derivatives are used to solve for the current boundary values of the first membership function. and The gradient relationship is described. The chain rule is used to calculate the current boundary values. or The total gradient is given below for ease of representation. Represents current boundary value or .
[0096] The chain rule is: The chain rule will be broken down and calculated below.
[0097] ①, about Partly, due to It is about The quadratic function can be the objective function. Direct differentiation yields Formula 1: .
[0098] ②, Regarding part, This depends in part on the fuzzy inference method used. In the embodiments of this application, the predicted output... The function value of the first membership function The relationship is linear, expressed by the following formula: , The proportionality constant of the linear relationship The intercept constant of the linear relationship is given by the formula: right After differentiation, we obtain Formula 2: .
[0099] ③ Regarding Part, when or hour, Since it is a constant, its partial derivative is 0. When At that time, Regarding current boundary values or Taking the derivative, we get Formula 3: Formula 4: .
[0100] ④ Combining Formula 1, Formula 2, and Formula 3, we obtain the current boundary value. The gradient relationship is: Combining Formulas 1, 2, and 4, we obtain the current boundary value. The gradient relationship is: .
[0101] Furthermore, based on the current boundary value and The gradient relationship is used to update the current boundary values using the gradient descent method. and Current boundary value The update function is: Current boundary value The update function is: In the update function, This refers to the learning rate (step size). This determines the current boundary value for each iteration. and The update step size. In this way, it is possible to derive in detail how to adjust the current boundary values using gradient descent. and This makes battery status detection more flexible and adaptable.
[0102] Finally, based on the current boundary value and The update function updates the boundary parameters (i.e., current boundary values) of the first membership function corresponding to the reference current. and The training and learning process is then determined. The training and learning parameters are initialized to facilitate machine learning. The initialized training and learning parameters are as follows: , , Initialize current boundary values. and These are empirical values, to be updated through further learning, such as current boundary values. , Set up training and learning Second-rate( The optimal decision is made according to the training exit criteria, which is: Formula A: Formula B: In formulas A and B, satisfying either one determines the current training iteration. and To determine the optimal current boundary value, the optimal current boundary value is... and By setting the current boundary value as the first membership function, the final first membership function is obtained. The first current boundary value of the first membership function. This is the second current boundary value of the first membership function. Wherein, For the number of training sessions, and Training times The corresponding current boundary value, and Training times Previous training sessions The corresponding current boundary value.
[0103] It is understandable that each update of the boundary parameters (i.e., current boundary values) and After that, predict the output. This will be updated accordingly. The purpose of this application's embodiments is to improve the predicted output. (i.e., the preset current value) continuously approaches the actual output. (i.e., reference current) ), and update boundary parameters and Until the optimal boundary parameters are finally determined. and .
[0104] Step S32: Determine the first fuzzy state corresponding to the reference current based on the first membership function corresponding to the reference current.
[0105] The first membership function includes a first current boundary value and a second current boundary value, wherein the first current boundary value is smaller than the second current boundary value. In this embodiment, the function value of the first membership function corresponding to the reference current is determined based on the relationship between the reference current and the first and second current boundary values, and the first fuzzy state corresponding to the reference current is determined based on the function value of the first membership function corresponding to the reference current.
[0106] For example, in the embodiments of this application, steps S321 to S323 are used to determine the first fuzzy state corresponding to the reference current based on the first membership function corresponding to the reference current.
[0107] Step S321: In response to the reference current being less than or equal to the first current boundary value, determine the discharge state represented by the first value of the first membership function as the first fuzzy state corresponding to the reference current.
[0108] The first membership function is: ,in, For reference current, This is the first current boundary value. This is the second current boundary value. This represents the function value of the first membership function.
[0109] In this embodiment, when the function value of the first membership function is 0, the battery state is a discharge state; that is, the first value of 0 represents the battery state as a discharge state. The function value of the first membership function is a second value between 0 and 1 (i.e.,...). When the value of the first membership function is 1, the battery is in a state of neither charging nor discharging; that is, the second value represents the battery's state of neither charging nor discharging. When the function value of the first membership function is the third value 1, the battery is in a charging state; that is, the third value 1 represents the battery's state of charging.
[0110] In some embodiments, the first current boundary value Second current boundary value When the reference current Less than or equal to the first current boundary value When the function value of the first membership function is 0, the discharge state represented by the first value 0 of the first membership function is determined as the reference current. The corresponding first fuzzy state.
[0111] Step S322: In response to the reference current being greater than the first current boundary value and less than the second current boundary value, determine the non-charging and non-discharging state represented by the second value of the first membership function as the first fuzzy state corresponding to the reference current.
[0112] In this embodiment, the second value of the first membership function is the quotient of the difference between the reference current and the first current boundary value divided by the difference between the second current boundary value and the first current boundary value, which is the second value of the first membership function. .
[0113] Referring to the foregoing embodiments, when the reference current Greater than the first current boundary value And less than the second current boundary value When the function value of the first membership function is the second value, Then determine the second value of the first membership function. The non-charged and non-discharged state is characterized by the reference current. The corresponding first fuzzy state.
[0114] Step S323: In response to the reference current being greater than or equal to the second current boundary value, determine the charging state represented by the third value of the first membership function as the first fuzzy state corresponding to the reference current.
[0115] Referring to the foregoing embodiments, when the reference current Greater than or equal to the second current boundary value At that time, the function value of the first membership function is the third value 1, and the charging state represented by the third value 1 of the first membership function is determined as the reference current. The corresponding first fuzzy state.
[0116] Step S33: Determine the second fuzzy state corresponding to the reference capacity difference based on the second membership function corresponding to the reference capacity difference.
[0117] The second membership function includes a first capacity boundary value and a second capacity boundary value, wherein the first capacity boundary value is smaller than the second capacity boundary value. In this embodiment, the function value of the second membership function corresponding to the reference capacity difference is determined based on the relationship between the reference capacity difference and the first and second capacity boundary values, and the second fuzzy state corresponding to the reference capacity difference is determined based on the function value of the second membership function corresponding to the reference capacity difference.
[0118] For example, in the embodiments of this application, steps S331 to S333 are used to determine the second fuzzy state corresponding to the reference capacity difference based on the second membership function corresponding to the reference capacity difference.
[0119] Step S331: In response to the reference capacity difference being less than or equal to the first capacity boundary value, determine the discharge state represented by the first value of the second membership function as the second fuzzy state corresponding to the reference capacity difference.
[0120] The second membership function is: ,in, For reference capacity difference, This is the first capacity boundary value. This is the second capacity boundary value. This represents the function value of the second membership function.
[0121] In this embodiment, when the function value of the second membership function is the first value 0, the battery state is a discharge state, that is, the first value 0 represents the battery state as a discharge state. When the function value of the second membership function is a second value between 0 and 1 (i.e., ... When the value of the second membership function is 1, the battery state is neither charged nor discharged; that is, the second value represents the battery state as neither charged nor discharged. When the function value of the second membership function is the third value 1, the battery state is charged; that is, the third value 1 represents the battery state as charged.
[0122] In some embodiments, the first capacity boundary value Second capacity boundary value When the reference capacity difference Less than or equal to the first capacity boundary value When the function value of the second membership function is 0, the discharge state represented by the first value of 0 is determined to be the reference capacity difference. The corresponding second fuzzy state.
[0123] Step S332: In response to the reference capacity difference being greater than the first capacity boundary value and less than the second capacity boundary value, determine the unfilled and unreleased state represented by the second value of the second membership function as the second fuzzy state corresponding to the reference capacity difference.
[0124] In this embodiment, the second value of the second membership function is the quotient of the difference between the reference capacity difference and the first capacity boundary value divided by the difference between the second capacity boundary value and the first capacity boundary value, which is the second value of the second membership function. .
[0125] Referring to the foregoing embodiments, when the reference capacity difference Greater than the first capacity boundary value And less than the second capacity boundary value When, the function value of the second membership function is the second value. Then determine the second value of the second membership function. The non-charged and non-discharged state is represented by the reference capacity difference. The corresponding second fuzzy state.
[0126] Step S333: In response to the reference capacity difference being greater than or equal to the second capacity boundary value, determine the charging state represented by the third value of the second membership function as the second fuzzy state corresponding to the reference capacity difference.
[0127] Referring to the foregoing embodiments, when the reference capacity difference Greater than or equal to the second capacity boundary value At that time, the function value of the second membership function is the third value 1, and the charging state represented by the third value 1 of the second membership function is determined to be the reference capacity difference. The corresponding second fuzzy state.
[0128] Step S34: Determine the third fuzzy state corresponding to the reference power difference based on the third membership function corresponding to the reference power difference.
[0129] The third membership function includes a first power boundary value and a second power boundary value, wherein the first power boundary value is smaller than the second power boundary value. In this embodiment, the function value of the third membership function corresponding to the reference power difference is determined based on the relationship between the reference power difference and the first and second capacity boundary values, and the third fuzzy state corresponding to the reference power difference is determined based on the function value of the third membership function corresponding to the reference power difference.
[0130] For example, in the embodiments of this application, steps S341 to S343 are used to determine the third fuzzy state corresponding to the reference power difference based on the third membership function corresponding to the reference power difference.
[0131] Step S341: In response to the reference power difference being less than or equal to the first power boundary value, determine the discharge state represented by the first value of the third membership function as the third fuzzy state corresponding to the reference power difference.
[0132] The third membership function is: ,in, Indicates the reference power difference. This is the first power boundary value. This is the second power boundary value. This represents the function value of the third membership function.
[0133] In this embodiment, when the function value of the third membership function is the first value 0, the battery state is a discharge state, that is, the first value 0 represents the battery state as a discharge state. When the function value of the third membership function is a second value between 0 and 1 (i.e., ... When the value of the second membership function is 1, the battery is in a state of neither charging nor discharging; that is, the second value represents the battery's state of neither charging nor discharging. When the value of the third membership function is 1, the battery is in a charging state; that is, the third value 1 represents the battery's state of charging.
[0134] In some embodiments, the first power boundary value Second power boundary value When the reference power difference Less than or equal to the first power boundary value When the function value of the third membership function is 0 (the first value of the third membership function), the discharge state represented by the first value of 0 is determined to be the reference power difference. The corresponding third fuzzy state.
[0135] Step S342: In response to the reference power difference being greater than the first power boundary value and less than the second power boundary value, determine the non-charge and non-discharge state represented by the second value of the third membership function as the third fuzzy state corresponding to the reference power difference.
[0136] In this embodiment, the second value of the third membership function is the quotient of the difference between the reference power difference and the first power boundary value divided by the difference between the second power boundary value and the first power boundary value.
[0137] In this embodiment, the second value of the third membership function is the quotient of the difference between the reference power difference and the first power boundary value divided by the difference between the second power boundary value and the first power boundary value, which is the second value of the third membership function. .
[0138] Referring to the foregoing embodiments, when the reference power difference Greater than the first power boundary value And less than the second power boundary value When the function value of the third membership function is the second value, Determine the second value of the third membership function. The non-charged and non-discharged state is represented by the reference power difference. The corresponding third fuzzy state.
[0139] Step S343: In response to the reference power difference being greater than or equal to the second power boundary value, determine the charging state represented by the third value of the third membership function as the third fuzzy state corresponding to the reference power difference.
[0140] Referring to the foregoing embodiments, when the reference power difference Greater than or equal to the second power boundary value At that time, the function value of the third membership function is the third value 1, and the charging state represented by the third value 1 of the third membership function is determined to be the reference power difference. The corresponding third fuzzy state.
[0141] Step S35: Determine the target state of the battery as the comprehensive state corresponding to the first fuzzy state, the second fuzzy state, and the third fuzzy state in the preset fuzzy rule table.
[0142] In this embodiment, the first fuzzy state, the second fuzzy state, the third fuzzy state, and the target state are all one of the following: charging state, no charging / discharging state, and discharging state. The fuzzy rule table is used to characterize the correspondence between the fuzzy states and the comprehensive state of the battery.
[0143] In this embodiment, engineers construct a fuzzy rule table in advance based on engineering experience and experimental data. For example, the fuzzy rule table is shown in Table 1 below.
[0144] Table 1:
[0145]
[0146] In Table 1, "holding state" refers to maintaining the battery state at the current moment as the battery state at the previous moment when the overall state is determined to be "holding state." That is, if the battery state at the previous moment was charging, the current battery state is determined to be charging; if the battery state at the previous moment was neither charging nor discharging, the current battery state is determined to be neither charging nor discharging; and if the battery state at the previous moment was discharging, the current battery state is determined to be discharging. It is understood that Table 1 only schematically illustrates the correspondence between the fuzzy states and the overall state of the battery. In other embodiments, a different fuzzy rule table than Table 1 can be constructed. In practical applications, the data in the fuzzy rule table shown in Table 1 can be deleted, modified, or added according to actual needs.
[0147] For example, the comprehensive state corresponding to the first fuzzy state, the second fuzzy state, and the third fuzzy state is found in the fuzzy rule table, and the comprehensive state corresponding to the first fuzzy state, the second fuzzy state, and the third fuzzy state in the fuzzy rule table is determined as the target state of the battery.
[0148] For example, as shown in Table 1, when the first fuzzy state, the second fuzzy state, and the third fuzzy state are respectively the charging state, the discharging state, and the discharging state (i.e., the case corresponding to serial number 5 in Table 1), the fuzzy rule table is searched to determine the comprehensive state corresponding to the charging state, the discharging state, and the discharging state as the discharging state, and the discharging state is determined as the target state of the battery.
[0149] In some embodiments, the finalized, ambiguous target state of the battery is transformed into a precise control command. This application embodiment transforms the battery's target state into a precise control command through a defuzzification process, pre-setting command values corresponding to different battery states, such as 0x00, 0x01, and 0x10 for discharge, no-charge / no-discharge, and charging states, respectively. This application embodiment maps the battery's target state to a specific command value; that is, when the battery's target state is discharge, the discharge state is mapped to command value 0x00; when the battery's target state is no-charge / no-discharge, the discharge state is mapped to command value 0x01; and when the battery's target state is charging, the charging state is mapped to command value 0x10. After defuzzification, the command value is transmitted to the display control chip via a network, enabling the display control chip to accurately display the visualized battery state based on the command value.
[0150] It should be understood that the effectiveness of the battery charge / discharge state detection method provided in this application is affected by factors such as sampling accuracy and boundary settings. It needs to be continuously trained and optimized through experiments. Based on multiple experimental data, the candidate sampling time, reference sampling time, unit time, number of samplings and boundary values (including the first current boundary value, the second current boundary value, the first capacity boundary value, the second capacity boundary value, the first power boundary value and the second power boundary value) should be further adjusted to improve the accuracy and reliability of battery state detection and judgment of energy storage devices.
[0151] In summary, the embodiments of this application obtain the reference current and reference capacity difference of the battery, and the reference power difference of the energy storage device. By combining the membership functions corresponding to the reference current, reference capacity difference, and reference power difference, the fuzzy states corresponding to the reference current, reference capacity difference, and reference power difference are determined. Thus, the final comprehensive state is determined as the target state of the battery based on the fuzzy states corresponding to the reference current, reference capacity difference, and reference power difference. In this way, the charging and discharging state of the battery can be accurately determined, improving the accuracy of the charging and discharging state determination and enhancing the user experience.
[0152] The following examples illustrate the beneficial effects of the embodiments of this application: The battery charge / discharge state detection method provided in this application is applied to an IFR40135 lithium iron phosphate battery with a total rated capacity of 20AH, 1 parallel and 8 series configurations, and a single cell capacity of 20000mAh. Under normal temperature conditions, the statistical chart of the displayed state data obtained from 50W charge / discharge and extreme critical state (ambiguous area of battery current fluctuation) tests is shown below. Figures 7 to 9 As shown.
[0153] according to Figures 7 to 9 This application embodiment can accurately detect the battery's charge / discharge state for a long time when the battery current is not in the fluctuating ambiguity region (i.e., the charge / discharge critical region). When the battery current is near the fluctuating ambiguity region (i.e., the charge / discharge critical region), if the battery current fluctuates too much, there will be false noise. According to the data analysis, among the 5271 data read in three hours when the battery is in a charge / discharge equilibrium state, only 3 data points were incorrect, and the accuracy rate of state judgment was 99.94%. Moreover, this application embodiment significantly reduces the judgment range of the fluctuating ambiguity region, and compared with ordinary methods, it significantly reduces the error rate of battery charge / discharge state judgment and the occurrence rate of frequent state fluctuations.
[0154] This application provides a computer-readable storage medium storing processor-executable computer program instructions. When executed by a processor, the computer program instructions cause the processor to perform steps in any possible implementation of the battery charge / discharge state detection method provided in this application.
[0155] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface memory, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, and an electrically erasable programmable ROM, or any other form of storage medium known in the art, or various devices including one or any combination of the above storage media.
[0156] In some embodiments, computer program instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0157] As an example, computer program instructions may, but do not necessarily, correspond to files in a file system, and may be stored as part of a file that holds other programs or data, for example, in one or more scripts in an HTML (Hypertext Markup Language) document, or in a single file dedicated to the program in question, or in multiple collaborative files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0158] As an example, computer program instructions can be deployed to execute on a single computing device (including devices such as smart terminals and servers), or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. It is readily understood that all or part of the steps of the methods described in the embodiments provided above can be implemented directly using electronic hardware or processor-executable computer program instructions, or a combination of both.
[0159] Those skilled in the art will understand that the embodiments provided in this application are merely illustrative. The order in which the steps in the methods of the embodiments are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged, and deleted according to actual needs. Modules or sub-modules, units or sub-units in the apparatus or system of the embodiments can be merged, divided, and deleted according to actual needs. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0160] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, it can be implemented using hardware. 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. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods.
[0161] It should be noted that the above embodiments are for illustrating the technical concept and features of this application, and are intended to enable those skilled in the art to understand the content of this application and implement it accordingly. They should not be construed as limiting the scope of protection of this application. Those skilled in the art can understand that all or part of the processes of the above embodiments can be implemented, modified according to the technical solutions described in the embodiments of this application, or equivalent substitutions can be made to some of the technical features. It is understood that these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should be considered as equivalent changes and modifications made based on the embodiments of this application, all of which should fall within the scope of the claims of this application.
Claims
1. A method for detecting the charge / discharge state of a battery, characterized in that, The energy storage device includes the battery, and the detection method includes: The reference current and reference capacity difference of the battery, and the reference power difference of the energy storage device are obtained. The reference current is the sum of multiple reference sampling currents obtained by sampling the current of the battery during the reference sampling time. The reference capacity difference is the difference between the second capacity and the first capacity. The first capacity is the capacity value of the battery at the start time of the reference sampling time, and the second capacity is the capacity value of the battery at the end time of the reference sampling time. The reference power difference is the difference between the input power and the output power of the energy storage device. The first fuzzy state corresponding to the reference current is determined based on the first membership function corresponding to the reference current. The second fuzzy state corresponding to the reference capacity difference is determined based on the second membership function corresponding to the reference capacity difference; The third fuzzy state corresponding to the reference power difference is determined based on the third membership function corresponding to the reference power difference; The comprehensive state corresponding to the first fuzzy state, the second fuzzy state, and the third fuzzy state in the preset fuzzy rule table is determined as the target state of the battery. The first fuzzy state, the second fuzzy state, the third fuzzy state, and the target state are all one of the charging state, the non-charging and non-discharging state, and the discharging state. The fuzzy rule table is used to characterize the correspondence between the fuzzy states and the comprehensive state of the battery.
2. The detection method according to claim 1, characterized in that, The step of obtaining the reference current of the battery includes: Acquire reference data, which includes multiple reference sampling currents obtained by sampling the current of the battery within the reference sampling time; The reference current is determined based on the sum of the multiple reference sampled currents.
3. The detection method according to claim 2, characterized in that, The step of obtaining the reference capacity difference of the battery includes: Acquire candidate data, which includes multiple candidate sampled currents obtained by sampling the current of the battery within a candidate sampling time, wherein the candidate sampling time is a time period that is before and adjacent to the reference sampling time; Using the ampere-hour integration method, a candidate capacity value for the battery is determined based on the candidate data and the candidate sampling time, and the candidate capacity value is the first capacity; Using the ampere-hour integration method, a reference capacity value for the battery is determined based on the reference data and the reference sampling time, and the reference capacity value is the second capacity; The reference capacity difference is determined based on the difference between the second capacity and the first capacity.
4. The detection method according to claim 1, characterized in that, The acquisition of the reference power difference value of the energy storage device includes: Acquire electrical data, including input current and output current obtained by sampling the energy storage device during the reference sampling time, and input voltage and output voltage obtained by sampling the energy storage device during the voltage sampling time; The first initial power is determined based on the product of the input current and the input voltage; The second initial power is determined based on the product of the output current and the output voltage; The first initial power and the second initial power are filtered to obtain the input power and the output power; The reference power difference is determined based on the difference between the input power and the output power.
5. The detection method according to claim 1, characterized in that, The first membership function includes a first current boundary value and a second current boundary value, wherein the first current boundary value is less than the second current boundary value. Determining the first fuzzy state corresponding to the reference current based on the first membership function corresponding to the reference current includes: In response to the reference current being less than or equal to the first current boundary value, the discharge state represented by the first value of the first membership function is determined as the first fuzzy state corresponding to the reference current. In response to the reference current being greater than the first current boundary value and less than the second current boundary value, the non-charging and non-discharging state represented by the second value of the first membership function is determined as the first fuzzy state corresponding to the reference current. The second value of the first membership function is the quotient of the difference between the reference current and the first current boundary value divided by the difference between the second current boundary value and the first current boundary value. In response to the reference current being greater than or equal to the second current boundary value, the charging state represented by the third value of the first membership function is determined to be the first fuzzy state corresponding to the reference current.
6. The detection method according to claim 1, characterized in that, The second membership function includes a first capacity boundary value and a second capacity boundary value, wherein the first capacity boundary value is less than the second capacity boundary value. Determining the second fuzzy state corresponding to the reference capacity difference based on the second membership function corresponding to the reference capacity difference includes: In response to the reference capacity difference being less than or equal to the first capacity boundary value, the discharge state represented by the first value of the second membership function is determined to be the second fuzzy state corresponding to the reference capacity difference; In response to the reference capacity difference being greater than the first capacity boundary value and less than the second capacity boundary value, the state of neither charging nor discharging represented by the second value of the second membership function is determined to be the second fuzzy state corresponding to the reference capacity difference. The second value of the second membership function is the quotient of the difference between the reference capacity difference and the first capacity boundary value divided by the difference between the second capacity boundary value and the first capacity boundary value. In response to the reference capacity difference being greater than or equal to the second capacity boundary value, the charging state represented by the third value of the second membership function is determined to be the second fuzzy state corresponding to the reference capacity difference.
7. The detection method according to claim 1, characterized in that, The third membership function includes a first power boundary value and a second power boundary value, wherein the first power boundary value is less than the second power boundary value. Determining the third fuzzy state corresponding to the reference power difference based on the third membership function corresponding to the reference power difference includes: In response to the reference power difference being less than or equal to the first power boundary value, the discharge state represented by the first value of the third membership function is determined to be the third fuzzy state corresponding to the reference power difference; In response to the reference power difference being greater than the first power boundary value and less than the second power boundary value, the non-charge and non-discharge state represented by the second value of the third membership function is determined to be the third fuzzy state corresponding to the reference power difference. The second value of the third membership function is the quotient of the difference between the reference power difference and the first power boundary value divided by the difference between the second power boundary value and the first power boundary value. In response to the reference power difference being greater than or equal to the second power boundary value, the charging state represented by the third value of the third membership function is determined to be the third fuzzy state corresponding to the reference power difference.
8. The detection method according to any one of claims 1-7, characterized in that, The method further includes: Based on the gradient membership function, construct the target membership function corresponding to the battery performance parameters; The boundary parameters of the target membership function are determined based on the gradient descent method. The battery performance parameters include the reference current, the reference capacity difference, and the reference power difference. When the battery performance parameter is the reference current, the target membership function is the first membership function; when the battery performance parameter is the reference capacity difference, the target membership function is the second membership function; and when the battery performance parameter is the reference power difference, the target membership function is the third membership function.
9. A battery management system, characterized in that, The system includes a processor and a memory, the processor being communicatively connected to the memory, the memory storing computer program instructions executable by the processor, and the computer program instructions, when executed by the processor, causing the battery management system to perform the battery charge / discharge state detection method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores processor-executable computer program instructions, which, when executed by the processor, cause the processor to perform the battery charge / discharge state detection method as described in any one of claims 1-8.