Grid-connected and off-grid smooth switching control method and device for micro-grid, electronic equipment, readable storage medium and program product

Through master-slave finite control set model predictive control (FCS-MPC) optimization of the microgrid inverter output signal, the problems of slow dynamic response and difficulty in multi-inverter coordination in traditional control strategies are solved, and smooth switching and power supply reliability of the microgrid are achieved.

CN120454170APending Publication Date: 2025-08-08HUIZHOU POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510707600.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Traditional microgrid control strategies face slow dynamic response, difficulty in multi-inverter coordination, insufficient anti-interference capability in the fault island scenario, which affects the reliability of power supply.

Method used

The master-slave finite control set model predictive control (FCS-MPC) method is used to optimize its output signals by generating reference signals and cost functions of the master and slave inverters to achieve smooth switching of off-grid mode and dynamic coordination of multiple inverters.

Benefits of technology

It improves the power supply reliability and stability of the microgrid under complex operating conditions and ensures the quality of power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120454170A_ABST
    Figure CN120454170A_ABST
Patent Text Reader

Abstract

The invention relates to a microgrid grid-connected and off-grid smooth switching control method and device, electronic equipment, a readable storage medium and a program product. A first reference signal of a master inverter is generated based on an operation mode of the micro-grid, a second reference signal of a slave inverter is generated based on a power distribution strategy of the master inverter, and according to the first reference signal of the master inverter and a first system prediction state, based on a cost function corresponding to the master inverter in the operation mode, a power distribution strategy of the slave inverter is generated. And optimizing the first output signal of the master inverter according to the first reference signal and the first system prediction state of the slave inverter, and optimizing the second output signal of the slave inverter based on a cost function corresponding to the slave inverter according to the second reference signal and the second system prediction state of the slave inverter so as to realize that the slave inverter adjusts the output current and voltage according to the own power demand. The grid-connected and off-grid undisturbed switching control can be realized, the dynamic coordination of multiple inverters can be realized, the power supply reliability under the complex working condition is improved, and the stability of the whole micro-grid system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power system control technology, and in particular to a method, device, electronic device, readable storage medium and program product for controlling smooth switching of microgrids on and off the grid. Background Art

[0002] As a new type of distribution network, a microgrid is a local power system that includes distributed energy resources (such as solar energy, wind energy, and energy storage systems) and loads. It can operate either connected to the main grid (grid-connected mode) or independently (island mode). Therefore, microgrids are required to have the ability to flexibly switch between grid-connected and island modes to cope with complex scenarios such as main grid failures, extreme weather events, and sudden load changes.

[0003] Traditional technologies typically use linear proportional-integral control (PI control), droop control, or model predictive control (MPC) to control the on-grid and off-grid modes of microgrids. However, in microgrid fault islanding scenarios, these traditional control strategies face core challenges such as slow dynamic response, difficulty coordinating multiple inverters, and insufficient anti-interference capabilities, severely limiting the power supply reliability of microgrids. Summary of the Invention

[0004] Based on this, it is necessary to provide a microgrid on-grid and off-grid smooth switching control method, device, electronic device, readable storage medium and program product that can improve power supply reliability in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for controlling smooth switching of a microgrid on and off the grid, the method comprising:

[0006] Generate a first reference signal for the main inverter based on an operating mode of the microgrid, wherein the first reference signal corresponds to the operating mode; the operating mode includes a grid-connected mode or an island mode;

[0007] and generating a second reference signal for the slave inverter based on the power allocation strategy of the master inverter, wherein the second reference signal includes a reference current of the slave inverter in the operation mode;

[0008] optimizing a first output signal of the master inverter based on a first reference signal of the master inverter and a first system predicted state and a cost function corresponding to the master inverter in the operating mode;

[0009] The second output signal of the slave inverter is optimized based on a cost function corresponding to the slave inverter according to the second reference signal of the slave inverter and a second system predicted state.

[0010] In one embodiment, the generating of the first reference signal of the main inverter based on the microgrid operation mode includes:

[0011] When the operation mode of the microgrid is a grid-connected mode, generating a reference current of the main inverter based on a reference current of the grid;

[0012] generating a reference voltage for the main inverter based on a measured voltage at a point of common coupling;

[0013] The reference current and the reference voltage are determined as first reference signals of the master inverter in the grid-connected mode.

[0014] In one embodiment, the generating of the first reference signal of the main inverter based on the microgrid operation mode includes:

[0015] When the operation mode of the microgrid is an island mode, generating a reference voltage and a reference frequency of the main inverter based on droop control;

[0016] The reference voltage and reference frequency are determined as a first reference signal of the master inverter in the island mode.

[0017] In one embodiment, generating the second reference signal of the slave inverter based on the power allocation strategy of the master inverter includes:

[0018] When the operation mode of the microgrid is a grid-connected mode or an island mode, determining a reference current of the grid in the corresponding operation mode based on the power allocation strategy of the main inverter;

[0019] generating a reference current of the slave inverter based on a reference current of the grid in a corresponding operation mode;

[0020] The reference current of the slave inverter is determined as the second reference signal of the slave inverter in the corresponding operation mode.

