Grid-connected and off-grid control method and system of micro-grid system

By adding integral control links and pre-synchronization mechanisms to the microgrid system, the control faults and slow response problems of the microgrid system during grid-connected and off-grid switching are solved, and the frequency, voltage and phase tracking are achieved, ensuring seamless switching and high-quality power supply, and improving the system's adaptability and operational reliability.

CN120728709APending Publication Date: 2025-09-30WANBANG SCENE MICROGRID TECHNOLOGY (JIANGSU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511021961.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

The existing microgrid system has problems of control faults and slow dynamic response during the switching process between on-grid and off-grid, and cannot meet the continuous control requirements of key power quality parameters such as frequency and voltage. In addition, the traditional VSG mode is prone to frequency, amplitude and phase deviations when switching from off-grid to on-grid, making it difficult to achieve seamless switching.

Method used

By adding an integral control link to the traditional control equation of the VSG mode of the energy storage converter, the frequency, amplitude and phase are pre-synchronized based on the principles of secondary frequency modulation and secondary voltage regulation, the phase-locked loop is used to obtain the grid parameters, and the grid voltage frequency, amplitude and phase are tracked without difference during the pre-synchronization stage, and then replaced with the rated frequency and voltage amplitude of the VSG mode to achieve seamless switching.

Benefits of technology

It realizes seamless switching of microgrid systems in dynamic environments, improves adaptive capabilities and high-quality power supply capabilities, and ensures operational reliability and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120728709A_ABST
    Figure CN120728709A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of micro-grid control, and provides a grid-connected and off-grid control method and system of a micro-grid system, and the method comprises the steps: S1, obtaining the three-phase voltage of a large power grid; s2, according to the three-phase voltage of the large power grid, the power grid angular frequency, the power grid voltage amplitude and the power grid phase of the large power grid are obtained through a phase-locked loop; s3, adding an integral control link in the VSG control equation, and performing frequency and amplitude pre-synchronization according to the angular frequency and the voltage amplitude of the power grid; performing power grid phase pre-synchronization based on the phase angle output by the VSG active ring; and S4, when the energy storage converter meets the grid connection requirement, replacing the power grid angular frequency in the frequency control with the rated angular frequency, and replacing the power grid voltage amplitude in the amplitude control with the rated voltage amplitude. According to the method, no-difference tracking of the frequency, the amplitude and the phase of the power grid voltage can be rapidly completed before off-rotation, seamless switching of off-grid connection and grid connection is achieved, and the self-adaptive capacity, the power supply capacity and the operation reliability of a micro-grid system in a dynamic environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microgrid control technology, and in particular to a method and system for controlling on-grid and off-grid operation of a microgrid system. Background Art

[0002] Currently, most power storage converters (PCSs) employ fixed-mode switching to handle microgrid on-grid and off-grid switching. Specifically, they employ PQ (active power-reactive power) control when on-grid and V / f (volt-frequency) control when off-grid. While this control approach can theoretically achieve basic on-grid and off-grid switching, the lack of a dynamic adaptive fusion mechanism between control strategies leads to control gaps and slow dynamic response during on-grid and off-grid switching, making it impossible to meet the requirements for continuous control of key power quality parameters such as frequency and voltage. Some PCSs also employ VSG (virtual synchronous generator) control when off-grid. However, this traditional VSG mode can also exhibit frequency, amplitude, and phase deviations between the PCS and the main grid when transitioning from off-grid to grid-connected, making seamless switching difficult. Summary of the Invention

[0003] In order to solve the above technical problems, the present invention provides a method and system for on-grid and off-grid control of a microgrid system, which can quickly complete the error-free tracking of the grid voltage frequency, amplitude and phase before switching from off-grid to on-grid, thereby realizing seamless switching between on-grid and off-grid, and improving the microgrid system's adaptability, high-quality power supply capability and operational reliability in a dynamic environment.

[0004] The technical solution adopted in the present invention is as follows:

[0005] A method for controlling on-grid and off-grid operation of a microgrid system, the microgrid system including an energy storage converter, the method comprising: S1, obtaining the three-phase voltage of the large power grid; S2, obtaining the grid angular frequency, grid voltage amplitude and grid phase of the large power grid through a phase-locked loop based on the three-phase voltage of the large power grid; S3, in a pre-synchronization stage, based on the principles of secondary frequency modulation and secondary voltage regulation, adding an integral control link to the traditional control equation of the VSG mode of the energy storage converter, performing frequency pre-synchronization according to the grid angular frequency, and performing amplitude pre-synchronization according to the grid voltage amplitude; performing phase pre-synchronization based on the phase angle output by the VSG active loop and a PI regulator; S4, when the energy storage converter meets the grid connection requirement, replacing the grid angular frequency in the frequency control of the VSG mode of the energy storage converter with the rated angular frequency of the VSG mode, and replacing the grid voltage amplitude in the amplitude control of the VSG mode of the energy storage converter with the rated voltage amplitude of the VSG mode.

[0006] According to one embodiment of the present invention, step S3 includes: step S31, based on the principle of secondary frequency regulation, in the virtual rotor motion equation of the energy storage converter VSG mode, an integral control link is added, and the rated angular frequency of the energy storage converter is replaced with the grid angular frequency of the large power grid for frequency pre-synchronization; step S32, based on the principle of secondary voltage regulation, in the reactive-voltage equation based on droop control in the energy storage converter VSG mode, an integral control link is added to the voltage deviation part, and PI control is added to the reactive deviation part, and the rated voltage amplitude of the energy storage converter is replaced with the grid voltage amplitude of the large power grid for amplitude pre-synchronization; step S33, according to the grid phase, phase pre-synchronization is performed based on the phase angle output by the VSG active loop and the PI regulator.

[0007] According to one embodiment of the present invention, the frequency pre-synchronization control equation in step S31 is:

[0008]

[0009] Where J is the virtual moment of inertia; ω is the electrical angular velocity, ω g is the grid angular frequency; P m is the mechanical power; P e is the actual output power; D is the damping coefficient; θ is the angular displacement of the virtual generator rotor, k1 is the frequency modulation integral coefficient, and s is the Laplace operator;

[0010] The amplitude pre-synchronization control equation in step S32 is:

[0011]

[0012] Where E represents reactive voltage, k q is the reactive power regulation coefficient, Ug represents the grid voltage amplitude, U is the actual output voltage amplitude of the energy storage converter in the energy storage converter, k2 is the voltage regulation integral coefficient, k p With k i is the PI regulator control coefficient, Q ref and Q e are the reactive power command value and reactive power measurement value of VSG respectively, and k is the integral coefficient.

[0013] According to one embodiment of the present invention, before step S3, the process further includes: a pre-judgment step of judging whether to enter the pre-synchronization stage based on the grid voltage amplitude and the synchronization condition, wherein the pre-judgment step specifically includes: performing a dq transformation on the voltage of the large grid according to the grid phase to obtain the d-axis voltage U of the large grid. d , q-axis voltage U q ; Establish synchronization conditions: |U d -U g_rms |<Δu1, and |U q -0|<Δu2, where U g_rms represents the effective value of the grid voltage of the large grid, Δu1 represents the d-axis threshold, and Δu2 represents the q-axis threshold; if the synchronization condition is met, the system enters the pre-synchronization phase and executes step S3; if the synchronization condition is not met, the microgrid system is controlled to operate off-grid.

[0014] According to one embodiment of the present invention, the microgrid bus in the microgrid system is respectively connected to the energy storage converter and the load, the neutral line of the load is directly connected to the large power grid, and an on-grid and off-grid switching device is provided between the microgrid system and the large power grid. The on-grid and off-grid switching device includes a first switch and a second switch with opposite action logics, the first switch is used to connect the microgrid bus and the phase line of the large power grid, and the second switch is used to connect the microgrid bus and the neutral line of the energy storage converter. After step S4, it also includes: S5, closing the first switch and opening the second switch to achieve grid-connected operation of the microgrid system.

[0015] In addition, in order to solve the above problems, the present invention also proposes a microgrid system on-grid and off-grid control system.

[0016] A microgrid system on-grid and off-grid control system, the microgrid system including an energy storage converter, the on-grid and off-grid control system comprising: a detection module, the detection module being used to obtain the three-phase voltage of the large power grid; a calculation module, the calculation module being used to obtain the grid angular frequency, grid voltage amplitude and grid phase of the large power grid through a phase-locked loop based on the three-phase voltage of the large power grid; a pre-synchronization module, the pre-synchronization module being used to add an integral control link to the traditional pre-synchronization control of the VSG mode of the energy storage converter based on the principles of secondary frequency modulation and secondary voltage regulation during the pre-synchronization stage, and to perform frequency pre-synchronization according to the grid angular frequency and amplitude pre-synchronization according to the grid voltage amplitude; and to perform phase pre-synchronization based on the phase angle output by the VSG active loop and a PI regulator; and a replacement module, which, after the pre-synchronization module completes zero-error tracking, replaces the grid angular frequency in the frequency control of the VSG mode of the energy storage converter with the rated angular frequency of the VSG mode, and replaces the grid voltage amplitude in the amplitude control of the VSG mode of the energy storage converter with the rated voltage amplitude of the VSG mode.

[0017] According to one embodiment of the present invention, the microgrid system also includes a load connected to the microgrid bus, the microgrid bus is also connected to the energy storage converter in the energy storage converter, the large power grid is directly connected to the neutral line of the load, and the on-grid and off-grid control system also includes: an on-grid and off-grid switching device, the on-grid and off-grid switching device includes a first switch and a second switch with opposite action logic, the first switch is used to connect the microgrid bus and the phase line of the large power grid, and the second switch is used to connect the microgrid bus and the neutral line of the energy storage converter; when the microgrid system is in an off-grid state, the first switch is disconnected and the second switch is closed; when the microgrid system is in a grid-connected state, or after the replacement module completes the replacement of the angular frequency and voltage amplitude, the first switch is closed and the second switch is disconnected.

[0018] According to one embodiment of the present invention, the on-grid and off-grid switching device is a four-pole static transfer switch device, the first switch includes three phase line switches of the four-pole static transfer switch device, and the three phase line switches are respectively used to connect the microgrid bus and the three-phase lines of the large power grid; the second switch is the fourth pole switch of the four-pole static transfer switch device, when the microgrid system is in a grid-connected state, the three phase line switches are closed and the fourth pole switch is disconnected; when the microgrid system is in an off-grid state, or after the replacement module completes the replacement of angular frequency and voltage amplitude, when the three phase line switches are disconnected, the fourth pole switch is closed.

[0019] According to one embodiment of the present invention, it also includes: an edge controller, which issues control instructions to the end device based on the cloud scheduling instructions issued by the cloud platform and the locally collected device operating parameters, and the control instructions include grid-connected to off-grid and off-grid to grid-connected; when the grid-connected to off-grid control instruction is received, the grid-connected to off-grid switching device opens the first switch and closes the second switch; when the grid-connected to off-grid control instruction is received, the grid-connected to off-grid switching device waits for the replacement module to complete the replacement of angular frequency and voltage amplitude, and then closes the first switch and opens the second switch.

[0020] According to one embodiment of the present invention, the cloud platform predicts the state of the large power grid based on the state data of the large power grid, and sends a reasonable grid-connected interval to the edge controller. When the state of the large power grid is restored, the edge controller determines whether to send a control instruction for switching from off-grid to grid-connected based on whether the duration of the large power grid state recovery is greater than the reasonable grid-connected interval.

[0021] Beneficial effects of the present invention:

[0022] The on-grid and off-grid control method of the microgrid system of the present invention, in the pre-synchronization stage, based on the principles of secondary frequency regulation and secondary voltage regulation, adds an integral control link to the traditional control equation of the energy storage converter VSG mode, and performs frequency pre-synchronization according to the grid angular frequency, and performs amplitude pre-synchronization according to the grid voltage amplitude; phase pre-synchronization is performed based on the phase angle and PI regulator output of the VSG active loop. Compared with the frequency and amplitude control that always adopts the rated angular frequency and rated voltage amplitude, it can quickly complete the error-free tracking of the grid voltage frequency, amplitude and phase before switching from off-grid to grid-connected, thereby realizing seamless switching between off-grid and grid-connected, and improving the adaptability, high-quality power supply capability and operation reliability of the microgrid system in a dynamic environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a structural diagram of a common energy storage converter;

[0024] Figure 2 Flowchart of a method for controlling on-grid and off-grid operation of a microgrid system according to an embodiment of the present invention;

[0025] Figure 3 This is a control block diagram of steps S3 and S4 of the on-grid and off-grid control method according to an embodiment of the present invention;

[0026] Figure 4 This is a schematic diagram of electrical connections of a microgrid system and an on-grid and off-grid switching device according to an embodiment of the present invention;

[0027] Figure 5 Schematic block diagram of an on-grid and off-grid control system of a microgrid system according to an embodiment of the present invention;

[0028] Figure 6 Schematic block diagram of an on-grid and off-grid control system according to an embodiment of the present invention;

[0029] Figure 7 This is a schematic diagram of the hierarchical intelligent control architecture of "cloud-edge-end collaboration" according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0031] Figure 1 Shows the common energy storage converter in microgrid system, DC voltage U bat After being converted into three-phase AC output by a three-phase inverter, the three-phase AC is connected to the three-phase line of the microgrid busbar through the series filter inductor and the parallel filter capacitor. The neutral line of the energy storage converter can also be connected to the neutral line of the microgrid busbar through a controllable switch. a 、u b 、u c are the voltages of three-phase AC, i a 、i b 、i c are the current of three-phase alternating current, u N Represents the neutral voltage, Z L Represents the virtual damping resistor in VSG mode.

