A battery intelligent switching self-charging emergency power supply device and power supply method

CN122553480APending Publication Date: 2026-08-11CHINA RESERVE COTTON YANCHENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

充电策略固化,不适应棉仓季节性大幅温度变化;健康状态感知缺失,维护盲目,无法实现预测性管理

Benefits of technology

1.本发明通过风险时窗生成单元,将感知触角延伸至电力系统之外的非电量维度:深度整合棉仓环境温湿度变化率、巡检计划时刻、电网异常频次及设备告警等级。基于多源异构数据预判“风险时窗”。将“盲目满电备用”优化为“按需动态补能”;提前计算出最优“目标荷电状态”。配合分阶段预充电控制(第一阶段恒流补电,第二阶段限流精确补电),确保电瓶在风险时窗开启前处于最佳放电倍率储备状态。这种基于数据驱动的预测性策略,不仅有效规避了策略固化、环境适应性差等缺陷,更在物理层面延缓了电瓶化学性能的衰退,为应急储备设施构建了第一道电力屏障。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122553480A_ABST
    Figure CN122553480A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent emergency power supply technology, specifically to a battery intelligent switching and self-charging emergency power supply device and method, comprising: a risk window generation unit that integrates environmental, inspection, and power grid data to predict high-risk periods; a load coupling modeling unit that divides equipment into three load groups—safety monitoring, communication control, and environmental regulation—based on dependencies and priorities; and a particle swarm optimization unit that combines bus and battery constraints to output the optimal pre-charging and switching strategy with the goals of maximizing critical load supply, minimizing battery loss, and minimizing bus voltage drop. In actual implementation, the system performs phased pre-charging based on the prediction results, implements batch switching with voltage drop monitoring when the main power supply is abnormal, and cuts off secondary loads in reverse priority order when the power is depleted, thereby achieving predictive power supply management and continuous supply to critical equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent emergency power supply technology, specifically to a battery intelligent switching self-charging emergency power supply device and power supply method. Background Technology

[0002] Cotton reserve warehouses are important strategic material storage facilities, often operating unattended or with minimal staff. They are equipped with critical loads such as ventilation fans, temperature and humidity monitoring systems, and fire safety equipment, placing extremely high demands on power continuity. As the core energy storage unit of the emergency power supply system, the working status of batteries directly determines the responsiveness and continuous power supply capability of the entire system. However, existing technologies have the following shortcomings.

[0003] Terminal voltage sensing is limited to a single dimension, resulting in both erroneous and missed switching; switching decisions lack foresight, and there are blind spots in the management of both primary and backup sides. The charging strategy is rigid and cannot adapt to the significant seasonal temperature changes in the cotton storage area; health status perception is lacking, maintenance is done blindly, and predictive management cannot be achieved.

[0004] Therefore, a battery intelligent switching self-charging emergency power supply device and power supply method are proposed. Summary of the Invention

[0005] The purpose of this invention is to provide a battery intelligent switching and self-charging emergency power supply device and method. This invention relates to the field of intelligent emergency power supply technology, specifically a battery intelligent switching and self-charging emergency power supply device and method, comprising: the invention uses a risk window generation unit to integrate environmental, inspection, and power grid data to predict high-risk periods; a load coupling modeling unit divides the equipment into three major load groups—safety monitoring, communication control, and environmental regulation—based on dependencies and priorities; a particle swarm optimization unit combines bus and battery constraints, aiming to maximize the supply of critical loads, minimize battery losses, and minimize bus voltage drop, and outputs the optimal pre-charging and switching strategy; in actual execution, the system performs phased pre-charging based on the prediction results, implements batch switching with voltage drop monitoring when the main power supply is abnormal, and cuts off secondary loads in reverse priority order when the power is depleted, thereby achieving predictive power supply management and continuous supply to critical equipment.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A battery intelligent switching and self-charging emergency power supply device includes: The risk window generation unit acquires cotton warehouse environmental monitoring data, inspection plan data, power grid anomaly historical data, and equipment alarm historical data to generate risk window information. The load coupling modeling unit divides the load into safety monitoring load group, communication control load group and environmental regulation load group according to the functional dependencies, electrical start-up characteristics and supply priority between cotton warehouse management equipment, and establishes the power model and input constraint relationship of each load group. The bus constraint acquisition unit acquires the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, and the allowable voltage drop of the load bus as power supply constraint parameters. The particle swarm optimization unit obtains the pre-investment order of each load group based on the investment constraint relationship, and constructs an optimization model with the continuous supply duration of key loads, battery cycle loss and bus voltage drop as joint optimization objectives, and power supply constraint parameters and investment constraint relationship as constraints. The model is solved by the particle swarm algorithm and outputs the target state of charge, minimum investment time interval, minimum reserved power threshold and cut-off trigger capacity threshold. The battery management unit performs pre-charging based on the target state of charge; The switching execution unit is used to switch each load group to battery power in batches according to the pre-connection sequence and minimum connection time interval when a main power supply abnormal signal is received, and to suspend subsequent connection when the bus voltage drop reaches the preset pause threshold. The graded disconnection control unit is used to continuously monitor the remaining available capacity of the battery. When the remaining available capacity of the battery drops to the corresponding disconnection trigger capacity threshold, the low-priority load groups are disconnected in stages.

[0007] Preferably, the risk window generation unit combines the temperature change rate, humidity change rate, absolute temperature value, and absolute humidity value in the cotton warehouse environmental monitoring data with the inspection start time and inspection duration in the inspection plan data, and combines the frequency of anomalies in the power grid anomaly historical data and the alarm level in the equipment alarm historical data to generate a risk score value, and determines the risk window based on the risk score value.

[0008] Preferably, the input constraint relationship established by the load coupling modeling unit includes at least pre-dependency constraints, mutually exclusive input constraints, and delayed input constraints, wherein the communication control load group has pre-dependency constraints on the security monitoring load group, and the environmental regulation load group has delayed input constraints on the communication control load group.

[0009] Preferably, the power model includes at least the steady-state operating power, startup impact power, startup duration, and allowable interruption time for each load group. The particle swarm optimization unit determines the minimum connection time interval based on the startup impact power and startup duration of each load group, so that two adjacent load groups can be connected within the allowable voltage drop range of the bus.

