A current grading smooth switching control method based on double-loop time-sharing control

By adopting a dual-loop time-sharing control method for smooth switching of current ranges, the problems of current interruption and control instability during the current switching process in current range control technology are solved, and smooth switching of wide-range current regulation is achieved, thereby improving the operational reliability and testing continuity of the equipment.

CN123156718APending Publication Date: 2026-11-24GUANGDONG HYNN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611370138.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing current gradation control technology suffers from problems such as phased current interruption, sudden changes in control loop output, damage to electronic components, and radiation interference during the switching process, making it difficult to achieve smooth switching without stopping the machine.

Method used

A dual-loop time-sharing control method is adopted, which constructs a hardware architecture through an inner loop of inductor current and a multi-level outer loop sampling unit. The MCU controller is used to determine the level, decouple the outer loop, switch hardware and adjust the inner loop to achieve smooth switching of the current level.

Benefits of technology

It achieves seamless current range switching across the entire measurement range, avoiding current overshoot and oscillation, and improving the testing continuity, work efficiency, and reliability of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123156718A_ABST
    Figure CN123156718A_ABST
Patent Text Reader

Abstract

This invention relates to the technical field of current range control, and in particular to a smooth switching control method for current range based on dual-loop time-sharing control, comprising the following steps: S1, determining whether the target current exceeds the preset range of the current conduction range; S2, if it is determined that a range switch is required, closing the closed-loop control of the outer current loop, and retaining only the independent closed-loop operation of the inner current loop to maintain the dynamic stability of the output current; S3, under the closed-loop control of the inner current loop, outputting a range control signal to drive the anti-reverse MOSFET group corresponding to the target range to conduct, and adjusting the output of the main power circuit to adjust the output current to the effective range of the target range; S4, when the output current is detected to be stable within the target range, connecting the outer loop acquisition path of the target range, restoring the closed-loop control of the outer current loop, and completing the smooth switching. This application has the effect of improving the continuity and working efficiency of battery formation and capacity testing, and precision power supply equipment testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of current grading control, and in particular to a current grading smooth switching control method based on dual-loop time-sharing control. Background Technology

[0002] With the rapid development of new energy vehicles and energy storage industries, the demand for wide-range, high-precision current control in power electronic equipment such as battery formation and capacity testing equipment, high-precision current sources, and electronic loads continues to increase. To simultaneously balance high current output capability and low current control accuracy, current-range control technology has been widely adopted. This typically employs a multi-range current sampling path combined with a dual-loop control architecture: the inner loop of the inductor current ensures dynamic response, while the outer loop of the output current ensures steady-state accuracy. Wide-range current regulation is achieved by switching sampling ranges. However, existing current-range control technology still has many shortcomings: 1. To avoid control failure caused by sudden changes in the sampling ratio, traditional solutions require first shutting down the power output and then restarting the output after the range switching is complete, resulting in intermittent current fluctuations. 1. Disruption can disrupt the continuity of the testing process, reduce equipment operating efficiency, and compromise the integrity of test data. 2. If switching is forced without stopping the machine, the sampling range and operational amplifier gain of different ranges differ by magnitude. Sudden changes in feedback values ​​during switching can cause abrupt changes in the control loop output, leading to current overshoot and oscillation. 3. Overshoot caused by range switching can easily damage power devices, sampling circuits, and loads. Long-term use will significantly reduce the lifespan of electronic components. At the same time, the high dV / dt generated by switching can cause strong conducted and radiated interference, affecting the stable operation of the equipment itself and surrounding equipment. Therefore, how to achieve smooth switching of current ranges without stopping the machine, while taking into account control accuracy and dynamic stability over a wide range, is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0003] To address the shortcomings of the prior art, this application provides a current-level smooth switching control method based on dual-loop time-sharing control.

