Accelerated distributed scheduling method and system for smooth switching between island and grid-connected mode

By introducing the Lagrange multiplier method and acceleration factor into the microgrid, a distributed scheduling algorithm was established, which solved the problems of slow convergence speed and non-smooth mode switching in the distributed scheduling algorithm. This enabled fast response and stable operation mode switching, improving the operational stability and economy of the microgrid.

CN122136996APending Publication Date: 2026-06-02ZHONGYUAN ENGINEERING COLLEGE +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGYUAN ENGINEERING COLLEGE
Filing Date
2026-01-09
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing distributed scheduling algorithms converge slowly in microgrids, struggle to cope with real-time electricity price fluctuations and load changes, and lack an effective mechanism for smooth switching between islanded and grid-connected modes, leading to drastic power command jumps and system oscillations that threaten safe and stable operation.

Method used

The Lagrange multiplier method is used to construct the Lagrange function and establish the Lagrange equation. The incremental cost and power mismatch of the generator are selected as consistency variables. An accelerated distributed scheduling algorithm is designed. An acceleration factor is introduced in the grid-connected mode and disabled in the islanded mode. A smooth transition between modes is achieved through a cooperative state transition mechanism.

Benefits of technology

It achieves rapid response in grid-connected mode, stable operation in islanded mode, and seamless and smooth switching between the two modes, thereby improving the dynamic response capability and operational stability of the microgrid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122136996A_ABST
    Figure CN122136996A_ABST
Patent Text Reader

Abstract

This invention provides an accelerated distributed scheduling method and system for smooth switching between islanded and grid-connected modes, comprising: establishing a microgrid scheduling problem model; introducing the Lagrange multiplier method to construct a Lagrange function and establish a Lagrange equation to solve the microgrid scheduling problem model; selecting the incremental cost and power mismatch of generators as consistency variables according to the Lagrange equation, establishing a distributed scheduling algorithm model; using the model to perform iterative calculations based on received instructions representing the current operating mode, outputting the optimal power of each generator unit; the distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor in grid-connected mode, and disables the acceleration factor in islanded mode to use a traditional consistency algorithm; when the operating mode switching instruction is triggered, a cooperative state transition mechanism is used to achieve a smooth transition between modes, ensuring power balance in stable conditions. This invention can perform accelerated distributed scheduling for smooth switching between islanded and grid-connected modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart grid dispatching technology, and specifically refers to an accelerated distributed dispatching method and system for smooth switching between islanded and grid-connected modes. Background Technology

[0002] With the increasing penetration rate of distributed energy resources in microgrids, distributed scheduling based on consensus algorithms has become an important technical route to replace traditional centralized scheduling due to its advantages in reliability, scalability, and privacy protection. However, existing distributed scheduling algorithms still face severe performance and adaptability challenges when applied to practical engineering applications.

[0003] On the one hand, their convergence speed is generally slow, making it difficult to meet the dynamic needs of microgrids in tracking real-time electricity price fluctuations and responding to rapid load changes, resulting in compromised operational economy and delayed dynamic response. On the other hand, and more critically, most existing solutions are rigidly designed for islanded or grid-connected single modes, lacking effective mechanisms for smooth mode switching. When a mode switch occurs, a "hard switch" is often required between two independent control logics, which can easily trigger drastic jumps in power commands and system oscillations, seriously threatening the safe and stable operation of the microgrid. Summary of the Invention

[0004] To address the technical problems existing in the prior art, this invention provides an accelerated distributed scheduling method and system for smooth switching between islanded and grid-connected modes, the technical solution of which is as follows:

[0005] On the one hand, a method for accelerating distributed scheduling with smooth switching between islanded and grid-connected modes is provided, the method including:

[0006] S1. Establish a microgrid scheduling problem model;

[0007] S2. Introduce the Lagrange multiplier method, construct the Lagrange function, and establish the Lagrange equation to solve the microgrid scheduling problem model.

[0008] S3. Based on the Lagrange equation, the incremental cost and power mismatch of the generator are selected as consistency variables, and a distributed scheduling algorithm model is established. The distributed scheduling algorithm model is used to perform iterative calculations based on the received instructions representing the current operating mode, and the optimal power of each generator set is output. In grid-connected mode, the distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor. In islanded mode, the acceleration factor is disabled to use the traditional consistency algorithm.

[0009] S4. When the operating mode switching command is triggered, a smooth transition between modes is achieved through a cooperative state transition mechanism to ensure power balance when stable.

[0010] Optionally, S1 specifically includes:

[0011] S11, Establishing the first step in microgrid dispatching Objective function for generator power generation cost :

[0012]

[0013] in, , This represents the number of generator nodes in the microgrid. For the first generator

[0014] 'output power' All are the first The power generation cost coefficient of a generator;

[0015] S12. The microgrid scheduling problem model is established as follows:

[0016]

[0017] In this equation, (1) is the objective function, and (2) is the supply and demand balance constraint at the power generation and consumption ends.

