Method for operating micro-grid, computer program, control device for controlling micro-grid, and micro-grid
By optimizing the control input vector through direct data-driven or behavior prediction algorithms, the problem of unstable voltage and frequency recovery in microgrids under rapid load ramps is solved, achieving fast and stable voltage and frequency recovery and adapting to large time delay environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ROLLS ROYCE SOLUTIONS GMBH
- Filing Date
- 2025-10-30
- Publication Date
- 2026-05-01
AI Technical Summary
Under rapid load ramp conditions, conventional control equipment in microgrids cannot quickly stabilize voltage and frequency, which may lead to severe oscillations, especially when the control delay is large and the voltage cannot be restored to the nominal value.
By using direct data-driven or behavior prediction algorithms, based on historical data and target values of output, the control input vector is optimized to minimize the deviation of the predicted output, thereby achieving power supply control. In particular, the DeePC algorithm is used to construct the Hankel matrix and constraint set for fast and stable voltage and frequency recovery.
It rapidly (within one second) restores the nominal voltage and frequency after a load ramp, avoiding violent oscillations and adapting to control delays on the order of 500ms, thus ensuring grid stability.
Smart Images

Figure CN121965725A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for operating a microgrid, a computer program, a control device for controlling a microgrid, and a microgrid itself. Background Technology
[0002] An isolated AC power grid (also known as a microgrid) powered by at least one power source or distributed generation asset (such as a power electronics power conversion system or a conventional rotating generator) (particularly distributed in the sense that they do not communicate with each other but only receive setpoints from an alternative central controller) has its outputs, such as voltage and frequency, at the AC bus, which serves as a common connection point. These outputs typically deviate from their desired nominal values under rapid load ramps, for example, on a timescale of less than one second. Only after a certain period of time will the nominal values be reached again. However, severe oscillations may occur, and in severe cases, these oscillations may remain in a steady state, i.e., the nominal voltage and frequency are never reached. This phenomenon is particularly observable when control delays (especially those caused by measurement delays) are greater than tens of milliseconds. Conventional control devices are not designed for delays as large as, for example, 500 ms, because they cannot guarantee that the voltage and frequency at the AC bus will converge to their nominal values after a load ramp. Summary of the Invention
[0003] Therefore, the object of the present invention is to provide a method for operating a microgrid, a computer program, a control device for controlling a microgrid, and a microgrid, which preferably at least partially overcomes the problems stated above.
[0004] This objective is achieved by providing the teachings of this technology, particularly the teachings of the independent claims and the teachings of the preferred embodiments disclosed in the dependent claims and the specification.
[0005] According to the first aspect, this objective is achieved in particular by providing a method for operating a microgrid, wherein the microgrid includes at least one power source and at least one dynamic load, the at least one power source and at least one dynamic load being electrically coupled via an AC bus serving as a common connection point, wherein... - In the first step S1: Based on historical data including a historical input vector of at least one input quantity, historical output vectors of at least two output quantities of the microgrid, and a reference trajectory including a target value of at least two output quantities, a control input vector is calculated by preferably using a direct data-driven or behavior prediction algorithm to minimize the deviation between the target value and the predicted output vector, wherein, - In the second step S2: at least one power source is controlled using at least a subset of the control input vectors, which serve as the actual control vector, and wherein, - At least two output quantities include the voltage amplitude and frequency at the AC bus, and the reference trace includes the nominal values of the voltage amplitude and frequency as target values.
[0006] By calculating the control input vector based on historical data and a reference trajectory including target values of at least two outputs (i.e., nominal values of voltage amplitude and frequency), the outputs can easily and smoothly return to their nominal values without exhibiting violent oscillations or persistent deviations from the target values, even within less than a second, after experiencing a load ramp. Furthermore, it is not necessary to have or build a physical or parametric model of the microgrid to achieve these results. Moreover, this method readily provides control delays on the order of, for example, 500 ms or even longer.
[0007] Preferably, the method is repeated – that is, the first step S1 and the second step S2 are repeated at frequencies ranging from 0.2 Hz to 100 Hz, preferably from 0.5 Hz to 50 Hz, preferably from 0.7 Hz to 20 Hz, and preferably from 1 Hz to 10 Hz. In particular, in this case, even with a rapid load ramp of less than one second, the fastest return to the nominal value can be achieved.
[0008] In the context of this technical teaching, microgrids are specifically understood to mean a local electrical grid capable of operating at least in islanded mode. Islanded mode is a mode in which a microgrid operates in electrical isolation (or in other words, not connected to a wider power system) from a broader power system, such as a superregional, national, or transnational power grid. In the embodiments, the microgrid is operated in islanded mode. However, it is conceivable that a microgrid can also be operated in grid-connected mode, synchronized with a larger power grid, such as a superregional, national, or transnational power grid.
[0009] In particular, microgrids are suitable for controlling the frequency and voltage amplitude at the point of common coupling (i.e., the AC bus) independently of external requirements or regulations.
[0010] In the context of this technical teaching, dynamic load is specifically understood to mean a load that varies over time and specifically experiences a load ramp, i.e., when the load is absorbed or discarded, especially on a rapid timescale of less than one second.
[0011] In the embodiment, in the first step S1, the control input vector is calculated by using a direct data-driven or behavior prediction algorithm to minimize the deviation between the target value and the predicted output vector.
[0012] In an alternative or additional step S1, the control input vector is computed to minimize the deviation between the target value and the predicted output vector by using historical data, which is included as prior knowledge of the microgrid, of the observed raw data.
[0013] In an alternative or additional step S1, the control input vector is computed by using historical data, which is included as prior knowledge of the microgrid, to achieve a direct mapping from historical data to the control input vector without the need for model identification, thereby minimizing the deviation between the target value and the predicted output vector.
[0014] In the context of this technical teaching, direct data-driven or behavior prediction algorithms are specifically understood to mean algorithms that use observed raw data (historical data) as prior knowledge about the system, in this case, a microgrid, rather than based on (parametric) models. In particular, such data-driven algorithms are sometimes described as nonparametric models.
[0015] In an embodiment, in the first step S1, the control input vector is further computed based on the initial input vector of at least one input quantity and the initial output vectors of at least two output quantities (the initial input vector and the initial output vector are hereinafter collectively referred to as "initial data"). In the second step S2, the actual output vectors of the at least two output quantities are measured while controlling at least one power source using the actual control vector. The first step S1 and the second step S2 are repeated. In the first step S1 (particularly from the second iteration onwards), the initial input vector is updated using the actual control vector, and the initial output vector is updated using the actual output vector. Thus, the algorithm advantageously uses data (initial data) and prior knowledge (historical data) to predict the control input vector and updates the initial data in each step, enabling the algorithm to react quickly to any changes.
[0016] In the context of this technical teaching, a vector being “updated” is specifically understood to mean that a certain number of the first vector elements are cancelled, the remaining vector elements are rearranged to replace the cancelled elements, i.e., to fill the gaps, and the same certain number of the last vector elements (in which the gaps are ultimately preserved) are specifically replaced by the new values according to a first-in-first-out scheme.
[0017] In the embodiments, data-enabled predictive control (DeePC) is used as a behavior- or direct data-driven predictive algorithm, as outlined, for example, in "Data-Enabled Predictive Control: A Brief Introduction to DeePC" by J. Coulson, J. Lygeros, and F. Dörfler, pp. 307-312, presented at the 18th European Control Conference (ECC) in Naples, Italy, 2019, and in "Behavior-Based Data-Driven Control: From Theory to Applications in Power Systems" by I. Markovsky, L. Huang, and F. Dörfler, pp. 28-68, Volume 43, Issue 5, IEEE Control Systems Journal, 2023. This is a particularly advantageous design for the method, offering both reliability and cost-effectiveness in terms of computational performance.
[0018] In this embodiment, at least two input values are used as at least one input value.
[0019] Preferably, at least one power source includes a DC power source and a voltage source converter, preferably an inverter, wherein at least one power source is electrically coupled to a common connection point via the voltage source converter.
[0020] Preferably, at least two input quantities are active power and reactive power. Specifically, in this way, the microgrid can control both the frequency and voltage amplitude at the AC bus independently of external requirements or regulations in islanded mode. The frequency is preferably controlled by corresponding changes in active power, and the voltage amplitude is controlled by corresponding changes in reactive power.
[0021] To avoid being bound by theory, the DeePC algorithm utilizes the given historical vectors. h Historical data: , (1) Where the historical input vector , (2) and historical output vector , (3) Each includes T Elements of discrete time steps, wherein each element further comprises elements with input and output quantities respectively (generally, p Each output quantity and m In this case, the input quantity is... p = m =2) Vectors with the same number of elements, in particular: , (4) Historical active power and historical reactive power In the firsti Each time step, and, , (5) Historical frequency and historical voltage amplitude In the first i Each time step.
[0022] Next, we have depth (i.e., number of rows). L ,(in T ≥ L Hankel matrix , Constructed based on historical vectors, and the rows of these Hankel matrices use (arbitrary) integers. N To divide, so that: , (6) This results in: , (7) , (8) in, U p , Y p Each represents the first part of the corresponding Hankel matrix in (7) and (8). T ini Each block of lines, and U f , Y f Each represents the last of the corresponding Hankel matrix in (7) and (8). N Each block of lines.
[0023] According to Willems' fundamental lemma, if the components of the response signal of a controllable linear time-invariant system are sufficiently high-order continuous excitations, then the window of the signal spans the entire system behavior. This lemma is applied to obtain the condition that the state trajectory of the state representation spans the entire state space (“Notes on Excitation Duration” by Jan C. Willems, Ivan Markovsky, Paolo Rapisarda, and Bart LM De Moor at the 43rd IEEE Conference on Decision and Control, Atlantis, Bahamas, December 14-17, 2004). Specifically, if the Hankel matrix... If it is full rank, then the signal u d , y d yes L Continuous motivation at the level.
[0024] The reference trajectory is given as follows: , (9) It is in the subsequent time step i reference vector r i The time series, where each reference vector includes a target value for at least one output quantity, is as follows: , (10) Target frequency f tar,i and target voltage amplitude U tar,i In time step i .
[0025] Target frequency f tar,i and target voltage amplitude U tar,i It can be a constant nominal value, that is, for each time step. i It is constant, for example, 50 Hz and 230 V for Europe or 60 Hz and 110 V for the United States.
[0026] Initial data is provided as the initial input vector (with) T ini There are vector value elements, and therefore have m x T ini (a scalar element) , (11) in , (12) For each element i Initial active power value P ini,i and reactive power value Q ini,i ,as well as Initial output vector (with) T ini There are vector value elements, and therefore have p x T ini (a scalar element) , (13) in , (14) For each element i Initial frequency value f ini,iand voltage amplitude value U ini,i .
[0027] Furthermore, the constraint set can be given as: , (15) As m The input constraints of each input quantity, in which m =2, and , (16) As p The output constraints of each output quantity, in which p = m =2, and output cost matrix , (17) and control cost matrix (18) However, in the preferred embodiment, the control cost matrix It is 0 because it generates a signal that makes it difficult (or even meaningless) to allocate any cost to it.
[0028] In the embodiment, it serves as a control input vector. u , operation N >1 subsequent control vector u i The sequence. Preferably, the predicted output vector is also included. y As N >1 subsequent predicted output vector y i The sequence is used for calculation.
[0029] Control input vector u (has the function of) N Subsequent control vectors of each vector value element u i And therefore possess m x N (scalar elements) and the predicted output vector y (has the function of) N The subsequent predicted output vector of each vector value element y i And therefore possess p x N (a scalar element) is now passed through the current time step. t The following problem will be solved to address... N The prediction range is calculated for each time step, where the prediction range is calculated for each time step. j Summing over and 0 < t< N –1: Subject to: (19) . Where, for any vector x sum matrix X : x (20) Preferably, only the subsequent control vectors referred to as the control range u i – k of k < N A subset of elements u a,j Actual control vector u a use: . (twenty one) microgrids from ( t +1) to t + k Using actual control vectors within the time window u a To control: , (twenty two) Equation (22) means that the element (It itself is a vector containing active power and reactive power values as vector elements) used in time steps It controls at least one power source.
[0030] In serving as a microgrid for control and from ( t +1) to t + k The actual output vector is measured in response to any further changes (such as load changes) within the time window while controlling at least one power supply. y a This results in: , (twenty three) as well as , (twenty four) Equation (24) means that the element (It itself is a vector containing frequency values and voltage amplitude values as vector elements) at time step Take the measurement.
[0031] In an embodiment, N The value is between 5 and 70, preferably between 10 and 50. This selection specifically ensures that even with a delay as large as 500 ms, the voltage and frequency at the AC bus converge to the nominal value on a short time scale following the load ramp.
[0032] Alternatively, or in the alternative options... k Equal to 1 to 3, preferably k It equals 1. Advantageously, when k Within this range or with corresponding values, the algorithm allows for very accurate predictions.
[0033] Subsequent time steps t'=t + k In this context, the initial data is updated by setting (the equal sign is understood as the assignment operator in the following equations (25) to (28): (25) (26) (27) , (28) And by using time steps t’ = t + k The process is repeated by solving equation (19).
[0034] Preferably, the scheme iterates continuously during the operation of the microgrid.
[0035] In the embodiments, a single time step has a length of 10 ms to 5 s, preferably 20 ms to 2 s, preferably 50 ms to 1.5 s, and preferably 100 ms to 1 s. Therefore, the entire iteration is repeated at a frequency from 0.2 Hz to 100 Hz, preferably from 0.5 Hz to 50 Hz, preferably from 0.7 Hz to 20 Hz, and preferably from 1 Hz to 10 Hz.
[0036] In the embodiment, in the first step, for the optimal g* time step t The following steps solve (19); in the second step, the optimal control input vector is obtained. u* The operation is performed as: ; (29) In the third step, the actual control vector u a Depend on u *Previousk The elements are constructed; and in the fourth step, in subsequent times... t'=t + k The initial data is updated according to equations (25) to (28). In the fifth step, the first step is performed at a time step. t'=t + k Repeat, etc. In particular, due to the preferred... R =0, therefore the last term of the sum in (19) disappears, and people can obtain the sum by... U p g = u ini or Y p g = y ini To solve for a large number of different vectors g’ Then for each g’ Operations y’ = Y f g’ Then optimize by minimizing the sum of (19). g’ and y’ To obtain the optimal in the first step g* And finally, in the second step, the operation is performed from (29). u* .
[0037] In the embodiment, a more complex problem (19') is used instead of (19) to be suitable for noise: Subject to: (19') , With auxiliary slack variables and regularization parameters ,and express The low-rank matrix approximation.
[0038] In particular, the regularization parameter ,parameter T , N , T ini and matrix Q and R These are the hyperparameters of the algorithm that are preferably optimized.
[0039] In particular, the regularization parameter λ gPrimarily used for managing imprecise data. Regularization is applied to address problems caused by noise, interference, or discrepancies between systems generating real data (e.g., when the system is not perfectly linear time-invariant (LTI)). Parameters λ g The degree of regularization is controlled to strike a balance between tightly fitting the model to the data and maintaining the desired system behavior. This balance can be particularly relevant to robust performance in the presence of data defects. λ y Specifically, this relates to the output. This parameter controls the trade-off between the model's output fidelity and its generalization ability. Essentially, especially in the presence of noise, λ y Determine how strictly the model's output should conform to the observed data, compared to allowing some deviation to potentially achieve better generalization or robustness. Output cost matrix. Q Designed to penalize tracking errors. By... Q Tuning can enhance the system's tracking performance and minimize control errors.
[0040] In an embodiment, T It is at least 200, preferably at least 500, preferably at least 800, and preferably no more than 1000. Alternatively, in the alternative options, λ g It can be selected to be up to 1000, preferably up to 500, and more preferably up to 100. Alternatively, in the alternatives, λ y It can be selected to be up to 5000, preferably up to 2500, preferably up to 1000, and preferably up to 100.
[0041] In one embodiment, a grid-forming voltage source converter is controlled as at least one power source. Advantageously, the microgrid can be fully regulated in islanded mode by controlling the grid-forming voltage source converter to define and maintain both voltage amplitude and frequency.
[0042] In the context of this technical teaching, a grid-forming voltage source converter is understood to mean a converter capable of adjusting its output power and voltage amplitude, particularly in response to grid conditions, and preferably coordinated with other power sources to balance supply and demand. Specifically, a grid-forming converter is a converter capable of adjusting its output active and reactive power, particularly to maintain stable values of frequency and voltage amplitude even when the load changes.
[0043] Preferably, the grid voltage source converter is an inverter.
[0044] In this embodiment, at least one grid-following voltage source converter is further controlled as an additional power source among at least one power source. Advantageously, the additional power source can be integrated into the microgrid to meet greater power demands. The at least one grid-following voltage source converter can follow the power grid to form a voltage source converter.
[0045] In the context of this technical teaching, a grid follower voltage source converter is understood to mean a converter adapted to synchronize its output with the voltage and frequency on the power grid.
[0046] Preferably, the grid-following voltage source converter is an inverter.
[0047] In this embodiment, the static load is electrically coupled to a common connection point.
[0048] In this embodiment, at least one power source is a constant (or controllable) power source. This is particularly advantageous when combined with a grid-formed voltage source converter to ensure stable and continuous values for both frequency and voltage amplitude.
[0049] In the context of this technical teaching, a constant and / or controllable power source is understood to mean a power source capable of providing constant, but preferably controllable or adjustable power over a timescale of at least one hour, preferably at least several hours, preferably at least several days.
[0050] In embodiments, such a constant (and / or controllable) power source includes an energy storage device combined with a voltage source converter, wherein preferably, the energy storage device is a mechanical, electrochemical, magnetic, thermal, or chemical energy storage device, and preferably a battery.
[0051] In the alternatives, at least one power source is a variable power source. Using the methods disclosed herein, it is advantageously possible to stably and easily utilize variable power sources in microgrids.
[0052] In the context of this technical teaching, a variable power source is understood to mean a power source that provides varying power depending on external conditions.
[0053] In this embodiment, such a variable power source is a renewable energy source, particularly a wind turbine or a photovoltaic power plant.
[0054] In an embodiment, the microgrid includes at least two power sources: at least one constant (and / or controllable) power source as a first power source and at least one variable power source as a second power source.
[0055] In this embodiment, historical data is provided before the microgrid is operated.
[0056] Preferably, historical data is provided from previous test runs or simulations. This is the simplest way to implement the method.
[0057] Alternatively, in an alternative scenario, historical data is collected and updated during the operation of the microgrid. In this case, in addition to updating the initial data, the algorithm can be advantageously updated further; thus, the algorithm is particularly flexible and capable of responding to even unforeseen developments (both internal and external).
[0058] In an embodiment, the microgrid includes more than one power source, and the method includes droop control for load sharing among the power sources (preferably for both frequency and voltage amplitude). The method may also include supervisory control to supplement the droop control, particularly to adapt (specifically, shift) the droop slope when the load changes, in order to maintain constant values for both frequency and voltage amplitude.
[0059] In this embodiment, the microgrid is operated in islanded mode.
[0060] According to the second aspect, this objective is achieved in particular by providing a computer program comprising instructions that, when executed by a computer, cause the computer to perform the method according to the invention or at least any of the methods disclosed above in the embodiments of the method. With respect to the computer program, the same advantages are achieved, particularly as explained above with respect to the method.
[0061] According to the third aspect, this objective is achieved in particular by providing a control device for controlling a microgrid, which is adapted to carry out the method according to the invention or at least one of the methods disclosed above. The same advantages are achieved, particularly with respect to the method or computer program, as explained above.
[0062] In embodiments, the control device is adapted to employ droop control to manage load sharing between different power sources, preferably for both frequency and voltage amplitude. The control device may be further adapted to employ supervisory control to supplement droop control, particularly to adapt the droop slope (in particular, shift) when the load changes, in order to maintain constant values for frequency and voltage amplitude.
[0063] According to the fourth aspect, this objective is achieved in particular by providing a microgrid having at least one power source and at least one dynamic load, wherein the at least one power source and at least one dynamic load are electrically coupled via an AC bus serving as a common connection point, wherein the microgrid also includes a control device according to the invention or a control device according to at least one of the embodiments of the control device disclosed above, the control device being operatively connected to and adapted to control the at least one power source. With respect to the microgrid, the same advantages are achieved, particularly as explained above regarding the method, computer program, or control device.
[0064] In this embodiment, the microgrid includes an energy storage device combined with a voltage source converter as at least one power source. The energy storage device may be a mechanical, electrochemical, magnetic, thermal, or chemical energy storage device, preferably a battery. The voltage source converter is preferably an inverter.
[0065] In the embodiments, the microgrid also includes renewable energy sources (preferably photovoltaic power plants or wind turbines) as at least one power source. Attached Figure Description
[0066] The invention will be further described in detail below with reference to the accompanying drawings. In the drawings: Figure 1 An embodiment of a microgrid with control devices is shown, and, Figure 2 A schematic representation of an embodiment of a method for operating a microgrid is shown. Detailed Implementation
[0067] Figure 1 An embodiment of a microgrid 1 is shown, including a control device 19 adapted to implement a method for operating the microgrid 1.
[0068] The microgrid 1 has at least one power source 3 and at least one dynamic load 5, wherein the at least one power source 3 and the at least one dynamic load 5 are electrically coupled via an AC bus serving as a common connection point 7. A control device 19 is operatively connected to the at least one power source 3 and is adapted to control the at least one power source 3.
[0069] like Figure 1 As depicted, the microgrid 1 includes a first power source 3.1 as at least one power source 3, the first power source 3.1 including an energy storage device 21 combined with a voltage source converter 23 as a first voltage source converter 23.1. The microgrid 1 also includes a second power source 3.2, the second power source 3.2 also including an energy storage device 21 combined with a voltage source converter 23 as a second voltage source converter 23.2. Each energy storage device 21 can be a mechanical, electrochemical, magnetic, thermal, or chemical energy storage device; preferably, it is a battery.
[0070] Specifically, the first voltage source converter 23.1 is a grid forming voltage source converter 13. Furthermore, the second voltage source converter 23.2 is a grid following voltage source converter 15.
[0071] The embodiment of microgrid 1 also includes renewable energy (preferably, photovoltaic power station 25 or wind turbine) as a third power source 3.3, which has a third voltage source converter 23.3, which is a grid-following voltage source converter 15.
[0072] The first power source 3.1 and the second power source 3.2 are controllable power sources 3, and the third power source 3.3 is a variable power source 3.
[0073] Preferably, the control device 19 is adapted to employ droop control to manage load sharing between different power sources 3, most preferably for both frequency and voltage amplitude. The control device 19 may be further adapted to employ supervisory control to supplement the droop control, particularly to adapt the droop slope (in particular, shift) when the load changes, in order to maintain constant values for frequency and voltage amplitude.
[0074] The static load 17 can be electrically coupled to the common connection point 7.
[0075] Figure 2 A schematic representation of an embodiment of a method for operating microgrid 1 is shown.
[0076] In the first step S1, based on the historical input vector including two input quantities of the microgrid (i.e., active power and reactive power) and at least two output quantities 9 of the microgrid 11 (i.e., voltage amplitude 9.1 and frequency 9.2 at the point of common coupling 7 (see...)... Figure 1 The control input vector 27 is computed using historical data of the historical output vector and a reference trajectory including target values (e.g., 50 Hz and 230 V) of at least two output quantities, preferably using a direct data-driven or behavior prediction algorithm (specifically, data-enabled predictive control (DeePC) based on one of the equations (19) or (19') given above) to minimize the deviation between the target values and the predicted output vector 29. Alternatively or additionally, the historical data is used as observed raw data included in the prior knowledge of the microgrid, preferably to achieve a direct mapping from the historical data to the control input vector without the need for model identification.
[0077] In the second step S2, at least one of the power sources 3 utilizes the actual control vector 11 (see... Figure 1 The actual control vector 11 is at least a subset of the control input vector 27.
[0078] Preferably, in the first step S1, the control input vector 27 is further calculated based on initial data including an initial input vector 31 of two input quantities and an initial output vector 33 of two output quantities, wherein, in the second step S2, the actual output vector 35 of the two output quantities is measured when controlling at least one power supply 3 using the actual control vector 11.
[0079] Repeat the first step S1 and the second step S2, wherein in the first step S1, the initial input vector 31 is updated using the actual control vector 11, and the initial output vector 33 is updated using the actual output vector 35.
[0080] In this embodiment, historical data may be provided prior to the operation of microgrid 1. Preferably, the historical data is provided from previous test runs or simulations. Alternatively, or in an alternative, the historical data may be collected and updated during the operation of microgrid 1.
Claims
1. A method for operating a microgrid (1), wherein, The microgrid (1) includes at least one power source (3) and at least one dynamic load (5), and the at least one power source (3) and the at least one dynamic load (5) are electrically coupled via an AC bus serving as a common connection point (7), wherein, In a first step S1: Based on historical data including a historical input vector of at least one input quantity, a historical output vector of at least two output quantities (9) of the microgrid, and a reference trajectory including target values of the at least two output quantities, the control input vector (27) is calculated by minimizing the deviation between the target value and the predicted output vector (29), wherein, In a second step S2: At least a subset of the control input vector (27) serving as the actual control vector (11) is used to control the at least one power source (3), and wherein, The at least two output quantities (9) include the voltage amplitude (9.1) and the frequency (9.2) at the AC bus, and the reference trajectory includes nominal values of the voltage amplitude (9.1) and the frequency (9.2) as the target values.
2. The method according to claim 1, wherein, In the first step S1: The control input vector (27) is further calculated based on an initial input vector (31) of the at least one input quantity and an initial output vector (33) of the at least two output quantities (9), wherein, In the second step S2: The actual output vector (35) of the at least two output quantities (9) is measured when using the actual control vector (11) to control the at least one power source (3), and wherein, The first step S1 and the second step S2 are repeated, wherein in the first step S1, the initial input vector (31) is updated using the actual control vector (11), and the initial output vector (33) is updated using the actual output vector (35).
3. The method according to any one of the preceding claims, wherein, The control input vector (27) is calculated using a direct data-driven or behavioral prediction algorithm in the first step S1, and preferably data-enabled predictive control (DeePC) is used as the behavioral or direct data-driven prediction algorithm.
4. The method according to any one of the preceding claims, wherein, At least two input quantities are used as the at least one input quantity, and preferably the at least two input quantities are active power and reactive power.
5. The method according to any one of the preceding claims, wherein, A sequence of N>1 subsequent control vectors is calculated as the control input vector (27), wherein preferably only a subset of k<N of the subsequent control vectors is used as the actual control vector (11), wherein, preferably N is equal to 5 to 70, preferably 10 to 50, and / or wherein k is equal to 1 to 3, preferably 1.
6. The method according to any one of the preceding claims, wherein, As the at least one power source (3), a grid-forming voltage source converter (13) is controlled.
7. The method according to claim 6, wherein, Additionally, at least one grid following the voltage source converter (15) is controlled as an additional power source (3) among the at least one power source (3).
8. The method according to any one of the preceding claims, wherein, The at least one power source (3) is a constant and / or controllable power source or a variable power source (3).
9. The method according to any one of the preceding claims, wherein, The historical data: Preferably provided from previous test runs or simulations before operating the microgrid (1), and / or It is collected and updated during the operation of the microgrid (1).
10. The method according to any one of the preceding claims, wherein, The microgrid (1) is operated in islanded mode.
11. A computer program comprising instructions that, when executed by a computer, cause the computer to perform the method according to at least one of claims 1 to 10.
12. A control device (19) for controlling a microgrid (1), the control device (19) being adapted to perform the method according to at least one of claims 1 to 10.
13. A microgrid (1) having at least one power source (3) and at least one dynamic load (5), wherein the at least one power source (3) and the at least one dynamic load (5) are electrically coupled via an AC bus as a common connection point (7), wherein the microgrid (1) further includes a control device (19) according to claim 12, the control device (19) being operatively connected to the at least one power source (3) and adapted to control the at least one power source (3).
14. The microgrid (1) according to claim 13, wherein, The microgrid (1) includes an energy storage device (21) combined with a voltage source converter (23) as the at least one power source (3).
15. The microgrid (1) according to at least one of claims 13 and 14, wherein, The microgrid (1) also includes a photovoltaic power station (25) as the at least one power source (3).