A safety-constrained model predictive control follow-the-leader-form-the-network to network-smooth switching method

By constructing an inverter equivalent circuit based on an LCL filter and a safety constraint model predictive control, combined with virtual synchronous generator technology, the problems of current surge and voltage fluctuation in inverter mode switching are solved, achieving seamless coordination and improved safety during inverter mode switching.

CN122118734APending Publication Date: 2026-05-29NORTHEASTERN UNIV CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-02-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, inverters suffer from slow dynamic response, complex parameter tuning, current surges and voltage fluctuations when switching between grid-connected and grid-connected modes, and lack a unified control framework for safety constraints and seamless switching.

Method used

An equivalent circuit of a three-phase two-level inverter based on an LCL filter is constructed. Combining safety-constrained model predictive control and virtual synchronous generator technology, smooth control of mode switching is achieved through phase-locked loop pre-synchronization. A unified multi-objective model predictive controller is constructed using control barrier functions and multi-objective optimization to perform prediction and optimization before mode switching.

Benefits of technology

It achieves seamless coordination of inverter mode switching, suppresses transient current surges and voltage fluctuations during switching, improves the dynamic performance and steady-state accuracy of the system, and ensures the safety and reliability of switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122118734A_ABST
    Figure CN122118734A_ABST
Patent Text Reader

Abstract

The application provides a follow-grid-construct-grid smooth switching method of a safety constraint model predictive control, and relates to the field of smart grid control. A unified multi-objective model predictive controller is designed to realize prediction of current and voltage reference values, and precise control in different modes is realized through an adaptive cost function. A control barrier function is introduced as a safety constraint to suppress switching transient impact. In combination with a virtual synchronous generator and a non-locked loop pre-synchronization technology, switching cooperativeness is ensured. The method can realize seamless smooth switching, improve system safety and stability, and is suitable for a distributed new energy power generation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid control, specifically to a method for smooth switching between grid-based and grid-connected systems using safety-constrained model predictive control. Background Technology

[0002] With the increasing penetration of renewable energy in power systems, the importance of microgrids and distributed generation systems is becoming increasingly prominent. As the interface between distributed energy resources and the main grid, the control performance of the grid-connected inverter directly affects the system's stability and power quality. Traditionally, inverters mainly operate in grid-following (GFL) mode, relying on phase-locked loops to track the grid voltage phase to inject power. However, under weak grid conditions or fault conditions, GFL control is prone to instability. Therefore, grid-connected dynamics (GFM) control technology has been proposed to provide voltage and frequency support to the system by simulating the characteristics of synchronous generators, thereby enhancing grid strength.

[0003] In actual operation, inverters often need to switch between GFL and GFM modes, for example, when disconnected from the grid due to a grid fault or reconnected after the grid is restored. Traditional switching strategies mostly use proportional-integral (PI) or proportional-resonant (PR) controllers, which have problems such as slow dynamic response, complex parameter tuning, and insufficient ability to handle multivariable coupling and nonlinear constraints. This can easily lead to current surges, voltage fluctuations, or even system instability during switching transients.

[0004] Model predictive control (MPC) has been widely applied in power electronics due to its superior multi-objective optimization and constraint handling capabilities. However, its direct application in inverter mode switching still faces challenges such as high computational load and insufficient consideration of safety constraints during switching transients. While some existing technologies utilize control barrier functions for safety constraints or employ virtual synchronous generators for pre-synchronization, a unified control framework that deeply integrates safety-constrained MPC with phase-locked loop (PLL)-free pre-synchronization is lacking to achieve smooth, seamless, and safe switching throughout the entire process. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to propose a method for smooth switching between network tracking and network construction using a safety-constrained model predictive control, comprising:

[0006] Construct an equivalent circuit for a three-phase two-level inverter based on an LCL filter, including the load, grid, three-phase inverter bridge, first inductor, second inductor, LCL filter, and damping resistor;

[0007] The state quantities of the equivalent circuit of the three-phase two-level inverter based on the LCL filter at time k in the three-phase coordinate system are collected, and the state quantities are transformed to obtain the state quantities in the stationary αβ coordinate system.

[0008] Discrete state equations are constructed based on the state variables in the stationary αβ coordinate system.

[0009] Obtain the mode switching instruction between the network and the network structure, and determine the mode flag L before the mode switch based on the mode switching instruction;

[0010] Calculate the αβ component of the second inductor current reference value corresponding to the mode flag L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ;

[0011] Obtain multiple switching states of the three-phase inverter bridge and calculate the αβ component of the three-phase inverter bridge output voltage corresponding to each switching state. ;

[0012] Based on discrete state equations and state quantities in a stationary αβ coordinate system, , , , and Calculate the initial cost of each switch state under the mode flag L;

[0013] Construct the control barrier function corresponding to the mode flag L, and calculate the final cost for each switching state based on the control barrier function;

[0014] Among all the final costs corresponding to the switching states, the switching state with the lowest final cost is selected as the optimal state and used as the driving command for the three-phase inverter bridge.

[0015] Optionally, in the equivalent circuit of a three-phase two-level inverter based on an LCL filter, the first and second terminals of the three-phase inverter bridge are connected to the two ends of the DC power supply, respectively. The first terminal of the three-phase inverter bridge is connected to the first terminal of the first inductor, the second terminal of the first inductor is connected to the first terminal of the second inductor, the second terminal of the first inductor is also connected to the first terminal of the LCL filter, the second terminal of the LCL filter is connected to the first terminal of the damping resistor, the second terminal of the damping resistor is connected to the second terminal of the three-phase inverter bridge, the second terminal of the second inductor is connected to the first terminal of the first switch, the second terminal of the first switch is connected to the first terminal of the load, the second terminal of the load is connected to the second terminal of the three-phase inverter bridge, the second terminal of the second inductor is also connected to the first terminal of the second switch, the second terminal of the second switch is connected to the first terminal of the power grid, and the second terminal of the power grid is connected to the second terminal of the three-phase inverter bridge.

[0016] Optionally, the state quantities in the stationary αβ coordinate system include the α-axis and β-axis components of the first inductor current at time k, the α-axis and β-axis components of the second inductor current at time k, the α-axis and β-axis components of the LCL filter capacitor voltage at time k, the α-axis and β-axis components of the load voltage at time k, and the α-axis and β-axis components of the grid voltage at time k.

[0017] Based on this, discrete state equations are constructed using the state variables in the stationary αβ coordinate system, including:

[0018] A continuous-time state-space model of the equivalent circuit of a three-phase two-level inverter based on an LCL filter is constructed. The continuous-time state-space model includes the inductor dynamic differential equation, the capacitor voltage equation, and the output-side inductor dynamic equation.

[0019] The inductor dynamic differential equation is expressed by the following formula:

[0020] ;