[0018] Equation (3) is the first Upper and lower limits of the generator's output power. and These are mode switching parameters used in distributed scheduling algorithms. The time indicates the island mode. The time indicates the grid connection mode. The main grid electricity price, also known as the main grid incremental cost, It is the total power exchanged between the microgrid and the main grid. For total power requirements, It is the first The power requirements of the generator. For the first Minimum output power limit for generators. For the first Maximum output power limit of the generator.

[0019] Optionally, S2 specifically includes:

[0020] By introducing the Lagrange multiplier method, we construct the Lagrange function and establish the following Lagrange equation:

[0021]

[0022] in It is a constructed Lagrangian function. It is the introduced Lagrange multiplier, also known as incremental cost;

[0023] The necessary and sufficient condition for minimizing power generation costs is that the first derivative of the Lagrange function is zero. Therefore, the Lagrange function... Calculate the power of each generator separately. Power exchange between microgrids and the main grid and Lagrange multipliers The partial derivative of , and set it equal to zero:

[0024]

[0025] At the same time, define the first The Lagrange multipliers of the generator are also the multipliers of each generator node. incremental cost for:

[0026]

[0027] According to the formula The conclusion is that for the power generation cost to reach its minimum, the incremental cost of all generators must be equal, and equal to a uniform incremental cost. This is called the optimal solution. According to the formula Conclusion: When The optimal solution when the grid is connected. According to the formula The conclusion is that when the power generation cost reaches its minimum value, the supply and demand balance constraint on both the power generation and consumption sides is satisfied.

[0028] Optionally, in step S3, based on the Lagrange equation, the incremental cost and power mismatch of the generator are selected as consistency variables to establish a distributed scheduling algorithm model, specifically including:

[0029] Incremental cost of selecting generator and power mismatch As a consistency variable, power mismatch Essentially, it's about each power generation node. Local load demand Compared with its current power generation capacity The estimator of the difference aims to be iteratively updated using a distributed algorithm to ensure that all nodes... When all nodes reach the same value, there is a power mismatch. Reaching 0, that is, all equal All The value is equal to 0, thus minimizing the power generation cost while satisfying the constraints. At this point, through... Calculate the optimal solution for output power. :

[0030]

[0031] in, No. The incremental cost corresponding to the upper limit constraint on the output power of a generator. No. The incremental cost corresponding to the lower limit constraint of the generator output power. It is the optimal solution for incremental cost. It is the first The output power of a generator at which the cost is minimized;

[0032] Incremental cost Update formula:

[0033]

[0034] in, It is the first A generator in Incremental cost per moment It is the first A generator in Local power mismatch at any time It is the first The set of neighboring nodes of the generator. and For mode switching parameters, As an acceleration factor, and , For consistent step size, For feedback gain coefficient, These are the adjacency matrix elements of the communication topology. To represent the power generation unit Whether it is connected to the leader node, where the index of the leader node is 0, representing the main power grid;

[0035] Power mismatch Update formula:

[0036]

[0037] in, For intermediate calculation variables, It is an auxiliary variable, only used at the switching time. The value is 1 at one time and 0 at other times. It is a power generation unit exist The power distribution variables of the main power grid at any given time. and It is a power generation unit exist The amount of compensation based on power mismatch at all times;

[0038] Intermediate calculation variables The update formula is:

[0039]

[0040] in, For consistent step size, It is a power generation node Selection of power generation cost coefficient in grid-connected mode It is a power generation node exist Output power at any given moment;

[0041] Power generation node exist Output power at time The update formula is:

[0042]

[0043] Compensation based on power mismatch The update formula is:

[0044]

[0045] Compensation based on power mismatch The update formula is:

[0046]

[0047] in It is the first The optimal output power of the generator when connected to the grid is determined by... It was calculated in time;

[0048] Main grid power distribution variables The update formula is:

[0049]

[0050] in, It is a power generation node exist Changes in the power distribution of the main power grid at any given time.

[0051] Optionally, the updated initial value setting specifically includes:

[0052] Set initial values ​​for incremental cost and power mismatch:

[0053]

[0054] in It is the first The incremental cost of a generator at time 0. It is the first The power mismatch at time 0 of the generator, i.e., the generation node. initial value, It is the first The initial output power of the generator is determined under grid-connected mode. and The update formula not only requires The value at time also needs to be determined. The initial value set for the update formula in grid-connected mode is not only at time 0, but also at time -1, i.e. and ,and Yes, yes, the first The transient balance guide value of the generator. It is the first The main grid power distribution variables of the generators at the initial moment;

[0055] The calculation formula is:

[0056]

[0057] Optionally, in step S3, the distributed scheduling algorithm model is used to perform iterative calculations based on the received instructions representing the current operating mode, and the optimal power of each generator unit is output, specifically including:

[0058] S31. When the received instruction for the current operating mode is At this time, that is, in the isolated mode, at this time and The update formula is a classic, well-proven traditional consensus algorithm:

[0059]

[0060] In islanded mode, the main grid power allocation variable in the algorithm Forced to zero, the power balance objective becomes a strict internal self-balancing equation: the total power generation of the microgrid must equal the total load when it is stable. The algorithm will seek a unified incremental cost that minimizes the total power generation cost of the entire microgrid by coordinating all distributed generators within the microgrid. In this state, the microgrid achieves true self-closed-loop management and does not depend on the external power grid;

