Intelligent charge-discharge management method and system for mobile power supply

CN123019150APending Publication Date: 2026-10-30ASAP TECH (JIANGXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611250351.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]针对现有移动电源充放电管理中,各功能模块各自独立运行、未以电池状态为决策核心,且低电量下监测模块仍满负荷运行挤占对外输出电能的问题,本发明提供一种用于移动电源的智能充放电管理方法及系统,将电池状态实时监测、低电量自适应功耗降级、多端口智能功率分配、边充边放协调控制与多协议快充兼容整合于同一控制逻辑中,实现各模块的协同决策与闭环控制

Benefits of technology

[0037]1.实现低电量下自适应功耗降级,优先保障对外输出。现有技术中,移动电源的电池状态监测、信息上报、快充协商等功能模块以固定频率持续运行,不随电池剩余电量变化而调整。当SOC极低时,这些模块仍在消耗宝贵的电能,挤占本可用于外部设备充电的电量。本发明引入基于SOC等级的四级功耗管理机制,在电池电量充足时提供完整功能,在SOC降低时主动降低采集频率、延长蓝牙发送周期、限制快充甚至禁用非必需功能模块,将有限的电能优先用于外部设备供电。这一"自身能源不足时智能牺牲自身功能以保障外部供电"的逻辑仅在移动电源中具有技术意义,充电器从电网取电无需考虑自身功耗,而移动电源的每一毫安时电量都需精打细算。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123019150A_ABST
    Figure CN123019150A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent charge-discharge management method and system for a mobile power supply, and belongs to the technical field of digital information transmission and electric digital data processing. The mobile power supply independently outputs power supply by relying on a built-in battery, the output power of the mobile power supply is real-time constrained by the state of charge and temperature of the battery, and a self-monitoring module also consumes electric energy. In the prior art, various function modules independently operate, the monitoring module still operates at full load when the electric quantity is low, and the output electric energy is squeezed. The method comprises the following steps: collecting the state of the battery in real time and recording abnormal events; performing four-stage adaptive power consumption degradation according to the state of charge level; sending the battery state information to a terminal device through Bluetooth communication; dynamically calculating the upper limit of the total available power based on the state of the battery; distributing the output power according to the port priority and disabling fast charging when deep energy saving is performed; performing three-stage safety verification on the fast charging negotiation result; performing three-party dynamic balance control in the mode of charging while discharging; and performing port abnormal protection. The application integrates information reporting, power consumption degradation, power distribution, charging while discharging and fast charging safety verification in the same control logic, realizes collaborative decision and closed-loop control of various modules, actively reduces the energy consumption of the monitoring module when the electric quantity is low to preferentially guarantee the external output, can systematically meet the new national standard requirements, and simultaneously reduces the material cost and the PCB area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital information transmission and electronic digital data processing technology, specifically to an intelligent charging and discharging management method and system for mobile power supplies, particularly suitable for mobile power supply devices that rely on built-in batteries for independent power output and whose output power is constrained in real time by the battery's state of charge and temperature. Background Technology

[0002] Portable power banks have become an indispensable portable power supply device in consumers' daily lives. With the widespread adoption of the USB PD fast charging protocol, the charging and discharging power of power banks is constantly increasing, and the demand for multi-protocol compatibility and simultaneous output from multiple ports is growing. The new national standard GB 47372-2026 "Safety Technical Specifications for Portable Power Banks" explicitly proposes intelligent management requirements for the first time: power banks must monitor key information such as battery voltage and temperature in real time, have the function of storing and retrieving abnormal information, and make systematic provisions for charging and discharging voltage, current, temperature control, and port protection.

[0003] Currently, power bank charging and discharging management has achieved certain technological advancements in various functional dimensions, including information reporting, multi-port output, simultaneous charging and discharging, and fast charging protocol compatibility. The fundamental difference between a power bank and a regular charger lies in its reliance on a built-in battery for independent power output. The output power comes entirely from battery discharge, and the battery's SOC, temperature, and voltage directly determine its usable output capacity. Its portability requires all control logic to be completed within a single main control chip. Furthermore, the power supply target is uncertain, potentially powering different devices at any time. However, existing technologies follow the design philosophy of chargers: information reporting is only "readable but not usable," power allocation uses static preset ratios, simultaneous charging and discharging and fast charging negotiation are independent, fast charging negotiation lacks real-time verification of battery safety status, and each functional module operates independently without communication with others.

[0004] The aforementioned technical solutions fail to consider the core constraints of power banks, leading to the following problems: state information is not involved in charging / discharging decisions, and the power output continues at the original level even when the temperature rises; power allocation is unrelated to the real-time battery status, posing safety hazards at high temperatures or low SOC; dynamic balance between input power, output power, and safety boundaries is difficult to achieve in complex multi-port scenarios; fast charging negotiation results are not constrained by the battery's safety status; and the issue of the monitoring module itself consuming power is not considered, resulting in it crowding out external output at low SOC. In view of this, this invention provides an intelligent charging / discharging management method and system for power banks, integrating real-time battery status monitoring, low-battery adaptive power degradation, multi-port intelligent power allocation, simultaneous charging / discharging coordination control, and multi-protocol fast charging compatibility into the same control logic, achieving collaborative decision-making and closed-loop control among the modules. Summary of the Invention

[0005] To address the problems in existing mobile power bank charging and discharging management, where each functional module operates independently, does not take battery status as the core decision-making factor, and the monitoring module still operates at full load when the battery is low, thus crowding out external power output, this invention provides an intelligent charging and discharging management method and system for mobile power banks. It integrates real-time battery status monitoring, adaptive power degradation when the battery is low, intelligent power allocation across multiple ports, coordinated control of simultaneous charging and discharging, and compatibility with multiple fast charging protocols into the same control logic, thereby achieving collaborative decision-making and closed-loop control of each module.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A smart charging and discharging management method for a power bank, wherein the power bank is a portable device that relies on a built-in battery for independent power output and has at least two output ports, one of which is a port with a built-in charging cable, and at least one is a USB-C port. All control logic is executed on a single main control chip. The method includes the following steps:

[0008] Step S1: The voltage, current and temperature data of the battery pack are collected in real time through the voltage and current acquisition module and the temperature acquisition module. The main control chip calculates the state of charge (SOC) of the battery based on the collected data and writes the real-time data and abnormal events into the non-volatile memory.

[0009] Step S2: In conjunction with Step S1, determine the energy level of the battery based on the real-time SOC value, generate corresponding power consumption control instructions, and dynamically adjust the operating level of each functional module. The power consumption control instructions include frequency acquisition adjustment instructions, frequency reporting adjustment instructions, storage write adjustment instructions, fast charging enable control instructions, and computational load adjustment instructions.

[0010] Step S3: The main control chip sends battery status data to the terminal device via Bluetooth communication. The data includes at least voltage, current, temperature, SOC, cycle count, abnormal alarm code, and current energy management mode code.

[0011] Step S4: The main control chip dynamically calculates the current maximum available total power based on the real-time battery status parameters. .

[0012] Step S5: The main control chip, based on the preset priority of each output port and the fast charging protocol request of the connected device, determines the maximum available total power. The actual output power of each port is allocated within the range; when the power consumption level of the power bank is in deep energy saving mode or minimum power supply mode, fast charging negotiation is completely disabled.

[0013] Step S6: After the fast charging protocol negotiation is completed, the main control chip will set the target voltage negotiated by the protocol. and target current A three-level verification is performed on the battery safety status, including safety verification, dynamic constraints, and abnormal disabling.

[0014] Step S7: When the power bank is simultaneously connected to both a charging power source and a load device, the main control chip enters a simultaneous charging and discharging mode, adjusting the power output according to the input power. The sum of output power requirements Battery safe charging power limit and the upper limit of battery sustainable discharge power The relationship between them enables power balance control.

[0015] Step S8: The main control chip continuously monitors the voltage and current status of each output port and performs port short circuit detection, port overcurrent protection and port reverse connection protection.

[0016] In this process, the power allocation result of step S5 and the fast charging negotiation result of step S6 are fed back to step S7 in real time; the port anomaly detection result of step S8 is fed back to step S5 and step S6 in real time; the abnormal events recorded in step S1 are reported to the outside through step S3, forming a closed-loop control system.