[0032] In traditional VSG mode, inertia and damping can be adjusted by the following virtual rotor motion equations:

[0033]

[0034] Where J is the virtual moment of inertia; ω is the electrical angular velocity, ω n is the rated angular velocity; Pm is the mechanical power; P e is the actual output electric power; D is the damping coefficient; θ is the angular displacement of the virtual generator rotor.

[0035] The traditional VSG mode is based on droop control to maintain the voltage and frequency stability of the microgrid. Its frequency regulation characteristics and reactive power-voltage equation are as follows:

[0036]

[0037] Where, P refis the virtual active power instruction, k f is the frequency modulation coefficient; U n is the rated voltage amplitude of PCS, U is the actual output voltage amplitude of PCS, k q is the reactive power regulation coefficient, Q ref and Q e are the reactive power command value and reactive power measurement value of VSG respectively, and k is the integral coefficient.

[0038] In the grid-connected state, the energy storage converter acts as an independent voltage source under VSG mode control, effectively supporting bus voltage and frequency when switched to off-grid mode. Upon receiving an off-grid command or unplanned off-grid signal, the VSG mode adjusts the bus voltage and frequency based on local load power or preset commands, balancing load power supply and demand within the energy storage converter and ultimately achieving stable off-grid operation.

[0039] In the off-grid state, the VSG-controlled PCS performs frequency and voltage regulation (a differential control), which causes the output voltage to be out of sync with the grid. Synchronous control is required to prevent surge currents that could damage the inverter and the grid. Therefore, before switching from off-grid to grid-connected operation, it is necessary to quickly and accurately track the grid voltage frequency, amplitude, and phase to achieve seamless switching between on-grid and off-grid operation.