[0061] S32, When the received instruction for the current operating mode is At this time, it is in grid-connected mode. and Execute the formula to accelerate consistent updates:

[0062]

[0063] S321, Each power generation node Exchange incremental costs with neighboring nodes in the communication network. and power mismatch Each power generation node uses the received information to execute the accelerated consistency update formula, the core of which lies in the introduction of an acceleration factor. and historical status information and ,because The "leadership follower" item in the formula Once activated, generation nodes directly connected to the main grid will prioritize tracking the incremental costs of the main grid. And this goal is rapidly disseminated across the entire internet through the network, introducing a "momentum term". This significantly accelerates the convergence process, thereby driving up the incremental costs of all distributed generation nodes within the microgrid. Incremental cost of rapid convergence to the main grid ;

[0064] S322, Generating nodes connected to the main power grid Based on intermediate calculation variables Calculate the change in power distribution in the main power grid. ;

[0065] S323, Each power generation node is based on intermediate calculation variables Changes in power distribution in the main power grid And the introduced "momentum term" Update your own power mismatch value ;

[0066] Repeat steps S321 to S323 until stability is achieved. At this point, all generating nodes... incremental cost The incremental costs are very close to those of the main power grid. And no further significant changes occur, the change in power distribution in the main power grid and power mismatch value All are 0, and at this time the power reaches a balanced state, that is, the total power generation of all power generation nodes plus the power allocation value of the main grid equals the total load power.

[0067] Optionally, S4 specifically includes:

[0068] At any moment Upon receiving the mode switching command, it uses auxiliary variables Achieving a coordinated state transition triggers a brief, one-time special calculation cycle to synchronously adjust the power mismatch. Status value:

[0069] At time When the mode switching command is received, it is because Switch to That is, when switching from island mode to grid-connected mode, At any given time, the grid-connected mode is in operation, and the auxiliary variable is... exist The time is 1, and at this time... Activated This compensation amount undergoes a jump, ensuring convergence while maintaining power balance in subsequent iterations. Time, auxiliary variable The value is 0. At this point, the update formula is the accelerated consensus algorithm for grid-connected mode, and the values ​​of each power generation node are 0. Driven by the acceleration mechanism, it quickly converges to a unified state. Main power grid power distribution variables It is also dynamically adjusted to the optimal value based on the economics within the microgrid, while ensuring that the total power generation of all power generation nodes plus the total power allocation value of the main grid equals the total load power.

[0070] At time When the mode switching command is received, it is because Switch to That is, when switching from grid-connected mode to islanded mode, In isolated mode, the auxiliary variable... exist The time is 1, and at this time... Activated This compensation amount undergoes a jump, ensuring convergence while maintaining power balance in subsequent iterations. Time, auxiliary variable The value is 0. In this case, the update formula is the classic, well-proven traditional consensus algorithm in islanded mode, where each generator node... It smoothly converges to a uniform incremental cost that minimizes the total generation cost of the entire microgrid. At the same time, it ensures that the total power generation of the power generation nodes is equal to the total load power.

[0071] On the other hand, an accelerated distributed scheduling system is provided for smooth switching between islanded and grid-connected modes, the system comprising:

[0072] The first module is used to establish a model for the microgrid scheduling problem.

[0073] The second module is used to introduce the Lagrange multiplier method, construct the Lagrange function, and establish the Lagrange equation to solve the microgrid scheduling problem model.

[0074] The distributed scheduling module is used to select the incremental cost and power mismatch of the generator as consistency variables according to the Lagrange equation, establish a distributed scheduling algorithm model, and perform iterative calculations using the distributed scheduling algorithm model based on the received instructions representing the current operating mode, and output the optimal power of each generator set. The distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor in grid-connected mode, and disables the acceleration factor in islanded mode to use the traditional consistency algorithm.

[0075] The smooth transition module is used to achieve a smooth transition between modes through a cooperative state transition mechanism when the operation mode switching command is triggered, so as to ensure power balance when stable.

[0076] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to realize the aforementioned accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes.

[0077] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to realize the above-mentioned accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes.

[0078] The beneficial effects of the technical solution provided by this invention include at least the following:

[0079] This invention can simultaneously achieve rapid response in grid-connected mode, stable operation in islanded mode, and seamless and smooth switching between the two modes. Attached Figure Description

[0080] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0081] Figure 1This is a flowchart of an accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes provided by an embodiment of the present invention;

[0082] Figure 2 This is a general block diagram of an accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes provided in an embodiment of the present invention;

[0083] Figure 3 This is a schematic diagram of the physical structure and communication topology of the microgrid system in an embodiment of the present invention;

[0084] Figure 4 This is a schematic table for selecting power generation parameters provided in an embodiment of the present invention;

[0085] Figure 5 This is a schematic diagram illustrating the convergence result of incremental cost in an embodiment of the present invention;

[0086] Figure 6 This is a schematic diagram of the convergence result of the output power in an embodiment of the present invention;

