A control method for grid-connected to off-grid switching of a dual-wire energy storage inverter

By detecting grid anomalies and adjusting the full-bridge circuit drive mode, the capacitor energy is released to the bus. Combined with phase synchronization optimization, the voltage oscillation problem of the residential dual-wire energy storage inverter during the grid-to-off-grid transition is solved, and stable voltage output is achieved.

CN121546659BActive Publication Date: 2026-05-26SHENZHEN POWEROAK NEWENER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN POWEROAK NEWENER CO LTD
Filing Date
2026-01-20
Publication Date
2026-05-26

Smart Images

  • Figure CN121546659B_ABST
    Figure CN121546659B_ABST
Patent Text Reader

Abstract

This invention discloses a control method for switching a dual-wire energy storage inverter from grid-connected to off-grid operation, comprising the following steps: S1: Detecting abnormal grid conditions and disconnecting the grid-connected relay when an abnormality occurs; S2: Determining whether the absolute value of the filter capacitor voltage exceeds a predetermined threshold and whether the discharge time is less than a predetermined time limit; S3: Selecting a corresponding combination of switching transistors for high-frequency drive based on the polarity of the capacitor voltage to reconstruct the full-bridge circuit into a boost circuit; S4: Calculating the duty cycle of the switching transistors based on the dynamic relationship between the capacitor voltage and the bus voltage, and discharging the capacitor energy to the DC bus through the boost circuit; S5: Resetting the output phase angle of the energy storage inverter to zero and starting off-grid operation. This invention effectively solves the problem of voltage oscillation during off-grid startup of residential dual-wire energy storage inverters under various grid-connected to off-grid operating conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy storage inverter technology, and in particular to a control method for switching a dual-wire energy storage inverter from grid connection to off-grid operation. Background Technology

[0002] Residential dual-wire energy storage inverters with grid-connection capability must have the ability to quickly switch to off-grid operation when grid anomalies occur. This switching typically completes within one or half a power frequency cycle. This time includes grid anomaly detection time, relay switching time, and the inverter's off-grid output time. The inverter's output terminal includes a filter capacitor. In grid-connected mode, the voltage across this capacitor follows a sinusoidal pattern, similar to the grid voltage. If a grid anomaly occurs when the grid voltage is high, the inverter voltage is prone to oscillation during the initial off-grid output phase. This oscillation affects the inverter's voltage output stability and poses a risk of damaging the load. The main cause of this oscillation is the mismatch between the inverter's initial duty cycle and the initial voltage.

[0003] To address the aforementioned issues, existing technologies have proposed two solutions: the first is to use hardware devices and circuit detection modules outside the inverter to achieve automatic switching; the second is to change the inverter's initial reference voltage or initial PWM duty cycle, using the current capacitor voltage as the initial reference voltage while adjusting the initial phase, thus achieving a basic match between the initial voltage and duty cycle. However, these two solutions still cannot effectively solve the problem of voltage oscillation during off-grid startup of residential dual-wire energy storage inverters under various grid-to-off-grid conditions.

[0004] The above background information is provided only to aid in understanding the concept and technical solution of this invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above information was disclosed on the filing date of this patent application, the above background information should not be used to evaluate the novelty and inventiveness of this application. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes a control method for grid-connected to off-grid operation of a dual-wire energy storage inverter, which can effectively solve the problem of voltage oscillation during off-grid startup of a residential dual-wire energy storage inverter under various grid-connected to off-grid operating conditions.

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

[0007] In a first aspect, the present invention discloses a control method for switching a dual-live-wire energy storage inverter from grid connection to off-grid operation, comprising the following steps:

[0008] S1: Detects abnormal power grid conditions and disconnects the grid-connected relay when an abnormality occurs;

[0009] S2: Determine whether the absolute value of the filter capacitor voltage exceeds the predetermined threshold and whether the discharge time is less than the predetermined time limit;

[0010] S3: Select the corresponding combination of switching transistors for high-frequency drive according to the polarity of the capacitor voltage to reconstruct the full-bridge circuit into a boost circuit;

[0011] S4: Calculate the duty cycle of the switching transistor based on the dynamic relationship between the capacitor voltage and the bus voltage, and discharge the capacitor energy to the DC bus through the boost circuit;

[0012] S5: Reset the output phase angle of the energy storage inverter to zero and start off-grid operation.