[0021] in, This is the inductance value of the first inductor; The current of the first inductor is a function of time; This is a time function of the output voltage of the three-phase inverter bridge. The time function of the capacitor voltage of the LCL filter; for Inductance and resistance;

[0022] The capacitor voltage equation is expressed by the following formula:

[0023] ;

[0024] in, The capacitor is for the LCL filter; The current of the second inductor is a function of time;

[0025] The dynamic equation of the output-side inductor is expressed by the following formula:

[0026] ;

[0027] in, This is the inductance value of the second inductor; It is a time function of the load voltage; for Inductance and resistance;

[0028] Based on the state variables in the stationary αβ coordinate system, the continuous-time state-space model is discretized to obtain the discrete state equations, which are expressed as:

[0029] ;

[0030] in, Let αβ be the α-β component of the first inductor current at time k. Let αβ be the capacitor voltage component of the LCL filter at time k. Let αβ be the α-β component of the second inductor current at time k; Let αβ be the output voltage component of the three-phase inverter bridge at time k. Let αβ be the load voltage component at time k; , , , It is a 3×3 identity matrix. Let A, B, and C be the sampling and control period (unit: μs), and let A, B, and C be parameter matrices, represented as follows:

[0031] .

[0032] Optionally, the αβ component of the second inductor current reference value corresponding to the calculation mode flag L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ,include:

[0033] When the mode flag L indicates that the network configuration mode was in place before the switch, the load voltage reference value is calculated based on the state variables in the stationary αβ coordinate system. ;

[0034] Calculate instantaneous active power With instantaneous reactive power Specifically, this is achieved through the following formula:

[0035] ;

[0036] ;

[0037] in, Let be the α-axis component of the load voltage at time k. Let be the β-axis component of the load voltage at time k. Let be the α-axis component of the second inductor current at time k. Let β be the β-axis component of the second inductor current at time k;

[0038] Based on the load voltage reference value Instantaneous active power With instantaneous reactive power Calculate the α-axis component of the second inductor current reference value in the network configuration mode. and β-axis components , and The αβ component that makes up the reference value of the second inductor current;

[0039] ;

[0040] in, The α-axis component represents the load voltage reference value. The β-axis component represents the load voltage reference value. and αβ component of the load voltage reference value The αβ component of the first voltage reference value is used as this. ;

[0041] based on , , and The α-axis component of the LCL filter capacitor voltage reference value in the network configuration mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the capacitor voltage of the LCL filter;

[0042] ;

[0043] in, The angular frequency of the power grid;

[0044] according to , , and The α-axis component of the first inductor current reference value in the network configuration mode is calculated using the following formula. and β-axis components , and Used as a reference value for the αβ component current that makes up the first inductor;

[0045] .

[0046] Optionally, the load voltage reference value is calculated based on the state variables in the stationary αβ coordinate system. ,include:

[0047] The droop characteristic between active power and frequency of the virtual synchronous generator VSG speed governor is obtained using the following formula:

[0048] ;

[0049] in, For mechanical power, For reference active power; The active power-frequency droop factor; Rated angular velocity; It is the mechanical angular velocity;

[0050] The equation of motion for the VSG rotor is obtained as follows:

[0051] ;

[0052] in, Let t represent the moment of inertia, and t represent time. Electromagnetic power, For damping torque, For the grid synchronization angular velocity, For rotor angle;

[0053] Substituting the formula for sag characteristics into the VSG rotor motion equation, let Substituting the following expression, we can then calculate the result. The value;

[0054] ;

[0055] Calculate the amplitude of the virtual internal potential Specifically, this is achieved through the following formula:

[0056] ;

[0057] ;

[0058] in, This is a reference value for reactive power. This is the reactive power-voltage droop factor. This is the reference amplitude of the load voltage. The magnitude of the load voltage. This is the reactive power setpoint. For actual output reactive power, This is the proportionality coefficient. Here, s is the integral gain, s is the Laplace operator, and E0 is the reference potential.

[0059] Calculate the sine value of the phase deviation and amplitude deviation Specifically, this is achieved through the following formula:

[0060] ;

[0061] ;

[0062] in, The phase of the grid voltage. For the load voltage phase, for and phase difference, Let k be the α-axis component of the grid voltage at time k. Let be the β-axis component of the grid voltage at time k. Let be the α-axis component of the load voltage at time k. Let be the β-axis component of the load voltage at time k. The voltage amplitude of the power grid. This refers to the load voltage amplitude.

[0063] Sine value based on phase deviation and amplitude deviation Calculate the VSG output phase reference value and the reference value of VSG output amplitude after introducing pre-synchronization control Specifically, this is achieved through the following formula:

[0064] ;

[0065] ;

[0066] in, This represents the proportional parameter of the phase pre-synchronization PI controller. This represents the integral parameter of the phase pre-synchronization PI controller. This indicates the output of the phase pre-synchronization PI controller. This represents the reference value of the VSG output angular frequency after the introduction of pre-synchronization control. This represents the proportional parameter of the amplitude pre-synchronization PI controller. This represents the integral parameter of the amplitude pre-synchronization PI controller. This indicates the output of the amplitude pre-synchronization PI controller;

[0067] based on and Calculate the load voltage reference value Specifically, this is achieved through the following formula:

[0068] ;

[0069] in, , , These represent the components of the load voltage at time k along the a-axis, b-axis, and c-axis, respectively.

[0070] Optionally, calculate the αβ component of the second inductor current reference value corresponding to the mode flag L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ,include:

[0071] If the mode flag L indicates that the grid mode was in the initial state before the switch, the grid voltage at time k is used as the reference. Preset active power and reactive power The α-axis component of the second inductor current reference value in grid-following mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the second inductor current;

[0072] ;

[0073] in, The α-axis component represents the grid voltage. Represents the β-axis component of the grid voltage;

[0074] Obtain the reference value of the power grid voltage According to the grid voltage reference value , and The α-axis component of the LCL filter capacitor voltage reference value in grid mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the capacitor voltage of the LCL filter;

[0075] ;

[0076] in, The angular frequency of the power grid. The α-axis component of the grid voltage reference value. The β-axis component of the grid voltage reference value. and The αβ component that makes up the grid voltage reference value is taken as the αβ component of the first voltage reference value;

[0077] according to , , and The α-axis component of the first inductor current reference value in grid-following mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the first inductor current reference value;

[0078] .

[0079] Optionally, each switching state of the three-phase inverter bridge includes the A-phase bridge arm switching state. B-phase bridge arm switch status and C-phase bridge arm switch status , ;

[0080] Based on this, the αβ component of the three-phase inverter bridge output voltage corresponding to each switching state is calculated. ,include:

[0081] For each switch state, based on , and Using the following formula, generate the α-axis component of the three-phase inverter bridge output voltage for each switching state. and β-axis components , and The αβ components that make up the output voltage of a three-phase inverter bridge ;