[0021] In one embodiment, optimizing the first output signal of the master inverter based on the first reference signal of the master inverter and the first system predicted state and based on a cost function corresponding to the master inverter in the operating mode includes:

[0022] Obtaining a predicted current and predicted voltage of the main inverter and a predicted voltage of the capacitor at a future time based on current system operation data; the current system operation data includes a current current and voltage of the main inverter, a current current and voltage of the capacitor, a current current of the grid, and filter parameters;

[0023] When the operation mode of the microgrid is a grid-connected mode, determining a first output signal from a predicted current and a predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the grid-connected mode and a first cost function of the main inverter in the grid-connected mode, wherein the first output signal includes a target output current and a target output voltage of the main inverter;

[0024] When the operating mode of the microgrid is the island mode, a first output signal is determined from the predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the island mode and a second cost function of the main inverter in the island mode. The first output signal includes a target output voltage of the main inverter.

[0025] In one embodiment, optimizing the second output signal of the slave inverter based on the second reference signal of the slave inverter and the second system predicted state and based on a cost function corresponding to the slave inverter includes:

[0026] Obtaining a predicted current of the slave inverter and a predicted voltage of the capacitor at a future time based on current system operation data, wherein the current system operation data includes the current current and voltage of the slave inverter, the current current and voltage of the capacitor, and filter parameters;

[0027] Based on the first reference signal of the slave inverter and a third cost function corresponding to the slave inverter, a second output signal is determined from the predicted current of the slave inverter, wherein the second output signal includes a target output current of the slave inverter.

[0028] In a second aspect, the present application provides a microgrid on-grid and off-grid smooth switching control device, the device comprising:

[0029] a reference signal generation module, configured to generate a first reference signal for a master inverter based on an operating mode of the microgrid, the first reference signal corresponding to the operating mode; the operating mode including a grid-connected mode or an island mode; and to generate a second reference signal for a slave inverter based on a power allocation strategy of the master inverter, the second reference signal including a reference current of the slave inverter in the operating mode;

[0030] a first optimization module, configured to optimize a first output signal of the master inverter based on a first reference signal of the master inverter and a first system predicted state and a first cost function corresponding to the master inverter in the operation mode;

[0031] The second optimization module is configured to optimize the second output signal of the slave inverter based on a second reference signal of the slave inverter and a second system predicted state and a second cost function corresponding to the slave inverter.

[0032] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0033] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.

[0034] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which implements the steps of the above method when executed by a processor.

[0035] The above-mentioned microgrid on-grid and off-grid smooth switching control method, device, electronic device, computer-readable storage medium, and computer program product generate a first reference signal for the master inverter based on the microgrid's operating mode, and a second reference signal for the slave inverter based on the master inverter's power allocation strategy. Based on the master inverter's first reference signal and a first system predicted state, and based on a cost function corresponding to the master inverter in the operating mode, the first output signal of the master inverter is optimized to achieve optimal current and voltage control and dynamically adjust power output according to load demand. Based on the slave inverter's second reference signal and a second system predicted state, and based on a cost function corresponding to the slave inverter, the second output signal of the slave inverter is optimized to enable the slave inverter to adjust its output current and voltage according to its own power demand. This method not only achieves non-disruptive on-grid and off-grid switching control, but also enables dynamic coordination of multiple inverters, improving power supply reliability under complex operating conditions, thereby ensuring the stability of the entire microgrid system. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 1. A flow chart of a method for controlling smooth switching of a microgrid on and off the grid in one embodiment;

[0038] Figure 2 A schematic flow chart of a step of generating a first reference signal in one embodiment;

[0039] Figure 3 A schematic flow chart of the step of generating a first reference signal in another embodiment;

[0040] Figure 4 A schematic flow chart of a step of generating a second reference signal in one embodiment;

[0041] Figure 5 A schematic diagram of a system response to mode switching in one embodiment;

[0042] Figure 6 This is a structural block diagram of a microgrid on-grid and off-grid smooth switching control device in one embodiment;

[0043] Figure 7 FIG. 1 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0045] Traditional control strategies face core challenges in microgrid fault islanding scenarios, such as slow dynamic response, difficulty coordinating multiple inverters, and insufficient anti-interference capabilities. These challenges severely restrict the reliability of microgrid power supply. For example, traditional PI control and droop control typically employ cascaded control structures, which rely on fixed parameters and precise mathematical models. This makes them difficult to adapt to changes such as nonlinear loads, weak grid conditions, and uncertain equipment parameters. For example, during the transition from grid-connected to islanding, the master inverter needs to quickly switch to become the voltage-frequency dominant unit. However, traditional methods, due to delayed dynamic response, are prone to transient voltage fluctuations or frequency instability, which can lead to misoperation of protective devices and even system crashes. Furthermore, traditional master-slave control architectures are often based on centralized communication or fixed power distribution ratios, which increases system complexity and prevents adaptive adjustments in the event of communication interruptions or slave device failures, resulting in unbalanced power distribution.

