Switching wave control method, system and equipment of bidirectional buck-boost circuit and medium

By acquiring low-voltage battery information and calculating feedforward values ​​for high and low voltage sides, and combining voltage loop and current loop operations, the problem of easily missing switching waveform states in LLC boost topologies is solved, and stable and efficient control of bidirectional buck-boost circuits is achieved.

CN121966332APending Publication Date: 2026-05-01SRNE SOLAR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SRNE SOLAR CO LTD
Filing Date
2025-12-17
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In low-voltage battery grid-connected inverter systems, the LLC boost topology has an inherent weakness, which makes it easy to miss scenarios when judging the switching state of the boost and buck transistors under multiple conditions, leading to anomalies.

Method used

By acquiring the battery information of the low-voltage battery and combining it with the high and low voltage side voltages to calculate the feedforward value, voltage loop and current loop calculations are performed to determine whether the set mode parameters and state combination information match. If they do not match, the mode parameters are modified and the calculation is performed again to ensure that the switching action is accurately synchronized with the charging and discharging requirements, voltage relationship and load status.

Benefits of technology

It effectively avoids the omission of scenarios caused by neglecting core conditions in traditional methods, ensures stable and efficient control of bidirectional buck-boost circuits, prevents erratic switching actions, and achieves precise voltage and current control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121966332A_ABST
    Figure CN121966332A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of inverters, in particular to a switching wave control method, system and device of a bidirectional buck-boost circuit and a medium. The method comprises the steps that battery information of a low-voltage battery is obtained, the battery information comprises at least one of battery state information, voltage information and current information, and state combination information of a booster tube and a step-down tube is obtained according to the battery information; acquiring a high-voltage side voltage and a low-voltage side voltage of the bidirectional buck-boost circuit, and acquiring a current feed-forward value according to the high-voltage side voltage and the low-voltage side voltage; operating a voltage loop operation and a current loop operation based on the high-voltage side voltage and / or the low-voltage side voltage; reading set mode parameters of the bidirectional buck-boost circuit, and judging whether the set mode parameters are matched with the state combination information or not; if not, the set mode parameters are modified according to the state combination information, and the voltage loop operation and the current loop operation are carried out again based on the modified set mode parameters. According to the invention, stable and efficient control of the bidirectional buck-boost circuit can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Switching wave control methods, systems, equipment, and media for bidirectional buck-boost circuits Technical Field

[0001] This invention relates to the field of inverter technology, and in particular to the switching wave control method, system, device and medium for bidirectional buck-boost circuits. Background Technology

[0002] In inverter systems using low-voltage batteries, the core requirement is to stably boost the low-voltage battery voltage to the inverter bus voltage (typically 300V+ DC bus) while simultaneously achieving precise control of the battery charging and discharging current. However, a standalone LLC (resonant converter) boost topology has inherent limitations, directly leading to the development of a combined "LLC + Buckboost (bidirectional buck-boost circuit)" solution.

[0003] The core of a Buckboost circuit consists of two power transistors (Q1: Buck transistor, Q2: Boost transistor) and an energy storage inductor (L). Its operating mode is determined by the switching waveform combination of Q1 and Q2, resulting in four basic states. However, in practical applications, it is necessary to consider multiple conditions such as "charging and discharging requirements," "voltage relationships," and "load conditions" to make judgments, as it is easy to overlook certain scenarios and cause abnormalities. Summary of the Invention

[0004] This invention provides a switching wave control method, system, device, and medium for a bidirectional buck-boost circuit to solve the problem that scenarios are easily missed when judging the switching wave status of boost and buck transistors under multiple conditions, leading to abnormalities.

[0005] This invention discloses a switching waveform control method for a bidirectional buck-boost circuit, applied to an off-grid inverter system. The off-grid inverter system includes a low-voltage battery, a resonant converter, a bidirectional buck-boost circuit, and an inverter bus connected in sequence. The bidirectional buck-boost circuit includes a boost diode and a buck diode connected to each other. The switching waveform control method for the bidirectional buck-boost circuit includes: acquiring battery information of the low-voltage battery, the battery information including at least one of battery status information, voltage information, and current information; acquiring state combination information of the boost diode and the buck diode based on the battery information; acquiring the high-voltage side voltage and the low-voltage side voltage of the bidirectional buck-boost circuit, and acquiring the current feedforward value based on the high-voltage side voltage and the low-voltage side voltage; performing voltage loop operation and current loop operation based on the high-voltage side voltage and / or the low-voltage side voltage; reading the set mode parameters of the bidirectional buck-boost circuit, and determining whether the set mode parameters match the state combination information; if not, modifying the set mode parameters according to the state combination information, and re-performing the voltage loop operation and current loop operation based on the modified set mode parameters.

[0006] Optionally, the step of obtaining the state combination information of the boost diode and the buck diode based on the battery information includes: determining whether the battery state information, the voltage information, and the current information meet a first requirement; if yes, setting the boost diode to a waveform-off state; determining whether the voltage information and the current information meet a second requirement; if no, setting the boost diode to an waveform-on state; the first requirement includes at least one of the following: the battery state information is in a battery active state, the charging current is greater than a preset charging waveform-off current, and the product of the battery voltage and the turns ratio is greater than the sum of the minimum bus setting and the hysteresis; the second requirement includes the charging current being less than the preset charging waveform-off current and the product of the battery voltage and the turns ratio being less than the minimum bus setting.

[0007] Optionally, the step of obtaining the state combination information of the boost diode and the buck diode based on the battery information further includes: determining whether the low-voltage battery is fully charged; if not, setting the buck diode to open-wave state; if so, determining whether the discharge current is greater than a preset open-wave current; if not, setting the buck diode to off-wave state; if so, setting the buck diode to open-wave state.

[0008] Optionally, the step of re-performing the voltage loop and current loop calculations based on the modified setting mode parameters includes: clearing the voltage loop integral of the voltage loop calculation and the current loop integral of the current loop calculation, and reassigning values ​​to the current loop feedforward and output; pausing the supply of any drive waveform signals to the boost diode and the buck diode; obtaining the target duty cycle based on the output of the re-running voltage loop and current loop calculations, and driving the boost diode and / or the buck diode to turn on or off based on the target duty cycle.

[0009] Optionally, when the state combination information is that the boost diode is open-wave and the buck diode is off-wave, the step of reassigning the current loop feedforward and the output includes: clearing the current loop feedforward and the output to zero.

[0010] Optionally, when the state combination information is any one of the following: the boost diode is off and the buck diode is on, the boost diode is on and the buck diode is on, or the boost diode is off and the buck diode is off, the step of reassigning values ​​to the current loop feedforward and the output includes: assigning values ​​to the current loop feedforward and the output based on the current feedforward value.

[0011] Optionally, before the step of obtaining the target duty cycle based on the output of the rerunning current loop operation, the method includes: obtaining the upper limit of the target duty cycle based on the lowest voltage of the low-voltage battery, the turns ratio, and the highest bus voltage.

[0012] The present invention also discloses an off-grid inverter system, which includes a low-voltage battery, a resonant converter, a bidirectional buck-boost circuit, and an inverter bus connected in sequence. The bidirectional buck-boost circuit includes a boost diode and a buck diode connected to each other. The bidirectional buck-boost circuit is used to implement the switching wave control method of the bidirectional buck-boost circuit as described above.