[0010] Preferably, in the joint optimization objective function constructed by the particle swarm optimization unit, the continuous supply duration of the key load is the gain term, the battery cycle loss and the bus voltage drop caused by the load group are the cost terms, and the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, the load group input constraint relationship and the allowable voltage drop of the load bus are used as constraints.

[0011] Preferably, the battery management unit performs phased pre-charging control according to the target state of charge before the start of the risk window. In the first stage before the start of the risk window, a constant current-constant voltage charging strategy is adopted, and in the second stage close to the start of the risk window, a current-limiting charging strategy that retains the discharge rate margin is adopted.

[0012] Preferably, after the main power supply fails, the switching execution unit checks the load bus voltage once after each load group is switched on; when the bus voltage drop reaches the preset pause threshold, the subsequent load group is paused, and after the bus voltage exceeds the recovery threshold and continues for a preset time, the next load group is switched on according to the pre-switched order.

[0013] Preferably, the hierarchical disconnection control unit disconnects load groups in reverse priority order of environmental regulation load group, communication control load group, and safety monitoring load group, wherein at least the safety monitoring load group is kept powered continuously during any disconnection stage.

[0014] A method for intelligent switching and self-charging emergency power supply of batteries, characterized in that it includes: S1. Acquire cotton warehouse environmental monitoring data, inspection plan data, power grid anomaly historical data, and equipment alarm historical data, and generate risk window information; S2. Based on the functional dependencies, electrical starting characteristics, and supply priority among the cotton warehouse management equipment, the load is divided into a safety monitoring load group, a communication control load group, and an environmental regulation load group, and a power model and input constraint relationship are established for each load group. S3. Obtain the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, and the allowable voltage drop of the load bus as power supply constraint parameters; S4. Construct an optimization model with the continuous supply duration of critical loads, battery cycle loss and bus voltage drop as joint optimization objectives, and power supply constraint parameters and input constraint relationships as constraints. Solve the model using the particle swarm optimization algorithm and output the target state of charge, minimum input time interval, minimum reserved capacity threshold and cut-off trigger capacity threshold. S5. Perform pre-charging based on the target state of charge; S6. When a main power supply abnormality signal is received, each load group is switched to battery power in batches according to the pre-connection sequence and minimum connection time interval, and subsequent connection is suspended when the bus voltage drop reaches the preset suspension threshold. S7. Continuously monitor the remaining available capacity of the battery. When the remaining available capacity of the battery drops to the corresponding cut-off trigger capacity threshold, cut off low-priority load groups in stages.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention extends the sensing reach beyond the power system to non-electrical dimensions through a risk window generation unit: deeply integrating the temperature and humidity change rate of the cotton storage environment, the scheduled inspection time, the frequency of power grid anomalies, and the alarm level of equipment. It predicts "risk windows" based on multi-source heterogeneous data, optimizing "blindly fully charged standby" into "dynamic on-demand energy replenishment"; and pre-calculating the optimal "target state of charge." Combined with phased pre-charging control (first stage constant current replenishment, second stage current-limited precise replenishment), it ensures that the battery is in the optimal discharge rate reserve state before the risk window opens. This data-driven predictive strategy not only effectively avoids the defects of strategy rigidity and poor environmental adaptability, but also delays the degradation of battery chemical performance at the physical level, building the first power barrier for emergency reserve facilities.

[0016] 2. In extreme emergency power supply scenarios, the system faces the challenge of balancing and optimizing the duration of power supply, battery losses, and bus voltage stability. Traditional static priority schemes cannot detect real-time fluctuations in battery state of health (SOH), which can easily lead to the instantaneous collapse of aging batteries under heavy loads due to overload caused by internal resistance voltage drop. This invention constructs a refined multi-objective global optimization model using a particle swarm optimization unit. The continuous power supply duration of critical loads is set as the maximum gain, while battery cycle losses and instantaneous bus voltage drop are set as the minimum cost functions. The PSO algorithm uses the real-time SOH of the battery and the maximum allowable discharge rate as hard constraint boundary conditions. Through iterative evolution of the particle swarm, it quickly locks the optimal solution in the scheduling combination, dynamically outputs the load pre-connection order, connection interval, and cut-off threshold, significantly improving the resilience of the emergency power supply system at the edge of resource depletion.

[0017] 3. This invention constructs a smooth switching and safe closed-loop protection system based on the electrical coupling characteristics of the load. It establishes a triple logic of pre-dependency (e.g., the monitoring system must start before the environmental control system), mutual exclusion (to prevent the superimposed impact of high-power equipment), and delayed switching. This ensures that the load growth curve of the power system always remains within a controllable gradient. The switching execution unit does not blindly operate sequentially, but introduces a "batch switching with voltage drop monitoring" logic. Each time a load is switched on, the system immediately detects a voltage drop on the bus. When the voltage drop exceeds the safety threshold, subsequent switching is immediately suspended via a particle swarm output command until the bus voltage stabilizes. During the power decay phase, loads are switched off in reverse priority stages, coupled with a "non-automatic recovery" mechanism to prevent frequent load oscillations caused by a brief voltage rebound after battery unloading. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the structure of a battery intelligent switching self-charging emergency power supply device provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a battery intelligent switching self-charging emergency power supply method provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Example 1: This embodiment discloses a battery intelligent switching and self-charging emergency power supply device, applied to emergency power supply scenarios in cotton reserve warehouses (hereinafter referred to as "cotton warehouses"). Cotton warehouses are important strategic material reserve facilities, often operating unattended or with minimal staff, and are equipped with critical loads such as ventilation fans, temperature and humidity monitoring systems, and fire safety equipment, requiring extremely high power supply continuity. The device in this embodiment uses lithium iron phosphate batteries (hereinafter collectively referred to as "batteries") as the core energy storage unit. Through multi-dimensional data sensing, load coupling modeling, particle swarm optimization, and hierarchical switching control, it achieves intelligent emergency switching and continuous power supply in the event of a main power supply failure.