[0040] like Figure 2 As shown, the on-grid and off-grid control method of the microgrid system according to the embodiment of the present invention includes the following steps:

[0041] S1, obtains the three-phase voltage of the large power grid.

[0042] S2, according to the three-phase voltage of the large power grid, obtains the grid angular frequency, grid voltage amplitude and grid phase of the large power grid through a phase-locked loop.

[0043] Specifically, a phase-locked loop (PLL), such as a dual-quadratic generalized integrator phase-locked loop (DSOGI-PLL), can be established to obtain the grid angular frequency, grid voltage amplitude, and grid phase of the large grid in real time based on the three-phase voltage of the large grid. The specific principles for obtaining the grid angular frequency, grid voltage amplitude, and grid phase based on the PLL can be found in patent CN117977547A, which will not be described in detail herein. In some other embodiments of the present invention, other methods different from those in patent CN117977547A may also be used to calculate the grid angular frequency, grid voltage amplitude, and grid phase, which are not limited in this embodiment.

[0044] S3, in the pre-synchronization stage, based on the principles of secondary frequency modulation and secondary voltage regulation, an integral control link is added to the traditional pre-synchronization control of the energy storage converter VSG mode, and frequency pre-synchronization is performed according to the grid angular frequency, and amplitude pre-synchronization is performed according to the grid voltage amplitude; phase pre-synchronization is performed based on the phase angle of the VSG active loop output and the PI regulator.

[0045] In one embodiment of the present invention, step S3 includes the following steps S31 to S33:

[0046] In step S31, based on the principle of secondary frequency modulation, an integral control link is added to the virtual rotor motion equation of the energy storage converter VSG mode, i.e., formulas (1) and (2), and the rated angular frequency of the energy storage converter is replaced with the grid angular frequency of the large grid to perform frequency pre-synchronization, thereby obtaining the frequency pre-synchronization control formula:

[0047]

