Multi-energy microgrid grid-connected and off-grid switching system and method based on virtual synchronous machine

By collecting and processing the operational data of multi-energy microgrids, generating robust state prediction values ​​and optimizing control commands, the stability and synchronization accuracy issues of virtual synchronous machines during multi-energy microgrid switching are resolved, achieving smooth grid-connected and off-grid switching and improving power supply stability and synchronization accuracy.

CN121395503AActive Publication Date: 2026-01-23CHANGCHUN ARCHITECTURE & CIVILENGEERING CO LLEGE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511946401.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-01-23
Estimated Expiration
2045-12-23

AI Technical Summary

Technical Problem

Existing multi-energy microgrid on-grid/off-grid switching methods based on virtual synchronizers suffer from data delays or distortions when faced with distributed energy output fluctuations and communication link interference. This results in insufficient accuracy in microgrid status assessment, as well as in the stability and synchronization accuracy of the switching process.

Method used

By collecting operational data within the multi-energy microgrid, communication quality parameters are determined, robust estimation is performed to generate overall state prediction values, and a finite-time domain optimization problem is solved in a rolling manner within the model predictive control framework to generate optimal control commands. This coordinates the operation of the virtual synchronous machine and the multi-energy conversion unit to achieve a smooth grid connection and disconnection.

Benefits of technology

It improves the voltage and frequency stability of multi-energy microgrids during grid-connected and off-grid switching, ensures synchronization accuracy, reduces voltage and frequency fluctuations during switching, and guarantees the reliability and continuity of power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121395503A_ABST
    Figure CN121395503A_ABST
Patent Text Reader

Abstract

The invention provides a multi-energy micro-grid grid-connected and off-grid switching system and method based on a virtual synchronous machine, and relates to the technical field of multi-energy micro-grid control. Voltage, frequency and power data of each energy sub-grid in a multi-energy micro-grid and state data of a multi-energy conversion unit connected with the virtual synchronous machine are collected; determining communication quality parameters by recording data arrival time and integrity; robust estimation is carried out on the operation data based on the parameters, and an overall state prediction value of a grid-connected point voltage phase difference, a micro-grid frequency deviation and a multi-energy conversion unit reserve capacity is generated; and then, according to a grid-connected or off-grid target switching mode, inputting an overall state prediction value into a model prediction control framework, solving a finite time domain optimization problem in a rolling manner, and finally, coordinating and controlling a virtual synchronous machine and a multi-energy conversion unit according to an optimal control instruction to realize grid-connected and off-grid switching of the multi-energy micro-grid. The multi-energy microgrid grid-connected and off-grid stable switching can be accurately realized, and the grid-connected synchronism and the off-grid operation stability are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of multi-energy microgrid control, and particularly relates to a multi-energy microgrid grid-connected and off-grid switching system and method based on a virtual synchronous machine. BACKGROUND

[0002] As a core carrier of distributed energy consumption, the grid-connected and off-grid switching method of a multi-energy microgrid is a key technology for realizing flexible linkage between a microgrid and a large power grid and guaranteeing power supply continuity. The technology can be widely applied to industrial parks, commercial buildings and remote power supply scenarios. With the continuous increase of new energy penetration, the market application prospect is very broad.

[0003] The existing grid-connected and off-grid switching method based on a virtual synchronous machine mainly simulates the inertia and damping characteristics of a traditional synchronous generator through a virtual synchronous machine to coordinate the operating state of an energy conversion device to complete mode switching. This kind of method improves the switching response speed to some extent with the help of the regulation capacity of the virtual synchronous machine, but generally directly uses collected operating data for control logic operation without targeted processing of the influence of the data transmission process.

[0004] In actual application, the output fluctuation of distributed energy and the interference of a communication link are easy to cause delay or distortion of the collected data, thereby affecting the judgment accuracy of the overall state of the microgrid; at the same time, the existing method has insufficient dynamic adaptability to the grid-connected synchronization requirement and off-grid stability requirement, which may cause voltage frequency fluctuation or excessive synchronization deviation during switching. These problems will reduce the reliability of microgrid operation and affect the power supply quality. Therefore, there is a technical problem of insufficient stability and synchronization accuracy in the existing technology during the grid-connected and off-grid switching process of a multi-energy microgrid. SUMMARY

[0005] The present application aims to provide a multi-energy microgrid grid-connected and off-grid switching system and method based on a virtual synchronous machine to solve the problem of insufficient stability and synchronization accuracy in the existing technology during the grid-connected and off-grid switching process of a multi-energy microgrid.

[0006] To solve the above technical problems, in a first aspect, the present application provides a multi-energy microgrid grid-connected and off-grid switching method based on a virtual synchronous machine, comprising:

[0007] Collecting operating data of a plurality of energy subnets in a multi-energy microgrid, and determining a communication quality parameter corresponding to the operating data by recording the arrival time and data integrity of each operating data, wherein the operating data includes voltage, frequency and power data of each energy subnet and state data of a multi-energy conversion unit associated with a virtual synchronous machine;

[0008] performing robust estimation on the operation data according to the communication quality parameter to generate an overall state prediction value, the overall state prediction value including a grid-connected point voltage phase difference, a microgrid frequency deviation, and a backup capacity of a multi-energy conversion unit associated with the virtual synchronous machine of the multi-energy microgrid;

[0009] inputting the overall state prediction value into a model predictive control framework according to a target switching mode, the target switching mode including grid-connected and off-grid, and solving a finite-time horizon optimization problem to generate optimal control instructions, the optimization problem aiming to achieve voltage synchronization between a microgrid side and a grid side at a preset time in the grid-connected mode, and aiming to maintain frequency and voltage stability of the multi-energy microgrid after disconnection in the off-grid mode;

[0010] coordinating control of the virtual synchronous machine and the multi-energy conversion unit according to the optimal control instructions to achieve grid-connected and off-grid switching of the multi-energy microgrid.

[0011] Optionally, the performing robust estimation on the operation data according to the communication quality parameter to generate an overall state prediction value comprises:

[0012] establishing a plurality of internal mathematical models, the internal mathematical models being used to describe system overall changes, the system overall changes including a grid-connected point voltage phase difference, a microgrid frequency deviation, and a backup capacity of a multi-energy conversion unit associated with the virtual synchronous machine;

[0013] calculating an influence coefficient corresponding to each group of the operation data according to the communication quality parameter;

[0014] adjusting a current state value of each of the internal mathematical models according to the influence coefficient and the operation data to obtain an intermediate state value;

[0015] inputting the intermediate state value into the corresponding internal mathematical model to calculate an overall state prediction value at a next time;

[0016] repeating the influence coefficient calculation, the state value adjustment, and the state prediction value calculation to generate a series of overall state prediction values at future times.

[0017] Optionally, before the inputting the overall state prediction value into a model predictive control framework according to a target switching mode, the method further comprises:

[0018] predicting a communication quality change in a future preset period based on a current and historical communication quality parameter;

[0019] dynamically adjusting an adjustable range boundary set for the virtual synchronous machine and each multi-energy conversion unit in the model predictive control framework according to the communication quality change.

[0020] Optionally, the inputting the overall state prediction value into a model predictive control framework according to the target switching mode, and solving a finite time horizon optimization problem in a rolling manner to generate optimal control instructions comprises:

[0021] setting a future finite time period as an optimization window;

[0022] according to the target switching mode, constructing a corresponding optimization objective function, the target switching mode including grid-connected and off-grid;

[0023] obtaining an overall state prediction value within the optimization window, and substituting the overall state prediction value as a prediction initial condition into the optimization objective function corresponding to the current target switching mode;

[0024] at each control time, solving the optimization objective function with the adjustable control variables of the virtual synchronous machine and each multi-energy conversion unit as decision variables to obtain an initial control instruction sequence, the initial control instruction sequence being a series of control instructions within the optimization window;

[0025] extracting the first instruction in the initial control instruction sequence as the optimal control instruction at the current time.

[0026] Optionally, the constructing a corresponding optimization objective function according to the target switching mode comprises:

[0027] in the grid-connected mode, constructing a first optimization objective function, the first optimization objective function being used to minimize the difference between the predicted microgrid side grid-connected point voltage phase and the grid side voltage phase at the end time of the optimization window;

[0028] in the off-grid mode, constructing a second optimization objective function, the second optimization objective function being used to minimize the sum of the predicted microgrid frequency deviation and the sum of the microgrid voltage deviation within the optimization window.

[0029] Optionally, after the coordinating control of the virtual synchronous machine and the multi-energy conversion unit according to the optimal control instruction to achieve the grid-connected and off-grid switching of the multi-energy microgrid, further comprising:

[0030] monitoring the running state of the multi-energy microgrid after the switching is completed, and obtaining monitoring data, the monitoring data including the real-time frequency, the real-time voltage of the multi-energy microgrid, and the output power of each energy subnetwork;

[0031] based on the monitoring data, correcting the running parameters of the virtual synchronous machine, the running parameters including virtual inertia parameters and virtual damping parameters;

[0032] updating the internal mathematical model according to the corrected running parameters.

[0033] Optionally, the control module is configured to coordinate control of the virtual synchronous machine and the multi-energy conversion units according to the optimal control instruction, to realize grid-connected and off-grid switching of the multi-energy microgrid.

[0034] The optimal control instruction is decomposed into a first sub-instruction for controlling the virtual synchronous machine and a second sub-instruction for controlling each of the multi-energy conversion units.

[0035] In the grid-connected switching, the first sub-instruction and the second sub-instruction are used for control, to realize internal power balance of the multi-energy microgrid before the grid-connected point switch is closed, and to synchronize the grid-connected point voltage of the multi-energy microgrid with the grid-side voltage.

[0036] In the off-grid switching, the first sub-instruction and the second sub-instruction are used for control, to maintain frequency and voltage stability of the multi-energy microgrid after the grid-connected point switch is opened.

[0037] In a second aspect, the present application provides a grid-connected and off-grid switching system of a multi-energy microgrid based on a virtual synchronous machine, comprising:

[0038] The acquisition module is configured to acquire operation data of a plurality of energy subnets in the multi-energy microgrid, and determine a communication quality parameter corresponding to the operation data by recording an arrival time and data integrity of each of the operation data, the operation data including voltage, frequency, power data of each energy subnet and state data of a multi-energy conversion unit associated with the virtual synchronous machine.

[0039] The first generation module is configured to perform robust estimation on the operation data according to the communication quality parameter, to generate an overall state prediction value, the overall state prediction value including a grid-connected point voltage phase difference of the multi-energy microgrid, a microgrid frequency deviation, and a backup capacity of the multi-energy conversion unit associated with the virtual synchronous machine.

[0040] The second generation module is configured to input the overall state prediction value into a model prediction control framework according to a target switching mode, to rollingly solve a finite time domain optimization problem, to generate an optimal control instruction, the target switching mode including grid-connected and off-grid, the optimization problem aiming to realize voltage synchronization between the microgrid side and the grid side at a preset time in the grid-connected mode, and aiming to maintain frequency and voltage stability of the multi-energy microgrid after disconnection in the off-grid mode.

[0041] The control module is configured to coordinate control of the virtual synchronous machine and the multi-energy conversion units according to the optimal control instruction, to realize grid-connected and off-grid switching of the multi-energy microgrid.

[0042] In a third aspect, the present application provides an electronic device, comprising:

[0043] a memory for storing the computer program;

[0044] a processor for implementing the steps of the method for parallel and off-grid switching of a multi-energy microgrid based on a virtual synchronous machine when executing the computer program.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, can implement the steps of the method for parallel and off-grid switching of a multi-energy microgrid based on a virtual synchronous machine.

[0046] The method for parallel and off-grid switching of a multi-energy microgrid based on a virtual synchronous machine provided by the present application can comprehensively grasp the system operation state and quantify the data transmission influence by collecting the operation data of each energy subnetwork and multi-energy conversion unit in the multi-energy microgrid and determining the communication quality parameter; based on the communication quality parameter, robust estimation is performed on the operation data, which can reduce the interference caused by data delay and distortion and improve the accuracy of overall state prediction; according to the parallel or off-grid target switching mode, the overall state prediction value is input into the model predictive control framework to solve the optimal control instruction, which can adapt to the core needs of different switching scenarios; according to the optimal control instruction, the virtual synchronous machine and the multi-energy conversion unit are coordinated and controlled, and finally the smooth transition of the parallel and off-grid of the multi-energy microgrid is realized, and the stability and synchronization accuracy of the voltage and frequency in the switching process are ensured.

[0047] Further, by establishing a plurality of internal mathematical models describing the voltage phase difference of the parallel point, the microgrid frequency deviation and the change of the standby capacity of the multi-energy conversion unit, the influence coefficient of each group of operation data is calculated according to the communication quality parameter, and then the current state value of each internal mathematical model is adjusted to obtain the intermediate state value according to the influence coefficient and the operation data, and the intermediate state value is input into the corresponding internal mathematical model to calculate the overall state prediction value at the next moment, and the above influence coefficient calculation, state value adjustment and state prediction value calculation steps are repeated to generate a series of overall state prediction values at future moments. By adapting to system changes through multiple internal models and dynamically adjusting model states through influence coefficients, the time sequence continuity and accuracy of the overall state prediction value are further improved, and the adaptability to communication quality fluctuations is enhanced, providing more reliable multi-time state support for the subsequent model predictive control framework to solve optimization problems and generate optimal control instructions. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creating any inventive labor.

[0049] Figure 1 A flowchart of a multi-energy microgrid parallel and off-grid switching method based on a virtual synchronous machine is provided for an embodiment of the present application.

[0050] Figure 2 A specific implementation diagram of another multi-energy microgrid parallel and off-grid switching method based on a virtual synchronous machine is provided for an embodiment of the present application.

[0051] Figure 3 A structure diagram of a multi-energy microgrid parallel and off-grid switching system based on a virtual synchronous machine is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0052] In actual application, the existing multi-energy microgrid parallel and off-grid switching method often directly uses the collected operation data for control logic operation, without considering the delay and distortion that may occur in the data transmission process, resulting in inaccurate judgment of the microgrid operation state. At the same time, different requirements need to be met during parallel and off-grid, such as voltage synchronization with the large power grid and maintaining the stability of its own frequency and voltage. The existing method is difficult to dynamically adapt, which further causes large voltage and frequency fluctuations during the switching process, poor synchronization effect, and affects the reliability of power supply.