[0046] Although MPC control has been introduced into the microgrid field due to its advantages in multi-objective optimization and system constraint handling, traditional MPC research has focused on applications in a single inverter or a single operating mode (such as grid-connected or islanded), and has not yet addressed issues such as reference signal generation and mode switching conflicts in the coordinated operation of multiple inverters.

[0047] In summary, traditional control strategies face core challenges such as slow dynamic response, difficulty in multi-inverter coordination, and insufficient anti-interference capabilities in the fault islanding scenario of the new distribution network.

[0048] Based on this, an embodiment of the present application provides a microgrid on-grid and off-grid smooth switching control method, which realizes disturbance-free switching between grid-connected and islanded modes and dynamic coordination of multiple inverters through master-slave finite control set model predictive control (FCS-MPC), thereby improving the power supply reliability under complex working conditions, ensuring the power supply continuity of the distribution network in a changing environment, and improving the power quality on the user side.

[0049] In one embodiment, Figure 1 As shown, a microgrid on-grid and off-grid smooth switching control method is provided, which may include the following steps:

[0050] Step 102: Generate a first reference signal for a main inverter based on an operation mode of the microgrid.

[0051] Microgrids can operate in either grid-connected or islanded modes. Master and slave inverters are common concepts in distributed power generation systems and are the dominant devices in a multi-inverter system, responsible for coordinating the operation of the entire inverter cluster. They typically have high priority and control authority, issuing commands based on the microgrid's operating status (such as load demand and power), controlling parameters such as the output power, voltage, and frequency of other inverters.

[0052] The first reference signal corresponds to the operating mode of the microgrid. For example, the first reference signal of the main inverter may be different in different operating modes of the microgrid. The first reference signal may specifically be at least two of a reference current, a reference voltage, and a reference frequency.

[0053] In this embodiment, the operating mode of the microgrid can be monitored in real time, thereby generating a first reference signal for the master inverter based on the operating mode of the microgrid. For example, in grid-connected mode, the microgrid is connected to the grid, and the master inverter, as a grid-following inverter, directly generates its own reference voltage and reference current based on the voltage and frequency of the grid, thereby controlling the output current and voltage of the microgrid to ensure system stability. In island mode, the master inverter is transformed into a grid-forming inverter, responsible for controlling the voltage and frequency of the microgrid. The master inverter generates voltage and frequency reference signals for the slave inverter to generate a reference current based on its power demand.

[0054] Step 104 : Generate a second reference signal for the slave inverter based on the power allocation strategy of the master inverter.

[0055] The second reference signal includes a reference current of the slave inverter in the corresponding operating mode. Since the master inverter can issue instructions based on the operating status of the microgrid (such as load demand, power supply power, etc.). For example, the master inverter can monitor the voltage, current, frequency and other parameters of the microgrid, as well as the output power and load demand of the distributed power supply in real time, and generate control instructions based on the system status and distribute them to the slave inverter to ensure the power balance and power quality of the system. Therefore, the power allocation strategy of the master inverter can be the control instructions generated by the master inverter and distributed to the slave inverter based on the system status.

[0056] In this embodiment, a second reference signal of the slave inverter can also be generated based on the power allocation strategy of the master inverter, that is, a reference current of the slave inverter in the corresponding operating mode is generated, and then the output current and voltage are adjusted according to the power requirements of the slave inverter itself to ensure the stability and load sharing of the entire microgrid system.

[0057] Step 106 : Optimize the first output signal of the master inverter according to the first reference signal of the master inverter and the first system predicted state and based on a cost function corresponding to the master inverter in the operation mode.

[0058] The first predicted system state may be a state of the system at a future time predicted based on the current system state, for example, it may include the predicted voltage and current of the main inverter at a future time, and the voltage of the capacitor on the main inverter side at a future time.

[0059] The cost function, also known as the cost function, is a key component of optimizing the control strategy and defines the system performance target. The cost function corresponding to the master inverter is used to optimize the control strategy for the master inverter. In this embodiment, the cost function corresponding to the master inverter corresponds to its operating mode; that is, the cost function used by the master inverter can be different in different operating modes.

[0060] In this embodiment, the control strategy of the master inverter can be optimized based on the first system predicted state and the first reference signal of the master inverter, and based on a cost function corresponding to the master inverter in the operating mode. That is, the first output signal of the master inverter is optimized by minimizing the cost function. The first output signal is the output current and voltage of the master inverter determined based on the optimization.

[0061] Step 108 : Optimizing the second output signal of the slave inverter based on the second reference signal of the slave inverter and the second system predicted state and a cost function corresponding to the slave inverter.

[0062] The second predicted system state may be a state of the system at a future time predicted based on the current system state, for example, the predicted current of the slave inverter at a future time, and the voltage of the slave inverter side capacitor at a future time.

[0063] The cost function corresponding to the slave inverter is used to optimize the control strategy of the slave inverter. In this embodiment, the control strategy of the slave inverter can be optimized based on the cost function corresponding to the slave inverter according to the second system predicted state and the second reference signal of the slave inverter. In other words, the second output signal of the slave inverter is optimized by minimizing the cost function. The second output signal is the output current of the slave inverter determined based on the optimization.