[0013] Furthermore, step S2 also includes: when the absolute value of the filter capacitor voltage exceeds a predetermined threshold and the discharge time is less than a predetermined time limit, step S3 is executed; otherwise, step S5 is executed; wherein after step S4 is completed, the process returns to step S2.

[0014] Furthermore, the predetermined threshold in step S2 is 3% to 7% of the peak value of the inverter's rated voltage.

[0015] Furthermore, the predetermined time limit in step S2 is 3ms to 5ms.

[0016] Furthermore, in step S3, the frequency of the high-frequency driven switching transistor is consistent with the switching transistor frequency when the energy storage inverter is operating normally.

[0017] Furthermore, the dual-wire energy storage inverter is composed of two full-bridge inverter circuits connected in parallel. Each full-bridge inverter circuit includes a DC bus, a first switch, a second switch, a third switch, a fourth switch, an inductor, and a capacitor. The first switch and the second switch are connected in series to form a first branch, and the third switch and the fourth switch are connected in series to form a second branch. The first branch and the second branch are respectively connected to the two ends of the DC bus, and the first switch and the third switch are respectively connected to the positive end of the DC bus, while the second switch and the fourth switch are respectively connected to the negative end of the DC bus. The first end of the inductor is connected between the first switch and the second switch, the second end of the inductor is connected to the first end of the capacitor, and the second end of the capacitor is connected between the third switch and the fourth switch. The second ends of the capacitors in the two full-bridge inverter circuits are interconnected.

[0018] Step S3 includes: when the capacitor voltage is determined to be positive, maintaining the first and third switches at a continuous low level, the fourth switch at a continuous high level, and the second switch switching at a high frequency; when the capacitor voltage is determined to be negative, maintaining the first and third switches at a continuous low level, the second switch at a continuous high level, and the fourth switch switching at a high frequency; so as to reconstruct the full-bridge circuit into a boost circuit.

[0019] Further, the calculation of the switching transistor duty cycle based on the dynamic relationship between the capacitor voltage and the bus voltage in step S4 includes: updating the calculation of the switching transistor duty cycle based on the capacitor voltage and the bus voltage at a preset period. The calculation formula for the switching transistor duty cycle is: Duty = 1-|Uc| / Ubus, where Duty represents the duty cycle of the switching transistor during high-frequency switching, Uc represents the capacitor voltage, and Ubus represents the DC bus voltage.

[0020] Furthermore, in step S4, the process of discharging capacitor energy to the DC bus through the boost circuit is controlled by a first counter and a second counter, wherein the first counter controls the total discharge time, and the second counter updates the duty cycle of the switching transistor at a preset period.

[0021] Furthermore, the preset period is 0.5ms to 2ms.

[0022] In a second aspect, the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program is configured to be run by a processor to execute the grid-connected to off-grid control method for a dual-wire energy storage inverter described in the first aspect.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: The control method for grid-connected to off-grid switching of the dual-wire energy storage inverter proposed in this invention first releases the energy in the inverter capacitor to the bus by adjusting the drive of the inverter full-bridge circuit, and then starts the inverter output with the phase position at zero. This ensures that the voltage of both phases does not oscillate at the initial moment of grid-connected to off-grid switching of the residential dual-wire energy storage inverter. On the one hand, it can be achieved only through software control strategy without adding extra costs; on the other hand, it effectively solves the problem of voltage oscillation during off-grid startup of the residential dual-wire energy storage inverter under various grid-connected to off-grid operating conditions.

[0024] Other beneficial effects of the embodiments of the present invention will be further described below. Attached Figure Description

[0025] Figure 1 This is a flowchart of the control method for switching a dual-wire energy storage inverter from grid connection to off-grid operation, as disclosed in Embodiment 1 of the present invention.

[0026] Figure 2This is a schematic diagram of the full-bridge inverter circuit structure of a preferred embodiment of the present invention;

[0027] Figure 3 This is a schematic diagram of the four switching transistors when the capacitor voltage is positive;

[0028] Figure 4 This is a schematic diagram of the four switching transistors when the capacitor voltage is negative;

[0029] Figure 5 This is a flowchart of the control method for switching a dual-wire energy storage inverter from grid connection to off-grid operation, as disclosed in a specific embodiment of the present invention.

[0030] Figure 6 This is a two-phase voltage waveform diagram of a dual-wire energy storage inverter obtained by using the grid-connected to off-grid control method of a dual-wire energy storage inverter in a specific embodiment of the present invention.