[0004] The above-mentioned inventive objective of this application is achieved through the following technical solutions: A current level smooth switching control method based on dual-loop time-sharing control is applied to a current control system. The current control system includes a main power circuit, an MCU controller, an inner loop sampling unit for inductor current, a multi-level outer loop sampling unit, and a power level switching unit. The main power circuit is equipped with an output filter inductor and an output filter capacitor, both of which are used to output charging and discharging current. The inductor current inner loop sampling unit is used to collect the real-time current of the output filter inductor to form the current inner loop. The inductor current inner loop sampling unit is set on the current loop of the output filter inductor to collect the current signal of the output filter inductor and transmit it to the MCU controller. The power level switching unit includes at least two parallel power branches. The input terminals of each power branch are connected to the positive terminal of the output filter capacitor, and the output terminals are connected to the load output port. Each power branch is connected in series with a current sensor of the corresponding range and a reverse MOSFET group. The multi-level outer loop sampling unit is used to collect the output current on the load side to form a current outer loop. The multi-level outer loop sampling unit includes operational amplifier circuits and high-precision ADCs corresponding to each power branch, used to collect the output current signal of the corresponding level and transmit it to the MCU controller. Each set of mutually matched operational amplifier circuits and high-precision ADCs constitutes one outer loop acquisition path. The current level smooth switching control method based on dual-loop time-division control includes the following steps: S1. Gear Position Judgment: The MCU controller monitors the target current value in real time and determines whether the target current exceeds the preset range of the current conduction gear. S2, Outer Loop Decoupling: If it is determined that a gear switching is required, the MCU controller closes the closed-loop control of the outer current loop and only retains the independent closed-loop operation of the inner current loop to maintain the dynamic stability of the output current. S3. Hardware switching and inner loop adjustment: Under the closed-loop control of the current inner loop, the MCU controller outputs the gear control signal, drives the anti-reverse MOS transistor group corresponding to the target gear to turn on, and adjusts the output of the main power circuit to adjust the output current to the effective range of the target gear. S4. Outer Loop Switching: When the output current is detected to be stable within the target range, the MCU controller connects to the outer loop acquisition path corresponding to the target range, restores the closed-loop control of the current outer loop, and completes the smooth switching.

[0005] Preferably, in S3, when switching from a low current setting to a high current setting: The MCU controller first drives the anti-reverse MOSFET group corresponding to the high current level to turn on, and controls the output of the main power circuit through the inner current loop to gradually increase the output current to near the target current value. Then, it executes S4 and connects to the outer loop acquisition path corresponding to the high current level.

[0006] Preferably, in S3, when switching from a high current range to a low current range: The output of the main power circuit is controlled by the inner current loop, and the output current is gradually reduced to the rated safe range of the low current range. The reverse MOSFET group of the power branch corresponding to the low current range is driven to turn on, and S4 is executed to connect to the outer loop acquisition path corresponding to the low current range.

[0007] Preferably, the power branch switching adopts a control timing sequence of first turning on and then turning off: first turn on the anti-reverse MOSFET group of the target range, and after the corresponding power branch conduction state stabilizes, turn off the anti-reverse MOSFET group of the original range.

[0008] Preferably, the criteria for determining whether to access the outer current loop are: the deviation between the output current sampled by the inner current loop and the target set value is within a preset error range, and the current remains stable for a duration that reaches a preset threshold.

[0009] Preferably, the inductor current inner loop sampling unit is equipped with a shunt, which is connected in series in the circuit where the output filter inductor is located; the differential sampling signal at both ends of the shunt is amplified by the operational amplifier conditioning circuit and then connected to the built-in analog-to-digital converter of the MCU controller in differential form; the current inner loop controls the output current of the power main circuit by adjusting the PWM duty cycle.

[0010] Preferably, the output terminal of the current sensor of each power branch is connected to the input terminal of the corresponding operational amplifier circuit. After the operational amplifier circuit amplifies the sampled signal proportionally, it is input to a high-precision ADC to complete the analog-to-digital conversion. The converted digital signal is then transmitted to the MCU controller.

[0011] Preferably, the reverse-biased MOSFET group of each power branch adopts a back-to-back MOSFET structure to support bidirectional current conduction and cutoff.

[0012] Compared with the prior art, the beneficial effects of the present invention are: This invention establishes a dual-loop hardware architecture based on an inner current loop sampling unit composed of an inductor current inner loop and an outer current loop composed of a multi-level outer current sampling unit. Through a dual-loop time-sharing control strategy, during current level switching, the outer current loop is first decoupled while maintaining the independent closed-loop operation of the inner current loop to ensure dynamic stability. Then, the current is adjusted differentially according to the target level direction. That is, when switching from a small current to a large current, the hardware is turned on and the current is increased first; when switching from a large current to a small current, the current is reduced first and then the hardware is switched. Finally, after the current stabilizes, the corresponding outer loop is switched in, restoring the dual-loop collaborative closed loop. This can eliminate the current overshoot and oscillation phenomena caused by sudden changes in the sampling ratio in traditional non-stop switching schemes. At the same time, it solves the problems of test interruption and data incompleteness caused by stop switching in traditional schemes, achieving smooth switching across the entire range, avoiding overcurrent damage to power devices, improving system reliability and safety, and significantly improving the continuity and efficiency of battery formation and capacity testing and precision power supply equipment testing. The overall solution takes into account the dynamic current response and steady-state control accuracy under wide range conditions, has strong topology adaptability, and can flexibly adapt to multi-level current switching and bidirectional charging and discharging scenarios. Attached Figure Description