[0087] Figure 7 This is a schematic diagram of the convergence result of power mismatch in an embodiment of the present invention;

[0088] Figure 8 This is a schematic diagram illustrating the convergence result of supply and demand balance in an embodiment of the present invention;

[0089] Figure 9 This is a schematic diagram of the convergence process in the grid-connected mode with an acceleration factor added in an embodiment of the present invention;

[0090] Figure 10 This is a schematic diagram of the convergence process without an acceleration factor in the grid-connected mode of this invention embodiment;

[0091] Figure 11 This is a block diagram of an accelerated distributed scheduling system for smooth switching between islanded and grid-connected modes provided in an embodiment of the present invention;

[0092] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0093] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0094] This invention provides an accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes. This method can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The flowchart of this method is shown below. Figure 2 The diagram shown is an overall block diagram of the method. The processing flow may include the following steps:

[0095] S1. Establish a microgrid scheduling problem model;

[0096] Optionally, S1 specifically includes:

[0097] S11, Establishing the first step in microgrid dispatching Objective function for generator power generation cost :

[0098]

[0099] in, , This represents the number of generator nodes in the microgrid. For the first generator

[0100] 'output power' All are the first The power generation cost coefficient of a generator;

[0101] S12. The microgrid scheduling problem model is established as follows:

[0102]

[0103] In this equation, (1) is the objective function, and (2) is the supply and demand balance constraint at the power generation and consumption ends.

[0104] Equation (3) is the first Upper and lower limits of the generator's output power. and These are mode switching parameters used in distributed scheduling algorithms. The time indicates the island mode. The time indicates the grid connection mode. The main grid electricity price, also known as the main grid incremental cost, It is the total power exchanged between the microgrid and the main grid. For total power requirements, It is the first The power requirements of the generator. For the first Minimum output power limit for generators. For the first Maximum output power limit of the generator.

[0105] S2. Introduce the Lagrange multiplier method, construct the Lagrange function, and establish the Lagrange equation to solve the microgrid scheduling problem model (the microgrid scheduling problem model is an optimization problem with equality constraints).

[0106] Optionally, S2 specifically includes:

[0107] By introducing the Lagrange multiplier method, we construct the Lagrange function and establish the following Lagrange equation:

[0108]

[0109] in It is a constructed Lagrangian function. It is the introduced Lagrange multiplier, also known as incremental cost;

[0110] The necessary and sufficient condition for minimizing power generation costs is that the first derivative of the Lagrange function is zero. Therefore, the Lagrange function... Calculate the power of each generator separately. Power exchange between microgrids and the main grid and Lagrange multipliers The partial derivative of , and set it equal to zero:

[0111]

[0112] At the same time, define the first The Lagrange multipliers of the generator are also the multipliers of each generator node. incremental cost for:

[0113]

[0114] According to the formula The conclusion is that for the power generation cost to reach its minimum, the incremental cost of all generators must be equal, and equal to a uniform incremental cost. This is called the optimal solution. According to the formula Conclusion: When The optimal solution when the grid is connected. According to the formula The conclusion is that when the power generation cost reaches its minimum value, the supply and demand balance constraint on both the power generation and consumption sides is satisfied.

[0115] S3. Based on the Lagrange equation, the incremental cost and power mismatch of the generator are selected as consistency variables, and a distributed scheduling algorithm model is established. The distributed scheduling algorithm model is used to perform iterative calculations based on the received instructions representing the current operating mode, and the optimal power of each generator set is output. In grid-connected mode, the distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor. In islanded mode, the acceleration factor is disabled to use the traditional consistency algorithm.

[0116] Optionally, in step S3, based on the Lagrange equation, the incremental cost and power mismatch of the generator are selected as consistency variables to establish a distributed scheduling algorithm model, specifically including:

[0117] Incremental cost of selecting generator and power mismatch As a consistency variable, power mismatch Essentially, it's about each power generation node. Local load demand Compared with its current power generation capacity The estimator of the difference aims to be iteratively updated using a distributed algorithm to ensure that all nodes... When all nodes reach the same value, there is a power mismatch. Reaching 0, that is, all equal All The value is equal to 0, thus minimizing the power generation cost while satisfying the constraints. At this point, through... Calculate the optimal solution for output power. :

[0118]

[0119] in, No. The incremental cost corresponding to the upper limit constraint on the output power of a generator. No. The incremental cost corresponding to the lower limit constraint of the generator output power. It is the optimal solution for incremental cost. It is the first The output power of a generator at which the cost is minimized;

[0120] Incremental cost Update formula:

[0121]

[0122] in, It is the first A generator in Incremental cost per moment It is the first A generator in Local power mismatch at any time It is the first The set of neighboring nodes of the generator. and For mode switching parameters, As an acceleration factor, and , For consistent step size, For feedback gain coefficient, These are the adjacency matrix elements of the communication topology. To represent the power generation unit Whether it is connected to the leader node, where the index of the leader node is 0, representing the main power grid;

[0123] Power mismatch Update formula:

[0124]