[0031] Figure 7a This is a waveform diagram of the voltage of two phases of a dual-live-wire energy storage inverter obtained by using the conventional grid-connected to off-grid processing method.

[0032] Figure 7b This is a waveform diagram of the voltage of the two phases of the dual-live-wire energy storage inverter obtained by using the grid-connected to off-grid control method of the dual-live-wire energy storage inverter proposed in this invention when the voltage of the dual live wires is reversed after disconnection from the grid.

[0033] Figure 7c The diagram shows the waveform of the two-phase voltage of the dual-wire energy storage inverter obtained by using the grid-connected to off-grid control method proposed in this invention when the voltages of the two wires are in the same direction after the inverter is disconnected from the grid.

[0034] Figure 7d The diagram shows the waveform of the two-phase voltage of the dual-wire energy storage inverter obtained by using the grid-connected to off-grid control method proposed in this invention when the voltages of the two live wires are in the same direction after the grid disconnection and exceed the off-grid rated voltage. Detailed Implementation

[0035] The embodiments of the present invention will be described in detail below. It should be emphasized that the following description is merely exemplary and not intended to limit the scope and application of the present invention.

[0036] It should be noted that when a component is referred to as "fixed to" or "set on" another component, it can be directly on or indirectly on that other component. When a component is referred to as "connected to" another component, it can be directly connected to or indirectly connected to that other component. Furthermore, a connection can be used for both fixing and circuit / signal connectivity.

[0037] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.

[0038] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0039] Analysis of the two schemes mentioned in the background technology reveals the following drawbacks: The first scheme achieves automatic switching between grid connection and off-grid operation, requiring virtually no software intervention, but it incurs additional costs and is uneconomical. The second scheme can solve the voltage oscillation problem during inverter startup in most cases, but it cannot solve the problem in special circumstances, such as the following two scenarios: (1) When the capacitor voltage exceeds the peak value of the inverter's rated voltage, this method is not suitable because setting the initial reference voltage above the rated voltage is not permitted; (2) In the initial stage of off-grid output of a residential dual-wire energy storage inverter, the initial voltages of the two capacitors may be positive or negative, but the second scheme can only prevent voltage oscillation in one phase.

[0040] To address the shortcomings of existing solutions, this invention proposes a method to effectively solve the voltage oscillation problem during off-grid startup of residential dual-wire energy storage inverters under various grid-connected to off-grid conditions. This method can be implemented solely through software control strategies: first, by adjusting the drive of the inverter full-bridge circuit, the energy in the inverter capacitor is released to the bus; then, the phase position is zero to start the inverter output. This solves the voltage oscillation problem caused by the mismatch between the initial voltage of the filter capacitor and the inverter output duty cycle during grid-connected to off-grid transition of the dual-wire energy storage inverter, ultimately ensuring that the voltage of either phase does not oscillate at the initial moment of grid-connected to off-grid transition.

[0041] Embodiment 1 of the present invention discloses a control method for switching a dual-wire energy storage inverter from grid connection to off-grid operation, comprising the following steps:

[0042] S1: Detects abnormal power grid conditions and disconnects the grid-connected relay when an abnormality occurs;

[0043] S2: Determine whether the absolute value of the filter capacitor voltage exceeds the predetermined threshold and whether the discharge time is less than the predetermined time limit;

[0044] In this step, both voltage and time thresholds are used to determine whether to perform a discharge.

[0045] When the absolute value of the filter capacitor voltage exceeds a predetermined threshold and the discharge time is less than a predetermined time limit, step S3 is executed; otherwise, step S5 is executed.

[0046] In some embodiments, the predetermined threshold is 3% to 7% of the peak value of the inverter's rated voltage; the predetermined time limit is 3ms to 5ms.

[0047] S3: Select the corresponding combination of switching transistors for high-frequency drive according to the polarity of the capacitor voltage to reconstruct the full-bridge circuit into a boost circuit;

[0048] In this step, the inverter full-bridge circuit is reconstructed into a boost circuit to quickly release the residual energy of the filter capacitor to the DC bus.

[0049] In some embodiments, the frequency of the high-frequency driven switching transistor is the same as the switching transistor frequency when the energy storage inverter is operating normally.