[0013] Figure 1 This is a system structure framework diagram of an embodiment of this application; Figure 2 This is a flowchart of the current-level smooth switching control method based on dual-loop time-division control according to an embodiment of this application; Figure 3 This is a circuit schematic diagram of the MCU controller in the embodiments of this application; Figure 4 This is a circuit schematic diagram of the current-doubling main power topology in the embodiments of this application; Figure 5 This is a circuit schematic diagram of the gear switching MOS transistor drive circuit in the embodiments of this application; Figure 6 This is a circuit schematic diagram of the power circuit level switching in the embodiments of this application; Figure 7 This is a circuit schematic diagram of the primary and secondary PWM drive circuits in the embodiments of this application; Figure 8 This is a circuit diagram of the current sampling signal operational amplifier conditioning circuit in the embodiments of this application; Figure 9 This is a circuit schematic diagram of the high-precision ADC and reference source in the embodiments of this application. Detailed Implementation

[0014] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0015] It should be noted that the terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this disclosure.

[0016] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0017] The following is a reference appendix. Figure 1 To be continued Figure 9 This application describes a current-level smooth switching control method based on dual-loop time-sharing control.

[0018] This embodiment provides a current-level smooth switching control method based on dual-loop time-sharing control, applied to a current control system. For example... Figure 1As shown, the current control system includes a main power loop, an MCU controller, an inner loop inductor current sampling unit, a multi-level outer loop sampling unit, and a power level switching unit. The input terminal of the main power loop is connected to the input power supply, and the output terminal is connected to the load via an output port. The switching devices within the main power loop are driven by a PWM drive circuit. The inner loop current sampling sensor within the main power loop is connected to the built-in ADC of the MCU controller, forming the inner current loop. The outer loop current sampling sensor is connected to an external high-precision ADC, which is then connected to the MCU controller, forming the outer current loop. The MCU controller is connected to a host computer via a communication unit to receive the target current value sent by the host computer. Figure 3 As shown, the MCU controller is mainly used for AD sampling, PWM control, PI algorithm calculation, data processing, communication and IO signal output. It communicates with the external high-precision ADC through the SPI bus, sends the duty cycle control signal to the drive circuit through the PWM output port, and sends the gear control signal to the gear shift drive circuit through the IO port.

[0019] The main power circuit includes an output filter inductor and an output filter capacitor, both used for outputting charging and discharging current. The specific topology of the main power circuit can employ well-known power conversion topologies such as Buck, Boost, Buck-Boost, or full-bridge converters. The parameter design of the output filter inductor and capacitor, the selection of power switching transistors, and the design of the gate drive circuit are all conventional techniques used by those skilled in the art and will not be elaborated upon here. An inductor current inner loop sampling unit is correspondingly located on the current loop of the output filter inductor, used to collect the current signal of the output filter inductor and transmit it to the MCU controller, thus forming the current inner loop. The power level switching unit includes at least two parallel power branches. The input terminals of each power branch are connected to the positive terminal of the output filter capacitor, and the output terminals are connected to the load output port. Each power branch is connected in series with a current sensor of the corresponding range and a reverse-biased MOSFET group. The multi-level outer loop sampling unit is used to collect the output current on the load side, thus forming a current outer loop. The multi-level outer loop sampling unit includes operational amplifier circuits and high-precision ADCs corresponding to each power branch. Each set of mutually matched operational amplifier circuits and high-precision ADCs forms an outer loop acquisition path, used to collect the output current signal of the corresponding level and transmit it to the MCU controller. In the above dual-loop control architecture, the inner current loop ensures dynamic response, while the outer current loop ensures steady-state accuracy. Wide-range current regulation is achieved by switching sampling levels. Its basic working principle is well known to those skilled in the art.

[0020] In this embodiment, as Figure 4As shown, the main power circuit adopts a current-doubler rectifier topology, including a bus input capacitor, primary-side power transistors, a high-frequency isolation transformer, secondary-side synchronous rectifier transistors, output filter inductors, output filter capacitors, and an inner-loop shunt. The primary-side power transistors use a full-bridge structure, while the secondary-side uses a current-doubler rectifier structure. The high-frequency isolation transformer provides electrical isolation and voltage conversion between the primary and secondary sides, and the secondary-side synchronous rectifier transistors are driven by an isolation drive circuit. The output filter inductor uses a current-doubler structure with two inductors connected in parallel, each inductor carrying approximately half of the output current, effectively reducing the ripple current and core loss of a single inductor. The output filter capacitor uses multiple electrolytic capacitors connected in parallel to reduce the equivalent series resistance and decrease output voltage ripple. The inner loop sampling unit for inductor current is equipped with a shunt, such as... Figure 4 As shown, the shunt is connected in series in the circuit where the output filter inductor is located. The differential sampling signal at both ends of the shunt is amplified by the operational amplifier conditioning circuit and then transmitted to the built-in analog-to-digital converter of the MCU controller in differential form. The inner current loop controls the output current of the main power circuit by adjusting the PWM duty cycle.