[0021] refer to Figure 1 This is a schematic diagram of a battery intelligent switching and self-charging emergency power supply device. The specific technical solution is as follows: The risk window generation unit acquires cotton warehouse environmental monitoring data, inspection plan data, power grid anomaly historical data, and equipment alarm historical data to generate risk window information. The load coupling modeling unit divides the load into safety monitoring load group, communication control load group and environmental regulation load group according to the functional dependencies, electrical start-up characteristics and supply priority between cotton warehouse management equipment, and establishes the power model and input constraint relationship of each load group. The bus constraint acquisition unit acquires the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, and the allowable voltage drop of the load bus as power supply constraint parameters. The particle swarm optimization unit obtains the pre-investment order of each load group based on the investment constraint relationship, and constructs an optimization model with the continuous supply duration of key loads, battery cycle loss and bus voltage drop as joint optimization objectives, and power supply constraint parameters and investment constraint relationship as constraints. The model is solved by the particle swarm algorithm and outputs the target state of charge, minimum investment time interval, minimum reserved power threshold and cut-off trigger capacity threshold. The battery management unit performs pre-charging based on the target state of charge; The switching execution unit is used to switch each load group to battery power in batches according to the pre-connection sequence and minimum connection time interval when a main power supply abnormal signal is received, and to suspend subsequent connection when the bus voltage drop reaches the preset pause threshold. The graded disconnection control unit is used to continuously monitor the remaining available capacity of the battery. When the remaining available capacity of the battery drops to the corresponding disconnection trigger capacity threshold, the low-priority load groups are disconnected in stages.

[0022] Furthermore, the risk window generation unit combines the temperature change rate, humidity change rate, absolute temperature value, and absolute humidity value in the cotton warehouse environmental monitoring data with the inspection start time and inspection duration in the inspection plan data, and combines the frequency of anomalies in the power grid anomaly historical data and the alarm level in the equipment alarm historical data to generate a risk score value, and determines the risk window based on the risk score value.

[0023] The risk window generation unit interfaces with various sensors and historical databases installed on-site in the cotton warehouse to collect the following four types of raw data: Cotton warehouse environmental monitoring data: including real-time temperature values ​​at various monitoring points within the warehouse. (Unit: °C) Real-time humidity value (Unit: %RH), sampling period is 5 minutes, data are collected by NTC thermistor temperature sensor and capacitive humidity sensor; the rate of temperature change is calculated within each sampling period. (Unit: °C / h) and humidity change rate (Unit: %RH / h), calculated as: the difference between the current sampled value and the sampled value at the same time one hour ago, divided by the time interval (1 hour); Inspection plan data: provided by the warehouse management system, including the start time of each inspection task. (Unix timestamp, accurate to the second) and inspection duration (Unit: minutes). During the inspection, staff operate inside the warehouse, and power outages to critical loads have a greater impact on personnel safety and equipment status records. Therefore, the inspection period should be included in the risk window assessment.

[0024] Historical power grid anomaly data: Sourced from the upstream distribution system or local power quality analyzer, this data records power grid anomaly events over the past 180 days. Fields include: anomaly occurrence timestamp, anomaly type (undervoltage / overvoltage / phase loss / power outage), duration, and anomaly frequency. (Unit: times / month). The system uses a sliding window to count the frequency of anomalies over the past 30 days, which serves as a reference value for the power grid reliability risk during the current period.

[0025] Historical equipment alarm data: Sourced from the warehouse equipment management system, this data records alarm records from the past 90 days for equipment such as battery systems, changeover switches, and monitoring instruments. Fields include: alarm time, alarm device number, alarm level (Level 1 / 2 / 3, with Level 3 being the highest), and alarm type (over-temperature / over-current / reduced insulation capacity, etc.). The system extracts the most recent alarm level for each device. , as a weighting factor for equipment health risk.

[0026] Risk score calculation: The risk window generation unit analyzes the above four types of data and generates risk scores according to the following steps. (Dimensionless, value range [0, 100]); Step 1: Calculation of Environmental Risk Components Define environmental risk components Calculate using the following formula: ; in, This represents the maximum rate of temperature change at all monitoring points within the current sampling period. This corresponds to the maximum rate of change in humidity. This represents the current maximum absolute temperature. This represents the current maximum absolute humidity. As a normalization function, each parameter is mapped to the interval [0,1]. The lower bound of the normalization of each parameter is defined as the physical zero value or the normal environmental value, that is: the lower bound of temperature change rate is defined as 0℃ / h, the lower bound of humidity change rate is defined as 0%RH / h, the lower bound of absolute temperature is defined as 0℃, and the lower bound of absolute humidity is defined as 0%RH. The upper bound of the normalization of each parameter is set according to the experience value of cotton warehouse safety industry, for example: the upper bound of temperature change rate is defined as 3℃ / h, the upper bound of humidity change rate is defined as 10%RH / h, the upper bound of absolute temperature is defined as 40℃, and the upper bound of absolute humidity is defined as 85%RH. The weighting coefficients satisfy the condition that their sum is 1; in this embodiment, The weights are 0.35, 0.25, 0.2, and 0.2, respectively. These weights were determined by experts in the field based on the dual protection requirements of fire prevention and moisture control for cotton warehouses. The temperature change rate has the highest weight because the risk of spontaneous combustion of cotton is directly related to a sudden increase in temperature.

[0027] Step Two: Calculation of Risk Gain During Inspection Period: Define the inspection risk gain coefficient At present The period is considered to be a high-risk period for inspection when the following condition is met: ; in, =30 minutes is the preparation buffer time reserved before the inspection. When the above formula is satisfied, =1.2 (gain coefficient, indicating a 20% increase in the overall risk score during the inspection); otherwise =1.0; Step 3: Calculation of power grid anomaly frequency risk components Define grid risk components Calculate using the following formula: ; in, =3 times / month is the reference frequency (set according to the statistical experience value of voltage fluctuation and interruption in industry standard GB / T 12325). The maximum contribution value is 30 points (30% of the total score of 100). When the frequency of power grid anomalies exceeds 3 times per month in the past 30 days, The maximum score of 30 points is fixed to reflect the severe power supply situation during abnormal periods of the high-frequency power grid.

[0028] Step 4: Calculation of Equipment Alarm Risk Components Define device alarm risk components Calculate using the following formula: ; in, The total number of devices included in the monitoring. For the first The most recent alarm level of the device (0 if there is no alarm record). The maximum contribution is 20 points (20% of the total score of 100).

[0029] Step 5: Overall Risk Score: ; Finally, the range is truncated to [0, 100] (rounding down to 100 for values ​​exceeding 100), where the environmental risk component... The maximum value of the calculation result is 1. After the coefficient is 50, the maximum contribution is 50 points. The power grid risk component contributes 30 points, and the equipment alarm risk component contributes 20 points. The sum of the three is adjusted by the inspection gain coefficient to obtain the final score. Each component is unified as a dimensionless score.

