Method for estimating state of charge of battery, electronic device and readable storage medium
By dynamically updating the maximum usable battery capacity and optimizing the battery state of charge (SOC) assessment using a lightning search algorithm, the problem of insufficient accuracy in SOC assessment caused by battery aging is solved, achieving efficient and accurate SOC assessment.
Patent Information
- Application Number
- CN202611289428.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-27
AI Technical Summary
In existing battery state of charge (SOC) assessment methods, the maximum usable capacity of the battery decreases with aging, resulting in insufficient accuracy of SOC assessment. The ampere-hour integration method has systematic biases and cumulative errors, and high-precision methods have large computational loads and are difficult to deploy in real time.
By dynamically updating the maximum available capacity based on the battery's target state of health value, and combining the lightning search algorithm and voltage deviation optimization, a lightweight state of charge assessment method is constructed. This method dynamically adjusts the capacity benchmark and parameter value range to iteratively update candidate state of charge values.
It improves the accuracy and efficiency of SOC assessment, reduces computational burden, adapts to battery aging conditions, and reduces systematic bias and cumulative error.
Smart Images

Figure CN123176574A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery technology, specifically to a method for assessing the state of charge of a battery, an electronic device, and a readable storage medium. Background Technology
[0002] State of charge (SOC) is the most critical state parameter in the battery management system, directly affecting battery management operations such as remaining range estimation, charge / discharge strategy optimization, and safety protection triggering.
[0003] In electric vehicle applications, the accuracy of State of Charge (SOC) assessment directly affects the user experience and system operational safety. Currently, the SOC assessment primarily uses the ampere-hour integral method, which considers the battery's maximum usable capacity.
[0004] However, the maximum usable capacity of a battery decreases as the battery ages, thus resulting in insufficient accuracy of the SOC obtained from current assessments. Summary of the Invention
[0005] A method for assessing the state of charge of a battery, an electronic device, and a readable storage medium are provided to at least partially solve the aforementioned technical problems.
[0006] Firstly, a method for assessing the state of charge (SOC) of a battery is provided, comprising: The maximum usable capacity of the battery is updated based on the target health state value of the battery. Based on the updated maximum available capacity and the battery's state of charge (SOC) baseline value, determine the range of SOC parameter values; Multiple candidate state of charge values are selected from the parameter value range, and the first candidate state of charge value among the multiple candidate state of charge values is determined; Based on the first candidate state of charge value, update multiple candidate state of charge values; Based on the updated state of charge value, the state of charge assessment value of the battery is determined.
[0007] By dynamically updating the maximum available capacity with the target health state value to match the current aging level of the battery, and iteratively updating the parameter value range based on the updated maximum available capacity to determine the state of charge (SOC) assessment value, the dynamic update of the maximum available capacity allows the capacity benchmark to be adjusted synchronously with the aging state, and the parameter value range is determined based on the updated maximum available capacity, so that the search range of candidate SOC values matches the current aging state. This can alleviate the problem of insufficient SOC assessment accuracy caused by the aging degradation of the battery's maximum available capacity, and help improve the accuracy of SOC assessment.
[0008] Optionally, based on the first candidate state of charge value, multiple candidate state of charge values are updated, including: If the voltage deviation value corresponding to multiple candidate state of charge values does not meet the preset deviation condition or the update round information does not meet the preset number of times condition, multiple candidate state of charge values are updated based on the first candidate state of charge value. The update round information is used to indicate the round in which the multiple candidate state of charge values are updated based on the first candidate state of charge value.
[0009] By updating multiple candidate state-of-charge values based on the first candidate state-of-charge value and returning to iteration when the voltage deviation value does not meet the preset deviation condition or the update cycle information does not meet the preset number of times condition, the candidate state-of-charge values gradually move closer to a better solution as the iterative update continues even when the termination condition is not met. This helps to maintain the continuous convergence of the search process and reduces the risk of insufficient evaluation accuracy due to premature termination of the search.
[0010] Optionally, the method further includes: If the voltage deviation values corresponding to multiple candidate state of charge values meet the preset deviation conditions or the update round information meets the preset number of conditions, the state of charge evaluation value of the battery is determined based on the first candidate state of charge value of each update round.
[0011] The state of charge (SCC) evaluation value is determined based on the first candidate SCC value of each update round when the voltage deviation value meets the preset deviation condition or the update round information meets the preset number of conditions. Since the setting of the dual termination condition helps to ensure the accuracy of the SCC evaluation value determination and control the maximum amount of computation, and the determination of the final result from the first candidate SCC value of each update round helps to reduce the randomness deviation of the single round of optimization, it can take into account both the quality of the evaluation result and the computational efficiency.
[0012] Optionally, based on the first candidate state of charge value, multiple candidate state of charge values are updated, including: If the candidate state of charge is the first candidate state of charge, the update step size is determined based on the update round information and the preset maximum update round. The first candidate state of charge value is updated based on the update step size; If a candidate state of charge is not the first candidate state of charge, the candidate state of charge is updated based on the difference between the candidate state of charge and the first candidate state of charge.
[0013] By determining the update step size based on the update round information and the preset maximum update round when the candidate charged state value is the first candidate charged state value, and updating based on the update step size, and updating based on the difference between the candidate charged state value and the first candidate charged state value when the candidate charged state value is not the first candidate charged state value, the update step size of the first candidate charged state value changes dynamically with the iteration process, so that the search range transitions from coarse to fine. The update of non-first candidate charged state values based on the difference between the first candidate charged state value and the first candidate charged state value allows the candidate value that is farther away from the first candidate charged state value to obtain a larger update range. This can realize differentiated updates of different candidate charged state values, which helps to improve the directionality and convergence efficiency of the search.
[0014] Optionally, the method includes: Based on the first candidate state of charge value and the specified adjustment amount, determine the adjusted candidate state of charge value; The update direction is determined based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction; Based on the update step size, the first candidate state of charge value is updated, including: The first candidate state of charge value is updated based on the update step size and update direction.
[0015] The adjusted candidate state of charge (SOC) value is determined based on the first candidate SOC value and a specified adjustment amount. The update direction is determined based on the voltage deviation value corresponding to the adjusted candidate SOC value and the initial update direction. Then, the first candidate SOC value is updated based on the update step size and the update direction. Since the voltage deviation value of the adjusted candidate SOC value is used to determine whether the current search direction is conducive to moving towards a better fitness direction, it helps to achieve adaptive adjustment of the search direction, so that the update direction is towards the region with smaller voltage deviation value, thereby improving the accuracy of the update direction of the first candidate SOC value.
[0016] Optionally, the process for determining the specified adjustment amount includes: The specified adjustment amount is determined based on the initial update direction and parameter value range.
[0017] By determining the specified adjustment amount based on the initial update direction and parameter value range, since the specified adjustment amount is proportional to the interval width of the parameter value range, it helps to adapt to search intervals of different sizes, so that the sensitivity of the direction test matches the scale of the search space, reducing the risk of misjudging the direction due to the specified adjustment amount being too large or failing to detect changes in voltage deviation due to the specified adjustment amount being too small.
[0018] Optionally, the update direction is determined based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction, including: If the voltage deviation value corresponding to the adjusted candidate state of charge value is less than the voltage deviation value corresponding to the first candidate state of charge value, the initial update direction is determined as the update direction. If the voltage deviation value corresponding to the adjusted candidate state of charge value is equal to or greater than the voltage deviation value corresponding to the first candidate state of charge value, the opposite direction of the initial update direction is determined as the update direction.
[0019] By maintaining the initial update direction when the voltage deviation of the adjusted candidate state of charge value is less than that of the first candidate state of charge value, and reversing it to the opposite direction when it is equal to or greater than the first candidate state of charge value, the direction reversal mechanism achieves adaptive adjustment based on the feedback of the voltage deviation value, so that the search direction is oriented towards the region with smaller voltage deviation value. This helps to reduce the waste of computational resources caused by continuous searching in unfavorable directions and improves the accuracy of the direction update of the first candidate state of charge value and the convergence efficiency.
[0020] Optionally, the candidate state of charge (SNC) value is updated based on the difference between the candidate SNC value and the first candidate SNC value, including: Random numbers are generated based on the difference between the candidate state of charge value and the first candidate state of charge value; The candidate state of charge values are updated based on random numbers.
[0021] Random numbers are generated based on the difference between candidate state-of-charge (SOC) values and the first candidate SOC value. These random numbers are then used to update the candidate SOC values. Since the random numbers are generated based on the difference between the candidate SOC values and the first candidate SOC value, the difference between candidate SOC values that are farther away from the first candidate SOC value is larger, and the corresponding update amplitude is also larger. This helps to accelerate the candidate SOC values that are far away from the first candidate SOC value to move closer to it. At the same time, candidate SOC values that are closer to the first candidate SOC value receive smaller update amplitudes for fine-tuning, thus achieving adaptive convergence of candidate SOC values towards the optimal region.
[0022] Optionally, the method further includes: If the updated round information meets the replacement round condition, the second candidate charge state value among multiple candidate charge state values is replaced with the first candidate charge state value, resulting in multiple new candidate charge state values.
[0023] By replacing the second candidate state of charge (SOC) value with the first candidate SOC value when the replacement round condition is met in the updated round information, the replacement operation periodically replaces the candidate SOC value with the first candidate SOC value with the candidate SOC value with the larger voltage deviation value. This helps to accelerate the convergence speed of the candidate SOC values, reduce the waste of computing resources in the search region with the larger voltage deviation value, and at the same time, the replaced candidate SOC value can serve as a new search starting point to further explore the vicinity of the first candidate SOC value, which helps to improve the search efficiency.
[0024] Optionally, based on the updated state of charge (SOC) value, a SOC assessment value for the battery is determined, including: Generate the opposite state of charge value of the updated state of charge value. The sum of the opposite state of charge value and the updated state of charge value is equal to the sum of the upper and lower limits of the parameter value range. If the voltage deviation value corresponding to the opposing state of charge value is equal to or greater than the voltage deviation value corresponding to the updated state of charge value, the state of charge assessment value of the battery is determined based on the updated state of charge value.
[0025] By generating the opposite state of charge (SOC) value of the updated SOC value and determining the SOC evaluation value based on the updated SOC value when the voltage deviation value corresponding to the opposite SOC value is equal to or greater than the voltage deviation value corresponding to the updated SOC value, the generation of the opposite SOC value helps to explore the symmetrical region of the parameter value range, since the opposite SOC value and the updated SOC value are centrally symmetric about the parameter value range. Furthermore, selecting a better candidate value by comparing the voltage deviation values helps to improve the comprehensiveness of the global search.
[0026] Optionally, the method further includes: If the voltage deviation value corresponding to the opposite state of charge value is less than the voltage deviation value corresponding to the updated state of charge value, the state of charge assessment value of the battery is determined based on the opposite state of charge value.
[0027] By determining the state of charge (SOC) evaluation value based on the opposite SOC value when the voltage deviation value corresponding to the opposite SOC value is less than the voltage deviation value corresponding to the updated SOC value, the SOC evaluation value is determined when the voltage deviation value of the opposite SOC value is smaller. This helps to capture the optimal region that may be missed by regular updates, and enables the search process to explore the symmetrical region of parameter value range, which helps to improve the reliability of convergence to the global optimum.
[0028] Optionally, generating the opposite state of charge value of the updated state of charge value includes: Generate a second random number; If the second random number is less than a preset threshold, the opposite state of charge value of the updated state of charge value is generated.
[0029] By generating a second random number and generating an opposing charge state value when the second random number is less than a preset threshold, the generation of the opposing charge state value is triggered randomly with a low probability. This helps to provide sporadic global exploration capabilities without affecting the efficiency of normal iterative search, reducing the risk of search direction disorder caused by frequent generation of opposing charge state values. At the same time, the low probability of triggering is sufficient to cover the symmetrical region of the parameter value range in long-term iterations, which helps to improve the ability to escape local optima.
[0030] Optionally, the process of determining the battery's state of charge reference value includes: Under the condition that the battery meets the preset resting conditions, the reference value of the battery's state of charge is determined based on the detected voltage. If the battery does not meet the preset resting conditions, the historical state of charge assessment value is determined as the battery's state of charge benchmark value.
[0031] By determining the state of charge (SOC) baseline value based on the detection voltage when the battery meets preset resting conditions, and using the historical SOC assessment value as the SOC baseline value when the conditions are not met, the baseline value determined based on the detection voltage under resting conditions has high reliability and helps reduce the cumulative error of ampere-hour integration. Using the historical SOC assessment value under non-resting conditions helps maintain the continuity of the baseline. This can achieve synergy between resting correction and online tracking, taking into account both the accuracy and continuity of SOC estimation.
[0032] Optionally, if the target health state value of the battery indicates that it is fully charged, the maximum available capacity of the battery is updated according to the target health state value of the battery in the first cycle. If the target health status value of the battery indicates that it is not fully charged, the maximum available capacity of the battery is updated according to the target health status value of the battery in the second cycle; wherein the first cycle is longer than the second cycle.
[0033] By updating the maximum available capacity according to the first cycle when the target health status value indicates full charge, and according to the second cycle when it indicates non-full charge, with the first cycle being longer than the second cycle, the calculation of the target health status value is more reliable under full charge conditions, allowing for a longer cycle to reduce the calculation frequency. Under non-full charge conditions, the reliability is relatively lower, requiring a shorter cycle to more frequently correct the capacity reference. This helps to achieve a balance between the reliability of the target health status value calculation and the timeliness of the capacity reference, reducing the risk of unnecessary frequent calculations under full charge conditions and the risk of SOC estimation deviation caused by capacity reference lag under non-full charge conditions.
[0034] Optionally, based on the updated maximum available capacity and the battery's state of charge (SOC) reference value, a range of SOC parameter values is determined, including: The predicted state of charge (SOC) value is determined based on the updated maximum available capacity and the battery's SOC reference value. Based on the predicted state of charge value, the range of parameter values for the state of charge is determined.
[0035] The predicted state of charge (SOC) value is determined based on the updated maximum available capacity and the battery's SOC baseline value. The range of SOC parameter values is then determined based on the predicted SOC value. Since the predicted SOC value is calculated using ampere-hour integration based on the updated maximum available capacity, the capacity baseline remains consistent with the current aging state. This helps reduce the systematic deviation of capacity decay on SOC integration. The range of parameter values is centered on the predicted SOC value under the current aging state, narrowing the search space for candidate SOC values and reducing invalid traversal and iterative computation while covering the true SOC.
[0036] Optionally, the process of determining the voltage deviation value corresponding to the candidate state of charge value includes: Based on candidate state of charge values, target state of health values, a first calibration relationship, and a second calibration relationship, the open-circuit voltage value and the associated internal resistance value of the DC internal resistance are determined; the first calibration relationship includes the associated mapping relationship between the battery's state of charge, state of health, and open-circuit voltage; the second calibration relationship includes the associated mapping relationship between the battery's state of charge, state of health, and the associated internal resistance of the DC internal resistance. Based on the correlation between the open-circuit voltage value and the DC internal resistance value, the voltage deviation value corresponding to the candidate state of charge value is determined.
[0037] The open-circuit voltage and the associated internal resistance of the DC internal resistance are determined based on the candidate state of charge (SOC) value, the target state of health (SOC) value, the first calibration relationship, and the second calibration relationship. The voltage deviation value is then determined based on the open-circuit voltage and the associated internal resistance value. Since the open-circuit voltage and the associated internal resistance value are determined based on the candidate SOC value and the target SOC value through the first and second calibration relationships, the voltage deviation value can reflect the degree of fit between the candidate SOC value and the actual operating conditions of the battery. This helps to reliably guide the iterative update direction of the candidate SOC value, making the final determined SOC value more accurately represent the current SOC of the battery.
[0038] In a second aspect, an electronic device is also provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the battery state-of-charge assessment method of the first aspect by calling the computer program stored in the memory.
[0039] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the battery state-of-charge assessment method of the first aspect.
[0040] Beneficial effects: By dynamically updating the maximum available capacity with the target health state value to match the current aging level of the battery, and iteratively updating the parameter value range based on the updated maximum available capacity to determine the state of charge (SOC) assessment value, the dynamic update of the maximum available capacity allows the capacity benchmark to be adjusted synchronously with the aging state, and the parameter value range is determined based on the updated maximum available capacity, so that the search range of candidate SOC values matches the current aging state. This can alleviate the problem of insufficient SOC assessment accuracy caused by the aging degradation of the battery's maximum available capacity, and help improve the accuracy of SOC assessment. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0042] Figure 1 This is a schematic diagram of the first process of the battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure; Figure 2 This is a schematic diagram of the second process of the battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure; Figure 3 This is a schematic diagram of the third process of the battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure; Figure 4 This is a schematic diagram of the fourth process of the battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure; Figure 5 This is a schematic diagram of the fifth process of the battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] 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 some embodiments of this application, and not all embodiments. 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.
[0044] In the description of this application, it should be understood that the terms "upper," "lower," "front," "rear," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0045] "A and / or B" includes the following three combinations: A only, B only, and a combination of A and B.
[0046] The use of "applies to" or "configured to" in this application implies open and inclusive language, which does not exclude the applicability to or configuration to devices performing additional tasks or steps. Additionally, the use of "based on" implies openness and inclusivity, because processes, steps, calculations, or other actions "based on" one or more of the stated conditions or values may in practice be based on additional conditions or values beyond those stated.
[0047] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0048] State of Charge (SOC) is the most critical state parameter in a battery management system, directly impacting battery management operations such as remaining range estimation, charge / discharge strategy optimization, and safety protection triggering. In electric vehicle applications, the accuracy of SOC assessment directly affects user experience and system operational safety. Currently, SOC assessment primarily combines the battery's maximum usable capacity with the ampere-hour integration method. However, the battery's maximum usable capacity decreases with battery aging, resulting in insufficient accuracy of the currently obtained SOC. Specifically, the following technical problems exist: First, the capacity decay effect of the ampere-hour integration method. The ampere-hour integration method is the most basic method for SOC estimation, with the advantages of simple calculation and good real-time performance, but it has an inherent drawback: the total battery capacity Q_max decays with aging, and failure to update it in time will lead to systematic bias. Studies have shown that when the battery SOH decays from 100% to 80%, if Q_max is not updated, the SOC estimation error can reach more than 5%.
[0049] Secondly, there is the issue of accumulated error in the ampere-hour integration method. The error of the current sensor accumulates continuously over time, causing SOC estimation drift; moreover, the ampere-hour integration method requires an accurate initial SOC value, otherwise the error will persist. Although accumulated errors can be periodically corrected through OCV static calibration, the static condition is difficult to meet frequently in actual driving conditions.
[0050] Third, the computational burden of high-precision methods. Although algorithms such as Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) are widely used in SOC estimation, they require online identification of battery model parameters (such as internal resistance and polarization parameters), resulting in a large computational load and making them difficult to deploy in real time in BMS with limited computing resources.
[0051] To address the above issues, this application proposes a method for assessing the state of charge (SOC) of batteries, and for the first time constructs a lightweight three-layer architecture of "offline benchmark + capacity calibration + online SOC". This method can be applied to a battery management system (BMS). BMS can be deployed in various devices requiring battery management, such as management systems for electric vehicles, aircraft, and ships. This application uses electric vehicles as an example for illustration, but it does not limit the method to electric vehicles.
[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the first process of a battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure. Figure 1 In this process, the method may include the following steps S101 to S105: S101. Update the maximum usable capacity of the battery based on the target health state value of the battery.
[0053] The target state of health (SOH) value refers to a parameter that reflects the degree of battery aging. In this application, it is obtained using the traditional SOH calculation method and serves as an aging benchmark independent of the online estimation model.
[0054] The target state of health (SOH) value is calculated periodically using a capacity measurement method. Under full charge conditions, a highly reliable SOH benchmark value can be obtained by measuring the ratio of the actual charging capacity to the nominal capacity.
[0055] In some embodiments, the target health status value can be calculated as follows: ; in, This represents the actual capacity of the battery when it is fully charged at time t. This indicates the battery's nominal capacity (i.e., its original maximum capacity).
[0056] Capacity measurement is performed periodically under full-charge conditions (e.g., every 100 cycles or every 30 days), with minimal computational cost and reliable results.
[0057] The maximum usable capacity refers to the maximum capacity that the battery can store under its current aging condition. Since the maximum usable capacity of a battery decreases with battery aging, failure to update this parameter in a timely manner will result in systematic deviations in the ampere-hour integration. Therefore, the maximum usable capacity is dynamically updated based on the target health state value to ensure that the capacity benchmark matches the current degree of battery aging.
[0058] Specifically, the updated maximum available capacity is determined by multiplying the target health status value by the battery's capacity calibration value: = ×SOH_trad; in, Indicates the maximum available capacity after the update; This represents the battery's capacity calibration value; SOH_trad represents the target health status value.
[0059] When SOH_trad is updated (e.g., decaying from 95% to 94%). Synchronous adjustment eliminates the systematic impact of capacity decay on SOC integrals.
[0060] S102. Based on the updated maximum available capacity and the battery's state of charge reference value, determine the range of parameter values for the state of charge.
[0061] Among them, the State of Charge (SOC) reference value refers to the SOC value used as the initial value for ampere-hour integration or as a correction reference.
[0062] The determination of the state of charge (SOC) reference value may include: if the battery meets the preset resting conditions, obtaining the reference SOC_ref from the offline OCV reference library based on the detected voltage; if the battery does not meet the preset resting conditions, determining the historical SOC evaluation value as the SOC reference value.
[0063] The parameter value range refers to the search interval of the state of charge (SOC), which is determined centered on the predicted state of charge value based on the updated maximum available capacity and the baseline value of the SOC.
[0064] Specifically, based on the updated maximum available capacity and the state of charge baseline, the predicted state of charge value SOC(t) is determined using the ampere-hour integration method: ; in, This is the reference value for the state of charge; This is the maximum available capacity after the update; The battery's operating current; τ∈( ,t).
[0065] Furthermore, the range of SOC variation is determined based on the current sign (positive for discharging and negative for charging).
[0066] If the current I>0 (discharging), the parameter value range is [SOC(t),SOC(t)+10%]; if the current I<0 (charging), the parameter value range is [SOC(t)-10%,1].
[0067] S103. Select multiple candidate state of charge values from the parameter value range, and determine the first candidate state of charge value among the multiple candidate state of charge values.
[0068] Here, candidate charged state values refer to the SOC values selected from the parameter range for use in the iterative search. Multiple candidate charged state values constitute the initial population for subsequent iterations.
[0069] Specifically, the candidate charged state values are generated as follows: an initial population is randomly generated within the parameter value range. For the p-th candidate charged state value... Its generation method is as follows: ; Where LB is the lower bound of the parameter value range. UB is the upper bound of the parameter value range. rand is a random number between 0 and 1.
[0070] The population size N can be set to 50, which means generating 50 candidate charged state values.
[0071] It should be noted that the above values are merely examples, and this application does not limit the specific value of the number of candidate state of charge values.
[0072] The first candidate state of charge (SOC) value refers to the candidate SOC value with the smallest voltage deviation (i.e., the best fitness) among multiple candidate SOC values, which is also the best individual in the current population. The first candidate charge state value guides the entire population toward the optimal region and serves as the reference center for subsequent iterations.
[0073] Specifically, for each candidate state of charge (SOC), based on the candidate SOC, the target health state, the first calibration relationship, and the second calibration relationship, the open-circuit voltage and the associated internal resistance value of the DC internal resistance are determined. Then, the predicted voltage is calculated using the battery equivalent circuit model, and the voltage deviation between the predicted voltage and the detected voltage is calculated. The candidate SOC with the smallest voltage deviation is determined as the first candidate SOC.
[0074] S104. Update multiple candidate state of charge values based on the first candidate state of charge value.
[0075] In some embodiments, updating multiple candidate state-of-charge (POC) values can employ the Lightning Search Algorithm (LSA) mechanism, which updates the position of each candidate POC value based on the first candidate POC value. The LSA algorithm simulates the propagation process of lightning, treating the candidate POC values as projectiles and using the motion mechanism of the projectiles to search the parameter space.
[0076] Specifically, for the first candidate charged state value (i.e., the optimal individual), a leader projector behavior is used for updating: based on the update step size (i.e., energy parameter) and search direction, a normally distributed random number is used to search in the current direction. For non-first candidate charged state values (i.e., non-optimal individuals), a spatial projector behavior is used for updating: based on the difference between the candidate charged state value and the first candidate charged state value, an exponentially distributed random number is generated, and the candidate charged state value is updated using the exponentially distributed random number. The updated candidate charged state value needs to be boundary checked; if it exceeds the parameter value range, it is re-randomized within the range.
[0077] S105. Based on the updated state of charge value, determine the state of charge assessment value of the battery.
[0078] The state of charge (SOC) assessment value refers to the optimal estimate of the current SOC of the battery, determined through iterative optimization. Under the condition of meeting convergence criteria (such as the best fitness value equaling the worst fitness value, i.e., population convergence) or reaching the maximum number of iterations, the SOC assessment value is selected from the globally optimal candidate SOC values recorded in each update round, based on the smallest voltage deviation.
[0079] The battery state-of-charge (SOC) assessment method of this application updates the battery's maximum usable capacity based on the battery's target state of health value. A range of SOC parameter values is determined based on the updated maximum usable capacity and the battery's SOC benchmark value. Multiple candidate SOC values are selected from this range, and a first candidate SOC value is determined. These candidate SOC values are then updated based on the first candidate SOC value. Finally, the battery's SOC assessment value is determined based on the updated SOC value. Thus, by dynamically updating the maximum usable capacity with the target state of health value to match the battery's current aging level, and iteratively updating the parameter value range determined from the range of candidate SOC values based on the updated maximum usable capacity to determine the SOC assessment value, the dynamic updating of the maximum usable capacity allows the capacity benchmark to adjust synchronously with the aging state. Furthermore, the parameter value range determined based on the updated maximum usable capacity ensures that the search range of candidate SOC values matches the current aging state. This alleviates the problem of insufficient SOC assessment accuracy caused by the battery's maximum usable capacity decaying with age, and helps improve the accuracy of SOC assessment.
[0080] In some embodiments, updating multiple candidate state-of-charge values based on a first candidate state-of-charge value includes: If the voltage deviation values corresponding to multiple candidate state of charge values do not meet the preset deviation conditions or the update round information does not meet the preset number of times conditions, multiple candidate state of charge values are updated based on the first candidate state of charge value.
[0081] Among them, the voltage deviation value refers to the difference between the predicted voltage and the detected voltage corresponding to the candidate state of charge value, which is used to characterize the degree of fit between the candidate state of charge value and the actual operating conditions of the battery.
[0082] The preset deviation condition refers to the voltage deviation value corresponding to the global optimal candidate state of charge value (i.e., the first candidate state of charge value) being less than the preset voltage deviation threshold.
[0083] The preset voltage deviation threshold can be set to a value between 1e-4 volts (V) and 1e-3 volts.
[0084] Among them, the update round information refers to the number of iterations that have been executed so far (i.e., the update round).
[0085] The preset number of iterations condition refers to the current update round reaching the preset maximum update round (i.e., the maximum number of iterations T, such as 500 times).
[0086] After each round of candidate charge state value updates, the round number is incremented by 1.
[0087] Specifically, when the voltage deviation value does not meet the preset deviation condition (i.e., the voltage deviation value corresponding to the first candidate state of charge value is greater than or equal to the preset voltage deviation threshold) and the update round information does not meet the preset number condition (i.e., the current update round is less than 500 times), an update operation is performed on multiple candidate state of charge values based on the first candidate state of charge value, and the updated candidate state of charge value is used as the new candidate state of charge value. The process then returns to the step of determining the predicted voltage and voltage deviation value and enters the next iteration.
[0088] Thus, by updating multiple candidate state-of-charge values based on the first candidate state-of-charge value and returning to iteration when the voltage deviation value does not meet the preset deviation condition or the update cycle information does not meet the preset number of times condition, the continuous iterative updates when the termination condition is not met help the candidate state-of-charge values gradually move closer to a better solution, which helps maintain the continuous convergence of the search process and reduces the risk of insufficient evaluation accuracy due to premature termination of the search.
[0089] In some embodiments, the method further includes: If the voltage deviation values corresponding to multiple candidate state of charge values meet the preset deviation conditions or the update round information meets the preset number of conditions, the state of charge evaluation value of the battery is determined based on the first candidate state of charge value of each update round.
[0090] Specifically, when the voltage deviation value meets the preset deviation condition (i.e., the voltage deviation value corresponding to the first candidate state of charge value is less than the preset voltage deviation threshold) or the update round information meets the preset number condition (i.e., the current update round reaches 500 times), the first candidate state of charge value and its corresponding voltage deviation value recorded in each update round are read from the iteration record memory of the BMS, and the first candidate state of charge value with the smallest voltage deviation value in all rounds is determined as the battery's state of charge evaluation value.
[0091] Furthermore, when the best fitness value equals the worst fitness value (i.e., the population converges and all candidate charged state values tend to be consistent), the iteration loop is terminated early, and the global minimum fitness value and its corresponding candidate charged state value are obtained as the charged state evaluation value throughout the entire operation.
[0092] Thus, by determining the state of charge (SOC) evaluation value based on the first candidate SOC value of each update cycle when the voltage deviation value meets the preset deviation condition or the update cycle information meets the preset number of conditions, the setting of the dual termination condition helps to ensure the accuracy of the SOC evaluation value determination and control the maximum amount of computation. Furthermore, determining the final result from the first candidate SOC value of each update cycle helps to reduce the randomness deviation of the single-cycle optimum, which can ensure the quality of the evaluation result while taking into account the computational efficiency.
[0093] Reference Figure 2 , Figure 2 This is a second flowchart illustrating the battery state-of-charge (POC) assessment method provided in an exemplary embodiment of this disclosure. In some embodiments, updating multiple candidate POC values based on a first candidate POC value includes: S201. When the candidate state of charge is the first candidate state of charge, determine the update step size based on the update round information and the preset maximum update round.
[0094] The update step size refers to the parameter that controls the magnitude of the movement of the first candidate state of charge (i.e., the best individual) in each update.
[0095] The update step size is dynamically determined based on the update round information and the preset maximum update round, and decreases as the iteration progresses.
[0096] Specifically, the formula for calculating the update step size (i.e., energy parameter) is as follows: ; Where t represents the update round information (i.e., the current iteration number); T represents the preset maximum update round (i.e., the maximum number of iterations, such as 500 times).
[0097] The energy parameter gradually decays from its initial value (e.g., 2.05) as the iteration progresses, resulting in a larger update step size in the early stages of the iteration to accelerate global exploration, and a smaller step size in the later stages of the iteration to ensure fine-grained local development.
[0098] S202. Update the first candidate state of charge value based on the update step size.
[0099] Specifically, the leader projectile behavior is used to update the first candidate charged state value, and normally distributed random numbers are used to explore in the current search direction: ; in, This indicates the current position of the first candidate charge state value; dir indicates the search direction; It represents the absolute value of a normally distributed random number with a mean of 0 and a variance of Energy.
[0100] The behavior of the leading projectile simulates the propulsion of the main lightning channel, searching in the current direction with normally distributed random perturbations, and the energy parameter controls the amplitude of the perturbations.
[0101] If a candidate state of charge is not the first candidate state of charge, the candidate state of charge is updated based on the difference between the candidate state of charge and the first candidate state of charge.
[0102] Specifically, the values of non-first candidate charged states are updated using spatial projectile behavior.
[0103] First, calculate the current candidate state of charge value. Compared with the first candidate state of charge value Distance: .
[0104] Then, based on this distance, an exponentially distributed random number is generated, and the current candidate state of charge value is... Update: ; Here, exprnd(dist) represents an exponentially distributed random number with parameter dist.
[0105] The behavior of spatial projectiles simulates the spread of lightning branches, with random perturbations distributed exponentially converging towards the first candidate state of charge value; the greater the distance, the greater the perturbation amplitude.
[0106] Thus, by determining the update step size based on the update round information and the preset maximum update round when the candidate charged state value is the first candidate charged state value, and updating based on the update step size, and updating based on the difference between the candidate charged state value and the first candidate charged state value when the candidate charged state value is not the first candidate charged state value, the update step size of the first candidate charged state value changes dynamically with the iteration process, which makes the search range transition from coarse to fine. The update of non-first candidate charged state values based on the difference between the candidate charged state value and the first candidate charged state value makes the candidate value farther away from the first candidate charged state value get a larger update range, which can realize differentiated updates of different candidate charged state values, and help improve the directionality and convergence efficiency of the search.
[0107] Reference Figure 3 , Figure 3 This is a schematic diagram of the third process of the battery state-of-charge assessment method provided in an exemplary embodiment of this disclosure. In some embodiments, the method includes: S301. Based on the first candidate state of charge value and the specified adjustment amount, determine the adjusted candidate state of charge value.
[0108] The specified adjustment amount refers to the magnitude of the small perturbation applied to the first candidate state of charge value, determined based on the initial update direction and parameter value range. The adjusted candidate state of charge value is the value obtained by superimposing the specified adjustment amount along the initial update direction on the first candidate state of charge value.
[0109] Specifically, the adjusted candidate state of charge values The method for determining it is as follows: ; in, represents the first candidate state of charge value; dir represents the initial update direction (a direction vector with elements of -1 or 1); 0.005×(UB-LB) represents the specified adjustment amount; UB and LB represent the upper and lower bounds of the parameter value range, respectively.
[0110] S302. Determine the update direction based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction.
[0111] The update direction refers to the directional parameter used to update the first candidate state of charge value. The update direction is determined based on the comparison between the fitness (voltage deviation value) of the adjusted candidate state of charge value and the fitness of the first candidate state of charge value.
[0112] Specifically, the adjusted candidate state of charge values are calculated. Corresponding voltage deviation value ,Will Voltage deviation value corresponding to the first candidate state of charge value Compare the results and determine the direction of the update.
[0113] S303. Update the first candidate state of charge value based on the update step size and update direction.
[0114] Specifically, the update step size (i.e., the energy parameter Energy) and the update direction dir are combined, and the first candidate charged state value is updated using normally distributed random numbers: .
[0115] Thus, by determining the adjusted candidate state of charge value based on the first candidate state of charge value and the specified adjustment amount, and determining the update direction based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction, the first candidate state of charge value is updated based on the update step size and the update direction. Since the voltage deviation value of the adjusted candidate state of charge value is used to determine whether the current search direction is conducive to moving towards a better fitness direction, it helps to achieve adaptive adjustment of the search direction, so that the update direction is towards the region with smaller voltage deviation value, thereby improving the accuracy of the update direction of the first candidate state of charge value.
[0116] In some embodiments, the process of determining the specified adjustment amount includes: The specified adjustment amount is determined based on the initial update direction and parameter value range.
[0117] The initial update direction refers to the search direction vector initialized at the start of the iteration. Its elements are -1 or 1, and it can be obtained from the random number generator of the BMS.
[0118] The initial update direction is initialized as follows: , That is, generate uniformly distributed random numbers in the interval [-1, 1] and take their signs.
[0119] Wherein, the parameter value range refers to the search interval [LB, UB] of the state of charge (SOC), i.e. , The specified adjustment amount is determined based on the interval width (UB-LB) of the parameter value range and the initial update direction.
[0120] Specifically, the specified adjustment amount is determined as follows: specified adjustment amount = 0.005 × (UB - LB).
[0121] Wherein, 0.005 is the adjustment coefficient, which means that the specified adjustment amount accounts for 0.5% of the width of the parameter value range.
[0122] Thus, by determining the specified adjustment amount based on the initial update direction and parameter value range, since the specified adjustment amount is proportional to the interval width of the parameter value range, it helps to adapt to search intervals of different sizes, so that the sensitivity of the direction test matches the scale of the search space, reducing the risk of misjudging the direction due to the specified adjustment amount being too large or failing to detect changes in voltage deviation due to the specified adjustment amount being too small.
[0123] In some embodiments, determining the update direction based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction includes: If the voltage deviation value corresponding to the adjusted candidate state of charge value is less than the voltage deviation value corresponding to the first candidate state of charge value, the initial update direction is determined as the update direction.
[0124] Among them, when the candidate state of charge value is adjusted Corresponding voltage deviation value The voltage deviation value is less than the value corresponding to the first candidate state of charge. This indicates that a small perturbation along the initial update direction can improve fitness, and the current search direction is conducive to approximating the optimal solution, so the initial update direction should be kept unchanged.
[0125] If the voltage deviation value corresponding to the adjusted candidate state of charge value is equal to or greater than the voltage deviation value corresponding to the first candidate state of charge value, the opposite direction of the initial update direction is determined as the update direction.
[0126] Among them, when the candidate state of charge value is adjusted Corresponding voltage deviation value The voltage deviation value is equal to or greater than the value corresponding to the first candidate state of charge. When the initial update direction is reversed, it indicates that the small perturbation along the initial update direction has failed to improve fitness or has even worsened fitness. The current search direction is not conducive to approaching the optimal solution, so the initial update direction is reversed to the opposite direction.
[0127] Specifically, determining the update direction can be expressed as: .
[0128] Thus, by maintaining the initial update direction when the voltage deviation of the adjusted candidate state of charge value is less than that of the first candidate state of charge value, and reversing it to the opposite direction when it is equal to or greater than the first candidate state of charge value, the direction reversal mechanism achieves adaptive adjustment based on the feedback of the voltage deviation value, so that the search direction is oriented towards the region with smaller voltage deviation value. This helps to reduce the waste of computational resources caused by continuous searching in unfavorable directions and improves the accuracy of the direction update of the first candidate state of charge value and the convergence efficiency.
[0129] In some embodiments, updating the candidate state of charge value based on the difference between the candidate state of charge value and the first candidate state of charge value includes: Random numbers are generated based on the difference between the candidate state of charge value and the first candidate state of charge value.
[0130] Here, the random number refers to an exponentially distributed random number generated based on the difference between the candidate state of charge value and the first candidate state of charge value. The parameter of the exponentially distributed random number is the absolute value of the distance between the candidate state of charge value and the first candidate state of charge value.
[0131] Specifically, the difference (distance) between the current candidate state of charge value and the first candidate state of charge value is first calculated: .
[0132] Then, based on this difference, an exponentially distributed random number is generated: If dist < 0, then generate an exponentially distributed random number exprnd(|dist|) with parameter |dist|; if dist > 0, then generate an exponentially distributed random number exprnd(dist) with parameter dist.
[0133] The candidate state of charge values are updated based on random numbers.
[0134] Specifically, the spatial projectile is updated as follows: if dist < 0 (the current candidate state of charge value is less than the first candidate state of charge value), then: That is, it moves in the direction of increase; If dist > 0 (the current candidate state of charge value is greater than the first candidate state of charge value), then: That is, moving in the direction of decreasing.
[0135] Therefore, the spatial projectile always moves closer to the first candidate state of charge value, and the greater the distance, the greater the expected value of the exponentially distributed random number and the greater the movement range.
[0136] Thus, by generating random numbers based on the difference between candidate state-of-charge (SOC) values and the first candidate SOC value, and updating the SOC values based on these random numbers, the difference between the candidate SOC values and the first candidate SOC value is larger for SOC values that are farther away from the first candidate SOC value, and the corresponding update amplitude is also larger. This helps to accelerate the convergence of candidate SOC values that are far away from the first candidate SOC value to the first candidate SOC value. At the same time, candidate SOC values that are closer to the first candidate SOC value receive smaller update amplitudes for fine adjustment, thereby achieving adaptive convergence of candidate SOC values to the optimal region.
[0137] In some embodiments, the method further includes: If the updated round information meets the replacement round condition, the second candidate charge state value among multiple candidate charge state values is replaced with the first candidate charge state value, resulting in multiple new candidate charge state values.
[0138] The replacement round condition refers to the condition that triggers the channel elimination mechanism once every preset replacement round (i.e., the channel elimination cycle max_ch_time, such as 10 iterations).
[0139] When the updated round information satisfies At that time, a channel elimination operation is performed.
[0140] The second candidate state of charge (SOC) value refers to the candidate SOC value with the largest voltage deviation (i.e., the worst fitness) among multiple candidate SOC values, which is also the worst individual in the current population. The channel elimination mechanism simulates the phenomenon of weak channels being eliminated in lightning, replacing the worst individual with the best individual.
[0141] Specifically, the channel elimination mechanism operates as follows: First, the fitness values of all candidate charged state values are sorted in ascending order; then, the worst individual (the last one after sorting) is selected. Replace with the best individual (the first one after sorting). ; Synchronously update the fitness value of the worst individual The fitness value of the best individual Finally, sort the fitness values in ascending order again to obtain the current best fitness value. and the current worst fitness value .
[0142] Thus, by replacing the second candidate state of charge value with the first candidate state of charge value when the replacement round condition is met in the updated round information, the replacement operation periodically replaces the candidate state of charge value with the first candidate state of charge value with the candidate state of charge value with the larger voltage deviation value, which helps to accelerate the convergence speed of the candidate state of charge value, reduce the waste of computing resources in the search region with the larger voltage deviation value, and at the same time, the replaced candidate state of charge value can serve as a new search starting point to further explore from the vicinity of the first candidate state of charge value, which helps to improve the search efficiency.
[0143] In some embodiments, determining the battery's state of charge (SOC) assessment value based on the updated SOC value includes: Generate the opposite state of charge value of the updated state of charge value. The sum of the opposite state of charge value and the updated state of charge value is equal to the sum of the upper and lower limits of the parameter value range.
[0144] The opposing state of charge (SOC) value refers to a value generated based on the bifurcation operation that is symmetrical about the parameter range to the updated SOC value. The SOC value is generated as follows: ; in, Indicates the values of opposite charge states; This represents the updated state of charge value; UB and LB represent the upper and lower limits of the parameter value range, respectively.
[0145] thus, and The sum of them equals UB + LB, meaning that the two are symmetrical about the center of the parameter value range.
[0146] If the voltage deviation value corresponding to the opposing state of charge value is equal to or greater than the voltage deviation value corresponding to the updated state of charge value, the state of charge assessment value of the battery is determined based on the updated state of charge value.
[0147] Among them, the values of opposite charge states are calculated. Corresponding voltage deviation value ,Will Compared with the updated state of charge value The corresponding voltage deviation value Ec is compared. When When the value is greater than or equal to Ec, it indicates that the fitness of the opposing state of charge value is not as good as that of the updated state of charge value. Therefore, the updated state of charge value should be kept unchanged, and the state of charge assessment value should be determined based on the updated state of charge value.
[0148] Thus, by generating the opposite state of charge value of the updated state of charge value and determining the state of charge evaluation value based on the updated state of charge value when the voltage deviation value corresponding to the opposite state of charge value is equal to or greater than the voltage deviation value corresponding to the updated state of charge value, the generation of the opposite state of charge value helps to explore the symmetrical region of the parameter value range, since the opposite state of charge value and the updated state of charge value are centrally symmetric about the parameter value range. Furthermore, selecting a better candidate value by comparing the voltage deviation value helps to improve the comprehensiveness of the global search.
[0149] In some embodiments, the method further includes: If the voltage deviation value corresponding to the opposite state of charge value is less than the voltage deviation value corresponding to the updated state of charge value, the state of charge assessment value of the battery is determined based on the opposite state of charge value.
[0150] Among them, when the opposite charge state value Corresponding voltage deviation value Less than the updated state of charge value When the corresponding voltage deviation value Ec is reached, it indicates that the fitness of the opposite state of charge value is better than that of the updated state of charge value, and the search results at the symmetrical point are better.
[0151] At this point, the current candidate charge state value is replaced with the opposite charge state value: = And update the fitness value simultaneously: .
[0152] Specifically, the complete logic of the fork operation is as follows: .
[0153] Based on the candidate state of charge values after replacement (or retention), the state of charge evaluation value is determined from the globally optimal record of each update round.
[0154] Thus, by determining the state of charge evaluation value based on the opposite state of charge value when the voltage deviation value corresponding to the opposite state of charge value is less than the voltage deviation value corresponding to the updated state of charge value, since the opposite state of charge value is used as the state of charge evaluation value when the voltage deviation value is smaller, it helps to capture the optimal region that may be missed by conventional updates alone, enabling the search process to explore the symmetrical region of parameter value range, which helps to improve the reliability of convergence to the global optimum.
[0155] In some embodiments, generating the opposite state of charge value of the updated state of charge value includes: Generate a second random number.
[0156] The second random number is a uniformly distributed random number within the interval [0,1], used to control whether to perform a forking operation. The second random number can be obtained from the BMS's random number generator.
[0157] If the second random number is less than a preset threshold, the opposite state of charge value of the updated state of charge value is generated.
[0158] The preset threshold refers to the threshold that controls the probability of triggering the fork operation. For example, it can be set to 0.01, meaning the fork operation is executed with a 1% probability. When the second random number rand < 0.01, the opposing charge state value is generated. It then performs fitness comparison and replacement logic. When the second random number rand ≥ 0.01, the forking operation is not performed, and the updated state of charge remains unchanged.
[0159] Thus, by generating a second random number and generating an opposing charge state value when the second random number is less than a preset threshold, the generation of the opposing charge state value is triggered randomly with a low probability. This helps to provide sporadic global exploration capabilities without affecting the efficiency of normal iterative search, reducing the risk of search direction disorder caused by frequent generation of opposing charge state values. At the same time, the low probability of triggering is sufficient to cover the symmetrical region of the parameter value range in long-term iterations, which helps to improve the ability to escape local optima.
[0160] In some embodiments, the process of determining the battery's state of charge reference value includes: Under the condition that the battery meets the preset resting conditions, the battery's state of charge reference value is determined based on the detected voltage.
[0161] The preset resting condition refers to the condition where the battery is in a resting state and the resting time exceeds the preset resting time. The preset resting time can be set to, for example, 30 minutes or 1 hour. When the BMS detects that the absolute value of the battery current is less than the preset current threshold (e.g., 0.1A) and the duration exceeds the preset resting time, it determines that the preset resting condition is met.
[0162] Specifically, under preset resting conditions, the battery's terminal voltage tends to stabilize, approximately equal to the open-circuit voltage OCV. At this point, the terminal voltage U_ocv is measured, and the reference SOC_ref corresponding to the current detected voltage and battery temperature is obtained from the offline OCV-SOC-temperature reference library. This reference SOC_ref is then determined as the battery's state of charge (SOC) reference value. Since the terminal voltage under resting conditions has high reliability, the reference SOC_ref obtained from the OCV lookup table can serve as an accurate initial value for the ampere-hour integration, eliminating accumulated errors.
[0163] If the battery does not meet the preset resting conditions, the historical state of charge assessment value is determined as the battery's state of charge benchmark value.
[0164] When the battery is in operation (with high current or insufficient rest time), the terminal voltage is affected by IR voltage drop and polarization effect, and cannot be directly used for OCV lookup. In this case, the state of charge assessment value obtained from the previous assessment (i.e., the historical state of charge assessment value) is determined as the state of charge baseline value and used as the initial value for the current ampere-hour integral.
[0165] Thus, by determining the state of charge (SOC) baseline value based on the detection voltage when the battery meets the preset resting conditions, and using the historical SOC assessment value as the SOC baseline value when the conditions are not met, the baseline value determined based on the detection voltage under resting conditions has high reliability and helps reduce the cumulative error of ampere-hour integration. Using the historical SOC assessment value under non-resting conditions helps maintain the continuity of the baseline. This allows for the synergy between resting correction and online tracking, taking into account both the accuracy and continuity of SOC estimation.
[0166] In some embodiments, updating the maximum usable capacity of the battery based on a target state of health value includes: When the target health value of the battery indicates that it is fully charged, the maximum available capacity of the battery is updated based on the target health value of the battery according to the first cycle.
[0167] The target health status value indicates that the battery is currently fully charged, at which point the SOH_trad can be accurately calculated using capacity measurement. The first cycle refers to the SOH update cycle under full charge conditions, which can be set to every 100 cycles or every 30 days. Under full charge conditions, since a highly reliable SOH benchmark value can be obtained by measuring the ratio of the actual charging capacity to the nominal capacity, updates can be performed according to a longer first cycle, avoiding unnecessary frequent calculations.
[0168] If the target health status value of the battery indicates that it is not fully charged, the maximum available capacity of the battery is updated according to the target health status value of the battery in the second cycle; wherein the first cycle is longer than the second cycle.
[0169] The target health status value indicates that the battery is not currently fully charged. The second cycle refers to the SOH update cycle in the non-fully charged state, which can be set to every 50 cycles or every 15 days. In the non-fully charged state, the reliability of SOH_trad is relatively low (it cannot be accurately calculated using capacity measurement methods), therefore, updates are performed according to a shorter second cycle to more frequently correct the maximum available capacity and reduce the deviation between the capacity benchmark and the actual aging state. The first cycle is longer than the second cycle, reflecting the differentiated design of the SOH update strategy for fully charged and non-fully charged states.
[0170] Thus, by updating the maximum available capacity according to the first cycle when the target health status value indicates full charge, and according to the second cycle when it indicates non-full charge, with the first cycle being longer than the second cycle, the calculation reliability of the target health status value is higher when the target health status value is fully charged, allowing for a longer cycle to reduce the calculation frequency. The reliability is relatively lower when the target health status value is not fully charged, requiring a shorter cycle to correct the capacity reference more frequently. This helps to achieve a balance between the reliability of the target health status value calculation and the timeliness of the capacity reference, reducing the risk of unnecessary frequent calculations when the target health status value is fully charged and the risk of SOC estimation deviation caused by the lag in the capacity reference when the target health status value is not fully charged.
[0171] In some embodiments, the range of parameter values for the state of charge (SOC) is determined based on the updated maximum available capacity and the SOC reference value of the battery, including: The predicted state of charge (SOC) value is determined based on the updated maximum available capacity and the battery's SOC baseline value.
[0172] The predicted state of charge (SOC) value refers to the current SOC estimate calculated using the ampere-hour integration method based on the updated maximum available capacity and the baseline SOC value. The predicted SOC value serves as the center of the parameter value range and is used to define the search interval for candidate SOC values.
[0173] Specifically, the calculation method for predicting the state of charge is as follows: ; in, This is the reference value for the state of charge; This is the updated maximum available capacity; The battery's operating current; τ∈( ,t).
[0174] By using the updated Q_max for ampere-hour integration, the systematic bias caused by the failure to update the capacity decay in a timely manner can be eliminated, making the predicted state of charge value closer to the battery's current true SOC.
[0175] Based on the predicted state of charge value, the range of parameter values for the state of charge is determined.
[0176] Specifically, the range of SOC variation is determined based on the current sign (positive for discharging, negative for charging). If the current I > 0 (discharging), the parameter value range is [SOC(t), SOC(t) + 10%]; if the current I < 0 (charging), the parameter value range is [SOC(t) - 10%, 1].
[0177] Where SOC(t) is the predicted state of charge value.
[0178] Thus, by determining the predicted state of charge (SOC) value based on the updated maximum available capacity and the battery's SOC benchmark value, and then determining the range of SOC parameter values based on the predicted SOC value, the capacity benchmark is kept consistent with the current aging state because the predicted SOC value is calculated using ampere-hour integration based on the updated maximum available capacity. This helps reduce the systematic deviation of capacity decay on SOC integration, and the range of parameter values is centered on the predicted SOC value under the current aging state, thus narrowing the search space for candidate SOC values and reducing invalid traversal and iterative computation while covering the true SOC.
[0179] Reference Figure 4 , Figure 4 This is a schematic diagram of the fourth process of the battery state-of-charge (POC) assessment method provided in an exemplary embodiment of this disclosure. In some embodiments, the process of determining the voltage deviation value corresponding to the candidate POC value includes: S401. Based on the candidate state of charge value, the target health state value, the first calibration relationship and the second calibration relationship, determine the open circuit voltage value and the associated internal resistance value of the DC internal resistance.
[0180] The first calibration relationship includes the correlation mapping between the battery's state of charge, state of health, and open-circuit voltage, which is the offline OCV-SOC-temperature reference library. This reference library was obtained through offline calibration under laboratory conditions, using low-rate (e.g., C / 20) charge-discharge tests at different temperatures and aging points.
[0181] Based on the candidate state of charge value, the target state of health value, and the current battery temperature, the corresponding open-circuit voltage value OCV_ref is obtained by interpolation from the offline OCV-SOC-temperature reference library.
[0182] The second calibration relationship includes the correlation mapping between the battery's state of charge, state of health, and DC internal resistance, which is the offline DCR-SOC-temperature reference library. This reference library was obtained through offline calibration under laboratory conditions using HPPC (hybrid pulse power characterization) pulse tests at different temperatures and aging points.
[0183] Based on the candidate state of charge value, the target state of health value, and the current battery temperature, the corresponding associated internal resistance values R0_ref, R1_ref, and R2_ref are obtained by interpolation from the offline DCR-SOC-temperature benchmark library.
[0184] By using OCV and DCR as fixed benchmarks for offline high-precision calibration, rather than online identification variables, SOC estimation is reduced to one-dimensional state tracking. Only SOC is used as the parameter to be estimated, and OCV and DCR are obtained by interpolation from the offline benchmark library using the current SOC and temperature, which greatly reduces the online computational burden and parameter coupling risk.
[0185] S402. Based on the correlation between the open-circuit voltage value and the DC internal resistance value, determine the voltage deviation value corresponding to the candidate state of charge value.
[0186] Specifically, a simplified voltage response model is established using OCV_ref and R0_ref / R1_ref / R2_ref as known references: ; Wherein, OCV_ref represents the open-circuit voltage value obtained from the first calibration relationship based on the candidate state of charge value; I(t) represents the detection current; R0_ref represents the ohmic internal resistance value; R1_ref and R2_ref represent the polarization internal resistance values; and Umodel(t) represents the predicted voltage value.
[0187] Furthermore, the voltage deviation value The formula for calculating the fitness value is: ; Where Umeas(t) represents the detected voltage value; Umodel(t) represents the predicted voltage value.
[0188] For each candidate state of charge (SOC), the sum of the squares of the differences between the predicted voltage and the detected voltage at all sampling times is calculated as the voltage deviation value for that candidate SOC. The smaller the voltage deviation value, the closer the candidate SOC value is to the battery's true SOC.
[0189] Thus, by determining the open-circuit voltage and the associated internal resistance of the DC internal resistance based on the candidate state of charge (SOC) value, the target state of health (SOC) value, the first calibration relationship, and the second calibration relationship, and determining the voltage deviation value based on the open-circuit voltage and the associated internal resistance value, since the open-circuit voltage and the associated internal resistance value are determined based on the candidate SOC value and the target state of health through the first calibration relationship and the second calibration relationship, the voltage deviation value can reflect the degree of fit of the candidate SOC value to the actual operating conditions of the battery. This helps to reliably guide the iterative update direction of the candidate SOC value, so that the final determined SOC evaluation value more accurately represents the current SOC of the battery.
[0190] Reference Figure 5 , Figure 5 This is a schematic diagram of the fifth step in the battery state-of-charge assessment method provided by an exemplary embodiment of this disclosure. Figure 5As shown, in one embodiment, the overall process of the battery state-of-charge assessment method includes: Set the population size (i.e. the number of candidate charged state values) N (50), the number of dimensions D=dim, the maximum number of iterations T=500, the preset number of channel elimination intervals (time=10), and the upper bound UB=SOC_max and the lower bound LBSOC_min of the parameter value range, and set the update round information to t=0.
[0191] After initialization, the iteration termination determination stage is entered to determine whether the current iteration number t is less than the maximum iteration number T. If the determination result is no, the final optimal solution and its corresponding fitness value (i.e., voltage deviation value) are output, and the process terminates. If the determination result is yes, the calculation process of this iteration is entered.
[0192] After entering the iterative calculation, an initial population is first randomly generated within the preset upper and lower bounds of the parameters (i.e., multiple candidate state of charge values are selected from the parameter value range), and the search direction vector with element values of -1 or 1 is initialized. At the same time, the battery voltage response model and the SOC estimation objective function are constructed. Then, the fitness value of all individuals in the current population (each individual is a candidate state of charge value) is calculated, and each fitness value is assigned to the energy variable Ec.
[0193] After completing the initial fitness calculation, determine whether the result of taking the current iteration number modulo the preset channel update period max_ch_time is 0. If the result is yes, sort the fitness values of all individuals in ascending order, replace the worst individual with the best individual, and update the corresponding energy variable Ec. After completing the channel elimination operation, sort the fitness values in ascending order again. If the result is no, sort the fitness values in ascending order directly.
[0194] After sorting, the best and worst fitness values of the current population are obtained, and the global energy parameters are updated according to the current iteration number (i.e., the update round information). Then, the optimal individual position (i.e., the first candidate charged state value) is slightly perturbed in the positive and negative directions of the current dimension, and the fitness value of the position after perturbation is evaluated. If the fitness is better after perturbation, the current search direction is kept unchanged; otherwise, the search direction is reversed to complete the search direction update.
[0195] After updating the search direction, the distance *dist* between the current individual and the best individual in each dimension is calculated, and it is determined whether *dist* is 0. If *dist* equals 0, the current individual is determined to be the best individual, and its position is updated along the current search direction using normally distributed random numbers. If *dist* is not equal to 0, the current individual is determined to be an ordinary individual, and its position is updated towards the best individual using exponentially distributed random numbers. After the position update is completed, it is checked and corrected whether the new position is within the parameter boundary range, and positions that exceed the boundary are corrected. Then, the fitness value of the new position is evaluated. If the fitness value of the new position is better than that of the current position, the individual's position and corresponding fitness energy value are updated.
[0196] After updating the individual's position, check if the randomly generated probability value is less than 0.01. If yes, generate the opposite point (i.e., the opposite charged state value) of the current position (i.e., the updated charged state value), calculate the fitness value of the opposite point, and replace the current individual's position with the opposite point and update the fitness value simultaneously if the opposite point has better fitness. If no, do not perform the forking operation. Then, perform a convergence check. If the current best fitness value is equal to the worst fitness value, it means the population has converged, and the iteration loop is terminated early. If it has not converged, increment the iteration counter t by 1, return to the iteration termination check node, and enter the next loop until the number of iterations reaches the upper limit (i.e., the preset number condition) or the population converges. Then, output the final result and end the process.
[0197] On the other hand, embodiments of this application also provide an electronic device.
[0198] like Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 600 includes a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, and a computer program stored on the memory 602 and executable on the processor. The processor 601 and the memory 602 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0199] The processor 601 is the control center of the electronic device 600. It connects various parts of the electronic device 600 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 602, and by calling data stored in the memory 602, it executes various functions and processes data of the electronic device 600, thereby providing overall monitoring of the electronic device 600. The processor 601 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this application.
[0200] In this embodiment, the processor 601 in the electronic device 600 loads the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 runs the applications stored in the memory 602 to realize various functions, such as: The maximum usable capacity of the battery is updated based on the target health status value of the battery. Based on the updated maximum available capacity and the battery's state of charge reference value, the range of parameter values for the state of charge is determined; Multiple candidate state of charge values are selected from the range of parameter values, and the first candidate state of charge value among the multiple candidate state of charge values is determined. Based on the first candidate state of charge value, the plurality of candidate state of charge values are updated; Based on the updated state of charge value, the state of charge assessment value of the battery is determined.
[0201] The specific implementation of each of the above operations and their corresponding beneficial effects can be found in the previous embodiments, and will not be repeated here.
[0202] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0203] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs. These computer programs can be loaded by a processor to execute any of the battery state-of-charge (SOC) assessment methods provided in this application. The computer program can execute the steps of the battery SOC assessment method as follows: The maximum usable capacity of the battery is updated based on the target health status value of the battery. Based on the updated maximum available capacity and the battery's state of charge reference value, the range of parameter values for the state of charge is determined; Multiple candidate state of charge values are selected from the range of parameter values, and the first candidate state of charge value among the multiple candidate state of charge values is determined. Based on the first candidate state of charge value, the plurality of candidate state of charge values are updated; Based on the updated state of charge value, the state of charge assessment value of the battery is determined.
[0204] The specific implementation of each of the above operations and their corresponding beneficial effects can be found in the previous embodiments, and will not be repeated here.
[0205] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0206] Since the computer program stored in the computer-readable storage medium can execute any of the battery state-of-charge assessment methods provided in the embodiments of this application, the beneficial effects that any of the battery state-of-charge assessment methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0207] It should be noted that, in the data processing stage, the technical solution of this application has strictly limited the scope of data collection to the minimum necessary to achieve the technical objectives, preventing the acquisition of irrelevant information. For any user information to be collected, the data subject will be clearly informed and their consent obtained. Furthermore, technologies such as encrypted storage and access control are employed to strengthen data security and ensure the security and compliance of the entire data processing process. The technical model and decision-making mechanism are based on objective technical parameters and do not introduce unnecessary parameters such as gender or age that may lead to discrimination, resolutely eliminating algorithmic discrimination and upholding public order and good morals. In addition, the specification fully describes the technical implementation methods, application scenarios, and compliance protection details. The claims are consistent with the content of the specification, key compliance designs are clear and verifiable, and the overall technical design is guided by the protection of public interests and adherence to social ethics, without any circumstances that harm public interests or violate public order and good morals.
[0208] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0209] The foregoing has provided a detailed description of a battery state-of-charge assessment method, electronic device, and readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for assessing the state of charge (SOC) of a battery, characterized in that, include: The maximum usable capacity of the battery is updated based on the target health status value of the battery. Based on the updated maximum available capacity and the battery's state of charge reference value, the range of parameter values for the state of charge is determined; Multiple candidate state of charge values are selected from the range of parameter values, and the first candidate state of charge value among the multiple candidate state of charge values is determined. Based on the first candidate state of charge value, the plurality of candidate state of charge values are updated; Based on the updated state of charge value, the state of charge assessment value of the battery is determined.
2. The method for assessing the state of charge of a battery according to claim 1, characterized in that, The step of updating the plurality of candidate state-of-charge values based on the first candidate state-of-charge value includes: If the voltage deviation value corresponding to the plurality of candidate state of charge values does not meet the preset deviation condition or the update round information does not meet the preset number of times condition, the plurality of candidate state of charge values are updated based on the first candidate state of charge value, wherein the update round information is used to indicate the round in which the plurality of candidate state of charge values are updated based on the first candidate state of charge value.
3. The method for assessing the state of charge of a battery according to claim 2, characterized in that, The method further includes: If the voltage deviation value corresponding to the plurality of candidate state of charge values meets a preset deviation condition or the update round information meets a preset number condition, the state of charge evaluation value of the battery is determined based on the first candidate state of charge value of each update round.
4. The method for assessing the state of charge of a battery according to claim 1, characterized in that, The step of updating the plurality of candidate state-of-charge values based on the first candidate state-of-charge value includes: When the candidate state of charge value is the first candidate state of charge value, the update step size is determined based on the update round information and the preset maximum update round; The first candidate state of charge value is updated based on the update step size; If the candidate state of charge value is not the first candidate state of charge value, the candidate state of charge value is updated based on the difference between the candidate state of charge value and the first candidate state of charge value.
5. The method for assessing the state of charge of a battery according to claim 4, characterized in that, The method includes: Based on the first candidate state of charge value and the specified adjustment amount, the adjusted candidate state of charge value is determined; The update direction is determined based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction; The step of updating the first candidate state of charge value based on the update step size includes: The first candidate state of charge value is updated based on the update step size and the update direction.
6. The method for assessing the state of charge of a battery according to claim 5, characterized in that, The process of determining the specified adjustment amount includes: The specified adjustment amount is determined based on the initial update direction and the range of parameter values.
7. The method for assessing the state of charge of a battery according to claim 5, characterized in that, The step of determining the update direction based on the voltage deviation value corresponding to the adjusted candidate state of charge value and the initial update direction includes: If the voltage deviation value corresponding to the adjusted candidate state of charge value is less than the voltage deviation value corresponding to the first candidate state of charge value, the initial update direction is determined as the update direction. If the voltage deviation value corresponding to the adjusted candidate state of charge value is equal to or greater than the voltage deviation value corresponding to the first candidate state of charge value, the opposite direction of the initial update direction is determined as the update direction.
8. The method for assessing the state of charge of a battery according to claim 4, characterized in that, The step of updating the candidate state of charge value based on the difference between the candidate state of charge value and the first candidate state of charge value includes: A random number is generated based on the difference between the candidate state of charge value and the first candidate state of charge value; The candidate state of charge value is updated based on the random number.
9. The method for assessing the state of charge of a battery according to claim 4, characterized in that, The method further includes: If the updated round information meets the replacement round condition, the second candidate state of charge value among the plurality of candidate state of charge values is replaced with the first candidate state of charge value to obtain a new plurality of candidate state of charge values.
10. The method for assessing the state of charge of a battery according to any one of claims 1-9, characterized in that, The step of determining the state of charge (SOC) assessment value of the battery based on the updated SOC value includes: Generate the opposite state of charge value of the updated state of charge value, and the sum of the opposite state of charge value and the updated state of charge value is equal to the sum of the upper limit value and the lower limit value in the range of parameter values; If the voltage deviation value corresponding to the opposing state of charge value is equal to or greater than the voltage deviation value corresponding to the updated state of charge value, the state of charge assessment value of the battery is determined based on the updated state of charge value.
11. The method for assessing the state of charge of a battery according to claim 10, characterized in that, The method further includes: If the voltage deviation value corresponding to the opposing state of charge value is less than the voltage deviation value corresponding to the updated state of charge value, the state of charge assessment value of the battery is determined based on the opposing state of charge value.
12. The method for assessing the state of charge of a battery according to claim 10, characterized in that, The generation of the opposite state of charge value of the updated state of charge value includes: Generate a second random number; If the second random number is less than a preset threshold, the opposite state of charge value of the updated state of charge value is generated.
13. The method for assessing the state of charge of a battery according to any one of claims 1-12, characterized in that, The process of determining the battery's state of charge reference value includes: When the battery meets the preset resting conditions, the state of charge (SOC) reference value of the battery is determined based on the detected voltage. If the battery does not meet the preset resting conditions, the historical state of charge assessment value is determined as the battery's state of charge benchmark value.
14. The method for assessing the state of charge of a battery according to claim 1, characterized in that, When the target health status value of the battery indicates that it is fully charged, the maximum usable capacity of the battery is updated according to the target health status value of the battery in the first cycle. If the target health status value of the battery indicates that it is not fully charged, the maximum available capacity of the battery is updated according to the target health status value of the battery in a second cycle; wherein the first cycle is longer than the second cycle.
15. The method for assessing the state of charge of a battery according to any one of claims 1-12, characterized in that, The determination of the range of parameter values for the state of charge (SOC) based on the updated maximum available capacity and the SOC reference value of the battery includes: Based on the updated maximum available capacity and the battery's state of charge reference value, the predicted state of charge value is determined; Based on the predicted state of charge value, the range of parameter values for the state of charge is determined.
16. The method for assessing the state of charge of a battery according to claim 2, characterized in that, The process of determining the voltage deviation value corresponding to the candidate state of charge value includes: Based on the candidate state of charge value, the target state of health value, the first calibration relationship, and the second calibration relationship, the open-circuit voltage value and the associated internal resistance value of the DC internal resistance are determined; the first calibration relationship includes the associated mapping relationship between the battery's state of charge, state of health, and open-circuit voltage; the second calibration relationship includes the associated mapping relationship between the battery's state of charge, state of health, and the associated internal resistance of the DC internal resistance. Based on the correlation between the open-circuit voltage value and the DC internal resistance value, the voltage deviation value corresponding to the candidate state of charge value is determined.
17. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, and the processor executing the battery state-of-charge assessment method according to any one of claims 1 to 16 by calling the computer program stored in the memory.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the battery state-of-charge assessment method according to any one of claims 1 to 16.