[0017] Further, in step S1, the voltage and current acquisition module acquires the single-cell voltage, total voltage, and charge / discharge current of the battery pack at a preset sampling frequency, and the temperature acquisition module acquires the surface temperature of the battery pack at a preset sampling frequency. The main control chip calculates the State of Charge (SOC) using an ampere-hour integration method combined with an extended Kalman filter algorithm. Abnormal events include: single-cell voltage exceeding a preset overvoltage threshold or falling below a preset undervoltage threshold, charge / discharge current exceeding a preset current threshold, and battery temperature exceeding a preset high-temperature threshold or falling below a preset low-temperature threshold. When an abnormality occurs, the main control chip records the abnormality type and a timestamp accurate to the minute in non-volatile memory.

[0018] Further, in step S2, the main control chip reads the real-time SOC value from step S1, determines the energy level of the battery based on the current SOC value, generates corresponding power consumption control commands, and sends them to each functional module, including:

[0019] When the battery SOC is greater than or equal to the first preset threshold, the system operates in full-function mode: voltage and current acquisition runs at the normal sampling frequency, temperature acquisition runs at the normal sampling frequency, battery status data is sent via Bluetooth at the normal cycle, SOC calculation uses the complete algorithm, fast charging protocol is negotiated normally, and abnormal events are recorded and reported normally.

[0020] When the battery SOC is lower than the first preset threshold but higher than or equal to the second preset threshold, the system operates in a light energy-saving mode: the voltage and current sampling frequency is reduced to 50% of the normal value, the temperature sampling frequency is reduced to 50% of the normal value, the Bluetooth data transmission cycle is extended, the non-volatile memory write operation frequency is reduced, the SOC calculation cycle is extended, the fast charging protocol negotiation and output are multiplied by the preset energy-saving coefficient on the original basis, and the abnormal event recording function remains unchanged.

[0021] When the battery SOC is lower than the second preset threshold but higher than or equal to the third preset threshold, the system runs in deep energy-saving mode: the voltage and current sampling frequency is reduced to 20% of the normal value, the temperature sampling frequency is reduced to 20% of the normal value, Bluetooth data transmission is completely disabled, non-volatile memory writes only retain abnormal event records, SOC calculation is switched to a simplified algorithm, fast charging protocol negotiation is completely disabled, and all ports are forced to fall back to normal charging mode.

[0022] When the battery SOC is lower than the third preset threshold, the system operates in minimum power supply mode: the voltage sampling frequency is reduced to the minimum maintenance level, the current sampling frequency is reduced to the minimum maintenance level, the temperature sampling frequency is reduced to the minimum maintenance level, Bluetooth data transmission is completely disabled, all write operations to non-volatile memory are suspended, SOC calculation is suspended, fast charging protocol negotiation is completely disabled, and port short circuit detection and overcurrent protection are maintained.

[0023] When the battery's SOC recovers to above the threshold of the previous energy level, the main control chip automatically resumes the operation of the corresponding functional modules. The first preset threshold is higher than the second preset threshold, and the second preset threshold is higher than the third preset threshold.

[0024] Further, in step S3, the battery status data includes total battery voltage data, charge / discharge current data, battery temperature data, state of charge data, cycle count data, abnormal alarm code data, timestamp data, and current energy management mode code data; wherein, the charge / discharge current is represented by positive values ​​for discharging and negative values ​​for charging; the abnormal alarm code adopts a bit mapping method, with each bit corresponding to overvoltage, undervoltage, overcurrent, overtemperature, undertemperature, and port short circuit abnormality types; the current energy management mode code is used by the terminal device to identify whether the power bank is currently in a low-power state.

[0025] Furthermore, in step S4, the main control chip dynamically calculates the current maximum available total power according to the following formula. : , in, This refers to the battery's nominal maximum output power. Real-time battery temperature. Temperature coefficient; This is the real-time battery voltage. Voltage coefficient; In a charged state, is the state coefficient of charge.

[0026] The temperature coefficient Calculated using the following piecewise function: , in, To preset the minimum operating temperature, To preset the maximum operating temperature, and To define the lower and upper boundaries of the preset low-temperature range, and These are the lower and upper bounds of the preset high-temperature range. That is, when the battery temperature is in the low-temperature range... It increases linearly from 0 to 1.0 with increasing temperature, and when within the normal temperature range... Take the maximum value of 1.0 when in the high temperature range. It decreases linearly from 1.0 to 0 as the temperature rises, and returns to zero when it exceeds the preset operating temperature range.

[0027] The voltage coefficient Calculated using the following piecewise function: , in, The preset discharge cutoff voltage is used. To preset the low-voltage threshold, This is a preset high-voltage threshold. That is, when the voltage of a single battery cell is lower than a preset low-voltage threshold... Return to zero, between the preset low-pressure threshold and the preset high-pressure threshold. It increases linearly from 0 to 1.0, and remains at 1.0 when it exceeds the preset high voltage threshold.

[0028] The state of charge coefficient Calculated using the following piecewise function: , in, To preset a low battery threshold, This is a preset low battery threshold. That is, when the State of Charge (SOC) is below a preset low battery threshold... Reset to zero, between the preset low battery threshold and the preset medium battery threshold. It increases linearly from 0 to 1.0, and remains at 1.0 when it exceeds the preset power threshold.

[0029] The calculation result It is also affected by the power consumption level in step S2. In the light energy-saving mode, it is multiplied by the preset energy-saving coefficient, and in the deep energy-saving mode, it is further reduced.

[0030] Furthermore, in step S5, the preset priority of each output port is as follows: the port with its own charging cable has a higher priority than the USB-C port. The power allocation strategy is: prioritize responding to fast charging power requests from high-priority ports, and allocate the remaining power to low-priority ports; when the total requested power exceeds... When a load device on a port is unplugged, the main control chip immediately reclaims the power quota for that port and redistributes it to another port.

[0031] Further, in step S6, the three-level verification includes: Level 1, Security Verification: Verify the target voltage negotiated in the protocol. Does it not exceed the preset upper limit of the battery voltage ratio, and the target current? Does it not exceed the battery's maximum sustainable discharge current? If any condition is not met, the current fast charging level will be rejected and the charging mode will be switched back to normal charging mode. The second level is dynamic constraint: based on the battery's real-time temperature and state of charge, combined with the available total power calculated in step S4. Further constrain the upper limit of fast charging output power, fast charging power Limited by ,in This is the preset power margin coefficient; Level 3, Abnormal Disabling: When the battery temperature, single cell voltage, or charging / discharging current exceeds the preset safety protection threshold, the main control chip immediately disconnects the fast charging output of the corresponding port, records the abnormal event, and triggers step S3 to report it to the outside.

[0032] Furthermore, in step S7, the power balance control is performed according to the following strategy: when At this time, the input power is prioritized to meet the output, and the surplus power is limited to no more than [amount missing]. The power used to charge the battery does not exceed the preset charging rate; when step S2 determines that the battery is in a low power state, the charging priority is automatically increased. when and At that time, the input power and the battery discharge power together satisfy the output, and the battery discharge power is Furthermore, the battery SOC must not be lower than the preset safe discharge threshold; when and When the power allocation is reset, step S5 is triggered to reduce the output power of low-priority ports. If the power allocation is still not satisfied after derating, the output derating protection is activated, and the output power of each port is reduced step by step according to the preset step size.

[0033] Furthermore, in step S7, when the main control chip switches between the three working modes of charging, discharging, and simultaneous charging and discharging, it achieves a smooth transition of the output port voltage through feedforward-feedback composite control: the feedforward control adjusts the duty cycle in advance according to the target voltage change, and the feedback control performs closed-loop correction according to the deviation between the actual output voltage and the target voltage to ensure that the output voltage drop does not exceed the preset threshold at the moment of switching.

[0034] Further, in step S8, the port short-circuit detection is as follows: when the main control chip detects a sudden drop in output voltage and a sharp rise in current exceeding a preset short-circuit current threshold, it determines that a short circuit has occurred at the port, immediately disconnects the output of the port, and attempts to automatically recover after a preset delay; the port overcurrent protection is as follows: when the output current of any port exceeds a preset overcurrent protection threshold, the main control chip immediately triggers derating protection, reduces the output power to below the protection threshold, and records the overcurrent abnormal event in non-volatile memory; the port reverse connection protection is as follows: when the main control chip detects a reverse connection state, it immediately shuts off the output switch of the port to prevent current backflow.