[0050] The dual-wire energy storage inverter consists of two full-bridge inverter circuits connected in parallel. Each full-bridge inverter circuit includes a DC bus, a first switch, a second switch, a third switch, a fourth switch, an inductor, and a capacitor. The first and second switches are connected in series to form a first branch, and the third and fourth switches are connected in series to form a second branch. The first and second branches are connected to the two ends of the DC bus, with the first and third switches connected to the positive terminal of the DC bus and the second and fourth switches connected to the negative terminal. The first end of the inductor is connected between the first and second switches, and the second end of the inductor is connected to the first end of the capacitor. The second end of the capacitor is connected between the third and fourth switches. The second ends of the capacitors in the two full-bridge inverter circuits are interconnected.

[0051] This step includes: when the capacitor voltage is positive, keeping the first and third switches off (continuously low level), the fourth switch normally open (continuously high level), and the second switch switching at high frequency; when the capacitor voltage is negative, keeping the first and third switches off (continuously low level), the second switch normally open (continuously high level), and the fourth switch switching at high frequency; so as to reconstruct the full-bridge circuit into a boost circuit.

[0052] S4: Calculate the duty cycle of the switching transistor based on the dynamic relationship between the capacitor voltage and the bus voltage, and discharge the capacitor energy to the DC bus through the boost circuit;

[0053] The calculation of the switching transistor duty cycle based on the dynamic relationship between the capacitor voltage and the bus voltage includes: updating the switching transistor duty cycle at a preset period based on the capacitor voltage and the bus voltage. The formula for calculating the switching transistor duty cycle is: Duty = 1 - |Uc| / Ubus, where Duty represents the duty cycle of the high-frequency switching transistor, Uc represents the capacitor voltage, and Ubus represents the DC bus voltage. In some embodiments, the preset period is 0.5ms to 2ms. By calculating the switching transistor duty cycle based on the real-time relationship between the capacitor voltage and the bus voltage, the discharge speed and stability can be balanced.

[0054] The process of discharging capacitor energy to the DC bus through a boost circuit is controlled by a first counter and a second counter. The first counter controls the total discharge time, and the second counter updates the duty cycle of the switching transistor at a preset period. In some embodiments, the preset period is 0.5ms to 2ms. Using a second counter for periodic updates avoids frequent calculations.

[0055] After this step is completed, return to step S2.

[0056] S5: Reset the output phase angle of the energy storage inverter to zero and start off-grid operation.

[0057] In this step, the phase angle is forcibly reset after the discharge is completed to eliminate the mismatch between the initial duty cycle and the voltage, and to eliminate the oscillation caused by the initial phase deviation.

[0058] The control method for grid-connected to off-grid switching of dual-wire energy storage inverters proposed in this invention dynamically adjusts the inverter full-bridge drive mode through software control strategies, releases the energy of the filter capacitor to the DC bus, and combines phase synchronization optimization and time window constraints to achieve multi-dimensional voltage stability control during grid-connected to off-grid switching of dual-wire energy storage inverters, thus solving the voltage oscillation problem under different polarity / amplitude operating conditions.

[0059] In the preferred embodiment of the present invention, the circuit topology of the dual-fire-wire energy storage inverter consists of two completely identical wires. Figure 2 The diagram shows the composition of a full-bridge inverter circuit. Each full-bridge inverter circuit consists of one phase, and each phase voltage consists of a live wire L and a neutral wire N. The live wire L has a filter inductor L1, while the neutral wire N does not. The neutral wires N of these two phases are connected together, resulting in two live wires L and one neutral wire N to the outside.

[0060] Figure 2The full-bridge inverter circuit shown includes a DC bus BUS, a first switch Q1, a second switch Q2, a third switch Q3, a fourth switch Q4, an inductor L1, and a capacitor C. The first switch Q1, the second switch Q2, the third switch Q3, and the fourth switch Q4 are controlled by a first driver G1, a second driver G2, a third driver G3, and a fourth driver G4, respectively. The first switch Q1 and the second switch Q2 are connected in series to form a first branch, and the third switch Q3 and the fourth switch Q4 are connected in series to form a second branch. The first branch and the second branch are respectively connected to the two ends of the DC bus BUS, and the first switch Q1 and the third switch Q3 are respectively connected to the positive terminal of the DC bus BUS, while the second switch Q2 and the fourth switch Q4 are respectively connected to the negative terminal of the DC bus BUS. The first end of the inductor L1 is connected between the first switch Q1 and the second switch Q2, and the second end of the inductor L1 is connected to the first end of the capacitor C. The second end of the capacitor C is connected between the third switch Q3 and the fourth switch Q4.