[0013] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0014] The present invention also discloses a power supply device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0015] The beneficial effects of the switching wave control method, system, device, and medium for the bidirectional buck-boost circuit provided in this invention are as follows: Battery information of the low-voltage battery is acquired; based on the battery information, the state combination information of the boost transistor and the buck transistor is obtained; key conditions such as charging / discharging requirements and current magnitude are obtained from the battery information; simultaneously, feedforward values ​​are calculated based on the high and low voltage sides of the bidirectional buck-boost circuit, transforming the voltage relationship into a quantitative control benchmark, thus avoiding the omission of scenarios that rely solely on the switching transistor combination and ignore core conditions; furthermore, by setting mode parameters and matching and verifying the scenario-based state combination information, mismatches between the mode and the actual scenario are actively identified, preventing switching action disorder caused by mode mismatches; when mismatches occur, the mode parameters are corrected according to the state combination information, and the dual-loop operation is re-executed to ensure that the switching transistor action is always precisely synchronized with the charging / discharging requirements, voltage relationship, and load state, ultimately effectively avoiding anomalies and achieving stable and efficient control of the bidirectional buck-boost circuit. Attached Figure Description

[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the drawings: Figure 1 is a flowchart illustrating an embodiment of the switching wave control method for the bidirectional buck-boost circuit provided by the present invention; Figure 2 is a structural diagram illustrating an embodiment of the off-grid / parallel inverter system provided by the present invention; Figure 3 is a flowchart illustrating an embodiment of the method for obtaining the state combination information of the boost diode and the buck diode based on the battery information provided by the present invention; Figure 4 is a flowchart illustrating an embodiment of the method for obtaining the state combination information of the boost diode and the buck diode based on the battery information provided by the present invention; Figure 5 is a structural diagram illustrating an embodiment of the power supply equipment provided by the present invention; Figure 6 is a structural diagram illustrating an embodiment of the computer-readable storage medium provided by the present invention.

[0017] The labels in the figures are as follows: 10. Off-grid / parallel inverter system; 11. Low-voltage battery; 12. Resonant converter; 13. Bidirectional buck-boost circuit; 14. Inverter; 141. Inverter bus; 15. Photovoltaic panel; 16. Mains network; 20. Power supply equipment; 21. Processor; 22. Memory; 30. Computer-readable storage medium; 31. Computer program. Detailed Implementation

[0018] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0019] Please refer to Figures 1 and 2. Figure 1 is a flowchart illustrating an embodiment of the switching wave control method for the bidirectional buck-boost circuit provided by the present invention, and Figure 2 is a structural schematic diagram illustrating an embodiment of the off-grid / parallel inverter system provided by the present invention. As shown in Figure 2, the off-grid / parallel inverter system 10 includes a low-voltage battery 11, a resonant converter 12, a bidirectional buck-boost circuit 13, and an inverter bus 141 connected in sequence. The inverter 14 includes the inverter bus 141 and is connected to a photovoltaic panel 15 and a mains power grid 16. In the off-grid / parallel inverter system 10 shown in Figure 2, the maximum voltage of the photovoltaic panel 15 is 800V, the mains phase voltage is 230V, the inverter bus 141 is rated at 1000V, the low-voltage battery 11 is a 48V lithium battery with a maximum charging current of 300A. The bidirectional buck-boost circuit 13 includes a boost diode and a buck diode connected to each other. The boost and buck transistors work together to enable bidirectional power flow between the high and low voltage sides (e.g., from the low-voltage battery to the inverter bus, and from the inverter bus to the low-voltage battery). When switching the operating states of the boost and buck transistors, a strict dead time (i.e., the brief period during which the boost and buck transistors are simultaneously off) must be set to prevent a short circuit caused by both transistors conducting at the same time, which could lead to a malfunction.

[0020] When the output voltage of the resonant converter 12 is lower than the requirement of the inverter bus 141, the boost diode operates primarily, storing and releasing energy through the inductor to boost the low-voltage DC to the required high voltage (e.g., 380V DC bus) to meet the inverter's inversion needs. When the voltage of the inverter bus 141 is higher than the charging requirement of the low-voltage battery 11, the buck diode operates primarily, stepping down the high voltage of the bus to a charging voltage suitable for the low-voltage battery 11 (e.g., 48V), thus charging the low-voltage battery 11.

[0021] The grid-connected inverter system 10 first acquires battery information (state, voltage, current) to generate scenario-specific boost and buck transistor state combinations. It then calculates the current feedforward value based on the high and low voltage sides of the bidirectional buck-boost circuit 13, and performs voltage and current loop calculations based on these voltages. Subsequently, it verifies whether the set mode parameters of the bidirectional buck-boost circuit 13 match the state combination information. If they do not match, the set mode parameters are modified according to the state combination information, and the dual-loop calculation is re-performed based on the modified parameters. This method effectively covers key conditions such as charging and discharging requirements, voltage relationships, and load states through multi-condition input anchoring, feedforward value correlation with voltage relationships, dual-loop calculation adaptation to dynamic loads, mode verification for error prevention, and dynamic correction and supplementation. It avoids anomalies caused by easily overlooked scenarios when relying solely on switch combinations for judgment, ensuring the stable and efficient operation of the bidirectional buck-boost circuit.

[0022] Specifically, the switching wave control method of the bidirectional buck-boost circuit provided by the present invention includes the following steps: S101: Obtain battery information of the low-voltage battery, the battery information including at least one of battery status information, voltage information and current information, and obtain the status combination information of the boost tube and buck tube according to the battery information.

[0023] In a specific implementation scenario, battery information of the low-voltage battery is acquired. This information includes battery status information (e.g., whether the battery is fully charged, whether it is activated), current information, and voltage information (e.g., charging current, discharging current, charging voltage, discharging voltage). Based on this battery information, the state combination information of the boost and buck transistors is obtained. Specifically, the battery information reflects the current power demand, and the states of the boost and buck transistors can be rationally set according to this demand to obtain the state combination information.

[0024] State combination information can be represented by setting the waveform shutdown flag to 0 or 1. For example, if the waveform shutdown flag of the boost diode is set to 0 and the waveform shutdown flag of the buck diode is set to 1, the state combination information can be simply represented as 01, corresponding to the state where the boost diode is in operation and the buck diode is in operation.

[0025] In one implementation scenario, the basic states of the boost and buck transistors can be determined based on battery status information (such as fully charged or activated). Then, based on current and voltage information, it can be determined whether buck or boost voltage is needed, thereby determining the states of the boost and buck transistors. For example, if the battery status information indicates that the battery is fully charged, then because charging is prohibited after a full charge, the boost transistor is in the off-wave state. The buck transistor needs to be determined based on the current information to see if it needs to be turned on. When the discharge current is large, the buck transistor can be set to the on-wave state; when the discharge current is small, the buck transistor can be set to the off-wave state.

[0026] S102: Obtain the high-side voltage and low-side voltage of the bidirectional buck-boost circuit, and obtain the current feedforward value based on the high-side voltage and low-side voltage.

[0027] In a specific implementation scenario, the high-side voltage and low-side voltage of the bidirectional buck-boost circuit are obtained. The high-side voltage is the voltage on the inverter bus side, and the low-side voltage is the voltage of the battery after being boosted by the resonant converter. The current feedforward value is obtained based on the high-side and low-side voltages.

[0028] Specifically, the current feedforward value = (high-voltage side voltage - low-voltage side voltage) / high-voltage side voltage. The feedforward value essentially calculates a suitable duty cycle reference in advance based on the high-voltage side voltage and the low-voltage side voltage, avoiding lag in feedback control.

[0029] S103: Perform voltage loop and current loop operations based on the high-voltage side voltage and / or low-voltage side voltage.