[0021] like Figure 7 As shown, the PWM signal output by the MCU controller is amplified and electrically isolated by the primary and secondary driving circuits, and then drives the gates of the primary power transistor and the secondary synchronous rectifier transistor respectively. The primary driving circuit converts the logic level PWM signal output by the MCU into a gate driving signal suitable for driving the primary power transistor. The secondary driving circuit transmits the PWM signal to the secondary side through the isolation driving chip, and drives the secondary synchronous rectifier transistor to achieve synchronous rectification.

[0022] In addition, such as Figure 8 As shown, the output of the current sensor in each power branch is connected to the input of the corresponding operational amplifier circuit. The operational amplifier circuit amplifies the sampled signal proportionally and then inputs it to a high-precision ADC for analog-to-digital conversion. The converted digital signal is then transmitted to the MCU controller. The amplification factor of the operational amplifier circuit and the range of the high-precision ADC corresponding to different current ranges are designed to match the current range of that range. Small current ranges correspond to high amplification factor and high resolution, while large current ranges correspond to low amplification factor and wide range. The specific parameter matching relationship is a conventional design that can be determined by those skilled in the art based on accuracy and signal-to-noise ratio requirements.

[0023] like Figure 9 As shown, a high-precision ADC can be implemented using an external multi-channel high-precision analog-to-digital converter chip. Its reference voltage is provided by an external high-precision reference source, and the MCU controller reads the conversion data from the high-precision ADC via the SPI bus. The adjustment bandwidth of the outer current loop is typically set to 10 Hz to 100 Hz, which is one-tenth to one-fifth of the adjustment bandwidth of the inner current loop, to ensure sufficient frequency separation between the two loops.

[0024] In addition, such as Figure 6As shown, the anti-reverse MOSFET groups for each power branch adopt a back-to-back MOSFET structure, that is, the sources of two N-channel power MOSFETs are connected to each other, and their drains face the input and output sides of the power branch, respectively. The gates of the two MOSFETs are controlled by the same set of drive signals output by the MCU controller, supporting bidirectional current conduction and cutoff. By adopting a back-to-back MOSFET structure, the body diode of a single MOSFET can only block the current in one direction. In application scenarios such as battery formation and capacity testing that require bidirectional charging and discharging, the current direction will reverse. The back-to-back MOSFET structure can achieve controllable conduction and reliable cutoff in both directions, preventing the current from forming a circulating current through the body diode of the non-target power branch during gear switching.

[0025] Based on the above current control system, such as Figure 1 and Figure 2 As shown, the current-level smooth switching control method based on dual-loop time-sharing control in this embodiment includes the following steps: S1. Gear Position Judgment: The MCU controller monitors the target current value in real time and determines whether the target current exceeds the preset range of the current conduction gear. In each control cycle, the MCU controller reads the target current value sent by the host computer and compares it with the upper and lower limits of the range corresponding to the current conduction gear. If the target current value is within the range of the current gear, the current gear remains unchanged, and the dual-loop closed-loop control continues to operate normally. If the target current value exceeds the upper limit of the current gear's range, it is determined that a switch to a higher current gear is needed; if the target current value is lower than the lower limit of the current gear's range, it is determined that a switch to a lower current gear is needed. To avoid frequent gear switching due to small fluctuations in the target current value near the range boundaries, the MCU controller sets a hysteresis interval at the range boundaries. The hysteresis width is 2% to 5% of the current gear's range. The gear switching process is only triggered when the target current value exceeds the hysteresis-inclusive range for several consecutive control cycles.

[0026] S2. Outer Loop Decoupling: If a gear switching is required, the MCU controller disables the closed-loop control of the outer current loop, retaining only the independent closed-loop operation of the inner current loop to maintain the dynamic stability of the output current. Specifically, the MCU controller freezes the output value of the proportional-integral (PI) arithmetic unit in the outer current loop, locking and maintaining the current inner loop reference value at the current moment. Then, the outer current loop is switched from closed-loop to open-loop hold mode. The outer current loop no longer reads current data from any outer loop acquisition path or performs proportional-integral calculations. Simultaneously, the inner current loop continues to operate independently with the locked reference value. The inductor current inner loop sampling unit continuously acquires the real-time current of the output filter inductor and feeds it back to the MCU controller. The MCU controller adjusts the PWM duty cycle based on the deviation between the inductor current feedback and the locked reference value, maintaining the output current at a level essentially unchanged before the switching.

[0027] The purpose of outer loop decoupling is to eliminate the sudden change in feedback value introduced by the difference in sampling range and operational amplifier gain between different ranges during the entire transition process of range switching. Since the output reference value of the outer loop is locked after decoupling, even if the gain of the operational amplifier circuit and the range of the high-precision ADC in the outer loop acquisition path are switched, it will not affect the current inner loop. This fundamentally avoids the sudden change in control loop output caused by the sudden change in feedback value at the moment of switching, as well as the current overshoot and oscillation caused by it.