[0064] In the above-mentioned microgrid on-grid and off-grid smooth switching control method, a first reference signal for the master inverter is generated based on the microgrid's operating mode, and a second reference signal for the slave inverter is generated based on the master inverter's power allocation strategy. Based on the master inverter's first reference signal and a first system predicted state, the master inverter's first output signal is optimized based on a cost function corresponding to the master inverter in the operating mode to achieve optimal current and voltage control and dynamically adjust power output according to load demand. Based on the slave inverter's second reference signal and a second system predicted state, the slave inverter's second output signal is optimized based on a cost function corresponding to the slave inverter to enable the slave inverter to adjust its output current and voltage according to its own power demand. This method not only enables non-disruptive on-grid and off-grid switching control, but also achieves dynamic coordination of multiple inverters, improving power supply reliability under complex operating conditions and ensuring the stability of the entire microgrid system.

[0065] In an exemplary embodiment, Figure 2 As shown, in step 102, generating a first reference signal of the main inverter based on the operation mode of the microgrid may specifically include:

[0066] Step 202 : When the operation mode of the microgrid is the grid-connected mode, a reference current of the main inverter is generated based on a reference current of the grid.

[0067] The grid reference current refers to the grid-side reference current, which is determined based on the grid-side reference voltage and the power reference value of the master inverter. Since the master inverter follows the grid in grid-connected mode, the master inverter's reference current can be generated based on the grid reference current.

[0068] Exemplarily, the reference current of the grid can be determined by the following equations (1) and (2):

[0069]

[0070] in, and is the value of the reference current at the grid side K in the α and β coordinate systems; v mα (k) and v mβ (k) is the filter voltage on the main inverter side at time K; and is the reference of active power and reactive power of the main inverter; k is the sampling time.

[0071] The reference current of the main inverter can then be generated based on the reference current of the grid, which can be calculated using the following equations (3) and (4):

[0072]

[0073] in, and is the reference current value of the main inverter side at time K in the α, β coordinate system; f is the grid frequency; C m is the capacitance of the filter; v mα (k) and v mβ (k) is the filter voltage on the main inverter side at time K; and is the reference current of the grid side at time K; k is the sampling time.

[0074] If extended to (k+1), it can be calculated by the following equations (5) and (6):

[0075]

[0076] in, and is the value of the reference current measured by the main inverter at time (k+1) in the α and β coordinate systems; and is the reference current on the grid side at time K, ω is the angular frequency; T s is the sampling period.

[0077] Step 204 : Generate a reference voltage for the main inverter based on the measured voltage at the point of common coupling.

[0078] Since the main inverter acts as an inverter following the grid in the grid-connected mode, the measured voltage at the common coupling point can be defined as the reference voltage of the main inverter.

[0079] For example, if at time K, the measured voltage at the common coupling point is and Then the reference voltage of the main inverter at time K in the α and β coordinate systems is

[0080] It can also be extended to the (k+2) time through the following equations (7) and (8):

[0081]

[0082] in and is the measured voltage at the point of common coupling at time K; and is the reference voltage of the main inverter side at time (K+2); ω is the angular frequency; T s is the sampling period.

[0083] Step 206: Determine the reference current and the reference voltage as the first reference signal of the master inverter in the grid-connected mode.

[0084] Specifically, the reference current and reference voltage obtained above may be determined as the first reference signal of the master inverter in the grid-connected mode.

[0085] In the above embodiment, when the microgrid is operating in grid-connected mode, the master inverter acts as a grid-following inverter, controlling the output current and voltage of the microgrid. Thus, the reference current and reference voltage of the master inverter are directly calculated based on the voltage and frequency of the grid.

[0086] In an exemplary embodiment, Figure 3 As shown, in step 102, generating a first reference signal of the main inverter based on the operation mode of the microgrid may further include:

[0087] Step 302 : When the operation mode of the microgrid is the island mode, generate a reference voltage and a reference frequency of the main inverter based on droop control.

[0088] For example, in island mode, droop control can be performed using the following equations (9) and (10):

[0089]

[0090] Then, the reference voltage of the main inverter can be obtained by the following equations (11) and (12):

[0091]

[0092] Among them, v * (k) and ω * (k) are the reference values of voltage amplitude and frequency at time K; v nom and ω nom is the standard voltage of the power grid; k p and k q is the droop coefficient; and Is the active and reactive reference of the main inverter; P m and Q m are the instantaneous active power and instantaneous reactive power of the main inverter; and is the reference voltage of the main inverter at time K; ω is the angular frequency; T s is the sampling period.

[0093] For the instantaneous power P m and Q m It can be determined by the following equations (13) and (14):

[0094] P m (k)=v mα (k)i mα (k)+v mβ (k)i mβ (k), (13)

[0095] Q m (k)=v mβ (k)i mα (k)-v mα (k)i mβ (k), (14)

[0096] Among them, v mα (k) and v mβ (k) is the filter voltage on the main inverter side at time K, i mα (k) and i mβ (k) is the current of the main inverter at time K.

[0097] Step 304: Determine the reference voltage and reference frequency as the first reference signal of the master inverter in the island mode.