[0053] To solve the above problems, the present application provides a multi-energy microgrid parallel and off-grid switching method based on a virtual synchronous machine. The core of the method is to comprehensively collect the operation data of each energy subnetwork and related equipment in the microgrid, and judge the quality of data transmission. Then, the collected data is optimized according to the data transmission quality to obtain more accurate overall state prediction results of the microgrid. Subsequently, the most suitable control instructions are generated through optimization algorithms according to different goals of parallel or off-grid, to coordinate the operation of the virtual synchronous machine and the multi-energy conversion unit. This method not only solves the state judgment deviation caused by data transmission problems, but also accurately adapts to the core requirements of different switching modes, fundamentally reduces the voltage and frequency fluctuations during switching, and realizes the smooth transition of parallel and off-grid, effectively ensuring the stability and synchronization accuracy of power supply.

[0054] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0055] The core of the present application is to provide a multi-energy microgrid parallel and off-grid switching method based on a virtual synchronous machine. The flowchart of one specific embodiment is shown in Figure 1 The method comprises:

[0056] S101. Collect operational data from multiple energy subnets within the multi-energy microgrid, and determine the communication quality parameters corresponding to the operational data by recording the arrival time and data integrity of each operational data.

[0057] The operational data includes voltage, frequency, and power data for each energy subgrid, as well as status data of the multi-energy conversion units associated with the virtual synchronous machine.

[0058] Among them, the communication quality parameter refers to a comprehensive indicator of transmission speed and data integrity during the quantitative operation of data transmission. The larger the value, the better the data transmission quality, and it can be directly used to judge the reliability of subsequent data processing.

[0059] In one specific implementation, operational data from multiple energy subgrids within the multi-energy microgrid are first collected. A data transmission unit is deployed in each energy subgrid. This unit collects the instantaneous values ​​of voltage, frequency, and power, as well as the status data of the multi-energy conversion units in real time. Simultaneously, it packages these data, along with the subgrid's unique identifier and the precise time of data generation, into a standard data packet and sends it to the centralized processing unit.

[0060] Next, when the centralized processing unit receives the data packet, it synchronously records the arrival time of the data, extracts the generation time from the data packet and calculates the difference between the two, i.e., the transmission time difference; at the same time, it checks whether the data packet is missing fields by comparing it with a predefined list of required fields, such as voltage, frequency, power, status value, subnet ID, and generation time, in order to determine the integrity of the data, whether it is complete or incomplete.

[0061] Then, for each energy subnet, the centralized processing unit selects the most recently received data packets as a statistical sample, calculates the arithmetic mean of all transmission time differences in the sample as the first intermediate quantity, and calculates the proportion of the number of complete data packets to the total number of data packets in the sample as the second intermediate quantity.

[0062] Then, the calculated first and second intermediate quantities are input into a preset two-dimensional mapping function or lookup table, and the corresponding communication quality parameters are output.

[0063] Finally, the calculated communication quality parameters are associated with and stored along with the corresponding energy subnet identifier and the subnet's operating data for easy retrieval in subsequent steps.

[0064] The training process for the two-dimensional mapping function is as follows: Collect a large amount of historical communication data from different scenarios, label the average transmission time difference, the proportion of complete data packets, and the corresponding actual communication quality score for each data sample (determined by technical personnel based on data usage effectiveness). The mapping relationship is then trained using a linear regression algorithm, as shown in the following formula:

[0065] ;

[0066] wherein Q is a communication quality parameter; is a first intermediate quantity, i.e. a transmission time difference average value; R is a second intermediate quantity, i.e. a complete data packet ratio, with a value range of 0~1; 、 is a weight coefficient, obtained by training, such as =0.6, =0.4, ensuring that the numerical range of Q is between 0~500.

[0067] In another specific embodiment, a query table can be used instead of a two-dimensional mapping function: the first intermediate quantity is divided into multiple intervals, such as 0~0.001s, 0.001~0.003s, 0.003~0.005s, and the second intermediate quantity is divided into multiple intervals, such as 0.9~1.0, 0.8~0.9, 0.7~0.8, and the corresponding communication quality parameter of each interval combination is determined through historical data, and the parameter value is matched directly according to the interval to which the first intermediate quantity and the second intermediate quantity belong when querying.

[0068] S102, performing robust estimation on the operation data according to the communication quality parameter to generate an overall state prediction value.

[0069] wherein the overall state prediction value refers to a parameter set reflecting the future changes of the key operation states of the multi-energy microgrid, including the voltage phase difference of the grid-connected point of the multi-energy microgrid, the frequency deviation of the microgrid, and the standby capacity of the multi-energy conversion unit associated with the virtual synchronous machine.

[0070] S102 specifically includes:

[0071] S1021, establishing a plurality of internal mathematical models, the internal mathematical models being used to describe system overall changes, the system overall changes including changes in voltage phase difference of the grid-connected point, frequency deviation of the microgrid, and standby capacity of the multi-energy conversion unit associated with the virtual synchronous machine.

[0072] wherein the internal mathematical model refers to a mathematical expression used to quantitatively describe the change rules of the voltage phase difference of the grid-connected point, the frequency deviation of the microgrid, and the standby capacity of the multi-energy conversion unit over time, and each state corresponds to an independent model, and the state prediction value at the next time can be output according to historical data and operation data.

[0073] S1022, calculating an influence coefficient corresponding to each group of operation data according to the communication quality parameter.

[0074] wherein the influence coefficient refers to a weight value for measuring the reliability of the operation data, with a value range of 0~1, and the higher the communication quality parameter, the closer the influence coefficient is to 1, representing that the contribution of this group of data to the state prediction is greater; otherwise, the contribution is smaller.

[0075] S1023、According to the influence coefficient and the operation data, adjust the current state value of each internal mathematical model to obtain an intermediate state value.

[0076] Wherein, the current state value refers to the estimation value of the internal mathematical model to the key operation state of the multi-energy microgrid at the current time; the intermediate state value refers to the current state value corrected by the influence coefficient, which eliminates the interference of part of unreliable data and is closer to the actual operation state.

[0077] S1024, input the intermediate state value into the corresponding internal mathematical model, and calculate to obtain the overall state prediction value at the next time.

[0078] S1025, repeat the influence coefficient calculation, state value adjustment and state prediction value calculation to generate a series of overall state prediction values at future time.

[0079] This step realizes the overall state prediction based on robust estimation through the establishment of a state model, calculation of data weight, correction of the current state, prediction of the next state, and rolling generation of a sequence. The specific process is shown in Figure 2

[0080] Firstly, step S1021 establishes three internal mathematical models, respectively corresponding to the change law of the voltage phase difference of the grid-connected point, the frequency deviation of the microgrid, and the standby capacity of the multi-energy conversion unit.

[0081] In the model training stage, the historical operation data and the corresponding state change records of the microgrid are collected, such as the voltage, frequency, power data and phase difference change amount every 10 milliseconds in the past 6 months. For each state, the historical operation data is taken as the input and the historical state change amount is taken as the output, and the linear regression algorithm is used to train the model parameters.

[0082] Specifically, the grid-connected point voltage phase difference model is used to describe the change of the phase difference with the current phase difference and power data, and its expression is:

[0083] ;