[0028] S3. Hardware Switching and Inner Loop Adjustment: Under the closed-loop control of the current inner loop, the MCU controller outputs a range control signal, driving the anti-reverse MOSFET group corresponding to the target range to turn on, and adjusting the output of the main power circuit to adjust the output current to the effective range of the target range. For example... Figure 5 As shown, the gear control signal output by the MCU controller undergoes level conversion and current amplification by the gear switching MOSFET driver circuit, before driving the gate of the anti-reverse MOSFET group in the corresponding gear power branch. This step employs differentiated timing depending on the switching direction.

[0029] When switching from a low current range to a high current range, the MCU controller first drives the anti-reverse MOSFET group corresponding to the high current range to conduct. At this time, since the inner current loop is still operating in an independent closed loop, the output current remains at the low current level before the switch. The power branch corresponding to the high current range completes conduction under extremely low current conditions, without generating surge impact. The power branch switching adopts a turn-on-off control sequence, that is, the anti-reverse MOSFET group of the target range is turned on first, and after the conduction state of the corresponding power branch stabilizes, the anti-reverse MOSFET group of the original range is turned off. Typically, the determination of the conduction state stability is based on the MCU controller detecting that the drain-source voltage of the anti-reverse MOSFET group in the target power branch drops below the conduction voltage drop, and this state continues for a preset stabilization confirmation time, which can be between 100μs and 500μs. After the original power branch is turned off, the MCU controller controls the output of the main power circuit through the inner current loop, gradually increasing the reference value of the inner current loop in a ramp manner to gradually raise the output current to near the target current value. The ramp rate is determined based on the target current value and the safe operating area of ​​the power devices, and is typically set to increase the rated current by 1% to 5% per millisecond to ensure no overshoot or oscillation during the current rise. During the current rise, the inductor current inner loop sampling unit continuously collects the real-time current of the output filter inductor, and the inner current loop adjusts the PWM duty cycle in real time to ensure that the output current accurately tracks the ramp reference value. After the current rises to near the target current value, S4 is executed, connecting to the outer loop acquisition path corresponding to the high current range.

[0030] When switching from a high-current range to a low-current range, the MCU controller controls the output of the main power circuit through the inner current loop, gradually reducing the output current to within the rated safe range of the low-current range in a ramp-down manner. The absolute value of the descent slope is approximately equal to the rise slope, and is determined based on the safe operating area of ​​the power devices and the energy release rate of the output filter inductor. During the current decrease, the inner current loop operates independently in a closed loop, while the outer loop remains in a decoupled holding state. Once the output current has decreased to within the rated safe range of the low-current range and stabilized, the MCU controller drives the anti-reverse MOSFET group of the power branch corresponding to the low-current range to conduct. The control timing is also followed by a turn-on-off sequence, first turning on the anti-reverse MOSFET group of the low-current range, and then turning off the anti-reverse MOSFET group of the high-current range after the conduction state stabilizes. Since the output current has already dropped to a low-current level, the current stress on the anti-reverse MOSFET group during the power branch switching process is minimal, effectively avoiding voltage spikes and electromagnetic interference caused by load switching. After the power branch switching is completed, execute S4 to connect to the outer loop acquisition path corresponding to the low current level.

[0031] S4. Outer Loop Entry: Once the output current is detected to be stable within the target range, the MCU controller connects to the outer loop acquisition path corresponding to the target range, restoring the closed-loop control of the current outer loop and completing a smooth switch. The criteria for connecting to the current outer loop are: the deviation between the output current sampled by the current inner loop and the target setpoint is within a preset error range, and the current stabilization duration reaches a preset threshold. The preset error range is set according to the accuracy requirements of the target range, typically 0.5% to 2% of the target current value; the current stabilization duration is between 1ms and 10ms. The MCU controller determines that the output current is stable only after detecting that the deviation between the output current and the target setpoint is within the preset error range for several consecutive control cycles, and the duration of this state reaches the current stabilization duration threshold. Before connecting to the outer loop acquisition path corresponding to the target range, the MCU controller also verifies the validity of the outer loop acquisition path, including checking whether the output data of the high-precision ADC is within a reasonable range, whether the consistency of multiple consecutive sampled values ​​meets the preset threshold, and whether the output of the operational amplifier circuit has saturation or open-circuit abnormalities. After confirming that the outer loop acquisition path is valid, the MCU controller resumes closed-loop control of the current outer loop.