[0030] In a specific implementation scenario, when the bidirectional buck-boost circuit is in boost mode, the high-voltage side voltage is acquired as the feedback voltage; when the bidirectional buck-boost circuit is in buck mode, the low-voltage side voltage is acquired as the feedback voltage. The inductor current in the bidirectional buck-boost circuit is collected, and the feedback current is obtained based on the inductor current.

[0031] The voltage error value is obtained by subtracting the feedback voltage from the preset reference voltage. This voltage error value is then input into the voltage loop regulator. The proportional loop quickly responds to the error, and the voltage loop integral loop accumulates the error and eliminates steady-state error to obtain the original reference current. The original reference current is then compared with the current loop limiting value to obtain the current loop reference current.

[0032] The current error value is obtained by subtracting the feedback current from the current loop reference current. This current error value is then input into the current loop regulator. Through rapid disturbance rejection by the proportional element and accumulation of error by the current loop integral element, the steady-state error of the current is eliminated, and the reference duty cycle is obtained. The feedforward duty cycle is obtained based on the current feedforward value. The feedforward duty cycle and the reference duty cycle are then superimposed to obtain the target duty cycle.

[0033] The target duty cycle is used to control the switching on and off of the boost and / or buck transistors in the bidirectional buck-boost circuit.

[0034] S104: Read the setting mode parameters of the bidirectional buck-boost circuit and determine whether the setting mode parameters match the state combination information. If not, proceed to step S105.

[0035] In a specific implementation scenario, the setting mode parameter BuckboostPwmMode of the bidirectional buck-boost circuit is read to determine whether the setting mode parameter matches the state combination information.

[0036] With BuckboostPwmMode=1, the boost diode is in open-wave mode, allowing for high-frequency conduction / turn-off, while the buck diode is in off-wave mode. The bidirectional buck-boost circuit is in boost mode, avoiding current shunting or interference. Because only one diode operates, there is no shoot-through risk from "two-diode switching," and the dead time is ineffective.

[0037] With BuckboostPwmMode=2, the boost diode is in off-wave mode, and the buck diode is in on-wave mode. High-frequency conduction / turn-off occurs, and the bidirectional buck-boost circuit is in buck mode. The boost diode is turned off to prevent reverse current shunting. Because only one diode operates, there is no shoot-through risk from "two-diode switching," and the dead time is ineffective.

[0038] With BuckboostPwmMode=3, both the boost and buck transistors are in open-wave mode. The bidirectional buck-boost circuit operates in a dual-transistor complementary mode, with the PWM signals of the boost and buck transistors strictly complementary. This means that when the boost transistor is on, the buck transistor is off, and vice versa. During this alternation, if the buck transistor is turned on immediately after the boost transistor is turned off, a brief shoot-through (short circuit between high and low voltage sides) will occur due to the device turn-off delay, thus initiating a dead time.

[0039] When BuckboostPwmMode is set to other values, both the boost and buck transistors are completely off. The bidirectional buck-boost circuit is in dual-transistor off mode. Since both transistors are off, there is no switching requirement, so the dead time is not applied.

[0040] When BuckboostPwmMode=1, check if the status combination information (the combination of the boost and buck transistor shut-off flags) is 01. If it is, it means that the two match; if not, it means that the two do not match.

[0041] When BuckboostPwmMode=2, check if the state combination information (the combination of the boost and buck transistor shut-off flags) is 10. If it is, it means that the two match; if not, it means that the two do not match.

[0042] When BuckboostPwmMode=3, check if the status combination information (the combination of the boost and buck transistor shut-off flags) is 00. If it is, it means that the two match; if not, it means that the two do not match.

[0043] When BuckboostPwmMode = other values, check if the status combination information (the combination of the boost and buck transistor shut-off flags) is 11. If it is, it means that the two match; if not, it means that the two do not match.

[0044] The above assignment of BuckboostPwmMode is just an example. In other implementation scenarios, the value of BuckboostPwmMode can be flexibly set according to the user's actual needs. Just make sure that the value of BuckboostPwmMode includes four different values.

[0045] In other implementation scenarios, a target duty cycle upper limit is set for each setting mode parameter. After obtaining the target duty cycle based on the output of the rerunning current loop operation, if the target duty cycle is higher than the target duty cycle upper limit, the target duty cycle upper limit is reduced as the new target duty cycle.

[0046] The duty cycle range is essentially a forced constraint on the on-time ratio of the switching transistor to avoid overvoltage, inductor saturation, and device damage. Therefore, the upper limit of the target duty cycle can be calculated based on parameters such as the minimum battery voltage, the turns ratio of the resonant converter, and the maximum bus voltage.

[0047] When BuckboostPwmMode=1, only the boost diode is in open-wave mode, and the steady-state duty cycle is calculated using the following formula:

[0048] in, The upper limit of the target duty cycle for the boost converter. This is the lowest battery voltage. Turns ratio, This represents the highest bus voltage. With a minimum battery voltage of 40V, a turns ratio of 15, and a maximum bus voltage of 900V, the calculated steady-state duty cycle is 33.3%. To cope with voltage fluctuations (such as a momentary drop in battery voltage below 40V or bus voltage below 900V), a margin of 35%, slightly higher than 33.3%, is set as the target duty cycle.

[0049] The step-down diode is in the off-wave state. Although logically the duty cycle of the step-down diode is complementary to that of the step-up diode, it has no practical significance.

[0050] When BuckboostPwmMode=2, only the buck converter is in open-wave mode. At this time, the bus charges the battery, and the battery voltage varies significantly from its minimum to its full charge voltage. A wide duty cycle is needed to adapt to the voltage requirements of different charging stages. At the lower limit of 0%, the buck converter is completely off, with no charging current, corresponding to scenarios where charging is not required (e.g., a fully charged battery). At the upper limit of 100%, the buck converter is fully on. The voltage obtained by the battery side is the bus voltage / turns ratio, which may be higher than the full charge voltage. However, during actual charging, the voltage loop will adjust the duty cycle to maintain the value corresponding to the full charge voltage. 100% is the maximum on-time allowed by the hardware, providing a margin to handle bus voltage fluctuations.

[0051] The higher the duty cycle, the higher the battery-side voltage, only when the buck converter is in open-wave mode. However, the full-charge voltage of the battery is a natural constraint (the voltage loop limits the duty cycle), and the inductor current will not saturate when the buck converter is turned on, so there is no need for narrow-range limitation.

[0052] The boost diode is in the off-wave state. Although the logic sets the duty cycle of the boost diode to be complementary to that of the buck diode, it has no practical significance.

[0053] When BuckboostPwmMode=3, both the boost and buck transistors are in open-wave mode. Even with dual-transistor operation, the conduction time of the boost transistor is still limited by the voltage limit. The target duty cycle upper limit (e.g., 35%) of the boost transistor is calculated based on the same logic as when BuckboostPwmMode=1. The duty cycle range of the buck transistor is entirely determined by the target duty cycle upper limit range and dead zone of the boost transistor, to always adapt to bidirectional energy regulation requirements.

[0054] When BuckboostPwmMode=4, both the boost and buck transistors are in a waveform-off state, with no drive output and the duty cycle having no impact on actual operation. The target duty cycle upper limit for the boost transistor (e.g., 35%) is calculated based on the same logic as when BuckboostPwmMode=1, but this is practically meaningless. Although the buck transistor's duty cycle is logically complementary to the boost transistor's, it is also practically irrelevant.

[0055] S105: Modify the setting mode parameters according to the state combination information, and re-perform voltage loop calculation and current loop calculation based on the modified setting mode parameters.

