A method for adaptive calibration of SOC of UPS battery based on multi-stage discharge
By employing a multi-stage discharge strategy and an adaptive calibration method, the problem of decreased accuracy in estimating the state of charge (SOC) of UPS batteries under complex operating conditions and during aging was solved, achieving accurate dynamic correction of the SOC and improving the reliability of system operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG GOLDENCELL POWER TECH CO LTD
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-31
AI Technical Summary
Existing UPS battery SOC calibration methods suffer from decreased accuracy in estimating state of charge under complex discharge conditions and aging processes. They also lack an adaptive dynamic correction mechanism, leading to the accumulation of SOC calculation errors and failing to meet the requirements for high-precision battery management.
By collecting output power, charging and discharging current and battery terminal voltage data in real time, the operating conditions are identified. Combining the capacity decay coefficient and dynamic trigger reference voltage, a multi-level discharge strategy is adopted to perform adaptive calibration of the state of charge, including dynamic correction calculation and linear gradual algorithm for cross-level switching. Environmental parameter verification and extreme temperature boundary estimation degradation logic are introduced.
It achieves a smooth transition in state of charge estimation under complex operating conditions, suppresses jumps in estimation results caused by load changes, maintains the accuracy of battery usable capacity assessment and system reliability under long-term operation, and prevents erroneous parameter updates.
Smart Images