[0032] Throughout the gear switching process, the MCU controller also executes safety protection logic. The current value collected by the inner loop sampling unit is compared with a preset hardware overcurrent threshold in each control cycle. Once the current of the output filter inductor exceeds this threshold, the MCU controller immediately sets the PWM duty cycle to zero and shuts down the power switch in the main power circuit. The reverse-biased MOSFETs in each power branch of the power gear switching unit undergo conduction status detection before and after the switching action. If the reverse-biased MOSFETs fail to conduct properly or are damaged, the MCU controller immediately terminates the switching process and reports a fault. If the outer loop acquisition path detects high-precision ADC data overflow or operational amplifier circuit output saturation before switching in, the MCU controller automatically reverts to the previous valid gear or enters a safety shutdown process to prevent current runaway caused by erroneous sampling data. The above protection logic operates independently of the normal dual-loop time-sharing control process and can be triggered preferentially at any stage from S1 to S4, ensuring the safety of power devices and external loads.

[0033] In bidirectional charging and discharging scenarios, the main power circuit injects a constant current into the external battery module in charging mode and draws a constant current from the battery module in discharging mode. The switching between charging and discharging modes also applies to the aforementioned current-level smooth switching control method based on dual-loop time-sharing control. When the current control system switches from charging mode to discharging mode, the current direction reverses. The MCU controller first reduces the inner current loop reference value to zero in a ramp manner, then switches the energy flow direction configuration of the main power circuit, and then ramps up the inner current loop reference value to the target discharge current value. Throughout the process, the decoupling and switching sequence of the outer loop is consistent with that of unidirectional level switching. Since the anti-reverse MOSFET groups of each power branch adopt a back-to-back MOSFET structure, supporting bidirectional current conduction and cutoff, the power level switching unit can reliably execute the turn-on-then-off switching sequence in both the charging and discharging current directions, without the current runaway or circulating current problems caused by the unidirectional conduction characteristics of the body diode.

[0034] As a specific embodiment, such as Figure 6As shown, the power level switching unit is configured with two parallel power branches: a 100A range and a 10A range. The effective range of the 100A range is 10A to 100A, and the effective range of the 10A range is 0A to 10A. In the power branch corresponding to the 100A range, the reverse-biased MOSFET group consists of six N-channel power MOSFETs connected in parallel. The input terminals of the six MOSFETs are all connected to the CAP+ network on the positive side of the output filter capacitor, and their output terminals are all connected to the input terminal of the 100A range Hall current sensor. The output terminal of the 100A range Hall current sensor is connected to the BAT_CH1+ network of the load output port. The purpose of using six MOSFETs in parallel is to reduce the current stress and heat loss on the on-resistance of a single MOSFET, so that each MOSFET only bears about 16.7A of current under a full load of 100A, ensuring that the power devices operate within a safe temperature range. In the power branch corresponding to the 10A range, the reverse-biased MOSFET group consists of two N-channel power MOSFETs. The input terminals of the two MOSFETs are also connected to the CAP+ network, and their output terminals are connected to the input terminal of the 10A range Hall current sensor. The output terminal of the 10A range Hall current sensor is also connected to the BAT_CH1+ network. The output terminals of both power branches converge at the BAT_CH1+ network and are then connected to the positive terminal of the external battery module. The negative terminal of the battery module is connected to the power ground PGND1 network, forming a complete charging and discharging current loop.

[0035] In this specific embodiment, such as Figure 5 As shown, the MCU controller drives the anti-reverse MOSFET groups of each power branch through the gear control signal. The gear selection signals START1_100A_DSP and START1_10A_DSP output by the MCU controller are level-shifted and current-amplified by the push-pull driver stage composed of NPN and PNP transistors in the gear switching MOSFET driver circuit, respectively generating SHIFT_GEARS_100A and SHIFT_GEARS_10A signals to drive the anti-reverse MOSFET groups of the corresponding gears. The gear control signal SHIFT_GEARS_100A for the 100A gear is active high. When the MCU controller outputs a high level, it drives the six anti-reverse MOSFETs corresponding to the 100A gear to conduct; when the MCU controller outputs a low level, the six anti-reverse MOSFETs are turned off, and the power branch corresponding to the 100A gear is disconnected. The 10A gear control signal SHIFT_GEARS_10A is active low. When the MCU controller outputs a low level, it drives the two anti-reverse MOSFETs corresponding to the 10A gear to conduct; when the MCU controller outputs a high level, the two anti-reverse MOSFETs are turned off, and the power branch corresponding to the 10A gear is disconnected. The two gear control signals are mutually exclusive. During steady-state operation, the MCU controller only keeps one of them actively conducting. During the brief transition window, both signals are conducted simultaneously to achieve a turn-on-off timing sequence.