[0048] Where J is the virtual moment of inertia; ω is the electrical angular velocity, ω g is the grid angular frequency; P m is the mechanical power; P e is the actual output electric power; D is the damping coefficient; θ is the angular displacement of the virtual generator rotor, k1 is the frequency modulation integral coefficient, and s is the Laplace operator.

[0049] It can be understood that based on the principle of secondary frequency modulation, adding an integral control link to the original formula (1) can achieve frequency negative feedback PI control. When the frequency deviates from the reference value, the PI adjustment allows the frequency to be restored to the reference level without error.

[0050] In step S32, based on the secondary voltage regulation principle, in the reactive-voltage formula based on droop control in the VSG mode of the energy storage converter, i.e., formula (4), an integral control link is added to the voltage deviation part, and a PI control is added to the reactive deviation part to eliminate the reactive static error. The rated voltage amplitude of the energy storage converter is replaced with the grid voltage amplitude of the large grid to perform amplitude pre-synchronization, so that the amplitude pre-synchronization control formula can be obtained as follows:

[0051]

[0052] Where E represents reactive voltage, k q is the reactive power regulation coefficient, U g Represents the grid voltage amplitude, U is the actual output voltage amplitude of the energy storage converter, k2 is the voltage regulation integral coefficient, k p With k i is the PI regulator control coefficient, Q ref and Q eare the reactive power command value and reactive power measurement value of VSG respectively, and k is the integral coefficient.

[0053] Step S33: performing phase pre-synchronization based on the phase angle output by the VSG active loop and the PI regulator according to the grid phase.

[0054] Specifically, according to the grid phase u ga 、u gb 、u gc The q-axis voltage u is obtained by performing dq transformation based on the reference phase angle of the VSG active loop output. gq , the difference between it and 0 is sent to the PI regulator to obtain the angular velocity compensation Δω′, which is superimposed on the angular velocity ω of the active loop of the VSG, thereby accurately tracking the grid phase of the large power grid, ensuring smooth switching transients, and achieving phase error-free tracking.

[0055] It should be noted that common phase synchronization operations are often achieved through a classic phase-locked loop (PLL). However, the accuracy of the phase lock can affect the control effect of phase synchronization. Furthermore, actual power grids are not perfectly sinusoidal, which can lead to instabilities such as inaccurate phase lock. In this embodiment, phase pre-synchronization without a PLL is used to avoid the impact of the PLL's accuracy on tracking and ensure tracking accuracy.

[0056] S4, when the energy storage converter meets the grid connection requirements, the grid angular frequency in the frequency control of the energy storage converter VSG mode is replaced with the rated angular frequency of the VSG mode, and the grid voltage amplitude in the amplitude control of the energy storage converter VSG mode is replaced with the rated voltage amplitude of the VSG mode.

[0057] It is understood that the energy storage converter meets the grid connection requirements, meaning that the converter's angular frequency, voltage amplitude, and phase all achieve seamless tracking. Specifically, seamless tracking can be manifested as the difference between the converter's angular frequency, voltage amplitude, and phase and the grid's angular frequency, voltage amplitude, and phase being within the allowable error range, thereby enabling seamless off-grid switching. Since seamless off-grid switching has been completed, the converter's VSG mode frequency control is now re-using the rated angular frequency, and the rated voltage amplitude is re-using the rated voltage amplitude in amplitude control, ensuring the stability of grid-connected operation.

[0058] The specific process of executing steps S3 and S4 in VSG mode is as follows: Figure 3 As shown in the figure, ω* represents the reference angular frequency. In step S3, the reference angular frequency is the grid angular frequency. In step S4, the reference angular frequency is the rated angular frequency. U* represents the reference voltage amplitude. In step S3, the reference voltage amplitude is the grid voltage amplitude. In step S4, the reference angular frequency is the rated voltage amplitude. P m and P eare mechanical power and actual output electric power respectively, Δω represents the output angular velocity adjustment of the VSG active loop, Δω' represents the angular velocity compensation of the phase synchronization control, Q ref and Q e are the reactive power command value and reactive power measurement value of VSG, e* abc It is expressed as the instantaneous control quantity synthesized by the phase angle θ and amplitude E of the virtual electromotive force.

[0059] In one embodiment of the present invention, before step S3, a pre-judgment step may be further included, in which it is determined whether to enter the pre-synchronization stage based on the grid voltage amplitude and the synchronization condition. The pre-judgment step specifically includes the following steps (1) to (3):

[0060] (1) Perform dq transformation on the voltage of the large power grid according to the grid phase to obtain the d-axis voltage U of the large power grid. d , q-axis voltage U q .

[0061] (2) Establish synchronization conditions: |U d -U g_rms |<Δu1, and |U q -0|<Δu2, where U g_rms represents the effective value of the grid voltage of the large power grid, Δu1 represents the d-axis threshold, and Δu2 represents the q-axis threshold. Δu1 and Δu2 can be fixed values ​​set manually or adjusted according to actual conditions.

[0062] (3) If the synchronization condition is met, the system enters the pre-synchronization stage and executes step S3; if the synchronization condition is not met, it indicates that the power quality of the large power grid does not meet the grid connection requirements of the microgrid system, and the microgrid system is controlled to operate off-grid, that is, it does not enter the pre-synchronization stage until the synchronization condition is met and then enters the pre-synchronization stage and executes step S3.

[0063] By adding a prejudgment step before step S3, it is possible to avoid the microgrid system starting pre-synchronization before the main grid recovers to a state suitable for the microgrid system to be connected to the grid, thereby avoiding wasting resources and causing safety hazards.