[0035] A smart charging and discharging management system for mobile power banks, wherein all control logic is implemented on a single main control chip, the system comprising: The battery pack is used to store electrical energy and output it to various ports; The voltage and current acquisition module, connected to the battery pack, includes a current sensing resistor and an operational amplifier, and is used to acquire battery voltage and charging / discharging current in real time. It supports dynamic adjustment of the acquisition frequency to adapt to different power consumption modes. The temperature acquisition module includes a surface-mount NTC thermistor, which is placed on the surface of the battery pack and near the main control chip to collect battery temperature and ambient temperature in real time. It supports dynamic adjustment of the acquisition frequency to adapt to different power consumption modes. Non-volatile memory is used to store real-time monitoring data and abnormal event records, and supports dynamic adjustment of the write frequency to adapt to different power consumption modes. A Bluetooth communication module, connected to the main control chip, is used to send battery status data to terminal devices, such as mobile apps. The buck-boost converter circuit connects the battery pack to each output port, and the two output ports share the same buck-boost converter circuit. It has at least two output ports, where the first output port is the port for the built-in charging cable and the second output port is a USB-C port; The switch control circuits are respectively set between each output port and the buck-boost conversion circuit, and are used to independently turn each output port on or off under the control of the main control chip. The main control chip, connected to the voltage and current acquisition module, temperature acquisition module, non-volatile memory, Bluetooth communication module, buck-boost conversion circuit, switch control circuit and each output port, is configured to execute the method described in any of the above-mentioned embodiments; The main control chip integrates a battery energy management function, which is used to determine the energy level of the battery based on the current SOC value and generate corresponding power consumption control instructions. The power consumption control instructions include acquisition frequency adjustment instructions, transmission frequency adjustment instructions, storage write adjustment instructions, fast charging enable control instructions, and computing load adjustment instructions.

[0036] Compared with the prior art, the present invention has the following advantages:

[0037] 1. Achieve adaptive power degradation under low battery conditions, prioritizing external power output. In existing technologies, the battery status monitoring, information reporting, and fast charging negotiation modules of power banks operate continuously at a fixed frequency, without adjusting according to changes in the remaining battery power. When the State of Charge (SOC) is extremely low, these modules continue to consume precious electrical energy, crowding out power that could be used to charge external devices. This invention introduces a four-level power management mechanism based on SOC levels. When the battery power is sufficient, it provides full functionality; when the SOC decreases, it actively reduces the sampling frequency, extends the Bluetooth transmission cycle, limits fast charging, and even disables non-essential functional modules, prioritizing the use of limited electrical energy for powering external devices. This logic of "intelligently sacrificing its own functions to ensure external power supply when its own energy is insufficient" is only technically significant in power banks. Chargers draw power from the grid without considering their own power consumption, while every milliamp-hour of power in a power bank must be carefully calculated.

[0038] 2. Achieving deep linkage between information reporting and charge / discharge control. This invention uses the battery status information collected in step S1 as both the external data source for step S3 and the control decision input for steps S4, S5, S6, and S7. This enables battery temperature, voltage, SOC, and other status parameters to drive real-time adjustments to the charge / discharge strategy, changing the passive state of information reporting in the prior art, which was only "readable but not usable," and realizing real-time driving of control decisions by monitoring data.

[0039] 3. Implement multi-port dynamic power distribution based on real-time status. This is achieved through temperature coefficient... Voltage coefficient State of charge coefficient The three-coefficient product model calculates the upper limit of available total power in real time. This allows the power distribution to change continuously and dynamically with the battery status, automatically and linearly reducing the rate at high temperatures and proportionally reducing the rate at low SOC. Compared with the existing static preset scheme, this eliminates the safety hazards of high-temperature high-power output and low-SOC over-discharge from the root.

[0040] 4. Achieve coordinated scheduling of simultaneous charging and discharging with fast charging protocols. Through the real-time feedback mechanism from the power allocation results of step S5 and the fast charging negotiation results of step S6 to step S7, the simultaneous charging and discharging control is executed under the constraints of power allocation at each port and fast charging level determination, achieving a dynamic balance between input power, multi-channel output power, and battery safety boundary.

[0041] 5. Implement three-level safety verification for fast charging output. Through the three-level mechanism of safety verification, dynamic constraint, and abnormal disabling in step S6, the fast charging negotiation result and battery safety status are verified step by step. The first level rejects the charging mode that exceeds the voltage and current limits. The second level dynamically constrains the power limit based on the real-time battery status. The third level cuts off the output in real time when an abnormality occurs, which fundamentally solves the problem of the disconnect between fast charging protocol and safety control in existing solutions.

[0042] 6. Achieve systematic integration and cost optimization of new national standard compliance functions. Through the closed-loop control architecture of steps S1 to S8, the functions required by the new national standard, such as real-time monitoring, anomaly storage and retrieval, charging / discharging voltage / current / temperature control, and port protection, are organically integrated into the same control logic. All control logic is completed on a single main control chip, without adding additional hardware costs. This reduces bill of materials costs and PCB area, providing power bank manufacturers with a low-cost, high-efficiency systematic compliance solution. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the method flow provided by the present invention.

[0044] Figure 2 The system structure block diagram provided by the present invention.

[0045] in, Figure 1The process includes: Step S1: Real-time battery status acquisition and anomaly recording; Step S2: Low-power adaptive power degradation control based on SOC level; Step S3: Battery status information reporting based on Bluetooth communication; Step S4: Real-time calculation of total available output power under battery constraints; Step S5: Dual-port independent fast charging negotiation and power allocation under battery constraints; Step S6: Three-level security verification of fast charging protocol negotiation; Step S7: Three-party dynamic balance control in simultaneous charging and discharging mode; Step S8: Port anomaly detection and protection response. Solid arrows in the diagram represent data flow, and dashed arrows represent control feedback. The power allocation results of Step S5 and the fast charging negotiation results of Step S6 are fed back to Step S7 in real time via dashed arrows; the port anomaly detection results of Step S8 are fed back to Steps S5 and S6; and the anomaly events recorded in Step S1 are reported externally via Step S3, forming a closed-loop control system with full-link traceability.

[0046] Figure 2 The system includes: a battery pack 10, a voltage and current acquisition module 20, a temperature acquisition module 30, a non-volatile memory 40, a main control chip 50, a Bluetooth communication module 60, a buck-boost conversion circuit 70, a switch control circuit 80, a first output port 90, and a second output port 100. The voltage and current acquisition module 20, the temperature acquisition module 30, the non-volatile memory 40, the Bluetooth communication module 60, the buck-boost conversion circuit 70, the switch control circuit 80, the first output port 90, and the second output port 100 are all connected to the main control chip 50. The battery pack 10 is connected to the voltage and current acquisition module 20, the temperature acquisition module 30, and the main control chip 50, providing power to each module.

[0047] The same reference numerals in the figure indicate components with the same or similar functions. Figure 1 and Figure 2 Together they constitute the complete technical solution of this invention. Figure 1 The method steps shown are as follows: Figure 2 The various functional modules of the system shown work together to execute. Detailed Implementation

[0048] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0049] In the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "connection" should be interpreted broadly; for example, it can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a mechanical connection or an electrical connection; it can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0050] In this invention, the power bank includes at least a battery pack, a main control chip, a voltage and current acquisition module, a temperature acquisition module, a non-volatile memory, and at least two output ports. The output ports include at least one USB-C port and one port with a built-in charging cable.

[0051] Example 1

[0052] Figure 1 This is a schematic diagram of the method flow provided by the present invention. This embodiment provides an intelligent charging and discharging management method for a mobile power bank, the method in... Figure 2 Execute on the system shown.

[0053] In this embodiment, the power bank uses a 4-cell lithium-ion battery pack with a nominal voltage of 14.8V and a capacity of 5000mAh. The main control chip is an MCU with integrated Bluetooth communication, such as the FR801xH series. The voltage and current acquisition module uses a dedicated AFE chip, such as the BQ40Z80. The temperature acquisition module uses a surface-mount NTC thermistor. The non-volatile memory is EEPROM. The output ports include a USB-C port as the second output port and a port with a built-in USB-C charging cable as the first output port. The main control chip communicates with the AFE chip via the I²C bus and with terminal devices such as mobile phones via a Bluetooth antenna.

[0054] like Figure 1 As shown, the method includes the following steps:

[0055] Step S1: Real-time battery status acquisition and anomaly recording. The voltage, current and temperature data of the battery pack are acquired in real time through the voltage and current acquisition module and the temperature acquisition module. The main control chip calculates the state of charge of the battery and writes the real-time data and abnormal events into the non-volatile memory.

[0056] Step S2: Low-power adaptive power degradation control based on SOC level. The main control chip reads the real-time SOC value from step S1, determines the energy level of the battery based on the current SOC, generates corresponding power control instructions, and dynamically adjusts the operating level of each functional module.

[0057] Step S3: Battery status information reporting based on Bluetooth communication. The main control chip sends the battery status data collected in step S1 to the terminal device, such as a mobile APP, via Bluetooth communication. The data includes the current energy management mode code.

[0058] Step S4: Real-time calculation of the total available output power under battery constraints. The main control chip calculates the total available output power in real time based on the real-time battery status parameters collected in step S1, using the temperature coefficient. Voltage coefficient State of charge coefficient The three-coefficient product model dynamically calculates the upper limit of the currently available total power. .

[0059] Step S5: Dual-port independent fast charging negotiation and power allocation under battery constraints. The main control chip allocates power based on the preset priority of each output port and the fast charging protocol request of the connected device, within the available total power. The actual output power of each port is allocated within the range.

[0060] Step S6: Three-level security verification for fast charging protocol negotiation; the main control chip will determine the target voltage for protocol negotiation. and target current A three-level verification is performed on the battery safety status collected in step S1, including safety verification, dynamic constraints, and abnormal disabling.

[0061] Step S7: Three-way dynamic balance control in simultaneous charging and discharging mode. When the power bank is simultaneously connected to a charging power source and a load device, the main control chip enters the simultaneous charging and discharging working mode, and adjusts the power output according to the input power. The sum of output power requirements Battery safe charging power limit and the upper limit of battery sustainable discharge power The relationship between them enables power balance control.

[0062] Step S8: Port abnormal state detection and protection response. The main control chip continuously monitors the voltage and current status of each output port and performs port short circuit detection, port overcurrent protection and port reverse connection protection.

[0063] In this process, the power allocation result of step S5 and the fast charging negotiation result of step S6 are fed back to step S7 in real time; the port anomaly detection result of step S8 is fed back to step S5 and step S6 in real time; the abnormal events recorded in step S1 are reported to the outside through step S3, forming a closed-loop control system.

[0064] Specifically, in step S1, the voltage and current acquisition module acquires the voltage of each cell and the total voltage of the battery pack at a sampling frequency of 1Hz, and acquires the charging and discharging current at a sampling frequency of 1Hz. The temperature acquisition module acquires the surface temperature of the battery pack at a sampling frequency of 0.5Hz. The main control chip reads the voltage, current, and temperature data from the AFE chip via the I²C bus, and calculates the battery's state of charge using the ampere-hour integration method combined with the extended Kalman filter algorithm, with a calculation period of 1 second. The main control chip writes the real-time acquired voltage, current, temperature, state of charge, and other data, as well as detected abnormal events, into the EEPROM.

[0065] Specifically, in step S2, the main control chip reads the real-time SOC value from step S1. The current SOC is 80%, which is greater than the first preset threshold of 15%, and the system is running in full-function mode. The main control chip generates power consumption control instructions corresponding to the full-function mode: voltage and current acquisition runs at 1Hz, temperature acquisition runs at 0.5Hz, Bluetooth data is sent at 1-second intervals, SOC calculation uses a complete algorithm, fast charging protocol is negotiated normally, and abnormal events are recorded and reported normally.

[0066] Specifically, in step S3, the main control chip sends the battery status data collected and stored in step S1 to a terminal device, such as a mobile app, via the Bluetooth communication module. The data sent is shown in Table 1 below:

[0067] Table 1

[0068] Total battery voltage Current total battery pack voltage, in mV Charging and discharging current Positive indicates discharging, negative indicates charging, unit mA Battery temperature Current battery temperature, in units of 0.1℃ State of charge (SOC) Current battery state of charge, in % Loop count Battery cumulative charge-discharge cycles Abnormal alarm codes Bit mapping: Bit0 - Overvoltage, Bit1 - Undervoltage, Bit2 - Overcurrent, Bit3 - Overtemperature, Bit4 - Undertemperature, Bit5 - Port short circuit Anomaly timestamp Timestamp of the most recent anomaly Energy Management Mode Coding 00 - Full-function, 01 - Mild energy saving, 10 - Deep energy saving, 11 - Minimal power consumption

[0069] The main control chip transmits real-time data and anomaly logs to the terminal device via Bluetooth according to the above data content. The current energy management mode is coded as 00, indicating that it is currently in full-function mode. After receiving the data, the terminal device parses and displays the power bank's current battery status and current energy management mode.

[0070] Specifically, in step S4, the main control chip dynamically calculates the current maximum available total power based on the real-time battery status parameters collected in step S1 using the following formula. : , in, In this embodiment, the rated maximum output power of the battery is used. .

[0071] Temperature coefficient Determine as follows: when the battery temperature... When in the low temperature range of -10℃ to 10℃, The value is 0 at -10℃ and 1.0 at 10℃, with a linear variation in between; when within the normal temperature range of 10℃ to 45℃, Take the maximum value of 1.0; when in the high temperature range of 45℃ to 60℃, The value is 1.0 at 45℃ and 0 at 60℃, with a linear variation in between. Specifically, , , , , , Exceeding The range is zeroed out.

[0072] Voltage coefficient Determine as follows: when the voltage of a single battery cell... Below 3.0V Zeroing out; between 3.0V and 3.3V. It increases linearly from 0 to 1.0; above 3.3V... Keep it at 1.0. Specifically, , , , , , .

[0073] State of charge Determined as follows: When SOC is below 5% Zero; between 5% and 20% It increases linearly from 0 to 1.0; when it exceeds 20%. Keep it at 1.0. Specifically, , , , , , .

[0074] The current battery temperature is 25℃, which is within the normal temperature range. The average voltage of a single section is 4.0V. SOC is 80%. Calculation yields .

[0075] Specifically, in step S5, the main control chip determines the priority of each output port based on its preset priority. The port with its own cable (the first output port) has a higher priority than the USB-C port (the second output port) and the fast charging protocol request from the connected device. This is based on the available total power. The actual output power of each port is allocated within the range.

[0076] Specifically, in step S6, the main control chip automatically identifies and negotiates fast charging protocols for the devices connected to each output port. Supported fast charging protocols include PPS, PD3.0, QC4+, SCP, and FCP. After negotiation, the main control chip sets the target voltage for the negotiated protocol. and target current Perform a three-level verification with the battery safety status collected in step S1.

[0077] Specifically, in step S7, when the power bank is connected to both the charging power supply and the load device at the same time, the main control chip enters the charging and discharging working mode and performs power balance control according to three strategies.

[0078] Specifically, in step S8, the main control chip continuously monitors the voltage and current status of each output port and performs port short circuit detection, port overcurrent protection, and port reverse connection protection.

[0079] The following describes the complete working process of the method described in this embodiment in detail using a specific application scenario.

[0080] Phase 1: Status monitoring and reporting in standby mode

[0081] In its initial state, the power bank's battery temperature is 25℃, the average voltage per cell is 4.0V, and the SOC is 80%. Based on the formula in step S4, the following can be calculated: At this time, the user has not connected any load device, and the power bank is in standby mode.

[0082] Step S1 continuously collects battery status data at a sampling frequency of 1Hz, including total battery voltage of 14.8V, charging and discharging current of 0A, temperature of 25℃, and SOC of 80%. All data is written to EEPROM in real time.

[0083] Step S2 generates a full-function mode command based on the current SOC=80% and SOC≥15%: voltage and current acquisition runs at 1Hz, temperature acquisition runs at 0.5Hz, Bluetooth data is sent in 1-second cycles, SOC calculation uses a complete algorithm, fast charging protocol is negotiated normally, and abnormal events are recorded and reported normally.

[0084] Step S3 continuously sends the aforementioned battery status data to a terminal device, such as a mobile app, via Bluetooth. The sent data includes an energy management mode code of 00, indicating that the device is currently in full-function mode. Because... and Step S4 calculation However, there is no effective output allocation, no load allocation task in step S5, no fast charging negotiation task in step S6, no simultaneous charging and discharging mode in step S7, and normal status of each port in step S8.