[0082] .

[0083] Optionally, based on discrete state equations, state quantities in a stationary αβ coordinate system, , , , and Calculate the initial cost of each switch state under the mode flag L, including:

[0084] based on , , and Calculate the αβ component of the reference value of the second inductor current at time k+2. The αβ component of the first inductor current reference value at time k+2 and the αβ component of the first voltage reference value at time k+2 Specifically, this is achieved through the following formula:

[0085] ;

[0086] in, For sampling and control cycles;

[0087] For each switch state, the corresponding switch state will be... As Substituting these values ​​into the discrete state equations, and simultaneously substituting the state variables in the stationary αβ coordinate system into the discrete state equations, we obtain the αβ component of the first inductor current at time k+1. The αβ component of the second inductor current at time k+1 and the αβ component of the LCL filter capacitor voltage at time k+1 ;

[0088] based on and The α-axis component of the load voltage at time k+1 is calculated using the following formula. and β-axis components , and The αβ component of the load voltage at time k+1 ;

[0089] ;

[0090] in, Let be the α-axis component of the LCL filter capacitor voltage at time k. Let be the β-axis component of the LCL filter capacitor voltage at time k. Let α be the α-axis component of the first inductor current at time k+1. Let β be the β-axis component of the first inductor current at time k+1;

[0091] Let k+1 in the discrete state equation represent the switch state. As Substitute into the discrete state equations, and simultaneously , , and Substituting into the discrete state equation, we obtain the αβ component of the first inductor current at time k+2. The αβ component of the second inductor current at time k+2 and the αβ component of the LCL filter capacitor voltage at time k+2 Then, the α-axis component of the load voltage reference value at time k+2 is calculated. and the β-axis component of the load voltage reference value at time k+2 ;

[0092] Calculate the cost item for output current tracking error. Input current tracking error cost item and output voltage tracking error cost item Specifically, this is achieved through the following formula:

[0093] ;

[0094] in, The α-axis component of the reference value of the second inductor current at time k+2. The β-axis component of the reference value of the second inductor current at time k+2. and composition ; The α-axis component of the first inductor current reference value at time k+2. The β-axis component of the first inductor current reference value at time k+2. and composition ; The α-axis component of the first voltage reference value at time k+2. The α-axis component of the first voltage reference value at time k+2. and composition ;

[0095] Cost item for output current tracking error Input current tracking error cost item and output voltage tracking error cost item We obtain the initial cost by weighted summation. Specifically, this is achieved through the following formula:

[0096] ;

[0097] in, , , These are the weighting coefficients.

[0098] Optionally, if the mode flag L indicates that the network construction mode was in progress before the switch, the control obstacle function corresponding to the mode flag L is the network construction mode obstacle function. , represented as:

[0099] ;

[0100] in, The preset maximum allowable load voltage value. Let α and β be the load voltage components at time k;

[0101] When the mode flag L indicates that the network was in follow mode before the switch, the control barrier function corresponding to the mode flag L is the network-follow mode barrier function. , represented as:

[0102] ;

[0103] in, The preset maximum allowable value for the second inductor current. Let α and β be the α-axis and β-axis components of the second inductor current at time k.

[0104] Optionally, based on the control barrier function, the final cost for each switching state is calculated, including:

[0105] Calculate slack variables based on the control barrier function. Specifically, this is achieved through the following formula:

[0106] ;

[0107] in, The attenuation coefficient is... It is a constant. Let L be the control barrier function corresponding to the mode flag bit L at time k. The control barrier function corresponding to the mode flag L at time k+1;

[0108] Determine slack variables Is it greater than 0? If so, then slack variable. If it remains unchanged, then the slack variable will be changed. Set to 0;

[0109] Based on slack variables Calculate the final cost Specifically, this is achieved through the following formula:

[0110] ;

[0111] in, Penalize the weights for slack variables.

[0112] The beneficial effects of adopting the above technical solution are as follows:

[0113] 1. Construct a unified multi-objective model predictive controller to predict reference values ​​of current and voltage, realize unified control of grid-following and grid-connecting modes, avoid the complexity of traditional controller switching, and improve the dynamic performance and steady-state accuracy of the system.

[0114] 2. By introducing a control barrier function as a safety constraint, current surges and voltage fluctuations during the switching transient process are effectively suppressed, ensuring switching safety;

[0115] 3. By combining phase-locked loop pre-synchronization technology with VSG technology, the phase and amplitude deviation between the inverter output and the grid voltage is reduced, achieving seamless coordination of mode switching;

[0116] 4. A two-step prediction delay compensation method is adopted to solve the tracking accuracy problem caused by control delay and improve control accuracy. Attached Figure Description

[0117] Figure 1 This is a flowchart illustrating a method for smooth switching between network-based and network-based systems in a safety constraint model predictive control embodiment of the present invention.

[0118] Figure 2 This is a flowchart illustrating another method for smooth switching between network-network structure in a safety constraint model predictive control embodiment of the present invention.

[0119] Figure 3 This is a circuit diagram of the equivalent circuit of the three-phase two-level inverter based on the LCL filter in an embodiment of the present invention.

[0120] Figure 4 The amplitude-frequency response curve of the transfer function of the LCL filter in this embodiment of the invention;

[0121] Figure 5 This is a phasor diagram of the load voltage and grid voltage in an embodiment of the present invention;

[0122] Figure 6 This is a current tracking diagram after predictive control delay compensation in an embodiment of the present invention. Detailed Implementation

[0123] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0124] To address the problems existing in the prior art, this invention aims to solve the problems of current surges, voltage fluctuations, slow dynamic response, and insufficient stability during the switching process of existing inverter grid-connected and grid-connected modes. It provides a grid-connected-grid-connected smooth switching method based on safety constraint model predictive control, which achieves seamless and smooth switching between the two modes and improves system safety and reliability.

[0125] Specifically, this invention provides a method for smooth switching between network-to-network construction in safety-constrained model predictive control, combined with... Figure 1 and Figure 2 This may include the following steps:

[0126] Step 1: Construct the equivalent circuit of a three-phase two-level inverter based on an LCL filter, including the load, grid, three-phase inverter bridge, first inductor, second inductor, LCL filter and damping resistor. Its main function is to suppress high-frequency switching harmonics and improve the grid-connected current quality.

[0127] The three-phase inverter bridge, the first inductor, the second inductor, the LCL filter, and the damping resistor constitute the inverter.

