A battery capacity fast calibration method and system based on gradient descent
Patent Information
- Application Number
- CN202611028222.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-09-04
AI Technical Summary
[0005]为了克服新能源船舶因局部充电工况多、无法触发传统满充满放校准,导致电池容量估算随老化出现偏差的问题,本申请提供一种基于梯度下降的电池容量快速校准方法
[0008]The various embodiments of this disclosure have the following beneficial effects: The gradient descent-based rapid battery capacity calibration method of some embodiments of this disclosure can quickly complete battery capacity calibration and ensure the safety management of charging and discharging hardware in fragmented charging scenarios such as new energy ships, without relying on complete full-charge-discharge cycles. Specifically, in electric vehicles, energy storage systems, and new energy ship applications, the reason for the low accuracy and difficulty in calibrating battery capacity estimation results is that current sensors experience drift and proportional deviation during long-term operation, causing accumulated errors in the traditional ampere-hour integration method after long-term calculations. Correcting this accumulated error relies on complete full-charge-discharge cycles of the battery, but daily charging is mostly short-term partial charging (for example, new energy ships are limited by route schedules and port berthing and loading/unloading times), rarely experiencing full-charge-discharge cycles, causing traditional calibration mechanisms to fail. Therefore, the gradient descent-based rapid battery capacity calibration method of some embodiments of this disclosure first, in response to receiving a battery charging event trigger signal, collects the current sequence, terminal voltage sequence, and battery temperature during a partial charging segment. This breaks the limitation of traditional capacity calibration requiring a complete full charge and discharge cycle, directly utilizing fragmented localized charging data generated during actual daily operations (e.g., vehicle parking or ship berthing) as the measurement source, thus improving the triggerability of the calibration mechanism in real-world scenarios. Secondly, the initial assumed capacity of the battery is obtained. This provides a starting point for subsequent gradient optimization iterations, helping to accelerate convergence. Next, based on the current sequence, terminal voltage sequence, and battery temperature, the following calibration capacity determination steps are performed: Based on the current sequence, battery temperature, and initial assumed capacity, a simulated terminal voltage sequence corresponding to a pre-set battery equivalent circuit model is generated. This maps the assumed capacity parameters to observable simulated voltages through a physical equivalent circuit model, establishing a physical reference for determining the deviation between theoretical and acquired values. Fitting error evaluation processing is performed on the simulated and measured terminal voltage sequences to obtain the gradient value of the objective function. Thus, by quantifying the error between the simulated and measured voltages, the direction and steepness of the deviation of the current assumed capacity from the actual capacity are determined, providing mathematical guidance for capacity value correction. Based on the gradient value of the objective function and the initial assumed capacity, an updated assumed capacity is generated. This drives the assumed capacity to undergo numerical correction along the direction of error reduction, enabling the algorithm to gradually approach the true capacity of the battery in its current state. A convergence judgment process is performed on the updated assumed capacity and the initial assumed capacity to obtain a convergence result. Therefore, an algorithm exit mechanism is established to stop iteration promptly when the computational accuracy reaches the expected level, preventing waste of computational resources. If the convergence result does not meet the preset convergence condition, the updated assumed capacity is used as the initial assumed capacity, and the calibration capacity determination step is executed.Therefore, when the accuracy is not up to standard, the old and new variables are exchanged, and the system automatically enters the next optimization loop to ensure the reliability of the battery calibration capacity results. In response to the convergence results meeting the preset convergence conditions, the calibrated capacity is generated based on the updated assumed capacity. Thus, under the premise of meeting safety and accuracy requirements, the actual capacity of the current battery is output, completing the closed loop of battery calibration calculation. Finally, based on the calibrated capacity, charge and discharge control commands are generated to adjust the battery operating boundaries and control the charging and discharging circuit switching of the battery. This achieves control over the underlying physical entity. Adjusting the charge and discharge boundaries based on the calibrated capacity effectively avoids overcharging or over-discharging of the battery, extends battery life, and ensures the safe operation of the power system.
Smart Images