[0085] Step S3 continuously sends the current status to the terminal device, and the mobile app can display information such as SOC, voltage, and temperature in real time. Each step is in standby mode, waiting for the load to connect.

[0086] Phase Two: Load Connection and Port Power Allocation

[0087] When a user connects a laptop that supports PD fast charging to the first output port (the port with the built-in cable), the port requests 66W fast charging from the main control chip; when a user connects a mobile phone to the second output port (the USB-C port), the port requests 40W fast charging from the main control chip.

[0088] Step S1 detects that the output current changes from 0A to the load current, and the total current of the laptop and mobile phone is approximately The current data is immediately updated to memory and written to EEPROM.

[0089] Step S2 still maintains the full-function mode instruction based on the current SOC=80%, and all modules operate normally.

[0090] Step S5 allocates power based on the requests from the two ports and preset priorities: the first output port, i.e., the port with built-in cable, has higher priority than the second output port, i.e., the USB-C port, and the 66W request from the first output port is prioritized; the total requested power is 66W + 40W = 106W, while the current step S4 calculates... When the total requests exceed the available limit, the main control chip reduces the lower priority of the second output port from 40W to 34W. The allocation result of step S5 is 66W for the first output port and 34W for the second output port.

[0091] Step S3 sends the updated power distribution information to the outside via Bluetooth, and the mobile APP can view the current output power distribution of each port in real time.

[0092] Phase 3: Fast Charging Protocol Negotiation and Step-by-Step Security Verification

[0093] Step S6 involves identifying and negotiating fast charging protocols for both ports. The laptop requests multiple fast charging levels sequentially via the PD protocol:

[0094] First, request the 20V / 3.3A, 66W setting. Step S6 performs the first-level safety check. It needs to be verified whether it does not exceed 20V>13.6V, verification failed, 66W setting rejected.

[0095] Laptop downgrade request: 15V / 3A, 45W Still >13.6V, continue to refuse.

[0096] The laptop continues to request 12V / 3A, 36W. and The first level of validation passed. Proceeding to the second level of dynamic constraints. The verification passed. The Level 3 anomaly disable function detected a normal battery temperature of 25°C and no abnormal event records; the verification passed. Ultimately, the laptop outputs 12V / 3A, 36W fast charging instead of the initially requested 66W.

[0097] At the same time, step S6 completes the fast charging protocol negotiation for the mobile phone port. All three levels of verification for the 34W level are passed, and the mobile phone outputs 34W fast charging.

[0098] Phase 4: Discharge Mode Confirmation and Continuous Operation

[0099] Step S7 determines that no charging power is currently connected. Without entering the simultaneous charging and discharging mode, the battery supplies power to both ports independently, with a total output power of 36W + 34W = 70W. Step S7 continuously monitors the charging, discharging, and simultaneous charging and discharging status in the three operating modes. Always maintain the discharge mode.

[0100] Step S8 continuously monitors the voltage and current status of the two ports. The status of each port is normal, and no short circuit, overcurrent or reverse connection events occur.

[0101] Phase 5: Continuous Closed-Loop Operation and Response to State Changes

[0102] During the above process, step S3 continuously sends the current status to the terminal device via Bluetooth, including information such as the laptop charging at 36W, the phone charging at 34W, the battery temperature at 25℃, and the SOC gradually decreasing. The mobile app updates and displays this information in real time. Each step operates collaboratively: a complete closed-loop cycle of steps S1, S2, S3, S4, S5, S6, S7, and S8 is completed every second. Step S1 updates the battery status, with the SOC gradually decreasing from 80%. Step S2 maintains the full-function mode command based on the SOC, keeping the SOC above 15%. Step S4 maintains the SOC based on changes in SOC. Because the SOC is still above 20%, Step S5 maintains power allocation for each port, step S6 maintains fast charging output for each port, step S7 maintains discharge mode confirmation, step S8 maintains port monitoring, and step S3 sends the latest status to the mobile APP via Bluetooth.

[0103] If the laptop suddenly enters standby mode and the requested power drops from 36W to 10W, step S5 immediately responds: the total output power drops to 44W, and step S3 sends the power change information to the mobile app via Bluetooth. Step S5 redistributes the released power to the second output port. If the phone still requests 34W, and the total power demand is 10W + 34W = 44W, which is less than... Then the second output port can obtain the full 34W, realizing dynamic power adjustment.

[0104] If the phone is unplugged, step S5 adjusts the allocated power of the first output port from 36W to its actual requested value, and step S6 stops fast charging negotiation on the second output port. Each step tracks system status changes in real time and dynamically adjusts parameters.

[0105] The above steps operate continuously and in real time under the unified scheduling of the main control chip. The power allocation result of step S5 and the fast charging negotiation result of step S6 are fed back to step S7 in real time; the port anomaly detection result of step S8 is fed back to steps S5 and S6 in real time; the abnormal events recorded in step S1 are reported externally through step S3. The eight steps are interconnected and mutually supportive, together constituting the complete closed-loop control system of this invention.

[0106] Example 2

[0107] This embodiment has the same system configuration as Embodiment 1, and aims to demonstrate the detection, reporting, and control response process of each module when an abnormal battery temperature occurs during the use of the power bank. The difference between this embodiment and Embodiment 1 is that: step S1 detects an abnormal temperature rise, triggering power derating in step S4 and abnormal disabling in step S6.

[0108] In this embodiment, the power bank initially operates normally in a dual-port fast charging mode of 66W + 34W. During operation, the battery temperature gradually rises because the user places the power bank in a high-temperature environment and continuously outputs high power.

[0109] In this embodiment, the configuration of each step is as follows:

[0110] Step S1 involves continuously collecting the surface temperature of the battery pack at a sampling frequency of 0.5Hz and writing the real-time temperature data into the EEPROM. When the temperature reaches different thresholds, corresponding control actions are triggered.

[0111] Step S2 is based on the current SOC. In this embodiment, the instruction is to maintain full-function mode at 60%, and the power consumption degradation function is not triggered.

[0112] Step S3 sends battery status data, including the temperature field, to the outside via Bluetooth at fixed intervals, and sends an abnormal alarm code when the temperature is abnormal.

[0113] Step S4 based on battery temperature Dynamic calculation of temperature coefficient According to piecewise functions , Calculate the temperature coefficient in the high-temperature range: at 45℃ At 50℃ At 55℃ Thus, dynamically adjust .

[0114] Step S5 is based on the calculation in step S4 Power is redistributed, prioritizing the first output port.

[0115] The second level of dynamic constraints in step S6 are based on Synchronous limit on fast charging power upper limit, Level 3 anomaly disabled when triggered at 60℃.

[0116] Step S7 Detect the current It is in pure discharge mode and performs discharge according to the allocation result of step S5.

[0117] Step S8 continuously monitors the status of each port. When the temperature is abnormal, the hardware status of each port is normal.

[0118] The working process of this embodiment is described in detail below in stages.

[0119] Phase 1: Normal temperature range, battery temperature below 45℃

[0120] Step S1 continuously collects the surface temperature of the battery pack at a sampling frequency of 0.5Hz, and writes the real-time temperature data to the EEPROM. Step S3 sends the battery status data, including the temperature field, to the outside via Bluetooth at fixed intervals. Step S4 calculates the total available power. Temperature coefficient Step S5: Normal allocation: First output port 66W, second output port 34W. Step S6: All three levels of verification pass, fast charging output is normal. Step S7: Entering pure discharge mode. Step S8: All ports are in normal status.

[0121] Phase Two: High Temperature Warning Zone, battery temperature reaches 45℃ but is below 50℃

[0122] When step S1 detects that the battery temperature has risen to 45℃, the main control chip determines that the temperature has entered the high-temperature warning range and updates this temperature data to the memory in real time. Step S3 continues to send data via Bluetooth, but has not yet triggered an abnormal shutdown. Step S4 detects... hour, , The power remains at 100W, and the power allocation remains unchanged for the time being. The second-level dynamic constraint in step S6 is also due to... The original fast charging power limit remains unchanged. During this stage, only temperature changes are recorded and reported; the charging and discharging strategies are not adjusted.

[0123] Phase 3: High-temperature derating range, battery temperature reaches 50℃ but below 60℃