[0030] Risk window determination: The risk time window generation unit predicts the risk score for each sampling time within the next 24 hours using a 5-minute sliding step. Specifically, it sets the risk score for the period within the last 7 days in history. sky( =1 indicates the most recent day. =7 indicates the earliest day) and the risk score at the same time is The corresponding weight is The weights are calculated using an exponentially decreasing weighted moving average method. ;wherein the attenuation factor Take 0.5, This results in a higher weighting for recent data and a gradually decreasing weighting for longer-term data. Risk score at the time of prediction. Based on this, this unit summarizes the prediction results over a continuous time period using a 5-minute sliding step to generate risk window information. The output format of the window is {window start time}. The end time of the time window Peak risk score }

[0031] When predicting Exceeding the threshold (In this embodiment) =65 points. This value is determined by analyzing the ROC curves of historical power supply failure events. When the false negative rate is less than 5%, this time period is marked as a risk window and the risk window information is output to the battery management unit and particle swarm optimization unit to trigger the subsequent pre-charging and optimization scheduling process.

[0032] Furthermore, the input constraint relationship established by the load coupling modeling unit includes at least pre-dependency constraints, mutually exclusive input constraints, and delayed input constraints. Among them, the communication control load group has pre-dependency constraints on the security monitoring load group, and the environmental regulation load group has delayed input constraints on the communication control load group.

[0033] 3.1 Load Grouping Based on the functional dependencies, electrical start-up characteristics, and supply priority among the cotton warehouse management equipment, load coupling modeling unit 2 divides all electrical loads within the warehouse into three load groups: (1) Safety monitoring load group (highest priority, number P1): includes temperature and humidity sensors, smoke detectors, fire controllers and their power supply modules. This load group is the minimum guarantee for the safe operation of the cotton warehouse, and the power supply must not be interrupted under any circumstances. The total power consumption during steady-state operation is [not specified]. =120W, since most of these are low-power sensor devices, the startup impact power is close to the steady-state power. =150W, startup duration =0.5s, allowable interruption time =0s (interruptions are not allowed).

[0034] (2) Communication control load group (second highest priority, numbered P2): includes industrial switches, 4G / 5G communication modules, remote monitoring terminals, and access control controllers. This load group is responsible for data communication and remote command execution between the cotton warehouse and the external management platform. It has a prerequisite constraint on the safety monitoring load group (i.e., the activation of P2 must be performed after P1 is running normally). The total power during steady-state operation is... =300W, starting impact power =450W (a short-term high current occurs when the communication module powers on), startup duration =2s, allowable interruption time =30s.

[0035] (3) Environmental control load group (lowest priority, numbered P3): This includes the warehouse ventilation fan, dehumidifier, and related frequency converter. This load group is responsible for the temperature and humidity control function of the cotton warehouse. It is an induction motor type load with a large starting inrush current. It has a time delay constraint on the communication control load group (i.e., P3 must be put into operation after P2 has been running stably for at least...). Execute after 10 seconds to prevent the combined impact of motor starting shock and communication module power-on shock. Total steady-state operating power. =1500W (approximately 500W per ventilation fan, maximum 3 fans allowed), starting impact power =4500W (The starting current of an induction motor when starting directly is approximately 3 to 5 times the rated current; we will take 3 times for calculation), starting duration =5s, allowable interruption time =300s.

[0036] The input constraints are established as follows: The input constraint relationships established by the load coupling modeling unit include the following three categories: (1) Pre-dependency constraint: The switching command for P2 can only be issued after P1 has been switched on and the bus voltage has stabilized (voltage fluctuations at 5 consecutive sampling points are less than 2% of the rated voltage), i.e. ,in =5s is the busbar stabilization waiting time.

[0037] (2) Mutual exclusion input constraint: At the same time, the switching execution unit is only allowed to issue a switching input command to one load group, and multiple load groups are not allowed to be connected to the grid at the same time, so as to prevent the superimposed inrush current from exceeding the maximum allowable discharge rate of the battery.

[0038] (3) Delayed connection constraint: After P2 is connected and the bus voltage is stable, the switching connection command of P3 needs to wait for an additional time. =It takes 10 seconds to send the data, that is .

[0039] Furthermore, the power model includes at least the steady-state operating power, startup impact power, startup duration, and allowable interruption time for each load group. The particle swarm optimization unit determines the minimum connection time interval based on the startup impact power and startup duration of each load group, thereby enabling two adjacent load groups to complete the connection within the allowable voltage drop range of the bus.

[0040] The steady-state operating power of each load group is determined by the larger of the rated nameplate power and the measured average value; the starting impact power is determined by sampling the peak value of the actual starting waveform with an oscilloscope (sampling rate not less than 10kHz); the starting duration is defined as the period during which the starting current exceeds 1.5 times the steady-state current; the above parameters are remeasured annually or after equipment replacement to ensure that the power model is consistent with the actual installation.

[0041] Specifically, the power model parameters are summarized in Table 1: Table 1 Summary of Power Parameters

[0042] Bus constraint acquisition unit: The bus constraint acquisition unit collects and updates the following four power supply constraint parameters in real time through the CAN 2.0B protocol interface (message frame rate 100ms / frame) of the battery management system (BMS): (1) Current state of charge (SOC) of the battery: calculated by the BMS using the ampere-hour integration method combined with the open-circuit voltage correction method, with a value range of [0%, 100%] and an accuracy of ±2%. The battery configured in this embodiment is a lithium iron phosphate battery pack with a nominal capacity of 200Ah (DC48V) and a corresponding rated energy storage of 9.6kWh.

[0043] (2) Battery Health Status (SOH): Obtained by the BMS through equivalent internal resistance measurement and capacity decay estimation, with a value range of [0%, 100%]. A maintenance warning is triggered when the SOH is below 80%. SOH affects the actual usable capacity of the battery. And the upper limit of the actual discharge depth under high load. Indicates the rated capacity (200Ah); (3) Maximum permissible discharge rate ( Based on the characteristics of lithium iron phosphate batteries, the maximum allowable discharge rate in this embodiment is... =1.5C (i.e., maximum continuous discharge current 300A, corresponding to maximum continuous discharge power) =14400W), this value is dynamically adjusted by the BMS based on the current battery temperature (derating at low temperatures) and SOH. The specific derating rule is: when the battery temperature is below 0℃, Temperature derating factor And health status deduction coefficient A joint decision.