[0056] In a specific implementation scenario, when the set mode parameters do not match the state combination information, the set mode parameters are modified according to the state combination information. For example, if the state combination information (the shut-off flag combination of the boost and buck transistors) is 01, then BuckboostPwmMode=1; if the state combination information (the shut-off flag combination of the boost and buck transistors) is 10, then BuckboostPwmMode=2; if the state combination information (the shut-off flag combination of the boost and buck transistors) is 00, then BuckboostPwmMode=3; if the state combination information (the shut-off flag combination of the boost and buck transistors) is 11, then BuckboostPwmMode=other values.

[0057] Based on the modified setting mode parameters, the voltage loop and current loop calculations are re-performed. If BuckboostPwmMode changes, historical control deviations must be cleared and erroneous drives must be cut off to lay the foundation for the new loop calculations.

[0058] After switching mode parameters, the accumulated error of the original integral (e.g., the integral value of low-power discharge when BuckboostPwmMode=1) will not match the new mode condition (e.g., dual-tube dynamic adjustment when BuckboostPwmMode=3). If retained, it will cause a "starting point deviation" in the new loop operation (e.g., the current reference is abnormally high / low). Therefore, it is necessary to forcibly clear the voltage loop integral and the current loop integral to zero. Specifically, the integral accumulation register of the voltage loop regulator is set to 0 to ensure that the new operation starts from zero historical error. Similarly, the integral accumulation register of the current loop regulator is set to 0 to avoid sudden changes in the duty cycle caused by the old integral.

[0059] When switching mode parameters, the states of the boost and buck transistors may change drastically (e.g., from boost transistor open waveform, buck transistor off waveform to boost transistor open waveform, buck transistor open waveform). If the drive is not paused, the boost and buck transistors may conduct simultaneously (shoot-through short circuit) or the duty cycle may change abruptly, causing overcurrent. Therefore, the drive signal needs to be cut off at the hardware level. Thus, any drive waveform signal provided to the boost and buck transistors is paused to ensure that neither the boost nor the buck transistor has a drive signal and remains in the off state.

[0060] After switching the setting mode parameters, the voltage loop operation recalculates the current reference to ensure matching with the states of the boost and buck transistors. Based on the new setting mode parameters, the control target of the voltage loop is determined, and the new reference voltage and feedback voltage are obtained to recalculate the error. The new voltage error value is input to the voltage loop regulator. Since the integral has been cleared to zero, the calculation starting point is without deviation, and a new original reference current is obtained. A new current loop limit value is obtained based on the new setting mode parameters, and a new current loop reference current is obtained based on the new current loop limit and the new original reference current.

[0061] The current loop needs to recalculate the feedforward value and output duty cycle based on the new setting mode parameters, including the switching transistor configuration, dead time, and duty cycle range, to ensure compatibility with hardware limitations. The new feedback current and current feedforward value can be obtained. The new current error value is obtained by subtracting the new feedback current from the new current loop reference current. Based on the new current error value, the adjustment operation after integral zeroing is initiated to generate the corrected duty cycle. The corrected duty cycle is then superimposed on the new current feedforward value, and further processed according to the duty cycle range, dead time, and switching transistor state corresponding to the new setting mode parameters to obtain the final target duty cycle.

[0062] After obtaining the target duty cycle, the paused drive state is released, and the PWM output channel is configured according to the switching requirements of the boost and buck transistors corresponding to the newly set mode parameters. After the drive starts, the voltage loop and current loop continue to operate according to the new parameters (integral accumulation is normal).

[0063] In other implementation scenarios, if the mode parameters are set to match the state combination information, then step S105 does not need to be executed. Instead, the original voltage loop operation and current loop operation are executed to control the turn-on / turn-off of the boost and buck transistors in the bidirectional buck-boost circuit.

[0064] In one embodiment, when the state combination information is boost diode open-wave and buck diode closed-wave, if BuckboostPwmMode≠1, then BuckboostPwmMode=1. This is only executed once when BuckboostPwmMode≠1; subsequently, BuckboostPwmMode will be adjusted to 1, and this step will no longer be triggered, avoiding repeated execution that could lead to control malfunctions. All drives are disconnected first, then parameters are reset to prevent malfunctions caused by conflicts between old and new mode parameters.

[0065] The boost transistor in the bidirectional buck-boost circuit is forced to be open-wave while the buck transistor is closed-wave, providing a reference framework for subsequent parameter calculations and drive outputs. This ensures that subsequent voltage loop, current loop operations, and duty cycle limits are adapted to the hardware characteristics of only the boost transistor being open-wave.

[0066] The voltage loop integral is an accumulation of historical voltage errors. If the integrator was in another mode before the switch, the error accumulated in that mode is incompatible with BuckboostPwmMode=1. If not cleared, the voltage loop will carry the old integral value after the switch, potentially triggering overcurrent protection or damaging devices. After clearing, the voltage loop integral starts from zero and re-accumulates the error according to the voltage requirement of BuckboostPwmMode=1. The current loop reference current rises slowly to avoid current overshoot.

[0067] The current loop integral is a cumulative historical current error, and the current loop feedforward value will completely change after the switch, making the old integral incompatible with the new feedforward. Retaining the old integral would cause the total duty cycle of the integral correction plus the new feedforward value to jump abruptly, leading to a sharp increase in the boost diode's on-time and current surges. After resetting to zero, the current loop integral starts from zero, based solely on the current error cumulative correction with BuckboostPwmMode=1, matching the new feedforward value, and ensuring a stable duty cycle calculation.

[0068] The current loop feedforward and current loop output need to be reset to zero. The essence of feedforward is to pre-calculate the duty cycle reference based on the energy transfer formula of the current mode; the feedforward formulas are completely different for different modes. If the old feedforward is not reset, the old feedforward value will be directly used in the duty cycle calculation after switching, causing the boost diode's duty cycle to not meet actual requirements, the bus voltage to fail to reach the target, and even conflicting with the boost diode's boost logic. After resetting, the new feedforward value needs to be recalculated using the formula in BuckboostPwmMode=1 mode to ensure that the feedforward matches the energy flow of the new mode.

[0069] Both the current loop feedforward and output are assigned the latest feedforward values. The current loop output is the duty cycle signal that ultimately drives the boost / buck diode. The output value of the old mode was designed for the old boost / buck diode state and may not match the new current reference, causing current fluctuations. After resetting, the current loop output needs to be recalculated using the new feedforward + new PI integration (gradually generating the target duty cycle from 0) to avoid instantaneous disturbances caused by the old drive signal.

[0070] During parameter reset (clearing voltage loop integral and current loop integral, clearing feedforward / output), all drive signals to the boost and buck transistors are temporarily cut off, keeping them in the off state. Parameter reset takes time; if the drive signals are not paused, a superposition of old drive interruption and new parameter activation may occur, leading to chaotic conduction / turn-off of the boost and buck transistors, and even the risk of shoot-through. The pause duration is typically one PWM cycle (e.g., 66.7μs for 15kHz) to ensure that drive is resumed only after parameter reset is complete, avoiding hardware risks during switching intervals.

[0071] The purpose of the dead zone is to prevent shoot-through when the two tubes are working alternately. When BuckboostPwmMode=1, only the boost tube is in open wave mode, so the dead zone is not effective.

[0072] Because an inductor is included in the bidirectional buck-boost circuit, the current change of the inductor cannot be abrupt. Therefore, the duty cycle gradually increases from 0 to the target duty cycle. The inductor current rises steadily with the slow increase of the duty cycle to avoid exceeding the current limit value. This also avoids the instantaneous stress on the boost diode caused by sudden current surges (such as the surge current at the moment of conduction) and prevents the bus voltage from spiked or dropped due to sudden current changes.