[0084] Wherein, is the phase difference at the next time, is the current phase difference, is the current power data, unit: kW, a, b, c are the training coefficients.

[0085] The microgrid frequency deviation model is used to describe the change of the frequency deviation with the current frequency deviation and power data, and its expression is:

[0086] ;

[0087] ​wherein, is the frequency deviation of the microgrid at the next moment, in Hz; is the frequency deviation at the current moment; is the total power of the microgrid at the current moment, in kW; d, e, and f are coefficients obtained through training.

[0088] The multi-energy conversion unit standby capacity model is used to describe the change of standby capacity with the current standby capacity, the maximum power of the conversion unit, and the current load power, and the expression formula is:

[0089] ;

[0090] wherein, is the standby capacity of the multi-energy conversion unit at the next moment, in kW; is the standby capacity at the current moment; is the rated maximum power of the multi-energy conversion unit, in kW; is the load power of the conversion unit at the current moment, in kW; g and h are coefficients obtained through training.

[0091] Secondly, step S1022 calculates the influence coefficient according to the communication quality parameter, wherein the influence coefficient is the ratio of the communication quality parameter corresponding to the current operation data to the preset maximum value of the communication quality parameter, and if the communication quality parameter Q of a certain sub-network is 333.66, the preset maximum value of the communication quality parameter is 500, and .

[0092] Then, for the current state values corresponding to the three internal mathematical models, the influence coefficients of the same set of operation data calculated by step S1022 are used for correction, that is, the three current state values are multiplied by the influence correction coefficients respectively to obtain the intermediate state values of each state. 、 、

[0093] The correction logic is that the higher the communication quality, that is, the closer the influence coefficient to 1, the closer the intermediate state value after correction to the current state value, and the effective information of the original data is retained; the lower the communication quality, that is, the closer the influence coefficient to 0, the more gentle the intermediate state value, and the interference of unreliable data is weakened.

[0094] Then, step S1024 inputs the intermediate state values into the corresponding internal mathematical model to calculate the predicted value at the next moment.

[0095] ​Finally, the process of steps S1022 to S1024 is repeatedly performed by step S1025, and each time a new set of operating data and communication quality parameters is obtained, the influence coefficient is recalculated, the current state value is corrected, the model is input to obtain a new predicted value, and the overall state prediction value sequence of future multiple time points (such as future 10, each interval 10 milliseconds) is continuously generated.

[0096] In another specific embodiment, the internal mathematical model can use a neural network algorithm instead of linear regression. By constructing a 3-layer fully connected network, using historical operating data as input and state change as output, and using gradient descent method to train network parameters, the prediction accuracy in complex scenarios is improved.

[0097] Taking the photovoltaic subnetwork of a certain industrial park multi-energy microgrid as an example, the communication quality parameter Q=333.66, and the preset maximum communication quality parameter is 500.

[0098] The coefficients of each model after training are as follows: phase difference model a=0.8, b=0.002, c=0.1; frequency deviation model d=0.9, e=0.001, f=-0.05; spare capacity model g=0.85, h=0.12.

[0099] The state values of the current time k are as follows: grid-connected point voltage phase difference , microgrid frequency deviation , multi-energy conversion unit spare capacity .

[0100] The operating data at time k is obtained at the same time: grid-connected point transmission power , microgrid total power , rated maximum power of conversion unit , current load power .

[0101] Next, the influence coefficient is calculated. Based on the influence coefficient, the current state values at time k are corrected to obtain intermediate state values, and the correction results are as follows:

[0102] The intermediate state value of the grid-connected point voltage phase difference is: ;

[0103] The intermediate state value of the microgrid frequency deviation is: ;

[0104] The intermediate state value of the multi-energy conversion unit spare capacity is: .

[0105] Then, the above three intermediate state values are substituted into the internal mathematical model to calculate the predicted value corresponding to the next time point, and the specific calculation is as follows:

[0106] The voltage phase difference prediction value is ;

[0107] The frequency deviation prediction value is ;

[0108] The prediction value of the multi-energy conversion unit standby capacity is .

[0109] Finally, new data is obtained at intervals of 10 milliseconds, and the above process is repeated: the prediction value at time k+1 is taken as the new current state value, the influence coefficient is recalculated combined with the new operation data and the communication quality parameter, the intermediate value is corrected, the model is substituted, the prediction value at time k+2 is generated, and the overall state prediction value sequence of the next 10 time points is continuously rolled.

[0110] The above example is only one example of the present application, and in actual application, the time interval, model coefficient, operation data, etc. can be set according to requirements, and the present application does not limit this.

[0111] The present application effectively reduces the influence of data transmission interference on state prediction by combining the communication quality parameter with the internal mathematical model, improves the accuracy and reliability of the overall state prediction value, and provides high-quality prediction basis for the generation of subsequent optimal control instructions.

[0112] Before S103, it also includes: predicting the communication quality change in the future preset period based on the communication quality parameters at the current and historical time points; and dynamically adjusting the adjustable range boundary set for the virtual synchronous machine and each multi-energy conversion unit in the model predictive control framework according to the communication quality change.

[0113] Wherein, the future preset period refers to the time interval for predicting the communication quality change set according to the response requirement of multi-energy microgrid on-grid and off-grid switching, which needs to match the optimization window length of subsequent model predictive control. The communication quality change refers to the fluctuation trend of the communication quality parameter in the future preset period, including three typical change states of smooth, rising and falling, reflecting the future trend of data transmission reliability. The adjustable range boundary refers to the control quantity operation limit set for the virtual synchronous machine and the multi-energy conversion unit in the model predictive control framework, and the control instruction exceeding the boundary will cause abnormal operation of the equipment.

[0114] In a specific embodiment, the future communication quality change is predicted based on the communication quality parameters at the current and historical time points. Time series data is composed of communication quality parameters at recent consecutive time points, such as the past 20 time points, each interval being 10 milliseconds, and a time series prediction model such as ARIMA model is used for trend prediction to obtain the communication quality change.

[0115] In the ARIMA model training process, the historical communication quality time series data is used as the training set, and the autoregressive coefficient, difference order and moving average order of the model are iteratively optimized by minimizing the mean square error between the predicted value and the actual value.

[0116] Secondly, the adjustable range boundary is dynamically adjusted according to the communication quality change. For example, the boundary adjustment rule is set as follows: if the predicted communication quality is stable, i.e. the parameter fluctuation amplitude < 5%, the original boundary is kept unchanged; if the predicted communication quality rises, i.e. the parameter increase amplitude ≥ 5%, the boundary is appropriately expanded to release the device adjustment potential, such as expanding the multi-energy conversion unit power output range by 10%; if the predicted communication quality decreases, i.e. the parameter decrease amplitude ≥ 5%, the boundary is reduced to avoid the control quantity exceeding the device safe operation limit due to unreliable data, such as reducing the virtual synchronous machine speed regulation range by 8%. The adjusted boundary needs to meet the physical constraints of the device hardware parameters, such as the maximum output power of the conversion unit and the maximum speed of the synchronous machine.

[0117] In another specific embodiment, LSTM neural network can be used instead of ARIMA model for communication quality prediction. By constructing a 3-layer LSTM network, the historical communication quality sequence is used as input and the future sequence is used as output, and the network parameters are trained with Adam optimizer to improve the prediction accuracy of nonlinear communication quality change.

