Battery state identification method and device, electronic equipment, storage medium and product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUOFENGSHU INTELLIGENT SOURCE SOFTWARE TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-06-12
- Publication Date
- 2026-08-04
AI Technical Summary
然而,实际应用中传感器噪声、电磁干扰、温度漂移等多种因素的影响,使得电流测量值存在随机波动,进而导致基于电流测量值确定的电池状态不稳定,容易产生大量虚假的短时充放电事件,严重干扰后续的循环计数和健康状态评估等电池管理
[0014] The beneficial effects of this application embodiment compared with the prior art are as follows: By determining the median absolute deviation of the current sequence and dynamically generating a state determination threshold based on the median absolute deviation, the state determination threshold can be automatically adjusted according to the real-time noise level of the current signal. Then, based on the current value at each sampling moment in the current sequence and the state determination threshold, an initial state sequence is determined, reducing frequent misjudgments of charging and discharging states caused by sensor noise or environmental interference. On this basis, the initial state sequence is processed to ensure that the state values corresponding to multiple consecutive sampling moments in the obtained target state sequence are the same, and the number of such consecutive sampling moments is greater than a quantity threshold. This further eliminates transient state jumps caused by accidental noise, outputting a continuous, stable, and accurate target state sequence, which can accurately identify the charging and discharging state of the battery.
Smart Images