[0073] In one embodiment, when the state combination information is boost diode off-wave and buck diode on-wave, if BuckboostPwmMode≠2, then BuckboostPwmMode=2. This is only executed once when BuckboostPwmMode≠2; subsequently, BuckboostPwmMode will be adjusted to 2, and this step will no longer be triggered, avoiding repeated execution that could lead to control malfunctions. All drives are disconnected first, then parameters are reset to prevent malfunctions caused by conflicts between old and new mode parameters.

[0074] The buck converter in the bidirectional buck-boost circuit is forced to be open-wave while the boost converter is closed-wave, providing a reference framework for subsequent parameter calculations and drive outputs. This ensures that subsequent voltage loop, current loop operations, and duty cycle limits are adapted to the hardware characteristics of only the buck converter being open-wave.

[0075] The voltage loop integral is an accumulation of historical voltage errors. If the integrator was in another mode before the switch, the error accumulated in that mode is incompatible with BuckboostPwmMode=2. If this is not cleared, the voltage loop will carry the old integral value after the switch, which may cause a sudden current surge in the buck converter, burning out the switching transistor or damaging the battery. After clearing to zero, the voltage loop integral starts from zero and re-accumulates the error according to the voltage requirement of BuckboostPwmMode=2. The current loop reference current rises slowly to avoid current surge.

[0076] The current loop integral is a cumulative historical current error, and the current loop feedforward value will completely change after the switch, making the old integral incompatible with the new feedforward. Retaining the old integral will result in an abnormal total duty cycle of the new feedforward value plus the old integral correction, leading to excessively long buck converter conduction time and a sudden increase in charging voltage. After resetting to zero, the current loop integral starts from zero, based solely on the current error cumulative correction with BuckboostPwmMode=2, matching the new feedforward value, and ensuring a stable duty cycle calculation.

[0077] When BuckboostPwmMode=2, the requirement is full-power charging and a stable charging voltage needs to be established quickly, by stepping down the high-voltage bus voltage to the low-voltage battery voltage. After assigning the latest feedforward value, the buck converter can operate with the duty cycle corresponding to the latest feedforward value when it starts up. The voltage after stepping down is directly close to the current battery voltage, instantly establishing charging conditions and avoiding undercharge or startup delay.

[0078] The current loop output is the duty cycle signal that directly drives the buck converter. If the latest feedforward value is set to 13.16% but the output is cleared to 0%, it will cause the control reference and drive action to become disconnected. Synchronously assigning the latest feedforward value to the output, after the drive is restored, the buck converter directly conducts with the duty cycle corresponding to the latest feedforward value. Subsequent current loops only need to fine-tune the small deviation between the actual current and the reference current (e.g., correcting from 13.16% to 13.5%), resulting in no duty cycle jumps and a stable charging current.

[0079] During the parameter reset process, similar to the previous embodiment, all drive signals to the boost and buck transistors are temporarily cut off, keeping both transistors in a cut-off state. Further details will not be provided here.

[0080] In one embodiment, when the state combination information is both boost diode open-wave and buck diode open-wave, if BuckboostPwmMode≠3, then BuckboostPwmMode=3. This is only executed once when BuckboostPwmMode≠3; subsequently, BuckboostPwmMode will be adjusted to 3, and this step will no longer be triggered, avoiding repeated execution that could lead to control malfunctions. All drives are disconnected first, then the parameters are reset to prevent malfunctions caused by conflicts between old and new mode parameters.

[0081] The bidirectional buck-boost circuit is forced to have both the boost diode and buck diode open-wave, providing a reference framework for bidirectional energy regulation for subsequent parameter calculations and drive output. This ensures that subsequent voltage loop, current loop operations, and duty cycle limits are all adapted to the hardware characteristics of both the boost diode and buck diode having open-wave, while the duty cycle limit also takes into account the inductor saturation prevention of the boost diode.

[0082] The voltage loop integral is the accumulation of errors in the single energy flow direction under the old mode. If it was in another unidirectional mode before the switch, it would completely conflict with the requirement of bidirectional dynamic adjustment (BuckboostPwmMode=3). Failure to zero would result in a current surge. After zeroing, the voltage loop integral starts from zero and restarts the accumulation based on the voltage error on the high-voltage side (such as the 5V error between the 220V bus and the current 215V). The current loop reference current gradually transitions to the reference value required for bidirectional adjustment (such as gradually increasing from 0 to +10A or -8A) to avoid current surge.

[0083] The current loop integral is the accumulation of historical current errors, and the current loop feedforward value may change after the switch. Incompatibility between the old integral and the new feedforward can lead to abnormal duty cycle of the dual-tube complementary circuit. The current loop integral starts from zero and is only based on the error accumulation correction between the current loop reference current (BuckboostPwmMode=3) and the actual feedback current, matching the new feedforward value.

[0084] Both the current loop feedforward and the output are assigned the latest feedforward value. The core scenario for BuckboostPwmMode=3 is when the load fluctuates drastically (such as a sudden rise / fall in bus voltage) or when there is a seamless switching between charging and discharging (such as switching from charging to discharging to the load), requiring the dual transistors to quickly adapt to the energy flow direction. Based on the current energy flow requirement after switching to BuckboostPwmMode=3, the latest feedforward value calculated according to the corresponding feedforward formula reflects the optimal duty cycle reference for the dual transistors' complementary operation. After assigning the latest feedforward value, the boost and buck transistors can adapt to the complementary duty cycle operation of the current energy flow direction upon startup, instantly establishing bidirectional regulation capability and preventing the amplification of voltage / current fluctuations.

[0085] The key to BuckboostPwmMode=3 is that the drive signals of the boost diode and buck diode are strictly complementary (the buck diode is turned off when the boost diode is turned on, and vice versa). The output is synchronously assigned the latest feedforward value. The boost diode and buck diode follow complementary logic from the first step after switching. The subsequent current loop only needs to be fine-tuned and there is no action conflict.

[0086] During the parameter reset process, similar to the previous embodiment, all drive signals to the boost and buck transistors are temporarily cut off, keeping both transistors in a cut-off state. Further details will not be provided here.

[0087] When BuckboostPwmMode=3, the dead time must be active during normal operation, but it is "temporarily inactive during switching." The core reason is that "the dead time parameter needs to match the latest feedforward value and the complementary logic of the two transistors (boost and buck), and parameter stability is prioritized during switching." First, a dual-transistor collaborative reference is established using a "complementary duty cycle without dead time" (e.g., 30% for the boost transistor and 70% for the buck transistor). After switching is completed and the parameters stabilize (e.g., 1-2 PWM cycles), the dead time is then enabled (corrected to 30% for the boost transistor and 65% for the buck transistor). This avoids dead time configuration errors during switching without affecting the safety of normal operation.

[0088] In one embodiment, when the state combination information does not meet the conditions of BuckboostPwmMode=1, 2, or 3 (such as abnormal switching transistor state, detected fault, no charging / discharging requirement, etc.), the current BuckboostPwmMode is defined as 4, and both the boost and buck transistors are in the off state, with no energy transfer. This is only executed once if BuckboostPwmMode≠4. Subsequently, BuckboostPwmMode will be adjusted to 4, and this step will no longer be triggered, avoiding repeated execution that could lead to control malfunctions. All drives are disconnected first, and then the parameters are reset to prevent malfunctions caused by conflicts between old and new mode parameters.

[0089] When BuckboostPwmMode=4, the on-grid and off-grid inverter system enters a fault isolation or standby energy-saving state, without the need for energy regulation, cutting off the energy path between the high and low voltage sides to protect devices and batteries.