[0118] Taking the photovoltaic sub-network of the industrial park multi-energy microgrid as an example, the current communication quality Q at time t is known to be 333.66, and the historical communication quality parameters of the last 10 time points are 320.5, 325.8, 330.2, 333.6, 335.1, 334.8, 333.66, 332.9, 331.5, and 332.1, respectively. The future communication quality change of the next 50 milliseconds, i.e. 5 time points, is predicted.

[0119] Using ARIMA(2,1,1) model, the predicted value of the first future time point (t+10) milliseconds is calculated to be about 299.83; similarly, the predicted values of the subsequent 4 time points are 295.3, 290.1, 288.5, and 286.2, respectively, indicating that the communication quality is decreasing by about 14%.

[0120] Then, the adjustable range boundary is dynamically adjusted. The original boundary is set as follows: the virtual synchronous machine speed regulation range is 1500-1800 rpm, and the multi-energy conversion unit power output range is 0-200 kW. Due to the predicted decrease in communication quality, the boundary is reduced according to the rule: the virtual synchronous machine speed range is adjusted to 1550-1750 rpm, and the multi-energy conversion unit power range is adjusted to 20-180 kW, ensuring that the control quantity is within the safe range of the device.

[0121] The above example is only an example of the present application, and in actual application, the prediction model selection, boundary adjustment ratio, etc. can be set according to the requirements, and the present application does not limit this.

[0122] The present application can adapt the constraint conditions of the model predictive control framework to the fluctuations of the data transmission reliability by predicting the communication quality change in advance and dynamically adjusting the control quantity boundary, avoid generating invalid control instructions that exceed the device capability, and improve the feasibility of the subsequent optimal control instructions and the safety of the device operation in the off-grid switching.

[0123] S103, inputting the overall state prediction value into a model predictive control framework according to a target switching mode, rolling solving a finite time domain optimization problem to generate an optimal control instruction, the target switching mode including grid-connected and off-grid, the optimization problem aiming to achieve voltage synchronization of the microgrid side and the grid side at a preset time in the grid-connected mode, and aiming to maintain the frequency and voltage stability of the multi-energy microgrid after disconnection in the off-grid mode.

[0124] The optimal control instruction refers to a control signal that meets the current target switching mode requirement and can make the multi-energy microgrid operating state approach the ideal value, and is used to adjust the operating parameters of the virtual synchronous machine and the multi-energy conversion unit.

[0125] S103 specifically includes:

[0126] S1031, setting a future limited time period as an optimization window.

[0127] The optimization window refers to a future time interval for state prediction and optimization calculation in the model predictive control, and the length thereof needs to consider the control response speed and the calculation complexity to ensure that the control strategy can be adjusted in time during the switching process.

[0128] S1032, constructing a corresponding optimization objective function according to the target switching mode, the target switching mode including grid-connected and off-grid.

[0129] S1032 specifically includes: in the grid-connected mode, constructing a first optimization objective function, the first optimization objective function being used to minimize the difference between the predicted microgrid side grid-connected point voltage phase and the grid side voltage phase at the end of the optimization window; in the off-grid mode, constructing a second optimization objective function, the second optimization objective function being used to minimize the predicted microgrid frequency deviation sum and the microgrid voltage deviation sum within the optimization window.

[0130] The optimization objective function refers to a mathematical expression of the control objective, and by minimizing or maximizing the function value, the control effect can be guided, which is divided into two functions for adapting to the grid-connected and off-grid modes.

[0131] S1033, obtaining the overall state prediction value in the optimization window, and substituting the overall state prediction value into the optimization objective function corresponding to the current target switching mode as a predicted initial condition.

[0132] S1034, solving the optimization objective function to obtain an initial control instruction sequence at each control time, with the adjustable control amount of the virtual synchronous machine and each multi-energy conversion unit as the decision variable, the initial control instruction sequence being a series of control instructions in the optimization window.

[0133] Wherein, the decision variable refers to a variable that can be adjusted artificially in an optimization problem, which refers to the speed adjustment amount of the virtual synchronous machine, the power output adjustment amount of the multi-energy conversion unit and other directly controllable parameters. The initial control instruction sequence results in a control instruction set corresponding to each control time in the optimization window.

[0134] S1035, extracting the first instruction in the initial control instruction sequence as the optimal control instruction at the current time.

[0135] This step generates the control instruction of the adaptive switching mode through the process of setting the optimization time range, constructing the mode adaptation target, substituting the predicted initial condition, solving the instruction sequence, and extracting the current optimal instruction, and the specific process is as follows:

[0136] Firstly, the optimization window is set through step S1031, and according to the response requirement of grid-connected and off-grid switching, such as selecting the future 50 milliseconds as the optimization window, to ensure that the control instruction can follow the state change in real time, and the optimization window contains 5 control times of 10 milliseconds.

[0137] Secondly, according to the grid-connected and off-grid modes, the corresponding optimization objective function is constructed through step S1032, including the first optimization objective function and the second optimization objective function, which are as follows:

[0138] Under the grid-connected mode, the expression of the first optimization objective function is:

[0139] ;

[0140] Wherein, is the first objective function value, is the predicted phase difference at the end of the optimization window, is the phase difference reference value, and the ideal value is 0°;

[0141] Under the off-grid mode, the expression of the second optimization objective function is:

[0142] ;

[0143] Wherein, is the second objective function value, n is the number of control instants within the optimization window, is the predicted frequency deviation at the i-th instant, is the predicted voltage deviation at the i-th instant.

[0144] Next, the overall state prediction values within the optimization window are extracted from the output future state prediction sequence as prediction initial conditions by step S1033, which are substituted into the objective function corresponding to the current mode, such as the phase difference, frequency deviation, and reserve capacity at 5 instants within the optimization window of 50 milliseconds in the future.

[0145] Then, the optimization objective function is solved using the gradient descent method with the adjustable control amount of the virtual synchronous machine and the multi-energy conversion unit as the decision variable under the adjustable range boundary constraint adjusted in the pre-step. The solving process is: initializing the decision variable value, calculating the objective function value, iteratively updating the decision variable along the gradient descent direction of the function, and stopping until the function value converges to the minimum value. At this time, the corresponding decision variable sequence is the initial control instruction sequence.

[0146] Finally, the instruction at the first control instant is extracted from the initial control instruction sequence as the optimal control instruction executed at the current instant; at the next control instant (10 milliseconds apart), the above steps S1031 to S1035 are repeated to realize rolling optimization control.

[0147] In another specific embodiment, the optimization objective function solving can use the interior point method instead of the gradient descent method to improve the solving efficiency and accuracy under complex constraint scenarios by converting the constraint conditions into penalty terms of the objective function.

[0148] Taking the grid-connected switching of the industrial park multi-energy microgrid as an example, the adjustable range after the pre-step adjustment is the virtual synchronous machine speed 1550-1750 rpm and the multi-energy conversion unit power 20-180 kW. First, set the optimization window to 14:30:00.000-14:30:00.050, which contains 5 control instants.

[0149] In the grid-connected mode, the first optimization objective function is constructed: The phase difference prediction values at 5 instants within the optimization window are obtained: 1.4077° at t+10 ms, 1.3652° at t+20 ms, 1.2891° at t+30 ms, 1.1563° at t+40 ms, and 1.0235° at t+50 ms. The phase difference prediction values at 5 instants are substituted as initial conditions into .