[0064] like Figure 4 As shown, in one embodiment of the present invention, the microgrid bus in the microgrid system is connected to the energy storage converter and the load respectively, and the neutral line of the load is directly connected to the main grid. A grid-connected switching device is provided between the microgrid system and the main grid. The grid-connected switching device includes a first switch and a second switch with opposite operation logic. The first switch is used to connect the microgrid bus and the phase line of the main grid, and the second switch is used to connect the microgrid bus and the neutral line of the energy storage converter. In the figure, the first switch is 4P STS-ABC, the second switch is 4P STS-N, PCC represents the grid connection point, and u ga 、ugb 、u gc Represents the voltage of ABC three-phase line, u gN Represents the neutral line voltage, and Grid represents the large power grid.

[0065] After step S4, the method further includes: S5, closing the first switch and opening the second switch to achieve grid-connected operation of the microgrid system.

[0066] Traditional on-grid and off-grid switching devices mostly only have a switch between the microgrid bus and the main grid phase line, and do not control the connection of the neutral line between the energy storage converter and the microgrid bus. As a result, when the microgrid system is connected to the main grid, the neutral line between the energy storage converter and the microgrid bus is connected to the neutral line of the main grid, which can easily cause problems such as ground loops and voltage imbalance. This can also lead to slow response speeds and a single islanding criterion, affecting switching reliability and power quality. In this embodiment, the on-grid and off-grid switching device, by providing a first switch and a second switch with opposite operating logic, can simultaneously connect the microgrid bus and the main grid phase line in the on-grid state while disconnecting the neutral line between the energy storage converter and the microgrid bus, thereby isolating the zero-sequence current interference and ground loops that may occur on the PCS side. In the off-grid state, the first switch is disconnected and the second switch is closed, ensuring the integrity of the load neutral line circuit and guaranteeing electrical isolation integrity.

[0067] According to the on-grid and off-grid control method of the microgrid system of the embodiment of the present invention, in the pre-synchronization stage, based on the principles of secondary frequency regulation and secondary voltage regulation, an integral control link is added to the traditional control equation of the VSG mode of the energy storage converter, and frequency pre-synchronization is performed according to the grid angular frequency, and amplitude pre-synchronization is performed according to the grid voltage amplitude; phase pre-synchronization is performed based on the phase angle output of the VSG active loop and the PI regulator. Compared with the frequency and amplitude control that always adopts the rated angular frequency and rated voltage amplitude, it is possible to quickly complete the error-free tracking of the grid voltage frequency, amplitude and phase before switching from off-grid to grid-connected, thereby realizing seamless switching between off-grid and grid-connected, and improving the adaptability, high-quality power supply capability and operational reliability of the microgrid system in a dynamic environment.

[0068] Corresponding to the aforementioned on-grid and off-grid control method for a microgrid system, the present invention also provides an on-grid and off-grid control system for a microgrid system. Since the system embodiment of the present invention corresponds to the aforementioned method embodiment, details not disclosed in the system embodiment can be referred to the aforementioned method embodiment and will not be further described in this invention.

[0069] like Figure 5As shown, the on-grid and off-grid control system of the microgrid system of the embodiment of the present invention includes a detection module 10, a calculation module 20, a pre-synchronization module 30 and a replacement module 40, wherein the detection module 10 is used to obtain the three-phase voltage of the large power grid; the calculation module 20 is used to obtain the grid angular frequency, grid voltage amplitude and grid phase of the large power grid through a phase-locked loop based on the three-phase voltage of the large power grid; the pre-synchronization module 30 is used to add an integral control link to the traditional pre-synchronization control of the VSG mode of the energy storage converter based on the principles of secondary frequency modulation and secondary voltage regulation in the pre-synchronization stage, and perform frequency pre-synchronization according to the grid angular frequency and amplitude pre-synchronization according to the grid voltage amplitude; phase pre-synchronization is performed based on the phase angle output by the VSG active loop and the PI regulator; when the pre-synchronization module 30 completes the zero-error tracking, the replacement module 40 is used to replace the grid angular frequency in the frequency control of the VSG mode of the energy storage converter with the rated angular frequency of the VSG mode, and replace the grid voltage amplitude in the amplitude control of the VSG mode of the energy storage converter with the rated voltage amplitude of the VSG mode.

[0070] According to the on-grid and off-grid control system of the microgrid system according to the embodiment of the present invention, based on the principles of secondary frequency regulation and secondary voltage regulation, an integral control link is added to the traditional control equation of the VSG mode of the energy storage converter, and frequency pre-synchronization is performed according to the grid angular frequency, and amplitude pre-synchronization is performed according to the grid voltage amplitude; phase pre-synchronization is performed based on the phase angle output of the VSG active loop and the PI regulator. Compared with the frequency and amplitude control that always adopts the rated angular frequency and rated voltage amplitude, it can quickly complete the error-free tracking of the grid voltage frequency, amplitude and phase before switching from off-grid to grid-connected, thereby realizing seamless switching between off-grid and grid-connected, and improving the adaptability, high-quality power supply capability and operational reliability of the microgrid system in a dynamic environment.

[0071] In one embodiment of the present invention, the pre-synchronization module 30 can achieve error-free tracking of frequency, amplitude, and phase between the energy storage converter and the large power grid according to the above steps S31 to S33, which will not be described in detail in this embodiment.

[0072] like Figure 6 As shown, in one embodiment of the present invention, the on-grid and off-grid control system may further include a pre-judgment module 50, which is used to determine whether to enter the pre-synchronization stage based on the grid voltage amplitude and synchronization conditions. The specific pre-judgment steps can be found in the pre-judgment steps above, and this embodiment will not be repeated here.

[0073] like Figure 4As shown, in one embodiment of the present invention, the microgrid system also includes a load connected to the microgrid bus, the microgrid bus is also connected to the energy storage converter in the energy storage converter, the large power grid is directly connected to the neutral line of the load, and the system also includes: an on-grid and off-grid switching device, the on-grid and off-grid switching device includes a first switch and a second switch with opposite action logics, the first switch is used to connect the microgrid bus and the phase line of the large power grid, and the second switch is used to connect the microgrid bus and the neutral line of the energy storage converter.