[0128] Combination Figure 3 The circuit diagram shows that the first and second terminals of the three-phase inverter bridge are connected to the two ends of the DC power supply, respectively. The first terminal of the three-phase inverter bridge is connected to the first terminal of the first inductor. The second terminal of the first inductor is connected to the first terminal of the second inductor. The second terminal of the first inductor is also connected to the first terminal of the LCL filter. The second terminal of the LCL filter is connected to the first terminal of the damping resistor. The second terminal of the damping resistor is connected to the second terminal of the three-phase inverter bridge. The second terminal of the second inductor is connected to the first terminal of the first switch. The second terminal of the first switch is connected to the first terminal of the load. The second terminal of the load is connected to the second terminal of the three-phase inverter bridge. The second terminal of the second inductor is also connected to the first terminal of the second switch. The second terminal of the second switch is connected to the first terminal of the power grid. The second terminal of the power grid is connected to the second terminal of the three-phase inverter bridge.

[0129] Step 2: Acquire the state variables (i.e., ...) of the three-phase two-level inverter equivalent circuit based on LCL filter in the three-phase coordinate system at time k. Figure 2 (system state variables in the data).

[0130] To reduce computational complexity, the Clarke transformation is used to transform the measured three-phase current and voltage (abc coordinate system) to the stationary αβ coordinate system, realizing the mapping of control variables from three-dimensional space to two-dimensional space. Thus, the state variables are transformed by coordinate transformation to obtain the state variables in the stationary αβ coordinate system.

[0131] The state quantities in the stationary αβ coordinate system include the α-axis and β-axis components of the first inductor current at time k, the α-axis and β-axis components of the second inductor current at time k, the α-axis and β-axis components of the LCL filter capacitor voltage at time k, the α-axis and β-axis components of the load voltage at time k, and the α-axis and β-axis components of the grid voltage at time k.

[0132] In this invention, after acquiring the state variables in a three-phase coordinate system, a first-order low-pass filter is also used to suppress noise.

[0133]

[0134] in, In the state variables, The filtered state variables, This refers to the filtered state variables from the previous control cycle. For filter coefficients ( ).

[0135] Step 3: Construct discrete state equations based on the state variables in the stationary αβ coordinate system;

[0136] Based on Kirchhoff's voltage and current laws, a continuous-time state-space model of the equivalent circuit of a three-phase two-level inverter based on an LCL filter is constructed. The continuous-time state-space model includes the inductor dynamic differential equation, the capacitor voltage equation, and the output-side inductor dynamic equation.

[0137] The inductor dynamic differential equation is expressed by the following formula:

[0138] ;

[0139] in, This is the inductance value of the first inductor, in mH. The current of the first inductor is a time function (unit: A); This is a time function of the output voltage of the three-phase inverter bridge, in V; This is a time function of the capacitor voltage of the LCL filter, in units of V; for The inductance and resistance are expressed in Ω.

[0140] The capacitor voltage equation is expressed by the following formula:

[0141] ;

[0142] in, The capacitance of the LCL filter is expressed in μF. This is a time function of the second inductor current, in A;

[0143] The dynamic equation of the output-side inductor is expressed by the following formula:

[0144] ;

[0145] in, This is the inductance value of the second inductor, in mH. This is a time function of the load voltage, in units of V; for The inductance and resistance are expressed in Ω.

[0146] Based on the state variables in the stationary αβ coordinate system, the continuous-time state-space model is discretized using the Duhamel integral method, resulting in the discrete state equations, expressed as:

[0147] ;

[0148] in, Let αβ be the α-β component of the first inductor current at time k. Let αβ be the capacitor voltage component of the LCL filter at time k. Let αβ be the α-β component of the second inductor current at time k; Let αβ be the output voltage component of the three-phase inverter bridge at time k. Let αβ be the load voltage component at time k; , , , It is a 3×3 identity matrix. Let A, B, and C be the sampling and control period (unit: μs), and let A, B, and C be parameter matrices, represented as follows:

[0149] ;

[0150] It should be noted that when designing and constructing the equivalent circuit of the three-phase two-level inverter based on the LCL filter in this invention, the equivalent circuit initially did not include a damping resistor. At this point, the transfer function of the LCL filter was constructed. , represented as:

[0151] ;

[0152] Where i2(s) is current s-domain function Let be an s-domain function of the load voltage (unit: V), where s denotes the Laplace operator. This is the resonant angular frequency of the LCL filter. The expression is:

[0153] ;

[0154] The Bode plot drawn based on the above transfer function is as follows: Figure 4 As shown, an inherent resonant spike exists in the Bode plot, with a -180° phase jump at the resonant frequency, resulting in a closed-loop pole in the right half-plane and affecting the inverter control stability. To suppress the resonant spike, a passive damping method is used, with a damping resistor connected in series in the capacitor branch. The transfer function at this point is:

[0155] ;

[0156] Damping resistor The values ​​of satisfy:

[0157] ;

[0158] in, This is the damping resistance, measured in Ω.

[0159] Step 4: Obtain the mode switching instruction between the network and the network structure, and determine the mode flag L before the mode switch based on the mode switching instruction;

[0160] Among them, the mode flag L=0 indicates that the network construction mode was used before the mode switch, and L=1 indicates that the network following mode was used before the mode switch.

[0161] This invention integrates Safety-Constrained Finite Set Model Predictive Control (FCS-MPC) with grid-based / grid-following control strategies. The MPC module acquires real-time signals such as inverter output voltage, capacitor voltage, grid voltage, output current, and input current, transforms them to the αβ coordinate system using Clarke transform, and the predictive control algorithm calculates future time points. Based on the voltage and current reference values, eight sets of candidate output voltage vectors are generated. After evaluation and sorting by the cost function, the switching state corresponding to the optimal voltage vector is selected and applied to the main power switching device of the inverter.

[0162] This invention designs an adaptive multi-objective cost function to achieve unified control in both network following and network construction modes:

[0163] ;

[0164] in, , , These are weighting coefficients used to balance the priorities of various objectives; For the cost item of output current tracking error, The cost item is the input current tracking error. This is the cost item for output voltage tracking error.

[0165] The cost items are as follows: Output current tracking error cost item:

[0166] ;

[0167] in, This is the reference value for the second inductor current at time k+1. The current of the second inductor at time k+1;

[0168] Input current tracking error cost item:

[0169]

[0170] in, This is the reference value of the first inductor current at time k+1. Let be the first inductor current at time k+1.

[0171] Output voltage tracking error cost item:

[0172]

[0173] in, The first voltage reference value at time k+1 (network configuration is v) o,ref(k+1) (Voltage reference value of VSG control output at time k+1). The first voltage at time k+1 (both in grid construction and grid following modes) (The inverter output port voltage at time k+1).

[0174] Based on the cost function designed above, the present invention designs a unified multi-objective model prediction controller in steps 5 to 7 and calculates the initial cost function.

[0175] Step 5: Calculate the αβ component of the second inductor current reference value corresponding to the mode flag bit L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ;

[0176] When the mode flag L indicates that the network configuration mode was in place before the switch, the load voltage reference value is calculated based on the state variables in the stationary αβ coordinate system. ;