[0150] Taking the virtual synchronous machine speed adjustment amount Δn and the multi-energy conversion unit power adjustment amount ΔP as the decision variable, the optimization The initial control instruction sequence is obtained by iterative calculation of the gradient descent method as follows:

[0151] t time: [Δn=20rpm, ΔP=15kW];

[0152] t+10ms time: [Δn=18rpm, ΔP=12kW];

[0153] t+20ms time: [Δn=15rpm, ΔP=10kW];

[0154] t+30ms time: [Δn=12rpm, ΔP=8kW];

[0155] t+40ms time: [Δn=10rpm, ΔP=5kW].

[0156] The first instruction [Δn=20rpm, ΔP=15kW] of the extraction sequence is taken as the optimal control instruction at the current t time.

[0157] In the off-grid mode, a second optimization objective function is constructed: where i=1 to 5 corresponds to the five time points in the optimization window.

[0158] The predicted frequency deviation and voltage deviation at the five time points in the optimization window are obtained as initial conditions, and substituted into The virtual synchronous machine speed adjustment amount Δn and the energy storage unit power adjustment amount are taken as decision variables, and the gradient descent method is used to solve .

[0159] After iterative calculation, when Δn is 0rpm, -2rpm, -3rpm, -4rpm, -5rpm, +20kW, +18kW, +15kW, +12kW, +10kW, respectively, the minimum value is obtained, corresponding to the initial control instruction sequence as follows:

[0160] t time: [Δn=0rpm, =+20kW];

[0161] t+10ms time: [Δn=-2rpm, =+18kW];

[0162] t+20ms time: [Δn=-3rpm, =+15kW];

[0163] t+30ms time: [Δn=-4rpm, =+12kW];

[0164] t+40ms moment: [Delta n=-5rpm, =+10kW].

[0165] Finally, S1035 extracts the sequence first instruction [Delta n=0rpm, =+20kW] as the off-grid optimal control instruction of the current t moment.

[0166] The above example is only one example of the present application, and in actual application, the optimization window length, the solving algorithm, etc. can be set according to the demand, and the present application does not limit this.

[0167] The present application generates the optimal control instruction by adapting and rolling solving the optimization target design of grid-connected and off-grid mode, which can accurately match the core needs of different switching scenarios, guarantee the voltage synchronization effect during grid-connected and the frequency and voltage stability during off-grid, and provide key control support for smooth grid-connected and off-grid switching of multi-energy microgrid.

[0168] S104, according to the optimal control instruction, coordinating control the virtual synchronous machine and the multi-energy conversion unit, to realize the grid-connected and off-grid switching of the multi-energy microgrid.

[0169] S104 specifically includes:

[0170] S1041, the optimal control instruction is decomposed into a first sub-instruction and a second sub-instruction, the first sub-instruction is used to control the virtual synchronous machine, and the second sub-instruction is used to control each multi-energy conversion unit.

[0171] S1042, during grid-connected switching, according to the first sub-instruction and the second sub-instruction, to realize the internal power balance of the multi-energy microgrid before the grid-connected point switch is closed, and make the grid-connected point voltage of the multi-energy microgrid and the grid voltage synchronous.

[0172] S1043, during off-grid switching, according to the first sub-instruction and the second sub-instruction, to maintain the frequency and voltage stability of the multi-energy microgrid after the grid-connected point switch is opened.

[0173] This step realizes the collaborative operation of the virtual synchronous machine and the multi-energy conversion unit through the flow of instruction decomposition and mode-specific execution control, and the specific process is as follows:

[0174] Firstly, step S1041 decomposes the optimal control instruction output by step S103 into a first sub-instruction and a second sub-instruction according to different control objects. The decomposition rule is as follows: the parameter adjustment content related to the virtual synchronous machine in the instruction is extracted as the first sub-instruction, and the parameter adjustment content related to each multi-energy conversion unit is extracted as the second sub-instruction, so as to ensure that each sub-instruction only corresponds to the operation demand of one type of device.

[0175] Next, the target switching mode execution control is performed:

[0176] When the grid switching is performed, step S1042 is executed. First, the output power of each multi-energy conversion unit is adjusted according to the second sub-instruction. By comparing the difference between the total output power of the microgrid and the total load, the power output of the conversion unit is gradually adjusted so that the difference approaches zero, thereby realizing internal power balance. After power balance, the voltage output phase and amplitude of the virtual synchronous machine are finely adjusted according to the first sub-instruction, so that they are consistent with the phase and amplitude of the grid-side voltage, thereby achieving a synchronous state. Finally, the grid connection switch is closed to complete the grid switching.

[0177] When the off-grid switching is performed, step S1043 is executed. At the same time that the grid connection switch is opened, the first sub-instruction is sent to the virtual synchronous machine and the second sub-instruction is sent to each multi-energy conversion unit. The virtual synchronous machine quickly adjusts the inertia and damping characteristics according to the instruction, and the multi-energy conversion unit adjusts the power output according to the instruction. The two work together to compensate for the power shortage or surplus generated during the off-grid instant, so that the microgrid frequency and voltage are maintained within the allowable range, thereby ensuring stable off-grid operation.

[0178] In another specific embodiment, a pre-synchronization detection link can be introduced during grid switching. After adjusting the virtual synchronous machine according to the first sub-instruction, the synchronization degree of the voltage on both sides of the grid connection point is detected in real time through a voltage sensor. When the phase difference and amplitude difference are both less than a preset threshold, the grid connection switch is closed again, thereby further improving the safety of grid connection. In actual application, the preset threshold can be a phase difference < 5° and an amplitude difference < 2%.

[0179] Taking the grid connection and off-grid switching of a multi-energy microgrid in an industrial park as an example, according to the example in the foregoing, the current power of the photovoltaic device is 100 kW and the current power of the energy storage device is 60 kW. The phase difference before grid connection is predicted to be 1.4077°, and the frequency deviation before off-grid is predicted to be 0.2740 Hz. The optimal control instruction for grid connection is [Δn = 20 rpm, ΔP = 15 kW], and the optimal control instruction for off-grid is [Δn = 0 rpm, ]; the current speed of the virtual synchronous machine is 1580 rpm, and then step S104 is performed:

[0180] In the grid switching, for the [Δn=20rpm, ΔP=15kW] output in step S103, it is split into a first sub-instruction: virtual synchronous machine speed +20rpm, and a second sub-instruction: photovoltaic multi-energy conversion unit power +15kW.

[0181] Combined with the current photovoltaic power 100kW, first, the photovoltaic conversion unit is adjusted according to the second sub-instruction to increase the power from 100kW to 115kW; at this time, the total microgrid output is photovoltaic 115kW+energy storage 60kW, which matches the total load 175kW, realizing internal power balance. Then, the virtual synchronous machine speed is increased from 1580rpm to 1600rpm according to the first sub-instruction, and combined with the predicted 1.4077° voltage phase difference, the output voltage phase is finely adjusted until the voltage phase difference with the grid side is <5°, and finally the grid point switch is closed to complete the grid connection.