[0125] in, For intermediate calculation variables, It is an auxiliary variable, only used at the switching time. The value is 1 at one time and 0 at other times. It is a power generation unit exist The power distribution variables of the main power grid at any given time. and It is a power generation unit exist The amount of compensation based on power mismatch at all times;

[0126] Intermediate calculation variables The update formula is:

[0127]

[0128] in, For consistent step size, It is a power generation node Selection of power generation cost coefficient in grid-connected mode It is a power generation node exist Output power at any given moment;

[0129] Power generation node exist Output power at time The update formula is:

[0130]

[0131] Compensation based on power mismatch The update formula is:

[0132]

[0133] Compensation based on power mismatch The update formula is:

[0134]

[0135] in It is the first The optimal output power of the generator when connected to the grid is determined by... It was calculated in time;

[0136] Main grid power distribution variables The update formula is:

[0137]

[0138] in, It is a power generation node exist Changes in the power distribution of the main power grid at any given time.

[0139] Optionally, the updated initial value setting specifically includes:

[0140] Set initial values ​​for incremental cost and power mismatch:

[0141]

[0142] in It is the first The incremental cost of a generator at time 0. It is the first The power mismatch at time 0 of the generator, i.e., the generation node. initial value, It is the first The initial output power of the generator is determined under grid-connected mode. and The update formula not only requires The value at time also needs to be determined. The initial value set for the update formula in grid-connected mode is not only at time 0, but also at time -1, i.e. and ,and Yes, yes, the first The transient balance guide value of the generator. It is the first The main grid power distribution variables of the generators at the initial moment;

[0143] The calculation formula is:

[0144]

[0145] Optionally, in step S3, the distributed scheduling algorithm model is used to perform iterative calculations based on the received instructions representing the current operating mode, and the optimal power of each generator unit is output, specifically including:

[0146] S31. When the current operating mode is received (the operating mode is determined by the mode switching parameter) and Characteristic, when the instruction of the running mode is When operating in grid-connected mode, the command for the operating mode is... When running in isolated mode, the instructions are: At this time, that is, in the isolated mode, at this time and The update formula is a classic, well-proven traditional consensus algorithm:

[0147]

[0148] In islanded mode, the main grid power allocation variable in the algorithm Forced to zero, the power balance objective becomes a strict internal self-balancing equation: the total power generation of the microgrid must equal the total load when it is stable. The algorithm will seek a unified incremental cost that minimizes the total power generation cost of the entire microgrid by coordinating all distributed generators within the microgrid. In this state, the microgrid achieves true self-closed-loop management and does not depend on the external power grid;

[0149] S32, When the received instruction for the current operating mode is At this time, it is in grid-connected mode. and Execute the formula to accelerate consistent updates:

[0150]

[0151] S321, Each power generation node Exchange incremental costs with neighboring nodes in the communication network. and power mismatch Each power generation node uses the received information to execute the accelerated consistency update formula, the core of which lies in the introduction of an acceleration factor. and historical status information and ,because The "leadership follower" item in the formula Once activated, generation nodes directly connected to the main grid will prioritize tracking the incremental costs of the main grid. And this goal is rapidly disseminated across the entire internet through the network, introducing a "momentum term". This significantly accelerates the convergence process, thereby driving up the incremental costs of all distributed generation nodes within the microgrid. Incremental cost of rapid convergence to the main grid ;

[0152] S322, Generating nodes connected to the main power grid Based on intermediate calculation variables Calculate the change in power distribution in the main power grid. ;

[0153] S323, Each power generation node is based on intermediate calculation variables Changes in power distribution in the main power grid And the introduced "momentum term" Update your own power mismatch value ;

[0154] Repeat steps S321 to S323 until stability is achieved. At this point, all generating nodes... incremental cost The incremental costs are very close to those of the main power grid. And no further significant changes occur, the change in power distribution in the main power grid and power mismatch value All are 0, and at this time the power reaches a balanced state, that is, the total power generation of all power generation nodes plus the power allocation value of the main grid equals the total load power.

[0155] S4. When the operating mode switching command is triggered, a smooth transition between modes is achieved through a cooperative state transition mechanism to ensure power balance when stable.

[0156] Optionally, S4 specifically includes:

[0157] At any moment Upon receiving the mode switching command, it uses auxiliary variables Achieving a coordinated state transition triggers a brief, one-time special calculation cycle to synchronously adjust the power mismatch. Status value:

[0158] At time When the mode switching command is received, it is because Switch to That is, when switching from island mode to grid-connected mode, At any given time, the grid-connected mode is in operation, and the auxiliary variable is... exist The time is 1, and at this time... Activated This compensation amount undergoes a jump, ensuring convergence while maintaining power balance in subsequent iterations. Time, auxiliary variable The value is 0. At this point, the update formula is the accelerated consensus algorithm for grid-connected mode, and the values ​​of each power generation node are 0. Driven by the acceleration mechanism, it quickly converges to a unified state. Main power grid power distribution variables It is also dynamically adjusted to the optimal value based on the economics within the microgrid, while ensuring that the total power generation of all power generation nodes plus the total power allocation value of the main grid equals the total load power.