[0090] Reset the voltage loop integral and current loop integral. The voltage loop integral is the historical error accumulation under normal regulation mode. If it is retained during a fault, when BuckboostPwmMode reverts from mode 4 to mode 1, 2, or 3, it will cause the current loop reference current to be abnormally high, leading to overcurrent. After resetting, the voltage loop integral starts from zero, and the current loop reference current is recalculated based on the current voltage error during the next startup, avoiding startup shock caused by residual deviation.

[0091] The current loop integral is the accumulation of current error in normal mode. In case of a fault, there may be overshoot deviation. If retained, it will cause abnormal duty cycle during the next recovery. After clearing it, the current loop integral starts from zero. On the next startup, the correction amount is calculated only based on the new current error, and there is no residual deviation in the duty cycle, so the drive logic is normal.

[0092] Both the current loop feedforward and output are assigned the latest feedforward value. By assigning the latest feedforward value, this parameter can be directly reused when switching to other setting parameters, eliminating the need for recalculation and effectively improving recovery speed. When BuckboostPwmMode=4, although both the boost and buck transistors are in a waveform-off state, the current loop feedforward and output must maintain logical consistency, ensuring the feedforward and output references are consistent. This allows for a smooth transition of the duty cycle during the next switch, without the risk of jumps.

[0093] Similar to the previous embodiment, during the parameter reset process, all drive signals to the boost and buck transistors are temporarily cut off, keeping both transistors in a cut-off state. After the parameter reset, all drive signals to the boost and buck transistors are forcibly shut off again, ensuring both are in a cut-off state, thus completely cutting off the energy path between the high and low voltage sides and preventing the fault from spreading.

[0094] When BuckboostPwmMode=4, both the boost and buck transistors are in a waveform-off state, so the dead time is not effective.

[0095] As described above, this embodiment acquires battery information from the low-voltage battery, obtains the state combination information of the boost and buck transistors based on the battery information, and uses the battery information to obtain key conditions such as charging and discharging requirements and current magnitude. Simultaneously, it combines the high and low voltage side voltage calculations of the bidirectional buck-boost circuit to calculate feedforward values, transforming the voltage relationship into a quantitative control benchmark. This avoids the omission of scenarios that traditional methods rely solely on the switching transistor combination and ignore core conditions. Furthermore, by setting mode parameters and matching and verifying the scenario-based state combination information, it actively identifies mismatches between the mode and the actual scenario, preventing switching malfunctions caused by mode mismatches. In case of mismatch, the mode parameters are corrected according to the state combination information, and the dual-loop operation is re-executed to ensure that the switching transistor action is always precisely synchronized with the charging and discharging requirements, voltage relationship, and load status, ultimately effectively avoiding anomalies and achieving stable and efficient control of the bidirectional buck-boost circuit.

[0096] Please refer to Figure 3, which is a flowchart illustrating an embodiment of the method for obtaining the state combination information of boost diode and buck diode based on battery information provided by the present invention.

[0097] S201: Determine whether the battery information meets the first requirement; if yes, proceed to step S204; if no, proceed to step S202.

[0098] In a specific implementation scenario, the first requirement includes at least one of the following: the battery status information is that the battery is in an active state; the charging current is greater than the preset charging current; and the product of the battery voltage and the turns ratio is greater than the sum of the minimum bus setting and the hysteresis.

[0099] When the low-voltage battery is charging, the charging current needs to be adjusted using the PWM pulse bandwidth of the buck converter. When the buck converter is on, it stores energy in the inductor L, causing the current to rise. When the buck converter is off, the inductor L releases energy through the freewheeling path, charging the battery, and the current decreases. By adjusting the PWM duty cycle, the charging current can be stabilized at the target value. Therefore, the buck converter is in an open-wave state when the low-voltage battery is charging. If the boost converter is on at this time, a dead time (the time when both the boost and buck converters are off) needs to be set.

[0100] When the charging current is large, the inductor current has greater inertia. During the dead zone, both the boost and buck transistors are turned off, and the inductor can only release energy through the path of "battery → resonant converter → freewheeling diode." The current decrease rate suddenly slows down, resulting in larger fluctuations in the charging current. Furthermore, the dead zone effectively cuts off the control link of the buck transistor. Even if the current is detected to be lower than the target value, it is necessary to wait for the dead zone to end before the buck transistor can be turned on again, leading to an increase in current regulation lag time and even current regulation malfunction.

[0101] Therefore, when the charging current is large (greater than the preset charging shutdown current), the boost diode is turned off, eliminating the risk of shoot-through between the boost and buck diodes, and the dead zone is ineffective. The charging current control is entirely handled by the buck diode. When the buck diode is on, it stores energy; when it is off, the inductor discharges through a fixed freewheeling path. Current fluctuations are determined solely by the buck diode's PWM duty cycle, keeping the fluctuation amplitude low. The current loop response speed returns to normal, meeting the accuracy requirements of high-current charging. The absence of a dead zone means no shoot-through risk, reduced current fluctuations under high current, and prevention of buck diode damage due to current surges or overheating.

[0102] To improve the accuracy of the judgment and avoid frequent changes in the switching waveform of the step-down diode, the original sampling current is filtered by moving average to obtain the charging current.

[0103] The turns ratio is the number of turns in the transformer of the resonant converter. For example, if the number of turns on the primary side is N1 and the number of turns on the secondary side is N2, the turns ratio = N2 / N1. Battery voltage × turns ratio represents the voltage actually output to the input of the bidirectional buck-boost circuit after the battery voltage is transformed by the resonant converter, indicating the initial voltage at which the battery supplies power to the inverter bus. The minimum bus setpoint is the lowest voltage threshold that the inverter bus needs to maintain, determined by the mains power standard or the inverter's operating requirements. For example, in a single-phase mains power scenario, the minimum bus setpoint might be set to 220V × 1.2 ≈ 264V to ensure the inverter can stably output AC power that meets the mains power requirements. The fixed hysteresis buffer voltage value (e.g., set to 5V or 10V) essentially represents the upper and lower fluctuation range of the threshold. The minimum bus setpoint plus the hysteresis constitutes the upper limit threshold.

[0104] When the battery voltage × turns ratio is greater than or equal to the minimum bus setpoint plus hysteresis, the equivalent supply voltage of the low-voltage battery after transformation by the resonant converter exceeds the minimum bus requirement plus buffer value. In this case, even without turning on the boost diode, the voltage provided by the voltage battery can directly (or be finely adjusted by the buck diode) meet the minimum voltage requirement of the bus. To reduce the switching losses caused by the frequent on / off of the boost diode, the boost diode is placed in the off-wave state.

[0105] Battery activation refers to the state in which a battery is activated in an off-grid or grid-connected inverter system during initial connection of a new battery, wake-up after long-term storage, or initialization after fault recovery. The core purpose is to wake up the Battery Management System (BMS) with low power to perform cell voltage equalization, preliminary capacity testing, and pre-charge the battery with a very small current (typically in the milliampere range, far below the ampere range of normal charging and discharging) to avoid damage from high current surges. It also verifies the communication between the battery and the system, preparing for subsequent normal charging and discharging. When the battery is in the activation state, low-power, low-current charging is used, without requiring high voltage or high energy output.

[0106] Since the battery only needs to provide low voltage and low current power to the battery BMS and its own control circuit when it is in the active state, even if the voltage after the battery is transformed by the resonant converter (i.e., battery voltage × turns ratio) does not reach the high threshold of the normal bus (e.g., the minimum bus setpoint and hysteresis), it can fully meet the low voltage requirements required in the active state, and there is no need to use a boost diode to boost the voltage.