[0182] In the off-grid switching, for the [Δn=0rpm, =+20kW] output in step S103, it is split into a first sub-instruction: virtual synchronous machine speed maintains 1580rpm+20rpm=1600rpm, because the speed increasing instruction has been executed after grid connection, and a second sub-instruction: energy storage multi-energy conversion unit power +20kW.

[0183] At the same time as issuing the grid point switch opening instruction, the sub-instructions are executed synchronously. The virtual synchronous machine maintains 1600rpm speed according to the first sub-instruction to stabilize the microgrid frequency by inertia; and the energy storage conversion unit increases the power from 60kW to 80kW according to the second sub-instruction combined with the current power. At this time, the total microgrid output is photovoltaic 115kW+energy storage 80kW=195kW, which compensates for the 20kW power shortage caused by the disconnection of the grid at the moment of off-grid (20kW input from the grid when connected to the grid), so that the microgrid frequency is stabilized at 50Hz±0.02Hz and the voltage is stabilized at 220V±5V, echoing the frequency deviation prediction and off-grid optimization target.

[0184] The present application realizes seamless switching of multi-energy microgrid on and off-grid through instruction decomposition and mode coordinated control, so that the virtual synchronous machine and multi-energy conversion unit accurately execute operations, ensuring smooth synchronization and grid safety when connected to the grid, and guaranteeing frequency and voltage stability when off-grid, and realizing seamless switching of multi-energy microgrid on and off-grid.

[0185] After S104, it further includes:

[0186] Monitoring the running state of the multi-energy microgrid after switching is completed, obtaining monitoring data, the monitoring data including real-time frequency, real-time voltage of the multi-energy microgrid, and output power of each energy sub-network; based on the monitoring data, correcting the operation parameters of the virtual synchronous machine, the operation parameters including virtual inertia parameters and virtual damping parameters; and updating the internal mathematical model according to the corrected operation parameters.

[0187] Among them, the monitoring data refers to the real-time acquisition of the multi-energy microgrid operation state parameters after switching, including the real-time frequency, real-time voltage of the microgrid, and the output power of each energy subnetwork, which is used to evaluate the operation stability after switching. The virtual inertia parameter refers to the parameter that simulates the inertia characteristic of the traditional synchronous machine, and the larger the value is, the more gentle the system frequency is affected by the power fluctuation, and the faster the frequency change is determined. The virtual damping parameter refers to the parameter that suppresses the frequency fluctuation of the virtual synchronous machine, and the larger the value is, the faster the frequency fluctuation decays, which helps the system quickly recover to the stable frequency.

[0188] Firstly, the running state of the multi-energy microgrid after switching is monitored. Frequency sensors, voltage sensors and power sensors are deployed to collect monitoring data at a preset sampling frequency, such as 20 times per second, including real-time frequency, real-time voltage of the microgrid and output power of each energy subnetwork, to ensure that the data can reflect the system operation changes in real time.

[0189] Secondly, the operating parameters of the virtual synchronous machine are corrected based on the monitoring data. The ideal operating parameters of the microgrid are set, such as ideal frequency 50Hz and ideal voltage 220V, the deviation of the monitoring data from the ideal parameters is calculated, and the virtual inertia parameter and the virtual damping parameter are adjusted using proportional integral correction algorithm. The correction formula is as follows:

[0190] Virtual inertia parameter correction: ;

[0191] Virtual damping parameter correction: ;

[0192] Among them, , are the corrected inertia and damping parameters; H, D are the parameters before correction; is the real-time frequency; is the ideal frequency; , and , are the proportional and integral coefficients of the PI controller, which are determined by historical data debugging.

[0193] Finally, the internal mathematical model is updated according to the corrected operating parameters. It should be noted that the complete explicit expression of the microgrid frequency deviation model is:

[0194] ;

[0195] Among them, is the control period, which is 10 milliseconds in the example mentioned above, D is the virtual damping parameter, and H is the virtual inertia parameter. The corrected , The original H and D in the model will be directly replaced, instead of replacing the coefficients d and e, because the coefficients 、 The essence of H and D is the result of derivation, and directly replacing H and D can update the frequency dynamic response characteristics of the model from the root, so that the model is more consistent with the actual operation state of the device, and provides more accurate model support for the state prediction and control instruction generation of the next on-off grid switching.

[0196] The application ensures that the virtual synchronous machine is always in the optimal operating state through the operation monitoring and parameter correction after switching, and improves the frequency and voltage stability of the multi-energy microgrid after switching; at the same time, by directly updating the virtual inertia and virtual damping core parameters in the microgrid frequency deviation model, the prediction and control accuracy of subsequent on-off grid switching is continuously optimized, forming a closed-loop improvement mechanism of control monitoring and optimization.

[0197] Figure 3 A specific implementation structure diagram of a multi-energy microgrid on-off grid switching system based on a virtual synchronous machine is provided for an embodiment of the application, referring to Figure 3 The system can include:

[0198] The acquisition module 31 is configured to acquire operation data of a plurality of energy subnets in the multi-energy microgrid, and determine a communication quality parameter corresponding to the operation data by recording the arrival time and data integrity of each operation data, wherein the operation data includes voltage, frequency and power data of each energy subnet, and state data of a multi-energy conversion unit associated with the virtual synchronous machine;

[0199] The first generation module 32 is configured to perform robust estimation on the operation data according to the communication quality parameter, to generate an overall state prediction value, wherein the overall state prediction value includes a grid-connected point voltage phase difference of the multi-energy microgrid, a microgrid frequency deviation, and a standby capacity of the multi-energy conversion unit associated with the virtual synchronous machine;

[0200] The second generation module 33 is configured to input the overall state prediction value into a model predictive control framework according to a target switching mode, to solve a finite time domain optimization problem in a rolling manner, to generate an optimal control instruction, wherein the target switching mode includes on-grid and off-grid, and the optimization problem aims to achieve voltage synchronization between the microgrid side and the grid side at a preset time in the on-grid mode, and aims to maintain the frequency and voltage stability of the multi-energy microgrid after disconnection in the off-grid mode;

[0201] The control module 34 is configured to coordinate the virtual synchronous machine and the multi-energy conversion unit according to the optimal control instruction, to realize the on-off grid switching of the multi-energy microgrid.

[0202] The virtual synchronous machine based multi-energy microgrid parallel and off-grid switching system of the embodiments of the present application is used to implement the virtual synchronous machine based multi-energy microgrid parallel and off-grid switching method described above, and thus the specific embodiments of the virtual synchronous machine based multi-energy microgrid parallel and off-grid switching system can refer to the embodiments of the virtual synchronous machine based multi-energy microgrid parallel and off-grid switching method described above, and the specific embodiments can refer to the description of the corresponding embodiments, which will not be repeated here.

[0203] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the virtual synchronous machine based multi-energy microgrid parallel and off-grid switching method described above when executing the computer program.

[0204] The present application also provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the virtual synchronous machine based multi-energy microgrid parallel and off-grid switching method described above when executed by a processor.

[0205] In an exemplary embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a read-only memory, a random access memory, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0206] The embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program implements the steps of the virtual synchronous machine based multi-energy microgrid parallel and off-grid switching method described above when executed by a processor.