[0159] At time When the mode switching command is received, it is because Switch to That is, when switching from grid-connected mode to islanded mode, In isolated mode, the auxiliary variable... exist The time is 1, and at this time... Activated This compensation amount undergoes a jump, ensuring convergence while maintaining power balance in subsequent iterations. Time, auxiliary variable The value is 0. In this case, the update formula is the classic, well-proven traditional consensus algorithm in islanded mode, where each generator node... It smoothly converges to a uniform incremental cost that minimizes the total generation cost of the entire microgrid. At the same time, it ensures that the total power generation of the power generation nodes is equal to the total load power.

[0160] In the embodiments of the present invention, the following are employed: Figure 3 The microgrid topology connection method shown in the present invention adopts the following approach for the method of this embodiment: Figure 4 The data shown was used for simulation experiments to verify the results.

[0161] Figure 3 The diagram shows the physical structure and communication topology of a smart grid. G1, G2, G3, G4, and G5 represent the first, second, third, fourth, and fifth generator nodes, respectively. MG represents the main grid, and ER represents the energy router, a key device connecting the microgrid and the main grid. A consistency step size is selected. Feedback gain coefficient , Incremental cost of the main power grid The local load is: , , , , , Initial output power: , , , , .

[0162] exist When selecting the island mode, that is, selecting Substituting the above parameters into the initial value calculation formula, the initial value of the incremental cost can be obtained. , , , , Initial value of power mismatch , , , , , set the initial value and Substitution and The update formula can be used to find the optimal solution for the isolated island. , , , , , .

[0163] exist Switching is performed at any time, from island mode to grid-connected mode. , ,Bundle time , and the calculated compensation amount based on power mismatch , , , , ,and of and The optimal value can be obtained from the update formula. , , , , , , , , .

[0164] exist Switching is performed at any time, from grid-connected mode to islanded mode. , ,Bundle time , and the calculated compensation amount based on power mismatch. Substituted into and The update formula yields the optimal value and optimal solution. , , , , , .

[0165] Figure 5 This represents the convergence result of the cost increment at each generator node, based on... Figure 5 It can be seen that the incremental cost converges to the optimal value in both the islanded and grid-connected modes. , Figure 6 This indicates the convergence status of the output power of each generator node, based on... Figure 6 It can be seen that the local active power converges to the optimal value. , Figure 7 This indicates the convergence result of power mismatch, based on Figure 7 It can be seen that the power mismatch result approaches zero. Figure 8 This represents the sum of engine output power and main grid power, expressed as a result of load demand, based on... Figure 8 It can be seen that the entire network achieves supply and demand balance in steady state, and at the same time, and When the microgrid's operating mode changes, simulation results show that all variables converge to the new optimal value, indicating that the proposed distributed scheduling algorithm can achieve a smooth transition between islanded mode and grid-connected mode.

[0166] Figure 9 An acceleration factor was added to the convergence process in grid-connected mode, and Figure 10 It is evident that the convergence process in grid-connected mode did not incorporate an acceleration factor. Figure 9 An acceleration factor was added. Compare Figure 10 The convergence speed is significantly faster without the addition of an acceleration factor.

[0167] like Figure 11As shown in the figure, this embodiment of the invention also provides an accelerated distributed scheduling system for smooth switching between islanded and grid-connected modes, the system comprising:

[0168] The first module 1110 is used to establish a microgrid scheduling problem model;

[0169] The second module 1120 is used to introduce the Lagrange multiplier method, construct the Lagrange function, and establish the Lagrange equation to solve the microgrid scheduling problem model.

[0170] The distributed scheduling module 1130 is used to select the incremental cost and power mismatch of the generator as consistency variables according to the Lagrange equation, establish a distributed scheduling algorithm model, perform iterative calculations using the distributed scheduling algorithm model according to the received instructions representing the current operating mode, and output the optimal power of each generator set. The distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor in grid-connected mode, and disables the acceleration factor in islanded mode to use the traditional consistency algorithm.

[0171] The smooth transition module 1140 is used to achieve a smooth transition between modes through a cooperative state transition mechanism when the operation mode switching command is triggered, so as to ensure power balance when stable.

[0172] The accelerated distributed scheduling system for smooth switching between islanded and grid-connected modes provided in this embodiment of the invention has a functional structure that corresponds to the accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes provided in this embodiment of the invention, and will not be described again here.

[0173] Figure 12 This is a schematic diagram of the structure of an electronic device 1200 provided in an embodiment of the present invention. The electronic device 1200 may vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 1201 and one or more memories 1202. The memory 1202 stores at least one instruction, which is loaded and executed by the processor 1201 to implement the steps of the accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes described above.

