A UPS battery adaptive charging protection control method and system based on dynamic threshold switching
The UPS battery adaptive charging protection control method with dynamic threshold switching solves the overcharging or undercharging problem when the UPS experiences sudden temperature changes across temperature ranges, thereby extending battery life and improving charging efficiency, and ensuring the reliability of emergency power supply.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGYU (SHENZHEN) TECH CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-21
AI Technical Summary
Existing UPS charging control schemes cannot adjust charging parameters in time when there are sudden temperature changes across different temperature ranges, resulting in overcharging or undercharging, which affects charging efficiency and battery life.
A UPS battery adaptive charging protection control method based on dynamic threshold switching is adopted. By acquiring the battery type identification loading temperature-voltage characteristic curve, the battery temperature and voltage are collected in real time, and the charging mode and voltage range are dynamically adjusted to achieve temperature-voltage dual-parameter closed-loop control, and a gradual transition is performed when the temperature range changes.
It enables smooth adjustment of charging parameters when the temperature changes across a range, avoids the mechanical stress impact on the battery caused by sudden voltage changes, extends battery life, and improves charging efficiency and emergency power supply reliability.
Smart Images

Figure CN121618690B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of circuit devices or systems for power supply or distribution, and in particular to a UPS battery adaptive charging protection control method and system based on dynamic threshold switching. Background Technology
[0002] As backup power equipment in critical scenarios such as data centers, medical equipment, and communication base stations, the charging state of the batteries in UPS (Uninterruptible Power Supply) directly determines the reliability of emergency power supply. The electrochemical characteristics of batteries are significantly affected by temperature: high temperatures enhance electrolyte activity but also increase the risk of overcharging and thermal runaway, while low temperatures increase battery internal resistance and reduce charge acceptance. Therefore, achieving effective battery charging protection under different temperature conditions is crucial for ensuring the stable operation of the UPS system.
[0003] In related technologies, UPS charging control schemes often employ constant voltage and constant current charging technology with temperature compensation. This scheme sets fixed charging voltage and current parameters, detects the battery temperature using a temperature sensor, and linearly corrects the charging voltage based on a preset temperature compensation coefficient (e.g., -3mV / ℃ / cell). The charging process follows a two-stage mode: constant current charging followed by constant voltage charging. In the constant current stage, the battery is charged with the set current. Once the battery voltage reaches the conversion voltage, the constant voltage stage begins, where the charging current gradually decreases to the cutoff value.
[0004] However, when the ambient temperature changes abruptly across temperature ranges (such as from a sudden change from low temperature to high temperature), the linear compensation mechanism responds with a lag and cannot adjust the charging parameters in time to match the battery characteristics required in the new temperature range. This results in the charging voltage deviating from the optimal value during the transition phase, affecting charging efficiency and battery life. Summary of the Invention
[0005] This application provides a UPS battery adaptive charging protection control method and system based on dynamic threshold switching, which is used to improve the accuracy of charging parameter adjustment when the temperature changes across different ranges.
[0006] In a first aspect, this application provides a UPS battery adaptive charging protection control method based on dynamic threshold switching, applied to a charging protection control system. The method includes: acquiring the battery type identifier of the battery to be charged; loading a corresponding temperature-voltage characteristic curve based on the battery type identifier, wherein the temperature-voltage characteristic curve includes multiple temperature ranges and a target voltage range corresponding to each temperature range, wherein the target voltage range includes a lower voltage threshold and an upper voltage threshold; real-time acquisition of the battery temperature and battery voltage of the battery to be charged; determining the current temperature range and the corresponding current target voltage range based on the battery temperature in the temperature-voltage characteristic curve; when the battery voltage is lower than the lower voltage threshold, charging in constant current mode until the battery voltage reaches the lower voltage threshold, then switching to constant voltage mode for maintenance; when the battery voltage is higher than the upper voltage threshold, stopping charging and discharging to the upper voltage threshold; and maintaining the battery voltage in constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold.
[0007] By adopting the above technical solution, the operating temperature is divided into multiple ranges based on the temperature-voltage characteristic curve loaded according to the battery type, and upper and lower voltage thresholds are set for each range. Temperature and voltage data are collected in real time to determine the current range. When the voltage deviates from the target range, the corresponding charging and discharging strategy is immediately executed, achieving closed-loop control of temperature and voltage dual parameters. This avoids the overcharging or undercharging problems that occur with fixed threshold solutions during temperature fluctuations, effectively extending battery life and improving charging efficiency.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of maintaining the battery voltage in constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: when the battery temperature changes from the current temperature range to a new temperature range, extracting the new target voltage range corresponding to the new temperature range, calculating the voltage difference between the new target voltage range and the current target voltage range; calculating the voltage adjustment slope based on the voltage difference and a preset transition time, and adjusting the charging output voltage from the current target voltage range to the new target voltage range according to the voltage adjustment slope.
[0009] By adopting the above technical solution, when the temperature changes across ranges, the difference between the old and new target voltage ranges is calculated, and the voltage adjustment slope is determined based on the preset transition time. Gradual voltage adjustment is then implemented according to the slope. This smooth transition avoids the stress impact on the battery caused by sudden voltage changes during temperature abrupt changes, solves the voltage fluctuation problem during range switching, and ensures the continuity and stability of the charging process.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of maintaining the battery voltage in a constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: after each preset number of charge-discharge cycles, detecting the battery capacity decay rate of the battery to be charged, and correcting the lower voltage threshold and the upper voltage threshold corresponding to each temperature range in the temperature-voltage characteristic curve according to the battery capacity decay rate.
[0011] By adopting the above technical solution, the battery capacity degradation rate is periodically monitored and the voltage thresholds for each temperature range are adjusted accordingly, allowing charging parameters to dynamically follow changes in battery performance. This solves the problem of original parameters becoming incompatible after battery aging, ensuring that charging control remains effective throughout the battery's entire lifespan and slowing down the rate of performance degradation.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after maintaining the battery voltage in constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: recording load power data at each time point within a preset time period, establishing a load power time series based on the load power data; analyzing the load power time series to obtain a periodic load fluctuation pattern, extracting the load peak period and valley period from the periodic load fluctuation pattern; increasing the upper limit of the charging current during the load valley period, and reducing the charging current within a preset advance time before the arrival of the load peak period; generating a load abnormality alarm signal when the real-time load power deviates from the periodic load fluctuation pattern by more than a preset deviation threshold.
[0013] By employing the above technical solution, the periodic fluctuation pattern of load power is extracted through analysis of the load power time series. During off-peak periods, the upper limit of charging current is increased to accelerate charging, while before peak periods, the charging current is reduced to reserve power margin. This achieves intelligent coordination between charging and load demand, avoids power competition, and provides timely alarms when the load deviates abnormally from the pattern, thereby improving the system's load adaptability and power supply reliability.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of stopping charging and discharging to the upper voltage threshold when the battery voltage is higher than the upper voltage threshold, the method further includes: during the constant voltage charging stage, collecting charging current, battery voltage, and battery temperature data; calculating the temperature rise rate during the charging process and comparing it with the temperature rise rate of historical normal charging to obtain a temperature rise anomaly coefficient; calculating the response time of the battery voltage after applying the charging current and comparing it with the voltage response time of historical normal charging to obtain a response delay coefficient; calculating the peak position of the voltage-capacity differential curve and comparing it with the peak position of historical normal charging to obtain a structural degradation coefficient; weighted summing of the temperature rise anomaly coefficient, the response delay coefficient, and the structural degradation coefficient to obtain an aging coefficient; when the aging coefficient exceeds a preset aging threshold, determining that the battery has entered an aging state, and adjusting the charging cut-off current threshold according to the aging coefficient.
[0015] By adopting the above technical solution, multi-dimensional data is collected during the constant voltage charging stage. A comprehensive aging coefficient is obtained by weighted summation of the temperature rise anomaly coefficient, response delay coefficient, and structural degradation coefficient. When the aging coefficient exceeds a threshold, battery aging is determined and the charging cut-off current is adjusted. This achieves multi-parameter fusion identification of battery aging status, ensuring that the charging strategy adapts to the characteristics of aging batteries in a timely manner and avoiding the risk of overcharging.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of maintaining the battery voltage in constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: real-time acquisition of mains voltage waveform data, calculation of voltage fluctuation amplitude, frequency offset, and harmonic distortion rate within a preset time window; calculation of mains power quality score based on voltage fluctuation amplitude, frequency offset, and harmonic distortion rate; shortening the mains power outage confirmation time and mains power recovery confirmation time when the mains power quality score is higher than a preset good threshold, and extending the mains power outage confirmation time and mains power recovery confirmation time when the mains power quality score is lower than a preset degradation threshold; recording the time series data of the mains power quality score, and generating a power grid environment degradation early warning signal when a continuous downward trend in the mains power quality score is detected.
[0017] By adopting the above technical solution, a mains power quality score is calculated based on voltage fluctuation amplitude, frequency offset, and harmonic distortion rate, and the power outage and restoration confirmation time is dynamically adjusted accordingly. When the mains power quality is good, the confirmation time is shortened to improve response speed; when the quality is poor, the confirmation time is extended to avoid misjudgment. The power grid degradation early warning is achieved through the scoring time series, effectively reducing the interference of mains power fluctuations on the switching logic.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of stopping charging and discharging to the upper voltage threshold when the battery voltage is higher than the upper voltage threshold, the method further includes: during the float charging maintenance phase, superimposing multiple AC current signals of different frequencies with amplitudes less than a preset disturbance threshold onto the battery to be charged; measuring the phase difference and amplitude ratio between the battery voltage response signal and the current excitation signal at each frequency, calculating the battery impedance value corresponding to each frequency point based on the phase difference and amplitude ratio, and constructing a battery impedance spectrum curve based on the battery impedance value; extracting high-frequency impedance characteristic values, mid-frequency impedance characteristic values, and low-frequency impedance characteristic values from the battery impedance spectrum curve; when any characteristic value among the high-frequency impedance characteristic value, mid-frequency impedance characteristic value, and low-frequency impedance characteristic value deviates from a preset normal range, triggering a float charging voltage adjustment or active discharge-recharge activation operation in stages according to the degree of deviation.
[0019] By employing the above technical solution, multi-frequency micro AC signals are superimposed during the float charging stage, and the phase difference and amplitude ratio are measured to construct the battery impedance spectrum curve. High, medium, and low frequency impedance characteristic values are extracted, and voltage adjustment or activation operations are triggered in stages when the characteristic values deviate from the normal range. This achieves in-depth diagnosis based on electrochemical impedance spectroscopy, enabling the identification and timely intervention of potential problems such as internal passivation during the float charging stage.
[0020] In a second aspect, embodiments of this application provide a charging protection control system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the charging protection control system to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a charging protection control system, cause the charging protection control system to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a charging protection control system, cause the charging protection control system to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the charging protection control system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0025] 1. This application accurately determines the current temperature range by loading a temperature-voltage characteristic curve containing multiple temperature ranges and upper and lower voltage thresholds for each range according to the battery type. After real-time acquisition of battery temperature and voltage, the current temperature range is accurately determined. When the voltage is below the lower threshold, it charges in constant current mode to the lower limit and then switches to constant voltage mode. When the voltage is above the upper threshold, charging stops and discharges to the upper limit. When the voltage is within the threshold range, it maintains constant voltage mode. This achieves dynamic charging control with temperature and voltage dual parameters linked. It effectively solves the problem in the prior art that fixed charging thresholds cannot adapt to the battery characteristics under different temperature environments, leading to thermal runaway due to overcharging at high temperatures and low capacity utilization due to undercharging at low temperatures. Thus, it achieves precise control of battery charging across the entire temperature range, significantly extending battery life and improving charging efficiency and emergency power supply reliability.
[0026] 2. This application extracts the new target voltage range and calculates the voltage difference with the current range when the temperature changes across temperature ranges. Based on the difference and a preset transition time, it calculates and adjusts the slope, and implements a gradual transition of the charging voltage from the current range to the new range according to the slope. This allows the internal electrochemical reaction of the battery sufficient time to adapt to the new parameters, avoiding the mechanical stress impact on the plates caused by sudden voltage changes and the uneven reaction caused by sudden changes in electrolyte concentration gradient. It effectively solves the problem in the prior art where the linear temperature compensation mechanism has a lag response when the temperature changes across temperature ranges, resulting in the voltage deviating from the optimal value during the transition phase, causing a decrease in charging efficiency or even triggering protection interruption. In this way, it achieves smooth and continuous adjustment of charging parameters when switching temperature ranges, eliminates the negative impact of voltage fluctuations during switching on battery performance, and improves the system's adaptability to drastic changes in ambient temperature.
[0027] 3. This application periodically detects the battery capacity decay rate and adjusts the lower and upper voltage thresholds for each temperature range accordingly. This allows the charging parameters to dynamically follow changes in battery performance. As the battery ages, leading to electrode material degradation, changes in electrolyte composition, and increased internal resistance, the system promptly adjusts the charging voltage thresholds to match the actual charging acceptance capacity of the aged battery. For example, when the decay reaches a certain level, the upper voltage limit is lowered to avoid overcharging, or the lower voltage limit is adjusted to adapt to the charging characteristics after the internal resistance increases. This effectively solves the problem in existing technologies where fixed charging parameter settings cause the original parameters to become incompatible after battery aging, and continued use will accelerate performance degradation or even cause safety risks. Thus, it achieves continuous effectiveness of charging control throughout the battery's entire life cycle, slows down the rate of performance degradation, maximizes service life, and reduces replacement frequency and maintenance costs. Attached Figure Description
[0028] Figure 1This is a flowchart illustrating a UPS battery adaptive charging protection control method based on dynamic threshold switching in an embodiment of this application.
[0029] Figure 2 This is another flowchart illustrating the UPS battery adaptive charging protection control method based on dynamic threshold switching in the embodiments of this application;
[0030] Figure 3 This is a schematic diagram of the physical device structure of a charging protection control system in the embodiments of this application. Detailed Implementation
[0031] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0033] To facilitate understanding, the application scenarios of the embodiments of this application are described below.
[0034] UPS (Uninterruptible Power Supply) systems are widely used in scenarios with extremely high requirements for power continuity, such as data centers, communication base stations, medical equipment, and industrial control. The core function of a UPS is to provide a stable power supply to the load and charge the battery when the mains power is normal, and to maintain power to the load by discharging the battery when the mains power fails, ensuring that critical equipment does not shut down due to power interruption. As the energy storage core of the UPS, the charging state of the battery directly determines the reliability and duration of emergency power supply.
[0035] The electrochemical characteristics of batteries are significantly sensitive to temperature. At high temperatures, the ionic activity of the electrolyte inside the battery increases, the electrochemical reaction rate accelerates, and the charge acceptance capacity improves. However, this also easily leads to overcharging. Overcharging causes the electrolyte to decompose and produce gas, resulting in increased internal battery pressure, electrolyte loss, and accelerated plate corrosion. In severe cases, it can lead to thermal runaway or even explosion. At low temperatures, the electrolyte viscosity increases, the ion migration rate decreases, the battery's internal resistance increases significantly, and the charge acceptance capacity decreases. If charging is still performed according to room temperature parameters, problems such as insufficient charging current entering the battery, prolonged charging time, and incomplete full charging will occur, affecting the battery's emergency discharge capability.
[0036] Traditional UPS charging control schemes often employ a constant voltage and constant current charging mode combined with temperature compensation technology. This scheme pre-sets fixed charging voltage and current values. After detecting the battery temperature using a temperature sensor, it linearly corrects the charging voltage according to a preset temperature compensation coefficient (e.g., reducing the charging voltage by 3mV / cell for every 1°C increase). The charging process consists of two stages: the first stage uses a constant current for charging; once the battery voltage rises to a preset conversion voltage, the second stage begins, using a constant voltage for charging until the charging current drops to a cutoff value.
[0037] While this linear temperature compensation mechanism can provide basic parameter adjustments during slow temperature changes, it has significant limitations. When the ambient temperature undergoes drastic changes across temperature ranges (e.g., an outdoor base station rapidly heats up from a low nighttime temperature of -10°C to a high daytime temperature of 40°C, or a data center air conditioning malfunction causes the server room temperature to jump from 25°C to 45°C), the linear compensation response is slow and cannot promptly adjust the charging parameters to the optimal values for the new temperature range. During the transition phase of a sudden temperature change, the charging voltage may deviate from the battery's optimal acceptable range at the current temperature: excessive charging voltage at high temperatures leads to overcharging risks, while insufficient charging voltage at low temperatures leads to undercharging. Furthermore, the fixed threshold charging scheme does not consider battery aging factors. After long-term use, the battery's capacity decays, internal resistance increases, and charging characteristics change, but the charging parameters remain at the factory settings. This results in aging batteries not receiving appropriate charging protection, accelerating performance degradation and even causing safety hazards.
[0038] To facilitate understanding, the method provided in this implementation will be described in detail below, using the above scenario as an example. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a UPS battery adaptive charging protection control method based on dynamic threshold switching in an embodiment of this application.
[0039] S101. Obtain the battery type identifier of the battery to be charged, and load the corresponding temperature-voltage characteristic curve according to the battery type identifier. The temperature-voltage characteristic curve includes multiple temperature ranges and the target voltage range corresponding to each temperature range. The target voltage range includes a lower voltage threshold and an upper voltage threshold.
[0040] The battery type identifier indicates the specific model and chemical system of the battery to be recharged, such as lead-acid batteries and lithium-ion batteries. The temperature-voltage characteristic curve refers to a pre-established data set relating temperature to charging voltage, dividing the battery's operating temperature range into several intervals, each corresponding to a set of target voltage ranges. The lower voltage threshold represents the lowest allowable charging sustaining voltage within that temperature range, while the upper voltage threshold represents the highest allowable charging voltage.
[0041] Specifically, the charging protection control system obtains the battery type identifier through a communication interface or configuration interface, and loads the corresponding temperature-voltage characteristic curve from a pre-stored database based on the identifier. This curve includes multiple temperature range divisions, such as a low temperature range of -20℃ to 0℃, a normal temperature range of 0℃ to 35℃, and a high temperature range of 35℃ to 60℃. Each range corresponds to a lower voltage threshold and an upper voltage threshold. The system stores the loaded curve in its working memory as a reference for subsequent control.
[0042] In some embodiments, the loading of characteristic curves can be achieved in multiple ways. Optionally, the system receives the battery model code input by the user, retrieves the corresponding curve file from the local database, loads it into the controller memory, and verifies data integrity. Optionally, the system automatically reads the type identifier in the battery EEPROM through the battery management system, queries and downloads the latest characteristic curve data from the cloud database, and synchronizes it to the local cache. It is understood that methods such as image recognition scanning of battery tags or measuring initial parameters to infer the battery type can also be used, and this is not limited here.
[0043] S102. Real-time acquisition of battery temperature and battery voltage of the battery to be charged, and determination of the current temperature range and corresponding current target voltage range based on the battery temperature in the temperature-voltage characteristic curve.
[0044] Here, battery temperature refers to the current operating temperature of the battery to be charged, obtained through measurement by a temperature sensor. Battery voltage refers to the real-time terminal voltage across the battery, obtained through voltage acquisition circuitry. Current temperature range refers to the temperature range matched to the characteristic curve based on the real-time temperature. Current target voltage range refers to the lower and upper voltage thresholds corresponding to the current temperature range.
[0045] Specifically, the system collects battery temperature and voltage in real time using temperature sensors and voltage acquisition circuits. The collected temperature is compared with the temperature range boundaries in the characteristic curve to determine the current temperature range. For example, a temperature of 25℃ is determined to fall within the normal temperature range of 0℃ to 35℃. Then, the corresponding lower and upper voltage thresholds for this range are extracted from the curve as the basis for subsequent charging control decisions.
[0046] In some embodiments, data acquisition and interval determination can be achieved in multiple ways. Optionally, the system is configured with a timed task to read sensor signals via an analog-to-digital converter at 1-second intervals, convert them into digital quantities, and compare them one by one with the interval boundaries of the characteristic curve to determine the interval and extract the target voltage parameter. Optionally, the system adopts an interrupt-driven approach, triggering an interrupt when the temperature or voltage change exceeds a threshold, and quickly retrieving the target voltage range corresponding to the current interval through a lookup table. It is understood that moving average filtering to improve anti-interference capability or binary search to accelerate interval positioning can also be used, etc., and are not limited here.
[0047] S103. When the battery voltage is lower than the lower voltage threshold, charge in constant current mode until the battery voltage reaches the lower voltage threshold, then switch to constant voltage mode to maintain the voltage.
[0048] In this mode, constant current means the charger charges the battery with a constant current, which remains at a preset value. Constant voltage means the charger charges with a constant voltage, which remains at a preset value while the current automatically adjusts according to the battery's internal resistance. The lower voltage threshold is the lowest boundary of the target voltage range within the current temperature range; below this value, the battery needs charging.
[0049] Specifically, when the battery voltage is lower than the lower voltage threshold, the system determines that the battery is undervoltage and needs charging, and switches to constant current mode to charge according to the preset current. The battery voltage is continuously monitored, and when the voltage rises to the lower voltage threshold, it switches from constant current mode to constant voltage mode, sets the output voltage to the lower voltage threshold to maintain the output, and the charging current gradually decreases as the battery internal resistance decreases.
[0050] In some embodiments, mode switching can be implemented in several ways. Optionally, the system samples the battery voltage at 100-millisecond intervals, and triggers switching when three consecutive sampled values are greater than or equal to the lower voltage threshold, adjusting the PWM duty cycle to switch from current closed-loop to voltage closed-loop. Optionally, the system adopts a state machine architecture, defining constant current and constant voltage states, and when the voltage reaches the switching condition, the state machine jumps and sends a mode switching command to the control circuit. It is understood that fuzzy control can also be used to achieve a smooth transition or a voltage window can be set to avoid jitter, etc., which are not limited here.
[0051] S104. When the battery voltage is higher than the upper voltage threshold, stop charging and discharge to the upper voltage threshold.
[0052] The upper voltage threshold is the highest boundary of the target voltage range within the current temperature range; exceeding this value indicates battery overvoltage. Discharging refers to the process of releasing battery energy through the load circuit or discharge resistor, causing the voltage to decrease. Stopping charging means cutting off the charger's current output to the battery.
[0053] Specifically, when the battery voltage exceeds the upper voltage threshold, the system determines that there is a safety risk due to battery overvoltage and immediately cuts off the charger output to stop charging. Then, it initiates discharge control, connecting a preset discharge load to allow the battery to discharge with a controlled small current. The system continuously monitors the battery voltage drop, and when the voltage falls to the upper voltage threshold, it disconnects the discharge load and stops discharging.
[0054] In some embodiments, overvoltage protection and discharge can be implemented in various ways. Optionally, the system is configured with a voltage comparator that outputs a high level to trigger an interrupt when the voltage exceeds the limit. The interrupt routine shuts down the charging power switch and controls a relay to connect the discharge resistor. The voltage is periodically sampled and monitored until it drops to a threshold, at which point the relay is disconnected. Optionally, the system polls the voltage at a 50-millisecond cycle. When an over-limit is detected, the charging module is put into standby mode, and the electronic load is controlled to discharge in constant current mode via a PWM signal. The discharge current is dynamically adjusted according to the voltage drop rate. It is understood that a graded discharge strategy or a voltage prediction algorithm can also be used to reduce the charging current in advance; this is not limited here.
[0055] S105. When the battery voltage is between the lower voltage threshold and the upper voltage threshold, the battery voltage is maintained in constant voltage mode.
[0056] Specifically, a voltage between the lower and upper voltage thresholds indicates that the battery is in a normal voltage state within that temperature range. Constant voltage mode maintenance means the charger maintains a stable battery voltage with a constant output voltage, while the charging current is automatically adjusted based on the battery's state to compensate for self-discharge.
[0057] Specifically, when the battery voltage is within the target voltage range, the system determines that the voltage is reasonable and no charging or discharging is required. The system switches to constant voltage mode, sets the output voltage to the current battery voltage value, and maintains the output through voltage closed-loop control. The charger automatically provides compensation current based on the battery's self-discharge status and continuously monitors the battery voltage and temperature to ensure that the voltage is maintained within the target range.
[0058] In some embodiments, voltage maintenance control can be implemented in various ways. Optionally, the system employs a PID algorithm to achieve voltage closed-loop control, using the current battery voltage as the setpoint and the real-time sampled voltage as the feedback value. After calculating the deviation, the control quantity is obtained through PID calculation to adjust the PWM duty cycle. Optionally, the system sets a ±10mV dead zone window centered on the current voltage, initiating adjustment only when the voltage deviates from the dead zone, and using a hysteresis comparator to avoid control oscillation. It is understood that adaptive control to dynamically adjust parameters or feedforward compensation to predict load changes can also be used, and this is not limited here.
[0059] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the UPS battery adaptive charging protection control method based on dynamic threshold switching in this application embodiment.
[0060] S201. When the battery voltage is between the lower voltage threshold and the upper voltage threshold, the battery voltage is maintained in constant voltage mode.
[0061] The lower and upper voltage thresholds define the boundaries of the target voltage range for the current temperature range. A battery voltage between these thresholds indicates that the battery is in a normal voltage state within that temperature range. Constant voltage mode maintenance means the charger maintains a stable battery voltage output, with the charging current automatically adjusted based on the battery status to compensate for self-discharge. When the battery voltage is within the target voltage range, the system determines the voltage is reasonable and requires no further charging or discharging. It then switches to constant voltage mode, setting the output voltage to the current battery voltage value. Voltage closed-loop control maintains the output, and the charger automatically provides compensation current based on battery self-discharge. Continuous monitoring of battery voltage and temperature ensures the voltage remains within the target range.
[0062] S202. When the battery temperature changes from the current temperature range to a new temperature range, extract the new target voltage range corresponding to the new temperature range and calculate the voltage difference between the new target voltage range and the current target voltage range.
[0063] Here, the new temperature range refers to the new temperature range matched on the temperature-voltage characteristic curve after a change in battery temperature. The new target voltage range refers to the voltage range formed by the lower and upper voltage thresholds corresponding to the new temperature range. The voltage difference refers to the numerical difference between the new target voltage range and the current target voltage range, used to calculate the voltage adjustment magnitude.
[0064] The system monitors battery temperature changes in real time. When the battery temperature shifts from the current temperature range to a new temperature range, it searches the temperature-voltage characteristic curve for the corresponding new temperature range and extracts the new target voltage range parameters for that range. For example, if the battery temperature rises from the ambient temperature range of 25°C to the high-temperature range of 40°C, the system extracts the new lower voltage threshold of 13.2V and the new upper voltage threshold of 13.5V for the high-temperature range. The system then calculates the voltage difference: subtracting the current lower voltage threshold from the new lower voltage threshold yields the lower limit difference, and subtracting the current upper voltage threshold from the new upper voltage threshold yields the upper limit difference. If the current ambient temperature range voltage is 13.5V to 13.8V and the high-temperature range voltage is 13.2V to 13.5V, then the lower limit difference is -0.3V and the upper limit difference is also -0.3V. This difference serves as the baseline data for subsequent voltage adjustments.
[0065] S203. Calculate the voltage adjustment slope based on the voltage difference and the preset transition time, and adjust the charging output voltage according to the voltage adjustment slope to transition from the current target voltage range to the new target voltage range.
[0066] The preset transition time refers to the time required for the voltage to transition from the current target voltage range to the new target voltage range when switching temperature ranges, and is used to control the speed of voltage adjustment. The voltage adjustment slope refers to the rate of change of the charging output voltage per unit time, indicating the speed of voltage adjustment. The charging output voltage refers to the real-time voltage value output by the charger to the battery.
[0067] The system calculates the voltage adjustment slope based on the voltage difference obtained in step S202 and the preset transition time. The calculation formula is: voltage adjustment slope equals voltage difference divided by preset transition time. For example, if the lower voltage limit difference is -0.3V and the preset transition time is 60 seconds, then the voltage adjustment slope is -0.3V divided by 60 seconds, which equals -0.005V / second. The system gradually adjusts the charging output voltage according to the calculated slope. In each control cycle, the output voltage is reduced by the product of the slope value and the control cycle. If the control cycle is 1 second, the output voltage is reduced by 0.005V per second. After 60 seconds, the charging output voltage smoothly transitions from the current target voltage range of 13.5V to the new target voltage range of 13.2V. During the transition process, the system continuously monitors the battery voltage and current to ensure a smooth voltage adjustment process without sudden changes, avoiding impact on the battery due to sudden voltage fluctuations.
[0068] S204. After each preset number of charge-discharge cycles, detect the battery capacity decay rate of the battery to be charged, and correct the lower voltage threshold and upper voltage threshold corresponding to each temperature range in the temperature-voltage characteristic curve according to the battery capacity decay rate.
[0069] The preset number of cycles refers to the threshold number of charge-discharge cycles required to trigger battery capacity detection, such as 50 or 100 cycles. Battery capacity degradation rate refers to the percentage decrease in the battery's current actual capacity relative to its rated capacity, used to assess the degree of battery aging. Correction refers to adjusting the voltage threshold parameter in the temperature-voltage characteristic curve according to the battery's aging state, so that the charging control is adapted to the battery's current performance.
[0070] The system records the number of charge-discharge cycles of the battery. After each preset number of cycles, the battery capacity detection process is initiated. Capacity detection involves performing a complete charge-discharge test on the battery, measuring the amount of electricity released from a fully charged state to the cutoff voltage. The ratio of this amount of electricity to the battery's rated capacity is the current capacity retention rate. The capacity decay rate is equal to 1 minus the capacity retention rate. For example, if a battery with a rated capacity of 100Ah has a measured discharge capacity of 85Ah, then the capacity retention rate is 85%, and the capacity decay rate is 15%. The system corrects the temperature-voltage characteristic curve based on the capacity decay rate. The correction method involves multiplying the lower and upper voltage thresholds for each temperature range by a correction coefficient. The correction coefficient is equal to 1 minus the capacity decay rate multiplied by a preset correction factor. If the correction factor is set to 0.2, then the correction coefficient is 1 minus 15% multiplied by 0.2, which equals 0.97. The original voltage threshold is multiplied by 0.97 to obtain the corrected threshold, and the characteristic curve data is updated.
[0071] S205. Record the load power data at each time node within the preset time period, and establish a load power time series based on the load power data.
[0072] In this step, the preset time period is defined as the time span for load power monitoring, which can be set to 24 hours or 7 days, etc. The time node is defined as the discrete sampling time set within the time period, which can be set at 5-minute intervals. Load power data is defined as the actual power value output by the UPS system to the load device at each sampling time. The load power time series is defined as a dataset formed by organizing the collected load power data in the order of sampling time; this dataset reflects the time-varying characteristics of the load.
[0073] The system continuously collects UPS output load power at preset sampling intervals. The sampling interval length is determined based on the time period setting and the required analysis accuracy. For example, when the time period is set to 24 hours and the sampling interval is set to 5 minutes, 288 power samples can be obtained in a single period. The system writes each collected power value along with the sampling time marker into the database, forming a correlation between sampling time and power value. All correlation data is sorted from earliest to latest sampling time to obtain the load power time series, expressed in the form {(time 1, power value 1), (time 2, power value 2), ..., (time n, power value n)}, where time i represents the time of the i-th sampling and power value i represents the power value obtained in the i-th sampling. Taking a data center UPS as an example, a power of 50kW is collected at 0:00, and a power of 52kW is collected at 0:05. This data is continuously collected and sorted in this manner to obtain complete time series data, which provides the data foundation for subsequent load pattern analysis.
[0074] S206. Analyze the load power time series to obtain the periodic load fluctuation pattern, and extract the peak and trough periods of the load fluctuation pattern.
[0075] Periodic load fluctuations refer to the repetitive patterns of load power changes over time, such as high power during the day and low power at night on weekdays. Peak load periods are those when load power is significantly higher than the average level. Off-peak load periods are those when load power is significantly lower than the average level.
[0076] The system performs periodic analysis on the load power time series, using Fast Fourier Transform or Autocorrelation Function to identify periodic components in the data and determine the length of the main period. For example, analysis of 7 days of data reveals the strongest periodicity over 24 hours, indicating that the load exhibits daily periodic fluctuations. The system calculates the moving average of the time series as a baseline power level and compares the actual power with the baseline power. When the actual power is consistently higher than the baseline power by a certain percentage (e.g., 20%), it is marked as a peak period; when it is consistently lower than the baseline power by a certain percentage, it is marked as a low period. For example, 24-hour load data for a UPS in an office building shows that the power remains above 80kW from 8:00 to 18:00, which is a peak period; and the power drops below 30kW from 0:00 to 6:00, which is a low period. The system extracts the start and end times of the peak and low periods to construct a load fluctuation pattern model, which is used to guide the dynamic adjustment of charging strategies.
[0077] S207. Increase the upper limit of charging current during periods of low load and reduce the charging current within a preset lead time before the arrival of peak load periods.
[0078] The charging current limit refers to the maximum charging current value allowed by the charger, which limits the charging rate to prevent battery overheating. Off-peak load periods refer to times when the system load power is low, during which the UPS output power demand is small. Peak load periods refer to times when the system load power is high, during which the UPS output power demand is large. The preset lead time refers to the length of time before the peak load arrives, allowing time for battery discharge preparation.
[0079] Based on the load fluctuation pattern extracted in step S206, the system increases the upper limit of the charging current during off-peak periods to accelerate battery charging. Specifically, the upper limit of the charging current is increased by a certain percentage from the standard value, for example, from 0.2C to 0.3C, to quickly replenish battery power during periods of low load demand. The charging current is reduced within a preset lead time before the peak load period arrives. For example, if the peak period starts at 8:00 AM and the preset lead time is 30 minutes, the system will gradually reduce the charging current to a lower value, such as 0.1C, or even stop charging at 7:30 AM. The purpose of reducing the charging current is to reduce the charger's power demand on the mains, reserving sufficient power margin for peak load periods and avoiding mains overload caused by competition between charging and load power supply. For example, a data center UPS increases the upper limit of the charging current to 30A during the off-peak period from 2:00 AM to 6:00 AM, reduces the charging current to 10A at 7:30 AM, and stops charging at 8:00 AM to focus on powering the load.
[0080] S208. When the real-time load power deviates from the periodic load fluctuation pattern by more than a preset deviation threshold, a load abnormality alarm signal is generated.
[0081] Here, real-time load power refers to the actual power output of the UPS to the load at the current moment. Periodic load fluctuation pattern refers to the load power change pattern obtained from step S206, including the expected load power value. Preset deviation threshold refers to the maximum allowable deviation range between the real-time load power and the expected load power; exceeding this range is considered abnormal. Load anomaly alarm signal refers to the alarm information generated when the system detects a load anomaly, used to notify management personnel.
[0082] The system continuously collects real-time load power and compares it with the expected load power at the corresponding moment in the periodic load fluctuation pattern to calculate the deviation value. The deviation value is calculated by subtracting the expected load power from the real-time load power, taking the absolute value, and comparing it with a preset deviation threshold. For example, if the periodic pattern shows that the expected load power at 10:00 on a certain workday is 75kW, and the preset deviation threshold is 20kW, when the actual load power collected at 10:00 is 100kW, the deviation value is 25kW, exceeding the threshold. The system determines that the load is abnormal and generates an alarm signal containing information such as the abnormal time, real-time power value, expected power value, and deviation magnitude, which is pushed to the management personnel via SMS, email, or monitoring platform. After the alarm is triggered, the system records the abnormal event and continuously monitors subsequent load changes. If the deviation continues to exceed the limit, the alarm level is escalated; if the load returns to normal, the alarm status is automatically deactivated.
[0083] S209. During the constant voltage charging stage, collect charging current, battery voltage and battery temperature data.
[0084] The constant-voltage charging stage refers to the phase where the charger charges the battery with a constant voltage output. During this stage, the voltage remains constant while the charging current gradually decreases as the battery's internal resistance decreases. The charging current is the real-time current output by the charger to the battery, reflecting the rate at which the battery receives electrical energy. The battery voltage is the real-time terminal voltage across the battery, reflecting the battery's state of charge. The battery temperature is the operating temperature of the battery itself, reflecting the thermal effects during charging.
[0085] During the constant-voltage charging phase, the system initiates data acquisition. It acquires the charging current of the charging circuit using a current sensor, measures the battery terminal voltage using a voltage acquisition circuit, and measures the surface or internal temperature of the battery using a temperature sensor. Data acquisition is performed at fixed intervals, such as once per second. The acquired data includes four fields: timestamp, current value, voltage value, and temperature value. For example, a single acquisition record might show time 10:05:30, current 8.5A, voltage 13.65V, and temperature 32.8℃. The system stores the acquired data in a buffer, forming a time-series dataset of the charging process. This dataset contains the trajectory of current, voltage, and temperature changes throughout the charging process, serving as the raw data source for subsequent aging analysis.
[0086] S210. Calculate the temperature rise rate during the charging process and compare it with the temperature rise rate of historical normal charging to obtain the temperature rise anomaly coefficient.
[0087] The temperature rise rate refers to the increase in battery temperature per unit time, representing the rate at which the battery heats up during charging. The historical normal charging temperature rise rate refers to the typical temperature rise rate data when the battery is charging in a healthy state, serving as a benchmark for judging anomalies. The temperature rise anomaly coefficient refers to the degree of deviation between the current temperature rise rate and the historical normal temperature rise rate, used to quantify abnormal battery heating conditions.
[0088] The system extracts temperature change information from the temperature data collected in step S209 and calculates the temperature rise rate. The calculation method involves selecting the temperature data sequence during the constant-voltage charging phase, calculating the difference between temperature values at adjacent time points, dividing by the time interval to obtain the instantaneous temperature rise rate at each moment, and averaging all instantaneous temperature rise rates to obtain the average temperature rise rate. For example, if the constant-voltage phase lasts 30 minutes, with an initial temperature of 30℃ and an ending temperature of 36℃, the average temperature rise rate is 6℃ divided by 30 minutes, which equals 0.2℃ / minute. The system reads the baseline average temperature rise rate during normal charging of the battery from the database; for example, the baseline value is 0.15℃ / minute. The temperature rise anomaly coefficient is calculated by dividing the current average temperature rise rate by the historical baseline temperature rise rate; for example, 0.2 divided by 0.15 equals 1.33. A coefficient greater than 1 indicates increased battery heating, while a coefficient less than 1 indicates decreased heating. The degree to which the coefficient deviates from 1 reflects the severity of the anomaly.
[0089] S211. Calculate the response time of the battery voltage after the charging current is applied, and compare it with the voltage response time of historical normal charging to obtain the response delay coefficient.
[0090] Voltage response time refers to the time required for the battery voltage to rise from its initial value to a stable value after a charging current is applied, reflecting the electrochemical response speed within the battery. Historical normal charging voltage response time refers to typical voltage response time data of the battery in a healthy state, serving as a benchmark for judging sluggish response. The response delay coefficient refers to the degree of deviation between the current voltage response time and the historical normal response time, used to quantify the degradation of battery response characteristics.
[0091] The system analyzes the voltage and current data collected in step S209, identifies the instant the charging current is applied and the moment the voltage stabilizes, and calculates the time difference between the two as the voltage response time. Specifically, the identification method involves detecting abrupt changes in the current sequence as the charging current application moment, performing a sliding window analysis on the voltage sequence, and determining that the voltage has reached a stable state when the voltage change rate at several consecutive sampling points is below a set threshold (e.g., 0.01V / second), recording the stabilization moment. The voltage response time equals the stabilization moment minus the current application moment. For example, if the current jumps from 0 to 10A at 10:00:00 and the voltage stabilizes at 10:00:05, the voltage response time is 5 seconds. The system reads the historical response time baseline value during normal charging, for example, a baseline value of 3 seconds. The response delay coefficient is calculated by dividing the current voltage response time by the historical baseline response time; for example, 5 divided by 3 equals 1.67. A coefficient greater than 1 indicates a slower battery response, reflecting performance degradation caused by increased internal resistance or decay of active materials.
[0092] S212. Calculate the peak position of the voltage-charge differential curve and compare it with the peak position of historical normal charging to obtain the structural degradation coefficient.
[0093] The voltage-charge differential curve refers to the differential function curve of battery voltage with respect to the charged capacity. The peak value of this curve corresponds to a characteristic point of phase transition or structural change within the battery. Specifically, the peak value of the voltage-charge differential curve corresponds to the phase transition point of the electrode material, and its positional deviation directly reflects the loss of active material or the degree of structural degradation. The peak position refers to the charged capacity or state of charge value corresponding to the occurrence of the peak value in the differential curve, reflecting the structural characteristics of the battery's internal materials. The peak position during historical normal charging refers to the typical position data of the peak value of the differential curve when the battery is in a healthy state, serving as a benchmark for judging structural changes. The structural degradation coefficient refers to the degree of deviation between the current peak position and the historical normal peak position, used to quantify the degradation of the battery's internal structure.
[0094] The system calculates the charging capacity based on the voltage and current data collected in step S209. The charging capacity is equal to the integral of the charging current over time. Numerical differentiation is performed on the voltage-capacity data sequence to obtain the dV / dQ sequence, i.e., the voltage-capacity differential curve. The differentiation is calculated by dividing the voltage difference between adjacent data points by the capacity difference. For example, if the voltage increases from 13.5V to 13.52V when the capacity increases from 10Ah to 10.1Ah, the differential value at that point is 0.02V divided by 0.1Ah, which equals 0.2V / Ah. The system searches for peak points in the differential curve. The peak point corresponds to the maximum value of the differential value, and the charging capacity value corresponding to that peak point is recorded. For example, the differential curve shows a peak of 0.8V / Ah at a charging capacity of 85Ah. The system reads the historical peak position reference value during normal charging, for example, a reference value of 90Ah. The formula for calculating the structural degradation coefficient is to subtract the current peak position from the historical reference peak position, take the absolute value, and then divide it by the historical reference peak position. For example, |90-85| divided by 90 equals 0.056. The larger the coefficient, the more serious the peak position shift, reflecting changes in the distribution of battery active materials or degradation of the electrode structure.
[0095] S213. The temperature rise anomaly coefficient, response delay coefficient and structural degradation coefficient are weighted and summed to obtain the aging coefficient. When the aging coefficient exceeds the preset aging threshold, the battery is determined to have entered the aging state, and the charging cut-off current threshold is adjusted according to the aging coefficient.
[0096] Weighted summation refers to a calculation method that multiplies multiple coefficients by their corresponding weighting coefficients and then sums them to obtain a comprehensive index. The aging coefficient is a dimensionless index that comprehensively reflects the degree of battery aging, calculated by weighting the temperature rise anomaly coefficient, response delay coefficient, and structural degradation coefficient. The preset aging threshold is the critical value of the aging coefficient used to determine if a battery has entered an aging state; exceeding this value indicates significant performance degradation. The charging cut-off current threshold is the critical current value used to determine the end of charging during the constant voltage charging phase; charging stops when the charging current drops below this value.
[0097] The system performs a weighted summation of the three coefficients calculated in steps S210 to S212. The formula is: Aging coefficient = Temperature rise anomaly coefficient multiplied by weight w1 + Response delay coefficient multiplied by weight w2 + Structural degradation coefficient multiplied by weight w3. The weight coefficients are determined based on the importance of each indicator to the aging determination, and the sum of the three weights is 1. For example, if w1 is 0.3, w2 is 0.4, w3 is 0.3, the temperature rise anomaly coefficient is 1.33, the response delay coefficient is 1.67, and the structural degradation coefficient is 0.056, then the aging coefficient is 1.33 multiplied by 0.3 + 1.67 multiplied by 0.4 + 0.056 multiplied by 0.3, which equals 1.084. The system compares the calculated aging coefficient with a preset aging threshold, for example, a threshold of 1.2. If the aging coefficient does not exceed the threshold, the battery is determined to be in a normal state, and the original charging cutoff current threshold, such as 0.05C, is maintained. If the aging coefficient exceeds the threshold, the battery is determined to be in an aging state. The charging cut-off current threshold is adjusted by multiplying the original threshold by the reciprocal of the aging coefficient. For example, 0.05C multiplied by 1 and divided by 1.084 equals 0.046C. The cut-off current threshold is lowered to extend the charging time and ensure that the aging battery is fully charged. At the same time, the system records the aging determination result and generates a maintenance prompt signal.
[0098] In some embodiments, the following steps may be included after step S201:
[0099] Real-time acquisition of mains voltage waveform data, and calculation of voltage fluctuation amplitude, frequency offset and harmonic distortion rate within a preset time window.
[0100] The mains voltage waveform data refers to the continuous waveform information of voltage changes over time on the mains power supply line, including time-domain data of voltage amplitude and phase. The preset time window refers to the length of the data acquisition period used for voltage quality analysis, such as 1 minute or 5 minutes. Voltage fluctuation amplitude refers to the difference between the peak and trough values of the voltage within the time window, reflecting voltage stability. Frequency offset refers to the deviation between the actual grid frequency and the nominal frequency (e.g., 50Hz or 60Hz), reflecting grid frequency stability. Harmonic distortion rate refers to the proportion of harmonic components in the voltage waveform relative to the fundamental frequency, reflecting the degree of distortion in the voltage waveform.
[0101] The system samples the mains voltage in real time using a high-speed analog-to-digital converter. The sampling frequency must satisfy the Nyquist theorem; for example, a sampling rate of at least 10kHz is required for a 50Hz mains voltage to capture higher harmonics. Voltage data is continuously acquired within a preset time window, for example, 60 seconds at a 10kHz sampling rate yielding 600,000 data points. To calculate the voltage fluctuation amplitude, all sampling points within the time window are iterated to find the maximum and minimum values; the difference between the two is the fluctuation amplitude. For example, a maximum value of 325V and a minimum value of 310V result in a fluctuation amplitude of 15V. To calculate the frequency offset, the voltage waveform undergoes zero-crossing detection, and the number of zero-crossings per unit time is counted to calculate the actual frequency. The actual frequency is then subtracted from the nominal frequency of 50Hz to obtain the offset; for example, a measured frequency of 50.2Hz results in an offset of 0.2Hz. When calculating the harmonic distortion rate, the voltage waveform is subjected to a fast Fourier transform to obtain the spectrum, and the amplitude of the fundamental wave (50Hz) and the amplitude of each harmonic are extracted. The harmonic distortion rate is equal to the square root of the sum of the squares of all harmonic amplitudes divided by the fundamental wave amplitude. For example, if the fundamental wave amplitude is 220V, the total distortion of the 2nd to 50th harmonics is 3.3V, and the distortion rate is 3.3 divided by 220 equals 1.5%.
[0102] The mains power quality score is calculated based on voltage fluctuation amplitude, frequency offset, and harmonic distortion rate.
[0103] Among them, the mains power quality score is a dimensionless evaluation index that comprehensively reflects the quality of mains power supply; the higher the value, the better the power quality. Voltage fluctuation amplitude, frequency offset, and harmonic distortion rate are three key parameters affecting mains power quality, reflecting voltage stability, frequency stability, and waveform purity, respectively.
[0104] The system calculates the mains power quality score based on the collected voltage fluctuation amplitude, frequency offset, and harmonic distortion rate. The calculation method uses a weighted summation approach after scoring each parameter separately. First, the scores for the three parameters are normalized. The voltage fluctuation score is calculated as 100 minus the voltage fluctuation amplitude divided by the nominal voltage and then multiplied by the scoring coefficient k1. For example, with a fluctuation amplitude of 15V, a nominal voltage of 220V, and a coefficient k1 of 500, the score is 100 minus 15 divided by 220 multiplied by 500, equaling 96.6 points. The frequency offset score is calculated as 100 minus the absolute value of the frequency offset divided by the nominal frequency and then multiplied by the scoring coefficient k2. For example, with an offset of 0.2Hz, a nominal frequency of 50Hz, and a coefficient k2 of 1000, the score is 100 minus 0.2 divided by 50 multiplied by 1000, equaling 96 points. The harmonic distortion score is calculated by subtracting the harmonic distortion rate multiplied by the scoring coefficient k3 from 100. For example, with a distortion rate of 1.5% and a coefficient k3 of 200, the score is 100 minus 1.5 multiplied by 200, which equals 97 points. The mains power quality score is calculated by multiplying each of the three scores by its weight and then summing the results. For example, with each weight being 0.33, the total score is 96.6 multiplied by 0.33 plus 96 multiplied by 0.33 plus 97 multiplied by 0.33, which equals 96.5 points. This score serves as the basis for determining the mains power quality level.
[0105] When the mains power quality score is higher than the preset good threshold, the mains power outage confirmation time and mains power restoration confirmation time are shortened; when the mains power quality score is lower than the preset deterioration threshold, the mains power outage confirmation time and mains power restoration confirmation time are extended.
[0106] The preset "good" threshold is a critical score for determining good mains power quality; values above this threshold indicate stable and reliable grid supply. The preset "deterioration" threshold is a critical score for determining deteriorated mains power quality; values below this threshold indicate unstable grid supply. The mains power outage confirmation time is the delay between detecting a loss of mains voltage and confirming a true power outage, used to avoid misjudgments due to instantaneous fluctuations. The mains power restoration confirmation time is the delay between detecting a restoration of mains voltage and confirming a true restoration, used to avoid frequent switching triggered by unstable voltage.
[0107] The system compares the calculated mains power quality score with preset good and bad thresholds, and dynamically adjusts the confirmation time parameters based on the comparison results. When the mains power quality score is higher than the good threshold, for example, a score of 96.5 is higher than the good threshold of 95, the system determines that the mains power is stable and reliable, and shortens the mains power outage confirmation time and mains power restoration confirmation time. The shortening method is to multiply the original confirmation time by a shortening coefficient. For example, the original power outage confirmation time of 50 milliseconds and the shortening coefficient of 0.6 are adjusted to 30 milliseconds, and the original restoration confirmation time of 100 milliseconds is adjusted to 60 milliseconds. Shortening the confirmation time can speed up the UPS's response speed to changes in mains power status. When the mains power quality score is lower than the bad threshold, for example, a score of 88 is lower than the bad threshold of 90, the system determines that the mains power is unstable, and extends the confirmation time. The extension method involves multiplying the original confirmation time by an extension factor. For example, with an extension factor of 1.5, the power outage confirmation time is extended from 50 milliseconds to 75 milliseconds, and the recovery confirmation time is extended from 100 milliseconds to 150 milliseconds. Extending the confirmation time can reduce false switching caused by voltage fluctuations and prevent the UPS from frequently fluctuating between battery power and mains power.
[0108] Record time-series data of mains power quality scores, and generate early warning signals for power grid environmental degradation when a continuous downward trend in mains power quality scores is detected.
[0109] Time-series data refers to a set of mains power quality scores arranged chronologically, used to analyze the trends in score changes. A continuous downward trend refers to a decreasing pattern in the mains power quality score across multiple consecutive time points, indicating a gradual deterioration of the power grid environment. A power grid environment degradation early warning signal is an advance warning message generated when continuous deterioration of mains power quality is detected, used to notify management personnel to take preventative measures.
[0110] The system stores each calculated mains power quality score paired with a timestamp, forming a time-series dataset. For example, a score is recorded every 5 minutes, accumulating 288 data points over 24 hours. The system uses a sliding window method to analyze the score trend, setting the analysis window length to include, for example, the most recent 12 data points. Linear regression is performed on the data within the window to obtain the slope of the trend line. When the slope of the trend line is negative and its absolute value exceeds a preset threshold, it is determined to be a continuous downward trend. For example, if the score of the most recent 12 data points gradually decreases from 95 to 89, the linear regression slope is -0.5 points / sampling period, and the slope threshold is set to -0.3, satisfying the downward trend condition. The system further checks the duration of the decline. When the downward trend continues for more than a preset duration, such as 1 hour, a power grid environment degradation warning signal is generated. The warning signal includes information such as the current score, the rate of decline, and the expected deterioration time, and is sent to maintenance personnel via the monitoring interface, SMS, or email, prompting them to pay attention to the power grid condition and prepare countermeasures such as increasing the frequency of battery inspections or starting backup generators.
[0111] During the float charging maintenance phase, multiple AC current signals of different frequencies with amplitudes less than a preset disturbance threshold are superimposed onto the battery to be charged.
[0112] The float charge maintenance phase refers to the operational stage after the battery is fully charged, where a small current continuously replenishes the self-discharge loss. During this stage, the battery voltage stabilizes near the float charge voltage. The preset disturbance threshold refers to the upper limit of the amplitude of the superimposed AC current signal; this value must be sufficiently small to avoid affecting the normal operating state of the battery. Multiple AC current signals of different frequencies refer to a set of sinusoidal current signals containing multiple discrete frequency points, used to detect the battery's impedance characteristics at different frequencies.
[0113] During the float charging maintenance phase, the system applies an AC current signal to the battery for impedance testing. The superposition method involves adding an AC component to the DC float charging current. The AC current signal amplitude is set to a preset disturbance threshold; for example, with a battery capacity of 100Ah, the AC amplitude is set to 0.1A, which is less than 0.001C and will not significantly affect the battery state. The system generates multiple sinusoidal current signals of different frequencies, covering high, medium, and low frequencies, such as 0.01Hz, 0.1Hz, 1Hz, 10Hz, 100Hz, and 1000Hz (6 frequency points in total). Signal superposition is achieved through the charger's current control loop, adding the AC current command to the DC float charging current command. The charger's output current is the DC component superimposed with the AC component. The system applies the AC signal sequentially from low to high frequency, and the duration of each frequency point must be long enough for the battery response to reach a steady state. For example, the low frequency of 0.01Hz needs to last at least 100 seconds to complete several cycles, while the high frequency of 1000Hz only needs to last 1 second to complete multiple cycles.
[0114] The phase difference and amplitude ratio between the battery voltage response signal and the current excitation signal at each frequency are measured. The battery impedance value corresponding to each frequency point is calculated based on the phase difference and amplitude ratio, and the battery impedance spectrum curve is constructed based on the battery impedance value.
[0115] The battery voltage response signal refers to the AC component of the battery terminal voltage after applying an AC current, including amplitude and phase information. The current excitation signal refers to the AC current signal with a known frequency and amplitude applied to the system. The phase difference is the phase angle difference between the voltage response signal and the current excitation signal, reflecting the capacitive or inductive reactance characteristics of the battery impedance. The amplitude ratio is the ratio of the voltage response signal amplitude to the current excitation signal amplitude, reflecting the magnitude of the battery impedance. The battery impedance value is the complex impedance calculated based on the phase difference and amplitude ratio, including both real and imaginary parts. The battery impedance spectrum curve is a graphical representation of the battery impedance value as a function of frequency, used to analyze the internal characteristics of the battery.
[0116] The system simultaneously acquires battery voltage and current data when applying AC current signals at each frequency. The sampling frequency needs to be much higher than the excitation frequency to accurately capture the waveforms. Signal processing is performed on the acquired voltage and current waveforms to extract the AC components and filter out DC components and noise. Fast Fourier Transform (FFT) or lock-in amplification (LCA) techniques are used to extract the voltage amplitude and phase, and the current amplitude and phase at the excitation frequency. The phase difference is calculated as the voltage phase minus the current phase; for example, at a certain frequency, if the voltage phase is 45 degrees and the current phase is 10 degrees, the phase difference is 35 degrees. The amplitude ratio is calculated as the voltage amplitude divided by the current amplitude; for example, if the voltage amplitude is 0.05V and the current amplitude is 0.1A, the amplitude ratio is 0.5 ohms. The magnitude of the battery impedance is equal to the amplitude ratio, the impedance angle is equal to the phase difference, the real part of the impedance is equal to the magnitude multiplied by the cosine of the phase difference, and the imaginary part of the impedance is equal to the magnitude multiplied by the sine of the phase difference. For example, at a given frequency, the impedance is 0.5 multiplied by cos35 degrees plus j multiplied by 0.5 multiplied by sin35 degrees, which equals 0.41 plus j = 0.29 ohms. The system repeats the above calculations for all frequency points to obtain the impedance values corresponding to each frequency. A curve is plotted with frequency as the x-axis and impedance magnitude or the real / imaginary part of the impedance as the y-axis to construct the battery impedance spectrum curve, which presents as a Nyquist plot or a Bode plot.
[0117] Extract the high-frequency impedance characteristic values, mid-frequency impedance characteristic values, and low-frequency impedance characteristic values from the battery impedance spectrum curve.
[0118] High-frequency impedance characteristic values refer to the characteristic parameters of the impedance spectrum curve in the high-frequency region (e.g., 100Hz to 1000Hz), mainly reflecting the battery's internal ohmic resistance and interface contact resistance. Mid-frequency impedance characteristic values refer to the characteristic parameters of the impedance spectrum curve in the mid-frequency region (e.g., 1Hz to 100Hz), mainly reflecting the battery's charge transfer impedance and electrochemical reaction kinetics. Low-frequency impedance characteristic values refer to the characteristic parameters of the impedance spectrum curve in the low-frequency region (e.g., 0.01Hz to 1Hz), mainly reflecting the battery's diffusion impedance and capacity characteristics.
[0119] The system extracts features from the constructed impedance spectrum curve. First, the spectrum is divided into three frequency ranges: high-frequency, mid-frequency, and low-frequency. Feature values are extracted in the high-frequency range. The high-frequency impedance feature value is the real part of the impedance at the highest frequency point of the impedance spectrum curve. This value is approximately equal to the pure resistive component of the battery; for example, the real part of the impedance at 1000Hz is 0.02 ohms. Feature values are extracted in the mid-frequency range. The mid-frequency impedance feature value is the diameter of the semicircle in the impedance spectrum curve or the imaginary part of the impedance at the highest point. This value reflects the resistance to charge transfer; for example, the peak value of the imaginary part of the impedance at 10Hz is 0.15 ohms. Feature values are extracted in the low-frequency range. The low-frequency impedance feature value is the impedance magnitude at the low-frequency end of the impedance spectrum curve or the real part of the impedance at a 45-degree phase angle. This value is related to battery capacity and the diffusion process; for example, the impedance magnitude at 0.01Hz is 2.5 ohms. The system records three feature values to form a feature vector, for example, {0.02, 0.15, 2.5} ohms. This feature vector serves as a key indicator for assessing the battery's health status.
[0120] When any of the high-frequency impedance characteristic values, mid-frequency impedance characteristic values, and low-frequency impedance characteristic values deviates from the preset normal range, the float charge voltage adjustment or active discharge-recharge activation operation is triggered in stages according to the degree of deviation.
[0121] The preset normal range refers to the allowable variation range of each impedance characteristic value under healthy battery conditions; exceeding this range indicates abnormal battery performance. Deviation degree refers to the magnitude of the deviation between the measured characteristic value and the center value of the normal range, used to quantify the severity of the abnormality. Float charge voltage adjustment refers to the operation of fine-tuning the float charge voltage value according to the battery state to optimize maintenance effectiveness. Active discharge-recharge activation operation refers to the process of forcibly discharging the battery to a certain depth and then recharging it to restore battery activity.
[0122] The system compares the extracted high-frequency, mid-frequency, and low-frequency impedance characteristic values with preset normal ranges to determine if there are any deviations. For example, the normal range for high-frequency impedance is 0.015 to 0.025 ohms, and the measured value of 0.02 ohms is within the range; the normal range for mid-frequency impedance is 0.10 to 0.20 ohms, and the measured value of 0.15 ohms is within the range; the normal range for low-frequency impedance is 2.0 to 3.0 ohms, and the measured value of 2.5 ohms is within the range. If all three are normal, no operation is triggered. When any characteristic value deviates from the normal range, the degree of deviation is calculated as the measured value minus the center value of the range, the absolute value of the difference, and then divided by the range width. For example, if the measured high-frequency impedance is 0.035 ohms, the center value of the range is 0.02 ohms, and the width is 0.01 ohms, the degree of deviation is |0.035 - 0.02| divided by 0.01, which equals 1.5, or 150%. The system triggers operations in stages based on the degree of deviation. When the deviation is less than 100%, a mild adjustment is triggered, adjusting the float charge voltage by decreasing or increasing it by 0.05V to 0.1V. For example, high high-frequency impedance indicates increased internal resistance, and decreasing the float charge voltage reduces charging stress. When the deviation is greater than or equal to 100%, a severe treatment is triggered, performing an active discharge-recharge activation operation. The specific process involves discharging the battery to 50% capacity at a 0.1C current, allowing it to rest for 30 minutes, and then recharging it to 100% capacity. This process activates the active materials inside the battery and improves impedance characteristics.
[0123] The charging protection control system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 3 This is a schematic diagram of the physical device structure of a charging protection control system in an embodiment of this application.
[0124] It should be noted that, Figure 3 The structure of the charging protection control system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0125] like Figure 3 As shown, the charging protection control system includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 302 or programs loaded from storage section 308 into Random Access Memory (RAM) 303, such as executing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0126] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0127] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.
[0128] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0130] Specifically, the charging protection control system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the UPS battery adaptive charging protection control method based on dynamic threshold switching provided in the above embodiment.
[0131] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the charging protection control system described in the above embodiments; or it may exist independently and not incorporated into the charging protection control system. The storage medium carries one or more computer programs, which, when executed by a processor of the charging protection control system, cause the charging protection control system to implement the UPS battery adaptive charging protection control method based on dynamic threshold switching provided in the above embodiments.
[0132] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0133] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A UPS battery adaptive charging protection control method based on dynamic threshold switching, characterized in that, The method, applied to a charging protection control system, includes: Obtain the battery type identifier of the battery to be charged, and load the corresponding temperature-voltage characteristic curve according to the battery type identifier. The temperature-voltage characteristic curve includes multiple temperature ranges and target voltage ranges corresponding to each temperature range. The target voltage range includes a lower voltage threshold and a higher voltage threshold. The battery temperature and battery voltage of the battery to be charged are collected in real time, and the current temperature range and the corresponding current target voltage range are determined based on the battery temperature in the temperature-voltage characteristic curve. When the battery voltage is lower than the lower voltage threshold, it is charged in constant current mode until the battery voltage reaches the lower voltage threshold, and then switched to constant voltage mode to maintain it. When the battery voltage is higher than the upper voltage threshold, charging stops and the battery is discharged to the upper voltage threshold. After the step of stopping charging and discharging to the upper voltage threshold when the battery voltage is higher than the upper voltage threshold, the method further includes: During the float charging maintenance phase, multiple alternating current signals of different frequencies with amplitudes less than a preset disturbance threshold are superimposed onto the battery to be charged. Measure the phase difference and amplitude ratio between the battery voltage response signal and the current excitation signal at each frequency, calculate the battery impedance value corresponding to each frequency point based on the phase difference and amplitude ratio, and construct the battery impedance spectrum curve based on the battery impedance value; Extract the high-frequency impedance characteristic values, mid-frequency impedance characteristic values, and low-frequency impedance characteristic values from the battery impedance spectrum curve; When any of the high-frequency impedance characteristic value, the mid-frequency impedance characteristic value, and the low-frequency impedance characteristic value deviates from the preset normal range, the float charge voltage adjustment or active discharge-recharge activation operation is triggered in stages according to the degree of deviation. When the battery voltage is between the lower voltage threshold and the upper voltage threshold, the battery voltage is maintained in constant voltage mode; After the step of maintaining the battery voltage in a constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: Real-time acquisition of mains voltage waveform data; calculation of voltage fluctuation amplitude, frequency offset and harmonic distortion rate within a preset time window. Calculate the mains power quality score based on the voltage fluctuation amplitude, the frequency offset, and the harmonic distortion rate; When the mains power quality score is higher than the preset good threshold, the mains power outage confirmation time and the mains power recovery confirmation time are shortened. When the mains power quality score is lower than the preset deterioration threshold, the mains power outage confirmation time and the mains power recovery confirmation time are extended. The mains power outage confirmation time refers to the delay time after detecting the disappearance of the mains voltage and waiting to confirm that the mains power is actually out of power. The mains power recovery confirmation time refers to the delay time after detecting the recovery of the mains voltage and waiting to confirm that the mains power is actually restored. The time series data of the mains power quality score is recorded, and when a continuous downward trend in the mains power quality score is detected, a power grid environment deterioration early warning signal is generated.
2. The method according to claim 1, characterized in that, After the step of maintaining the battery voltage in a constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: When the battery temperature changes from the current temperature range to a new temperature range, the new target voltage range corresponding to the new temperature range is extracted, and the voltage difference between the new target voltage range and the current target voltage range is calculated. The voltage adjustment slope is calculated based on the voltage difference and the preset transition time, and the charging output voltage is adjusted according to the voltage adjustment slope to transition from the current target voltage range to the new target voltage range.
3. The method according to claim 1, characterized in that, After the step of maintaining the battery voltage in a constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: After each preset number of charge-discharge cycles, the battery capacity decay rate of the battery to be charged is detected, and the lower voltage threshold and the upper voltage threshold corresponding to each temperature range in the temperature-voltage characteristic curve are corrected according to the battery capacity decay rate.
4. The method according to claim 1, characterized in that, After the step of maintaining the battery voltage in a constant voltage mode when the battery voltage is between the lower voltage threshold and the upper voltage threshold, the method further includes: Record the load power data at each time node within a preset time period, and establish a load power time series based on the load power data; The periodic load fluctuation pattern is obtained by analyzing the load power time series, and the peak and trough periods of the load fluctuation pattern are extracted. Increase the upper limit of charging current during the off-peak period and reduce the charging current within a preset lead time before the peak period of load arrives. When the real-time load power deviates from the periodic load fluctuation pattern by more than a preset deviation threshold, a load anomaly alarm signal is generated.
5. The method according to claim 4, characterized in that, After the step of stopping charging and discharging to the upper voltage threshold when the battery voltage is higher than the upper voltage threshold, the method further includes: During the constant voltage charging phase, charging current, battery voltage, and battery temperature data are collected. The temperature rise rate during the charging process is calculated and compared with the temperature rise rate during historical normal charging to obtain the temperature rise anomaly coefficient. Calculate the response time of the battery voltage after the charging current is applied, and compare it with the voltage response time of historical normal charging to obtain the response delay coefficient; The peak position of the voltage-charge differential curve is calculated and compared with the peak position of historical normal charging to obtain the structural degradation coefficient. The aging coefficient is obtained by weighted summation of the temperature rise anomaly coefficient, the response delay coefficient, and the structural degradation coefficient. When the aging coefficient exceeds a preset aging threshold, the battery is determined to have entered an aging state, and the charging cut-off current threshold is adjusted according to the aging coefficient.
6. A charging protection control system, characterized in that, The charging protection control system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the charging protection control system to perform the method as described in any one of claims 1-5.
7. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the charging protection control system, the charging protection control system performs the method as described in any one of claims 1-5.
8. A computer program product, characterized in that, When the computer program product is run on the charging protection control system, it causes the charging protection control system to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Intelligent charging adjustment method and system based on dynamic monitoring
CN121097880A
Battery charging and discharging monitoring system
CN211239394U