Figure CN122495646A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery management technology, specifically to a UPS battery SOC adaptive calibration method based on multi-level discharge. Background Technology
[0002] UPS (Uninterruptible Power Supply) is a critical power supply guarantee device widely used in data centers, industrial control, financial systems, and other fields. One of its core performance characteristics is the accurate monitoring and calibration of battery SOC (State of Charge). SOC, as a core parameter reflecting the remaining battery capacity, directly determines key functions of the UPS such as discharge duration prediction, load switching strategy, and battery health status assessment.
[0003] Currently, the SOC calibration of UPS products mainly relies on the traditional ampere-hour integration method, the charging calibration method, and the SOP dynamic adjustment method. Among them, the ampere-hour integration method calculates the SOC by integrating the battery charging and discharging current in real time. However, this method has inherent defects: the current and power fluctuate frequently in the actual operating conditions of the UPS, causing the integration error to accumulate rapidly over time; and after long-term operation, the battery experiences capacity decay and decreased cell consistency, resulting in an increased deviation between the rated capacity and the actual usable capacity, further amplifying the SOC calculation error.
[0004] The charging calibration method sets the State of Charge (SOC) to 100% after a full charge to eliminate cumulative error. However, this method can only be calibrated when the battery is fully charged and cannot cover changes in operating conditions during the discharge process. Furthermore, it does not consider the impact of battery capacity decay on the full-charge capacity, so the calibrated SOC still deviates from the actual usable capacity. The SOP dynamic adjustment method uses the battery's state of power to assist in correcting the SOC, but it only addresses scenarios with sudden power changes and cannot adapt to capacity decay and cell consistency issues under all operating conditions, resulting in limited calibration accuracy.
[0005] Furthermore, existing calibration methods are all designed based on standard UPS test conditions and are not specifically adapted to customers' actual usage scenarios (such as load fluctuations, discharge duration, and charging / discharging frequency). This results in a disconnect between the calibrated SOC and the actual remaining capacity under real-world operating conditions, failing to meet the requirements for high-precision battery management. For example, data center UPS systems operate under light-load fluctuation conditions for extended periods, while industrial UPS systems experience heavy-load intermittent discharge conditions. Traditional calibration methods will show SOC deviations exceeding 10% under both types of conditions. In severe cases, this can lead to the UPS misjudging the remaining battery capacity, causing load switching failures, battery over-discharge / over-charge, and other safety hazards. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides an adaptive calibration method for UPS battery SOC based on multi-stage discharge. This method solves the problem that existing uninterruptible power supply batteries suffer from decreased accuracy in state of charge estimation due to polarization effects and capacity decay during complex multi-stage discharge conditions and aging processes, and lack an adaptive dynamic correction mechanism.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a UPS battery SOC adaptive calibration method based on multi-stage discharge, comprising: The system collects real-time operating data, including output power, real-time charging / discharging current, and battery terminal voltage, to identify operating conditions encompassing charging and discharging states. It acquires the system's stored capacity decay coefficient and calculates the current actual usable capacity based on this coefficient and the battery's factory rated capacity. When the system identifies a charging state and meets set threshold conditions, it performs charging reference calibration, setting the battery's state of charge to 100% and simultaneously updating the actual usable capacity. When the system identifies a discharging state, it divides the power operating range according to the output power, acquires the corresponding dynamic trigger reference voltage for that range, and performs correction calculations based on the actual usable capacity and real-time charging / discharging current to obtain the calibrated state of charge. The calibrated state of charge is then output based on the correction calculations. When the preset termination conditions are met, the time period from entering the discharge state to meeting the termination conditions is taken as the effective discharge interval. The measured discharge capacity obtained by integrating the real-time discharge current within the effective discharge interval is then used to update the capacity decay coefficient.
[0008] The steps for calculating the current actual usable capacity based on the capacity decay coefficient and the battery's factory rated capacity specifically include: The actual usable capacity is obtained by multiplying the preset factory rated capacity of the battery by the capacity degradation factor. The initial value of the capacity degradation factor is set to 1.0 upon initial power-on of the system. During system operation, a safe operating lower limit threshold is set for the capacity degradation factor. When the calculated capacity degradation factor reaches this threshold, it is locked at that threshold for calculation, and a replacement warning command is generated.
[0009] The set threshold conditions include hardware full-charge determination conditions and environmental parameter verification full-charge determination constraints. The hardware full-charge determination condition is that the average cell voltage or total battery voltage reaches the dynamic full-charge trigger voltage threshold and the charging current drops to the trickle current threshold, or the cell voltage reaches the preset cell overcharge protection threshold. The environmental parameter verification full-charge determination constraint is that the collected internal temperature of the battery module is within the permissible range and the temperature rise rate is lower than the temperature rise rate warning threshold. The dynamic full-charge trigger voltage threshold is set by the sum of the reference full-charge voltage threshold and the polarization voltage drop compensation amount; the trickle current threshold is set by the battery charge / discharge rate reference constant; the cell overcharge protection threshold is set by the battery's physical limits; and the temperature rise rate warning threshold is set by the lithium battery's heat generation characteristics.
[0010] The step of dividing the power operation range according to the output power specifically includes: The acquired output power is filtered using a first-order inertial low-pass filter algorithm to obtain smoothed power. The smoothed power is compared with a first power threshold and a second power threshold set based on the device's rated power ratio to determine whether the system is in a low-power, medium-power, or high-power range. The hysteresis bandwidth parameter introduced by the system is obtained at the switching boundary between adjacent power operating ranges. A power operating range switching operation is performed only when the smoothed power fluctuation exceeds the hysteresis bandwidth parameter.
[0011] The step of obtaining the dynamic trigger reference voltage corresponding to the interval specifically includes: The system collects real-time battery ambient temperature data and retrieves a pre-stored end-of-discharge reference voltage mapping table based on the current battery range. Combining the ambient temperature with the current capacity decay coefficient, a bilinear interpolation algorithm is used to extract the corresponding value as the dynamic trigger reference voltage. Dynamic calibration is triggered when the battery terminal voltage drops to the dynamic trigger reference voltage and remains below it for a set anti-shake time window.
[0012] The step of calculating the correction amount by combining the actual available capacity and the real-time charging and discharging current specifically includes: Obtain the pre-configured weighting coefficients for the current power operating range, and calculate the operating condition correction coefficient for the current range based on the capacity attenuation coefficient and the weighting coefficients. Obtain the estimated state of charge (SOC) at the current moment using the ampere-hour integration method, and continuously integrate the real-time charging and discharging current from the calibration trigger moment to the current moment to obtain the cumulative discharge capacity. Calculate the quotient of the cumulative discharge capacity and the actual usable capacity, and subtract the estimated SOC at the calibration trigger moment from the full-charge calibration value to obtain the reference capacity difference. Subtract the product of the reference capacity difference and the operating condition correction coefficient from the quotient to obtain the range-specific correction amount for the current range. Subtract the range-specific correction amount from the estimated SOC at the current moment to obtain the calibrated SOC.
[0013] When a power gear switching operation is detected, a cross-gear status locking and smooth transition process is executed, which specifically includes: The system locks the initial state of charge (SOC) at the moment of switching and the gear-specific correction amount corresponding to the original gear before the switch, and initiates a set cross-gear transition time window. Within the transition time window, the transition correction amount is calculated according to a linear gradient algorithm on a per-cycle basis. Specifically, the difference between the gear-specific correction amount corresponding to the new gear and the gear-specific correction amount corresponding to the original gear is multiplied by a time scaling factor to obtain the correction increment. The gear-specific correction amount corresponding to the original gear is then added to the correction increment to obtain the transition correction amount. Subsequently, the SOC calculated in the current cycle and the SOC output in the previous cycle are extracted, the absolute value of the difference between the two is calculated, and the difference is limited to be less than or equal to a preset rate of change threshold before output.
[0014] The preset termination conditions include the algorithm convergence target achievement determination condition, the physical limit protection trigger determination condition, and the operating condition change and timeout interruption identification condition. When the absolute difference between the state of charge output of the current operation cycle and the previous operation cycle is less than the convergence tolerance threshold, it is determined that the algorithm convergence target achievement determination condition is met.
[0015] When the lowest single-cell voltage is lower than the single-cell cutoff voltage or the total voltage of the battery pack is lower than the total voltage cutoff threshold, the logic is forcibly terminated and the output state of charge is overwritten to 0%. When the real-time charging and discharging current reverses direction or its absolute value is lower than the resting current threshold and the debouncing time window is maintained, it is determined that the conditions for sudden change in operating condition and timeout interruption are met.
[0016] The step of updating the capacity decay coefficient using the measured discharge capacity specifically includes: Extract the start and end states of charge of the effective discharge range, and calculate the absolute difference between them to obtain the discharge depth span. When the span exceeds the set effective discharge depth threshold, divide the measured discharge capacity by the discharge depth span to obtain the actual usable capacity for the current cycle, and calculate its ratio to the preset battery factory rated capacity as the current measured degradation rate. Associate the historical capacity degradation coefficient and the current measured degradation rate with the first weighting parameter and the second weighting parameter, respectively, and add their products to obtain the updated capacity degradation coefficient.
[0017] The UPS battery SOC adaptive calibration method based on multi-stage discharge also includes an extreme temperature boundary estimation degradation step. The cell surface temperature is collected in real time. When the temperature exceeds the upper threshold or falls below the lower threshold, the dynamic compensation algorithm is forcibly suspended, and the state of charge is output solely based on the real-time charging and discharging current through a pure ampere-hour integration mode. Once the cell surface temperature has stabilized within a safe range and maintained for a preset temperature debouncing time, the full-function estimation state is resumed.
[0018] This invention provides a UPS battery SOC adaptive calibration method based on multi-stage discharge. It has the following beneficial effects: 1. This invention uses low-pass filtering to process the output power and introduces a hysteresis bandwidth parameter to divide the operating levels. It matches independent dynamic trigger reference voltages and dedicated correction values for different discharge conditions, and employs a linear gradient algorithm and rate-of-change limiting when switching between levels. This mechanism solves the problem of estimation result jumps caused by load changes in the single threshold calibration method, suppresses output value oscillations during operating condition switching, and ensures a smooth transition of the state of charge estimation results.
[0019] 2. This invention utilizes the measured discharge capacity within the effective discharge range to update the capacity decay coefficient using first-order inertial filtering. Furthermore, in the acquisition of the dynamic trigger reference voltage, a bilinear interpolation algorithm is used to achieve dual compensation for ambient temperature and the decay coefficient. This feature enables the system's calibration conditions to adaptively adjust according to battery aging and operating temperature, correcting the accumulated calculation errors generated by the traditional ampere-hour integration method over long-term operation, and maintaining the accuracy of battery usable capacity assessment under long-cycle operation.
[0020] 3. This invention introduces a full-charge determination constraint that combines environmental parameter verification, and sets extreme temperature boundary estimation degradation logic and physical limit protection trigger conditions. When the cell surface temperature exceeds the permissible range or the battery terminal voltage reaches the cutoff threshold, the system suspends the dynamic calibration algorithm or forcibly terminates the calibration logic to prevent the equipment from performing erroneous parameter updates under harsh temperature environments or abnormal operating conditions, thus ensuring the reliability of the overall calibration model across the entire operating range. Attached Figure Description
[0021] Figure 1 This is a system functional flowchart of the present invention; Figure 2 This is a schematic diagram of the system self-test function of the present invention; Figure 3 This is a schematic diagram of the charging calibration function of the present invention; Figure 4 This is a discharge calibration function diagram of the present invention; Figure 5 This is a comparison diagram of the estimated SOC trajectory at the end of discharge according to the present invention; Figure 6 This is a battery capacity decay tracking diagram for the entire life cycle of the present invention. Detailed Implementation
[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] See attached document Figure 1 , Figure 1 This is a system overall functional block diagram according to an embodiment of the present invention. In this embodiment, to support the operation of a UPS battery SOC calibration method adapted to complex operating conditions, the system pre-constructs a basic architecture including an operating condition identification module, a core calculation module, a dynamic calibration module, and a discharge calibration calculation unit. The operating condition identification module connects to the underlying sensors to obtain real-time battery operating data and undertakes the task of determining the operating conditions and hardware / software boundary conditions. The core calculation module is equipped with an underlying memory and a microprocessor, and is responsible for performing the derivation of the mathematical correlation model between dynamic capacity and state of charge. The dynamic calibration module is communicatively connected to the operating condition identification module and outputs a matching correction parameter based on the identified power range. The discharge calibration calculation unit integrates the data from each module to perform specific power correction calculations. Based on the above system architecture, the present invention provides a UPS battery SOC calibration method adapted to complex operating conditions, specifically including the following steps: S10: After the customer load is connected to the system, the operating condition identification module is started, the underlying parameters are pre-configured and the battery operation data is collected in real time to identify the operating condition and determine the software and hardware conditions. S20 relies on the core computing module to build a mathematical correlation model between dynamic capacity and state of charge, and introduces a capacity decay coefficient to calculate the current actual usable capacity of the battery. S30, based on the hardware and software condition determination results, performs charging reference calibration when it is determined to be in charging state and meets the set threshold conditions, locks the initial reference and updates the parameters; S40 generates a discharge calibration trigger command when the discharge state is determined. It performs power determination based on real-time acquired data to divide the power operating range. The dynamic calibration module synchronously outputs the corresponding correction coefficient. The discharge calibration calculation unit calculates the correction amount by combining the actual available capacity and the correction coefficient. S50 combines the capacity values output by the core calculation module with the correction coefficients fed back by the dynamic calibration module to perform the final SOC calibration, and dynamically updates the capacity decay parameters when the termination conditions are met in the current running cycle.
[0024] See attached document Figure 2In this embodiment, the method provided by the present invention configures a system power-on self-test and command interaction process before formally connecting to the working scenario, in order to establish the basic hardware conditions and communication link status for subsequent execution of state of charge calibration. Combining the technical features of the system initialization phase, this command interaction process includes the following steps: S111: After receiving the power-on stimulus, the system triggers the internal battery management system to perform low-level hardware status diagnosis. Specifically, the battery management system uses a microprocessor to retrieve a preset diagnostic program to perform a status scan on the internal voltage sampling channel, current Hall sensor, temperature probe, and relay contactor to determine whether the relevant hardware nodes are in an open circuit, short circuit, or value exceeding the limit. The value exceeding the limit determination typically relies on a preset safety threshold. As a preferred implementation, this threshold can be calibrated according to the cell product specifications and equipment operating environment requirements; for example, the reasonable operating range of the temperature probe can be configured as -20℃ to 80℃. If the battery management system identifies any diagnostic parameter that fails the threshold verification, it determines that the system self-test has failed. The system's main control chip then generates a fault alarm code, reports the fault information to the host computer and external display panel, and cuts off the low-level drive signal to stop power-on.
[0025] S112, when the battery management system completes the hardware scan and determines that the status is normal, it writes a self-test pass flag into its internal memory. Subsequently, the battery management system reports its self-test status to the upper-level control unit through the controller area network bus, and packages the current initial static voltage and ambient temperature data in the communication frame, thereby establishing the initial physical operating baseline for the system.
[0026] S113, after confirming its own status is correct, the battery management system sends a power-on command to the externally connected energy storage converter according to the preset timing constraints. From a physical mechanism perspective, this command is mainly used to wake up the inverter-side control board and trigger the energy storage converter to execute its own insulation detection and soft-start pre-charge program. This is intended to prevent excessive surge current impact from the moment the bus is directly closed, thereby protecting the internal power components.
[0027] S114, after the command is issued, the battery management system polls the receiving port of the communication bus to continuously monitor the feedback result of the energy storage converter's self-test startup, in order to verify whether the interaction link is complete and closed-loop. In this embodiment, the system needs to determine whether it has received the startup success flag of the energy storage converter. If no valid feedback is received within a specified time window (e.g., a preset waiting period of 500ms to 2000ms), the system determines that the current energy storage converter's self-test startup has not been completed. To cope with information delays caused by occasional communication interference, the system is configured with a fault-tolerant retry mechanism. The system will issue a restart command after a timeout, allowing the energy storage converter to respond and perform a second self-test operation. At this time, the system waits for information reply again. If the communication reply timeout or an abnormal status code is still determined after reaching the set maximum number of retries (e.g., 3 times), the system will forcibly stop the startup attempt and trigger the communication fault reporting logic, effectively avoiding the program getting stuck in an infinite waiting dead zone.
[0028] S115, if the system determines that it has received a normal response message from the energy storage converter, it will perform in-depth analysis of the message content. The battery management system extracts the AC / DC side status data from the message to confirm the current power-on voltage and load power values. The system evaluates the current external operating conditions by comparing these parameters with the device's rated operating range pre-stored in the controller. When the parameter matching is successful, it usually signifies the successful completion of the system's power-on self-test process. Subsequently, the underlying data acquisition module enters a cyclic sampling workflow to acquire real-time data on battery terminal voltage, charging / discharging current, output power, and cell temperature difference. This continuous, multi-dimensional acquisition of physical parameters will provide a continuous data source input for the subsequent establishment of a capacity correlation model and dynamic state of charge correction.
[0029] In this embodiment, after the system completes the underlying hardware self-test and establishes the communication link, it needs to initialize and pre-configure the basic physical parameters and operating thresholds that affect the state of charge estimation. This step establishes the boundary conditions and calculation constants for the device's operation, providing data support for the subsequent construction of a dynamic capacity correlation model. The specific parameter pre-configuration process includes the following steps: S121, the system's main control chip retrieves the battery's basic physical parameters from the built-in non-volatile storage medium, mainly including the battery's factory rated capacity. And the charge / discharge boundary voltage threshold. Battery factory rated capacity. Characterized by the initial nominal energy storage capacity of the battery under standard operating conditions, its unit is Ah, serving as the theoretical starting point for assessing capacity degradation throughout the system's entire lifespan. Simultaneously loaded boundary voltage thresholds encompass both the full-charge voltage threshold and the lower voltage limit for discharging the battery to its cutoff state. The specific values of these thresholds are calibrated based on the material properties of the cell chemistry system (such as lithium iron phosphate or lead-acid) used in the device.
[0030] S122, the microcontroller configures the system's low-power calibration voltage parameter. This parameter is the basis for determining whether the device will lose power without warning. In this embodiment, as a preferred approach, the system's low-power calibration voltage is established as the critical point where the average cell voltage of the battery is 0.05V higher than the discharge cutoff voltage. The physical principle behind setting this specific threshold is that at the end of discharge, the battery's terminal voltage exhibits a steep drop due to a surge in internal resistance and polarization effects. A voltage difference of 0.05V above the cutoff voltage corresponds to the battery's relatively small but still sufficient remaining capacity to support short-term operation. The system uses this as a warning indicator, providing a buffer window of several seconds to tens of seconds before the underlying hardware undervoltage protection forces the output to be cut off, allowing the software to execute a safe shutdown strategy or trigger low-power calibration, thus preventing critical loads from being affected by sudden power outages.
[0031] S123, the system performs parameter compensation configuration for the coulombic efficiency loss during the charging and discharging process, that is, sets the charging and discharging efficiency coefficient. During charge-discharge cycles, batteries typically experience energy loss due to heating caused by ohmic internal resistance and electrochemical side reactions. Simply integrating the current over time cannot be equivalently converted into usable capacity. The main control module loads corresponding compensation coefficients for different operating states. Based on the reversibility of chemical reactions at different depths of discharge, the system adjusts the charge-discharge efficiency coefficients during the charging phase. The value range is configured to be 0.95 to 0.98, which determines the charge / discharge efficiency coefficient during the discharge phase. The value range is configured to be from 0.90 to 0.95. In practical implementation, the microprocessor can dynamically retrieve the matching efficiency coefficient value by querying an internally preset two-dimensional mapping table based on the currently collected battery temperature parameters. The value is loaded into the runtime memory and used as a multiplier factor for the subsequent execution of the ampere-hour integral reconstruction algorithm.
[0032] S124: The system loads the division node for multi-level power operating ranges and the tolerance limits for state errors. To address the issue of frequent load power fluctuations in actual operating conditions, the control logic maps three independent judgment ranges in memory according to the proportion of the current load to the rated output power of the equipment. Specifically, the limits are set as follows: the range where the load power is less than or equal to 30% of the rated power is defined as the low-level threshold; the range where the load power is between 30% and 70% of the rated power is configured as the medium-level threshold; and the range where the load power is greater than 70% of the rated power is defined as the high-level threshold. The system also writes the tolerance thresholds for various operating errors into the controller, such as setting the deviation trigger limit between integral estimation and open-circuit voltage calculation to 5%, and setting the tolerance for the final state of charge deviation at the end of a single calibration cycle to 2%. These parameters and thresholds reside in the registers of the core calculation module after the system initialization process is completed, and serve as the judgment criteria for operating condition switching and state calibration in subsequent operation.
[0033] In this embodiment, after the system completes the pre-configuration of basic thresholds and physical parameters, the core control unit immediately initiates a real-time acquisition strategy for multi-dimensional operating condition data. This process aims to convert the transient performance of the underlying physical equipment into digital parameters, providing data source support for subsequent capacity correlation model construction and multi-level calibration determination. The specific real-time acquisition and operating condition mapping process includes the following steps: S131, the microprocessor inside the battery management system periodically triggers the analog front-end acquisition chip to obtain the battery terminal voltage and the real-time charging and discharging current of the circuit. In this stage, the system will analyze the collected real-time charging and discharging current. Directional polarity marking is performed. As a preferred method, the system specifies that the charging current direction is positive and the discharging current direction is negative. This symbolic convention is the underlying mathematical basis for subsequent execution of the ampere-hour integration algorithm and capacity state calculation. The extraction of terminal voltage data covers the total voltage of the battery pack and the individual cell voltages. These two types of parameters are the basis for comparison of subsequent trigger calibration conditions. The loop current is sampled by a Hall sensor deployed in the main loop. To prevent electromagnetic interference caused by high-frequency chopping of the inverter from causing abrupt changes in the sampled data, the system performs noise reduction preprocessing on the original electrical signal after acquisition. For the removal of such high-frequency noise, those skilled in the art can use a first-order RC low-pass filter hardware circuit combined with a moving average filter algorithm to smooth the signal. The digital filtering implementation is a well-known technology in the field and will not be described in detail here.
[0034] S132, the multi-channel data acquisition module synchronously reads the environmental and cell temperature status distributed within the battery module. Through the configured temperature sensor, the system captures the battery temperature data at the current detection node. After receiving the temperature value, the microprocessor calculates the cell temperature difference parameter inside the module. By monitoring the battery temperature and cell temperature difference, the system can intercept thermal risks caused by localized temperature rises. From a physical perspective, changes in ambient temperature directly affect the activity of ions and the internal resistance of electrochemical reactions within the battery, thereby altering the actual charge and discharge efficiency. Therefore, the acquired temperature variable provides environmental variable input for dynamically calling the charge and discharge efficiency coefficient in the preceding steps, enabling the system's state estimation to adapt to different temperature environments.
[0035] S133, the control unit requests real-time load output power parameters from the inverter side via the device's internal communication bus. By performing comprehensive logical calculations on output power, current direction, and terminal voltage change rate, the system determines the current operating condition of the device. When the current direction is detected as flowing out of the battery and the output power value is greater than the preset zero-point dead zone, the system maps the current state to a discharge condition; when mains power is detected and current is injected into the battery pack in reverse, it is marked as a charging condition. In this embodiment, the preset zero-point dead zone value is set based on the noise floor level of the current sensor or the inverter's basic standby power loss, typically ranging from 0.5% to 1% of the system's rated power, to prevent misjudgments of the operating condition caused by sensor zero drift. Furthermore, when the device is in a long-term no-load floating charging state, the acquisition module reduces the sampling frequency to save system computing power. To prevent a significant delay in response to sudden large loads due to the reduced sampling rate, the system is configured with a hardware interrupt wake-up mechanism based on a current threshold at the underlying level. Once the sudden change in the loop current exceeds the set hardware wake-up threshold, the underlying circuit will trigger an interrupt command, forcing the system to immediately return to the high-frequency sampling mode. This multi-dimensional parameter aggregation and adaptive adjustment enables the system to capture power fluctuations, providing timely instruction guidance for triggering multi-level calibration mechanisms.
[0036] In this embodiment, after acquiring multi-dimensional operational data, the core computing module needs to construct a mathematical correlation model between dynamic capacity and state of charge. To more objectively reflect the battery's current energy storage capacity, the system introduces a degradation parameter to extrapolate the actual usable capacity. This extrapolation process includes the following steps: S211, the control unit establishes a projection baseline by analyzing the battery's aging mechanism. From a physical perspective, during the long-term cycle service of a battery, its internal electrochemical active materials are gradually consumed, and the polarization resistance increases accordingly. Furthermore, the consistency of voltage and internal resistance among the multiple cells within the battery module becomes discrete over time. These changes in physical characteristics cause the actual amount of electricity that the battery can discharge and be utilized by an external load to gradually fall below the factory nominal value. If the system continues to use fixed rated parameters as the calculation base, it is easy to cause deviations in the state of charge estimation. Therefore, the control unit projects the current actual usable capacity in real time to correct the data drift of the underlying calculation baseline.
[0037] S212, the core calculation module introduces a capacity attenuation coefficient to establish a mathematical model for the actual usable capacity. The system uses an internal arithmetic unit to perform a multiplication operation, combining the preset factory rated capacity with the dynamically updated attenuation coefficient. In this embodiment, the specific deduction is based on the following formula: ; In the above formula, This represents the actual usable capacity of the battery in its current healthy state, and its unit is Ah. This indicates the factory-rated battery capacity loaded from memory during system initialization; This is the capacity decay coefficient extracted by the system.
[0038] S213, the control unit sets the constraint boundary for the value of the capacity attenuation coefficient. Capacity attenuation coefficient. It is a dimensionless dynamic variable that characterizes the overall retention rate of active material in the battery and the level of capacity loss caused by inconsistencies between cells. When the device is first powered on and the battery is in brand new condition, the system will use the capacity degradation coefficient. The initial value is configured to 1.0. As charge / discharge cycle behavior accumulates, The value shows a decreasing trend according to the preset closed-loop algorithm. To prevent anomalies from causing the coefficient value to decrease indefinitely, the system... A lower threshold value is set for safe operation. As a preferred approach, the system configures this lower threshold value within the range of 0.6 to 0.7. When calculating and determining... When the value reaches this lower threshold, the microprocessor determines that the battery module has reached the end of its service life and triggers a low-level replacement warning command. To ensure that the system's state-of-charge estimation model can still operate normally in a closed loop during this transition period before maintenance personnel replace the battery, the system will... The value is forcibly locked at this lower threshold to participate in subsequent division and integration operations. When the underlying logic detects a new battery module connection and passes the self-test, the system will reset the status flag and... The value is reinitialized to 1.0, thus avoiding the algorithm getting stuck in a logical dead zone where it cannot continue its deduction.
[0039] In this embodiment, after deriving the mathematical framework of the actual available capacity, the system needs to establish a low-level calculation benchmark for the capacity attenuation coefficient. This benchmark relies on measured data acquired by the system under specific operating conditions, thereby driving the dynamic closed-loop update of the attenuation coefficient. The specific calculation process includes the following steps: S221, the system monitors the battery's operating status and identifies a specific discharge cycle as the calculation trigger condition. Specifically, the system records the process of the battery continuously discharging from a fully charged state (i.e., the moment when the system internally determines that the state of charge has reached 100%) until the terminal voltage reaches the preset discharge cutoff voltage. From a physical perspective, the actual usable capacity of a battery characterizes its ultimate energy throughput capability between the full charge and discharge boundaries. Since UPS equipment is often in a float charge or partial shallow charge and discharge state during daily operation, such shallow cycles are usually difficult to accurately expose the overall degradation of the active materials on the plates. Therefore, the system relies on the above-mentioned deep discharge conditions to obtain objective calculation samples. To avoid a logical dead zone where the degradation coefficient cannot be updated due to the equipment not experiencing natural deep discharge for a long time, as a preferred approach, the underlying control logic is configured with a time window forced trigger mechanism. If the system does not detect a complete natural deep discharge within the set time period, the host computer will schedule and execute periodic battery maintenance check discharges, thereby establishing a stable and reliable underlying data benchmark.
[0040] S222, upon confirming that the battery is within the aforementioned deep discharge cycle, the core calculation module performs continuous time integration on the discharge current to obtain the measured cumulative discharge capacity for that cycle. The microprocessor extracts current sampling data within this time period through the battery management system for measured integration. As the basic calculation logic, the formula for calculating the capacity decay coefficient in the current state is: ; In the above formula, The calculated capacity attenuation coefficient; This is the cumulative discharge capacity of the battery from a fully charged state to a discharge cutoff state, and its unit is Ah. This value is obtained through underlying measured integral calculation. The system's pre-set battery factory rated capacity, in Ah.
[0041] S223, after obtaining the measured cumulative capacity, the system performs iterative updates to the capacity decay coefficient. In the actual periodic calibration process, to reflect the gradual and continuous nature of capacity decay, the core system module calculates the new decay coefficient based on the following iterative formula: ; In the above formula, This represents the current capacity decay coefficient calculated in this update; This represents the historical capacity decay coefficient stored by the system in the previous accounting cycle; This represents the cumulative discharge capacity of the battery from its fully charged state to its discharge cutoff state. This refers to the actual available capacity recorded in the previous accounting period. Subsequently, the system synchronously updates the actual available capacity based on the updated capacity decay coefficient. The calculation formula is as follows: , To obtain the actual usable capacity from this synchronous update, the system calculates the ratio of the difference between the old and new measured capacities and adds it to the historical coefficient. This mathematically achieves a smooth evolution of the attenuation coefficient, enabling the underlying core calculation multiplier to accurately reflect the battery's true aging trajectory and providing an unbiased parameter basis for subsequent state of charge correction.
[0042] In this embodiment, in addition to obtaining the measured capacity through deep discharge integration, the core calculation module also introduces a cycle count correction model based on battery life to address the issue of slow data updates caused by the lack of deep discharge conditions over a long period. This model estimates the actual usable capacity by tracking the cumulative operating behavior of the battery throughout its lifespan. The specific implementation and derivation process of the correction model includes the following steps: The S231 microprocessor reads preset cell lifecycle parameters via the underlying communication bus and calculates the current equivalent cycle count in real time. During system initialization, the main control chip retrieves the cell's cycle life from non-volatile memory. This parameter, typically provided by the battery manufacturer in its specifications, characterizes the total number of complete charge-discharge cycles a cell can withstand under standard testing conditions until its capacity decays to the minimum acceptable level. During daily operation, the battery management system continuously collects the discharge current and records the accumulated discharge. Since actual operating conditions are often fragmented shallow charge-discharge cycles, as a preferred approach, the system logic specifies that whenever the battery's accumulated discharge reaches its factory rated capacity, the current cycle count in the register is updated. The process is incremented by one. Through this equivalent conversion mechanism, the system converts the discrete charging and discharging process in actual operation into a standard equivalent number of cycles, providing quantifiable variable inputs for theoretical lifetime estimation.
[0043] S232, after obtaining the above operating parameters, the core calculation module calls the internal cycle decay algorithm to calculate the actual usable capacity under the current healthy state. From a physicochemical perspective, each time a battery undergoes a complete charge-discharge cycle, the solid electrolyte interface film inside it undergoes irreversible thickening to varying degrees, accompanied by the loss of active materials. This cumulative effect macroscopically manifests as an approximately linear decay of usable capacity. Based on this principle, the system's theoretical derivation is based on the following mathematical formula: ; In the above formula, The actual available capacity is calculated based on the number of cycles, and the unit is Ah; The factory rated capacity of the battery pre-configured for the system, in Ah; This represents the maximum permissible capacity decay at the end of the battery's lifespan. This indicates multiplication. According to industry-standard battery lifespan definitions, battery life is considered complete when the actual capacity drops to 80% of the initial capacity. Therefore, the system will... The value is fixed at 20% of the factory rated capacity; This refers to the cycle life of the battery cell in this product. This represents the current number of loops recorded by the system.
[0044] S233, the system performs fusion and auxiliary judgment of underlying parameters based on the calculation results. To prevent the algorithm logic from encountering computational dead zones when the battery exceeds its service life, the system manages variables... A boundary constraint mechanism is introduced. When the microprocessor determines the loop count... Greater than or equal to cycle life At that time, the underlying algorithm will force The value is locked to , so that the calculated Maintain at 0.8 This establishes a safe lower limit, thereby preventing the formula from yielding a smaller value that does not conform to common sense in physics.
[0045] Based on the above formula, the scaling factor represents the percentage of battery life already consumed during the current battery lifespan. The system multiplies this percentage by the previously defined maximum allowable degradation to obtain the current theoretical capacity loss value. By subtracting this loss value from the rated capacity, the current actual usable capacity is estimated. The establishment of this cycle number correction model ensures that the system still has usable capacity parameters even when facing occasional sensor sampling anomalies or long-term unchecked discharge due to environmental limitations. The microprocessor uses this model's estimated value as a parallel reference benchmark for the aforementioned measured capacity integral value, participating in subsequent state of charge calculations when updated measured data is lacking. This contributes to the closed-loop operation of the underlying evaluation system and reduces the probability of the algorithm stalling due to the absence of a single data source.
[0046] In this embodiment, after obtaining the actual available capacity, the system reconstructs the basic state of charge estimation logic. From a physical mechanism perspective, the ampere-hour integration method physically measures the amount of charge flowing into and out of the battery and compares it with the battery capacity to obtain the remaining charge percentage. During the battery aging stage, using a fixed factory rated capacity as the denominator will lead to errors in the calculated remaining charge percentage. The core calculation module incorporates dynamically updated actual available capacity, establishes a corrected ampere-hour integration formula, and calculates the initial state of charge estimate. The specific process includes the following steps: S241, the control unit extracts data from historical calibration nodes as the initial reference for the current integration calculation. During system operation, the microprocessor retrieves the state of charge (SOC) value from the previous cycle's full-charge baseline calibration or multi-level discharge calibration from the running memory and sets it as the starting reference for continuous integration calculation. For cold start scenarios such as the device's first power-on or module restart, where the system memory lacks calibration data from the previous cycle, the underlying logic triggers a cold start evaluation mechanism. The system reads the battery's terminal voltage after resting as the open-circuit voltage, looks up the initial value in a table based on the internally preset open-circuit voltage-SOC mapping curve, and assigns it to this starting reference, preventing the integration algorithm from failing to calculate due to lack of input. The state reset mechanism blocks the propagation of calculation errors from previous cycles, suppressing the cumulative drift phenomenon of long-term open-loop integration.
[0047] The S242 core computing module performs corrected ampere-hour integration calculations based on the actual available capacity. The processor, combining charging and discharging current, directional polarity, and environmental parameters, deduces the state of charge according to the following corrected ampere-hour integration formula: ; In the formula, Indicates the current moment The estimated state of charge; This is the reference value for the state of charge established after the calibration in the previous cycle; This represents the actual available capacity calculated based on the capacity model, in Ah. This represents the charge / discharge efficiency coefficient. The battery's charge / discharge efficiency is affected by ambient temperature and the charge / discharge current rate. The microprocessor uses data from the battery temperature sensor and the loop current value to interpolate values from an internally pre-set two-dimensional efficiency mapping table. During charging, The value is obtained by referring to a table within the range of 0.95 to 0.98; during discharge operation, The value is obtained by looking up the table within the range of 0.90 to 0.95. The charging and discharging currents are defined as follows: the charging current is positive, and the discharging current is negative. To calibrate the start time.
[0048] It should be noted that, based on the principle of physical energy loss, when in charging mode ( When the value is positive, the microprocessor multiplies the sampled current by the corresponding charge / discharge efficiency coefficient. When in discharge condition ( When the value is negative, in order to compensate for the additional power consumption caused by internal heat loss, the microprocessor divides the sampled current by the corresponding charge / discharge efficiency coefficient. This ensures the objectivity and accuracy of the points conversion.
[0049] S243, the underlying layer performs the discretization transformation and boundary constraints of calculus. The microprocessor transforms the continuous integral terms into a discrete accumulation formula based on the system sampling period. The control unit extracts the product of the current value and the efficiency coefficient according to the set sampling clock frequency, multiplies it by the discrete sampling time interval, and then performs a cyclic accumulation. To prevent arithmetic overflow due to the denominator becoming too small during division, the microprocessor performs a boundary check on the denominator term before executing the formula. If the called... If the capacity is below 30% of the factory rated capacity, the system pauses the current calculation cycle and uses the safety lower limit threshold as the denominator in the calculation. The calculated value is... The results are input into a digital limiter, clamping the numerical boundary within the 0% to 100% range. This reconfiguration mechanism, combining actual usable capacity with boundary protection, enables the integral algorithm to adapt to the battery health state, providing fundamental data for multi-level calibration.
[0050] See attached document Figure 3 In this embodiment, the charging reference calibration must be performed after specific hardware triggering and software judgment conditions are met. The system uses this mechanism to identify the battery's full charge state and reset initial parameters, converging the errors accumulated in the initial open-loop integration calculations. The specific implementation includes the following steps: S311, the battery management system identifies the external power supply connection status and executes charging logic. The control unit monitors the electrical characteristics of the charging circuit. When it detects mains power connection and that the inverter or charger is in charging mode, it determines that the system has entered the charging state. If the charging circuit fails to conduct due to relay malfunction or internal component meltdown, the system reports a hardware fault signal and stops charging. After confirming entry into the charging state, the microprocessor records the initial learning point parameters, storing the current terminal voltage, circuit current, and initial state of charge in a non-volatile register. The system performs continuous integration calculations on the collected current data to obtain the cumulative charging capacity and sends it to the core computing module for temporary storage.
[0051] S312, the hardware control module compares the collected electrical parameters with the hardware full-charge determination criteria. At the end of the constant-voltage charging phase, the internal polarization effect of the battery weakens, the chemical transformation of the active materials tends to saturate, and the charging current decreases exponentially. The system sets multi-dimensional hardware full-charge determination criteria, including the following conditions: The average cell voltage of the battery reaches the preset full charge trigger voltage threshold, and the charging current drops to the trickle current threshold, satisfying the requirements. .in For real-time charging current, This serves as a reference constant for the battery charge / discharge rate; the total battery voltage reaches the full charge trigger voltage threshold, and the charging current drops to the aforementioned trickle current threshold; the individual battery cell voltage reaches a preset individual cell overcharge protection threshold, which is set by the battery's physical limits. The battery's physical limits refer to the irreversible damage voltage threshold determined by the cell's chemical system. This condition is a fault-tolerant calibration mechanism. In the later stages of battery aging, the consistency of internal cells becomes discrete. When a cell with declining capacity is prematurely fully charged, triggering individual cell overcharge protection and causing current interruption, the actual usable capacity of the battery pack is limited by that cell. The system uses this physical limit as a benchmark to trigger full charge calibration, preventing the algorithm from falling into an uncalibrable dead zone.
[0052] S313, the software calculation module verifies the full charge determination constraints in conjunction with environmental parameters. The system introduces ambient temperature as a software-level constraint. The microprocessor reads temperature sensor data from inside the battery module. The system requires that, under the premise of meeting any of the above hardware triggering conditions, the battery temperature be within the operating range of 15℃ to 65℃. This temperature range is calibrated based on the conductivity and activity characteristics of the battery electrolyte. In low-temperature environments, the battery's polarization resistance increases, resulting in a falsely high charging voltage and a tendency to prematurely reach the full charge voltage threshold, leading to misjudgments. If the system determines that the hardware full charge condition is met but the temperature is below 15℃, the microprocessor temporarily suspends the baseline forced setting operation, calls the preset low-temperature capacity loss coefficient to correct the integral result, and waits for the ambient temperature to rise back to the permissible range before performing full charge status confirmation.
[0053] S314, the system performs benchmark calibration and parameter reset based on the comprehensive hardware and software judgment results. When the hardware trigger conditions and software judgment conditions are met, the battery management system determines that the battery chemical energy storage process is complete. The microprocessor sets the current system calibration benchmark state of charge to 100%, blocking the error propagation from the previous ampere-hour integration calculation. Based on the full-load test data, the system synchronously updates the capacity decay coefficient. With the actual usable capacity of the battery This locks in the initial calibration benchmark, providing basic data for dynamic multi-level calibration in the subsequent discharge phase.
[0054] After identifying the basic charging state, the system performs filtering and dynamic adaptation based on multiple hardware and software judgment conditions to cope with parameter jumps caused by sensor sampling noise or power grid fluctuations. This mechanism improves the reliability of calibration triggering actions and reduces the risk of benchmark deviation caused by state misjudgment. The specific judgment process includes the following steps: S321 performs time-domain stabilization processing on hardware parameters at the system's underlying level. When the hardware control module detects that the average cell voltage or total voltage of the battery reaches a preset threshold and the charging current reaches the trickle charge condition, the system's underlying time-hysteresis comparator starts timing. The judgment logic requires that the steady-state conditions of voltage and current remain continuously met within a set duration window. Based on the discharge characteristics of the front-end filter capacitor and the sampling frequency of the analog-to-digital converter, this duration window is set to 30 seconds to 3 minutes. If a sudden change in current or a drop in voltage occurs within the time window, failing to meet the conditions, the microprocessor resets the timer and recalculates. This stabilization mechanism filters out transient interference, making the electrical state assessment closer to the battery's true saturation level.
[0055] S322, the software calculation module performs dynamic adaptation and deduction of the full-charge voltage threshold. Battery aging leads to an increase in its internal ohmic and polarization resistance, generating an additional voltage drop when the charging current flows through the impedance, thus increasing the external terminal voltage reading. Using the static full-charge voltage threshold would cause the system to prematurely determine full charge before the battery is fully charged. Based on this, the microprocessor adaptively corrects the full-charge trigger voltage threshold by incorporating the capacity decay coefficient. The specific calculation logic is as follows: The corrected dynamic full-charge trigger voltage threshold is equal to the sum of the baseline full-charge voltage threshold and the polarization voltage drop compensation. The baseline full-charge voltage threshold is the physical parameter of the battery in its brand-new state. The polarization voltage drop compensation is obtained by multiplying the polarization internal resistance compensation coefficient by the capacity decay ratio, which is the difference between a constant 1 and the current capacity decay coefficient. The polarization internal resistance compensation coefficient characterizes the voltage increment caused by the decay of the cell's internal resistance over time, and is calibrated based on cell cycle aging test data, with a value ranging from 0.05V to 0.2V. To prevent the dynamic threshold derived during severe battery aging from being too high, the system stipulates that the maximum allowable value of this dynamic threshold does not exceed the preset hardware overcharge protection action threshold minus a 50mV safety margin. Through this text-based calculation logic, the system compensates for the polarization voltage drop, ensuring that the judgment condition closely follows the cell's degradation trajectory.
[0056] The S323 main control module performs multi-dimensional reconstruction and instruction output for hardware and software logic judgments. The system constructs a logic judgment matrix. When the hardware anti-shake time window reaches full scale and the measured voltage parameters reach the dynamic correction threshold, the software module simultaneously checks the ambient temperature status and safety indicators of the battery module. The ambient temperature must be within the permissible operating range, and the battery module's temperature rise rate must be lower than the warning threshold. Considering the heat generation characteristics in the early stages of lithium-ion battery thermal runaway, the temperature rise rate warning threshold is set to 0.5℃ / min ~ 1℃ / min. A temperature rise rate exceeding this warning threshold indicates an abnormal side reaction inside the battery, and the system refuses to perform calibration. The microprocessor performs a logical AND operation between the hardware electrical steady-state flag and the software environmental safety flag. When all flags meet the trigger conditions, the main control unit outputs a full-charge calibration command, driving the system to perform charge state setting and parameter update operations. This multi-constraint architecture reduces the probability of calibration disorder caused by a single sensor failure or abnormal operating conditions.
[0057] In this embodiment, after the system has satisfied the triggering conditions in multiple logical determinations, it performs the final baseline setting and underlying parameter locking operation. This step converges the integral drift caused by the initial open-loop operation, providing a data base with higher confidence for subsequent discharge conditions. The specific parameter update and state switching process includes the following steps: In S331, the microprocessor performs forced setting of the state of charge (SOC) and voltage anchoring. When the main control unit outputs a full-charge calibration command, the underlying control program writes a value representing the full-scale range to the real-time SOC register in the system's running memory. This value overwrite operation sets the current SOC estimate to 100%, correcting the error caused by the accumulation of open-loop calculus. As a preferred method, the control unit simultaneously extracts the current individual cell terminal voltage and writes it into the full-charge reference voltage array. This operation establishes a voltage-capacity mapping relationship under full-charge conditions, providing a physical reference for subsequent aging characteristic extraction.
[0058] S332, the core calculation module updates the actual available capacity based on the data from the current charging process. Considering that in shallow charge and discharge conditions, the integral value of the charged energy only accounts for a portion of the total capacity, the system performs a validity check before updating the capacity. The microprocessor retrieves the initial state of charge of the current charging action, and the underlying logic only allows the capacity update to be triggered if the initial value is lower than the preset deep discharge threshold (e.g., lower than 20%). The system divides the cumulative current integral value of the current charging stage by the percentage difference corresponding to the charged energy to calculate the current equivalent full-charge capacity. From the long-term characteristics of electrochemical reactions, the actual capacity decay of the battery is a slow, gradual process. Large deviations in the measured capacity in a single instance originate from sensor transient integral noise or measurement deviations caused by temperature fluctuations. To prevent measurement noise from a single sampling from causing jumps in capacity parameters, the microprocessor calls a weighted moving average algorithm to merge the current equivalent full-charge capacity with the historical approved capacity. The updated actual available capacity is determined by the following logic: ; In the formula, The updated actual available capacity, in Ah; The equivalent full-fill capacity calculated based on the measured integral value in the above verification steps, in Ah; The historical actual available capacity locked and stored in memory in the previous cycle, in Ah; These are the weighting coefficients for the current measured data; These are the weighting coefficients for historical data. The weighting coefficients are set according to the algorithm logic. and The sum of these values is fixed at 1. To ensure a smooth transition of the capacity decay parameter throughout its entire lifespan, the system will... The value range is configured between 0.05 and 0.15, and accordingly... The value is configured between 0.85 and 0.95. The high historical weighting avoids a step phenomenon in the estimation of remaining power during the subsequent discharge phase.
[0059] S333, the main control unit performs non-volatile locking of underlying parameters and state machine switching. After completing the fusion calculation of the actual usable capacity, the battery management system will... The data is written to the internal non-volatile memory module. This storage action locks the reference denominator for the next stage of discharge calculation. The main control unit clears all charging anti-jitter timers and intermediate flags in the internal buffer and switches the internal software state machine from charging calibration mode to discharge monitoring mode. The system then restarts the discharge ampere-hour integration calculation using the updated capacity reference. Through the closed-loop locking mechanism, the computational basis of the underlying algorithm can adapt to the actual physical degradation of the battery cell, improving the coherence of the overall evaluation logic and the accuracy of data output.
[0060] See attached document Figure 4 During the discharge phase, the system divides the operating state into multiple ranges based on the real-time load power. The polarization internal resistance voltage drop and usable capacity of the battery differ at different discharge rates. Using a single discharge calibration benchmark would lead to premature discharge protection triggering under high current conditions or errors in charge calculation under low current conditions. The system provides a data foundation for matching differentiated state-of-charge calibration strategies through a multi-range division mechanism. The specific process includes the following steps: The S411 system performs real-time acquisition and smoothing of load power at the underlying level. The microprocessor synchronously reads terminal voltage and discharge current data, and obtains the transient raw power through multiplication. Transient power spikes are generated when the load device starts up or encounters sudden changes in operating conditions. To prevent such transient spikes from causing frequent switching between different power levels, the underlying control logic introduces a first-order inertial low-pass filter algorithm to filter the raw power.
[0061] For the first computation cycle after a cold start or reset, where historical power data is lacking in the running memory, the underlying logic directly assigns the first acquired transient raw power to the historical smoothed power parameters, preventing the filtering algorithm from getting stuck in a computational dead zone due to missing initial values. In continuous calculations, the current smoothed power equals the product of the current transient raw power and the first weighting coefficient, plus the product of the historical smoothed power and the second weighting coefficient. The sum of the first and second weighting coefficients is fixed at 1. Based on the system sampling frequency, the system configures the first weighting coefficient between 0.1 and 0.2, and the second weighting coefficient between 0.8 and 0.9. This filtering mechanism suppresses high-frequency power noise while preserving the low-frequency variation trend of the load power.
[0062] The S412 core computing module performs quantization mapping of the power level range based on the current smoothed power. The battery management system divides the discharge conditions into low-power, medium-power, and high-power ranges according to the discharge power. During low-power discharge, the internal polarization voltage drop of the battery is small, and the terminal voltage is close to the open-circuit voltage; during high-power discharge, the voltage drop caused by the ohmic internal resistance and polarization internal resistance is superimposed, resulting in a drop in terminal voltage. The microprocessor uses a preset rated power as a benchmark and compares it with the current smoothed power to determine the current power level. When the current smoothed power is lower than the first power threshold, the system determines that it is in the low-power range; when the current smoothed power is greater than or equal to the first power threshold but lower than the second power threshold, it is in the medium-power range; when the current smoothed power is greater than or equal to the second power threshold, it is in the high-power range. The system sets the first power threshold to 20% to 30% of the system's rated power and the second power threshold to 70% to 80% of the system's rated power.
[0063] S413, the main control unit executes gear switching boundary hysteresis control. When the load power fluctuates around the aforementioned threshold, using a single threshold comparison would cause the microprocessor to switch frequently between adjacent gears, consuming computing power and causing calibration logic disorder. The system introduces a hysteresis bandwidth parameter at the boundary between adjacent gears. Taking the switch from low power to medium power as an example, the system confirms the switch to the medium power range only when the current smoothed power rises and exceeds the sum of the first power threshold and the hysteresis bandwidth; when falling back from medium power to low power, the switch is only executed if the current smoothed power is lower than the first power threshold. The switch determination between medium power and high power uses the same hysteresis logic set around the second power threshold. The hysteresis bandwidth is set to 2% to 5% of the rated power. The boundary hysteresis control logic improves the stability of the system state machine operation and gives the gear switching action anti-interference capability.
[0064] In this embodiment, after determining the discharge power level, the system performs a calibration trigger determination. Long-term open-loop current integration calculations accumulate drift errors, and relying on a single fixed voltage threshold as the judgment standard can lead to delayed or premature calibration. The system introduces a dual determination mechanism combining conventional triggering and forced intervention to provide a trigger basis for end-of-discharge capacity correction. The specific determination process includes the following steps: S421, the main control unit performs multi-dimensional reference matrix parameter retrieval and reference voltage matching. The system's internal non-volatile memory stores a reference voltage mapping table for the end of discharge, corresponding to low-power, medium-power, and high-power ranges. During high-current discharge, the internal polarization voltage drop of the battery is large, causing the terminal voltage to reach the hardware cutoff threshold earlier; during low-current discharge, the polarization voltage drop is small, allowing the battery to release its underlying chemical capacity. This mapping table is based on discharge experimental data from the battery cells at different power conditions at the factory, and its data includes the polarization voltage drop compensation amount for the corresponding range. The microprocessor retrieves the corresponding reference voltage mapping table based on the current power range. Combining the real-time ambient temperature of the battery module and the current cycle capacity decay coefficient, the microprocessor extracts the dynamic trigger reference voltage matching the current operating condition from the mapping table using a bilinear interpolation algorithm.
[0065] The S422 microprocessor performs steady-state comparison under normal calibration conditions. The system acquires the battery terminal voltage in real time. When the terminal voltage drops and reaches the dynamic trigger reference voltage, the underlying anti-shake timer is activated. To filter out false judgments of voltage drop caused by transient power fluctuations in the load device, the system specifies a set anti-shake time window to maintain the state where the terminal voltage is below the dynamic trigger reference voltage. Considering the characteristics of the battery voltage drop rate at the end of discharge, this anti-shake time window is set within the range of 10 to 30 seconds as a preferred method. After the steady-state conditions are met, the system determines that the normal calibration trigger point has been reached.
[0066] S423, the safety monitoring module performs a mandatory intervention judgment based on the error deviation. Under load conditions, open-loop deviations occur in the ampere-hour integration calculation. If the estimated remaining charge is too high while the actual terminal voltage is close to the physical cutoff line, continuing to wait for the normal trigger condition will cause the equipment to shut down due to depletion of power. The system introduces mandatory intervention logic based on state deviation. The microprocessor calculates the state of charge deviation, specifically by: obtaining the estimated state of charge obtained from the current ampere-hour integration calculation, and the reference state of charge obtained by looking up a table based on the current terminal voltage, temperature, and attenuation coefficient; The absolute difference between the estimated state of charge (SOC) and the reference SOC is calculated and used as the SOC deviation. Lithium-ion batteries exhibit a voltage plateau during the mid-discharge phase, where the terminal voltage changes only slightly with the charge level, causing distortion in lookup table calculations. To avoid misjudgments caused by lookup errors during mid-discharge, the underlying logic stipulates that when the estimated SOC drops to 15% or below, the system initiates real-time deviation monitoring. If the SOC deviation exceeds a preset deviation tolerance threshold, the system determines that the current integration error exceeds the tolerance boundary of the conventional algorithm. The system configures the deviation tolerance threshold to be between 8% and 12%. When the deviation condition is met, the main control unit disables the conventional anti-jitter waiting process and directly outputs a forced intervention command to trigger the calibration action in advance. This forced intervention mechanism limits the divergence of open-loop errors, ensuring the continuity of system operation at the end of the discharge phase.
[0067] Upon triggering a calibration setting or receiving a forced intervention command, the system performs a quantitative calculation of the correction amount. The electrochemical polarization of the battery varies under different discharge powers, and using a uniform correction ratio can easily lead to overshoot or undershoot in capacity estimation. The system introduces a multi-level dedicated calculation mechanism, combining the characteristics of the current discharge conditions to deduce the state-of-charge correction amount, providing a data foundation for subsequent smooth approximation strategies. The specific process includes the following steps: S431, the main control module performs target state of charge (SOC) analysis specific to the power level. The battery's remaining capacity differs when the cutoff condition is triggered at different power levels. The system retrieves the target SOC mapping matrix bound to the current power level. This matrix contains the standard target remaining charge under different ambient temperatures and capacity decay coefficients cross-indexed. Based on the current temperature acquisition value and aging parameters, the microprocessor uses matrix interpolation to extract the physical target SOC adapted to the current operating conditions. Low-power discharge can release more underlying chemical capacity; as a preferred method, the system calibrates the physical target SOC in the low-power range to 3% to 5%. In the high-power range, the polarization voltage drop is large, and the battery retains more usable charge; the system calibrates the physical target SOC in the high-power range to 8% to 12%. This operation establishes the calibration benchmark reference value.
[0068] The S432 core computing unit performs the calculation of the basic deviation value of the state of charge (SOC). The microprocessor reads the current estimated SOC output from the running memory based on the ampere-hour integration algorithm. The system subtracts the current estimated SOC from the physical target SOC to obtain the basic deviation value. Considering the truncation error of the algorithm's underlying calculations and fluctuations in sensor acquisition, the microprocessor introduces calibration-free dead-zone logic. The system determines whether the absolute value of the basic deviation is greater than a preset deviation masking threshold. When the absolute value of the basic deviation is less than or equal to the deviation masking threshold, the system determines that the current estimation error is within an acceptable tolerance range, terminates the current correction action, and avoids unnecessary fine-tuning that consumes processor computing power. The system configures the deviation masking threshold to be 1% to 2%. If the absolute value of the basic deviation is greater than the deviation masking threshold, the physical range of subsequent charge correction is determined.
[0069] The S433 microprocessor uses a dynamic mathematical model to deduce the specific correction amount for each power level. High-power discharge induces deep ohmic and concentration polarization. When the load is cut off or the current decreases, the internal polarization of the battery dissipates, causing the terminal voltage to naturally rise. If only a simple full static correction is performed based on the aforementioned basic deviation value, it is easy to cause abnormal rebound in the capacity estimation. Therefore, after confirming that the basic deviation value exceeds the limit, the core computing unit introduces a dynamic calibration mathematical model based on integral evolution and operating condition attenuation coupling to deduce the final correction amount.
[0070] Specifically, the microprocessor first calculates the operating condition correction factor for the current gear. The calculation formula is as follows: ; In the formula, This refers to the capacity attenuation coefficient obtained in the early stages of the system. This refers to the gear weighting coefficients tied to the current power operating condition. The system assigns gear weighting coefficients to the low-power, medium-power, and high-power ranges. The values were initialized to 0.8, 1.0, and 1.2 respectively, and the weight coefficients were verified and corrected at the underlying level based on the actual discharge capacity throughout the system's entire life cycle, so as to accurately adapt to the capacity attenuation compensation intensity under different complex operating conditions.
[0071] Subsequently, the microprocessor, based on the correction factor for this operating condition, calculates the first... Gear-specific adjustment amount The calculation formula is as follows: ; In the formula, For gear calibration trigger time; The integral SOC estimate at the trigger time; This corresponds to the discharge current at the specified gear. The calculation logic for this correction factor considers both the actual accumulated discharge capacity after trigger calibration and the operating condition correction coefficient. The reduction in usable range caused by physical degradation and transient polarization was accurately calculated, thus yielding a correction magnitude that closely reflects the actual physical state of the battery.
[0072] S434, the core computing unit, performs dynamic iterative calibration and state establishment of the state of charge. After obtaining the correction value specific to the current gear, the microprocessor merges it with the real-time state value output by the ampere-hour integration algorithm. The specific calibration formula is as follows: ; In the formula, This is the SOC value after calibration for the nth gear. This is the original SOC estimate for the integration operation; Indicates the current time; For the first Dedicated correction for each gear. Through the aforementioned multi-gear dedicated compensation mechanism, the system effectively limits over-correction or conservative correction under severe polarization conditions, ensuring that the final output state of charge correction closely matches the actual amount of charge that can be released under the current operating conditions.
[0073] After the single-gear calibration calculation is completed, the microprocessor will process the calibrated... The value is updated to the baseline value for the next operation cycle. Based on this, if the load power does not change across intervals during subsequent discharge, the system will maintain the current gear parameters and continuously perform closed-loop dynamic calibration until the calibration termination condition of the overall operation cycle is met; if the underlying layer detects that the load power triggers the gear switching boundary, the main control module will then proceed to the cross-gear state locking and smooth transition process.
[0074] In this embodiment, the system handles state changes caused by load power level switching during the discharge process. When a single-level calibration logic encounters a sudden change in load power, directly switching the compensation parameters can lead to a step change in the remaining power estimation, causing misjudgments in the equipment protection logic. Therefore, the system introduces a cross-level dynamic iteration and smooth switching mechanism to help maintain the continuity of power output. The specific process includes the following steps: S441, the main control module performs cross-gear action monitoring and historical state locking. The microprocessor compares the current power gear with the power gear of the previous calculation cycle in real time. When a gear switch is detected, the underlying control logic triggers a cross-gear interrupt mechanism. The microprocessor locks the initial state of charge and the original gear dynamic compensation coefficient at the moment of the switch in the running memory. For complex operating conditions with frequent switches during the transition period, if a gear switch occurs again within the preset transition time window, the system overwrites the currently used transition compensation coefficient with the new original gear dynamic compensation coefficient and clears the accumulated iteration time. This locking and resetting mechanism avoids computational base gaps caused by directly overwriting the new gear parameters and fills the algorithm dead zone under continuous abrupt changes.
[0075] The S442 core computing unit performs dynamic iteration of transition compensation parameters. To achieve a smooth transition between the original and new gear compensation parameters, the microprocessor introduces a time-series-based linear gradient algorithm. From an electrochemical perspective, the establishment and dissipation of the battery's internal polarization voltage have a delayed effect, and time-based parameter gradients conform to physical laws. The system sets a transition time window across gears, within which the transition compensation coefficient is calculated according to the computation cycle.
[0076] The iterative logic is relatively linear and can be implemented without complex mathematical formulas. The microprocessor obtains the locked original gear dynamic compensation coefficient and the new gear dynamic compensation coefficient matching the current operating condition. The system calculates the difference between the new gear dynamic compensation coefficient and the original gear dynamic compensation coefficient, and multiplies this difference by a time scaling factor to obtain the compensation increment. This time scaling factor is the quotient of the cumulative iteration time since the gear switching moment divided by the cross-gear transition time window. The system adds the original gear dynamic compensation coefficient to the compensation increment to obtain the transition compensation coefficient calculated in the current iteration cycle.
[0077] Considering the system's operating frequency and battery polarization recovery rate, as a preferred approach, the system configures the transition time window between gear shifts to 5 to 10 seconds. To improve boundary logic, the system sets a saturation limit on the cumulative iteration time. When the cumulative iteration time is greater than or equal to the transition time window between gear shifts, the microprocessor directly assigns the transition compensation coefficient to the dynamic compensation coefficient of the new gear and terminates the current iteration state, avoiding computational divergence dead zones. The transition compensation coefficient increases cycle by cycle within this time window, eliminating computational surges caused by parameter mutations.
[0078] The S443 microprocessor performs smooth approximation and output of the terminal state of charge (SOC). After completing the transition parameter derivation, the core module calculates the correction amount in real time based on the transition compensation coefficient obtained through iteration and adds it to the baseline value of the ampere-hour integral. Considering that the direct output superposition result is accompanied by slight jitter, the system is configured with anti-step filtering logic at the output end. The microprocessor limits the rate of change of the SOC between two adjacent operation cycles. The system extracts the currently calculated SOC and the output value of the previous cycle and calculates the absolute value of the difference between the two.
[0079] The system determines whether the absolute value is greater than a set rate of change threshold. When the absolute value is greater than the rate of change threshold, the system forcibly limits the current output value to the output value of the previous cycle plus or minus the rate of change threshold; when the absolute value is less than or equal to the rate of change threshold, the system directly outputs the currently calculated state of charge. In engineering implementation, the rate of change threshold is set to 0.1% to 0.2% per second. This limiting logic helps the remaining power data output by the terminal to transition with a smooth curve, reducing the risk of numerical jumps interfering with the scheduling of external devices.
[0080] In this embodiment, the system simultaneously runs termination condition monitoring logic when performing end-of-discharge charge calibration. Relying on a single algorithm convergence as the termination condition could easily lead to calibration stalls or conflicts with underlying hardware protection mechanisms. The system introduces a composite identification mechanism covering algorithm convergence, physical boundaries, and sudden changes in operating conditions, which helps ensure the closed-loop of the estimation logic. The specific identification process includes the following steps: S511, the main control module executes the algorithm convergence target determination. The microprocessor acquires the current output state of charge in real time and compares it with the previously determined physical target state of charge. Considering the floating-point truncation precision limitations of the chip's low-level operations, directly using an absolute equality condition can easily cause state machine recognition failure. The microprocessor calculates the absolute difference between the current output state of charge and the physical target state of charge. The system determines whether this absolute difference is less than a preset convergence tolerance threshold. When the absolute difference is less than the convergence tolerance threshold, the system determines that the smooth approximation algorithm has converged, normally terminates the calibration process, and switches the current state machine back to the conventional ampere-hour integration operation mode. As a preferred approach, the system sets the convergence tolerance threshold to 0.1% to 0.2%. This tolerance determination mechanism reduces the computational power consumption of the microprocessor in fine-tuning the terminal data.
[0081] S512, the underlying monitoring unit performs a physical limit protection trigger judgment. At the end of the discharge phase, the battery terminal voltage drops. If the external load does not respond promptly to the power decay data and continues to draw current, the battery terminal voltage reaches the hardware undervoltage protection threshold. The system collects the lowest individual cell voltage and the total battery pack voltage in real time. When the lowest individual cell voltage is lower than the set individual cell cutoff voltage, or the total battery pack voltage is lower than the set total voltage cutoff threshold, the underlying hardware triggers a main circuit disconnection action.
[0082] The cutoff voltage for each cell is determined based on the cell's manufacturer's specifications with a safety margin. At this point, regardless of whether the smooth approximation algorithm has reached convergence, the microprocessor forcibly terminates the calibration logic and directly overwrites the current output state of charge (SOC) to 0%, while simultaneously reporting an undervoltage fault to the upper-layer device. Here, 0% represents the exhaustion of available SOC at the application layer, rather than an absolute chemical SOC reset to zero. This forced overwrite mechanism helps reduce the risk of software estimation latency becoming disconnected from underlying hardware protection actions.
[0083] S513, the microprocessor identifies sudden changes in operating conditions and timeout interruptions. During calibration, if the external load is disconnected or the system switches to energy recovery charging mode, the internal discharge polarization conditions of the battery disappear, and the calibration reference data calculated based on the discharge polarization characteristics deviates from the actual electrochemical state. The microprocessor monitors the main circuit current state in real time. When the current direction reverses, or the absolute value of the discharge current is lower than the preset resting current threshold and remains below the set debouncing time window, the system determines that a sudden change in external operating conditions has occurred. At this time, the system interrupts the current calibration process and locks the currently output state of charge as the initial value for subsequent routine integration calculations.
[0084] In engineering implementation, the system sets the static current threshold to the current value corresponding to 0.05 to 0.1 times the rated capacity, and the debouncing time window to 3 to 5 seconds. To prevent logical dead loops caused by algorithm non-convergence and failure to trigger hardware protection, the system introduces a timeout exit mechanism. The underlying timer records the duration from the calibration trigger moment. When the duration exceeds the set maximum calibration time window, the microprocessor forcibly exits the calibration state. The system configures the maximum calibration time window to be 60 to 120 seconds. The range of this maximum calibration time window is derived by combining the maximum allowable total state of charge correction of the system with the previously configured anti-step change rate threshold. This abnormal interruption identification logic improves the adaptability of the underlying algorithm to complex operating conditions.
[0085] After completing the end-of-discharge calibration, the system invokes the previously constructed capacity decay projection model to perform a closed-loop update calculation of the capacity decay coefficient. Given that long-term battery operation leads to an irreversible decrease in usable capacity, relying solely on a fixed factory capacity for ampere-hour integration will result in continuous deviations in capacity estimation during the later stages of the battery's lifespan. Therefore, the system utilizes the measured data obtained under this deep discharge condition, combined with the previously established calculation benchmark, to dynamically correct the capacity decay coefficient to maintain overall estimation accuracy. The specific update process includes the following steps: S521, the main control module performs effective discharge range identification. The microprocessor extracts the initial state of charge (SOC) and the final state of charge (NC) at the end of the discharge process. To avoid capacity estimation deviations caused by accumulated ampere-hour integral errors, the SOC and NC are the actual SOCs after physical anchoring through long-term open-circuit voltage lookup or trigger-end calibration. The system calculates the absolute difference between the SOC and NC to obtain the discharge depth span. The system determines whether the discharge depth span is greater than a preset effective discharge depth threshold. As a preferred approach, the system sets the effective discharge depth threshold to 60% to 80%. When the discharge depth span is greater than the effective discharge depth threshold, the system determines that the discharge process meets the capacity calculation boundary conditions. When the discharge depth span is less than or equal to the effective discharge depth threshold, the system determines that the current operating condition is shallow charge and shallow discharge, the microprocessor terminates the current capacity update process and uses historical attenuation parameters to avoid amplifying calculation errors under shallow charge and shallow discharge conditions.
[0086] S522, the core computing unit calculates the actual available capacity for the current cycle. After meeting the boundary conditions of the effective discharge range, the microprocessor reads the accumulated measured discharge capacity of the ampere-hour integrator within the effective discharge range. Based on the accumulated measured discharge capacity and the discharge depth span, the system calculates the actual available capacity for the current cycle. This calculation logic is a direct proportional operation; the microprocessor divides the accumulated measured discharge capacity within the discharge range by the discharge depth span, and the quotient is the actual available capacity calculated for the current cycle.
[0087] The S523 microprocessor performs a smooth update of the capacity attenuation coefficient. Based on the calculated actual usable capacity, the system updates the measured attenuation parameters. Considering that a single measurement includes errors introduced by sensor acquisition noise and operating condition fluctuations, directly replacing the historical attenuation coefficient would cause parameter jumps. The microprocessor introduces a first-order inertial filtering algorithm to smoothly update the attenuation coefficient. The specific calculation logic is as follows: the system obtains the historical capacity attenuation coefficient stored in the running memory and the preset first-order inertial filter weight coefficient.
[0088] The microprocessor calculates the ratio of the actual usable capacity to the battery's factory rated capacity as the current measured degradation rate. The system multiplies the historical capacity degradation coefficient by a first weight parameter, multiplies the current measured degradation rate by a first-order inertial filter weight coefficient, and adds the products of the two to obtain the updated capacity degradation coefficient for this cycle. The first weight parameter is the difference between the value 1 and the first-order inertial filter weight coefficient. Considering the slow and gradual physical characteristics of battery natural aging, the system sets the first-order inertial filter weight coefficient to 0.02 to 0.05 in engineering implementation. The smooth update logic filters out abnormal fluctuations in single measured data. The microprocessor outputs the updated capacity degradation coefficient for this cycle and writes it to the system's internal non-volatile memory. The updated capacity degradation coefficient for this cycle serves as a reference for the basic energy calculation and dynamic trigger reference voltage lookup in the next operating cycle, promoting closed-loop adaptive iteration of the underlying algorithm parameters.
[0089] The system synchronously executes extreme condition protection strategies during power estimation and parameter calibration cycles. Complex operating environments and underlying hardware anomalies increase the risk of conventional algorithm failures or system malfunctions. The system constructs a multi-layered protection mechanism to help maintain the continuity and reliability of state variable outputs. The specific protection process includes the following steps: The S531 main control module performs extreme temperature boundary identification and estimation degradation. The microprocessor acquires the cell surface temperature in real time. From an electrochemical principle perspective, temperatures exceeding the normal electrochemical operating range cause changes in the battery's internal ion conduction rate and charge transfer impedance, leading to polarization characteristics deviating from the standard model. Continuing with end-point calibration or parameter iteration introduces calculation errors. The system sets an upper and lower temperature threshold for allowable calibration. The microprocessor determines whether the currently acquired temperature is within a safe temperature range. When the temperature exceeds the upper temperature threshold or falls below the lower temperature threshold, the system forcibly suspends dynamic compensation algorithms and other algorithm modules, downgrading the energy estimation logic to a pure ampere-hour integration mode.
[0090] In the engineering implementation, the system sets the lower temperature threshold to -10°C to 0°C and the upper temperature threshold to 45°C to 55°C. The system synchronously monitors the temperature recovery status. When the collected temperature drops and stabilizes within the safe temperature range, and maintains the preset temperature debouncing time, the microprocessor automatically wakes up the corresponding algorithm module and restores the full-function estimation state. This degradation and recovery mechanism helps reduce the risk of algorithm overshoot in thermal environments.
[0091] The S532's underlying monitoring unit performs sensor data mutation isolation and fault-tolerant filtering. When the underlying sampling hardware is affected by external electromagnetic interference or poor contact, the output current and voltage signals may exhibit steps that do not conform to physical laws. Substituting sampling data containing hardware anomalies into the state machine causes the estimation results to diverge. The microprocessor introduces change rate constraint logic during the data preprocessing stage. The microprocessor extracts the voltage and current changes between two adjacent sampling periods.
[0092] The microprocessor determines whether the absolute value of the change exceeds a preset physical jump threshold. When the absolute value of the change exceeds the physical jump threshold, the system determines that the current sampled data is interference noise, discards the abnormal data frame, and retrieves historical data from the previous operation cycle for forward filling. As a preferred approach, the system sets the voltage physical jump threshold to 100 to 200 millivolts per millisecond, and the current physical jump threshold to the current value corresponding to 0.5 to 1 times the rated current. To prevent continuous sensor anomalies from causing incorrect historical data filling, the system introduces a continuous abnormal frame counter. When the number of continuously discarded data frames exceeds the set fault tolerance limit, the system determines that the sensor has experienced a hardware failure, triggers a system-level alarm, and disconnects the main circuit. This fault tolerance mechanism helps suppress the propagation of underlying transient fluctuations to the upper-level estimation logic.
[0093] The S533 core computing unit performs critical parameter power-loss protection and redundancy recovery. After updating the capacity decay factor or calibration reference point, the system writes the core parameters to non-volatile memory. If an unexpected power outage or bus reset occurs during the erase / write process, resulting in data corruption in the memory, the subsequent read of the corrupted data during the next boot will cause the estimation base to collapse.
[0094] The system employs a dual-zone backup and verification mechanism at the storage layer. The microprocessor divides the non-volatile memory into a primary storage area and a backup storage area. Each time parameters are updated, the system synchronously writes data to both the primary and backup storage areas and calculates the corresponding cyclic redundancy check (CRC) code. During the system power-on initialization phase, the microprocessor reads data from the primary storage area and performs verification. If the primary storage area data fails verification, the system retrieves data from the backup storage area for overwriting and recovery. When both primary and backup verifications fail, the system forcibly resets the underlying parameters to factory-preset safe default values. This recovery logic enhances the cold-start safety of the control unit under power fluctuation scenarios.
[0095] Specific application examples: This embodiment uses a 10kVA energy storage UPS system (configured with 48V / 100Ah lithium iron phosphate batteries, with a factory-specified cycle life of 3000 cycles) in a data center as an example to illustrate the complete workflow of the system under complex operating conditions. The entire process covers power-on parameter initialization, closed-loop calculation of capacity decay coefficient, and multi-level SOC smoothing calibration at the end of discharge. After applying this method, in harsh scenarios where the battery is in the middle to late stage of service and the external load fluctuates frequently, the SOC estimation error at the end of discharge is reduced from more than 8.5% of the traditional algorithm to less than 1.8%, effectively avoiding the risk of sudden power failure of critical loads due to inaccurate power measurement.
[0096] In actual operation, assuming the system has recorded 1500 equivalent cycles, the core module first calculates the current actual usable capacity as 90Ah based on the lifetime model and retrieves the attenuation coefficient of 0.9 from the previous cycle. During load discharge, if the load falls into the medium power range, the system first performs a basic estimate based on the conventionally corrected ampere-hour integral. When the discharge reaches its end and the terminal voltage touches the dynamic trigger reference for the current range, the system locks the integral SOC value at this moment and intervenes in dynamic calibration. To intuitively demonstrate the correction logic, the core formula for determining the final output state is: ,in, This is a correction value specific to the nth gear, incorporating the remaining charge deviation and polarization characteristics at the trigger moment. After the complete deep discharge cycle, the system measures the actual discharge capacity (e.g., 88Ah), and then triggers the underlying parameter closed-loop. The core update formula for the attenuation coefficient is: Based on this, a new attenuation coefficient of 0.88 is calculated, and the system writes it into non-volatile memory as a precise basis for the next cycle of operation.
[0097] To further explain the above dynamic correction process, please refer to the appendix. Figure 5 , Figure 5 The horizontal axis represents discharge time (s), and the vertical axis represents SOC percentage (%). A thin dashed line represents the traditional fixed capacity integral trajectory without dynamic calibration, a thick solid line represents the multi-level SOC calibration trajectory of this invention, and a dotted line represents the true SOC reference acquired by the high-precision discharge instrument. It is clearly visible in the figure that the thin dashed line diverges significantly at the end of the discharge, while the thick solid line, after the trigger point, closely follows the true reference represented by the dotted line with a smooth curve, without exhibiting any abrupt changes that could cause false alarms.
[0098] Appendix Figure 6 This is a battery capacity degradation tracking graph for the entire life cycle. The horizontal axis represents the number of cycles, and the two vertical axes correspond to the capacity (Ah) and the degradation coefficient k, respectively. The grayscale curves in the graph are highly distinguishable independent line types, which intuitively reflect that the available capacity trajectory inferred by the algorithm is highly synchronized with the actual degradation trajectory measured in the laboratory.
[0099] To verify the actual effectiveness of the solution, a comparative test was conducted on the aforementioned battery (actual SOH approximately 85%) in a constant temperature chamber at 35℃. The test conditions simulated a power outage in a computer room, with the inductive load fluctuating frequently between 20%, 50%, and 80% of its rated power. The control group used the conventional ampere-hour integration method based on a fixed 100Ah capacity, while the experimental group used the method of this invention. Test data showed that in the control group, at the 45-minute mark of discharge, the SOC still showed 13% remaining, but the battery terminal voltage, due to severe polarization caused by the large current, instantly dropped below the hardware undervoltage protection threshold, causing the system to directly cut off the output, with an actual end-of-line error as high as 8.5%. Conversely, in the experimental group, when encountering load jumps across different load levels, the polarization compensation logic maintained stable estimations; at the end of the discharge, the dynamic calibration module accurately triggered and corrected the accumulated error, issuing a timely and accurate low-battery alarm, and the maximum SOC deviation throughout the process was firmly controlled within 1.8%. The test data objectively confirms the practical engineering value of this solution in resolving the estimation distortion problem caused by the coupling of variable load and battery degradation.
Claims
1. A UPS battery SOC adaptive calibration method based on multi-stage discharge, characterized in that, include: Real-time acquisition of operating data including output power, real-time charging and discharging current, and battery terminal voltage to identify operating conditions including charging and discharging states; Obtain the capacity decay coefficient stored in the system, and calculate the current actual usable capacity based on the capacity decay coefficient and the battery's factory rated capacity; When the battery is identified as being in a charging state and the set threshold conditions are met, a charging reference calibration is performed to set the battery's state of charge to 100% and update the actual available capacity simultaneously. When the state of discharge is identified, the power operation range is divided according to the output power, the dynamic trigger reference voltage corresponding to the range is obtained, and the correction amount is calculated in combination with the actual available capacity and the real-time charging and discharging current to obtain the calibrated state of charge. The state of charge after calibration is calculated based on the correction amount; when the preset termination condition is met, the time period from entering the discharge state to meeting the termination condition is taken as the effective discharge interval, the measured discharge capacity obtained by integrating the real-time discharge current within the effective discharge interval is obtained, and the capacity decay coefficient is updated using the measured discharge capacity.
2. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The steps for calculating the current actual usable capacity of the battery based on the capacity decay coefficient and the battery's factory rated capacity specifically include: The actual usable capacity is obtained by multiplying the preset factory rated capacity of the battery by the capacity decay coefficient. When the system is initially powered on, the initial value of the capacity attenuation coefficient is set to 1.0; During system operation, a safe operating lower limit threshold is set for the capacity attenuation coefficient. When the calculated capacity attenuation coefficient reaches the safe operating lower limit threshold, the capacity attenuation coefficient is locked at the safe operating lower limit threshold to participate in subsequent calculations, and a replacement warning instruction is generated.
3. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The set threshold conditions include hardware full charge determination conditions and environmental parameter verification full charge determination constraints. The hardware full charge determination criteria include any one of the following: The average cell voltage of the battery reaches the dynamic full charge trigger voltage threshold, and the charging current drops to the trickle current threshold. The total battery voltage reaches the dynamic full charge trigger voltage threshold, and the charging current drops to the trickle current threshold. The voltage of a single battery cell has reached the preset overcharge protection threshold. The environmental parameter verification full charge determination constraint is: the collected internal temperature of the battery module is within the preset permissible range, and the temperature rise rate of the battery module is lower than the temperature rise rate warning threshold. The dynamic full charge trigger voltage threshold is set by the sum of the reference full charge voltage threshold and the polarization voltage drop compensation amount; the trickle current threshold is set by the battery charge / discharge rate reference constant; the single cell overcharge protection threshold is set by the battery physical limit; and the temperature rise rate warning threshold is set by the lithium battery heat generation characteristics.
4. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The steps for dividing the power operation range according to the output power specifically include: The collected output power is filtered using a first-order inertial low-pass filter algorithm to obtain smooth power. The smoothed power is compared with a preset first power threshold and a second power threshold: when the smoothed power is lower than the first power threshold, it is determined to be in the low power range; when the smoothed power is greater than or equal to the first power threshold and lower than the second power threshold, it is determined to be in the medium power range; when the smoothed power is greater than or equal to the second power threshold, it is determined to be in the high power range. The system obtains the hysteresis bandwidth parameter at the switching boundary between adjacent power operation ranges, and performs the power operation range switching operation only when the fluctuation amplitude of the smoothed power exceeds the hysteresis bandwidth parameter. The first power threshold and the second power threshold are set by the system based on the ratio of the device's rated power.
5. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The step of obtaining the dynamic trigger reference voltage corresponding to the interval specifically includes: Real-time monitoring of battery ambient temperature; Based on the current range, the discharge end-of-life reference voltage mapping table stored in the memory is retrieved. Combined with the battery ambient temperature and the current capacity decay coefficient, the corresponding value is extracted as the dynamic trigger reference voltage using a bilinear interpolation algorithm. Dynamic calibration is triggered when the battery terminal voltage drops to the dynamic trigger reference voltage and remains below the dynamic trigger reference voltage for a set anti-shake time window.
6. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 5, characterized in that, The specific steps for calculating the correction amount based on the actual available capacity and the real-time charging / discharging current include: Obtain the pre-configured gear weight coefficient for the current power operating gear range, and calculate the operating condition correction coefficient for the current gear based on the capacity attenuation coefficient and the gear weight coefficient. The integral estimate of the state of charge at the current moment is obtained by the ampere-hour integration method; the cumulative discharge capacity is obtained by continuous time integration of the real-time charge and discharge current from the calibration trigger moment to the current moment. Calculate the quotient of the cumulative discharge capacity and the actual available capacity; subtract the integral estimated state of charge at the calibration trigger time from the full charge calibration value to obtain the reference charge difference; The ratio of the cumulative discharge capacity to the actual available capacity is subtracted from the product of the reference power difference and the operating condition correction coefficient to obtain the gear-specific correction amount corresponding to the current gear. The calibrated state of charge is obtained by subtracting the gear-specific correction from the current integral estimated state of charge.
7. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 4, characterized in that, When a power gear shift is detected, a cross-gear state locking and smooth transition procedure is executed, which includes: Lock the initial state of charge at the moment of switching and the gear-specific correction amount corresponding to the original gear before switching, and start the set cross-gear transition time window; Within the cross-gear transition time window, the transition correction amount is calculated according to the linear gradual change algorithm based on the operation cycle: the difference between the gear-specific correction amount corresponding to the new gear after switching and the gear-specific correction amount corresponding to the original gear is multiplied by the time scale factor to obtain the correction increment, and the gear-specific correction amount corresponding to the original gear is added to the correction increment to obtain the transition correction amount. Extract the state of charge calculated in the current operation cycle and the state of charge output in the previous operation cycle, calculate the absolute value of the difference between the state of charge calculated in the current operation cycle and the state of charge output in the previous operation cycle, and restrict the output to a preset rate of change threshold.
8. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The termination condition specifically includes any one of the following: The algorithm convergence target is reached when the absolute difference between the calibrated state of charge output in the current operation cycle and the calibrated state of charge output in the previous operation cycle is less than the preset convergence tolerance threshold. Physical limit protection trigger conditions: The lowest single cell voltage is lower than the set single cell cutoff voltage, or the total voltage of the battery pack is lower than the set total voltage cutoff threshold. At this time, the calibration logic is forcibly terminated and the output state of charge is overwritten to 0%. Identification of sudden changes in operating conditions and timeout interruptions: The direction of the real-time charging and discharging current is reversed, or the absolute value of the real-time charging and discharging current is lower than the preset static current threshold and the set debounce time window is maintained. The convergence tolerance threshold is set by the system; the total voltage cutoff threshold is set by the hardware undervoltage protection baseline; and the static current threshold is set by the system based on the battery rated capacity ratio.
9. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The step of updating the capacity decay coefficient using the measured discharge capacity specifically includes: Extract the initial state of charge and the final state of charge of the effective discharge range, and calculate the absolute difference between the initial state of charge and the final state of charge to obtain the discharge depth span. When the discharge depth span is greater than the set effective discharge depth threshold, the measured discharge capacity is divided by the discharge depth span to calculate the actual measurable capacity for the current cycle. The ratio of the actual measured usable capacity to the preset factory rated capacity of the battery is calculated as the current measured degradation rate; The updated capacity attenuation coefficient is obtained by multiplying the historical capacity attenuation coefficient before the current discharge process by the first weighting parameter, multiplying the current measured attenuation rate by the second weighting parameter, and adding the products of the two.
10. The UPS battery SOC adaptive calibration method based on multi-stage discharge as described in claim 1, characterized in that, The UPS battery SOC adaptive calibration method based on multi-stage discharge also includes an extreme temperature boundary estimation degradation step: Real-time acquisition of cell surface temperature to determine whether the cell surface temperature is within the safe temperature range that allows for calibration. When the cell surface temperature is higher than the upper temperature threshold or lower than the lower temperature threshold, the dynamic compensation algorithm is forcibly suspended, and the state of charge is output only through pure ampere-hour integral mode based on the real-time charge and discharge current. After the cell surface temperature drops and stabilizes within the safe temperature range, and maintains the preset temperature de-shaking time, the full-function estimation state is resumed. The upper temperature threshold and the lower temperature threshold are set by the system.