[0174] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0175] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0176] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for accelerating distributed scheduling with smooth switching between islanded and grid-connected modes, characterized in that, The method includes: S1. Establish a microgrid scheduling problem model; S2. Introduce the Lagrange multiplier method, construct the Lagrange function, and establish the Lagrange equation to solve the microgrid scheduling problem model. S3. Based on the Lagrange equation, the incremental cost and power mismatch of the generator are selected as consistency variables, and a distributed scheduling algorithm model is established. The distributed scheduling algorithm model is used to perform iterative calculations based on the received instructions representing the current operating mode, and the optimal power of each generator set is output. In grid-connected mode, the distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor. In islanded mode, the acceleration factor is disabled to use the traditional consistency algorithm. S4. When the operating mode switching command is triggered, a smooth transition between modes is achieved through a cooperative state transition mechanism to ensure power balance when stable.

2. The method according to claim 1, characterized in that, S1 specifically includes: S11, Establishing the first step in microgrid dispatching Objective function for generator power generation cost : ; in, , This represents the number of generator nodes in the microgrid. For the first generator 'output power' All are the first The power generation cost coefficient of a generator; S12. The microgrid scheduling problem model is established as follows: ; In this equation, (1) is the objective function, and (2) is the supply and demand balance constraint at the power generation and consumption ends. Equation (3) is the first Upper and lower limits of the generator's output power. and These are mode switching parameters used in distributed scheduling algorithms. The time indicates the island mode. The time indicates the grid connection mode. The main grid electricity price, also known as the main grid incremental cost, It is the total power exchanged between the microgrid and the main grid. For total power requirements, It is the first The power requirements of the generator. For the first Minimum output power limit for generators. For the first Maximum output power limit of the generator.

3. The method according to claim 2, characterized in that, S2 specifically includes: By introducing the Lagrange multiplier method, we construct the Lagrange function and establish the following Lagrange equation: ; in It is a constructed Lagrangian function. It is the introduced Lagrange multiplier, also known as incremental cost; The necessary and sufficient condition for minimizing power generation costs is that the first derivative of the Lagrange function is zero. Therefore, the Lagrange function... Calculate the power of each generator separately. Power exchange between microgrids and main grid and Lagrange multipliers The partial derivative of , and set it equal to zero: ; At the same time, define the first The Lagrange multipliers of the generator are also the multipliers of each generator node. incremental cost for: ; According to the formula The conclusion is that for the power generation cost to reach its minimum, the incremental cost of all generators must be equal, and equal to a uniform incremental cost. This is called the optimal solution. According to the formula Conclusion: When The optimal solution when the grid is connected. According to the formula The conclusion is that when the power generation cost reaches its minimum value, the supply and demand balance constraint on both the power generation and consumption sides is satisfied.

4. The method according to claim 3, characterized in that, In step S3, based on the Lagrange equation, the incremental cost and power mismatch of the generator are selected as consistency variables to establish a distributed scheduling algorithm model, specifically including: Incremental cost of selecting generator and power mismatch As a consistency variable, power mismatch Essentially, it's about each power generation node. Local load demand Compared with its current power generation capacity The estimator of the difference aims to be iteratively updated using a distributed algorithm to ensure that all nodes... When all nodes reach the same value, there is a power mismatch. Reaching 0, that is, all equal All The value is equal to 0, thus minimizing the power generation cost while satisfying the constraints. At this point, through... Calculate the output ; Optimal solution for power : in, No. The incremental cost corresponding to the upper limit constraint on the output power of a generator. No. The incremental cost corresponding to the lower limit constraint of the generator output power. It is the optimal solution for incremental cost. It is the first The output power of a generator at which the cost is minimized; Incremental cost Update formula: ; in, It is the first A generator in Incremental cost per moment It is the first A generator in Local power mismatch at any time It is the first The set of neighboring nodes of the generator. and For mode switching parameters, As an acceleration factor, and , For consistent step size, For feedback gain coefficient, These are the adjacency matrix elements of the communication topology. To represent the power generation unit Whether it is connected to the leader node, where the index of the leader node is 0, representing the main power grid; Power mismatch Update formula: ; in, For intermediate calculation variables, It is an auxiliary variable, only used at the switching time. The value is 1 at one time and 0 at other times. It is a power generation unit exist The power distribution variables of the main power grid at any given time. and It is a power generation unit exist The amount of compensation based on power mismatch at all times; Intermediate calculation variables The update formula is: ; in, For consistent step size, It is a power generation node Selection of power generation cost coefficient in grid-connected mode It is a power generation node exist Output power at any given moment; Power generation node exist Output power at time The update formula is: ; Compensation based on power mismatch The update formula is: ; Compensation based on power mismatch The update formula is: ; in It is the first The optimal output power of the generator when connected to the grid is determined by... It was calculated in time; Main grid power distribution variables The update formula is: ; in, It is a power generation node exist Changes in the power distribution of the main power grid at any given time.