[0177] This invention combines Virtual Synchronous Generator (VSG) technology with Phase-Locked Loop (PLL)-free pre-synchronization technology to achieve coordinated control throughout the entire mode switching process. The VSG enhances the dynamic performance of the system during grid-connected and islanded operation by simulating the inertia and damping characteristics of a synchronous generator; the PLL-free pre-synchronization technology significantly reduces the phase and frequency differences between the inverter output and the grid voltage, thus mitigating transient impacts during switching.

[0178] Specifically, the droop characteristic between the active power and frequency of the virtual synchronous generator VSG speed governor is obtained, and is expressed by the following formula:

[0179] ;

[0180] in, Mechanical power (unit: kW) For reference active power, the unit is kW; The active power-frequency droop factor; The rated angular velocity is expressed in rad / s. Mechanical angular velocity (unit: rad / s);

[0181] The equation of motion for the VSG rotor is obtained as follows:

[0182] ;

[0183] in, Let t represent the moment of inertia (unit: kg·m²), and t represent time. Electromagnetic power (unit: kW). The damping torque is expressed in N·m. The angular velocity of the power grid synchronization (unit: rad / s). Rotor angle (unit: rad);

[0184] Substituting the formula for sag characteristics into the VSG rotor motion equation, let Substituting the following expression, we can then calculate the result. The value;

[0185] ;

[0186] Calculate the amplitude of the virtual internal potential Specifically, this is achieved through the following formula:

[0187] ;

[0188] ;

[0189] in, This is a reference value for reactive power (unit: kVar). This is the reactive power-voltage droop factor. This is the reference amplitude of the load voltage (unit: V). The magnitude of the load voltage (unit: V). This is the reactive power setpoint (unit: kVar). This represents the actual output reactive power (unit: kVar). This is the proportionality coefficient. Here, s is the integral gain, s is the Laplace operator, and E0 is the reference potential.

[0190] Phase-locked loop (PLL)-free pre-synchronization technology achieves synchronization by calculating phase and amplitude deviations. The vector diagram of the inverter output voltage versus the grid voltage is shown below. Figure 5 As shown. Figure 5 As shown, and These are the grid voltage and the inverter output voltage, respectively. and These are the components of the grid voltage on the α and β axes; and These are the components of the inverter output voltage on the α and β axes; , and These refer to the grid voltage phase, the inverter output voltage phase, and the phase difference between them. Generally, the phase angle difference... Smaller, meets the requirements .

[0191] Calculate the sine value of the phase deviation and amplitude deviation Specifically, this is achieved through the following formula:

[0192] ;

[0193] ;

[0194] in, The phase of the grid voltage. For the load voltage phase, for and phase difference, Let k be the α-axis component of the grid voltage at time k. Let be the β-axis component of the grid voltage at time k. Let be the α-axis component of the load voltage at time k. Let be the β-axis component of the load voltage at time k. The voltage amplitude of the power grid. This refers to the load voltage amplitude.

[0195] The pre-synchronization control process without a phase-locked loop is as follows: First, the grid voltage and load voltage are transformed using the Clarke transform to obtain the components in the αβ coordinate system. Then, the phase deviation is calculated by substituting these components into the formula above. and amplitude deviation .

[0196] Sine value based on phase deviation and amplitude deviation Calculate the VSG output phase reference value and the reference value of VSG output amplitude after introducing pre-synchronization control Specifically, this is achieved through the following formula:

[0197] ;

[0198] ;

[0199] in, This represents the proportional parameter of the phase pre-synchronization PI controller. This represents the integral parameter of the phase pre-synchronization PI controller. This indicates the output of the phase pre-synchronization PI controller. This represents the reference value of the VSG output angular frequency after the introduction of pre-synchronization control. This represents the proportional parameter of the amplitude pre-synchronization PI controller. This represents the integral parameter of the amplitude pre-synchronization PI controller. This indicates the output of the amplitude pre-synchronization PI controller;

[0200] based on and Calculate the load voltage reference value Specifically, this is achieved through the following formula:

[0201] ;

[0202] in, , , These represent the components of the load voltage at time k along the a-axis, b-axis, and c-axis, respectively.

[0203] Calculate instantaneous active power With instantaneous reactive power The units are kW and kVar, and the specific implementation is achieved through the following formula:

[0204] ;

[0205] ;

[0206] in, Let be the α-axis component of the load voltage at time k. Let be the β-axis component of the load voltage at time k. Let be the α-axis component of the second inductor current at time k. Let β be the β-axis component of the second inductor current at time k;

[0207] Based on the load voltage reference value Instantaneous active power With instantaneous reactive power Calculate the α-axis component of the second inductor current reference value in the network configuration mode. and β-axis components , and The αβ component that makes up the reference value of the second inductor current;

[0208] ;

[0209] in, The α-axis component represents the load voltage reference value. The β-axis component represents the load voltage reference value. and αβ component of the load voltage reference value The αβ component of the first voltage reference value is used as this. ;

[0210] based on , , and The α-axis component of the LCL filter capacitor voltage reference value in the network configuration mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the capacitor voltage of the LCL filter;

[0211] ;

[0212] in, This is the angular frequency of the power grid, measured in rad / s.

[0213] according to , , and The α-axis component of the first inductor current reference value in the network configuration mode is calculated using the following formula. and β-axis components , and Used as a reference value for the αβ component current that makes up the first inductor;

[0214] ;

[0215] If the mode flag L indicates that the grid mode was in the initial state before the switch, the grid voltage at time k is used as the reference. Preset active power and reactive power The units are kW and kVar. The α-axis component of the second inductor current reference value in grid-connected mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the second inductor current;

[0216] ;

[0217] in, The α-axis component represents the grid voltage. Represents the β-axis component of the grid voltage;

[0218] Obtain the reference value of the power grid voltage According to the grid voltage reference value , and The α-axis component of the LCL filter capacitor voltage reference value in grid mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the capacitor voltage of the LCL filter;

[0219] ;

[0220] in, The angular frequency of the power grid. The α-axis component of the grid voltage reference value. The β-axis component of the grid voltage reference value. and The αβ component that makes up the grid voltage reference value is taken as the αβ component of the first voltage reference value;

[0221] according to , , and The α-axis component of the first inductor current reference value in grid-following mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the first inductor current reference value;

[0222] ;

[0223] Step 6: Obtain various switching states of the three-phase inverter bridge. In this invention, there are 8 switching states (6 effective vectors + 2 zero vectors). Calculate the αβ components of the three-phase inverter bridge output voltage corresponding to each switching state. ;