[0036] In this specific embodiment, such as Figure 6 As shown, during charging, when the target current is between 10A and 100A, the MCU controller outputs a high-level enable signal SHIFT_GEARS_100A, driving the six anti-reverse MOSFETs corresponding to the 100A range to close. Current flows in from the CAP+ network, sequentially through the six anti-reverse MOSFETs, then through the 100A range Hall current sensor into the BAT_CH1+ network, and enters the positive terminal of the battery. Current flows out from the negative terminal of the battery back to the PGND1 network, forming a complete charging circuit. During discharging, the current flow is completely reversed. Current flows in from the positive terminal of the battery through the BAT_CH1+ network, through the 100A range Hall current sensor and the six anti-reverse MOSFETs back to the CAP+ network, completing the discharge energy feedback. When the target current is in the range of 0A to 10A, the MCU controller outputs a low-level enable signal SHIFT_GEARS_10A, which drives the two anti-reverse MOSFETs corresponding to the 10A range to close. The current flows in from the CAP+ network, through the two anti-reverse MOSFETs in sequence, and then through the 10A range Hall current sensor into the BAT_CH1+ network, entering the positive terminal of the battery. The current flows out from the negative terminal of the battery and back to the PGND1 network, forming a complete charging circuit. The current flow is completely reversed in the discharging state.

[0037] In this specific embodiment, such as Figure 8 As shown, the multi-range outer loop sampling unit is equipped with two outer loop acquisition paths. In the outer loop acquisition path corresponding to the 100A range, the differential output signal of the 100A range Hall current sensor is proportionally attenuated by a precision resistor network, then converted and amplified by a low-noise operational amplifier, and the output signal I_BAT_100A_ADC is sent to a high-precision ADC. In the outer loop acquisition path corresponding to the 10A range, the differential output signal of the 10A range Hall current sensor is proportionally attenuated by another precision resistor network, then converted and amplified by a low-noise operational amplifier of the same model, and the output signal I_BAT_10A_ADC is sent to the corresponding high-precision ADC. Both operational amplifier circuits are powered by dual power supplies, and each operational amplifier circuit's input terminal is equipped with an RC low-pass filter network and a Schottky diode clamping protection circuit to filter out high-frequency switching noise and prevent input overvoltage damage to the operational amplifier. Figure 8 As shown, in the inner loop sampling unit for inductor current, the differential signal at both ends of the shunt is proportionally amplified by a precision operational amplifier and then directly connected to the built-in analog-to-digital converter of the MCU controller in differential form. This differential transmission method effectively suppresses common-mode interference and improves sampling accuracy under low current conditions. Figure 9As shown, the high-precision ADC uses an external multi-channel high-precision analog-to-digital converter chip. Its analog input terminals are connected to I_BAT_100A_ADC, I_BAT_10A_ADC and the corresponding reference ground signal, respectively. The reference voltage is provided by an external high-precision reference source chip. The MCU controller controls the ADC's sampling start, channel selection and data reading through the SPI bus to realize high-precision digital acquisition of the external loop current signal.

[0038] In this specific embodiment, when the target current switches from the 10A range to the 100A range, the MCU controller executes steps S1 to S4: First, it determines that the target current exceeds the upper limit of the 10A range; then, it freezes the output value of the current outer loop proportional-integral arithmetic unit and closes the closed-loop control of the current outer loop; next, the MCU controller outputs a high-level enable signal SHIFT_GEARS_100A to drive the six anti-reverse MOSFETs corresponding to the 100A range to conduct; after the conduction state stabilizes, it turns off the two anti-reverse MOSFETs corresponding to the 10A range and gradually increases the output current to near the target current value through the current inner loop in a ramp manner; finally, it connects to the outer loop acquisition path corresponding to the 100A range, restores the closed-loop control of the current outer loop, and completes the smooth switching. When the target current switches from the 100A range to the 10A range, the MCU controller gradually reduces the output current to within the rated safe range of the 10A range through the inner current loop in a ramp manner. Then, it outputs a low-level enable signal, `SHIFT_GEARS_10A`, to turn on the two anti-reverse MOSFETs corresponding to the 10A range. After the conduction state stabilizes, it turns off the six anti-reverse MOSFETs corresponding to the 100A range. Finally, it connects to the outer loop acquisition path corresponding to the 10A range, restoring the closed-loop control of the outer current loop and completing the smooth switching. Throughout the entire switching process, the output current is continuous and uninterrupted, with no overshoot or oscillation.

[0039] The current range smooth switching control method based on dual-loop time-division control provided in this embodiment achieves seamless online switching of current ranges without shutdown across the entire range through four sequentially connected steps: range judgment, outer loop decoupling, hardware switching and inner loop adjustment, and outer loop switching. During the switching process, the output current is continuous and uninterrupted, without overshoot or oscillation. This method can eliminate the feedback value abrupt changes and current step disturbances caused by the magnitude difference in sampling range and operational amplifier gain of different ranges in traditional non-shutdown switching schemes. At the same time, it avoids the test process interruption and data incompleteness problems caused by shutdown switching schemes, significantly improving the test continuity, work efficiency, operational reliability and safety of the system.