[0061] The control method for grid-connected to off-grid switching of dual-wire energy storage inverters proposed in this invention, in Figure 2 The full-bridge inverter circuit shown uses software control to discharge the electrical energy on the inverter output filter capacitor C, so as to prevent voltage oscillation when switching from grid connection to off-grid. The specific control is as follows.

[0062] When the grid-connected inverter switches to off-grid operation, first check the voltage across the capacitor. If the voltage across capacitor C is positive (defined as positive for the live wire L with inductor L1, i.e., the voltage U of the live wire L relative to the neutral wire), then the inverter will switch to off-grid operation. LN (Positive), the inductor L1, the second switch Q2, and the body diode of the first switch Q1 form a boost circuit. At this point, simply changing the original drive method of the inverter will convert the full-bridge circuit into a boost circuit. The drive of the first switch Q1 to the fourth switch Q4 in the boost circuit's operating state is as follows: Figure 3 As shown, the second switch Q2 outputs at a high frequency, while the first and third switches Q1 and Q3 remain at a low level (i.e., the first and third switches Q1 and Q3 are continuously off), and the fourth switch Q4 remains at a high level (i.e., the fourth switch Q4 is continuously on). During the on-phase of Q2, the current path is: positive terminal of capacitor C → inductor L1 → Q2 → BUS- → Q4 → negative terminal of capacitor C. Capacitor C acts as a power source, discharging through this circuit, and energy is transferred from the capacitor to the inductor. During the off-phase of Q2, the freewheeling path is: inductor L1 (switch side) → body diode of Q1 → BUS+ → BUS- → Q4 → negative terminal of capacitor C → positive terminal of capacitor C → inductor L1. The inductor releases magnetic energy, and capacitor C continues to discharge. The energy stored in the inductor and the energy in the capacitor are pumped into the DC bus. The energy on capacitor C is continuously released to the DC bus BUS, and the release time is determined by the frequency and duty cycle of the second switch Q2. Figure 3 In the diagram, CA indicates that the carrier up count value is equal to the set comparison value, which determines the width of the high level (conduction) of the second switch Q2. P indicates that the carrier count value is equal to the carrier period value, and Z indicates that the carrier count value is equal to 0.

[0063] If the voltage across capacitor C is negative (i.e., the voltage U between the live wire L and the neutral wire L) LN (Negative), the driving of the first to fourth switching transistors Q1 to Q4 in the working state is as follows: Figure 4 As shown. The fourth switch Q4 outputs at high frequency, while the first and third switches Q1 and Q3 remain at low levels (i.e., Q1 and Q3 are continuously off), and the second switch Q2 remains at a high level (i.e., Q2 is continuously on). During the on-phase of Q4, the current path is: negative terminal of capacitor C → Q4 → BUS- → Q2 → inductor L1 → positive terminal of capacitor C. The electrical energy of capacitor C is converted into magnetic energy stored in inductor L1, and the absolute value of the inductor current increases linearly. During the off-phase of Q4, the freewheeling path is: inductor L1 → capacitor C → body diode of Q3 → BUS+ → BUS- → Q2 → inductor L. The magnetic energy stored in the inductor is released through this circuit, and the current charges the DC bus. At this time, capacitor C is also connected in series in the circuit, and its main function is to transfer energy rather than provide energy. After a period of time, the energy in capacitor C is completely released, and the voltage approaches zero volts. The release time is determined by the frequency and duty cycle of the fourth switch Q4.

[0064] The above analysis shows that regardless of whether the voltage across the capacitor is positive or negative, energy can be released through the switching combination of the first switch Q1 to the fourth switch Q4. The switching frequency and duty cycle of the high-frequency transistors determine the discharge speed and stability of capacitor C. Given the requirement to complete this process within 10ms of switching from grid-connected to off-grid operation, excluding grid anomaly detection time, the time left for capacitor discharge is very short. To save discharge time, the capacitor must be quickly discharged to a low voltage level, but excessive inductor current due to rapid discharge must be avoided, which could trigger unnecessary faults. Therefore, it is necessary to determine the duty cycle and switching frequency of the second switch Q2 or the fourth switch Q4 in this boost circuit. The duty cycle of the second switch Q2 or the fourth switch Q4 is determined based on the voltage magnitude to ensure that the capacitor voltage drops to approximately 0V within 4ms.