[0107] When the boost diode is operating, it requires high-frequency switching to boost the voltage. This high-frequency switching causes ripple in the output current, while a stable, low current is needed during activation. Current fluctuations can lead to BMS detection errors or even activation failure. By turning off the boost diode, the battery-side power supply path is free from high-frequency switching interference, resulting in a more stable output current that meets the BMS's requirement for a small and stable current during activation. This avoids activation failure or inaccurate cell voltage detection caused by frequent boost diode switching. Furthermore, turning off the boost diode completely eliminates its switching losses and avoids electromagnetic interference from high-frequency switching on weak BMS signals (such as cell voltage sampling signals), improving the safety and reliability of the activation process.

[0108] S202: Determine whether the voltage and current information meet the second requirement. If so, proceed to step S203.

[0109] S203: Set the boost tube to open wave mode.

[0110] S204: Set the boost transistor to wave-off state.

[0111] In a specific implementation scenario, when the battery status information is in the charging state, the core function of the boost diode is "voltage boosting". However, in the charging scenario, when the battery side voltage is too low, even if there is a resonant converter (which achieves preliminary voltage transformation through "battery voltage × turns ratio"), the boost diode is still needed to assist in voltage boosting so that the battery side voltage can reach a level that can receive the charging current and avoid charging interruption due to insufficient voltage.

[0112] When the boost diode operates at the preset charging shutdown current, it reaches a safe upper limit to prevent dead-time interference due to excessive current. When the charging current is less than the preset charging shutdown current, even if the boost diode is turned on / off at high frequency in open-wave mode, it will not trigger dead-time effects due to excessive current. At the same time, the current ripple generated by the switching action of the boost diode under low current is also smaller, which will not interfere with the stable current required for battery charging. From the perspective of current safety, the boost diode can be in open-wave mode.

[0113] Furthermore, when the battery voltage × turns ratio is less than the minimum bus setting, the actual output voltage of the battery after passing through the resonant converter is lower than the minimum voltage value required for the inverter bus to charge the battery normally. In this case, if the boost diode is not activated, the fixed transformer of the resonant converter alone cannot raise the battery voltage to a level sufficient to receive the charging current, resulting in weak or even no charging current, and the charging process cannot proceed normally. Therefore, the boost diode must be activated (set to open-wave mode) to further boost the output voltage until the minimum bus setting voltage requirement is met, creating a sufficient voltage difference to ensure a stable flow of charging current into the battery.

[0114] Since the charging current is less than the preset charging current, the high-frequency switching action of the boost diode will not cause dead zone interference or current surge. At the same time, the switching loss is also at a low level, which ensures the boost effect and avoids damage to the boost diode, battery BMS and other devices.

[0115] In other implementation scenarios, voltage and current information may not meet the second requirement. For example, when battery voltage × turns ratio ≥ minimum bus setting and / or charging current is greater than or equal to the preset charging shutdown current, the original state of the boost and buck transistors should be maintained. These two conditions (high battery voltage or large charging current) indicate that the system is in a high-efficiency discharge condition that does not require boost transistor intervention or a high-current charging condition that requires buck transistor to operate independently. Allowing mode switching in this case would not only fail to improve efficiency but would also introduce risks. For example, forcibly turning on the boost transistor under high voltage would lead to unnecessary switching losses and possible structural conflicts; switching modes under large charging current could trigger huge current or voltage stresses, impacting power devices and the battery. Therefore, using this situation as a priority holding condition essentially locks the system into a known, safe, efficient, and stable operating state, thereby maintaining system stability and preventing harmful oscillations. This avoids frequent mode jumps caused by parameter fluctuations near the critical point, ensuring the robustness of control.

[0116] As described above, in this embodiment, the boost transistor is turned off during high-current charging to avoid dead-zone interference with the buck transistor's control accuracy, and the current filtering value is used to prevent frequent switching. When the battery voltage is high enough, the boost transistor is turned off to reduce switching losses during the discharge phase, and the hysteresis greater than the line voltage drop is used to further avoid switching oscillations. During the battery activation phase, the boost transistor is turned off to adapt to the special requirements of low power and low current. The boost transistor is set to open-wave state only when the current is low and the battery side voltage is insufficient to ensure normal charging. Overall, the boost transistor is turned on and off as needed, taking into account control stability, energy consumption optimization and operating condition adaptability, and improving system operating efficiency and reliability.

[0117] Please refer to Figure 4, which is a flowchart illustrating an embodiment of the method for obtaining the state combination information of boost diode and buck diode based on battery information provided by the present invention.

[0118] S301: Determine whether the low-voltage battery is fully charged. If not, proceed to step S304. If yes, proceed to step S302.

[0119] In a specific implementation scenario, when the battery status information indicates that the battery is charging, but not fully charged, a step-down diode is activated to achieve controllable voltage reduction and constant current charging from the high-voltage bus to the low-voltage battery, preventing charging runaway or charging failure. The low-voltage battery's BMS can determine whether the battery is fully charged. The BMS can issue a full-charge status signal when the battery terminal voltage reaches the full-charge cutoff voltage and the current during the constant-voltage charging phase drops to the trickle charge threshold.

[0120] The inverter bus voltage of off-grid inverters is typically very high, while the charging voltage of low-voltage batteries is much lower than that of the bus. Without the step-down diode, the high voltage on the bus cannot be controlled and will either discharge directly through components such as the freewheeling diode, causing the charging voltage to far exceed the battery's tolerance; or, due to the excessive voltage difference, the charging current will surge instantaneously to short-circuit levels. By placing the step-down diode in open-wave mode, the step-down amplitude can be controlled via PWM pulse width adjustment, precisely stabilizing the output voltage within the range required for battery charging and preventing overvoltage.

[0121] Therefore, when the low-voltage battery is not fully charged, the step-down diode is set to open-wave mode.

[0122] S302: Determine whether the discharge current is greater than the preset open wave current. If not, proceed to step S303; if yes, proceed to step S305.

[0123] In a specific implementation scenario, the battery status information indicates that the battery is fully charged and has entered the discharge state. Since there is no need to recharge the battery, if the discharge current is large and only the freewheeling diode is relied upon for freewheeling, the large forward voltage drop of the diode will lead to excessive losses, severe heat generation, and even burnout of the diode. Therefore, the core function of the step-down diode is to assist in freewheeling. When the discharge current is large, it replaces part of the work of the freewheeling diode and reduces its burden.

[0124] After the buck converter is turned on by the PWM drive signal, it can form a parallel freewheeling path with the freewheeling diode, carrying most of the discharge current, with only a small portion passing through the freewheeling diode. This reduces the current load on the freewheeling diode, significantly decreasing heat generation and preventing damage from overheating, thus extending the device's lifespan. Therefore, when the discharge current exceeds the preset open-wave current, the buck converter is set to open-wave mode.

[0125] The essence of a buck converter is to achieve current / voltage control through PWM pulse width modulation. However, the accuracy of this control drops significantly in low-current scenarios. When the discharge current is very small (less than the preset open-wave current), the PWM duty cycle of the buck converter will be very small. At this time, even a slight deviation in the duty cycle by the control chip will directly change the current direction. This small reverse charging current is difficult to detect when the main discharge current covers it during high-current discharge; however, during low-current discharge, it will continuously inject into the fully charged battery. A fully charged battery cell has no "capacity margin," and continuous charging will cause the voltage to rise continuously, exceeding the cell's withstand voltage limit and causing overvoltage damage.