[0074] When the microgrid system is in an off-grid state, the first switch is disconnected and the second switch is closed to ensure that the load neutral line loop is intact and the electrical isolation integrity is guaranteed; when the microgrid system is in a grid-connected state, or after the replacement module 40 completes the replacement of the angular frequency and voltage amplitude, the first switch is closed and the second switch is disconnected. While connecting the microgrid bus and the large grid phase line in the grid-connected state, the neutral line connection between the energy storage converter and the microgrid bus is disconnected, thereby isolating the zero-sequence current interference and ground loop current that may be generated on the PCS side.

[0075] In one embodiment of the present invention, the on-grid and off-grid switching device is a four-pole static transfer switch device (4P-STS). The first switch includes three phase line switches of the four-pole static transfer switch device, and the three phase line switches are respectively used to connect the microgrid bus and the three-phase lines of the large power grid. The second switch is the fourth pole switch of the four-pole static transfer switch device. When the microgrid system is in a grid-connected state, the three phase line switches are closed and the fourth pole switch is disconnected; when the microgrid system is in an off-grid state, or after the replacement module 40 completes the replacement of the angular frequency and voltage amplitude, when the three phase line switches are disconnected, the fourth pole switch is closed.

[0076] It is understood that because the STS switch uses a controlled thyristor to control the on / off of the circuit, the switching speed is faster than that of a conventional four-pole switch, and the switching time can be less than 10ms, which can better meet the time requirements for seamless switching between grid connection and off-grid connection. In other embodiments of the present invention, other types of switches can also be used according to actual needs, and this embodiment is not limited thereto.

[0077] In a specific embodiment of the present invention, the detection module 10, the calculation module 20 and the prediction module 50 can all be integrated into the grid-connected and off-grid switching device, so that the pre-synchronization module 30 completes the zero-difference tracking, and the replacement module 40 completes the angular frequency replacement of the VSG mode of the energy storage converter and the voltage amplitude replacement. After that, the grid-connected and off-grid switching device can obtain a closing instruction from the energy storage converter, close the first switch, and open the second switch. At the same time, the energy storage converter is connected to the grid and operated under the control of the VSG mode.

[0078] When the on-grid switching device detects a fault in the main grid (such as voltage or frequency anomalies) and issues a fault command, or receives a planned off-grid command, it can also send an off-grid signal to the energy storage converter, simultaneously opening the first switch and closing the second switch. The planned off-grid command can be issued by the cloud platform and sent to the on-grid switching device via the edge controller, or it can be sent directly to the on-grid switching device by the local control system. At this time, the energy storage converter can adjust the bus voltage and frequency according to the local load power or preset commands under VSG mode control to achieve off-grid operation.

[0079] In this embodiment, the grid-connected and off-grid switching device in the grid-connected and off-grid control system can cooperate with the pre-synchronization module 30, the replacement module 40, and the energy storage inverter to realize rapid judgment of the timing of grid-connected and off-grid switching and generate instructions, and the grid-connected and off-grid switching device and the energy storage inverter form a two-way instruction interaction mechanism (grid-connected and off-grid switching device → energy storage inverter pre-synchronization / energy storage inverter → synchronization completion of grid-connected and off-grid switching device), forming a closed-loop control chain, and solving the problem of impact current caused by asynchronous switching in traditional open-loop control.

[0080] like Figure 7 As shown, in one embodiment of the present invention, the on-grid and off-grid control system further includes: an edge controller, which issues control instructions to end devices based on cloud scheduling instructions issued by the cloud platform and locally collected device operating parameters (such as voltage, current, power, and operating status). The control instructions may include on-grid to off-grid and off-grid to on-grid. The end devices may include distributed power sources and high-efficiency inverters, energy storage converters, on-grid and off-grid switching devices, smart meters, and relay protection devices (such as busbar integrated protection devices and single-bay protection devices). The control instructions may also include power adjustment instructions, etc., which are not limited in this embodiment.

[0081] When the on-grid switching device receives a control instruction to switch from on-grid to off-grid, it opens the first switch and closes the second switch; when the on-grid switching device receives a control instruction to switch from off-grid to on-grid, it waits for the replacement module 40 to complete the replacement of the angular frequency and voltage amplitude, then closes the first switch and opens the second switch.

[0082] In a specific embodiment of the present invention, the photovoltaic inverter and diesel generator of the photovoltaic unit in the microgrid system can both operate in constant power (PQ) mode and receive power commands from the edge controller. The energy storage converter of the energy storage unit operates in VSG mode. When the energy storage converter receives a planned off-grid command from the cloud platform through the edge controller, or a fault command issued by the on-grid / off-grid switching device when it detects a fault in the main grid, the PCS can actively maintain the bus voltage and frequency. When the on-grid / off-grid switching device disconnects the phase line connection between the main grid and the microgrid system, it ensures that the power supply and demand in the microgrid system is balanced according to the load command of the edge controller.

[0083] In this embodiment, an edge controller is configured to receive cloud scheduling instructions from the cloud platform and issue instructions to end devices. This constructs a hierarchical intelligent control architecture for "cloud-edge-end collaboration," enabling intelligent management of both on-grid and off-grid microgrid operations. The cloud platform can utilize large-scale grid operating data and external environmental information to predict and evaluate grid status, generating mode switching decisions and operational strategies. The edge controller is responsible for real-time data acquisition, issuing mode switching instructions, and power distribution. Local end devices output power according to the edge controller's power instructions. The specific cloud-edge-end hierarchical collaborative control method can be found in Patent CN120127742A and will not be further described here.

[0084] Through the cloud-edge-end collaborative architecture, without increasing the computing burden of local devices, the system's adaptability to dynamic load disturbances and grid failures can be significantly improved, unified scheduling and flexible operation strategies for multi-source heterogeneous equipment can be achieved, and the intelligence level of the microgrid can be enhanced.