[0065] like Figure 5 As shown, in a specific embodiment, the control method for grid-connected to off-grid switching of a dual-wire energy storage inverter proposed in this invention is an overall process based on the discharge capacity of the output filter capacitor C of the dual-wire full-bridge inverter to achieve voltage oscillation-free switching during the grid-connected to off-grid process, including the following steps:

[0066] A1: Determine if the power grid is abnormal. If so, proceed to step A2; otherwise, end the control method and continue parallel operation normally.

[0067] A2: Switch to off-grid operation mode. After entering the off-grid operation mode, turn off the drive of all switching transistors in the inverter, set the capacitor C discharge enable flag of the inverter to 1, that is, set the capacitor discharge enable flag Dischg_En to 1, and continue to step A3.

[0068] A3: Check the enable flag to determine if the capacitor discharge enable flag Dischg_En is 1. If it is, proceed to step A4; otherwise, proceed to step A12.

[0069] A4: Determine whether the absolute value of the inverter capacitor voltage satisfies |Uc|>Un*1.414*5%, and whether the timer / counter Dischg_Cnt1 is less than MS_CNT*4. If yes, proceed to step A5; otherwise, proceed to step A12, where Uc is the capacitor voltage, Un is the inverter rated voltage, and MS_CNT is the preset period for updating the duty cycle.

[0070] This step requires simultaneous judgment of two conditions. The first condition is that after capacitor C is discharged and enabled, check whether the absolute value of the voltage Uc across capacitor C is greater than 5% of the peak value of the inverter's rated voltage. For example, the unidirectional voltage of the American standard dual-wire is 120V, and its maximum amplitude is 120V*1.414=170V. Therefore, here we judge whether the absolute value of the voltage Uc across capacitor C is greater than 170V*5%=8.5V. Based on the judgment of this condition, the influence on the inverter output oscillation is small when the voltage is low, and it can be directly output, thereby shortening the grid-connected to off-grid time. The second condition is whether the timer counter Dischg_Cnt1 for the discharge time is less than MS_CNT*4. MS_CNT is the preset period for updating the duty cycle. In this embodiment, MS_CNT is 1ms, that is, it is determined whether Dischg_Cnt1 is less than 4ms. Based on the fact that in a system that requires 10ms to complete the off-grid conversion, the remaining time is not sufficient after deducting the grid anomaly check time. Therefore, in this embodiment, the maximum discharge time is designed to be 4ms. If the time exceeds 4ms, the inverter output is directly started to prioritize meeting the requirement of a total time of 10ms.

[0071] A5: Timer / counter Dischg_Cnt1 = Dischg_Cnt1 + 1, continue to step A6;

[0072] A6: Determine if the inverter capacitor voltage is positive. If it is, proceed to step A7; otherwise, proceed to step A8.

[0073] A7: Set the first switch Q1 and the third switch Q3 to output low level, the fourth switch Q4 to output high level, and the second switch Q2 to high frequency. Continue to step A9.

[0074] A8: Set the first switch Q1 and the third switch Q3 to output low level, the second switch Q2 to output high level, and the fourth switch Q4 to high frequency, then continue to step A9;

[0075] Steps A7 and A8 above adjust the outputs of the first to fourth switching transistors Q1 through Q4 according to the polarity of the capacitor voltage Uc, thus changing the full-bridge inverter topology to a boost discharge topology. Specifically, the high-frequency outputs of the second switching transistor Q2 in step A7 and the high-frequency outputs of the fourth switching transistor Q4 in step A8 maintain the same frequency as the high-frequency transistors during normal inverter operation during the discharge process. This ensures a better match between this frequency and inductor L1, and also reduces the complexity of software configuration.

[0076] A9: Determine whether the second counter Dischg_Cnt2 is an integer multiple of MS_CNT, that is, whether Dischg_Cnt1%MS_CNT is equal to 0. If yes, proceed to step A10; otherwise, proceed to step A11.

[0077] In this step, the duty cycle (Duty) is calculated every ms by taking the remainder of MS_CNT using the second counter Dischg_Cnt2. After the duty cycle calculation is completed, the drive output is enabled. After that, the circuit operates in boost discharge state, and the current in capacitor C is gradually discharged to the DC bus, which can avoid frequent calculations.

[0078] A10: Calculate the duty cycle Duty = 1-|Uc| / Ubus, update the duty cycle of the discharge high-frequency tube, and enable drive;