[0098] In this embodiment, when the microgrid enters island mode, the master inverter transforms into a grid-forming inverter, responsible for controlling the voltage and frequency of the microgrid. The master inverter generates voltage and frequency reference signals, which the slave inverters use to generate reference currents based on their power requirements.

[0099] In an exemplary embodiment, Figure 4 As shown, in step 104, generating a second reference signal of the slave inverter based on the power allocation strategy of the master inverter may specifically include:

[0100] Step 402 : When the operation mode of the microgrid is the grid-connected mode or the island mode, a reference current of the grid in the corresponding operation mode is determined based on the power allocation strategy of the main inverter.

[0101] In the grid-connected mode or the island mode, the reference current of the slave inverter may be determined based on the reference current of the grid.

[0102] For example, the reference current of the grid can be determined by the following equations (15) and (16):

[0103]

[0104] in, and is the reference current value of the grid side at time K in the αβ coordinate system; v sα (k) and v sβ (k) is the filter voltage from the inverter side at time K; and It is the reference of active power and reactive power from the inverter.

[0105] Step 404 : Generate a reference current for the slave inverter based on a reference current of the grid in a corresponding operation mode.

[0106] Then, the reference current of the slave inverter can be generated based on the reference current of the grid, which can be calculated by the following equations (17) and (18):

[0107]

[0108] in, and is the value of the reference current from the inverter at time K in the α and β coordinate systems; and is the value of the reference current on the grid side at time K in the αβ coordinate system, and f is the grid frequency; C s is the capacitance of the filter; v sα (k) and v sβ (k) is the filter voltage from the inverter side at time K; f is the grid frequency.

[0109] If extended to (k+1), it can be calculated by the following equations (19) and (20):

[0110]

[0111] in, and is the value of the reference current measured from the inverter at time (k+1) in the α and β coordinate systems; and is the value of the reference current from the inverter at time K in the α and β coordinate systems; ω is the angular frequency; T s is the sampling period.

[0112] In step 406 , a reference current of the slave inverter is determined as a second reference signal of the slave inverter in the corresponding operation mode.

[0113] Specifically, for the grid-connected mode or the island mode, the reference current of the slave inverter can be generated through the above steps, and the reference current of the slave inverter can be determined as the second reference signal of the slave inverter in the corresponding operating mode, thereby laying the foundation for dynamic coordination of multiple inverters.

[0114] In an exemplary embodiment, in step 106, optimizing the first output signal of the master inverter based on the first reference signal of the master inverter and the first system predicted state and based on a cost function corresponding to the master inverter in the operating mode may specifically include:

[0115] The predicted current and voltage of the main inverter and the predicted voltage of the capacitor at a future time are obtained based on the current system operating data. The first system predicted state includes the predicted current and voltage of the main inverter and the predicted voltage of the capacitor on the main inverter side at a future time. The current system operating data may include the current current and voltage of the main inverter, the current current and voltage of the capacitor on the main inverter side, the current current of the grid, and filter parameters.

[0116] For example, the predicted current of the main inverter can be determined by the following discrete time equation (21):

[0117]

[0118] The above equation describes the main inverter side current i mα and i mβ The predicted value at time (k+1) is the current value i on the main inverter side at time K. mα (k) and i mβ (k), output voltage u mα (k) and u mβ (k) and the main inverter side filter voltage v mα (k) and v mβ (k) function. Among them, T s is the sampling period; L m and R are the filter parameters.

[0119] The predicted voltage of the main inverter can be determined by the following discrete time equation (22):

[0120]

[0121] The above equation describes the voltage v on the main inverter side mα and v mβ The predicted value at time (k+2) is the voltage value v at time (k+1) mα (k+0) and v mβ (k+1), main inverter side current i mα(k+1) and i mβ (k+1) and the grid current i moα (k+1) and i moβ (k+1) function. Among them, T s is the sampling period; C m are the filter parameters.

[0122] The predicted voltage of the capacitor on the main inverter side can be determined by the following discrete time equation (23):

[0123]

[0124] The above equation describes the voltage v on the capacitor on the main inverter side dc1m and the lower voltage v dc2m The predicted value at time (k+1) is the voltage value v at time k. dc1m (k) and v dc2m (k) and the current i flowing through the capacitor mdc1 (k) and i mdc2 (k) function. Among them, i mdc1 (k) and i mdc2 (k) are the currents flowing through the upper and lower capacitors at time k; C is the capacitance of the DC bus; T s is the sampling period.

[0125] For the current i flowing through the capacitor mdc1 and i mdc2 It can be calculated by the following formulas (24) and (25):

[0126] i mdc1 =i B -S 1am (k)i ma -S 1bm (k)i mb -S 1cm (k)i mc , (twenty four)

[0127] i mdc2 =i B +S 4am (k)i ma -S 4bm (k)i mb -S 4cm (k)i mc , (25)

[0128] Among them, i B is the current of the battery energy storage system; S 1xm and S 4xm It is the upper switch and lower switch of each phase of each inverter (such as S 1amis the upper switch of the inverter in phase a, S 1bm is the upper switch of the inverter in phase b, S 4am is the lower switch of the inverter in phase a, S 4bm is the lower switch of the inverter in phase b); i ma 、i mb and i mc is the phase current.