[0126] When the battery is fully charged, the software control precision of the step-down diode is insufficient during low-current discharge, which can easily lead to reverse micro-charging due to duty cycle deviation, causing overvoltage damage. Turning off the step-down diode can completely block reverse charging through the hardware unidirectional conductivity of the freewheeling diode, and since diode losses are negligible at low currents, there is no need to worry about efficiency issues. Ultimately, this achieves the core goal of normal discharge and preventing overvoltage of a fully charged battery.

[0127] As described above, the discharge current here is obtained by smoothing and filtering the original sampling current to avoid the influence of load fluctuations and sensor noise.

[0128] S303: Determine whether the discharge current is greater than the preset discharge shutdown current. If so, proceed to step S304.

[0129] In a specific implementation scenario, if the discharge current exceeds a preset shutdown current (a very small positive value), the buck converter is set to shutdown mode. The core purpose is to completely shut down the buck converter during low-to-medium current discharge. This eliminates the risk of battery overvoltage caused by the weak reverse charging current generated during circuit operation, protecting battery life and safety. Furthermore, it eliminates the switching losses and static power consumption of the buck converter itself, significantly optimizing the overall energy efficiency of the system under light-load standby conditions. This operation, combined with the open-wave buck converter strategy under high current, effectively prevents frequent mode switching near the critical point by setting the shutdown current to be less than the open-wave current, ensuring system stability.

[0130] S304: Set the step-down diode to the wave-off state.

[0131] S305: Set the step-down diode to open-wave mode.

[0132] As described above, in this embodiment, when the battery is not fully charged, the step-down diode is turned on to ensure controllable voltage reduction and constant current charging from the high-voltage bus to the low-voltage battery, meeting the core charging requirements. After the battery is fully charged, during high-current discharge, the step-down diode is turned on and combined with current filtering. This not only reduces the load on the freewheeling diode and lowers losses through low-resistance current shunt, but also avoids frequent switching caused by current fluctuations. When the battery is fully charged and discharging with a small current, the step-down diode is turned off, and the unidirectional conductivity of the freewheeling diode completely blocks the reverse micro-charging path, preventing battery overvoltage damage. Overall, this design balances charging controllability, discharge efficiency, and full-charge safety, adapting to different operating conditions and effectively improving system reliability and battery lifespan.

[0133] Please refer to Figure 5, which is a schematic diagram of an embodiment of the power supply device provided by the present invention. The power supply device 20 includes a processor 21 and a memory 22. The processor 21 is coupled to the memory 22. The memory 22 stores a computer program, which the processor 21 executes during operation to implement the method described above. Detailed steps can be found above and will not be repeated here.

[0134] Please refer to Figure 6, which is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. The computer-readable storage medium 30 stores at least one computer program 31, which is executed by a processor to implement the method described above. Detailed steps are described above and will not be repeated here. In one embodiment, the computer-readable storage medium 30 may be a storage chip in a terminal, a hard disk, a portable hard disk, a USB flash drive, an optical disc, or other readable and writable storage tools, or it may be a server, etc.

[0135] In the several embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0136] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0137] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0138] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

[0140] The methods disclosed in the several method embodiments provided by this invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0141] The features disclosed in the several product embodiments provided by this invention can be arbitrarily combined without conflict to obtain new product embodiments.

[0142] The features disclosed in the several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0143] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the appended claims of the present invention.

Claims

1. A switching wave control method for a bidirectional buck-boost circuit, characterized in that, This invention relates to an off-grid / parallel inverter system, comprising a low-voltage battery, a resonant converter, a bidirectional buck-boost circuit, and an inverter bus connected in sequence. The bidirectional buck-boost circuit includes a boost diode and a buck diode connected to each other. The switching waveform control method for the bidirectional buck-boost circuit includes: acquiring battery information of the low-voltage battery, the battery information including at least one of battery status information, voltage information, and current information; acquiring a state combination information of the boost diode and the buck diode based on the battery information; acquiring the high-voltage side voltage and the low-voltage side voltage of the bidirectional buck-boost circuit, and acquiring a current feedforward value based on the high-voltage side voltage and the low-voltage side voltage; performing voltage loop calculations and current loop calculations based on the high-voltage side voltage and / or the low-voltage side voltage; reading the set mode parameters of the bidirectional buck-boost circuit, and determining whether the set mode parameters match the state combination information; if not, modifying the set mode parameters based on the state combination information, and re-performing the voltage loop calculations and current loop calculations based on the modified set mode parameters.

2. The switching wave control method for the bidirectional buck-boost circuit according to claim 1, characterized in that, The step of obtaining the state combination information of the boost diode and the buck diode based on the battery information includes: determining whether the battery information meets a first requirement; if so, setting the boost diode to a waveform-off state; determining whether the voltage information and the current information meet a second requirement; if not, setting the boost diode to a waveform-on state; the first requirement includes at least one of the following: the battery state information is in an active state; the charging current is greater than a preset waveform-off current; the product of the battery voltage and the turns ratio is greater than the sum of the minimum bus setting and the hysteresis; the second requirement includes the charging current being less than the preset waveform-off current and the product of the battery voltage and the turns ratio being less than the minimum bus setting.

3. The switching wave control method for the bidirectional buck-boost circuit according to claim 2, characterized in that, The step of obtaining the state combination information of the boost diode and the buck diode based on the battery information further includes: determining whether the low-voltage battery is fully charged; if not, setting the buck diode to open-wave state; if so, determining whether the discharge current is greater than a preset open-wave current; if so, setting the buck diode to open-wave state; if not, determining whether the discharge current is greater than a preset closed-wave current; if so, setting the buck diode to closed-wave state.

4. The switching wave control method for the bidirectional buck-boost circuit according to claim 1, characterized in that, The step of re-performing the voltage loop and current loop calculations based on the modified setting mode parameters includes: clearing the voltage loop integral of the voltage loop calculation and the current loop integral of the current loop calculation, and reassigning values ​​to the current loop feedforward and output; pausing the supply of any drive waveform signals to the boost diode and the buck diode; obtaining the target duty cycle based on the output of the re-running voltage loop and current loop calculations, and driving the boost diode and / or the buck diode to turn on or off based on the target duty cycle.

5. The switching wave control method for the bidirectional buck-boost circuit according to claim 4, characterized in that, When the state combination information is that the boost diode is open-wave and the buck diode is off-wave, the step of reassigning the current loop feedforward and the output includes: clearing the current loop feedforward and the output to zero.

6. The switching wave control method for the bidirectional buck-boost circuit according to claim 4, characterized in that, When the state combination information is any one of the following: the boost diode is off and the buck diode is on, the boost diode is on and the buck diode is on, or the boost diode is off and the buck diode is off, the step of reassigning values ​​to the current loop feedforward and the output includes: assigning values ​​to the current loop feedforward and the output based on the current feedforward value.

7. The switching wave control method for the bidirectional buck-boost circuit according to claim 4, characterized in that, Before the step of obtaining the target duty cycle based on the output of the rerunning current loop operation, the method includes: obtaining the upper limit of the target duty cycle based on the lowest voltage of the low-voltage battery, the turns ratio, and the highest bus voltage.

8. An off-grid / on-grid inverter system, characterized in that, The off-grid inverter system includes a low-voltage battery, a resonant converter, a bidirectional buck-boost circuit, and an inverter bus connected in sequence. The bidirectional buck-boost circuit includes a boost diode and a buck diode connected to each other. The bidirectional buck-boost circuit is used to implement the switching wave control method of the bidirectional buck-boost circuit according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The device stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.

10. An energy supply device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.