[0044] (4) Allowable voltage drop across the load bus ( This refers to the maximum permissible voltage drop of the load bus voltage relative to the rated voltage (48V DC) when powered by a battery. This embodiment sets... =3.6V (i.e. 7.5% of the rated voltage of 48V), taking into account the minimum operating voltage of the end load equipment (allowable ±10% deviation, take the strict side 7.5%) and the voltage drop of the cable line.

[0045] The above four parameters are collected and encapsulated by the bus constraint acquisition unit before each particle swarm optimization unit starts optimization calculation, and are used as the constraint input of the optimization model.

[0046] Furthermore, in the joint optimization objective function constructed by the particle swarm optimization unit, the continuous supply duration of the key load is the gain term, the battery cycle loss and the bus voltage drop caused by the load group are the cost terms, and the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, the load group input constraint relationship and the allowable voltage drop of the load bus are used as constraints.

[0047] The pre-investment sequence of each load group is uniquely determined by the load coupling modeling unit based on the investment constraint relationship as P1→P2→P3, which is used as a fixed parameter input to the optimization model and does not participate in the particle swarm iterative search. The optimization decision variable vector of the particle swarm optimization unit is: ; in, The target state of charge (%) is the SOC target value that the battery should be pre-charged to before the main power supply fails. The minimum input time interval (s) is the shortest time interval between switching inputs between two adjacent load groups; The minimum remaining charge threshold (%) is set, meaning the battery discharge must not fall below the SOC lower limit. The cutoff trigger capacity threshold (%) for P3 is used to cut off P3 when the remaining SOC drops to this threshold; The cut-off trigger capacity threshold (%) for P2 is used to cut off P2 when the remaining SOC drops to this threshold (but P1 is never cut off).

[0048] The constraint relationship is > > This ensures that the removal order is executed sequentially from low priority to high priority.

[0049] Joint optimization objective function: The particle swarm optimization unit constructs a joint optimization objective function, with maximizing the continuous supply duration of critical loads as the primary objective, while penalizing battery cycle losses and bus voltage drop costs. ; in: In decision variables Below, the expected continuous supply duration (h) of load group P1 is the gain term; =8h, which is the reference supply guarantee duration (the longest period of unattended cotton warehouse at night) used for normalization; Discharge depth (%) ; in, =120W, =300W, =1500W represents the steady-state operating power of each load group; The actual usable capacity of the battery is calculated as follows: ; =48V is the rated bus voltage; The three segments in the function correspond to the sum of the supply guarantee durations for three stages: three groups running simultaneously, P2 and P1 running, and only P1 running.

[0050] = - Total depth of discharge (%) =80%, which is the recommended maximum depth of discharge for lithium iron phosphate batteries, with cycle loss as the trade-off. The maximum voltage drop (V) of the busbar when each load group is switched on is calculated from the starting impact power of each load group, the rated busbar voltage, and the equivalent internal resistance of the battery. The calculation formula is as follows: ,in The starting impact power (W) of this load group; The equivalent internal resistance (Ω) of the battery is measured in real time by the BMS. This is illustrated using a P3 load group as an example. =4500W, if =0.02Ω, then = (4500 / 48) × 0.02 ≈ 1.875V; Weighting coefficient The values ​​are 0.6, 0.25, and 0.15 respectively, which satisfy the condition. .

[0051] Weighting coefficient determination process: 100 rounds of Monte Carlo experiments were conducted under the following simulation conditions: initial battery SOC was uniformly sampled between 50% and 90%, SOH was uniformly sampled between 80% and 100%, and grid anomaly duration was uniformly sampled between 1 hour and 12 hours; the single optimization objective was to maximize the ratio of the actual continuous supply duration to the theoretical maximum supply duration (supply efficiency) of the P1 load group, and the experiment was iterated through... , and All integer combinations > 0 are selected, and the combination with the highest average supply guarantee efficiency across 100 simulation rounds is chosen as the final weight. The weight coefficient is... The values ​​are 0.6, 0.25, and 0.15, respectively. All three components have been normalized to the [0,1] interval, and their dimensions are unified.

[0052] The constraints of the optimization model are as follows: (a) ,in =95% (charge to 95% to protect the battery from overcharging). The maximum SOC increment that can be charged before the risk window arrives (determined by the remaining charging time and maximum charging power). ; Pre-charge end time ; The maximum allowable charging current dynamically output by the BMS based on the current temperature and SOH; the actual usable capacity of the battery. ; (b) (The inrush current when each load group is connected must not exceed the current corresponding to the maximum allowable discharge rate of the battery.) The dynamic upper bound, which varies in real time with SOH and temperature, is calculated using the following formula: ; in, =1.5C is the nominal maximum continuous discharge rate; The temperature derating factor is calculated using the following formula: ; in, Battery temperature; Health status deduction coefficient The calculation is as follows: ; The above The values ​​are dynamically updated by the bus constraint acquisition unit through real-time data acquisition via BMS before each PSO optimization start, ensuring that the constraint boundaries are consistent with the current actual state of the battery. When the P3 load group causes constraint (b) to become unsatisfactory under low temperature or low SOH conditions (i.e.... / =4500 / 48=93.75A> Ah), the particle swarm optimization unit automatically marks P3 as unavailable for this emergency cycle, and uses the supply duration of P2 as the gain term of the objective function to ensure that a feasible solution always exists in the optimization.

[0053] (c) (The bus voltage drop when each load group is put into operation must not exceed the allowable voltage drop). (d) The minimum time interval between load starts shall not be less than the sum of the start-up duration of the preceding load group and the bus stabilization waiting time; (e) (The minimum remaining charge should be between 10% and 20%. Below 10% will damage the battery, and above 20% will waste usable capacity.)

[0054] The particle swarm optimization algorithm is implemented as follows: The particle swarm optimization unit uses the standard particle swarm optimization (PSO) algorithm to solve the above optimization model. The algorithm parameters are as follows: Number of particles: ; Maximum number of iterations: ; Inertia weight The value decreases linearly from 0.9 to 0.4 (it decreases as the number of iterations increases, initially encouraging global search and later encouraging local convergence). Individual learning factors =2.0; Social Learning Factor =2.0; Continuous decision variables Each value takes a continuous value within its respective constraint range; Discrete decision variables ( Due to the constraints imposed by the input relationship, the only legal input order is P1→P2→P3. Therefore, this variable is fixed, and the particle swarm optimization search is only performed on the other five continuous variables.

[0055] In terms of single-run optimization time, using an ARM Cortex-A53 (1.2 GHz, 4 cores) industrial control computer as the running platform, the computation time for 50 particles × 200 iterations is approximately 0.8 to 1.2 seconds, which meets the real-time requirement of completing the optimization calculation before the arrival of the risk window (the risk window lead time is at least 30 minutes).

[0056] The final output of the particle swarm optimization unit is: the target state of charge. Minimum investment time interval Minimum Reservation Capacity Threshold and the resection trigger capacity threshold , The signals are transmitted to the battery management unit, the switching execution unit, and the hierarchical cutoff control unit, respectively.

[0057] Furthermore, the battery management unit performs phased pre-charging control according to the target state of charge before the start of the risk window. In the first stage before the start of the risk window, a constant current-constant voltage charging strategy is adopted, and in the second stage close to the start of the risk window, a current-limiting charging strategy that retains the discharge rate margin is adopted.

[0058] Phased pre-charge control: The battery management unit receives risk window information and target state of charge. Then, calculate the difference between the current SOC and the target SOC. ,like = - If the value is greater than 0, the pre-charging process will be initiated. For the present ; The pre-charging process is executed in two phases, starting from the risk window. Based on this, let the pre-charge end time be set. (5 minutes reserved) Pre-charging begins Determined based on available charging power and required charging capacity: Phase 1 (Constant Current-Constant Voltage Compensation Phase): From to ,in, =30 minutes is the duration of the second stage. This stage adopts a constant current-constant voltage (CC-CV) charging strategy, with the constant current charging current set to... =0.3C (corresponding to 60A, charging power approximately 2880 W), the first stage ends when the first of the following two conditions is met: (1) the current time arrives. SOC reached -5%. If condition (2) is triggered first, the system will enter the second stage ahead of time and maintain current-limited charging until... If condition (1) is triggered first but SOC has not yet been reached. At -5%, the system also switches to the second phase to prioritize ensuring the discharge rate margin before the risk window, and no longer requires waiting for the next critical period. -5% transition node; the first stage does not limit the discharge rate margin, allowing the charging system to operate at the maximum allowable charging power to quickly replenish the power.

[0059] Phase Two (Current Limiting and Power Replenishment Phase): From the end of Phase One to... ( (In the first 5 minutes), the charging current decreases to =0.1C (corresponding to 20A, charging power approximately 960W), the purpose is to reserve sufficient discharge rate margin for the battery ( - / =1.5C-0.1C=1.4C), ensuring that the battery can immediately respond to load switching demands at its maximum discharge rate when the main power supply is abnormal, avoiding delays in the battery's bidirectional current switching response during charging. The second stage charging target is .

[0060] The battery management unit monitors the State of Charge (SOC) every 10 minutes during non-pre-charge periods. When the SOC falls below a certain level... When the battery level reaches +10% (i.e., when only 10% of the minimum reserve power threshold remains), a low power warning is triggered. The alarm message is sent to the remote management platform via the communication control load group, prompting maintenance personnel to arrange charging or check the main power supply status in a timely manner.

[0061] Furthermore, after the main power supply fails, the switching execution unit checks the load bus voltage once after each load group is switched on; when the bus voltage drop reaches the preset pause threshold, it pauses the subsequent load group switching on, and after the bus voltage exceeds the recovery threshold and continues for a preset time, it continues to switch on the next load group according to the pre-switching sequence.

[0062] The switching execution unit monitors the main power supply status on the load bus side in real time, with a sampling period of 20 ms (matching the power frequency period). The main power supply anomaly judgment condition is: the bus voltage is lower than 85% of the rated voltage for three consecutive sampling periods (i.e., 60 ms) (i.e., lower than 220V × 85% = 187 V, taking 220V AC mains power as an example; if it is a 48V DC bus, then it is lower than 48V × 90% = 43.2 V), or the phase sequence detection module detects a phase loss signal, then the main power supply is judged to be abnormal, a main power supply cut-off command is issued to the switching controller, and the battery power supply switching process is initiated.

[0063] To achieve zero-interruption power supply for the safety monitoring load group (P1), the switching execution unit adopts a dual-power hot standby architecture for the P1 circuit: the power selector of the P1 load circuit consists of two solid-state relays (SSRs) on the main power supply side and the battery side. During normal main power supply periods, the battery-side SSR remains in hot standby mode (ready to conduct at any time but not carrying main current); when the main power supply side SSR detects a voltage drop, the switching action of disconnecting the main power supply side SSR and connecting the battery-side SSR is directly triggered by the hardware comparator logic, without CPU software instructions. The switching sequence is completed within a single sampling period (20ms), controlling the actual power supply interruption time of P1 to within 20ms, meeting the energy storage and filtering requirements of the P1 safety instrument. The 60ms continuous three-cycle confirmation window is only used to determine whether the main power supply is continuously abnormal, thereby triggering the subsequent input decision of P2 and P3, and does not participate in the immediate switching triggering of P1. The two have different objects and physical meanings, and there is no contradiction between them.

[0064] This embodiment uses a solid-state relay (SSR), whose conduction response time is ≤1ms, which is much smaller than the 10-20ms of a mechanical contactor, and the mechanical delay effect can be ignored. A decoupling capacitor with a capacity of not less than 4700μF is configured on the bus side to suppress high-frequency voltage spikes lasting less than 1ms during load switching. Taking a typical switching noise scenario as an example: an approximately 10A transient spike current is generated at the moment of SSR turn-off, lasting about 100μs. The voltage fluctuation that the decoupling capacitor withstands is... Far below the allowable voltage drop of the busbar =3.6V, the capacitor selection meets the suppression requirements; the continuous supply of the second-level starting inrush current (the duration of which is far longer than the capacitor discharge time constant) is borne by the battery itself (equivalent internal resistance of about 0.01Ω to 0.05Ω). The battery, with its low internal resistance characteristics, controls the steady-state voltage drop caused by switching within a certain range. Within the specified range. The two mechanisms described above target interference at different time scales, working together to ensure the electromagnetic compatibility of the bus. The continuous supply of the second-level starting inrush current is borne by the battery itself (equivalent internal resistance approximately 0.01Ω to 0.05Ω). The battery, with its low internal resistance, controls the steady-state voltage drop caused by switching within a certain range. Within the specified range; the aforementioned 60ms continuous 3-cycle confirmation window is used to filter out normal voltage fluctuations on the main power supply side to prevent erroneous switching, and is not used to detect steady-state voltage drops caused by the connection of battery-side loads. The two have different objects of action and physical meanings, and there is no contradiction between them.

[0065] Phased switchover and deployment process: After detecting a main power supply anomaly signal, the switching execution unit follows the pre-injection sequence P1→P2→P3 and the minimum injection time interval output by the particle swarm optimization unit. The phased switchover and deployment will be carried out, and the specific process is as follows: Step 1: Deploy P1 (Security Monitoring Load Group) A P1 switching command is issued, driving the corresponding solid-state relay (SSR) or contactor to close, connecting the P1 load group to the battery power supply bus. After connection is complete, the switching execution unit 6 immediately collects the bus voltage. Calculate the bus voltage drop (in =48 V is the rated voltage).

[0066] Busbar voltage drop detection and suspension mechanism: If (In this embodiment, a preset pause threshold is used) If the bus voltage is 2.4 V (5% of the rated voltage), then the subsequent load group should be suspended and the bus voltage should be allowed to recover; when the bus voltage recovers to... (Recovery threshold, =1.2 V (2.5% of the rated voltage) and continuously maintained =3s later, continue to add the next load group according to the pre-added sequence. If Then it will directly enter the waiting period for the minimum input interval. Then proceed to the next group's process.

[0067] Step 2: Deploy P2 (Communication Control Load Group) After P1 is put into operation and the busbar stabilizes, wait... (Based on particle swarm optimization output, 5 to 15 seconds), issue the P2 switching command. Perform a bus voltage drop detection once more, using the same pause and resume logic as in the first step.

[0068] Step 3: Activate P3 (Environmental Conditioning Load Group) After P2 is put into operation and the busbar stabilizes, wait an additional time. =10 s (delayed input constraint), then wait for the remaining After a certain time, a P3 switching command is issued. P3 is an induction motor load with high starting impact power (4500 W). If the bus voltage drop detection shows... If the busbar is not in operation, the operation will be suspended until the busbar is restored.

[0069] Switching complete confirmation: After each load group is switched on, the switching execution unit reads the current value of the corresponding load circuit to verify whether the current is within the normal operating range (P1: 0.5 to 4 A; P2: 3 to 12 A; P3: 10 to 100 A). If the current is abnormal (such as the overcurrent protection action causing the contactor to fail to remain closed), the fault log is recorded.

[0070] Furthermore, the hierarchical disconnection control unit disconnects load groups in reverse priority order: environmental regulation load group, communication control load group, and safety monitoring load group. In any disconnection stage, at least the safety monitoring load group is kept powered continuously.

[0071] This embodiment implements a one-way irreversible disconnection logic, meaning that after any load group is disconnected, the power supply to the disconnected load group is not automatically restored.

[0072] Specifically, the graded disconnection control unit reads the current state of charge reported by the BMS every 30 seconds during battery-powered operation. ,when If the capacity drops to the resection trigger threshold, tiered resection is performed according to the following logic: (1) When When the P3 disconnection trigger threshold (typically 20% to 30%) is reached: a P3 (environmental control load group) disconnection command is issued, driving the corresponding contactor to disconnect and cutting off the power supply to the ventilation fan and dehumidifier. After disconnection is completed, the disconnection status flag is reset. =1 is written to the status register, and a P3 cut-off alarm message is sent to the remote platform via the communication control load group.

[0073] (2) When When the P2 disconnection trigger threshold (typically 15% to 20%) is reached (at which point P3 is either disconnected or not in operation): a P2 (communication control load group) disconnection command is issued, disconnecting the power supply to the industrial switch and communication module. After disconnection, =1. Note: After P2 is disconnected, the device will be unable to send real-time alarms, but the local control logic (tiered disconnection) will still be maintained by the safety monitoring load group (P1) and will continue to monitor the remaining battery capacity. Down to Record local alarm logs at that time.

[0074] Example 2: refer to Figure 2 This is a flowchart illustrating a method for intelligent battery switching and self-charging emergency power supply according to an embodiment of the present invention. The method includes: S1. Acquire cotton warehouse environmental monitoring data, inspection plan data, power grid anomaly historical data, and equipment alarm historical data, and generate risk window information; S2. Based on the functional dependencies, electrical starting characteristics, and supply priority among the cotton warehouse management equipment, the load is divided into a safety monitoring load group, a communication control load group, and an environmental regulation load group, and a power model and input constraint relationship are established for each load group. S3. Obtain the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, and the allowable voltage drop of the load bus as power supply constraint parameters; S4. Construct an optimization model with the continuous supply duration of critical loads, battery cycle loss and bus voltage drop as joint optimization objectives, and power supply constraint parameters and input constraint relationships as constraints. Solve the model using the particle swarm optimization algorithm and output the target state of charge, minimum input time interval, minimum reserved capacity threshold and cut-off trigger capacity threshold. S5. Perform pre-charging based on the target state of charge; S6. When a main power supply abnormality signal is received, each load group is switched to battery power in batches according to the pre-connection sequence and minimum connection time interval, and subsequent connection is suspended when the bus voltage drop reaches the preset suspension threshold. S7. Continuously monitor the remaining available capacity of the battery. When the remaining available capacity of the battery drops to the corresponding cut-off trigger capacity threshold, cut off low-priority load groups in stages.

[0075] Furthermore, the risk window generation unit combines the temperature change rate, humidity change rate, absolute temperature value, and absolute humidity value in the cotton warehouse environmental monitoring data with the inspection start time and inspection duration in the inspection plan data, and combines the frequency of anomalies in the power grid anomaly historical data and the alarm level in the equipment alarm historical data to generate a risk score value, and determines the risk window based on the risk score value.

[0076] Furthermore, the input constraint relationship established by the load coupling modeling unit includes at least pre-dependency constraints, mutually exclusive input constraints, and delayed input constraints. Among them, the communication control load group has pre-dependency constraints on the security monitoring load group, and the environmental regulation load group has delayed input constraints on the communication control load group.

[0077] Furthermore, the power model includes at least the steady-state operating power, startup impact power, startup duration, and allowable interruption time for each load group. The particle swarm optimization unit determines the minimum connection time interval based on the startup impact power and startup duration of each load group, thereby enabling two adjacent load groups to complete the connection within the allowable voltage drop range of the bus.

[0078] Furthermore, in the joint optimization objective function constructed by the particle swarm optimization unit, the continuous supply duration of the key load is the gain term, the battery cycle loss and the bus voltage drop caused by the load group are the cost terms, and the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, the load group input constraint relationship and the allowable voltage drop of the load bus are used as constraints.

[0079] Furthermore, the battery management unit performs phased pre-charging control according to the target state of charge before the start of the risk window. In the first stage before the start of the risk window, a constant current-constant voltage charging strategy is adopted, and in the second stage close to the start of the risk window, a current-limiting charging strategy that retains the discharge rate margin is adopted.

[0080] Furthermore, after the main power supply fails, the switching execution unit checks the load bus voltage once after each load group is switched on; when the bus voltage drop reaches the preset pause threshold, it pauses the subsequent load group switching on, and after the bus voltage exceeds the recovery threshold and continues for a preset time, it continues to switch on the next load group according to the pre-switching sequence.

[0081] Furthermore, the hierarchical disconnection control unit disconnects load groups in reverse priority order: environmental regulation load group, communication control load group, and safety monitoring load group. In any disconnection stage, at least the safety monitoring load group is kept powered continuously.

[0082] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A battery intelligent switching self-charging emergency power supply device, characterized in that, include: The risk window generation unit acquires cotton warehouse environmental monitoring data, inspection plan data, power grid anomaly historical data, and equipment alarm historical data to generate risk window information. The load coupling modeling unit divides the load into safety monitoring load group, communication control load group and environmental regulation load group according to the functional dependencies, electrical start-up characteristics and supply priority between cotton warehouse management equipment, and establishes the power model and input constraint relationship of each load group. The bus constraint acquisition unit acquires the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, and the allowable voltage drop of the load bus as power supply constraint parameters. The particle swarm optimization unit obtains the pre-investment order of each load group based on the investment constraint relationship, and constructs an optimization model with the continuous supply duration of key loads, battery cycle loss and bus voltage drop as joint optimization objectives, and power supply constraint parameters and investment constraint relationship as constraints. The model is solved by the particle swarm algorithm and outputs the target state of charge, minimum investment time interval, minimum reserved power threshold and cut-off trigger capacity threshold. The battery management unit performs pre-charging based on the target state of charge; The switching execution unit is used to switch each load group to battery power in batches according to the pre-connection sequence and minimum connection time interval when a main power supply abnormal signal is received, and to suspend subsequent connection when the bus voltage drop reaches the preset pause threshold. The graded disconnection control unit is used to continuously monitor the remaining available capacity of the battery and disconnect low-priority load groups in stages when the remaining available capacity of the battery drops to the corresponding disconnection trigger capacity threshold.

2. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: The risk window generation unit combines the temperature change rate, humidity change rate, absolute temperature value, and absolute humidity value in the cotton warehouse environmental monitoring data with the inspection start time and inspection duration in the inspection plan data, and combines the frequency of anomalies in the power grid anomaly historical data and the alarm level in the equipment alarm historical data to generate a risk score value, and determines the risk window based on the risk score value.

3. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: The input constraint relationship established by the load coupling modeling unit includes at least pre-dependency constraints, mutual exclusion input constraints, and delayed input constraints. Among them, the communication control load group has a pre-dependency constraint on the security monitoring load group, and the environmental regulation load group has a delayed input constraint on the communication control load group.

4. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: The power model includes at least the steady-state operating power, startup impact power, startup duration, and allowable interruption time for each load group. The particle swarm optimization unit determines the minimum connection time interval based on the startup impact power and startup duration of each load group, so that two adjacent load groups can be connected within the allowable voltage drop range of the bus.

5. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: In the joint optimization objective function constructed by the particle swarm optimization unit, the continuous supply duration of the critical load is the gain term, the battery cycle loss and the bus voltage drop caused by the load group are the cost terms, and the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, the load group input constraint relationship and the allowable voltage drop of the load bus are used as constraints.

6. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: The battery management unit performs phased pre-charging control according to the target state of charge before the start of the risk window. In the first stage before the start of the risk window, a constant current-constant voltage charging strategy is adopted, and in the second stage close to the start of the risk window, a current-limiting charging strategy that retains the discharge rate margin is adopted.

7. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: After the main power supply fails, the switching execution unit checks the load bus voltage once after each load group is switched on. When the bus voltage drop reaches the preset pause threshold, the subsequent load group is paused. After the bus voltage exceeds the recovery threshold and continues for a preset time, the next load group is switched on according to the pre-scheduled order.

8. The battery intelligent switching self-charging emergency power supply device according to claim 1, characterized in that: The hierarchical disconnection control unit disconnects load groups in reverse priority order: environmental regulation load group, communication control load group, and safety monitoring load group. During any disconnection phase, at least the safety monitoring load group is kept powered continuously.

9. A method for intelligent switching and self-charging emergency power supply of batteries, characterized in that: include: S1. Acquire cotton warehouse environmental monitoring data, inspection plan data, power grid anomaly historical data, and equipment alarm historical data, and generate risk window information; S2. Based on the functional dependencies, electrical starting characteristics, and supply priority among the cotton warehouse management equipment, the load is divided into a safety monitoring load group, a communication control load group, and an environmental regulation load group, and a power model and input constraint relationship are established for each load group. S3. Obtain the current state of charge of the battery, the battery health status, the maximum allowable discharge rate, and the allowable voltage drop of the load bus as power supply constraint parameters; S4. Construct an optimization model with the continuous supply duration of critical loads, battery cycle loss and bus voltage drop as joint optimization objectives, and power supply constraint parameters and input constraint relationships as constraints. Solve the model using the particle swarm optimization algorithm and output the target state of charge, minimum input time interval, minimum reserved capacity threshold and cut-off trigger capacity threshold. S5. Perform pre-charging based on the target state of charge; S6. When a main power supply abnormality signal is received, each load group is switched to battery power in batches according to the pre-connection sequence and minimum connection time interval, and subsequent connection is suspended when the bus voltage drop reaches the preset suspension threshold. S7. Continuously monitor the remaining available capacity of the battery. When the remaining available capacity of the battery drops to the corresponding cut-off trigger capacity threshold, cut off low-priority load groups in stages.