[0224] Specifically, it acquires multiple switching states of the three-phase inverter bridge, with each switching state including the A-phase bridge arm switching state. B-phase bridge arm switch status and C-phase bridge arm switch status , For each switch state, based on , and Using the following formula, generate the α-axis component of the three-phase inverter bridge output voltage for each switching state. and β-axis components , and The αβ components that make up the output voltage of a three-phase inverter bridge ;

[0225] ;

[0226] in, Indicates the voltage of the DC power supply;

[0227] Step 7: Based on the discrete state equations and the state quantities in the stationary αβ coordinate system, , , , and Calculate the initial cost of each switch state under the mode flag L;

[0228] based on , , and Calculate the αβ component of the reference value of the second inductor current at time k+2. The αβ component of the first inductor current reference value at time k+2 and the αβ component of the first voltage reference value at time k+2 Specifically, this is achieved through the following formula:

[0229] ;

[0230] in, For sampling and control cycles;

[0231] In practical control systems, computational delays exist in the calculation and processing, making it difficult for the system to accurately track data. The reference value at time k causes a deviation in current i(t) tracking under actual conditions. To compensate for the control delay, a two-step prediction strategy is adopted: using the parameters at time k to predict the parameters at time k+1, and using the parameters at time k+1 to predict the parameters at time 2. The prediction results are as follows. Figure 6 As shown, the tracking accuracy is significantly improved after time delay compensation.

[0232] For each switch state, the corresponding switch state will be... As Substituting these values ​​into the discrete state equations, and simultaneously substituting the state variables in the stationary αβ coordinate system into the discrete state equations, we obtain the αβ component of the first inductor current at time k+1. The αβ component of the second inductor current at time k+1 and the αβ component of the LCL filter capacitor voltage at time k+1 ;

[0233] based on and The α-axis component of the load voltage at time k+1 is calculated using the following formula. and β-axis components , and The αβ component of the load voltage at time k+1 ;

[0234] ;

[0235] in, Let be the α-axis component of the LCL filter capacitor voltage at time k. Let be the β-axis component of the LCL filter capacitor voltage at time k. Let α be the α-axis component of the first inductor current at time k+1. Let β be the β-axis component of the first inductor current at time k+1;

[0236] Let k+1 in the discrete state equation represent the switch state. As Substitute into the discrete state equations, and simultaneously , , and Substituting into the discrete state equation, we obtain the αβ component of the first inductor current at time k+2. The αβ component of the second inductor current at time k+2 and the αβ component of the LCL filter capacitor voltage at time k+2 Then, the α-axis component of the load voltage reference value at time k+2 is calculated. and the β-axis component of the load voltage reference value at time k+2 ;

[0237] Calculate the cost item for output current tracking error. Input current tracking error cost item and output voltage tracking error cost item Specifically, this is achieved through the following formula:

[0238] ;

[0239] in, The α-axis component of the reference value of the second inductor current at time k+2. The β-axis component of the reference value of the second inductor current at time k+2. and composition ; The α-axis component of the first inductor current reference value at time k+2. The β-axis component of the first inductor current reference value at time k+2. and composition ; The α-axis component of the first voltage reference value at time k+2. The α-axis component of the first voltage reference value at time k+2. and composition ;

[0240] Cost item for output current tracking error Input current tracking error cost item and output voltage tracking error cost item The initial cost is obtained by weighted summation, specifically through the following formula:

[0241] ;

[0242] in, , , These are the weighting coefficients;

[0243] Step 8: Construct the control barrier function corresponding to the mode flag L, and calculate the final cost for each switching state based on the control barrier function;

[0244] A control barrier function (CBF) is introduced as a safety constraint, combined with Lyapunov stability theory, to ensure that the system state always meets safety constraints (such as overcurrent and overvoltage). The role of the CBF is to ensure the safety and smooth transition of the system state during the switching process after the switching decision is completed: when switching from grid construction to grid connection, the constraint changes from stabilizing the output voltage to limiting the output current; when switching from grid connection to grid construction, the constraint changes from limiting the output current to stabilizing the output voltage.

[0245] When the mode flag L indicates that the network construction mode was in operation before the switch, the control obstacle function corresponding to the mode flag L is the network construction mode obstacle function. , represented as:

[0246] ;

[0247] in, The preset maximum allowable load voltage value. Let α and β be the load voltage components at time k;

[0248] When the mode flag L indicates that the network was in follow mode before the switch, the control barrier function corresponding to the mode flag L is the network-follow mode barrier function. , represented as:

[0249] ;

[0250] in, The preset maximum allowable value for the second inductor current. Let α and β be the components of the second inductor current at time k.

[0251] The continuous-time differential inequality corresponding to the control barrier function is:

[0252] ;