Figure CN122690409A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery capacity calibration, and in particular to a method and system for rapid battery capacity calibration based on gradient descent. Background Technology
[0002] Battery capacity calibration is the foundation for battery management systems to assess battery health, optimize charging and discharging strategies, and estimate range.
[0003] In related technologies, during the daily operation of new energy ships, the current battery capacity is estimated by integrating the battery charging and discharging current over time. Additionally, a baseline value for the battery capacity is calibrated when the battery completes a full charge and discharge cycle.
[0004] Regarding the aforementioned technologies, current sensors exhibit drift and proportional deviation during long-term operation, which can easily lead to error accumulation after prolonged integration calculations. To correct this accumulated error, existing systems rely on the battery completing a full charge-discharge cycle for capacity calibration. However, in actual daily operation scenarios (e.g., fragmented partial charging scenarios, especially for new energy vessels constrained by shipping schedules and port berthing / unloading times), the charging process is typically a localized, rapid replenishment (e.g., charging from 30% to 80% before disconnecting the power supply for use). Complete full charge-discharge cycles are rare, making it impossible to trigger traditional calibration mechanisms. Consequently, capacity estimation results deviate with battery aging, indicating room for improvement. Summary of the Invention
[0005] To overcome the problem that battery capacity estimation in new energy ships deviates with aging due to the frequent partial charging conditions and the inability to trigger traditional full charge and discharge calibration, this application provides a rapid battery capacity calibration method based on gradient descent.
[0006] Firstly, this application provides a rapid battery capacity calibration method based on gradient descent, employing the following technical solution: In response to receiving a charging event trigger signal from the battery, the system acquires the current sequence, terminal voltage sequence, and battery temperature during a local charging segment; obtains the initial assumed capacity of the battery; and performs the following calibration capacity determination steps based on the current sequence, terminal voltage sequence, and battery temperature: Based on the current sequence, battery temperature, and initial assumed capacity, it generates a simulated terminal voltage sequence corresponding to a preset battery equivalent circuit model; it performs fitting error evaluation processing on the simulated terminal voltage sequence and the terminal voltage sequence to obtain the gradient value of the objective function; based on the gradient value of the objective function and the initial assumed capacity, it generates an updated assumed capacity; it performs difference convergence judgment processing on the updated assumed capacity and the initial assumed capacity to obtain a convergence result; in response to the convergence result not meeting a preset convergence condition, it uses the updated assumed capacity as the initial assumed capacity and performs the calibration capacity determination steps; in response to the convergence result meeting the preset convergence condition, it generates a calibration capacity based on the updated assumed capacity; and based on the calibration capacity, it generates charge / discharge control commands to adjust the battery operating boundary and control the charging / discharging circuit switch of the battery.
[0007] Secondly, this application provides a rapid battery capacity calibration system based on gradient descent, employing the following technical solution: The acquisition module is used to acquire current sequence, terminal voltage sequence and battery temperature; the memory is used to store the program of the above-mentioned rapid battery capacity calibration method based on gradient descent; the processor can load and execute the program in the memory to implement the above-mentioned rapid battery capacity calibration method based on gradient descent.
[0008] The various embodiments of this disclosure have the following beneficial effects: The gradient descent-based rapid battery capacity calibration method of some embodiments of this disclosure can quickly complete battery capacity calibration and ensure the safety management of charging and discharging hardware in fragmented charging scenarios such as new energy ships, without relying on complete full-charge-discharge cycles. Specifically, in electric vehicles, energy storage systems, and new energy ship applications, the reason for the low accuracy and difficulty in calibrating battery capacity estimation results is that current sensors experience drift and proportional deviation during long-term operation, causing accumulated errors in the traditional ampere-hour integration method after long-term calculations. Correcting this accumulated error relies on complete full-charge-discharge cycles of the battery, but daily charging is mostly short-term partial charging (for example, new energy ships are limited by route schedules and port berthing and loading / unloading times), rarely experiencing full-charge-discharge cycles, causing traditional calibration mechanisms to fail. Therefore, the gradient descent-based rapid battery capacity calibration method of some embodiments of this disclosure first, in response to receiving a battery charging event trigger signal, collects the current sequence, terminal voltage sequence, and battery temperature during a partial charging segment. This breaks the limitation of traditional capacity calibration requiring a complete full charge and discharge cycle, directly utilizing fragmented localized charging data generated during actual daily operations (e.g., vehicle parking or ship berthing) as the measurement source, thus improving the triggerability of the calibration mechanism in real-world scenarios. Secondly, the initial assumed capacity of the battery is obtained. This provides a starting point for subsequent gradient optimization iterations, helping to accelerate convergence. Next, based on the current sequence, terminal voltage sequence, and battery temperature, the following calibration capacity determination steps are performed: Based on the current sequence, battery temperature, and initial assumed capacity, a simulated terminal voltage sequence corresponding to a pre-set battery equivalent circuit model is generated. This maps the assumed capacity parameters to observable simulated voltages through a physical equivalent circuit model, establishing a physical reference for determining the deviation between theoretical and acquired values. Fitting error evaluation processing is performed on the simulated and measured terminal voltage sequences to obtain the gradient value of the objective function. Thus, by quantifying the error between the simulated and measured voltages, the direction and steepness of the deviation of the current assumed capacity from the actual capacity are determined, providing mathematical guidance for capacity value correction. Based on the gradient value of the objective function and the initial assumed capacity, an updated assumed capacity is generated. This drives the assumed capacity to undergo numerical correction along the direction of error reduction, enabling the algorithm to gradually approach the true capacity of the battery in its current state. A convergence judgment process is performed on the updated assumed capacity and the initial assumed capacity to obtain a convergence result. Therefore, an algorithm exit mechanism is established to stop iteration promptly when the computational accuracy reaches the expected level, preventing waste of computational resources. If the convergence result does not meet the preset convergence condition, the updated assumed capacity is used as the initial assumed capacity, and the calibration capacity determination step is executed.Therefore, when the accuracy is not up to standard, the old and new variables are exchanged, and the system automatically enters the next optimization loop to ensure the reliability of the battery calibration capacity results. In response to the convergence results meeting the preset convergence conditions, the calibrated capacity is generated based on the updated assumed capacity. Thus, under the premise of meeting safety and accuracy requirements, the actual capacity of the current battery is output, completing the closed loop of battery calibration calculation. Finally, based on the calibrated capacity, charge and discharge control commands are generated to adjust the battery operating boundaries and control the charging and discharging circuit switching of the battery. This achieves control over the underlying physical entity. Adjusting the charge and discharge boundaries based on the calibrated capacity effectively avoids overcharging or over-discharging of the battery, extends battery life, and ensures the safe operation of the power system. Attached Figure Description
[0009] Figure 1 This is a flowchart of some embodiments of the gradient descent-based rapid battery capacity calibration method according to the present disclosure. Detailed Implementation
[0010] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0011] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0012] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0013] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0014] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0015] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0016] refer to Figure 1 The diagram illustrates a flow 100 of some embodiments of a gradient descent-based rapid battery capacity calibration method according to the present disclosure. This gradient descent-based rapid battery capacity calibration method includes the following steps: Step 101: In response to receiving a charging event trigger signal from the battery, acquire the current sequence, terminal voltage sequence, and battery temperature under the local charging segment.
[0017] In some embodiments, the execution entity (e.g., an electronic device) of the above-described gradient descent-based rapid battery capacity calibration method can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as multiple software programs or software modules to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0018] In some embodiments, the aforementioned execution entity may, in response to receiving a battery charging event trigger signal, collect the current sequence, terminal voltage sequence, and battery temperature under a local charging segment.
[0019] In some optional implementations of certain embodiments, the aforementioned execution entity may, in response to receiving a battery charging event trigger signal, acquire the current sequence, terminal voltage sequence, and battery temperature during a partial charging segment, which may include the following steps: The first step involves continuously sampling the battery's sensor channels in response to a received charging event trigger signal, yielding the original charging current sequence, original terminal voltage sequence, and original battery temperature sequence. The charging event trigger signal can be a digital indication that the battery has begun drawing power from an external energy network. For example, it could be a message signal sent via a communication bus after a new energy vessel connects to shore power. The sensor channels can be analog or digital hardware interfaces used to acquire the battery's physical state. The original charging current sequence can be a continuous charging current sequence without any filtering. The original terminal voltage sequence can be a continuous, unprocessed battery terminal voltage sequence. The original battery temperature sequence can be a continuous, unprocessed battery temperature state sequence.
[0020] In practice, the aforementioned execution entity can respond to the charging event trigger signal by controlling the sensor channel to perform real-time continuous sampling processing on the battery at a preset sampling frequency (e.g., 1Hz or 10Hz) to obtain the original charging current sequence, the original terminal voltage sequence, and the original battery temperature sequence.
[0021] The second step involves generating a dynamic capacity sensitivity threshold based on the original battery temperature sequence and the preset polarization resistance temperature change mapping relationship. The preset polarization resistance temperature change mapping relationship can be an inherent physical correspondence between battery temperature and battery electrochemical polarization impedance. The dynamic capacity sensitivity threshold can be a boundary value used to determine whether voltage changes truly reflect capacity changes or fluctuations in non-polarization resistance.
[0022] In practice, firstly, the aforementioned executing entity can use each temperature sample value in the original battery temperature sequence as an index to perform mapping matching in the preset polarization internal resistance temperature change mapping relationship to obtain the polarization internal resistance reference value. Then, a nonlinear product operation (e.g., Arrhenius formula) can be performed based on the polarization internal resistance reference value and the preset basic threshold constant to obtain the dynamic capacity sensitivity threshold.
[0023] The third step involves performing a sliding window statistical processing on the original charging current sequence to obtain the steady-state constant current time interval. This sliding window processing can be achieved by sliding a fixed-length time window across the data sequence and calculating the standard deviation or rate of change of the data within the window. The steady-state constant current time interval can be a continuous period in which the charging current fluctuation rate is below a preset safety threshold.
[0024] As an example, the execution entity performs the following steps for each candidate sliding time window on the time axis corresponding to the original charging current sequence: The first sub-step is to determine the current fluctuation rate of each original charging current value within the aforementioned candidate sliding time window.
[0025] The second sub-step involves comparing the aforementioned current volatility with a preset steady-state volatility threshold (e.g., 3%).
[0026] The third sub-step is to merge the candidate sliding time windows into a steady-state constant current time interval in response to the current fluctuation rate being less than the preset fluctuation rate steady-state threshold.
[0027] Fourth, based on the aforementioned steady-state constant current time interval and the aforementioned original terminal voltage sequence, a steady-state terminal voltage sequence is generated. This steady-state terminal voltage sequence can be a terminal voltage sequence under constant current charging conditions.
[0028] In practice, firstly, the executing entity can extract the start and end time points in the time domain corresponding to the steady-state constant current time interval. Then, continuous terminal voltage data between the start and end time points in the time domain can be extracted from the original terminal voltage sequence. Finally, the extracted continuous terminal voltage data is determined as the steady-state terminal voltage sequence.
[0029] The fifth step involves performing time-difference processing on the above steady-state terminal voltage sequence to obtain a voltage rise rate sequence. This voltage rise rate sequence can represent the rate at which the terminal voltage changes over time.
[0030] In practice, for each terminal voltage sampling point in the above steady-state terminal voltage sequence (except for the first sampling point), firstly, the current voltage value corresponding to the above terminal voltage sampling point is subtracted from the historical voltage value corresponding to the previous adjacent terminal voltage sampling point to obtain the voltage difference. Then, the voltage difference is divided by the time interval between adjacent sampling points to obtain the voltage rise rate. Finally, the voltage rise rates generated in chronological order are combined to obtain the voltage rise rate sequence.
[0031] Step 6: Perform anti-polarization interference screening on the above voltage rise rate sequence and the above dynamic capacity sensitivity threshold to obtain a sensitivity time segment set. This sensitivity time segment set can be a timestamp sequence whose voltage ramp rate meets the requirements and which excludes low-temperature or high-current polarization interference.
[0032] As an example, for each voltage rise rate in the above voltage rise rate sequence, the execution entity performs the following steps: The first sub-step is to determine the sampling timestamp corresponding to the voltage rise rate as the target valid timestamp in response to the voltage rise rate being greater than the dynamic capacity sensitivity threshold.
[0033] The second sub-step involves performing time-domain aggregation on the obtained effective timestamps of each target to obtain a set of sensitivity time segments.
[0034] Step 7: Based on the aforementioned sensitivity time segment set, perform time-domain intersection extraction processing on the aforementioned steady-state constant current time interval to obtain the target local charging segment window. The target local charging segment window can be a time range possessing both constant current steady-state characteristics and capacity sensitivity.
[0035] In practice, the aforementioned execution entity can perform a time-domain intersection operation between the time span of the aforementioned sensitivity time segment set and the aforementioned steady-state constant current time interval. Then, the time overlap region obtained from the intersection operation is determined as the target local charging segment window.
[0036] Step 8: Based on the aforementioned target local charging segment window, the aforementioned original charging current sequence, the aforementioned original terminal voltage sequence, and the aforementioned original battery temperature sequence are simultaneously extracted to obtain the current sequence, terminal voltage sequence, and battery temperature.
[0037] In practice, firstly, the aforementioned executing entity can use the target local charging segment window as the time-domain clipping boundary. Then, the executing entity synchronously clips the data within the time-domain clipping boundary from the original charging current sequence, the original terminal voltage sequence, and the original battery temperature sequence. Finally, the clipped data are determined as the current sequence, terminal voltage sequence, and battery temperature under the aforementioned local charging segment, respectively.
[0038] Step 102: Obtain the initial assumed capacity of the battery.
[0039] In some embodiments, the executing entity may obtain the initial assumed capacity of the battery. This initial assumed capacity may be the battery's factory nominal capacity. This initial assumed capacity can be used as an initial reference value in the following calibration capacity determination step. In practice, the initial assumed capacity can be read from the system configuration parameter table.
[0040] Step 103: Based on the current sequence, terminal voltage sequence, and battery temperature, perform the following calibration capacity determination steps: Step 1031: Based on the current sequence, battery temperature, and initial assumed capacity, generate the simulation terminal voltage sequence corresponding to the pre-set battery equivalent circuit model.
[0041] In some embodiments, the execution entity can generate a simulation terminal voltage sequence corresponding to a preset battery equivalent circuit model based on the current sequence, battery temperature, and initial assumed capacity. The preset battery equivalent circuit model can be a mathematical and physical approximation model that uses a combination of ideal circuit elements such as resistors and capacitors to simulate the internal electrochemical dynamics of the battery. For example, the preset battery equivalent circuit model can be a first-order RC (Resistor Capacitor) Thevenin equivalent circuit model or a second-order RC equivalent circuit model.
[0042] In some optional implementations of certain embodiments, the execution entity may generate a simulation terminal voltage sequence corresponding to a preset battery equivalent circuit model based on the current sequence, battery temperature, and initial assumed capacity. This may include the following steps: The first step is to generate the current state of charge (SOC) sequence of the battery based on the initial assumed capacity and the current sequence described above. This SOC sequence can be a sequence of the percentage of remaining usable charge of the battery at each sampling time.
[0043] In practice, the aforementioned execution entity can process the data using an ampere-hour integration algorithm: First, it obtains the initial state of charge (SOC) value of the local charging segment. Then, for each current value in the current sequence, the execution entity multiplies the current value by the hardware sampling period to obtain the accumulated SOC. Next, it divides the accumulated SOC by the initial assumed capacity to obtain the change in SOC at the current moment. Finally, it adds the change in SOC to the SOC value from the previous moment to obtain the current SOC value, and sorts the obtained SOC values in chronological order to obtain the SOC sequence.
[0044] The second step involves performing open-circuit voltage mapping on the aforementioned state-of-charge sequence and battery temperature to obtain an open-circuit voltage sequence. This open-circuit voltage sequence can be the internal potential sequence of the battery when it reaches thermodynamic equilibrium.
[0045] In practice, the aforementioned execution entity can use the various state-of-charge values in the above-mentioned state-of-charge sequence and the battery temperature as a two-dimensional search index. It then performs bilinear interpolation retrieval processing in a pre-programmed OCV (Open Circuit Voltage, OCV)-SOC (State of Charge, SOC)-temperature three-dimensional mapping table in the storage area to obtain the open-circuit voltage value corresponding to each time point. Subsequently, the open-circuit voltage values corresponding to each time point are combined to obtain the open-circuit voltage sequence.
[0046] The third step involves generating a resistance-capacitance parameter matrix based on the aforementioned battery temperature and state-of-charge sequence. This matrix can be derived from the physical impedance characteristics of the pre-defined battery equivalent circuit model. For example, for a first-order RC model, the resistance-capacitance parameter matrix could include an ohmic internal resistance sequence (…). ), polarization internal resistance sequence ( ) and polarization capacitance sequence ( ).
[0047] In practice, the aforementioned execution entity can extract the ohmic internal resistance, polarization internal resistance, and polarization capacitance at the corresponding time from a preset RC parameter calibration table based on the battery temperature and each state of charge value in the aforementioned state of charge sequence, and construct the extracted parameters into a RC parameter matrix according to the time series.
[0048] The fourth step involves performing transient response processing on the aforementioned resistance-capacitance parameter matrix and current sequence to obtain the polarization voltage sequence and ohmic voltage drop sequence. The polarization voltage sequence can be the terminal voltage hysteresis response component caused by electrochemical polarization and concentration polarization during battery charging and discharging. The aforementioned ohmic voltage drop sequence can be attributed to the instantaneous voltage jump components caused by the ohmic resistance of the internal metal conductors and electrolyte of the battery. ).
[0049] In practice, for each current value in the above current sequence, the execution entity performs the following transient response calculation steps: The first sub-step involves multiplying the current value with the ohmic internal resistance at the corresponding moment in the aforementioned resistance-capacitance parameter matrix to obtain the ohmic voltage drop value at the corresponding moment.
[0050] The second sub-step involves substituting the aforementioned current value, the polarization internal resistance and polarization capacitance at the corresponding time in the aforementioned resistance-capacitance parameter matrix into a preset RC network discretization difference equation (e.g., the backward Euler discretization equation) for iterative solution to obtain the polarization voltage value at the corresponding time.
[0051] The third sub-step involves sequentially combining the obtained ohmic voltage drop and polarization voltage values at each time point to obtain the ohmic voltage drop sequence and polarization voltage sequence.
[0052] The fifth step involves superimposing and combining the above open-circuit voltage sequence, polarization voltage sequence, and ohmic voltage drop sequence to obtain the comprehensive response voltage sequence.
[0053] In practice, for timestamps at the same moment, the open-circuit voltage values in the open-circuit voltage sequence, the polarization voltage values in the polarization voltage sequence, and the ohmic voltage drop values in the ohmic voltage drop sequence are algebraically summed (under charging conditions, this could be...). Then, the calculation results obtained at each time point are combined in chronological order to obtain the comprehensive response voltage sequence.
[0054] Step 6: Based on the above comprehensive response voltage sequence, generate the simulation terminal voltage sequence corresponding to the above-preset battery equivalent circuit model.
[0055] In practice, the aforementioned execution entity stores the comprehensive response voltage sequence into a preset terminal voltage variable through memory address mapping operations, thereby obtaining the simulated terminal voltage sequence.
[0056] Step 1032: Perform fitting error evaluation processing on the simulated terminal voltage sequence and terminal voltage sequence to obtain the gradient value of the objective function.
[0057] In some embodiments, the execution entity can perform fitting error evaluation processing on the simulated terminal voltage sequence and the terminal voltage sequence to obtain the gradient value of the objective function. The gradient value of the objective function can be the instantaneous rate of change (i.e., the descent slope) of the model prediction error with respect to the current assumed capacity, and can be used to determine the iterative direction of subsequent capacity optimization.
[0058] In some optional implementations of certain embodiments, the execution entity may perform fitting error evaluation processing on the simulated terminal voltage sequence and the terminal voltage sequence to obtain the gradient value of the objective function, which may include the following steps: The first step is to subtract the simulated terminal voltage sequence and the actual terminal voltage sequence point by point to obtain the voltage residual sequence. The voltage residual can be the deviation between the predicted voltage and the actual sampled voltage at each identical time point.
[0059] In practice, for each sampling timestamp corresponding to the above terminal voltage sequence, the execution entity performs the following steps: The first sub-step involves extracting the simulated terminal voltage value corresponding to the sampling timestamp in the simulated terminal voltage sequence, and the measured terminal voltage value corresponding to the sampling timestamp in the terminal voltage sequence.
[0060] The second sub-step involves subtracting the measured voltage value from the simulated voltage value to obtain the voltage residual value corresponding to the sampling timestamp.
[0061] The third sub-step involves combining the voltage residual values corresponding to each timestamp in chronological order to obtain the voltage residual sequence.
[0062] The second step is to sum the squares of the voltage residual sequence to obtain the total squared error value. This total squared error value can be the cumulative energy of the voltage prediction deviation at each discrete moment within the entire local charging segment, and the cumulative energy is always a non-negative number.
[0063] In practice, each voltage residual value in the above voltage residual sequence is multiplied by itself to obtain the squared residual value. Then, the obtained squared residual values are summed to obtain the total squared error value.
[0064] The third step involves generating a mean squared error objective function based on the total squared error value, where the independent variable of the mean squared error objective function is the capacity. This objective function can be a mathematical function that uses the battery capacity to be calibrated as the independent variable and minimizes the global fitting error between the simulated voltage and the measured voltage as its optimization objective.
[0065] In practice, the total squared error is divided by the total number of sampling points in the voltage residual sequence to obtain the scalar mean square error. Since the calculation logic of the simulated terminal voltage sequence (e.g., calculating the state of charge using ampere-hour integration) depends on the battery capacity parameter, this battery capacity parameter is abstracted as an unknown independent variable. And build a mapping relationship in system memory to generate a capacity Let be the objective function for the mean squared error of the independent variable.
[0066] Specifically, the expression for the above mean squared error objective function can be: Among them, the above It can be the first The measured terminal voltage at each sampling point. (The above...) It can be about the capacity of the independent variable. The simulated terminal voltage.
[0067] The fourth step involves performing analytical derivative processing on the above mean squared error objective function with respect to the capacity variable to obtain the gradient partial derivative function. This gradient partial derivative function can be a function of the steepest descent direction of the objective error as a function of the capacity dimension.
[0068] In practice, the aforementioned executing entity can utilize the chain rule of calculus to derive and solve the first-order partial derivatives of the mean square error objective function with respect to the capacity variable. Specifically, the executing entity sequentially performs partial derivative expansions: differentiating the mean square error with respect to the voltage residual, differentiating the voltage residual with respect to the simulated terminal voltage, differentiating the simulated terminal voltage with respect to the state of charge, and differentiating the state of charge with respect to the capacity. Then, the results of these partial derivatives are multiplied together to obtain the gradient partial derivative function.
[0069] Fifth step: Based on the above gradient partial derivative function and the above initial assumed capacity, generate the gradient value of the objective function.
[0070] In practice, the executing entity takes the initial assumed capacity as the specific value of the independent variable and substitutes it into the gradient partial derivative function expression for algebraic evaluation. Then, the specific value of the operation is determined as the gradient value of the objective function. This gradient value of the objective function can be used to indicate the slope of the error surface at the current starting point.
[0071] Step 1033: Generate updated assumption capacity based on the gradient value of the objective function and the initial assumption capacity.
[0072] In some embodiments, the execution entity can generate an updated assumed capacity based on the gradient value of the objective function and the initial assumed capacity. The updated assumed capacity can be an intermediate capacity result that further approximates the true physical capacity after one gradient descent mathematical iteration optimization.
[0073] In some optional implementations of certain embodiments, the execution entity may generate an updated assumed capacity based on the gradient value of the objective function and the initial assumed capacity, which may include the following steps: The first step is to obtain the historical gradient direction sequence. This historical gradient direction sequence can be the sequence of signs (positive or negative) of the capacity correction direction in previous optimization iterations.
[0074] In practice, the aforementioned execution entity can read the positive and negative sign identifiers of each historical gradient value saved in the previous iteration cycle from the system's internal working buffer, and combine the read positive and negative sign identifiers according to the iteration order to obtain the historical gradient direction sequence. If it is the first iteration, the above historical gradient direction sequence is empty.
[0075] The second step involves extracting the magnitude feature from the gradient value of the objective function to obtain the current gradient magnitude. This current gradient magnitude characterizes the absolute steepness of the current capacity estimation error surface; it has no directional attribute, only a numerical value.
[0076] In practice, the aforementioned execution entity can call the absolute value calculation function to perform the absolute value operation on the gradient value of the objective function, thereby obtaining the current non-negative gradient magnitude.
[0077] The third step involves performing a deflection dynamic evaluation on the current gradient magnitude and the historical gradient direction sequence to obtain the historical gradient direction change rate. This historical gradient direction change rate reflects the severity of the oscillations of the optimization trajectory on the error surface. Specifically, if the historical gradient direction change rate exceeds a preset evaluation threshold, it indicates that the local curvature of the current optimization step size relative to the error surface is too large, causing the optimization trajectory to overshoot near the minimum value of the objective function, meaning the algorithm becomes oscillating and difficult to converge.
[0078] In practice, firstly, the executing entity can extract the current sign of the gradient value of the objective function. Then, it compares the current sign with the historical signs in the historical gradient direction sequence one by one to count the number of sign flips, and uses the current gradient magnitude at each sign flip as a weighting coefficient for summation. Next, the weighted number of sign flips is divided by a preset evaluation window length to obtain the rate of change of the historical gradient direction.
[0079] The fourth step is to generate an adaptive step size factor based on the current gradient magnitude and the historical gradient direction change rate.
[0080] Fifth, based on the aforementioned adaptive step size factor and the gradient value of the objective function, generate the capacity update amount for the current iteration cycle. This capacity update amount can be the specific numerical value by which the initially assumed capacity is increased or decreased in this single iteration.
[0081] In practice, firstly, the executing entity can multiply the gradient value of the objective function by negative one (representing the direction of error descent in the opposite direction of the gradient) to obtain the corrected direction reference. Then, the corrected direction reference is multiplied by the adaptive step size factor to obtain the capacity update amount for the current iteration period.
[0082] The sixth step is to perform a superposition correction process on the above-mentioned initial assumed capacity and the above-mentioned capacity update amount to obtain the updated assumed capacity.
[0083] In practice, the aforementioned execution entity can perform an algebraic addition operation on the value of the initial assumed capacity and the value of the capacity update in memory to obtain the updated assumed capacity.
[0084] In some optional implementations of certain embodiments, the execution entity may generate an adaptive step size factor based on the current gradient magnitude and the historical gradient direction change rate, which may include the following steps: The first step involves adjusting the step size by mapping the current gradient magnitude and the historical gradient direction change rate to obtain the first-order basic step size. This first-order basic step size can be a search step size determined based on the first derivative information of the objective function.
[0085] In practice, firstly, the executing entity can substitute the current gradient magnitude into a preset direct proportional mapping function (the larger the magnitude, the steeper the slope, and the larger the initial step size). Simultaneously, it substitutes the historical gradient direction change rate into a preset inverse proportional penalty function. Finally, it multiplies the result of the direct proportional mapping function with the result of the inverse proportional penalty function to obtain the first-order basic step size. During periods of severe oscillation, the step size is automatically reduced to prevent exceeding the limit.
[0086] The second step involves performing second-order derivative analysis on the gradient value of the objective function in response to the current gradient magnitude being lower than the preset gradient threshold, thereby obtaining a second-order gradient correction term. The preset gradient threshold can be a minimal positive real-valued boundary for determining whether the optimization process has entered a flat voltage plateau region (where gradient vanishing is highly likely). The second-order gradient correction term can be the curvature information of the error surface (e.g., an approximation of the Hessian matrix).
[0087] In practice, the executing entity compares the current gradient magnitude with the preset gradient threshold. If the current gradient magnitude is less than the preset gradient threshold, indicating that the current region is flat, the objective function gradient value of the previous cycle is extracted, and the current objective function gradient value is subtracted from the objective function gradient value of the previous cycle. Then, the result is divided by the capacity update amount, and the second-order gradient correction term is obtained by approximating the derivative using the finite difference method.
[0088] The third step involves modifying the first-order basic step size based on the aforementioned second-order gradient correction term to obtain the composite acceleration step size. This composite acceleration step size can refer to a large-step search factor determined by the second-order acceleration mechanism of Newton's method in gradient descent algorithms. It can be used to assist the algorithm in traversing flat plateau regions where the gradient of the objective function changes slowly by increasing the step size of each iteration.
[0089] In practice, firstly, the reciprocal of the absolute value of the second-order gradient correction term is determined. Then, this reciprocal is multiplied by the first-order basic step size to obtain the composite acceleration step size.
[0090] The fourth step is to generate an adaptive step size factor based on the above-mentioned composite acceleration step size or the above-mentioned first-order basic step size.
[0091] In practice, the aforementioned execution entity selects its output based on the conditional branch path: if second-order derivative analytical processing is performed (i.e., in the flat region), the aforementioned composite acceleration step size can be determined as the adaptive step size factor. If the current gradient magnitude is greater than or equal to the aforementioned preset gradient threshold, the aforementioned first-order basic step size can be directly determined as the adaptive step size factor.
[0092] Step 1034: Perform a difference convergence judgment on the updated assumed capacity and the initial assumed capacity to obtain the convergence result.
[0093] In some embodiments, the execution entity may perform a difference convergence judgment process on the updated assumed capacity and the initial assumed capacity to obtain a convergence result. This convergence result may indicate whether the current capacity optimization algorithm has met the exit condition, and may determine whether to obtain a calibration result or continue to the next iteration.
[0094] In some optional implementations of certain embodiments, the execution entity may perform a difference convergence judgment process on the updated assumed capacity and the initial assumed capacity to obtain a convergence result, which may include the following steps: The first step is to calculate the absolute difference between the updated assumed capacity and the initial assumed capacity to obtain the capacity iteration change. This capacity iteration change can be the numerical change in the assumed battery capacity before and after a single iteration.
[0095] In practice, the aforementioned executing entity can subtract the initial assumed capacity from the updated assumed capacity to obtain the capacity difference. Then, it can call the mathematical absolute value function to process the capacity difference and obtain the iterative change in capacity.
[0096] The second step involves generating a relative capacity error rate based on the preset nominal battery capacity and the aforementioned capacity iteration changes. The nominal battery capacity can be the battery design capacity stored in the underlying read-only memory. The relative capacity error rate can be the percentage of the capacity change in a single iteration relative to the overall battery capacity.
[0097] In practice, the aforementioned implementing entity can divide the aforementioned capacity iteration change by the aforementioned nominal capacity of the battery to obtain the corresponding percentage value, and determine this percentage value as the relative capacity error rate. This processing method can eliminate the difference in absolute error between batteries of different capacity specifications (e.g., 50Ah and 200Ah).
[0098] The third step involves performing a deviation state comparison on the relative capacity error rate based on a preset dynamic convergence threshold to obtain a precision compliance determination flag. This precision compliance determination flag can be a Boolean state bit representing whether the precision of the current iteration has met the system requirements.
[0099] In practice, in response to the relative capacity error rate being less than the dynamic convergence threshold, an accuracy compliance indicator representing "meeting the standard" is generated. Otherwise, an accuracy compliance indicator representing "not meeting the standard" is generated.
[0100] The fourth step involves generating a verification vector with the current iteration count based on the aforementioned accuracy compliance indicator and the underlying loop counter of the battery management system. This underlying loop counter can be a microcontroller hardware component used to record the currently executed iterations. A register for the number of iterations. The aforementioned verification vector can be a composite data packet encapsulating the precision status and the number of iterations.
[0101] In practice, firstly, the executing entity can read the current count value of the underlying loop counter and determine this count value as the current iteration number. Then, the precision attainment judgment flag and the current iteration number are concatenated to generate the aforementioned verification vector.
[0102] The fifth step involves comparing the current iteration count extracted from the above test vector with the preset anti-crash upper limit to prevent overflow, thereby obtaining an anti-crash loop warning indicator. The aforementioned anti-crash upper limit can be the maximum allowed iteration count (e.g., 100 times) set by the system to prevent the microcontroller's computing power from being monopolized by a single task for an extended period.
[0103] In practice, the executing entity extracts the current iteration number from the aforementioned verification vector and compares it with the aforementioned anti-crash upper limit. If the current iteration number is greater than or equal to the aforementioned anti-crash upper limit, an anti-crash loop warning flag indicating "warning triggered" is generated. Otherwise, a flag indicating "normal" is generated.
[0104] The sixth step involves logically combining the aforementioned anti-crash loop warning flag and the aforementioned accuracy compliance judgment flag to obtain the global convergence status flag.
[0105] In practice, a Boolean OR operation can be performed on the aforementioned anti-crash loop warning flag and the aforementioned accuracy achievement judgment flag. As long as either flag is true (i.e., accuracy is achieved, or the maximum number of crashes has been reached), the aforementioned execution entity generates a global convergence state flag representing that the "condition is met".
[0106] Step 7: Based on the above global convergence state identifier, generate the convergence result.
[0107] In practice, the aforementioned global convergence state flag is directly assigned to the output variable of the convergence determination function to obtain the convergence result. The convergence determination function can be an algorithm subroutine used to execute conditional branch jumps and control flow exits. The output variable of the convergence determination function can be a Boolean variable.
[0108] In some optional implementations of certain embodiments, before the execution entity performs deviation state comparison processing on the relative capacity error rate based on a preset dynamic convergence threshold to obtain the accuracy compliance determination indicator, the following steps may be included: The first step is to perform time span statistical processing on the sampling timestamps of the aforementioned local charging segments to obtain the effective duration of the segments.
[0109] In practice, the aforementioned executing entity can extract the last sampling timestamp corresponding to the aforementioned local charging segment, subtract the first sampling timestamp, and determine the resulting time difference as the effective duration of the segment.
[0110] The second step involves generating data confidence weights based on the effective duration of the aforementioned segments and a preset time reference constant. The aforementioned time reference constant can be a standard time length (e.g., 3600 seconds) that the algorithm considers sufficient charging data. The aforementioned data confidence weights can represent the richness of information within the currently captured local charging segment.
[0111] In practice, the aforementioned executing entity can divide the effective duration of the aforementioned segment by the aforementioned time base constant. If the division result is less than 1, the division result is determined as the aforementioned data confidence weight. If the division result is greater than or equal to 1, the aforementioned data confidence weight is assigned a value of 1.
[0112] The third step is to perform nonlinear penalty mapping on the battery temperature to obtain the ambient temperature drift compensation coefficient.
[0113] In practice, the aforementioned executing entity can substitute the battery temperature into a preset parabolic penalty function to obtain the ambient temperature drift compensation coefficient. The parabolic penalty function can be... The above. This could be battery temperature. (The above...) This can be a preset opening factor (e.g., 0.005). The above... This can be a standard room temperature constant (e.g., 25°C). The further the battery temperature deviates from the standard room temperature (e.g., 25°C), the greater the output ambient temperature drift compensation coefficient.
[0114] The fourth step is to generate a composite threshold correction factor based on the above data confidence weights and the above environmental temperature drift compensation coefficients.
[0115] In practice, the aforementioned implementing entity can divide the aforementioned environmental temperature drift compensation coefficient by the aforementioned data confidence weight to obtain the composite threshold correction factor.
[0116] Fifth, based on the aforementioned composite threshold correction factor, the preset basic tolerance constant is dynamically scaled to generate a dynamic convergence threshold. The aforementioned basic tolerance constant can be the system's allowable error baseline value under ideal operating conditions (e.g., 0.01%).
[0117] In practice, the composite threshold correction factor can be multiplied by the basic tolerance constant to obtain the dynamic convergence threshold.
[0118] Step 1035: In response to the convergence result not meeting the preset convergence condition, the updated assumed capacity is used as the initial assumed capacity, and the calibration capacity determination step is performed.
[0119] In some embodiments, the execution entity may, in response to the convergence result not meeting a preset convergence condition, use the updated assumed capacity as the initial assumed capacity and perform the calibration capacity determination step. The preset convergence condition may be the algorithm's iterative optimization process reaching an allowable lower limit of accuracy or a system boundary triggering the underlying hardware's anti-crash protection.
[0120] In practice, in response to the convergence result indicating that the relative capacity error rate does not meet the standard and the current iteration count has not reached the maximum anti-crash limit (i.e., the preset convergence condition is not met), the execution entity assigns the value of the updated assumed capacity output at the end of the current iteration cycle to the memory variable used to record the initial assumed capacity in the underlying memory space. Then, the calibration capacity determination step is retried until the convergence result meets the preset convergence condition.
[0121] Step 1036: In response to the convergence result satisfying the preset convergence condition, generate the calibration capacity based on the updated assumed capacity.
[0122] In some embodiments, the execution entity may generate a calibration capacity based on the updated assumed capacity in response to the convergence result satisfying a preset convergence condition. The calibration capacity may be an assessment value that accurately reflects the current available physical charge of the battery.
[0123] In practice, in response to the convergence result indicating that the accuracy has met the standard or the underlying anti-crash warning has been triggered (i.e., the preset convergence condition is met), the iterative process of determining the calibration capacity is immediately interrupted. Then, the updated assumed capacity in the last valid iteration cycle is extracted and determined as the calibration capacity.
[0124] Step 104: Based on the calibration capacity, generate charge and discharge control instructions to adjust the battery operating boundaries and control the battery's charge and discharge circuit switching.
[0125] In some embodiments, the aforementioned actuator can generate charge / discharge control commands based on the aforementioned calibration capacity to adjust the battery operating boundaries and control the charge / discharge circuit switch of the battery. The charge / discharge control commands can be control messages or electrical drive signals used to directly drive the underlying physical actuators. The aforementioned battery operating boundaries can be extreme operating condition thresholds that ensure battery thermal and electrochemical safety. For example, the aforementioned battery operating boundaries may include a maximum permissible charge / discharge current threshold, an overcharge protection threshold, and an over-discharge protection threshold. The aforementioned charge / discharge circuit switch can be a high-power physical switching device connected in series in the main energy circuit of the battery pack. For example, the aforementioned charge / discharge circuit switch can be a high-voltage DC contactor or a solid-state relay.
[0126] In practice, firstly, the aforementioned executing entity can correct the battery's current real-time state of charge reading based on the aforementioned calibration capacity. Then, it performs a proportional scaling calculation on the original system safety thresholds based on the aforementioned calibration capacity. For example, in response to a physical degradation of the aforementioned calibration capacity compared to the factory nominal capacity, the maximum permissible charging current threshold and the over-discharge protection threshold are simultaneously reduced according to the corresponding degradation ratio, and the resulting safety thresholds (maximum permissible charging current threshold and over-discharge protection threshold) are determined as the updated battery operating boundaries.
[0127] Secondly, the current real-time physical operating parameters of the battery (total battery voltage, branch current, and corrected real-time state of charge at the current moment) are obtained, and the values of the above real-time physical operating parameters are compared with the corresponding safety thresholds in the updated battery operating boundary.
[0128] Next, in response to the aforementioned real-time physical operating parameters touching or exceeding the updated battery operating boundary, a digital control word for triggering hardware protection is immediately generated, and the aforementioned digital control word is identified as a charge / discharge control command.
[0129] Finally, the charge / discharge control commands are converted into corresponding electrical drive level signals using a pulse width modulation (PWM) module. These signals are then sent to the hardware drive circuit to control the coil of the aforementioned charge / discharge circuit switch (e.g., a DC contactor) to be energized or de-energized, physically cutting off or adjusting the current circuit of the current-carrying battery.
[0130] The various embodiments of this disclosure have the following beneficial effects: The gradient descent-based rapid battery capacity calibration method of some embodiments of this disclosure can quickly complete battery capacity calibration and ensure the safety management of charging and discharging hardware in fragmented charging scenarios such as new energy ships, without relying on complete full-charge-discharge cycles. Specifically, in electric vehicles, energy storage systems, and new energy ship applications, the reason for the low accuracy and difficulty in calibrating battery capacity estimation results is that current sensors experience drift and proportional deviation during long-term operation, causing accumulated errors in the traditional ampere-hour integration method after long-term calculations. Correcting this accumulated error relies on complete full-charge-discharge cycles of the battery, but daily charging is mostly short-term partial charging (for example, new energy ships are limited by route schedules and port berthing and loading / unloading times), rarely experiencing full-charge-discharge cycles, causing traditional calibration mechanisms to fail. Therefore, the gradient descent-based rapid battery capacity calibration method of some embodiments of this disclosure first, in response to receiving a battery charging event trigger signal, collects the current sequence, terminal voltage sequence, and battery temperature during a partial charging segment. This breaks the limitation of traditional capacity calibration requiring a complete full charge and discharge cycle, directly utilizing fragmented localized charging data generated during actual daily operations (e.g., vehicle parking or ship berthing) as the measurement source, thus improving the triggerability of the calibration mechanism in real-world scenarios. Secondly, the initial assumed capacity of the battery is obtained. This provides a starting point for subsequent gradient optimization iterations, helping to accelerate convergence. Next, based on the current sequence, terminal voltage sequence, and battery temperature, the following calibration capacity determination steps are performed: Based on the current sequence, battery temperature, and initial assumed capacity, a simulated terminal voltage sequence corresponding to a pre-set battery equivalent circuit model is generated. This maps the assumed capacity parameters to observable simulated voltages through a physical equivalent circuit model, establishing a physical reference for determining the deviation between theoretical and acquired values. Fitting error evaluation processing is performed on the simulated and measured terminal voltage sequences to obtain the gradient value of the objective function. Thus, by quantifying the error between the simulated and measured voltages, the direction and steepness of the deviation of the current assumed capacity from the actual capacity are determined, providing mathematical guidance for capacity value correction. Based on the gradient value of the objective function and the initial assumed capacity, an updated assumed capacity is generated. This drives the assumed capacity to undergo numerical correction along the direction of error reduction, enabling the algorithm to gradually approach the true capacity of the battery in its current state. A convergence judgment process is performed on the updated assumed capacity and the initial assumed capacity to obtain a convergence result. Therefore, an algorithm exit mechanism is established to stop iteration promptly when the computational accuracy reaches the expected level, preventing waste of computational resources. If the convergence result does not meet the preset convergence condition, the updated assumed capacity is used as the initial assumed capacity, and the calibration capacity determination step is executed.Therefore, when the accuracy is not up to standard, the old and new variables are exchanged, and the system automatically enters the next optimization loop to ensure the reliability of the battery calibration capacity results. In response to the convergence results meeting the preset convergence conditions, the calibrated capacity is generated based on the updated assumed capacity. Thus, under the premise of meeting safety and accuracy requirements, the actual capacity of the current battery is output, completing the closed loop of battery calibration calculation. Finally, based on the calibrated capacity, charge and discharge control commands are generated to adjust the battery operating boundaries and control the charging and discharging circuit switching of the battery. This achieves control over the underlying physical entity. Adjusting the charge and discharge boundaries based on the calibrated capacity effectively avoids overcharging or over-discharging of the battery, extends battery life, and ensures the safe operation of the power system.
[0131] Based on the same inventive concept, embodiments of this application provide a rapid battery capacity calibration system based on gradient descent, comprising: The acquisition module is used to acquire current sequence, terminal voltage sequence and battery temperature; Memory for storing a program for a rapid battery capacity calibration method based on gradient descent; The processor and memory can load and execute programs to implement a rapid battery capacity calibration method based on gradient descent.
[0132] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0133] This application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as a rapid battery capacity calibration method based on gradient descent.
[0134] Computer storage media include, for example, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media that can store program code.
[0135] Based on the same inventive concept, embodiments of this application provide a smart terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded and executed by the processor to perform a rapid battery capacity calibration method based on gradient descent.
[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0137] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.
Claims
1. A rapid battery capacity calibration method based on gradient descent, characterized in that, include: In response to receiving a battery charging event trigger signal, the system collects the current sequence, terminal voltage sequence, and battery temperature during a local charging segment. Obtain the initial assumed capacity of the battery; Based on the current sequence, the terminal voltage sequence, and the battery temperature, the following calibration capacity determination steps are performed: Based on the current sequence, the battery temperature, and the initial assumed capacity, a simulation terminal voltage sequence corresponding to the pre-set battery equivalent circuit model is generated. The simulation terminal voltage sequence and the terminal voltage sequence are subjected to fitting error evaluation processing to obtain the gradient value of the objective function; Based on the gradient value of the objective function and the initial assumption capacity, an updated assumption capacity is generated; The difference convergence judgment process is performed on the updated assumed capacity and the initial assumed capacity to obtain the convergence result; In response to the convergence result not meeting the preset convergence condition, the updated assumed capacity is used as the initial assumed capacity, and the calibration capacity determination step is executed. In response to the convergence result satisfying the preset convergence condition, a calibration capacity is generated based on the updated assumed capacity; Based on the calibration capacity, charge and discharge control commands are generated to adjust the battery operating boundaries and control the battery's charge and discharge circuit switching.
2. The method for rapid battery capacity calibration based on gradient descent according to claim 1, characterized in that, The step of acquiring the current sequence, terminal voltage sequence, and battery temperature during a partial charging segment in response to receiving a battery charging event trigger signal includes: In response to receiving a charging event trigger signal from the battery, the sensor channels of the battery are continuously sampled to obtain the original charging current sequence, the original terminal voltage sequence, and the original battery temperature sequence. Based on the original battery temperature sequence and the preset polarization internal resistance temperature change mapping relationship, a dynamic capacity sensitivity threshold is generated. The original charging current sequence is subjected to fluctuation interval sliding window statistical processing to obtain the steady-state constant current time interval; Based on the steady-state constant current time interval and the original terminal voltage sequence, a steady-state terminal voltage sequence is generated; The steady-state terminal voltage sequence is subjected to time difference processing to obtain the voltage rise rate sequence; The voltage rise rate sequence and the dynamic capacity sensitivity threshold are subjected to anti-polarization interference screening to obtain a sensitivity time segment set; Based on the set of sensitivity time segments, the steady-state constant current time interval is subjected to time domain intersection extraction processing to obtain the target local charging segment window; Based on the target local charging segment window, the original charging current sequence, the original terminal voltage sequence, and the original battery temperature sequence are synchronously truncated to obtain the current sequence, terminal voltage sequence, and battery temperature.
3. The method for rapid battery capacity calibration based on gradient descent according to claim 1, characterized in that, The step of generating the simulation terminal voltage sequence corresponding to the pre-set battery equivalent circuit model based on the current sequence, the battery temperature, and the initial assumed capacity includes: Based on the initial assumed capacity and the current sequence, generate the current state of charge sequence of the battery; The open-circuit voltage sequence is obtained by performing open-circuit voltage mapping on the state of charge sequence and the battery temperature. Based on the battery temperature and the state of charge sequence, a resistance-capacitance parameter matrix is generated; Transient response processing is performed on the RC parameter matrix and the current sequence to obtain the polarization voltage sequence and the ohmic voltage drop sequence; The open-circuit voltage sequence, the polarization voltage sequence, and the ohmic voltage drop sequence are superimposed and combined to obtain a comprehensive response voltage sequence; Based on the comprehensive response voltage sequence, the simulation terminal voltage sequence corresponding to the preset battery equivalent circuit model is generated.
4. The method for rapid battery capacity calibration based on gradient descent according to claim 1, characterized in that, The step of performing fitting error evaluation on the simulated terminal voltage sequence and the terminal voltage sequence to obtain the gradient value of the objective function includes: The voltage residual sequence is obtained by subtracting the simulated terminal voltage sequence and the terminal voltage sequence point by point. The total squared error value is obtained by summing the squares of the voltage residual sequence. Based on the total squared error value, a mean squared error objective function is generated, wherein the independent variable of the mean squared error objective function is capacity; The gradient partial derivative function is obtained by performing analytical derivative processing on the objective function of mean square error with respect to the capacity variable; Based on the gradient partial derivative function and the initial assumed capacity, the gradient value of the objective function is generated.
5. The method for rapid battery capacity calibration based on gradient descent according to claim 1, characterized in that, The step of generating the updated assumption capacity based on the gradient value of the objective function and the initial assumption capacity includes: Obtain the historical gradient direction sequence; The gradient value of the objective function is subjected to magnitude feature extraction processing to obtain the current gradient magnitude; The current gradient magnitude and the historical gradient direction sequence are subjected to deflection dynamic evaluation processing to obtain the historical gradient direction change rate; An adaptive step size factor is generated based on the current gradient magnitude and the historical gradient direction change rate. Based on the adaptive step size factor and the gradient value of the objective function, the capacity update amount for the current iteration period is generated; The initial assumed capacity and the updated capacity are superimposed and corrected to obtain the updated assumed capacity.
6. The method for rapid battery capacity calibration based on gradient descent according to claim 5, characterized in that, The step of generating an adaptive step size factor based on the current gradient magnitude and the historical gradient direction change rate includes: The current gradient magnitude and the historical gradient direction change rate are adjusted by step size mapping to obtain the first-order basic step size. In response to the current gradient magnitude being lower than the preset gradient threshold, the gradient value of the objective function is subjected to second-order derivative analytical processing to obtain a second-order gradient correction term; Based on the second-order gradient correction term, the first-order basic step size is corrected to obtain the composite acceleration step size. An adaptive step size factor is generated based on the composite acceleration step size or the first-order basic step size.
7. The method for rapid battery capacity calibration based on gradient descent according to claim 1, characterized in that, The step of performing a difference convergence judgment on the updated assumed capacity and the initial assumed capacity to obtain a convergence result includes: The absolute difference between the updated assumed capacity and the initial assumed capacity is calculated to obtain the capacity iteration change. A relative capacity error rate is generated based on the preset nominal battery capacity and the iterative change in capacity. Based on a preset dynamic convergence threshold, the relative capacity error rate is subjected to deviation state comparison processing to obtain an accuracy compliance judgment mark. Based on the accuracy compliance determination identifier and the underlying loop counter of the battery management system, a verification vector with the current iteration number is generated; The current iteration number extracted from the test vector is compared with the preset anti-crash upper limit value to obtain an anti-crash loop warning flag. The anti-crash cycle warning flag and the accuracy achievement judgment flag are logically combined to obtain the global convergence state flag; Based on the global convergence state identifier, a convergence result is generated.
8. The method for rapid battery capacity calibration based on gradient descent according to claim 7, characterized in that, Before performing deviation state comparison processing on the relative capacity error rate based on a preset dynamic convergence threshold to obtain the accuracy compliance determination indicator, the method further includes: The sampling timestamps of the local charging segments are subjected to time span statistical processing to obtain the effective duration of the segments; Based on the effective duration of the segment and the preset time base constant, a data confidence weight is generated; The battery temperature is subjected to nonlinear penalty mapping to obtain the ambient temperature drift compensation coefficient; Based on the data confidence weights and the environmental temperature drift compensation coefficient, a composite threshold correction factor is generated. Based on the composite threshold correction factor, the preset basic tolerance constant is dynamically scaled to generate a dynamic convergence threshold.
9. A rapid battery capacity calibration system based on gradient descent, characterized in that, include: The acquisition module is used to acquire current sequence, terminal voltage sequence and battery temperature; A memory for storing a program of a gradient descent-based rapid battery capacity calibration method as described in any one of claims 1 to 8; The processor and the program in the memory can be loaded and executed by the processor to implement the gradient descent-based rapid battery capacity calibration method as described in any one of claims 1 to 8.