5. The method according to claim 4, characterized in that, The updated initial value settings specifically include: Set initial values ​​for incremental cost and power mismatch: ; in It is the first The incremental cost of a generator at time 0. It is the first The power mismatch at time 0 of the generator, i.e., the generation node. initial value, It is the first The initial output power of the generator is determined under grid-connected mode. and The update formula not only requires The value at time also needs to be determined. The initial value set for the update formula in grid-connected mode is not only at time 0, but also at time -1, i.e. and ,and Yes, yes, the first The transient balance guide value of the generator. It is the first The main grid power distribution variables of the generators at the initial moment; The calculation formula is: 。 6. The method according to claim 5, characterized in that, In step S3, the distributed scheduling algorithm model is used to perform iterative calculations based on the received instructions representing the current operating mode, and the optimal power of each generator set is output. Specifically, this includes: S31. When the received instruction for the current operating mode is At this time, that is, in the isolated mode, at this time and The update formula is a classic, well-proven traditional consensus algorithm: ; In islanded mode, the main grid power allocation variable in the algorithm Forced to zero, the power balance objective becomes a strict internal self-balancing equation: the total power generation of the microgrid must equal the total load when it is stable. The algorithm will seek a unified incremental cost that minimizes the total power generation cost of the entire microgrid by coordinating all distributed generators within the microgrid. In this state, the microgrid achieves true self-closed-loop management and does not depend on the external power grid; S32, When the received instruction for the current operating mode is At this time, it is in grid-connected mode. and Execute the formula to accelerate consistent updates: ; S321, Each power generation node Exchange incremental costs with neighboring nodes in the communication network. and power mismatch Each power generation node uses the received information to execute the accelerated consistency update formula, the core of which lies in the introduction of an acceleration factor. and historical status information and ,because The "leadership follower" item in the formula Once activated, generation nodes directly connected to the main grid will prioritize tracking the incremental costs of the main grid. And by rapidly disseminating this goal across the entire internet, the "momentum term" is introduced. This significantly accelerates the convergence process, thereby driving up the incremental costs of all distributed generation nodes within the microgrid. Incremental cost of rapid convergence to the main grid ; S322, Generating nodes connected to the main power grid Based on intermediate calculation variables Calculate the change in power distribution in the main power grid. ; S323, Each power generation node is based on intermediate calculation variables Changes in power distribution in the main power grid , and the introduced "momentum term" Update your own power mismatch value ; Repeat steps S321 to S323 until stability is achieved. At this point, all generating nodes... incremental cost The incremental costs are very close to those of the main power grid. And no further significant changes occur, the change in power distribution in the main power grid and power mismatch value All are 0, and at this time the power reaches a balanced state, that is, the total power generation of all power generation nodes plus the power allocation value of the main grid equals the total load power.

7. The method according to claim 1, characterized in that, S4 specifically includes: At any moment Upon receiving the mode switching command, it uses auxiliary variables Achieving a coordinated state transition triggers a brief, one-time special calculation cycle to synchronously adjust the power mismatch. Status value: At time When the mode switching command is received, it is because Switch to That is, when switching from island mode to grid-connected mode, At any given time, the grid-connected mode is in operation, and the auxiliary variable is... exist The time is 1, and at this time... Activated This compensation amount undergoes a jump, ensuring convergence while maintaining power balance in subsequent iterations. Time, auxiliary variable The value is 0. At this point, the update formula is the accelerated consensus algorithm for grid-connected mode, and the values ​​of each power generation node are 0. Driven by the acceleration mechanism, it quickly converges to a unified state. Main power grid power distribution variables It is also dynamically adjusted to the optimal value based on the economics within the microgrid, while ensuring that the total power generation of all power generation nodes plus the total power allocation value of the main grid equals the total load power. At time When the mode switching command is received, it is because Switch to That is, when switching from grid-connected mode to islanded mode, In isolated mode, the auxiliary variable... exist The time is 1, and at this time... Activated This compensation amount undergoes a jump, ensuring convergence while maintaining power balance in subsequent iterations. Time, auxiliary variable The value is 0. In this case, the update formula is the classic, well-proven traditional consensus algorithm in islanded mode, where each generator node... It smoothly converges to a uniform incremental cost that minimizes the total generation cost of the entire microgrid. At the same time, it ensures that the total power generation of the power generation nodes is equal to the total load power.

8. An accelerated distributed scheduling system for smooth switching between islanded and grid-connected modes, characterized in that, The system includes: The first module is used to establish a model for the microgrid scheduling problem. The second module is used to introduce the Lagrange multiplier method, construct the Lagrange function, and establish the Lagrange equation to solve the microgrid scheduling problem model. The distributed scheduling module is used to select the incremental cost and power mismatch of the generator as consistency variables according to the Lagrange equation, establish a distributed scheduling algorithm model, and perform iterative calculations using the distributed scheduling algorithm model based on the received instructions representing the current operating mode, and output the optimal power of each generator set. The distributed scheduling algorithm model accelerates the consistency algorithm by introducing an acceleration factor in grid-connected mode, and disables the acceleration factor in islanded mode to use the traditional consistency algorithm. The smooth transition module is used to achieve a smooth transition between modes through a cooperative state transition mechanism when the operation mode switching command is triggered, so as to ensure power balance when stable.

9. An electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, characterized in that, The processor loads and executes at least one instruction to implement the accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes as described in any one of claims 1-7.

10. A computer-readable storage medium storing at least one instruction, characterized in that, The at least one instruction is loaded and executed by the processor to implement the accelerated distributed scheduling method for smooth switching between islanded and grid-connected modes as described in any one of claims 1-7.