[0253] in, The attenuation coefficient is... As slack variables, A sufficiently large constant (using the Big-M method to implement logic activation). For pattern flags ( For network construction mode, (For network mode).

[0254] Since model predictive control operates in discrete time, the forward Euler method is used to convert continuous-time differential inequalities into discrete-time constraints:

[0255] ;

[0256] Within the optimization framework of embedded model predictive control, a cost function with safety constraints is formed:

[0257] ;

[0258] in, The penalty weights for slack variables are used to adjust the priority of safety constraints.

[0259] Based on this, the present invention calculates slack variables based on the control barrier function. Specifically, this is achieved through the following formula:

[0260] ;

[0261] in, The attenuation coefficient is... It is a constant. Let L be the control barrier function corresponding to the mode flag bit L at time k. The control barrier function corresponding to the mode flag L at time k+1;

[0262] Determine slack variables Is it greater than 0? If so, then slack variable. If it remains unchanged, then the slack variable will be changed. Set to 0;

[0263] Based on slack variables Calculate the final cost Specifically, this is achieved through the following formula:

[0264] ;

[0265] in, Penalize the weights of slack variables;

[0266] In this invention , , , , , , , , , For circuit parameters, , , , , , , These are control parameters.

[0267] Step 9: Among the final costs corresponding to all switching states, select the switching state with the minimum final cost as the optimal state (i.e., ...). Figure 2 The optimal control quantity in the process is used as the drive command for the three-phase inverter bridge.

[0268] Furthermore, this invention employs the Lyapunov stability criterion to verify the stability of the control strategy and defines system state variables. , :

[0269] ;

[0270] ;

[0271] in, The α-axis component of the second inductor current reference value. This represents the α-axis component of the second inductor current; The β-axis component of the second inductor current reference value. This represents the β-axis component of the second inductor current. The α-axis component of the first voltage reference value. This represents the α-axis component of the first voltage; The β-axis component of the first voltage reference value. This is the β-axis component of the first voltage.

[0272] Choosing Lyapunov functions Used to characterize the energy properties and dynamic behavior of a system:

[0273] ;

[0274] Verification of Lyapunov stability conditions:

[0275] (1) If and only if , (That is, both voltage deviation and current deviation are 0);

[0276] (2) For all They all (Positive definiteness).

[0277] The key to stability analysis lies in evaluating the time derivative of the Lyapunov function. :

[0278] ;

[0279] Substituting the inverter state equations (inverter-side inductor dynamic differential equation, capacitor voltage equation, and output-side inductor dynamic equation) into the above formula, the simplified calculation yields:

[0280] ;

[0281] ;

[0282] The result satisfies the semi-negative definite condition, indicating that the system error energy is a conserved quantity. Combined with the positive definiteness of the Lyapunov function, it can be determined that the control system is stable in the Lyapunov sense.

[0283] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for smooth switching between network tracking and network construction in safety-constrained model predictive control, characterized in that, include: Construct an equivalent circuit for a three-phase two-level inverter based on an LCL filter, including the load, grid, three-phase inverter bridge, first inductor, second inductor, LCL filter, and damping resistor; The state quantities of the equivalent circuit of the three-phase two-level inverter based on the LCL filter at time k in the three-phase coordinate system are collected, and the state quantities are transformed to obtain the state quantities in the stationary αβ coordinate system. Discrete state equations are constructed based on the state variables in the stationary αβ coordinate system. Obtain the mode switching instruction between the network and the network structure, and determine the mode flag L before the mode switch based on the mode switching instruction; Calculate the αβ component of the second inductor current reference value corresponding to the mode flag L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ; Obtain multiple switching states of the three-phase inverter bridge and calculate the αβ component of the three-phase inverter bridge output voltage corresponding to each switching state. ; Based on discrete state equations and state quantities in a stationary αβ coordinate system, , , , and Calculate the initial cost of each switch state under the mode flag L; Construct the control barrier function corresponding to the mode flag L, and calculate the final cost for each switching state based on the control barrier function; Among all the final costs corresponding to the switching states, the switching state with the lowest final cost is selected as the optimal state and used as the driving command for the three-phase inverter bridge.

2. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, In the equivalent circuit of a three-phase two-level inverter based on an LCL filter, the first and second terminals of the three-phase inverter bridge are connected to the two ends of the DC power supply, respectively. The first terminal of the three-phase inverter bridge is connected to the first terminal of the first inductor. The second terminal of the first inductor is connected to the first terminal of the second inductor. The second terminal of the first inductor is also connected to the first terminal of the LCL filter. The second terminal of the LCL filter is connected to the first terminal of the damping resistor. The second terminal of the damping resistor is connected to the second terminal of the three-phase inverter bridge. The second terminal of the second inductor is connected to the first terminal of the first switch. The second terminal of the first switch is connected to the first terminal of the load. The second terminal of the load is connected to the second terminal of the three-phase inverter bridge. The second terminal of the second inductor is also connected to the first terminal of the second switch. The second terminal of the second switch is connected to the first terminal of the power grid. The second terminal of the power grid is connected to the second terminal of the three-phase inverter bridge.

3. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, The state quantities in the stationary αβ coordinate system include the α-axis and β-axis components of the first inductor current at time k, the α-axis and β-axis components of the second inductor current at time k, the α-axis and β-axis components of the LCL filter capacitor voltage at time k, the α-axis and β-axis components of the load voltage at time k, and the α-axis and β-axis components of the grid voltage at time k. Based on this, discrete state equations are constructed using the state variables in the stationary αβ coordinate system, including: A continuous-time state-space model of the equivalent circuit of a three-phase two-level inverter based on an LCL filter is constructed. The continuous-time state-space model includes the inductor dynamic differential equation, the capacitor voltage equation, and the output-side inductor dynamic equation. The inductor dynamic differential equation is expressed by the following formula: ; in, This is the inductance value of the first inductor; The current of the first inductor is a function of time; This is a time function of the output voltage of the three-phase inverter bridge. The voltage across the LCL filter capacitor is a time function; for Inductance and resistance; The capacitor voltage equation is expressed by the following formula: ; in, The capacitor is for the LCL filter; The current of the second inductor is a function of time; The dynamic equation of the output-side inductor is expressed by the following formula: ; in, This is the inductance value of the second inductor; It is a time function of the load voltage; for Inductance and resistance; Based on the state variables in the stationary αβ coordinate system, the continuous-time state-space model is discretized to obtain the discrete state equations, which are expressed as: ; in, Let αβ be the α-β component of the first inductor current at time k. Let αβ be the α-β component of the LCL filter capacitor voltage at time k. Let αβ be the α-β component of the second inductor current at time k; Let αβ be the output voltage component of the three-phase inverter bridge at time k. Let αβ be the load voltage component at time k; , , , It is a 3×3 identity matrix. Let A, B, and C be the sampling and control period (unit: μs), and let A, B, and C be parameter matrices, represented as follows: 。 4. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, The αβ component of the second inductor current reference value corresponding to the calculation mode flag L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ,include: When the mode flag L indicates that the network configuration mode was in place before the switch, the load voltage reference value is calculated based on the state variables in the stationary αβ coordinate system. ; Calculate instantaneous active power With instantaneous reactive power Specifically, this is achieved through the following formula: ; ; in, Let be the α-axis component of the load voltage at time k. Let be the β-axis component of the load voltage at time k. Let α be the α-axis component of the second inductor current at time k. Let β be the β-axis component of the second inductor current at time k; Based on the load voltage reference value Instantaneous active power With instantaneous reactive power Calculate the α-axis component of the second inductor current reference value in the network configuration mode. and β-axis components , and The αβ component that makes up the reference value of the second inductor current; ; in, The α-axis component represents the load voltage reference value. The β-axis component represents the load voltage reference value. and αβ component of the load voltage reference value The αβ component of the first voltage reference value is used as this. ; based on , , and The α-axis component of the LCL filter capacitor voltage reference value in the network configuration mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the capacitor voltage of the LCL filter; ; in, The angular frequency of the power grid; according to , , and The α-axis component of the first inductor current reference value in the network configuration mode is calculated using the following formula. and β-axis components , and Used as a reference value for the αβ component current that makes up the first inductor; 。 5. The method for smooth switching between network-building and network-following in safety-constrained model predictive control according to claim 4, characterized in that, Calculate the load voltage reference value based on the state variables in the stationary αβ coordinate system. ,include: The droop characteristic between active power and frequency of the virtual synchronous generator VSG speed governor is obtained using the following formula: ; in, For mechanical power, For reference active power; The active power-frequency droop factor; Rated angular velocity; It is the mechanical angular velocity; The equation of motion for the VSG rotor is obtained as follows: ; in, Let t represent the moment of inertia, and t represent time. Electromagnetic power, For damping torque, For the grid synchronization angular velocity, For rotor angle; Substituting the formula for sag characteristics into the VSG rotor motion equation, let Substituting the following expression, we can then calculate the result. The value; ; Calculate the amplitude of the virtual internal potential Specifically, this is achieved through the following formula: ; ; in, This is a reference value for reactive power. This is the reactive power-voltage droop factor. This is the reference amplitude of the load voltage. The magnitude of the load voltage. This is the reactive power setpoint. This refers to the actual output reactive power. This is the proportionality coefficient. Here, s is the integral gain, s is the Laplace operator, and E0 is the reference potential. Calculate the sine value of the phase deviation and amplitude deviation Specifically, this is achieved through the following formula: ; ; in, The phase of the grid voltage. For the load voltage phase, for and phase difference, Let be the α-axis component of the grid voltage at time k. Let be the β-axis component of the grid voltage at time k. Let be the α-axis component of the load voltage at time k. Let be the β-axis component of the load voltage at time k. The voltage amplitude of the power grid. This refers to the load voltage amplitude. Sine value based on phase deviation and amplitude deviation Calculate the VSG output phase reference value and the reference value of VSG output amplitude after introducing pre-synchronization control Specifically, this is achieved through the following formula: ; ; in, This represents the proportional parameter of the phase pre-synchronization PI controller. This represents the integral parameter of the phase pre-synchronization PI controller. This indicates the output of the phase pre-synchronization PI controller. This represents the reference value of the VSG output angular frequency after the introduction of pre-synchronization control. This represents the proportional parameter of the amplitude pre-synchronization PI controller. This represents the integral parameter of the amplitude pre-synchronization PI controller. This indicates the output of the amplitude pre-synchronization PI controller; based on and Calculate the load voltage reference value Specifically, this is achieved through the following formula: ; in, , , These represent the components of the load voltage at time k along the a-axis, b-axis, and c-axis, respectively.

6. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, Calculate the αβ component of the second inductor current reference value corresponding to the mode flag L. αβ component of LCL filter capacitor voltage reference value αβ component of the first inductor current reference value and the αβ component of the first voltage reference value ,include: If the mode flag L indicates that the grid mode was in the initial state before the switch, the grid voltage at time k is used as the reference. Preset active power and reactive power The α-axis component of the second inductor current reference value in grid-following mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the second inductor current; ; in, The α-axis component represents the grid voltage. Represents the β-axis component of the grid voltage; Obtain the reference value of the power grid voltage According to the grid voltage reference value , and The α-axis component of the LCL filter capacitor voltage reference value in grid mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the reference value of the capacitor voltage of the LCL filter; ; in, The angular frequency of the power grid. The α-axis component of the grid voltage reference value. The β-axis component of the grid voltage reference value. and The αβ component that makes up the grid voltage reference value is taken as the αβ component of the first voltage reference value; according to , , and The α-axis component of the first inductor current reference value in grid-following mode is calculated using the following formula. and β-axis components , and The αβ component that makes up the first inductor current reference value; 。 7. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, Each switching state of the three-phase inverter bridge includes the A-phase bridge arm switching state. B-phase bridge arm switch status and C-phase bridge arm switch status , ; Based on this, the αβ component of the three-phase inverter bridge output voltage corresponding to each switching state is calculated. ,include: For each switch state, based on , and Using the following formula, generate the α-axis component of the three-phase inverter bridge output voltage for each switching state. and β-axis components , and The αβ components that make up the output voltage of a three-phase inverter bridge ; 。 8. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, Based on discrete state equations and state quantities in a stationary αβ coordinate system, , , , and Calculate the initial cost of each switch state under the mode flag L, including: based on , , and Calculate the αβ component of the reference value of the second inductor current at time k+2. The αβ component of the first inductor current reference value at time k+2 and the αβ component of the first voltage reference value at time k+2 Specifically, this is achieved through the following formula: ; in, For sampling and control cycles; For each switch state, the corresponding switch state will be... As Substituting these values ​​into the discrete state equations, and simultaneously substituting the state variables in the stationary αβ coordinate system into the discrete state equations, we obtain the αβ component of the first inductor current at time k+1. The αβ component of the second inductor current at time k+1 and the αβ component of the LCL filter capacitor voltage at time k+1 ; based on and The α-axis component of the load voltage at time k+1 is calculated using the following formula. and β-axis components , and The αβ component of the load voltage at time k+1 ; ; in, Let be the α-axis component of the LCL filter capacitor voltage at time k. Let be the β-axis component of the LCL filter capacitor voltage at time k. Let α be the α-axis component of the first inductor current at time k+1. Let β be the β-axis component of the first inductor current at time k+1; Let k+1 in the discrete state equation represent the switch state. As Substitute into the discrete state equations, and simultaneously , , and Substituting into the discrete state equation, we obtain the αβ component of the first inductor current at time k+2. The αβ component of the second inductor current at time k+2 and the αβ component of the LCL filter capacitor voltage at time k+2 Then, the α-axis component of the load voltage reference value at time k+2 is calculated. and the β-axis component of the load voltage reference value at time k+2 ; Calculate the cost item for output current tracking error. Input current tracking error cost item and output voltage tracking error cost item Specifically, this is achieved through the following formula: ; in, The α-axis component of the reference value of the second inductor current at time k+2. The β-axis component of the reference value of the second inductor current at time k+2. and composition ; The α-axis component of the first inductor current reference value at time k+2. The β-axis component of the first inductor current reference value at time k+2. and composition ; The α-axis component of the first voltage reference value at time k+2. The α-axis component of the first voltage reference value at time k+2. and composition ; Cost item for output current tracking error Input current tracking error cost item and output voltage tracking error cost item We obtain the initial cost by weighted summation. Specifically, this is achieved through the following formula: ; in, , , These are the weighting coefficients.

9. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, When the mode flag L indicates that the network construction mode was in operation before the switch, the control obstacle function corresponding to the mode flag L is the network construction mode obstacle function. , represented as: ; in, The preset maximum allowable load voltage value. Let α and β be the load voltage components at time k; When the mode flag L indicates that the network was in follow mode before the switch, the control barrier function corresponding to the mode flag L is the network-follow mode barrier function. , represented as: ; in, The preset maximum allowable value for the second inductor current. Let α and β be the α-axis and β-axis components of the second inductor current at time k.

10. The method for smooth switching between network-based and network-based control in a safety-constrained model predictive control according to claim 1, characterized in that, Based on the control barrier function, the final cost for each switching state is calculated, including: Calculate slack variables based on the control barrier function. Specifically, this is achieved through the following formula: ; in, The attenuation coefficient is... It is a constant. Let L be the control barrier function corresponding to the mode flag bit L at time k. The control barrier function corresponding to the mode flag L at time k+1; Determine slack variables Is it greater than 0? If so, then slack variable. If it remains unchanged, then the slack variable will be changed. Set to 0; Based on slack variables Calculate the final cost Specifically, this is achieved through the following formula: ; in, Penalize the weights for slack variables.