[0040] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A current level smooth switching control method based on dual-loop time-sharing control, applied to a current control system, wherein the current control system includes a main power circuit, an MCU controller, an inductor current inner loop sampling unit, a multi-level outer loop sampling unit, and a power level switching unit. The main power circuit is equipped with an output filter inductor and an output filter capacitor, both of which are used to output charging and discharging current. The inductor current inner loop sampling unit is used to collect the real-time current of the output filter inductor to form the current inner loop. The inductor current inner loop sampling unit is set on the current loop of the output filter inductor to collect the current signal of the output filter inductor and transmit it to the MCU controller. The power level switching unit includes at least two parallel power branches. The input terminals of each power branch are connected to the positive terminal of the output filter capacitor, and the output terminals are connected to the load output port. Each power branch is connected in series with a current sensor of the corresponding range and a reverse MOSFET group. A multi-level outer loop sampling unit is used to collect the output current on the load side to form a current outer loop. The multi-level outer loop sampling unit includes operational amplifier circuits and a high-precision ADC corresponding to each power branch, used to collect the output current signal of the corresponding level and transmit it to the MCU controller. Each set of mutually matched operational amplifier circuits and high-precision ADCs constitutes one outer loop acquisition path. Its characteristic is that... The current-level smooth switching control method based on dual-loop time-sharing control includes the following steps: S1. Gear Position Judgment: The MCU controller monitors the target current value in real time and determines whether the target current exceeds the preset range of the current conduction gear. S2, Outer Loop Decoupling: If it is determined that a gear switching is required, the MCU controller closes the closed-loop control of the outer current loop and only retains the independent closed-loop operation of the inner current loop to maintain the dynamic stability of the output current. S3. Hardware switching and inner loop adjustment: Under the closed-loop control of the current inner loop, the MCU controller outputs the gear control signal, drives the anti-reverse MOS transistor group corresponding to the target gear to turn on, and adjusts the output of the main power circuit to adjust the output current to the effective range of the target gear. S4. Outer Loop Switching: When the output current is detected to be stable within the target range, the MCU controller connects to the outer loop acquisition path corresponding to the target range, restores the closed-loop control of the current outer loop, and completes the smooth switching.

2. The current-level smooth switching control method based on dual-loop time-sharing control as described in claim 1, characterized in that, In S3, when switching from a low current setting to a high current setting: The MCU controller first drives the anti-reverse MOSFET group corresponding to the high current level to turn on, and controls the output of the main power circuit through the inner current loop to gradually increase the output current to near the target current value. Then, it executes S4 and connects to the outer loop acquisition path corresponding to the high current level.

3. The current-level smooth switching control method based on dual-loop time-sharing control as described in claim 1, characterized in that, In S3, when switching from a high current setting to a low current setting: The output of the main power circuit is controlled by the inner current loop, and the output current is gradually reduced to the rated safe range of the low current range. The reverse MOSFET group of the power branch corresponding to the low current range is driven to turn on, and S4 is executed to connect to the outer loop acquisition path corresponding to the low current range.

4. A current-level smooth switching control method based on dual-loop time-sharing control as described in claim 2 or 3, characterized in that, The power branch switching adopts a control timing sequence of first turning on and then turning off: first turn on the anti-reverse MOSFET group of the target range, and then turn off the anti-reverse MOSFET group of the original range after the corresponding power branch conduction state is stable.

5. The current-level smooth switching control method based on dual-loop time-sharing control as described in claim 1, characterized in that, The criteria for determining whether to access the outer current loop are: the deviation between the output current sampled by the inner current loop and the target set value is within the preset error range, and the current remains stable for a duration that reaches the preset threshold.

6. The current-level smooth switching control method based on dual-loop time-sharing control as described in claim 1, characterized in that, The inductor current inner loop sampling unit is equipped with a shunt, which is connected in series in the circuit where the output filter inductor is located. The differential sampling signal at both ends of the shunt is amplified by the operational amplifier conditioning circuit and then connected to the built-in analog-to-digital converter of the MCU controller in differential form. The current inner loop controls the output current of the power main circuit by adjusting the PWM duty cycle.

7. The current-level smooth switching control method based on dual-loop time-sharing control as described in claim 1, characterized in that, The output of the current sensor of each power branch is connected to the input of the corresponding operational amplifier circuit. After the operational amplifier circuit amplifies the sampled signal proportionally, it is input to the high-precision ADC to complete the analog-to-digital conversion. The converted digital signal is then transmitted to the MCU controller.

8. The current-level smooth switching control method based on dual-loop time-sharing control as described in claim 1, characterized in that, Each power branch's anti-reverse MOSFET group adopts a back-to-back MOSFET structure, supporting bidirectional current conduction and turn-off.