[0079] The discharge process of capacitor C is actually a boost process. If the duty cycle is too large, oscillation is likely to occur; if the duty cycle is too small, the discharge time will be too slow. In this embodiment, a theoretical duty cycle value is calculated based on the input-output relationship of the boost circuit: Duty = 1 - |Uc| / Ubus, where Uc is the voltage of capacitor C and Ubus is the voltage of the DC bus BUS. To avoid frequent calculations, the calculation can be performed every 1ms.

[0080] A11: Second counter Dischg_Cnt2 = Dischg_Cnt2 + 1, return to step A3;

[0081] A12: Reset the inverter drive setting phase to 0, set the timer counter Dischg_Cnt1 to 0, the second counter Dischg_Cnt2 to 0, set the capacitor discharge enable flag Dischg_En to 0, and continue to step A13.

[0082] After the discharge is completed, the original configuration of the inverter switching transistors must be restored, and the off-grid phase angle of the inverter must be reset to 0 so that the inverter can operate normally off-grid.

[0083] A13: Enable inverter drive and start inverter output.

[0084] This invention utilizes a full-bridge topology reconstruction to release capacitor energy into a boost circuit, and combines phase zeroing and dynamic duty cycle strategies to eliminate initial voltage mismatch.

[0085] The grid-connection to off-grid control method for dual-wire energy storage inverters proposed in this invention requires that the grid-connection relay be disconnected before capacitor C discharges. The overall grid-connection to off-grid timing sequence is as follows: Figure 6 As shown in the figure, the two lines represent the voltage of two phases of the dual-wire energy storage inverter. At time t1, the residential dual-wire energy storage inverter detects a grid anomaly and begins to disconnect the grid relay. According to the design requirements, the relay can complete the disconnection action within 2ms. At time t2, capacitor C is discharged, with a maximum discharge time of 4ms. At time t3, the discharge operation is completed, the initial phase is reset to 0, and the inverter output is started.

[0086] The conventional grid-connected patent network processing method and the grid-connected-to-off-grid control method for dual-wire energy storage inverters proposed in this invention were applied to different operating conditions to obtain the waveform effects of the two-phase voltages of the dual-wire energy storage inverters, as shown below. Figures 7a to 7d As shown, Figure 7a The image shows the waveform of the voltage of two phases of a dual-live-wire energy storage inverter obtained using the conventional grid-connected to off-grid switching method. Figure 7b The diagram shows the waveform of the two-phase voltage of the dual-live-wire energy storage inverter obtained by using the grid-connected to off-grid control method proposed in this invention when the dual-live-wire voltage is reversed after disconnection from the grid. Figure 7c The diagram shows the waveform of the two-phase voltage of the dual-wire energy storage inverter obtained by using the grid-connected to off-grid control method proposed in this invention when the voltages of the two wires are in the same direction after the inverter is disconnected from the grid. Figure 7d The diagram shows the waveforms of the two-phase voltages of the dual-wire energy storage inverter obtained by using the grid-connected to off-grid control method proposed in this invention when the voltages of the two live wires are in the same direction after the grid disconnection and exceed the off-grid rated voltage. The two lines in each diagram represent the voltages of the two phases of the dual-wire energy storage inverter.

[0087] from Figures 7a to 7d The resulting waveform diagram shows that Figure 7a The conventional grid-connected to off-grid switching method was adopted, that is, the capacitor C was not discharged, and the inverter directly output voltage after switching from grid-connected to off-grid. In the initial stage of off-grid output, the voltage oscillated significantly. Figures 7b to 7d The control method for switching the dual-wire energy storage inverter from grid connection to off-grid mode proposed in this invention was adopted in all cases, and no voltage oscillation occurred after the inverter switched from grid connection to off-grid mode under various conditions. Therefore, it can be seen that the control method for switching the dual-wire energy storage inverter from grid connection to off-grid mode proposed in this invention effectively solves the problem of voltage oscillation during the inverter startup when switching from grid connection to off-grid mode, and can be applied to different operating conditions.

[0088] Embodiment 2 of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program is configured to be run by a processor to execute the steps of the control method for grid-connected to off-grid switching of a dual-wire energy storage inverter in Embodiment 1 above.

[0089] Optionally, the aforementioned computer-readable storage media may include, but are not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0090] The background section of this invention may include background information about the problems or circumstances surrounding the invention, rather than a description of prior art by others. Therefore, the content included in the background section is not an admission of prior art by the applicant.