[0124] When the temperature continues to rise to 50℃, step S1 detects that the temperature has reached the preset derating trigger threshold, immediately updates the temperature data, and marks this state as "high temperature derating". Step S4 recalculates. , Step S5 reallocates power: Prioritizes the 66W request from the first output port, and allocates the remaining power... The power is allocated to the second output port, which reduces its power from 34W to 0.7W. The second-level dynamic constraint in step S6 is based on the new... Recalculate the maximum fast charging power: Step S6 adjusts the fast charging power limit of the first output port from 66W to 60W. Step S7 re-evaluates the second output port: since the power is only 0.7W, it is insufficient to support any fast charging level, and fast charging negotiation stops. Step S7 enters pure discharge mode, and the battery discharge power is reduced from 100W to 60W. Step S3 continuously transmits the current status via Bluetooth.

[0125] If the temperature continues to rise to 55℃, when step S1 detects 55℃, step S4 will recalculate. , Step S5 further reduces the limit, and step S6 further reduces the fast charging power limit to... .

[0126] Phase 4: Abnormal shutdown zone, battery temperature reaches 60℃ or above.

[0127] If the temperature continues to rise to 60℃, step S1 detects that the temperature has reached the abnormal disable threshold. Step S6, the third-level abnormal disable, is immediately triggered. The main control chip disconnects the fast charging output of both ports within 50ms, and the ports return to a non-output state. Step S1 records the over-temperature abnormal event and a timestamp accurate to the minute in the abnormal log area of ​​the non-volatile memory. Step S3 encodes the over-temperature abnormal alarm in the next transmission cycle, setting Bit 3 of the AlarmCode and transmitting it externally via Bluetooth. The mobile app can display the over-temperature alarm information. Step S7 detects that the output power of each port is 0 and exits the discharge mode. Step S8 enters the standby protection state. Step S1 continues to monitor the battery temperature at a sampling frequency of 0.5Hz. When the temperature drops back to the safe range, the system can automatically resume output.

[0128] In the above process, after step S1 detects an abnormal temperature, steps S4 and S6 respond synchronously. Step S4 initiates power derating at 50°C and further derating at 55°C. Step S6 synchronously limits fast charging power through dynamic constraints at 50°C and performs abnormal disable at 60°C, completing the complete closed-loop control link.

[0129] Example 3

[0130] This embodiment has the same system configuration as Embodiment 1, and aims to demonstrate the coordinated scheduling process of each module when the power demand of multiple ports exceeds the power supply capacity in the mobile power bank's simultaneous charging and discharging operation mode. The difference between this embodiment and Embodiments 1 and 2 is that step S7 participates in power balance control, and step S2 triggers power consumption degradation at low SOC.

[0131] In this embodiment, the power bank's initial state is 80% battery SOC and 25°C. The power bank is simultaneously connected to a charging power source and two load devices: input power... The first output port is connected to a laptop, requesting 66W fast charging; the second output port is connected to a mobile phone, requesting 40W fast charging.

[0132] In this embodiment, the configuration of each step is as follows:

[0133] Step S1 continuously monitors the SOC change at a sampling frequency of 1Hz, with an initial SOC of 80%.

[0134] Step S2 generates corresponding power consumption control instructions based on the SOC level: full-function mode when SOC=80%; mild power saving mode when SOC drops to 18%; deep power saving mode when SOC drops to 8%.

[0135] Step S3 continuously sends the battery status and current energy management mode code via Bluetooth.

[0136] Step S4: Calculate based on SOC According to piecewise functions , Calculate: When SOC = 80% , When SOC=18% , In light energy-saving mode, multiplying by 0.9 gives an actual power consumption of 78.0W; when SOC=8%. , .

[0137] Step S5 is based on the calculation in step S4 Power allocation based on port priority: At 66W + 34W; At 66W + 12W; The first output port is 20W and the second output port is 0W.

[0138] Step S6 negotiates the fast charging level based on the allocation result of step S5, and the fast charging negotiation result is fed back to step S7.

[0139] Step S7 executes power balance control: Initially , The 61W difference is made up by battery discharge; at the second lowest SOC The difference decreases after reduction; third stage Switch to charging mode when needed.

[0140] Step S8 involves continuously monitoring the status of each port.

[0141] The working process of this embodiment is described in detail below in stages.

[0142] Phase 1: SOC within the normal range, SOC decreases from 80% to 20%.

[0143] Step S1: Continuously collect battery status data at a sampling frequency of 1Hz, with an initial SOC of 80% and a temperature of 25℃. Step S2: Generate a full-function mode command based on SOC=80% and SOC≥15%. Step S3: Continuously transmit battery status data via Bluetooth. Step S4: Based on... , , , Calculate Step S5 allocates 66W to the first output port and 40W to the second output port according to priority. Step S6 performs fast charging negotiation and level 3 verification on both ports respectively. Fast charging is output after successful verification. Step S7 calculates... , The difference is 610,000. Since the current SOC is 80% > 20%, strategy ② is executed, where the battery discharge of 61W and the input of 45W together meet the 106W output requirement. All ports are in normal status during step S8.

[0144] Phase Two: Low SOC warning zone, SOC drops from 20% to 10%.

[0145] When the State of Charge (SOC) drops to 18%, step S1 detects that the SOC has reached the preset safe discharge threshold of 20% and marks it as a "low battery warning". Step S2, based on SOC=18%, which is lower than the first preset threshold of 15% but higher than the second preset threshold of 10%, generates a mild power-saving mode command: frequency reduction and Bluetooth transmission cycle extended to 5 seconds. Step S4 follows a piecewise function. calculate , Due to the slight energy saving coefficient of 0.9, the actual Step S5: Reallocation: First output port 66W, remaining... The power is allocated to the second output port. Step S6 re-negotiates fast charging for the second output port; if the phone does not support the intermediate charging level, it reverts to 5V / 2.4A, 12W. At this time... ,difference In step S7, the battery discharges at 33W to replenish the power, slowing down the rate of SOC decline. In step S3, power mode switching information is sent via Bluetooth, and the mobile app can display the current light power-saving state.

[0146] Phase 3: SOC danger zone, SOC below 10%

[0147] When the SOC continues to drop to 8%, step S1 detects that the SOC has reached the low battery protection threshold of 10% and marks it as "low battery protection". Step S2, based on SOC=8%, which is lower than the second preset threshold of 10% but higher than the third preset threshold of 5%, generates a deep power saving mode command: the sampling frequency is reduced to 0.2Hz, Bluetooth data transmission is completely disabled, and fast charging protocol negotiation is completely disabled. Step S4 calculates according to the same piecewise function. , Step S5: Reassignment: First output port 20W, second output port 0W. Step S6: Fast charging negotiation is completely disabled; all ports are forced to fall back to 5V / 2.4A. Step S7: Calculation. , , Switch to strategy ①, surplus power Charge the battery.

[0148] If the input power is unplugged. Step S7 immediately switches to pure discharge mode, powered by the battery alone at 20W.

[0149] Phase 4: SOC depletion protection, SOC below 5%

[0150] If the SOC drops further below 5%, step S1 detects that the SOC has dropped to 5%. Step S2 generates a minimum power supply mode command: data acquisition is reduced to the minimum maintenance level, Bluetooth data transmission is completely disabled, memory writing is paused, SOC calculation is paused, and fast charging is completely disabled. Step S4 calculates... , Step S5 sets the output power of both ports to 0. Step S6 triggers the third-level exception disable, disconnecting both ports. Step S1 records the undervoltage exception event and timestamp in non-volatile memory. The entire system enters standby protection mode.

[0151] In the above process, the power consumption level decision in step S2 affects the Bluetooth transmission behavior in step S3, the power calculation in step S4, the allocation strategy in step S5, and the verification process in step S6. Step S7 dynamically switches the working mode based on feedback, namely charging and discharging simultaneously, pure discharging, micro-charging, and protection shutdown. All modules form a complete closed loop.

[0152] Example 4

[0153] This embodiment has the same system configuration as Embodiment 1, and aims to demonstrate that in low-power scenarios, the present invention prioritizes external output through adaptive power degradation, allowing limited power to be used as much as possible for charging external devices such as mobile phones. The difference between this embodiment and the previous embodiments is that the four-level power management mechanism in step S2 is the core, actively sacrificing non-essential functions to extend external output time, and Bluetooth transmission is disabled in step S3 under deep power-saving mode.