[0085] In one embodiment of the present invention, the cloud platform can predict the state of the large power grid based on the state data of the large power grid and send a reasonable grid connection interval Δt to the edge controller. g When the large grid state is restored, the edge controller is based on whether the duration of large grid state recovery is greater than the reasonable grid connection interval Δt g , determine whether to issue a control instruction for off-grid to grid connection.

[0086] Specifically, the cloud platform can predict the stable and continuous probability distribution of the power grid after recovery and the possibility of deterioration again in a short period of time based on the continuously collected large-scale power grid status data through the trained machine learning prediction model (such as the long short-term memory network LSTM), thereby obtaining a reasonable grid connection interval Δt g ,

[0087] In a specific embodiment of the present invention, the reasonable grid connection interval Δt g The following formula should be satisfied:

[0088] Δt g =max(T min ,τ pred +T margin +T exec )

[0089] Where: T min is the preset minimum decision time threshold, which is a constant greater than zero and represents the minimum time guarantee required for the system to perform off-grid to grid-connected operation; τ predThe predicted value output by the grid stability prediction model represents the minimum length of time that the grid can continue to operate stably from the moment the grid state is determined to have initially recovered to the acceptable range. This prediction is generated based on historical operating data, real-time grid dynamic parameters, and a preset stability confidence level. margin is the prediction uncertainty time margin, which is a positive parameter used to compensate for the inherent error of the power grid stability prediction model and the risk of short-term fluctuations in the power grid state; T exec The total system execution time, which includes the sum of the following sub-items:

[0090] t sync : The conservatively estimated maximum time required for the pre-synchronization module to complete the frequency, amplitude, and phase tracking between the energy storage converter and the large power grid; t switch : The conservative maximum time from the completion of pre-synchronization to the issuance of a closing command to the on-grid and off-grid switching device and the completion of the grid connection operation; t load : To ensure the stability of bus voltage and frequency during the switching process, the conservative maximum value of the duration required to limit the power of the load unit (if applicable); t com : The communication and processing time margin required for the cloud platform to send instructions to the edge controller, the edge controller to process instructions and provide status feedback.

[0091] The above formula is intended to ensure that: when the observed large power grid state recovery duration t satisfies t≥Δt g When the system performs the total time requirement of grid-connected operation (T exec ), and the probability that the state of the large power grid remains stable after the grid connection is completed reaches the preset confidence threshold, thereby effectively avoiding frequent grid connection and off-grid switching operations.

[0092] Optionally, the cloud platform is configured to dynamically optimize and adjust the parameter τ in the formula based on the system's historical operating data (including the actual duration of grid recovery, grid switching success rate, and stability performance after switching). pred ,T margin ,t sync ,t switch ,t load , in order to achieve Δt g Adaptive update.

[0093] In one embodiment of the present invention, when the large power grid recovery duration t<Δt g , the edge controller will not issue the control command of switching from off-grid to grid-connected, so that the microgrid system can keep running off-grid and avoid frequent switching between grid-connected and off-grid. g , issuing control instructions for switching from off-grid to grid-connected mode. Pre-synchronization module 30 enables seamless tracking of frequency, amplitude, and phase between the energy storage converter and the main grid. Once synchronization is complete, a closing instruction is issued to the on-grid and off-grid switching device, completing the grid connection. During the switching period, the power of load units (such as charging stations) can be limited to prevent sudden changes in load from affecting bus voltage and frequency, potentially leading to switching failures.

[0094] In the description of the present invention, “plurality” means two or more, unless otherwise clearly defined.

[0095] The execution order of the steps shown in the flowchart is a preferred implementation mode. In other embodiments of the present invention, the steps may be adjusted according to the functions involved in the steps, for example, they may be executed simultaneously or in the reverse order.

[0096] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device. For purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0097] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0098] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

Claims

1. A method for controlling on-grid and off-grid operation of a microgrid system, wherein the microgrid system includes an energy storage converter, characterized in that: The method comprises: S1, obtaining the three-phase voltage of the large power grid; S2, obtaining the grid angular frequency, grid voltage amplitude, and grid phase of the large grid through a phase-locked loop according to the three-phase voltage of the large grid; S3, in the pre-synchronization stage, based on the principles of secondary frequency modulation and secondary voltage regulation, an integral control link is added to the traditional control equation of the energy storage converter VSG mode, and frequency pre-synchronization is performed according to the grid angular frequency, and amplitude pre-synchronization is performed according to the grid voltage amplitude; phase pre-synchronization is performed based on the phase angle of the VSG active loop output and the PI regulator; S4. When the energy storage converter meets the grid connection requirements, the grid angular frequency in the frequency control of the VSG mode of the energy storage converter is replaced with the rated angular frequency of the VSG mode, and the grid voltage amplitude in the amplitude control of the VSG mode of the energy storage converter is replaced with the rated voltage amplitude of the VSG mode.

2. The on-grid and off-grid control method according to claim 1, characterized in that: The step S3 comprises: Step S31: Based on the principle of secondary frequency modulation, an integral control link is added to the virtual rotor motion equation of the energy storage converter in the VSG mode, and the rated angular frequency of the energy storage converter is replaced with the grid angular frequency of the large power grid to perform frequency pre-synchronization; Step S32: Based on the secondary voltage regulation principle, in the reactive-voltage equation based on droop control in the VSG mode of the energy storage converter, an integral control link is added to the voltage deviation part, and a PI control is added to the reactive deviation part, and the rated voltage amplitude of the energy storage converter is replaced with the grid voltage amplitude of the large power grid to perform amplitude pre-synchronization; Step S33: performing phase pre-synchronization based on the phase angle output by the VSG active loop and the PI regulator according to the grid phase.