[0091] The above description provides a further detailed explanation of the present invention in conjunction with specific / preferred embodiments, and it should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various substitutions or modifications can be made to these described embodiments without departing from the concept of the present invention, and all such substitutions or modifications should be considered within the scope of protection of the present invention. In the description of this specification, the reference to terms such as "an embodiment," "some embodiments," "preferred embodiment," "example," "specific example," or "some examples," etc., indicates that the specific features, structures, materials, or characteristics described in connection with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Furthermore, those skilled in the art can combine and integrate different embodiments or examples and features of different embodiments or examples described in this specification without contradiction. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions, and modifications can be made herein without departing from the scope defined by the appended claims.

Claims

1. A control method for switching a dual-wire energy storage inverter from grid-connected to off-grid operation, characterized in that, The dual-wire energy storage inverter consists of two full-bridge inverter circuits connected in parallel. Each full-bridge inverter circuit includes a DC bus, a first switch, a second switch, a third switch, a fourth switch, an inductor, and a capacitor. The first and second switches are connected in series to form a first branch, and the third and fourth switches are connected in series to form a second branch. The first and second branches are respectively connected to the two ends of the DC bus, with the first and third switches connected to the positive terminal of the DC bus and the second and fourth switches connected to the negative terminal. The first end of the inductor is connected between the first and second switches, and the second end of the inductor is connected to the first end of the capacitor. The second end of the capacitor is connected between the third and fourth switches, and the second ends of the capacitors in the two full-bridge inverter circuits are interconnected. The control method includes the following steps: S1: Detects abnormal power grid conditions and disconnects the grid-connected relay when an abnormality occurs; S2: Determine whether the absolute value of the capacitor voltage exceeds the predetermined threshold and whether the discharge time is less than the predetermined time limit; S3: Select the corresponding switch combination for high-frequency drive based on the capacitor voltage polarity to reconstruct the full-bridge inverter circuit into a boost circuit: When the capacitor voltage is positive, keep the first and third switches at a low level, the fourth switch at a high level, and the second switch switches at a high frequency; when the capacitor voltage is negative, keep the first and third switches at a low level, the second switch at a high level, and the fourth switch switches at a high frequency; to reconstruct the full-bridge inverter circuit into a boost circuit. S4: Calculate the duty cycle of the switching transistor based on the dynamic relationship between the capacitor voltage and the bus voltage using a preset period, and discharge the capacitor energy to the DC bus through the boost circuit: wherein, the calculation formula for the duty cycle of the switching transistor is: Duty = 1-|Uc| / Ubus, where Duty represents the duty cycle of the switching transistor at high frequency, Uc represents the capacitor voltage, and Ubus represents the DC bus voltage; S5: Reset the output phase angle of the energy storage inverter to zero and start off-grid operation.

2. The control method for grid-connected to off-grid switching of a dual-wire energy storage inverter according to claim 1, characterized in that, Step S2 further includes: when the absolute value of the capacitor voltage exceeds a predetermined threshold and the discharge time is less than a predetermined time limit, step S3 is executed; otherwise, step S5 is executed; wherein after step S4 is completed, the process returns to step S2.

3. The control method for grid-connected to off-grid switching of a dual-wire energy storage inverter according to claim 1, characterized in that, The predetermined threshold in step S2 is 3% to 7% of the peak value of the inverter's rated voltage.

4. The control method for grid-connected to off-grid switching of a dual-wire energy storage inverter according to claim 1, characterized in that, The time limit for step S2 is 3ms to 5ms.

5. The control method for grid-connected to off-grid switching of a dual-wire energy storage inverter according to claim 1, characterized in that, In step S3, the frequency of the high-frequency driven switching transistor is consistent with the switching transistor frequency when the energy storage inverter is operating normally.

6. The control method for grid-connected to off-grid switching of a dual-wire energy storage inverter according to claim 1, characterized in that, In step S4, the process of discharging capacitor energy to the DC bus through the boost circuit is controlled by a first counter and a second counter. The first counter controls the total discharge time, and the second counter updates the duty cycle of the switching transistor at a preset period.

7. The control method for grid-connected to off-grid switching of a dual-wire energy storage inverter according to claim 1 or 6, characterized in that, The preset period is 0.5ms to 2ms.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to be run by a processor to perform the grid-connected to off-grid control method for a dual-wire energy storage inverter as described in any one of claims 1 to 7.