[0129] Through the above equations, the current and voltage of the main inverter, as well as the voltage of the capacitor on the main inverter side, can be predicted and controlled to ensure the stability of the system.

[0130] When the operating mode of the microgrid is the grid-connected mode, a first output signal is determined from the predicted current and predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the grid-connected mode and a first cost function of the main inverter in the grid-connected mode, wherein the first output signal includes a target output current and a target output voltage of the main inverter.

[0131] For example, for the grid-connected mode, the first cost function of the main inverter may be as shown in the following equation (26):

[0132]

[0133] Among them, λ1, λ2 and λ3 are weight factors used to adjust the relative importance of each term in the first cost function; is the two-dimensional vector of the reference voltage of the main inverter at time (k+2), including and v mαβ (k+2) is a two-dimensional vector of the predicted voltage of the main inverter at time (k+2). is a two-dimensional vector of the reference voltage of the capacitor at time (k+1), including and v dcm (k+1) is a two-dimensional vector of the predicted voltage of the capacitor at time (k+1). is the two-dimensional vector of the reference current of the main inverter at time (k+1), including and I lim Limits the magnitude of the inverter side current, i mαβ (k+1) is the two-dimensional vector of the predicted current of the main inverter at time (k+1). mαβ The absolute value of (k+1) is greater than the maximum current of the main inverter, then I lim Take the larger value, otherwise take zero. lim The existence of i is to ensure that the predicted mαβThe value of (k+1) can be less than the maximum current of the main inverter, and if the predicted i mαβ If the value of (k+1) is greater than the maximum current of the main inverter, this solution is discarded.

[0134] When the operating mode of the microgrid is the island mode, a first output signal is determined from the predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the island mode and a second cost function of the main inverter in the island mode, wherein the first output signal includes a target output voltage of the main inverter.

[0135] For example, for the island mode, the second cost function of the main inverter can be shown as the following equation (27):

[0136]

[0137] The meaning of each parameter is the same as that in the above formula (26). The second cost function is similar to the above first cost function, but without the current term, because the current does not need to be controlled in the island mode.

[0138] In this embodiment, the control strategy of the main inverter can be optimized by minimizing the cost function. For example, the main inverter can select one of all possible current and voltage vectors to minimize the cost function, thereby achieving optimal control of current and voltage, thereby achieving stable and efficient operation of the system.

[0139] In an exemplary embodiment, in step 108, optimizing the second output signal of the slave inverter based on the second reference signal of the slave inverter and the second system predicted state and based on a cost function corresponding to the slave inverter may specifically include:

[0140] A predicted current from the inverter and a predicted voltage from the capacitor at a future time are obtained based on the current system operating data. The second predicted system state includes the predicted current from the inverter and the predicted voltage from the inverter-side capacitor at a future time. The current system operating data may include the current current and voltage from the inverter, the current current and voltage from the inverter-side capacitor, and filter parameters.

[0141] For example, the predicted current from the inverter can be determined by the following discrete time equation (28):

[0142]

[0143] The above equation describes the current i from the inverter side sα and i sβ The predicted value at time (k+1) is the current value i at time K. sα (k) and i sβ(k), output voltage u sα (k) and u sβ (k) and the filter voltage v from the inverter side sα (k) and v sβ (k) function. Among them, T s is the sampling period; L s and R are the filter parameters.

[0144] The predicted voltage from the inverter side capacitor can be determined by the following discrete time equation (29):

[0145]

[0146] The above equation describes the voltage v on the capacitor on the inverter side dc1s and the lower voltage v dc2s The predicted value at time (k+1) is the voltage value v at time k. dc1s (k) and v dc2s (k) and the current i flowing through the capacitor sdc1 and i sdc2 function. Among them, i sdc1 and i sdc2 are the currents flowing through the upper and lower capacitors of the capacitor respectively; C is the capacitance of the DC bus; T s is the sampling period.

[0147] For the current i flowing through the capacitor sdc1 and i sdc2 It can be calculated by the following formulas (30) and (31):

[0148] i sdc1 =i PV -S 1as (k)i sa -S 1bs (k)i sb -S 1cs (k)i sc , (30)

[0149] i sdc2 =i PV +S 4as (k)i sa -S 4bs (k)i sb -S 4cs (k)i sc , (31)

[0150] Among them, i PV is the current of the battery energy storage system; S 1xs and S 4xs It is the upper switch and lower switch of each phase of each inverter (such as S1as is the upper switch of the inverter in phase a, S 1bs is the upper switch of the inverter in phase b, S 4as is the lower switch of the inverter in phase a, S 4bs is the lower switch of the inverter in phase b); i sa 、i sb and i sc is the phase current.

[0151] By using the above equations, the current from the inverter and the voltage of the capacitor on the inverter side can be predicted and controlled, thereby ensuring the stability of the system.

[0152] A second output signal is determined by using the predicted current of the slave inverter based on the first reference signal of the slave inverter and a third cost function corresponding to the slave inverter, wherein the second output signal includes a target output current of the slave inverter.