[0154] In this embodiment, the power bank's initial state is 40% battery SOC and 25°C. The power bank has only one USB-C port connected to the phone, requesting 20W fast charging, but is not connected to a charging power source and is in pure discharge mode.

[0155] In this embodiment, the configuration of each step changes dynamically as the SOC decreases:

[0156] Step S1 continuously collects battery status data at a sampling frequency of 1Hz and writes real-time SOC data to EEPROM.

[0157] Step S2 generates corresponding power consumption control instructions based on the SOC level, which is the core of the embodiment: when SOC=40% and SOC≥15%, full-function mode is activated; when SOC=15%, a light power-saving mode is triggered, i.e., data acquisition frequency is reduced and Bluetooth transmission cycle is extended; when SOC=10%, a deep power-saving mode is triggered, i.e., Bluetooth transmission is disabled, fast charging is disabled, and calculation is simplified; when SOC=5%, a minimum power supply mode is triggered, i.e., data acquisition is reduced to the minimum, storage is paused, and SOC calculation is paused.

[0158] Step S3 adjusts the Bluetooth transmission behavior according to the instructions in step S2: in full-function mode, the transmission cycle is 1 second; in light power-saving mode, the transmission cycle is 5 seconds; and in deep power-saving and minimum power-power modes, Bluetooth transmission is completely disabled.

[0159] Step S4: Based on SOC using a piecewise function , ,calculate When SOC=40% , When SOC=15% , Multiplying by an energy efficiency factor of 0.9 gives 60W; when SOC=10%. , When SOC=5% or below , .

[0160] Step S5 allocates all available power to the USB-C port.

[0161] Step S6 determines whether to allow fast charging negotiation based on the instruction in step S2: fast charging can be negotiated in full-function mode and light energy-saving mode, while fast charging is disabled in deep energy-saving mode and forced to drop back to 5V / 2.4A.

[0162] Step S7 is in pure discharge mode, powered solely by the battery.

[0163] Step S8: Continuously monitor the port status.

[0164] The working process of this embodiment is described in detail below in stages.

[0165] Phase 1: SOC within the normal range, SOC decreases from 40% to 15%.

[0166] Step S1 continuously collects battery status data at a sampling frequency of 1Hz, with the real-time SOC gradually decreasing from 40%. Step S2 generates a full-function mode command based on the current SOC = 40% and SOC ≥ 15%. Step S4 calculates... Step S5 allocates all power to the USB-C port. Step S6 performs fast charging protocol negotiation and level 3 verification on the phone; after successful verification, it outputs 20W fast charging. Step S7 determines... It is powered solely by a battery. In step S3, the battery status is continuously transmitted via Bluetooth at 1-second intervals, and the mobile app displays SOC and other information in real time.

[0167] Phase Two: Mild Energy-Saving Mode, SOC decreases from 15% to 10%.

[0168] When the SOC drops to 15%, step S1 detects that the SOC has reached the first preset threshold. Step S2, based on SOC=15%, which is lower than the first preset threshold of 15% but higher than the second preset threshold of 10%, generates a mild power-saving mode command: the sampling frequency is reduced from 1Hz to 0.5Hz, the temperature sampling frequency is reduced from 0.5Hz to 0.25Hz, the Bluetooth transmission cycle is extended from 1 second to 5 seconds, the storage write frequency is reduced, the SOC calculation cycle is extended to 2 seconds, and the fast charging negotiation and output are multiplied by a power-saving coefficient of 0.9. Step S4 calculates... , Multiplying by 0.9, the actual power is 60W. Step S6 renegotiates based on the new power limit, reducing the phone's fast charging power. Energy consumption of each module decreases, and the saved energy is used entirely for external output.

[0169] Phase 3: Deep energy-saving mode, SOC decreases from 10% to 5%.

[0170] When the State of Charge (SOC) drops to 10%, step S1 detects that the SOC has reached the second preset threshold. Step S2, based on SOC=10%, which is 10% below the second preset threshold but 5% above the third preset threshold, generates a deep power-saving mode command: the sampling frequency is reduced to 0.2Hz, the temperature sampling frequency is reduced to 0.1Hz, Bluetooth transmission is completely disabled, the Bluetooth module enters sleep mode, non-volatile memory is written to retain only abnormal event records, the SOC calculation is switched to a simplified algorithm, the Kalman filter is turned off, and fast charging protocol negotiation is completely disabled. Step S4 calculates... , Step S6: Fast charging negotiation is disabled, forcibly dropping back to 5V / 2.4A, approximately 12W. Bluetooth transmission is turned off, and the fast charging circuit is disabled, reducing power loss and improving actual output efficiency.

[0171] Phase 4: Minimum power supply mode, SOC below 5%

[0172] When the State of Charge (SOC) drops below 5%, step S1 detects that the SOC has reached the third preset threshold. Step S2 generates a minimum power supply mode command: voltage sampling is reduced to 0.1Hz, current sampling is reduced to 0.1Hz, temperature sampling is reduced to 0.05Hz, Bluetooth transmission is completely disabled, an undervoltage event is recorded only when the voltage reaches the discharge cutoff voltage, all writes to non-volatile memory are paused, SOC calculation is paused, and fast charging is completely disabled. Step S4 calculates... , Step S5 allocates the output power to 0. Step S6 triggers the third-level abnormality disable, and the main control chip disconnects the USB-C port within 50ms. Step S1 records the undervoltage abnormality event and timestamp in non-volatile memory, and the entire system enters standby protection state.

[0173] In the above process, the four-level power management mechanism in step S2 plays a crucial role: full-function operation when the SOC drops from 40% to 15%; actively reducing the acquisition and Bluetooth transmission frequency when it drops to 15% to reduce the power consumption of sensors and communication modules; disabling Bluetooth transmission and fast charging negotiation when it drops to 10%, using all the saved power for external output; and maintaining only basic safety monitoring when it drops to 5%. Compared with traditional solutions, this embodiment, through adaptive power degradation, enables external devices such as mobile phones to achieve longer charging times, realizing the core function of the power bank in "prioritizing external output".

[0174] Example 5

[0175] Figure 2 This is a system structure block diagram provided by the present invention. This embodiment provides an intelligent charging and discharging management system for a mobile power bank, the structure of which is as follows: Figure 2As shown, it includes a battery pack 10, a voltage and current acquisition module 20, a temperature acquisition module 30, a non-volatile memory 40, a main control chip 50, a Bluetooth communication module 60, a buck-boost conversion circuit 70, a switch control circuit 80, a first output port 90, and a second output port 100.

[0176] The battery pack 10 is used to store electrical energy and output it to each port. It can be a lithium-ion battery or a lithium polymer battery. The number of battery strings can be 2, 3, 4 or more, depending on the product design requirements.

[0177] The voltage and current acquisition module 20 is connected to the battery pack 10 and includes a current sensing resistor and an operational amplifier or a dedicated AFE chip. It is used to acquire battery voltage and charging / discharging current in real time, with a voltage acquisition accuracy of ±10mV and a current acquisition accuracy of ±50mA. This module supports dynamic adjustment of the acquisition frequency to adapt to different power consumption modes.

[0178] The temperature acquisition module 30 includes a surface-mount NTC thermistor, which is placed on the surface of the battery pack and near the main control chip. It is used to acquire the battery temperature and ambient temperature in real time. The temperature acquisition accuracy is ±1℃, and it supports dynamic adjustment of the acquisition frequency to adapt to different power consumption modes.

[0179] The non-volatile memory 40 uses EEPROM or Flash to store real-time monitoring data and abnormal event records, and supports dynamic adjustment of the write frequency to adapt to different power consumption modes.

[0180] The Bluetooth communication module 60 is connected to the main control chip 50 and is used to send battery status data to terminal devices such as mobile phone APP. It supports dynamic adjustment of the sending frequency to adapt to different power consumption modes.

[0181] The buck-boost converter circuit 70 connects the battery pack to each output port. The two output ports share the same buck-boost converter circuit to reduce hardware costs and PCB area.

[0182] The switch control circuit 80 is respectively set between each output port and the buck-boost conversion circuit, and is used to independently turn on or off each output port under the control of the main control chip.

[0183] At least one of the first output port 90 and the second output port 100 is a USB-C port, and at least one is a port with a built-in charging cable or a USB-A port, used to connect external load devices. The two ports share a single buck-boost conversion circuit.