[0207] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0208] The virtual synchronous machine based multi-energy microgrid parallel and off-grid switching system and method provided by the present application are described in detail above. The principles and implementation of the present application are described by specific examples in this paper, and the above description of the examples is only used to help understand the method and its core idea of the present application. It should be noted that for ordinary skilled persons in the technical field, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the present application.

Claims

1. A method for on-grid / off-grid handover in a multi-energy microgrid based on a virtual synchronous machine, characterized in that, include: The system collects operational data from multiple energy subgrids within a multi-energy microgrid, and determines the communication quality parameters corresponding to each operational data by recording the arrival time and data integrity of each operational data. The operational data includes voltage, frequency, and power data of each energy subgrid, as well as status data of the multi-energy conversion unit associated with the virtual synchronizer. Based on the communication quality parameters, robust estimation is performed on the operating data to generate an overall state prediction value, which includes the grid connection point voltage phase difference of the multi-energy microgrid, the microgrid frequency deviation, and the reserve capacity of the multi-energy conversion unit associated with the virtual synchronizer. According to the target switching mode, the overall state prediction value is input into the model predictive control framework, and the finite-time domain optimization problem is solved in a rolling manner to generate the optimal control command. The target switching mode includes grid connection and off-grid. In the grid connection mode, the optimization problem aims to achieve voltage synchronization between the microgrid side and the grid side at a preset time. In the off-grid mode, the goal is to maintain the frequency and voltage stability of the multi-energy microgrid after disconnection. Based on the optimal control command, the virtual synchronizer and the multi-energy conversion unit are coordinated and controlled to realize the on-grid and off-grid switching of the multi-energy microgrid.

2. The method according to claim 1, characterized in that, The step of performing robust estimation on the operating data based on the communication quality parameters to generate an overall state prediction includes: Multiple internal mathematical models are established to describe the overall changes in the system, including the voltage phase difference at the grid connection point, the microgrid frequency deviation, and the changes in the reserve capacity of the multi-energy conversion unit associated with the virtual synchronous machine. Based on the communication quality parameters, calculate the impact coefficient corresponding to each set of the operating data; Based on the influence coefficient and the operating data, the current state value of each internal mathematical model is adjusted to obtain an intermediate state value; The intermediate state value is input into the corresponding internal mathematical model to calculate the overall state prediction value at the next moment. Repeatedly perform the calculation of influence coefficients, state value adjustments, and state prediction values ​​to generate a series of overall state prediction values ​​for future times.

3. The method according to claim 1, characterized in that, Before inputting the overall state prediction value into the model prediction control framework according to the target switching mode, the method further includes: Based on current and historical communication quality parameters, predict communication quality changes within a preset future time period; Based on the changes in communication quality, the adjustable range boundaries set for the virtual synchronizer and each multi-energy conversion unit in the model predictive control framework are dynamically adjusted.

4. The method according to claim 1, characterized in that, The step of inputting the overall state prediction value into the model predictive control framework according to the target switching mode, and solving the finite-time optimization problem in a rolling manner to generate the optimal control command includes: Set a finite future time period as the optimization window; Based on the target switching mode, a corresponding optimization objective function is constructed, wherein the target switching mode includes grid connection and off-grid; Obtain the overall state prediction value within the optimization window, and substitute the overall state prediction value as the initial condition for prediction into the optimization objective function corresponding to the current target switching mode; At each control moment, the adjustable control variables of the virtual synchronous machine and each multi-energy conversion unit are used as decision variables to solve the optimization objective function and obtain the initial control command sequence, which is a series of control commands within the optimization window. The first instruction in the initial control instruction sequence is extracted and used as the optimal control instruction at the current moment.

5. The method according to claim 4, characterized in that, The step of constructing a corresponding optimization objective function based on the target switching mode includes: In grid-connected mode, a first optimization objective function is constructed. The first optimization objective function is used to minimize the difference between the predicted voltage phase of the microgrid side grid connection point and the voltage phase of the grid side at the end of the optimization window. In off-grid mode, a second optimization objective function is constructed, which is used to minimize the sum of predicted microgrid frequency deviations and the sum of microgrid voltage deviations within the optimization window.

6. The method according to claim 1, characterized in that, After coordinating and controlling the virtual synchronizer and the multi-energy conversion unit according to the optimal control command to realize the grid-connected / off-grid switching of the multi-energy microgrid, the method further includes: Monitor the operating status of the multi-energy microgrid after the switching is completed, and obtain monitoring data, including the real-time frequency, real-time voltage, and output power of each energy subgrid of the multi-energy microgrid; Based on the monitoring data, the operating parameters of the virtual synchronizer are corrected, including virtual inertial parameters and virtual damping parameters; The internal mathematical model is updated based on the corrected operating parameters.

7. The method according to claim 1, characterized in that, The step of coordinating and controlling the virtual synchronizer and the multi-energy conversion unit according to the optimal control command to realize the grid-connected / off-grid switching of the multi-energy microgrid includes: The optimal control instruction is decomposed into a first sub-instruction and a second sub-instruction. The first sub-instruction is used to control the virtual synchronizer, and the second sub-instruction is used to control each of the multi-energy conversion units. During grid connection switching, control is performed according to the first sub-instruction and the second sub-instruction to achieve internal power balance of the multi-energy microgrid before the grid connection point switch is closed, and to synchronize the grid connection point voltage of the multi-energy microgrid with the grid side voltage. During off-grid switching, control is performed according to the first and second sub-instructions to maintain the frequency and voltage stability of the multi-energy microgrid after the grid connection point switch is disconnected.

8. A multi-energy microgrid on-grid / off-grid handover system based on a virtual synchronous machine, characterized in that, include: The acquisition module is used to acquire the operation data of multiple energy subgrids within the multi-energy microgrid, and to determine the communication quality parameters corresponding to the operation data by recording the arrival time and data integrity of each operation data. The operation data includes the voltage, frequency, and power data of each energy subgrid, as well as the status data of the multi-energy conversion unit associated with the virtual synchronizer. The first generation module is used to perform robust estimation on the operating data based on the communication quality parameters to generate an overall state prediction value. The overall state prediction value includes the grid connection point voltage phase difference of the multi-energy microgrid, the microgrid frequency deviation, and the reserve capacity of the multi-energy conversion unit associated with the virtual synchronizer. The second generation module is used to input the overall state prediction value into the model predictive control framework according to the target switching mode, and solve the finite-time domain optimization problem in a rolling manner to generate the optimal control command. The target switching mode includes grid connection and off-grid. The optimization problem aims to achieve voltage synchronization between the microgrid side and the grid side at a preset time in the grid connection mode, and aims to maintain the frequency and voltage stability of the multi-energy microgrid after disconnection in the off-grid mode. The control module is used to coordinate and control the virtual synchronizer and the multi-energy conversion unit according to the optimal control command, so as to realize the on-grid and off-grid switching of the multi-energy microgrid.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the multi-energy microgrid on-grid / off-grid handover method based on a virtual synchronous machine as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the implementation of the multi-energy microgrid on-grid / off-grid switching method based on a virtual synchronous machine as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Control method and system of photovoltaic energy storage system

    CN120414655A

  • Microgrid output power adjusting method and device, computer equipment and storage medium

    CN120566620A

  • Intelligent online controller for inverter based resources

    US12107509B1

  • ML-optimized VPP controller for battery powered ev charging networks

    US20250079836A1