Figure CN122506399A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of battery technology, and in particular relates to a battery state identification method, device, electronic device, storage medium and product. Background Technology
[0002] In battery management systems, accurate identification of charge / discharge state is fundamental for battery state assessment, cycle life statistics, and health status estimation. However, in practical applications, various factors such as sensor noise, electromagnetic interference, and temperature drift cause random fluctuations in current measurements. This leads to instability in the battery state determined based on current measurements, easily generating numerous false short-term charge / discharge events, severely interfering with subsequent battery management processes such as cycle counting and health status assessment. Therefore, accurately identifying the charge / discharge state of a battery is a pressing technical problem that needs to be solved in this field. Summary of the Invention
[0003] This application provides a battery state identification method, device, electronic device, storage medium, and product that can accurately identify the charge and discharge state of a battery.
[0004] In a first aspect, embodiments of this application provide a battery state identification method, including: Determine the median absolute deviation of the current sequence corresponding to the battery to be identified, wherein the current sequence includes current values at multiple consecutive sampling times; The state determination threshold is determined based on the absolute deviation of the median, and the state determination threshold includes a discharge current threshold and / or a charging current threshold. Based on the current value at each sampling time and the state determination threshold, an initial state sequence is determined. Each state value in the initial state sequence is used to indicate the initial state of the battery to be identified at each sampling time. The initial state is a charging state, a discharging state, and a resting state. The initial state sequence is processed to determine the target state sequence, wherein the state values corresponding to multiple consecutive sampling times in the target state sequence are the same, and the number of the multiple consecutive sampling times is greater than a number threshold. Each state value in the target state sequence is used to indicate the target state of the battery to be identified at each sampling time.
[0005] In one possible implementation of the first aspect, determining the state determination threshold based on the absolute deviation of the median includes: The noise standard deviation is determined based on the absolute deviation of the median. The candidate current threshold is determined based on the noise standard deviation; If the candidate current threshold is greater than the preset noise threshold of the battery to be identified, the candidate current threshold is determined as the discharge current threshold, and the negative of the candidate current threshold is determined as the charging current threshold. If the candidate current threshold is less than the preset noise threshold, the preset noise threshold is determined as the discharge current threshold, and the negative of the preset noise threshold is determined as the charging current threshold.
[0006] In one possible implementation of the first aspect, processing the initial state sequence to determine the target state sequence includes: Based on the initial state sequence, a charging state sequence and a discharging state sequence are determined. The charging state sequence includes a state value corresponding to the charging state and a state value corresponding to the resting state. The discharging state sequence includes a state value corresponding to the discharging state and a state value corresponding to the resting state. If a first subsequence exists in the charging state sequence, the state value of the first subsequence in the charging state sequence is updated to another state value in the charging state sequence that is different from the state value of the first subsequence, so as to obtain an updated charging state sequence. The first subsequence contains state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than a number threshold. If a second subsequence exists in the discharge state sequence, the state value of the second subsequence in the discharge state sequence is updated to another state value in the discharge state sequence that is different from the state value of the second subsequence, to obtain an updated discharge state sequence. The second subsequence contains state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than a number threshold. The target state sequence is determined based on the updated charging state sequence and the updated discharging state sequence.
[0007] In one possible implementation of the first aspect, before processing the initial state sequence to determine the target state sequence, the method further includes: Determine the rated charge / discharge rate, rated minimum charge / discharge depth, and sampling rate corresponding to the current sequence for the battery to be identified. The quantity threshold is determined based on the rated charge / discharge rate, the rated minimum charge / discharge depth, and the sampling rate.
[0008] In one possible implementation of the first aspect, after processing the initial state sequence to determine the target state sequence, the method further includes: Determine a voltage sequence synchronized with the current sequence, the voltage sequence comprising voltage values at multiple consecutive sampling times; Based on the voltage sequence, a voltage slope sequence is determined, which includes the voltage slope corresponding to each sampling time. The target state sequence is updated based on the voltage slope sequence and the voltage slope interval corresponding to each state; The updated target state sequence is processed to determine an optimized target state sequence, wherein the state values corresponding to multiple consecutive sampling times are the same and the number of consecutive sampling times is greater than the number threshold.
[0009] In one possible implementation of the first aspect, after processing the updated target state sequence to determine the optimized target state sequence, the method further includes: Determine the charging end point and discharging end point in the optimized target state sequence; The nearest charging end point between the discharge end point and the discharge end point is determined as the charging end point paired with the discharge end point; The charging time period corresponding to the charging end point in the optimized target state sequence, and the discharging time period corresponding to the discharging end point paired with the charging end point, are determined as a complete charging and discharging cycle.
[0010] Secondly, embodiments of this application provide a battery state identification device, including: The first determining module is used to determine the median absolute deviation of the current sequence of the battery to be identified, wherein the current sequence includes current values at multiple consecutive sampling times; The second determining module is used to determine a state determination threshold based on the absolute deviation of the median, wherein the state determination threshold includes a discharge current threshold and / or a charging current threshold. The third determining module is used to determine an initial state sequence based on the current value at each sampling time and the state determination threshold. Each state value in the initial state sequence is used to indicate the initial state of the battery to be identified at each sampling time. The initial state is a charging state, a discharging state, or a resting state. The processing module is used to process the initial state sequence to determine the target state sequence, wherein the state values corresponding to multiple consecutive sampling times in the target state sequence are the same and the number of the multiple consecutive sampling times is greater than a number threshold, and each state value in the target state sequence is used to indicate the target state of the battery to be identified at each sampling time.
[0011] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the steps of the method as described in any of the first aspects above.
[0012] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computer, implements the method steps as described in any one of the first aspects above.
[0013] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when run, implements the method steps as described in any one of the first aspects above.
[0014] The beneficial effects of this application embodiment compared with the prior art are as follows: By determining the median absolute deviation of the current sequence and dynamically generating a state determination threshold based on the median absolute deviation, the state determination threshold can be automatically adjusted according to the real-time noise level of the current signal. Then, based on the current value at each sampling moment in the current sequence and the state determination threshold, an initial state sequence is determined, reducing frequent misjudgments of charging and discharging states caused by sensor noise or environmental interference. On this basis, the initial state sequence is processed to ensure that the state values corresponding to multiple consecutive sampling moments in the obtained target state sequence are the same, and the number of such consecutive sampling moments is greater than a quantity threshold. This further eliminates transient state jumps caused by accidental noise, outputting a continuous, stable, and accurate target state sequence, which can accurately identify the charging and discharging state of the battery. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application; Figure 2 This is a schematic flowchart of a battery state identification method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a method for determining a target state sequence provided in an embodiment of this application; Figure 4 This is a schematic diagram of a process for optimizing a target state sequence, provided as an embodiment of this application. Figure 5 This is a schematic diagram of the battery status identification device provided in the embodiments of this application. Detailed Implementation
[0017] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0018] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0019] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0020] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0021] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0022] This application provides a battery state identification method. By determining the median absolute deviation of a current sequence and dynamically generating a state determination threshold based on this deviation, the state determination threshold can be automatically adjusted according to the real-time noise level of the current signal. Then, based on the current value at each sampling moment in the current sequence and the state determination threshold, an initial state sequence is determined, reducing frequent misjudgments of charge / discharge states caused by sensor noise or environmental interference. Furthermore, the initial state sequence is processed to ensure that the state values corresponding to multiple consecutive sampling moments in the resulting target state sequence are identical, and the number of consecutive sampling moments exceeds a threshold. This further eliminates transient state jumps caused by accidental noise, outputting a continuous, stable, and accurate target state sequence, which can accurately identify the battery's charge / discharge state.
[0023] The battery state identification method provided in this application can be applied to various energy storage systems and electric devices that require monitoring battery charging and discharging behavior. Specifically, it includes, but is not limited to: battery management systems for large-scale energy storage power stations, used to identify the charging and discharging status of battery clusters in real time, count the number of cycles, and assess health status; commercial and industrial energy storage systems, used to analyze user-side energy usage behavior and optimize charging and discharging strategies; residential energy storage devices, used to monitor the daily charging and discharging patterns of batteries and predict remaining lifespan; electric vehicle battery management systems, used to identify charging and discharging events during driving and calculate driving range; and battery cascade utilization detection scenarios, used to assess the remaining value of retired batteries.
[0024] The battery status identification method provided in this application can be applied to electronic devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, desktop computers, servers, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not impose any restrictions on the specific type of electronic device.
[0025] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 1 As shown, the electronic device 10 of this embodiment includes: at least one processor 100 ( Figure 1 (Only one is shown in the diagram), memory 101, and computer program 102 stored in said memory 101 and executable on at least one processor 100, wherein the processor 100 executes computer program 102 to implement the steps in any of the above method embodiments.
[0026] The electronic device may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will understand that... Figure 1 This is merely an example of electronic device 10 and does not constitute a limitation on electronic device 10. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0027] The processor 100 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0028] In some embodiments, memory 101 may be an internal storage unit of electronic device 6, such as a hard disk or memory of electronic device 10. In other embodiments, memory 101 may be an external storage device of electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on electronic device 10. Furthermore, memory 101 may include both internal and external storage units of electronic device 10. Memory 101 is used to store operating system, applications, bootloader, data, and other programs, such as program code of computer programs. Memory 101 may also be used to temporarily store data that has been output or will be output.
[0029] Please see Figure 2 , Figure 2 The flowchart illustrating a battery state identification method provided in an embodiment of this application is shown as an example and not a limitation. The method includes the following steps: S201, determine the median absolute deviation of the current sequence corresponding to the battery to be identified, the current sequence includes the current values at multiple consecutive sampling times.
[0030] The battery to be identified can be a single battery cell, battery module, or battery pack that requires identification of its charge / discharge status.
[0031] The current sequence comprises an array of current values from multiple consecutive sampling times, representing the change in current of the identified battery over time. In one possible implementation, a current sensor can be used to collect real-time current values of the battery at a fixed sampling frequency, generating a time-ordered current sequence. For example, the sampling frequency could be 10 Hz, 100 Hz, etc.
[0032] Among them, the Median Absolute Deviation (MAD) can be used to measure the dispersion of a current series.
[0033] In one possible implementation, the absolute deviation of the median is calculated as follows: first, the median value of the current series is calculated; then, the absolute deviation of each current value from the median is calculated; the median of these absolute deviations is the absolute deviation of the median. The calculation formula can be:
[0034] in, The median of the current sequence. Let be the i-th current value in the current sequence, and n be the number of current values in the current sequence.
[0035] S202, determine the state determination threshold based on the median absolute deviation, the state determination threshold includes the discharge current threshold and / or the charging current threshold.
[0036] Among them, the state determination threshold is used to distinguish the current boundary value of charging state, discharging state and stationary state.
[0037] The discharge current threshold can be the minimum positive current value used to determine the discharge state of the battery to be identified. For example, if the current value at the sampling time is greater than the discharge current threshold, the initial state at the sampling time is determined to be the discharge state.
[0038] The charging current threshold can be the maximum negative current value used to determine if the battery has entered the charging state. For example, if the current value at the sampling time is less than the charging current threshold, the initial state at the sampling time is determined to be the charging state.
[0039] If the current value at the sampling time is greater than or equal to the charging current threshold and less than or equal to the discharging current threshold, the initial state at the sampling time is determined to be a static state.
[0040] In one possible implementation, the noise standard deviation can be determined based on the median absolute deviation, and then the candidate current threshold can be determined based on the noise standard deviation. If the candidate current threshold is greater than the preset noise threshold of the battery to be identified, the candidate current threshold is determined as the discharge current threshold, and the negative of the candidate current threshold is determined as the charging current threshold. When the candidate current threshold is less than the preset noise threshold, the preset noise threshold is determined as the discharge current threshold, and the negative of the preset noise threshold is determined as the charging current threshold. Thus, the noise standard deviation is determined based on the absolute deviation of the median, and the candidate current threshold is determined based on the noise standard deviation. This allows the determined candidate current threshold to dynamically adapt to the actual noise level. Furthermore, the preset noise threshold is introduced as a lower limit to prevent small fluctuations such as sensor zero-point drift from being misjudged as charging / discharging events in extremely low-noise environments. Through this dual guarantee mechanism of adaptive threshold and taking the larger of the engineering lower limit, both the sensitivity of the adaptive threshold and stability under various extreme operating conditions are maintained.
[0041] Among them, the noise standard deviation can reflect the standard deviation of the random noise component in the current sequence, representing the fluctuation amplitude of the noise.
[0042] It should be noted that, assuming the current noise follows a standard normal distribution, half of the data falls within [ Within the interval [0.6745, +0.6745], the boundary value 0.6745 is exactly the 75th percentile. In the standard normal distribution, the 75th percentile ≈ μ + 0.6745σ, where μ is the mean and σ is the noise standard deviation; therefore, MAD = 0.6745σ; conversely, Therefore, the noise standard deviation can be expressed as the absolute deviation of the median and... The product of the current noise and the current noise. For example, if MAD = 0.01 amperes (A), then: σ≈1.4826×0.01=0.014826A, which means that the current noise is approximately ±0.014826A.
[0043] In one possible implementation, the candidate current threshold can be the product of a confidence factor and the noise standard deviation. The confidence factor can range from [2, 4].
[0044] The preset noise threshold can be a minimum allowable current threshold pre-set in engineering to prevent misjudgment caused by the threshold approaching 0 when the noise standard deviation is too small. In one possible implementation, the preset noise threshold can be determined based on the accuracy of the current sensor, the level of electromagnetic interference, and engineering experience, and is typically set to 0.005A, 0.01A, etc. This application does not limit this.
[0045] S203. Based on the current value and state determination threshold at each sampling time, determine the initial state sequence. Each state value in the initial state sequence is used to indicate the initial state of the battery to be identified at each sampling time.
[0046] The initial state can be a charging state, a discharging state, or a stationary state.
[0047] The initial state sequence consists of a one-dimensional sequence of initial state values at each sampling time arranged in chronological order, with the same length as the current sequence.
[0048] In one possible implementation, the current value corresponding to each sampling moment in the current sequence is compared with the state determination threshold to obtain the corresponding initial state value, and the initial state values corresponding to multiple sampling moments are arranged in chronological order to form an initial state sequence.
[0049] The state value can be a numerical code representing the battery's operating state, with different values corresponding to different battery states. For example, a state value of 0 corresponds to a resting state, a state value of 1 corresponds to a charging state, and a state value of -1 corresponds to a discharging state. Alternatively, a state value of 0 corresponds to a resting state, a state value of 2 corresponds to a charging state, and a state value of 4 corresponds to a discharging state. This application does not limit this.
[0050] S204, process the initial state sequence to determine the target state sequence. The target state sequence has the same state value corresponding to multiple consecutive sampling times, and the number of consecutive sampling times is greater than the number threshold. Each state value in the target state sequence is used to indicate the target state of the battery to be identified at each sampling time.
[0051] In one example, the target state sequence is a battery state sequence obtained by de-jittering the initial state sequence, retaining stable charge and discharge events with a sufficiently long duration, and eliminating state jumps caused by brief noise interference.
[0052] The quantity threshold is the minimum number of consecutive sampling points required to determine a valid charge / discharge event, corresponding to the minimum duration of the charge / discharge event. The minimum duration of a charge / discharge event refers to the shortest time required to determine that a single charge / discharge event is a valid event.
[0053] In one possible implementation, the rated charge / discharge rate, rated minimum charge / discharge depth, and sampling rate corresponding to the current sequence of the battery to be identified are determined; based on the rated charge / discharge rate, rated minimum charge / discharge depth, and sampling rate, a quantity threshold is determined. The calculation formula for the quantity threshold can be:
[0054] The rated charge / discharge rate is the multiple of the rated capacity that the battery can charge / discharge per unit time under rated operating conditions; the higher the rate, the faster the charge / discharge speed.
[0055] The rated minimum depth of charge / discharge is the minimum depth of charge / discharge required to determine a valid charge / discharge event. It refers to the percentage of the charged / discharged capacity relative to the battery's rated capacity, and can range from 0.1% to 1%.
[0056] Therefore, the quantity threshold can be deeply bound to the physical characteristics of the battery to be identified, making the determined quantity threshold more reasonable. Based on this quantity threshold, the state in the initial state sequence can be updated more accurately to filter out abnormal states caused by non-physical noise, thereby improving the accuracy of the determined target state sequence.
[0057] In another possible implementation, the quantity threshold can be determined based on the minimum duration and sampling rate corresponding to the preset charge / discharge event.
[0058] In one possible implementation, the state values of the target sequence in the initial state sequence are sequentially updated to the state value preceding the starting position of the target sequence to obtain the target state sequence. The number of state values in the target sequence is less than a threshold, and the state values are identical. It should be noted that all target sequences are processed strictly in left-to-right chronological order, and the update result of the previous target sequence is used as the basis for processing the next target sequence.
[0059] For example, with a quantity threshold of 3, a state value of 0 represents a static state, a state value of 2 represents a charging state, and a state value of 4 represents a discharging state. The initial state sequence is [0,0,0,0,2,4,4,4,0,0,0,4,0]. First, update the fifth position 2 in the initial state sequence to 0, and then update the twelfth position 4 to 0 to obtain the target state sequence [0,0,0,0,0,4,4,4,0,0,0,0,0].
[0060] In this embodiment, by determining the median absolute deviation of the current sequence and dynamically generating a state determination threshold based on the median absolute deviation, the state determination threshold can be automatically adjusted according to the real-time noise level of the current signal. Then, based on the current value at each sampling moment in the current sequence and the state determination threshold, an initial state sequence is determined, reducing frequent misjudgments of charge / discharge states caused by sensor noise or environmental interference. Furthermore, the initial state sequence is processed to ensure that the state values corresponding to multiple consecutive sampling moments in the resulting target state sequence are identical, and the number of consecutive sampling moments exceeds a threshold. This further eliminates transient state jumps caused by accidental noise, outputting a continuous, stable, and accurate target state sequence, which can accurately identify the battery's charge / discharge state.
[0061] Please see Figure 3 , Figure 3This is a flowchart illustrating a method for determining a target state sequence according to an embodiment of this application. Step S204 involves processing the initial state sequence to determine the target state sequence, including: S301, based on the initial state sequence, determine the charging state sequence and the discharging state sequence. The charging state sequence includes the state value corresponding to the charging state and the state value corresponding to the resting state. The discharging state sequence includes the state value corresponding to the discharging state and the state value corresponding to the resting state.
[0062] In one possible implementation, the discharge state in the initial state sequence is replaced with the rest state to obtain the charging state sequence.
[0063] In one possible implementation, the charging state in the initial state sequence is replaced with the resting state to obtain the discharging state sequence.
[0064] For example, if the initial state sequence is [0,0,0,2,2,2,0,4,4,0,2,0], then the charging state sequence is [0,0,0,2,2,2,0,0,0,0,2,0], and the discharging state sequence is [0,0,0,0,0,0,0,4,4,0,0,0].
[0065] S302, if there is a first subsequence in the charging state sequence, update the state value of the first subsequence in the charging state sequence to another state value in the charging state sequence that is different from the state value of the first subsequence, and obtain the updated charging state sequence. The first subsequence contains the state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than the number threshold.
[0066] It should be noted that updating the charging state sequence is an iterative process. The charging state sequence is traversed for the first time to find the first subsequence and update the state value of the first subsequence. The charging state sequence after the first update is traversed for the second time to redetermine the first subsequence and update the state value of the first subsequence determined in the second traversal, until there is no first subsequence in the updated charging state sequence.
[0067] For example, the charging state sequence is [0,0,0,2,2,2,0,0,2,0,2,0], the quantity threshold is 3, the first subsequence is the tenth position [2], replace the 2 in the tenth position with 0, and get [0,0,0,2,2,2,0,0,0,0,2,0]. Re-traverse to determine the first subsequence is the twelfth position [2], replace the 2 in the twelfth position with 0, and get the updated charging state sequence [0,0,0,2,2,2,0,0,0,0,0,0].
[0068] In another possible implementation, after determining the charging state sequence, a binary mask corresponding to the charging state sequence is generated. The binary mask is then de-jittered so that the updated binary mask contains the same state value for multiple consecutive sampling times, and the number of consecutive sampling times exceeds a threshold. Based on the updated binary mask, an updated charging state sequence is obtained. It should be noted that the specific implementation of the de-jittering process for the binary mask can be found in the implementation of S302.
[0069] For example, the charging state sequence is [0,0,0,2,2,2,0,0,2,0,2,0]. Replacing the state value 2 with 1 gives the corresponding binary mask [0,0,0,1,1,1,0,0,1,0,1,0]. Dejittering the binary mask gives the updated binary mask [0,0,0,1,1,1,0,0,0,0,0]. Replacing 1 with 2 gives the updated charging state sequence [0,0,0,2,2,2,0,0,0,0,0].
[0070] S303, if there is a second subsequence in the discharge state sequence, update the state value of the second subsequence in the discharge state sequence to another state value in the discharge state sequence that is different from the state value of the second subsequence, and obtain the updated discharge state sequence. The second subsequence contains the state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than the number threshold.
[0071] It should be noted that updating the discharge state sequence is an iterative process. The discharge state sequence is traversed for the first time to find the first subsequence and update the state value of the first second subsequence in the discharge state sequence. The discharge state sequence after the first update is traversed for the second time to redetermine the first second subsequence and update the state value of the first second subsequence determined in the second traversal, until there is no second subsequence in the updated discharge state sequence.
[0072] For example, the discharge state sequence is [0,0,0,0,0,0,0,4,4,0,0,0], the quantity threshold is 3, the first second subsequence is the eighth and ninth positions [4,4], replace the 4 in the eighth and ninth positions with 0, and the updated discharge state sequence is [0,0,0,0,0,0,0,0,0,0,0,0].
[0073] In another possible implementation, after determining the discharge state sequence, a binary mask corresponding to the discharge state sequence is generated. The binary mask is then de-jittered so that the updated binary mask contains the same state values for multiple consecutive sampling times, and the number of consecutive sampling times exceeds a threshold. Based on the updated binary mask, an updated discharge state sequence is obtained. It should be noted that the specific implementation of the de-jittering process for the binary mask can be found in the implementation of S303.
[0074] For example, the discharge state sequence is [0,0,0,4,0,0,4,4,4,0,0,0]. Replacing the state value 4 with 1 gives the corresponding binary mask [0,0,0,1,0,0,1,1,1,0,0,0]. De-jittering the binary mask gives the updated binary mask [0,0,0,0,0,0,1,1,1,0,0,0]. Replacing 1 with 2 gives the updated discharge state sequence [0,0,0,0,0,0,4,4,4,0,0,0].
[0075] S304, Based on the updated charging state sequence and the updated discharging state sequence, determine the target state sequence.
[0076] In one possible implementation, the state values at each position in the updated charging state sequence and the updated discharging state sequence are added together to obtain the target state sequence.
[0077] For example, if the updated charging state sequence is [0,0,0,2,2,2,0,...,0,...] and the updated discharging state sequence is [0,0,0,0,0,0,0,0,0,0,0,0,0], then the target state sequence is [0,0,0,2,2,2,0,...,0,...].
[0078] In this embodiment, based on the initial state sequence, a charging state sequence and a discharging state sequence are determined. If a first subsequence exists in the charging state sequence, the state value of the first subsequence is updated to another state value in the charging state sequence that is different from the first subsequence's state value, resulting in an updated charging state sequence. If a second subsequence exists in the discharging state sequence, the state value of the second subsequence is updated to another state value in the discharging state sequence that is different from the second subsequence's state value, resulting in an updated discharging state sequence. Based on the updated charging state sequence and the updated discharging state sequence, the target state sequence is determined. Thus, the initial state sequence is split into independent charging and discharging state sequences, avoiding mutual interference between charging and discharging events during the de-jittering process. Performing state update operations on subsequences with lengths less than a certain threshold can, on the one hand, update isolated short-term charge / discharge spikes to a static state, eliminating false events caused by noise; on the other hand, it can update short-term static states generated by previous processing to charge / discharge states, repairing event breaks, further improving the accuracy and stability of battery state identification.
[0079] Please see Figure 4 , Figure 4 This is a schematic flowchart illustrating the optimization of a target state sequence according to an embodiment of this application. The process may further include the following steps after S204: S401, determine a voltage sequence synchronized with the current sequence, the voltage sequence including voltage values at multiple consecutive sampling times.
[0080] The voltage sequence comprises a one-dimensional sequence of terminal voltage measurements of the battery under test at multiple consecutive sampling times, arranged chronologically. It is important to note that each sampling time in both the voltage and current sequences has the same timestamp, ensuring that the current and voltage at the same sampling time correspond to the same physical state of the battery. For example, the sampling time corresponding to the i-th current value in the current sequence is the same as the sampling time of the i-th voltage value in the voltage sequence.
[0081] S402, Based on the voltage sequence, determine the voltage slope sequence, which includes the voltage slope corresponding to each sampling time.
[0082] The voltage slope sequence comprises a one-dimensional sequence of voltage change slopes at each sampling time, arranged in chronological order. In one possible implementation, the voltage slope sequence can be obtained by performing a difference operation or curve fitting on the voltage sequence.
[0083] S403, update the target state sequence based on the voltage slope sequence and the voltage slope interval corresponding to each state.
[0084] The voltage slope range corresponding to each state is the reasonable range of voltage slope values that conform to the laws of electrochemical physics under each battery state.
[0085] In one possible implementation, the voltage slope interval for each state can be determined based on the historical voltage slope distribution characteristics corresponding to each state.
[0086] The historical voltage slope distribution characteristic refers to the voltage slope distribution of batteries of the same type as the one to be identified during their historical operation under various states. In specific implementations, a large amount of voltage slope data of the same type of batteries under different charge / discharge rates, different temperatures, and different states of charge can be collected to generate voltage slope distributions for both charging and discharging states.
[0087] For example, the 25th percentile of the voltage slope distribution for the charging state can be determined. The voltage slope corresponding to the 25th percentile is used as the lower limit of the voltage slope interval for the charging state, while the upper limit of this interval is not limited. Similarly, the 75th percentile of the voltage slope distribution for the discharging state can be determined, and the voltage slope corresponding to this 75th percentile is used as the upper limit of the voltage slope interval for the discharging state, while the lower limit of this interval is not limited. It should be noted that in the actual implementation, the quantile values can be adaptively adjusted to adjust the voltage slope interval.
[0088] In another possible implementation, a fixed voltage slope range corresponding to different types of batteries in each state can be determined in advance based on a large amount of experimental data, so that the voltage slope range corresponding to the battery to be identified in each state can be directly obtained.
[0089] In one possible implementation, if the voltage slope at any sampling time is not within the voltage slope range corresponding to the target state at any sampling time, the state value corresponding to any sampling time in the target state sequence is updated to the state value corresponding to the stationary state.
[0090] In the specific implementation, the target state corresponding to each sampling time in the target state sequence is traversed. If the target state at that sampling time is the charging state, it is checked whether its voltage slope is within the voltage slope interval corresponding to the charging state. If not, the state value corresponding to that sampling time in the target state sequence is updated to the state value corresponding to the resting state. If the state at that sampling time is the discharging state, it is checked whether its voltage slope is within the voltage slope interval corresponding to the discharging state. If not, the state value corresponding to that sampling time in the target state sequence is updated to the state value corresponding to the resting state.
[0091] S404, Process the updated target state sequence to determine the optimized target state sequence, in which the state values corresponding to multiple consecutive sampling times are the same and the number of consecutive sampling times is greater than the number threshold.
[0092] It should be noted that the specific implementation logic of step S404 can be referred to the specific implementation logic of step S204, and will not be elaborated here.
[0093] In this embodiment, after determining the target state sequence, a voltage sequence synchronized with the current sequence is further determined. The voltage sequence includes voltage values at multiple consecutive sampling times. Based on the voltage sequence, a voltage slope sequence is determined, including the voltage slope corresponding to each sampling time. Based on the voltage slope sequence and the voltage slope interval corresponding to each state, the target state sequence is updated. Building upon the initial state identification and de-jittering based on current, voltage trend verification is further introduced. This effectively identifies and eliminates physical inconsistencies caused by current noise, sensor drift, or non-electrochemical interference (such as sudden temperature changes). The updated target state sequence is further processed to determine an optimized target state sequence. By performing de-jittering processing again on the updated state sequence, breaks caused by anomaly removal are repaired, ensuring the continuity and integrity of the optimized target state sequence and further improving the accuracy of identifying the battery's charge / discharge state.
[0094] In one possible implementation, after S404, the charging end point and discharging end point in the optimized target state sequence can be determined. The charging end point that is earlier than the discharging end point and is the closest charging end point to the discharging end point is determined as the charging end point paired with the discharging end point. The charging time period corresponding to the charging end point in the optimized target state sequence and the discharging time period corresponding to the discharging end point paired with the charging end point are determined as a complete charge-discharge cycle. Thus, by adopting the pairing rule of "charge first, then discharge, and time nearest neighbor," strictly following the electrochemical time causal logic, and automatically avoiding cross-cycle mismatch and reverse pairing, a complete charge-discharge cycle can be accurately obtained.
[0095] The charging end point is the moment when the charging state ends, that is, the sampling moment when the state changes from charging to resting or discharging.
[0096] The discharge end point is the moment when the discharge state ends, that is, the sampling moment when the state changes from discharge to rest or charging.
[0097] For example, the optimized target state sequence is [0,0,0,2,2,2,4,4,4,0,0,0,2,2,2,4,4,4]. The charging end point is at the 6th and 15th sampling times, and the discharging end point is at the 9th and 18th sampling times. Therefore, the charging end point at the 9th sampling time corresponds to the charging end point at the 6th sampling time, and the charging end point at the 18th sampling time corresponds to the charging end point at the 15th sampling time. The first completed charging period is from the 4th to the 9th sampling time, and the second completed charging period is from the 13th to the 18th sampling time.
[0098] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0099] Corresponding to the battery status identification method in the above embodiments, Figure 5 A schematic diagram of the battery status identification device provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0100] Reference Figure 5 The device includes: The first determining module 501 is used to determine the median absolute deviation of the current sequence corresponding to the battery to be identified, wherein the current sequence includes the current values at multiple consecutive sampling times. The second determining module 502 is used to determine the state determination threshold based on the absolute deviation of the median, and the state determination threshold includes the discharge current threshold and / or the charging current threshold. The third determining module 503 is used to determine the initial state sequence based on the current value and state determination threshold at each sampling time. Each state value in the initial state sequence is used to indicate the initial state of the battery to be identified at each sampling time. The initial state is either charging state, discharging state, or resting state. The processing module 504 is used to process the initial state sequence and determine the target state sequence. In the target state sequence, the state values corresponding to multiple consecutive sampling times are the same, and the number of consecutive sampling times is greater than the number threshold. Each state value in the target state sequence is used to indicate the target state of the battery to be identified at each sampling time.
[0101] In one possible implementation, the first determining module 501 is used for: Determine the noise standard deviation based on the absolute deviation of the median; Candidate current thresholds are determined based on noise standard deviation; If the candidate current threshold is greater than the preset noise threshold of the battery to be identified, the candidate current threshold is determined as the discharge current threshold, and the negative of the candidate current threshold is determined as the charging current threshold. If the candidate current threshold is less than the preset noise threshold, the preset noise threshold is determined as the discharge current threshold, and the negative of the preset noise threshold is determined as the charging current threshold.
[0102] In one possible implementation, processing module 504 is used for: Based on the initial state sequence, the charging state sequence and the discharging state sequence are determined. The charging state sequence includes the state value corresponding to the charging state and the state value corresponding to the resting state. The discharging state sequence includes the state value corresponding to the discharging state and the state value corresponding to the resting state. If a first subsequence exists in the charging state sequence, the state value of the first subsequence in the charging state sequence is updated to another state value in the charging state sequence that is different from the state value of the first subsequence, so as to obtain the updated charging state sequence. The first subsequence contains the state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than the number threshold. If a second subsequence exists in the discharge state sequence, the state value of the second subsequence in the discharge state sequence is updated to another state value in the discharge state sequence that is different from the state value of the second subsequence, so as to obtain the updated discharge state sequence. The second subsequence contains the state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than the number threshold. The target state sequence is determined based on the updated charging state sequence and the updated discharging state sequence.
[0103] In one possible implementation, a fourth determining module is also included, for: Determine the rated charge / discharge rate, rated minimum charge / discharge depth, and sampling rate corresponding to the current sequence for the battery to be identified; The quantity threshold is determined based on the rated charge / discharge rate, the rated minimum charge / discharge depth, and the sampling rate.
[0104] In one possible implementation, an optimization module is also included, for: Determine a voltage sequence synchronized with the current sequence, the voltage sequence comprising voltage values at multiple consecutive sampling times; Based on the voltage sequence, a voltage slope sequence is determined, which includes the voltage slope corresponding to each sampling time. The target state sequence is updated based on the voltage slope sequence and the voltage slope interval corresponding to each state. The updated target state sequence is processed to determine the optimized target state sequence. In the optimized target state sequence, the state values corresponding to multiple consecutive sampling times are the same, and the number of consecutive sampling times is greater than the number threshold.
[0105] In one possible implementation, a fifth determining module is also included, used for: Determine the charging end point and discharging end point in the optimized target state sequence; The nearest charging end point that is earlier than the discharge end point and between it and the discharge end point is determined as the charging end point paired with the discharge end point; The charging time period corresponding to the charging end point in the optimized target state sequence, and the discharging time period corresponding to the discharging end point paired with the charging end point, are determined as a complete charge-discharge cycle.
[0106] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0108] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps described in the various method embodiments above.
[0109] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.
[0110] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0111] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0112] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0113] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0114] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0115] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A battery status identification method, characterized in that, include: Determine the median absolute deviation of the current sequence corresponding to the battery to be identified, wherein the current sequence includes current values at multiple consecutive sampling times; The state determination threshold is determined based on the absolute deviation of the median, and the state determination threshold includes a discharge current threshold and / or a charging current threshold. Based on the current value at each sampling time and the state determination threshold, an initial state sequence is determined. Each state value in the initial state sequence is used to indicate the initial state of the battery to be identified at each sampling time. The initial state is either in a charging state, a discharging state, or a resting state. The initial state sequence is processed to determine the target state sequence, wherein the state values corresponding to multiple consecutive sampling times in the target state sequence are the same, and the number of the multiple consecutive sampling times is greater than a number threshold. Each state value in the target state sequence is used to indicate the target state of the battery to be identified at each sampling time.
2. The method according to claim 1, characterized in that, The step of determining the state determination threshold based on the absolute deviation of the median includes: The noise standard deviation is determined based on the absolute deviation of the median. The candidate current threshold is determined based on the noise standard deviation; If the candidate current threshold is greater than the preset noise threshold of the battery to be identified, the candidate current threshold is determined as the discharge current threshold, and the negative of the candidate current threshold is determined as the charging current threshold. If the candidate current threshold is less than the preset noise threshold, the preset noise threshold is determined as the discharge current threshold, and the negative of the preset noise threshold is determined as the charging current threshold.
3. The method according to claim 1, characterized in that, The process of processing the initial state sequence to determine the target state sequence includes: Based on the initial state sequence, a charging state sequence and a discharging state sequence are determined. The charging state sequence includes a state value corresponding to the charging state and a state value corresponding to the resting state. The discharging state sequence includes a state value corresponding to the discharging state and a state value corresponding to the resting state. If a first subsequence exists in the charging state sequence, the state value of the first subsequence in the charging state sequence is updated to another state value in the charging state sequence that is different from the state value of the first subsequence, so as to obtain an updated charging state sequence. The first subsequence contains state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than a number threshold. If a second subsequence exists in the discharge state sequence, the state value of the second subsequence in the discharge state sequence is updated to another state value in the discharge state sequence that is different from the state value of the second subsequence, to obtain an updated discharge state sequence. The second subsequence contains state values corresponding to consecutive sampling times, and the number of consecutive sampling times is less than a number threshold. The target state sequence is determined based on the updated charging state sequence and the updated discharging state sequence.
4. The method according to claim 1, characterized in that, Before processing the initial state sequence to determine the target state sequence, the method further includes: Determine the rated charge / discharge rate, rated minimum charge / discharge depth, and sampling rate corresponding to the current sequence for the battery to be identified. The quantity threshold is determined based on the rated charge / discharge rate, the rated minimum charge / discharge depth, and the sampling rate.
5. The method according to any one of claims 1-4, characterized in that, After processing the initial state sequence to determine the target state sequence, the method further includes: Determine a voltage sequence synchronized with the current sequence, the voltage sequence comprising voltage values at multiple consecutive sampling times; Based on the voltage sequence, a voltage slope sequence is determined, which includes the voltage slope corresponding to each sampling time. The target state sequence is updated based on the voltage slope sequence and the voltage slope interval corresponding to each state; The updated target state sequence is processed to determine an optimized target state sequence, wherein the state values corresponding to multiple consecutive sampling times are the same and the number of consecutive sampling times is greater than the number threshold.
6. The method according to claim 5, characterized in that, After processing the updated target state sequence to determine the optimized target state sequence, the process further includes: Determine the charging end point and discharging end point in the optimized target state sequence; The nearest charging end point between the discharge end point and the discharge end point is determined as the charging end point paired with the discharge end point; The charging time period corresponding to the charging end point in the optimized target state sequence, and the discharging time period corresponding to the discharging end point paired with the charging end point, are determined as a complete charging and discharging cycle.
7. A battery status identification device, characterized in that, include: The first determining module is used to determine the median absolute deviation of the current sequence of the battery to be identified, wherein the current sequence includes current values at multiple consecutive sampling times; The second determining module is used to determine a state determination threshold based on the absolute deviation of the median, wherein the state determination threshold includes a discharge current threshold and / or a charging current threshold. The third determining module is used to determine an initial state sequence based on the current value at each sampling time and the state determination threshold. Each state value in the initial state sequence is used to indicate the initial state of the battery to be identified at each sampling time. The initial state is a charging state, a discharging state, or a resting state. The processing module is used to process the initial state sequence to determine the target state sequence, wherein the state values corresponding to multiple consecutive sampling times in the target state sequence are the same and the number of the multiple consecutive sampling times is greater than a number threshold, and each state value in the target state sequence is used to indicate the target state of the battery to be identified at each sampling time.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to perform the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program, which, when executed, implements the steps of the method as described in any one of claims 1 to 6.