[0184] The main control chip 50 is connected to the voltage and current acquisition module 20, temperature acquisition module 30, non-volatile memory 40, Bluetooth communication module 60, buck-boost conversion circuit 70, switch control circuit 80, first output port 90 and second output port 100, and includes one or more processors, on which executable instructions are stored. When the instructions are executed by the processor, they implement the method described in any of the above embodiments.

[0185] The main control chip 50 integrates battery energy management functions and works in conjunction with the voltage and current acquisition module 20 to determine the energy level of the battery based on the current SOC value and generate corresponding power consumption control instructions. The power consumption control instructions include acquisition frequency adjustment instructions, transmission frequency adjustment instructions, storage write adjustment instructions, fast charging enable control instructions, and calculation load adjustment instructions.

[0186] In this embodiment, during system operation, the voltage and current acquisition module 20 and the temperature acquisition module 30 collect battery status data in real time and transmit it to the main control chip 50. The main control chip 50 stores the data in a non-volatile memory 40. The main control chip 50 determines the energy level based on the SOC value and generates power consumption control commands. The main control chip 50 adjusts the operating level of each module according to the power consumption control commands and sends the battery status data to the terminal device via the Bluetooth communication module 60. The main control chip 50 dynamically allocates the output power of each port according to the real-time battery status. When a charging power supply and a load are connected simultaneously, the main control chip 50 performs simultaneous charging and discharging power balance control. The main control chip 50 performs fast charging protocol identification and three-level safety verification on each port. The main control chip 50 continuously monitors the abnormal status of each port and executes protection responses. All functional modules work collaboratively under the unified scheduling of the main control chip 50, forming a closed-loop control system.

[0187] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for intelligent charging and discharging management of a portable power bank, the portable power bank comprising a battery pack, a main control chip, a non-volatile memory, and at least two output ports, characterized in that, The method includes: Step S1, Real-time Battery Status Acquisition and Anomaly Recording: Real-time acquisition of voltage, current, and temperature data of the battery pack, and calculation of state of charge. Real-time data and abnormal events are recorded in the non-volatile memory; Step S2, Adaptive power consumption degradation control: Determine the energy level based on the state of charge, generate power consumption control commands, and adjust the operating level of each functional module; Step S3, Bluetooth communication information reporting: Send battery status data to the terminal device via Bluetooth communication. The data includes at least voltage, current, temperature, state of charge, abnormal alarm code, and current energy management mode code. Step S4, Calculation of available total power: Calculate the current upper limit of available total power based on the real-time battery status parameters. ; Step S5, Power Allocation and Fast Charging Negotiation: Based on the preset priority of each output port and the fast charging protocol request, in Distribute the output power of each port within the range; Step S6, Fast Charging Safety Verification: After the fast charging negotiation is completed, the negotiation results are verified step by step for safety. Step S7, Power balance control while charging and discharging: When the power bank is connected to both a charging power source and a load at the same time, power balance control is performed based on the input power, output power requirements and the upper limit of battery charging power. Step S8, Port Abnormal Protection: Monitor the voltage and current of each output port and execute port abnormal protection; In this process, the power allocation result of step S5 and the fast charging negotiation result of step S6 are fed back to step S7; the port anomaly detection result of step S8 is fed back to steps S5 and S6; and the abnormal event of step S1 is reported to the outside through step S3, forming a closed-loop control system.

2. The method according to claim 1, characterized in that, In step S2, when the battery state of charge is greater than or equal to the first preset threshold, it operates in full-function mode; when it is lower than the first preset threshold but higher than or equal to the second preset threshold, it operates in light energy-saving mode, and the collection and reporting frequency is reduced; when it is lower than the second preset threshold but higher than or equal to the third preset threshold, it operates in deep energy-saving mode, and reporting and fast charging are disabled; when it is lower than the third preset threshold, it operates in minimum power supply mode, and all non-essential functions are turned off; the first, second, and third preset thresholds decrease sequentially.

3. The method according to claim 1, characterized in that, In step S4, the upper limit of available total power Calculate using the following formula: in, This refers to the battery's nominal maximum output power. Real-time battery temperature; This refers to the real-time battery voltage. It is in a charged state; The temperature coefficient Determined by the following piecewise function: in, To preset the minimum operating temperature, To preset the maximum operating temperature, and To define the lower and upper boundaries of the preset low-temperature range, and These are the lower and upper boundaries of the preset high-temperature range; The voltage coefficient Determined by the following piecewise function: in, The preset discharge cutoff voltage is used. To preset the low-voltage threshold, The preset high voltage threshold is used; The state of charge coefficient Determined by the following piecewise function: in, To preset a low battery threshold, This is the preset battery level threshold.

4. The method according to claim 1, characterized in that, In step S5, the port with the built-in charging cable has a higher priority than the USB-C port; fast charging requests from high-priority ports are responded to first, and the remaining power is allocated to low-priority ports; when the total requested power exceeds... When the load on a port is unplugged, the power of that port is reclaimed and redistributed to another port.

5. The method according to claim 1, characterized in that, In step S6, the step-by-step verification includes: a first-level security verification, verifying the target voltage. Does it not exceed the preset upper limit of the battery voltage ratio, and the target current? Does it not exceed the battery's maximum sustainable discharge current? Second-level dynamic constraints, fast charging power Limited by ,in The preset power margin coefficient is set; the third level of abnormality is disabled. When the battery status is detected to exceed the safety protection threshold, the fast charging output is immediately disconnected and the abnormality is reported.

6. The method according to claim 1, characterized in that, In step S7, let the input power be... The sum of the output power requirements is The upper limit of safe charging power for batteries is The maximum sustainable discharge power is :when When surplus power charges the battery; And the difference does not exceed The battery will make up the difference when the difference exceeds [a certain threshold]. Step S5 is triggered to redistribute power.

7. The method according to claim 1, characterized in that, In step S1, the single-cell voltage, total voltage, charging and discharging current, and battery surface temperature of the battery pack are collected at a preset sampling frequency; the state of charge is calculated using the ampere-hour integration method combined with the extended Kalman filter algorithm; the abnormal events include overvoltage, undervoltage, overcurrent, overtemperature, undertemperature, and port short circuit; when an abnormality occurs, the abnormality type and a timestamp accurate to the minute are recorded in the non-volatile memory.

8. The method according to claim 1, characterized in that, In step S3, the battery status data includes total battery voltage data, charge / discharge current data, battery temperature data, state of charge data, cycle count data, abnormal alarm code data, timestamp data, and current energy management mode code data. The abnormal alarm code uses a bit mapping method, with each bit corresponding to overvoltage, undervoltage, overcurrent, overtemperature, undertemperature, and port short circuit abnormality types. The current energy management mode code is used by the terminal device to identify whether the power bank is currently in a low-power state.

9. The method according to claim 1, characterized in that, In step S8, the port abnormality protection includes: disconnecting the output when the port is short-circuited and attempting to recover after a delay; triggering derating protection and recording the abnormality when the port is overcurrent; and turning off the output switch to prevent current backflow when the port is reverse-connected.

10. An intelligent charging and discharging management system for mobile power banks, characterized in that, The system is configured to perform the method of any one of claims 1-9, the system comprising: The battery pack is used to store electrical energy and output it to various ports; A voltage and current acquisition module is connected to the battery pack and is used to acquire battery voltage and charging / discharging current in real time, supporting dynamic adjustment of the acquisition frequency; A temperature acquisition module is located on the surface of the battery pack and near the main control chip. It is used to acquire battery temperature and ambient temperature in real time and supports dynamic adjustment of the acquisition frequency. Non-volatile memory is used to store real-time monitoring data and abnormal event records, and supports dynamic adjustment of the write frequency; The Bluetooth communication module, connected to the main control chip, is used to send battery status data to the terminal device; The buck-boost converter circuit connects the battery pack to each output port; At least two output ports; The switch control circuits are respectively set between each output port and the buck-boost conversion circuit, and are used to independently turn each output port on or off under the control of the main control chip. The main control chip, connected to the voltage and current acquisition module, temperature acquisition module, non-volatile memory, Bluetooth communication module, buck-boost conversion circuit, switch control circuit and each output port, is configured to execute the method of any one of claims 1-9; the main control chip integrates a battery energy management function, used to determine the energy level of the battery based on the current state of charge value and generate corresponding power consumption control instructions.