[0153] For example, for the grid-connected mode or the islanded mode, the third cost function of the slave inverter may be as shown in the following equation (32):

[0154]

[0155] Among them, λ1 and λ2 are weight factors used to adjust the relative importance of each term in the third cost function. is the two-dimensional vector of the reference current from the inverter at time (k+1), including and is the two-dimensional vector of the reference voltage of the capacitor at time (k+1), including and I lim The magnitude of the inverter side current is limited to ensure the predicted i sαβ The value of (k+1) can be smaller than the maximum current of the multi-inverter.

[0156] Similarly, in this embodiment, the control strategy of the slave inverter can be optimized by minimizing the cost function. For example, the slave inverter can select one from all possible current vectors to minimize the cost function, thereby achieving optimal control of the current. In this embodiment, the slave inverter can adjust the output current according to its own power requirements, thereby achieving stable and efficient operation of the system.

[0157] Based on the microgrid on-grid and off-grid smooth switching control method provided above in this embodiment, the master-slave finite control set model predictive control (FCS-MPC) can achieve disturbance-free switching between grid-connected and islanded modes and dynamic coordination of multiple inverters, thereby improving power supply reliability under complex working conditions and ensuring power quality on the user side.

[0158] In an exemplary embodiment, Figure 5 As shown in Figure 2, the system response to the switch from grid-connected mode to island mode and load changes in island mode is demonstrated. Figure 5 It can be seen that the system can smoothly transition between grid-connected and island modes. In island mode, the master and slave inverters can quickly respond to load changes, effectively achieving power sharing and maintaining system stability and reliability. Furthermore, the system demonstrates strong dynamic response capabilities during the switching process, ensuring that load demands are met promptly, thereby safeguarding power quality at the user end and improving power supply reliability.

[0159] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0160] Based on the same inventive concept, embodiments of the present application also provide a microgrid on-grid and off-grid smooth switching control device for implementing the aforementioned microgrid on-grid and off-grid smooth switching control method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the microgrid on-grid and off-grid smooth switching control device provided below can be found in the above-mentioned limitations of the microgrid on-grid and off-grid smooth switching control method, and will not be repeated here.

[0161] In an exemplary embodiment, Figure 6 As shown, a microgrid on-grid and off-grid smooth switching control device is provided, including: a reference signal generation module 602, a first optimization module 604 and a second optimization module 606, wherein:

[0162] a reference signal generating module 602 configured to generate a first reference signal for a master inverter based on an operating mode of the microgrid, the first reference signal corresponding to the operating mode; the operating mode including a grid-connected mode or an island mode; and to generate a second reference signal for a slave inverter based on a power allocation strategy of the master inverter, the second reference signal including a reference current of the slave inverter in the operating mode;

[0163] a first optimization module 604, configured to optimize a first output signal of the master inverter based on a first reference signal of the master inverter and a first system predicted state and a first cost function corresponding to the master inverter in the operation mode;

[0164] The second optimization module 606 is configured to optimize the second output signal of the slave inverter based on a second cost function corresponding to the slave inverter according to the second reference signal of the slave inverter and a second system predicted state.

[0165] In an exemplary embodiment, the reference signal generation module is specifically used to: when the operating mode of the microgrid is the grid-connected mode, generate a reference current of the main inverter based on the reference current of the grid; generate a reference voltage of the main inverter based on the measured voltage of the common coupling point; and determine the reference current and reference voltage as the first reference signal of the main inverter in the grid-connected mode.

[0166] In an exemplary embodiment, the reference signal generation module is further specifically used to: generate a reference voltage and a reference frequency of the main inverter based on droop control when the operating mode of the microgrid is an island mode; and determine the reference voltage and the reference frequency as the first reference signal of the main inverter in the island mode.

[0167] In an exemplary embodiment, the reference signal generation module is specifically further used to: when the operating mode of the microgrid is a grid-connected mode or an island mode, determine the reference current of the grid in the corresponding operating mode based on the power allocation strategy of the master inverter; generate the reference current of the slave inverter based on the reference current of the grid in the corresponding operating mode; and determine the reference current of the slave inverter as the second reference signal of the slave inverter in the corresponding operating mode.

[0168] In an exemplary embodiment, the first optimization module is specifically configured to:

[0169] Obtaining a predicted current and predicted voltage of the main inverter and a predicted voltage of the capacitor at a future time based on current system operation data; the current system operation data includes a current current and voltage of the main inverter, a current current and voltage of the capacitor, a current current of the grid, and filter parameters;

[0170] When the operation mode of the microgrid is a grid-connected mode, determining a first output signal from a predicted current and a predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the grid-connected mode and a first cost function of the main inverter in the grid-connected mode, wherein the first output signal includes a target output current and a target output voltage of the main inverter;

[0171] When the operating mode of the microgrid is the island mode, a first output signal is determined from the predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the island mode and a second cost function of the main inverter in the island mode. The first output signal includes a target output voltage of the main inverter.

[0172] In an exemplary embodiment, the second optimization module is specifically configured to:

[0173] Obtaining a predicted current of the slave inverter and a predicted voltage of the capacitor at a future time based on current system operation data, wherein the current system operation data includes the current current and voltage of the slave inverter, the current current and voltage of the capacitor, and filter parameters;

[0174] Based on the first reference signal of the slave inverter and a third cost function corresponding to the slave inverter, a second output signal is determined from the predicted current of the slave inverter, wherein the second output signal includes a target output current of the slave inverter.

[0175] Each module in the aforementioned microgrid on-grid and off-grid smooth switching control device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor within an electronic device in hardware form, or stored in a memory within the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0176] In an exemplary embodiment, an electronic device is provided, the internal structure of which can be as shown in FIG. Figure 7As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a microgrid and off-grid smooth switching control method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.

[0177] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0178] In an exemplary embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0180] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0181] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0182] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a programmable logic unit (PLC), a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, and the like.

[0183] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0184] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A microgrid on-grid and off-grid smooth switching control method, characterized in that: The method comprises: Generate a first reference signal for the main inverter based on an operating mode of the microgrid, wherein the first reference signal corresponds to the operating mode; the operating mode includes a grid-connected mode or an island mode; and generating a second reference signal for the slave inverter based on the power allocation strategy of the master inverter, wherein the second reference signal includes a reference current of the slave inverter in the operation mode; optimizing a first output signal of the master inverter based on a first reference signal of the master inverter and a first system predicted state and a cost function corresponding to the master inverter in the operating mode; The second output signal of the slave inverter is optimized based on a cost function corresponding to the slave inverter according to the second reference signal of the slave inverter and a second system predicted state.

2. The method according to claim 1, characterized in that The microgrid-based operation mode generates a first reference signal of a main inverter, including: When the operation mode of the microgrid is a grid-connected mode, generating a reference current of the main inverter based on a reference current of the grid; generating a reference voltage for the main inverter based on a measured voltage at a point of common coupling; The reference current and the reference voltage are determined as first reference signals of the master inverter in the grid-connected mode.

3. The method according to claim 1, characterized in that The microgrid-based operation mode generates a first reference signal of a main inverter, including: When the operation mode of the microgrid is an island mode, generating a reference voltage and a reference frequency of the main inverter based on droop control; The reference voltage and reference frequency are determined as a first reference signal of the master inverter in the island mode.

4. The method according to claim 1, wherein Generating a second reference signal of the slave inverter based on the power allocation strategy of the master inverter includes: When the operation mode of the microgrid is a grid-connected mode or an island mode, determining a reference current of the grid in the corresponding operation mode based on the power allocation strategy of the main inverter; generating a reference current of the slave inverter based on a reference current of the grid in a corresponding operation mode; The reference current of the slave inverter is determined as the second reference signal of the slave inverter in the corresponding operation mode.

5. The method according to claim 1, wherein Optimizing the first output signal of the master inverter based on the first reference signal of the master inverter and the first system predicted state and based on a cost function corresponding to the master inverter in the operating mode includes: Obtaining a predicted current and predicted voltage of the main inverter and a predicted voltage of the capacitor at a future time based on current system operation data; the current system operation data includes a current current and voltage of the main inverter, a current current and voltage of the capacitor, a current current of the grid, and filter parameters; When the operation mode of the microgrid is a grid-connected mode, determining a first output signal from a predicted current and a predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the grid-connected mode and a first cost function of the main inverter in the grid-connected mode, wherein the first output signal includes a target output current and a target output voltage of the main inverter; When the operating mode of the microgrid is the island mode, a first output signal is determined from the predicted voltage of the main inverter based on a first reference signal of the main inverter corresponding to the island mode and a second cost function of the main inverter in the island mode. The first output signal includes a target output voltage of the main inverter.

6. The method according to claim 5, characterized in that Optimizing the second output signal of the slave inverter based on the second reference signal of the slave inverter and the second system predicted state and based on a cost function corresponding to the slave inverter includes: Obtaining a predicted current of the slave inverter and a predicted voltage of the capacitor at a future time based on current system operation data, wherein the current system operation data includes the current current and voltage of the slave inverter, the current current and voltage of the capacitor, and filter parameters; Based on the first reference signal of the slave inverter and a third cost function corresponding to the slave inverter, a second output signal is determined from the predicted current of the slave inverter, wherein the second output signal includes a target output current of the slave inverter.

7. A microgrid on-grid and off-grid smooth switching control device, characterized in that: The device comprises: a reference signal generation module, configured to generate a first reference signal for a master inverter based on an operating mode of the microgrid, the first reference signal corresponding to the operating mode; the operating mode including a grid-connected mode or an island mode; and to generate a second reference signal for a slave inverter based on a power allocation strategy of the master inverter, the second reference signal including a reference current of the slave inverter in the operating mode; a first optimization module, configured to optimize a first output signal of the master inverter based on a first reference signal of the master inverter and a first system predicted state and a first cost function corresponding to the master inverter in the operation mode; The second optimization module is configured to optimize the second output signal of the slave inverter based on a second reference signal of the slave inverter and a second system predicted state and a second cost function corresponding to the slave inverter.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.