3. The on-grid and off-grid control method according to claim 1, characterized in that: The frequency pre-synchronization control equation in step S31 is: Where J is the virtual moment of inertia; ω is the electrical angular velocity, ω g is the grid angular frequency; P m is the mechanical power; P e is the actual output power; D is the damping coefficient; θ is the angular displacement of the virtual generator rotor, k1 is the frequency modulation integral coefficient, and s is the Laplace operator; The amplitude pre-synchronization control equation in step S32 is: Where E represents reactive voltage, k q is the reactive power regulation coefficient, U g represents the grid voltage amplitude, U is the actual output voltage amplitude of the energy storage converter in the energy storage converter, k2 is the voltage regulation integral coefficient, k p With k i is the PI regulator control coefficient, Q ref and Q e are the reactive power command value and reactive power measurement value of VSG respectively, and k is the integral coefficient.

4. The on-grid and off-grid control method according to claim 1, characterized in that: Before step S3, the method further includes: a pre-judgment step of judging whether to enter the pre-synchronization phase based on the grid voltage amplitude and the synchronization condition. The pre-judgment step specifically includes: The voltage of the large power grid is subjected to dq transformation according to the grid phase to obtain the d-axis voltage U of the large power grid. d , q-axis voltage U q ; Establish synchronization conditions: |U d -U g_rms |<Δu1, and |U q -0|<Δu2, where U g_rms represents the effective value of the grid voltage of the large power grid, Δu1 represents the d-axis threshold, and Δu2 represents the q-axis threshold; If the synchronization condition is met, the process enters the pre-synchronization phase and executes step S3; if the synchronization condition is not met, the microgrid system is controlled to operate off-grid.

5. The on-grid and off-grid control method according to claim 1, characterized in that: The microgrid bus in the microgrid system is connected to the energy storage converter and the load respectively, the neutral line of the load is directly connected to the large power grid, and an on-grid and off-grid switching device is provided between the microgrid system and the large power grid. The on-grid and off-grid switching device includes a first switch and a second switch with opposite action logics, the first switch is used to connect the microgrid bus and the phase line of the large power grid, and the second switch is used to connect the microgrid bus and the neutral line of the energy storage converter. After step S4, the following steps are further included: S5, close the first switch and open the second switch to achieve grid-connected operation of the microgrid system.

6. A microgrid system on-grid and off-grid control system, the microgrid system including an energy storage converter, characterized in that: The on-grid and off-grid control system includes: A detection module, the detection module is used to obtain the three-phase voltage of the large power grid; A calculation module, configured to obtain a grid angular frequency, a grid voltage amplitude, and a grid phase of the large grid through a phase-locked loop according to the three-phase voltage of the large grid; A pre-synchronization module, which is used to add an integral control link to the traditional pre-synchronization control of the energy storage converter VSG mode based on the principles of secondary frequency modulation and secondary voltage regulation during the pre-synchronization stage, and perform frequency pre-synchronization according to the grid angular frequency and amplitude pre-synchronization according to the grid voltage amplitude; and perform phase pre-synchronization based on the phase angle output of the VSG active loop and a PI regulator; Replacement module, when the pre-synchronization module completes the error-free tracking, the replacement module is used to replace the grid angular frequency in the frequency control of the VSG mode of the energy storage converter with the rated angular frequency of the VSG mode, and replace the grid voltage amplitude in the amplitude control of the VSG mode of the energy storage converter with the rated voltage amplitude of the VSG mode.

7. The on-grid and off-grid control system according to claim 6, characterized in that: The microgrid system further includes a load connected to a microgrid bus, the microgrid bus is further connected to an energy storage converter in the energy storage converter, a large power grid is directly connected to a neutral line of the load, and the on-grid and off-grid control system further includes: The on-grid and off-grid switching device includes a first switch and a second switch with opposite action logics, the first switch is used to connect the microgrid bus and the phase line of the large power grid, and the second switch is used to connect the microgrid bus and the neutral line of the energy storage converter; When the microgrid system is in an off-grid state, the first switch is disconnected and the second switch is closed; when the microgrid system is in a grid-connected state, or after the replacement module completes the replacement of the angular frequency and the voltage amplitude, the first switch is closed and the second switch is disconnected.

8. The on-grid and off-grid control system according to claim 7, characterized in that: The on-grid and off-grid switching device is a four-pole static transfer switch device. The first switch includes three phase line switches of the four-pole static transfer switch device, and the three phase line switches are respectively used to connect the microgrid bus and the three-phase lines of the large power grid. The second switch is the fourth pole switch of the four-pole static transfer switch device. When the microgrid system is in a grid-connected state, the three phase line switches are closed and the fourth pole switch is disconnected; when the microgrid system is in an off-grid state, or after the replacement module completes the replacement of angular frequency and voltage amplitude, when the three phase line switches are disconnected, the fourth pole switch is closed.

9. The on-grid and off-grid control system according to claim 7, characterized in that: Also includes: The edge controller issues control instructions to the end device based on cloud scheduling instructions issued by the cloud platform and locally collected device operating parameters. The control instructions include switching from on-grid to off-grid and from off-grid to on-grid; When the on-grid switching device receives a control instruction for switching from on-grid to off-grid, it opens the first switch and closes the second switch; when the on-grid switching device receives a control instruction for switching from off-grid to on-grid, it waits for the replacement module to complete the replacement of the angular frequency and the voltage amplitude, and then closes the first switch and opens the second switch.

10. The on-grid and off-grid control system according to claim 9, characterized in that: The cloud platform predicts the state of the large power grid based on the large power grid state data and sends a reasonable grid-connected interval to the edge controller. When the large power grid state recovers, the edge controller determines whether to send a control instruction for switching from off-grid to grid-connected based on whether the duration of the large power grid state recovery is greater than the reasonable grid-connected interval.