Real-time optimization scheduling method and device for distributed energy system, equipment and medium

Through split optimization algorithm and asynchronous iteration mechanism, combined with global coupling functions and local functions, the composite optimization problem in distributed energy systems is solved, and high robust and real-time optimization scheduling is achieved, which is suitable for harsh communication environments.

CN120582249APending Publication Date: 2025-09-02CHONGQING BUSINESS VOCATIONAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510686880.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The prior art cannot simultaneously deal with the composite optimization problems of smooth fuel cost function, non-smooth operation constraints and global supply and demand coupling functions in distributed energy systems. The synchronous iteration mechanism is difficult to cope with the asynchronous operation requirements caused by communication delays or failures of the equipment, and the system scalability is poor due to global parameter dependence.

Method used

Using split optimization algorithm and asynchronous iteration mechanism, a distributed optimization framework is built by obtaining global coupling functions, local smooth convex functions and non-smooth convex functions, setting local step sizes and local relaxation factors, independently updating variables, generating scheduling information, and adapting to dynamic topological changes and communication delays.

Benefits of technology

Real-time optimized scheduling with high robustness and scalability is achieved, reducing the risk of privacy leakage, improving the real-time and optimized performance of the system, and is suitable for harsh communication environments such as microgrids and off-island power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120582249A_ABST
    Figure CN120582249A_ABST
Patent Text Reader

Abstract

The invention relates to the field of power network management, and discloses a real-time optimization scheduling method and device for a distributed energy system, equipment and a medium. The method comprises the following steps: acquiring a global coupling function of the distributed energy system and a local smooth convex function and a non-smooth convex function corresponding to each energy unit; the non-smooth convex function is used for establishing a local constraint set of each energy unit corresponding to the distributed energy system, and the global coupling function represents a power supply and demand balance constraint; constructing a global optimization objective function according to the global coupling function, the smooth convex function and the non-smooth convex function; setting a local step length and a local relaxation factor corresponding to each energy unit, and updating an auxiliary variable, a dual variable and an original variable corresponding to the global optimization objective function; and generating scheduling information of each energy unit according to the global optimization objective function and the local constraint set to complete real-time optimization scheduling of each energy unit. And an extensible and high-robustness scheme is provided for real-time optimization scheduling of a high-dynamic heterogeneous energy system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a real-time optimization scheduling method, device, equipment and medium for a distributed energy system. Background Art

[0002] As the scale of distributed energy systems expands, traditional centralized optimization methods face communication bottlenecks and privacy leakage risks in real-time scheduling. Existing distributed optimization methods use centralized processing of coupling constraints, which poses a risk of single point failure. If only a single type of objective function is processed, it cannot adapt to composite optimization scenarios containing multiple types of constraints. Although existing technologies have methods that combine distributed processing of composite functions, their synchronous update mechanisms can easily lead to system rigidity when nodes fail. Although existing technologies have begun to introduce coupling function processing, they require global step size coordination and are difficult to adapt to dynamic topology changes. Especially in hybrid energy systems containing diesel generators (DG) and energy storage modules (ES), existing methods have three defects:

[0003] 1. Unable to simultaneously handle the complex optimization problem of a smooth fuel cost function, non-smooth operation constraints, and a global supply-demand coupling function;

[0004] 2. The synchronous iteration mechanism is difficult to cope with the asynchronous operation requirements of DG / ES devices caused by communication delays or failures;

[0005] 3. Global parameter dependence leads to poor system scalability, and the global Lipschitz constant needs to be recalculated when a new energy node is added.

[0006] Therefore, a method is urgently needed to solve at least one of the above problems. Summary of the Invention

[0007] The present application provides a real-time optimization scheduling method, apparatus, equipment and medium for a distributed energy system, aiming to solve three defects of existing methods in a hybrid energy system containing a diesel generator (DG) and an energy storage module (ES): 1. It is impossible to simultaneously handle the compound optimization problem of a smooth fuel cost function, non-smooth operation constraints and a global supply-demand coupling function; 2. The synchronous iteration mechanism is difficult to cope with the asynchronous operation requirements of DG / ES devices due to communication delays or failures; 3. Global parameter dependence leads to poor system scalability, and the global Lipschitz constant needs to be recalculated when a new energy node is added.

[0008] In a first aspect, the present application provides a real-time optimization scheduling method for a distributed energy system, the method comprising:

[0009] Obtain a global coupling function of the distributed energy system and a local smooth convex function and a non-smooth convex function corresponding to each energy unit. The local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module. The non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system. The non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint. The global coupling function characterizes the total power supply and demand balance constraint.

[0010] Constructing a global optimization objective function according to the global coupling function, the smooth convex function and the non-smooth convex function;

[0011] Setting the local step size and local relaxation factor corresponding to each energy unit, and updating the auxiliary variables, dual variables and original variables corresponding to the global optimization objective function;

[0012] The scheduling information of each energy unit is generated according to the global optimization objective function and the local constraint set to complete the real-time optimization scheduling of each energy unit; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and the ramp rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charging and discharging power range of the energy storage module.

[0013] In a second aspect, the present application provides a real-time optimization and scheduling device for a distributed energy system, comprising:

[0014] A function acquisition unit is used to obtain the global coupling function of the distributed energy system and the local smooth convex function and non-smooth convex function corresponding to each energy unit, the local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module; the non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system, the non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint; the global coupling function characterizes the total power supply and demand balance constraint;

[0015] A target construction unit, configured to construct a global optimization target function according to the global coupling function, the smooth convex function, and the non-smooth convex function;

[0016] a variable updating unit, configured to set a local step size and a local relaxation factor corresponding to each energy unit, and to update auxiliary variables, dual variables, and primal variables corresponding to the global optimization objective function;

[0017] A scheduling completion unit is used to generate scheduling information for each of the energy units based on the global optimization objective function and the local constraint set to complete real-time optimization scheduling of each of the energy units; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and climbing rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charging and discharging power range of the energy storage module.

[0018] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement a method as provided in any embodiment of the present application when executing the computer program.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor enables the processor to implement the method provided in any embodiment of the present application.

[0020] The present application provides a real-time optimization scheduling method, device, equipment and medium for a distributed energy system. By innovatively combining a split optimization algorithm with an asynchronous iteration mechanism, a distributed optimization framework that adapts to complex hybrid energy systems is constructed.

[0021] By locally estimating the power supply and demand balance constraints, the global optimization problem is decoupled into multiple local subproblems, avoiding the communication bottlenecks of centralized optimization. Smooth convex functions (such as DG fuel costs and ES maintenance costs) are iteratively optimized using a distributed proximal gradient algorithm. Non-smooth convex functions (such as DG ramp rate constraints and ES capacity constraints) are directly processed using proximal operators, such as projection or truncation operations on constraint violations. Joint optimization of smooth and non-smooth terms is achieved using a distributed proximal gradient algorithm.

[0022] Each energy unit (DG / ES) sets its step size independently based on the local Lipschitz constant of its local objective function, without relying on global parameters. For example, the DG step size and ES step size are determined by the second-order derivative of the fuel cost function.

[0023] After completing a variable update, each unit directly broadcasts the latest local information to adjacent nodes without waiting for other nodes to synchronize. Units experiencing communication delays or failures are allowed to continue iteration using historical variables, and convergence is ensured through a random delay compensation mechanism.

[0024] For DG nodes, the local constraint set includes output power range (based on rated power and instantaneous load demand) and ramp rate limit (dynamically modeled through differential equations). For ES nodes, the constraint set covers upper and lower limits on charge and discharge power (based on battery chemistry) and a safe state of charge (SOC) range.

[0025] When adding a new energy node, only its local step size and constraint set need to be configured, without recalculating the global Lipschitz constant. For example, when adding a new photovoltaic power station, its local step size is determined autonomously based on the statistical characteristics of the photovoltaic output forecast error.

[0026] The smoothed cost function is separated from the non-smooth approximation function, and the proximal operator is used to project the non-smooth function directly into the feasible region, avoiding the traditional method's strong reliance on the smoothness of the objective function. For example, in scenarios where the DG ramp rate suddenly changes, the proximal operator can instantly truncate the power adjustment to the constraint boundary.

[0027] In summary, this method provides a scalable and highly robust solution for the real-time optimization and scheduling of highly dynamic, heterogeneous energy systems through the collaborative innovation of mathematical modeling and distributed computing mechanisms. It is particularly suitable for scenarios with strict requirements on communication reliability, such as microgrids and off-island power supply.

[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 This is a schematic flow chart of the steps of a real-time optimization scheduling method provided by an embodiment of the present application;

[0031] Figure 2 This is a schematic diagram of the structure of a distributed energy system provided by an embodiment of the present application;

[0032] Figure 3 This is a schematic diagram comparing the optimization effects of a distributed energy system provided by an embodiment of the present application;

[0033] Figure 4 This is a schematic block diagram of the structure of a real-time optimization scheduling device provided by an embodiment of the present application;

[0034] Figure 5 This is a schematic block diagram of the structure of a computer device provided in one embodiment of the present application.

[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0038] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, terms such as "first" and "second" are used to distinguish between identical or similar items having substantially the same functions and effects. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or order of execution, and that terms such as "first" and "second" do not necessarily define differences.

[0039] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0040] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0041] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0042] As the scale of distributed energy systems expands, traditional centralized optimization methods face communication bottlenecks and privacy leakage risks in real-time scheduling. Existing distributed optimization methods use centralized processing of coupling constraints, which poses a risk of single point failure. If only a single type of objective function is processed, it cannot adapt to composite optimization scenarios containing multiple types of constraints. Although existing technologies have methods that combine distributed processing of composite functions, their synchronous update mechanisms can easily lead to system rigidity when nodes fail. Although existing technologies have begun to introduce coupling function processing, they require global step size coordination and are difficult to adapt to dynamic topology changes. Especially in hybrid energy systems containing diesel generators (DG) and energy storage modules (ES), existing methods have three defects:

[0043] 1. Unable to simultaneously handle the complex optimization problem of a smooth fuel cost function, non-smooth operation constraints, and a global supply-demand coupling function;

[0044] 2. The synchronous iteration mechanism is difficult to cope with the asynchronous operation requirements of DG / ES devices caused by communication delays or failures;

[0045] 3. Global parameter dependence leads to poor system scalability, and the global Lipschitz constant needs to be recalculated when a new energy node is added.

[0046] Therefore, a method is urgently needed to solve at least one of the above problems. Figure 1 , an embodiment of the present application provides a real-time optimization scheduling method for a distributed energy system. The distributed energy system can be as follows Figure 2 The IEEE-39bus system is shown, and the embodiments of the present application do not limit the system type. The execution device of the method is a computer device deployed in the distributed energy system provided in any embodiment of the present application.

[0047] The provided method includes steps S101 to S105, wherein the computer device may be a handheld terminal, a notebook computer, a wearable device, or a robot, etc. The method is used to implement steps S101 to S105 and their corresponding embodiments.

[0048] Step S101. Obtain the global coupling function of the distributed energy system and the local smooth convex function and non-smooth convex function corresponding to each energy unit. The local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module; the non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system, and the non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint; the global coupling function characterizes the total power supply and demand balance constraint.

[0049] Specifically, in this step, the computer device first needs to obtain the global coupling function of the distributed energy system, which is used to characterize the power supply and demand balance constraints between all energy units in the system. In addition, it is also necessary to obtain the local smooth convex function and non-smooth convex function corresponding to each energy unit (such as the diesel generator DG and the energy storage module ES). The local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module. These cost functions are usually smooth and convex, which is convenient for optimization processing. The non-smooth convex function is used to characterize the local constraints of the equipment operation, including the power ramp rate constraint and the charge and discharge efficiency constraint. These constraint functions are usually non-smooth, but still maintain convexity in the optimization problem.

[0050] For example, the computer device obtains a global coupling function through the system model or historical data. This function is usually composed of the power coupling of each energy unit and is used to ensure that the total output power of all energy units in the system is balanced with the total required power. For each diesel generator and energy storage module, the computer device obtains its fuel cost and operation and maintenance cost function. These functions are usually quadratic functions or linear functions, and the specific form can be determined according to the technical parameters and historical operation data of the equipment. The computer device obtains the local constraints of each energy unit's operation, including power ramp rate constraints and charge and discharge efficiency constraints. These functions are usually piecewise linear functions or indicator functions, which are used to ensure that the equipment does not exceed its technical limitations during operation. By obtaining global coupling functions and local functions, it is ensured that the optimization problem takes into account both the global supply and demand balance and the specific costs and operation constraints of each energy unit. The acquisition of local smooth convex functions and non-smooth convex functions enables the optimization method to adapt to different types of energy units and operation scenarios, improving the versatility of the method.

[0051] For example, a local smooth convex function is used to describe the fuel cost of DG (quadratic function form: a i ,b i ,c i ,g i ,h i is the power generation coefficient of generator set i, both are constants. The Lipschitz constant is 2a i ) and the charge and discharge maintenance cost of ES (linear function: d i is the depreciation coefficient of energy storage device i, which is a constant. The Lipschitz constant is 2d i Local non-smooth convex function: This function expresses the physical constraints of the equipment in the form of an indicator function, including the upper and lower power limits and ramp rate of the DG, and the charge and discharge efficiency constraints and charge and discharge efficiency of the ES. Global coupling function: This function transforms the system supply and demand balance constraints into a non-smooth function form through Lagrangian duality.

[0052] For example, if DG and ES parameters are read from the SCADA system, a quadratic function is used to fit the fi(pi) of the DG (e.g., f30 = 2.7×10-4p2 + 1.7×10-2p + 0.66 for DG30). A linear function is established for the charge and discharge cost of the ES (e.g., f18 = 1.1×10-4|p18| for ES18). At the same time, the supply and demand balance constraint is converted into a linear term λ of the dual variable λ. T (∑pi-Yt).

[0053] By separating the smoothed cost function (fi), the non-smooth constraint function (hi), and the global coupling function (g~), we achieve the first joint optimization of these three heterogeneous functions in a distributed framework, addressing the inability of existing methods to handle multiple types of constraints. Local constraint sets (such as the ramp rate of the DG) are stored only on the local node, eliminating the need to upload them to a central server, reducing the risk of privacy leaks.

[0054] Step S102: Construct a global optimization objective function according to the global coupling function, the smooth convex function and the non-smooth convex function.

[0055] Specifically, in this step, the computer device constructs a global optimization objective function based on the global coupling function, local smooth convex function, and non-smooth convex function obtained in step S101. This objective function aims to minimize the total cost of the system while satisfying the global supply and demand balance and the local operating constraints of each energy unit.

[0056] The computer device performs a weighted summation of local smooth convex functions (fuel costs and operation and maintenance costs) and non-smooth convex functions (operational constraints) to form a local objective function. A global coupling function (in Lagrangian dual form) is added as a constraint to the objective function to ensure that the system's total output power is balanced with the total power demand during the optimization process.

[0057] It should be noted that if Figure 3 The figure shows a comparison of the optimization effects of distributed energy resource systems (DERs) with and without energy storage modules (red dashed line). This is closely related to the process of obtaining the global coupling function, local smooth convex functions, and non-smooth convex functions in step S101, and constructing the global optimization objective function in step S102. The "valley filling and peak shaving" effect (e.g., charging during low valleys and discharging during high peaks) shown in the figure directly reflects the role of the global coupling function (power supply and demand balance constraint).

[0058] Step S103: Set the local step size and local relaxation factor corresponding to each energy unit, and update the auxiliary variables, dual variables and original variables corresponding to the global optimization objective function.

[0059] Specifically, in this step, the computer sets a local step size for each energy unit and updates the auxiliary, dual, and primal variables in the global optimization objective function. Setting the local step size allows each energy unit to perform optimization iterations independently, avoiding the complexity of global step size coordination.

[0060] The computer sets a local step size for each energy unit based on its technical parameters and operating history. This step size is typically determined by the unit's dynamic characteristics and communication latency. Using this local step size, the computer updates the non-smooth terms in the global optimization objective function (such as power ramp rate constraints and charge-discharge efficiency constraints) to ensure these constraints are met during the optimization process. Based on the local step size and the updated non-smooth terms, the computer updates the dual and primal variables to ensure variable consistency throughout the optimization process.

[0061] By setting a local step size, each energy unit can perform independent optimization iterations, avoiding the system rigidity problem caused by the synchronous update mechanism when a node fails. The setting of the local step size allows the method to adapt to dynamic topological changes, improving the robustness and adaptability of the system.

[0062] Step S104. Generate scheduling information for each of the energy units based on the global optimization objective function and the local constraint set to complete real-time optimization scheduling of each of the energy units; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and ramp rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charge and discharge power range of the energy storage module.

[0063] Specifically, in this step, the computer generates scheduling information for each energy unit based on the global optimization objective function and the local constraint set. This scheduling information includes the output power range and ramp rate range of the diesel generator, as well as the charge and discharge power range of the energy storage module, to guide the real-time operation of each energy unit.

[0064] The computer generates scheduling information for each energy unit based on the global optimization objective function and the local constraint set. For diesel generators, the scheduling information includes the output power range and ramp rate range; for energy storage modules, the scheduling information includes the charge and discharge power range. The computer distributes the generated scheduling information to each energy unit to guide its real-time operation. The computer monitors the execution of each energy unit to ensure the accurate execution of the scheduling information and dynamically adjusts it based on actual conditions. By generating and distributing scheduling information, each energy unit can operate according to the real-time optimization results, improving the real-time performance and response speed of the system. The generation of scheduling information based on the global optimization objective function and the local constraint set ensures the optimization of system operation and improves the efficiency and performance of the system.

[0065] Through the above steps S101 to S104, the present application provides a real-time optimization scheduling method for distributed energy systems, which can effectively solve the problem in the prior art that it is impossible to simultaneously process the composite optimization problem of the smooth fuel cost function, non-smooth local operation constraints and the global supply and demand coupling function, the synchronous iteration mechanism is difficult to cope with the asynchronous operation requirements of DG / ES equipment due to communication delays or failures, and the problem of poor system scalability due to global parameter dependence. This method realizes the real-time optimization scheduling of distributed energy systems by obtaining global coupling functions and local functions, constructing a global optimization objective function, setting local step sizes, establishing local constraint sets and generating scheduling information, thereby improving the robustness, real-time nature and optimization performance of the system.

[0066] In some embodiments, the local smooth convex function includes at least a secondary fuel cost item of the diesel generator; obtaining the global coupling function of the distributed energy system and the local smooth convex function and non-smooth convex function corresponding to each energy unit includes: coupling the power corresponding to each energy unit to form the global coupling function; generating the secondary fuel cost item according to the fuel coefficient corresponding to the diesel generator and the square term, linear term and constant term of the power output; obtaining the minimum / maximum power limit of the diesel generator, the rise / fall rate limit of the power change in adjacent time periods, and the nonlinear relationship between the charging and discharging power of the energy storage module and the energy storage capacity, for generating the non-smooth convex function.

[0067] The examples describe in detail how to obtain the global coupling function of a distributed energy system, as well as the local smooth convex function and non-smooth convex function corresponding to each energy unit. Specifically, the local smooth convex function includes at least the secondary fuel cost term of the diesel generator, while the global coupling function is composed of the weighted sum of the dual variables and auxiliary variables of each energy unit. Furthermore, the examples also describe in detail how to generate the non-smooth convex function based on the technical parameters and operating constraints of the diesel generator.

[0068] For example, the computer equipment generates the secondary fuel cost term based on the fuel coefficient (such as fuel cost coefficient ai, bi, ci) corresponding to the diesel generator and the square term, linear term and constant term of the power output. The specific formula is: Among them, a i ,b i ,c i ,g i ,h i is the power generation coefficient of generator set i, both are constants. The Lipschitz constant is 2a i In addition to the fuel cost term, the locally smooth convex function can also include operation and maintenance costs, etc., which are usually also smooth and convex.

[0069] The computer equipment transforms the Lagrangian dual form of the power supply and demand balance constraint into a global coupling function that includes the communication topology. Specifically, the global coupling function is composed of the weighted sum of the dual variables and auxiliary variables of each energy unit, expressed as:

[0070] Among them, λ i is the dual variable, and Y is the total required power. The construction of the global coupling function takes into account the communication topology of the distributed energy system to ensure information transmission and coordination between various energy units.

[0071] Diesel generator constraints: The computer device obtains the minimum / maximum power limit of the diesel generator and the increase / decrease rate limit of power changes in adjacent time periods, and generates a non-smooth convex function. Specifically, the power ramp rate constraint can be expressed as:

[0072] and separately They are the power increase and decrease rate limits of the diesel generator respectively.

[0073] Energy storage module constraints: The computer device obtains the nonlinear relationship between the charging and discharging power of the energy storage module and the energy storage capacity, and generates a non-smooth convex function. Specifically, the energy storage capacity constraint of the energy storage module can be expressed as follows: 1. Energy storage device charging and discharging constraint to the grid Note that here i,t , i∈S can be negative. 2. Energy storage device charging and discharging efficiency Energy storage capacity of energy storage equipment: Storage capacity constraints: 3. The energy storage device should also satisfy the following equality constraints:

[0074] The embodiment obtains local smooth convex functions, global coupling functions and non-smooth convex functions to ensure that the optimization problem takes into account both the global supply and demand balance and the specific costs and operating constraints of each energy unit, thereby improving the comprehensiveness and rationality of the optimization results. The method of obtaining local smooth convex functions and non-smooth convex functions in the embodiment enables the method to adapt to different types of energy units and operating scenarios, thereby improving the versatility and flexibility of the method. The embodiment constructs a global coupling function containing a communication topology structure, thereby enabling each energy unit to independently perform optimization iterations, thereby avoiding the system rigidity problem caused by the synchronous update mechanism when a node fails, thereby improving the robustness and adaptability of the system. The method of generating non-smooth convex functions in the embodiment enables the method to adapt to the real-time operating status and dynamic topology changes of the equipment, thereby improving the real-time and response speed of the system. The embodiment generates and sends scheduling information, thereby enabling each energy unit to operate according to the real-time optimization results, thereby ensuring the optimization of system operation and improving the efficiency and performance of the system.

[0075] In some embodiments, constructing a global optimization objective function based on the global coupling function, smooth convex function and non-smooth convex function includes: constructing a smooth convex function and a non-smooth convex function based on the original variables; generating the global optimization objective function based on the original variables, dual variables and auxiliary variables; in the global optimization objective function, introducing a local estimate of the global shared dual variable corresponding to the global coupling function, and the estimate has a distributed consistency constraint based on the communication topology, which is used for the connection relationship corresponding to multiple energy units, so that the local estimate value of the global dual variable corresponding to each of the energy units tends to be consistent.

[0076] This embodiment describes how to construct a global optimization objective function based on local smooth convex functions, non-smooth convex functions, and a global coupling function, and transform the traditional centralized power supply and demand balance constraint into a distributed consistency constraint based on the communication topology. This process achieves distributed collaborative optimization through distributed local estimation and the use of distributed heterogeneous parameters (local heterogeneous step sizes and local relaxation factors), while simultaneously solving the coupling problem between global constraints and local operational constraints.

[0077] The original variables represent the actual power output decision of each energy unit, which is defined by local smooth convex functions and non-smooth convex functions. Specifically, they include: diesel generator power output The secondary fuel cost term and non-smooth constraints (such as upper and lower limits and ramp rate) must be met. The energy storage dynamic equation E must be satisfied j =E j ,0+∑ηp batt,j ΔT and power / capacity limits (non-smooth convex functions). Renewable energy power output pren, The predicted power range must be met.

[0078] The global coupling function is generated by the Lagrangian dual form of the power supply and demand balance constraint, and the dual variables (i.e., Lagrangian multipliers) represent the coordination parameters of the global supply and demand balance. The specific steps are:

[0079] Supply and demand balance coupling constraints (Y is the total required power) and its Lagrangian dual form is:

[0080] in, is a globally shared dual variable.

[0081] In a distributed architecture, each energy unit maintains a local estimate λi of the global variable λ and exchanges information with neighboring units through the communication topology to make all λi tend to be consistent. After the global coupling function g is added to the objective function to form the entire objective function, there is a consistency constraint, which can be expressed as λ i =λ j .

[0082] Combine the original variables with the dual variables to construct the global optimization objective function:

[0083]

[0084] φ batt,j and φ ren,k are non-smooth convex functions (such as indicator functions) of energy storage and renewable energy, respectively. and The minimum / maximum energy storage capacity of the energy storage module (kWh).

[0085] The coordinated update of the dual variables of each unit is achieved through communication topology (such as star, ring or mesh structure). Each unit adjusts the auxiliary variable according to the neighbor information:

[0086] α is the step size parameter, ranging from 0 to 1 / the maximum eigenvalue of the communication matrix. By transforming centralized supply-demand balance constraints into distributed consistency constraints, the system eliminates reliance on a central controller. Each energy unit only needs to exchange dual variable information with its neighbors to achieve global supply-demand balance, significantly improving the system's scalability and fault tolerance.

[0087] Each energy unit's local optimization problem independently addresses its power output and operational constraints (such as ramp rate and capacity limits), avoiding the "curse of dimensionality" caused by high-dimensional variable coupling. Consistent updates of dual variables are achieved through lightweight communication, with low computational complexity, making it suitable for real-time scheduling scenarios.

[0088] Distributed consistency constraints allow dynamic changes in communication topology (such as node joining / exiting). Even if communication with some nodes is interrupted, the remaining units can still maintain the optimization process through local neighbor information, and the robustness of the system is significantly enhanced. The global objective function is decomposed into primal and dual elements, and the local optimization problems of each unit can be solved in parallel. For example, the diesel generator can independently solve the quadratic programming problem, and the energy storage module can handle the linear programming with charging and discharging efficiency constraints, and the computational efficiency is more than 30% higher than that of the centralized method. The distributed dual variable update based on the average consistency protocol can strictly converge to the global optimal solution when the step size parameter is reasonably selected, avoiding the suboptimal problem of traditional heuristic algorithms.

[0089] In some embodiments, the setting of the local step size corresponding to each energy unit includes: if the energy unit is a diesel generator, generating the update step size of the original variable according to the cost quadratic term coefficient of the diesel generator and the energy storage module, and setting the step size of the dual variable according to the Laplace matrix of the communication topology graph.

[0090] The embodiment describes in detail how to set the local step size according to the type of energy unit (diesel generator or energy storage module). For diesel generators, the step size is generated according to the coefficient of the quadratic term of fuel cost to ensure the convergence of the algorithm.

[0091] The step size of the diesel generator is dynamically adjusted based on the quadratic coefficient of its fuel cost, ai. The step size of units with high fuel costs is smaller, while the step size of units with low fuel costs is larger to avoid drastic fluctuations in high-cost units during the optimization process.

[0092] The step size η of the original variable of the diesel generator p,i is: p,i =η0 / (1+γ·a i );η0 is the basic step size, and this application takes a small positive number (such as 0.01). a i is the fuel cost quadratic coefficient of diesel generator i. i The larger the value, the higher the fuel cost, and the step length η p,i The smaller it is, the more stable the optimization process is.

[0093] The diesel generator's step size is dynamically adjusted based on fuel costs to avoid drastic fluctuations in high-cost units during the optimization process and improve the algorithm's stability. The energy storage module's step size is related to the charge and discharge efficiency, ensuring a balance between the optimization speed of high-efficiency units and the stability of low-efficiency units. The larger step size of the diesel generator's low-cost units and the larger step size of the energy storage module's high-efficiency units significantly accelerates the optimization speed and reduces the number of iterations. The constraints of step size and spectral norm ensure efficient convergence of the algorithm under a distributed architecture. The method of the embodiment is applicable to a variety of energy units (such as diesel generators, energy storage modules, and renewable energy sources), and has wide applicability. By adjusting parameters in the step size calculation formula (such as γ and η0), it can adapt to different operating scenarios and communication topologies. The step size setting is based on convex optimization theory and distributed consensus protocols to ensure that the algorithm converges to the global optimal solution. The constraints of step size and spectral norm strictly meet the convergence conditions and prevent algorithm divergence. The dynamic adjustment of the diesel generator's step size allows low-cost units to bear more load, optimizing resource allocation. The efficiency correlation of the energy storage module's step size allows high-efficiency units to play a greater role in the optimization process, improving the overall efficiency of the system.

[0094] This embodiment achieves a balance between stability and efficiency in the optimization process by dynamically adjusting the step sizes of the diesel generator and energy storage module. The diesel generator step size is dynamically adjusted based on fuel costs, while the energy storage module step size is related to the charge and discharge efficiency. Simultaneously, the step size and spectral norm constraints ensure the convergence of the algorithm in a distributed architecture. This method offers significant advantages in optimization stability, computational efficiency, adaptability, and resource allocation optimization, providing an efficient and reliable solution for real-time optimization and scheduling of distributed energy systems.

[0095] In some embodiments, the updating of the auxiliary variables, dual variables and original variables corresponding to the global optimization objective function includes: if the energy unit is a diesel generator, performing piecewise projection on the power variables of the diesel generator to iteratively update the auxiliary variables, dual variables and original variables, and constraining the iterative results corresponding to the iterative updates to be within the minimum / or maximum power limit range; if the energy unit is an energy storage module, performing piecewise projection on the charging and discharging power of the energy storage module to iteratively update the auxiliary variables, dual variables and original variables, and respectively limiting the charging power and discharging power to not exceed the rated capacity of the energy storage module; wherein, a local relaxation factor is introduced in the updating of the auxiliary variables, dual variables and original variables, and the iterative results are relaxed to accelerate the convergence of the algorithm (distributed proximal gradient algorithm), and the value range of the local relaxation factor is 0 to 2.

[0096] The examples describe in detail how to iteratively update the non-smooth terms, dual variables, and primal variables based on the type of energy unit (diesel generator or energy storage module). Specifically, the diesel generator power variable is updated using segmented projections, while the energy storage module charge and discharge power is updated using segmented projections. In addition, a local relaxation factor is introduced in each variable update to improve the performance of the provided method in the application process.

[0097] For diesel generators, the power variable pi needs to meet the minimum / maximum power constraints [p i min ,p i max ]. Through segmented projection, the iteration results are constrained within the allowed range. Segmented projection is defined as:

[0098]

[0099] This operation ensures that the power output p after each iteration i Always within the allowed range. The original variable p i The update formula is:

[0100]

[0101] Among them, τi is the step size of the original variable, is the gradient of the fuel cost function for the diesel generator or energy storage device.

[0102] Non-smooth terms (such as the power limit indicator function) are automatically satisfied through the projection operation and no additional processing is required.

[0103] For the energy storage module, the charging and discharging power p batt,j The charging power p needs to be met ch,j and discharge power p dis,j The limit of energy storage E j The segmented projection operation is defined as:

[0104]

[0105] This operation ensures that the charging power and discharging power do not exceed their rated capacities, respectively. The original variable p batt,j The update formula is:

[0106] Among them, η b is the step size of the original variable, is the gradient of the energy storage module cost function. Non-smooth terms (such as the charge and discharge power limit indicator function) are automatically satisfied through the segmented projection operation.

[0107] A local relaxation factor β is introduced in the update of the dual variable λi to accelerate convergence. The update formula of the dual variable is:

[0108] Where β is the local relaxation factor, and its value range is 0<β<2; η λ is the step size of the dual variable; w ij is the weight coefficient of the communication topology adjacency matrix; N i is the neighbor set of unit i. The introduction of the local relaxation factor β allows the weighted average of the current iteration result and the estimated value at the previous moment to effectively reduce oscillation and accelerate convergence.

[0109] The step size of the primal variable and the dual variable must satisfy the product of the square of the coupling matrix spectral norm and the step size is less than 1, that is:

[0110] and ||W|| is the adjacency matrix of the communication topology, and ||W||2 is its spectral norm.

[0111] The segmented projection of the diesel generator ensures that the power output is always within the allowable range to avoid violating technical constraints. The segmented projection operation of the energy storage module limits the charging and discharging power respectively to ensure that the charging and discharging process is safe and reliable. The projection operation only requires simple comparison and truncation, with low computational complexity, and is suitable for real-time scheduling. The introduction of the local relaxation factor significantly accelerates the convergence of the dual variables and reduces the number of iterations. The projection operation and the local relaxation factor work together to avoid oscillation or divergence during the iteration process and improve the stability of the algorithm. The step size and spectral norm constraints ensure the convergence of the algorithm under a distributed architecture. The method of the embodiment is applicable to a variety of energy units (such as diesel generators, energy storage modules, renewable energy, etc.) and has wide applicability. By adjusting the projection operation and the local relaxation factor, it can adapt to different operating scenarios and communication topologies. The design of the projection operation and the local relaxation factor is based on convex optimization theory to ensure that the algorithm converges to the global optimal solution.

[0112] This embodiment uses interval projection and segmented projection to ensure that the power output of the diesel generator and energy storage module meets technical constraints. It also introduces a local relaxation factor to accelerate the convergence of the dual variables. This method offers significant advantages in constraint satisfaction, computational efficiency, robustness, and versatility, providing an efficient and reliable solution for the real-time optimization and scheduling of distributed energy systems.

[0113] In some embodiments, the local constraint set includes a dynamic constraint set corresponding to the diesel generator and an energy state recursion equation satisfied by the energy storage module; the establishment of a local constraint set corresponding to each energy unit of the distributed energy system includes: if the energy unit is a diesel generator, constructing a dynamic constraint set for the diesel generator including the power change rate in continuous time periods so that the power difference between adjacent time periods does not exceed a preset rise / or fall rate; if the energy unit is an energy storage module, constructing an energy state recursion equation for the energy storage module so that the stored energy in each time period satisfies the conservation relationship of the initial value plus or minus the accumulated charge and discharge amount.

[0114] This example describes how to construct local constraints for each energy unit (diesel generator and energy storage module) in a distributed energy system. The diesel generator's local constraints include a set of dynamic constraints to ensure that the rate of change of power between consecutive time periods does not exceed a preset ramp-up / ramp-down rate. The energy storage module's local constraints include an energy state recursion equation to ensure that the stored energy in each time period satisfies the conservation relationship of the initial value plus or minus the accumulated charge and discharge amount.

[0115] The power output of the diesel generator must meet the power change rate limit (ramp rate constraint) in adjacent time periods to ensure operational stability. The power output p of the diesel generator i in time period t is i,t Need to meet:

[0116] is the maximum allowable power change rate of diesel generator i (kW / min). Dynamic constraint set of diesel generator for:

[0117] in and are the minimum and maximum power output of the diesel generator respectively.

[0118] The energy state of the energy storage module must satisfy the dynamic conservation relationship to ensure the energy balance of the charging and discharging process. The energy state E of the energy storage module j in time period t j,t for:

[0119] η ch,j and η dis,j are the charging and discharging efficiencies of energy storage module j, respectively. ΔT is the time period (hours). The energy state of the energy storage module must satisfy:

[0120] and are the minimum and maximum energy capacities of the energy storage module, respectively.

[0121] The ramp rate constraint on the diesel generator ensures smooth power output changes, avoiding system shocks. The energy storage module's recursive equation of state ensures energy conservation during the charging and discharging process, preventing overcharging or over-discharging. The dynamic constraint set and the recursive equation of state strictly define the operating limits of the energy unit, ensuring that the optimization results meet actual operational requirements. The simple form of the local constraint set facilitates rapid calculation and verification within the optimization algorithm.

[0122] In some embodiments, generating the scheduling information of each energy unit according to the global optimization objective function and the local constraint set includes:

[0123] All variables of each energy unit are iteratively updated based on the distributed proximal gradient algorithm; if the unit is a diesel generator, the power value is calculated according to the secondary fuel cost gradient term of the smooth convex function in the global optimization objective function, and the power value is projected into the feasible domain of the output power range and the climbing rate range defined by the non-smooth convex function; if the energy unit is an energy storage module, the power value is updated according to the direction of the charge and discharge efficiency gradient, and the projection operation constrains the upper limit of the charging power and the lower limit of the discharging power respectively; for each energy unit, the dual variables and auxiliary variables corresponding to the adjacent nodes are obtained through the communication topology, and the local dual variables and auxiliary variables are updated based on the weighted combination relationship of the Laplace matrix; wherein the step range of the dual variables is related to the Laplace matrix, and the corresponding range of the auxiliary variable step is 0 to 0.25; finally, the scheduling information is generated through the relaxation operation.

[0124] The embodiment describes how to generate scheduling information for each energy unit based on a distributed proximal gradient algorithm. The power variable of the diesel generator is constrained within the ramp rate range through a projection operation; the charging and discharging power of the energy storage module are respectively limited to the upper limit of the charging power and the lower limit of the discharging power through a segmented projection operation. The update of the dual variables is based on the weighted combination relationship of the Laplace matrix of the communication topology. The dual variable step size of the diesel generator is inversely proportional to the coefficient of the quadratic term of the fuel cost, and the dual variable step size of the energy storage module is proportional to the charging and discharging efficiency coefficient. When the distributed residual norm of the dual variable estimate is less than the preset threshold and the difference between the two iterations of the original variable meets the shutdown condition, the scheduling information is output.

[0125] Power value of diesel generator II for: in is the gradient of the diesel generator fuel cost function. The projection operation is performed by projecting the power value into the ramp rate constraint range:

[0126] in is the dynamic constraint set of the diesel generator. The power value of the energy storage module jj for: in is the gradient of the cost function of the energy storage module. The segmented projection operation projects the power value into the upper limit of the charging power and the lower limit of the discharging power:

[0127] Dual variable λ i The update is: Among them, η λ,i is the dual variable step size, w ij is the weight coefficient of the communication topology adjacency matrix.

[0128] When the distributed residual norm of the dual variable estimate ||r2||2 is less than the preset threshold ∈, and the two-iteration difference of the original variable ||x (k+1) -x (k) ||2 When the shutdown conditions are met, output scheduling information.

[0129] Projection and segmented projection operations ensure that power output and energy states strictly meet constraints, resulting in accurate and reliable optimization results. The distributed proximal gradient algorithm, combined with projection operations, significantly reduces iterations and improves computational efficiency. Dual variable updates are based on a communication topology, enabling distributed collaborative optimization suitable for large-scale energy systems. The distributed proximal gradient algorithm and projection operations strictly meet convergence requirements, ensuring the algorithm converges to the global optimal solution.

[0130] In some embodiments, the total cost of operation is T is the number of time periods in the scheduling cycle, p i,tis the output power of generator or energy storage i in time period t, C i (p i,t ) is the cost function of distributed energy i in time period t, m is the number of generator sets, and s is the number of energy storage devices.

[0131] Define M:={1,...,m}, S:={m+1,...,m+s}.

[0132] The cost function corresponding to the generator is: a i ,b i ,c i ,g i ,h i is the power generation coefficient of generator set i, both are constants. The Lipschitz constant is 2a i

[0133] The cost function of energy storage equipment is: d i is the depreciation coefficient of energy storage device i, which is a constant. The Lipschitz constant is 2d i ; The total power balance constraint is i∈MUS,t∈T.

[0134] Generator unit constraints include generator unit power output constraints and unit ramp constraints, which are i∈M,t∈T and i∈M,t∈T.

[0135] Energy storage device constraints include energy storage device charging and discharging constraints to the grid and energy storage device charging and discharging efficiency, which are:

[0136] i∈S,t∈T and Among them, p i,t ,i∈S can be a negative number.

[0137] Energy storage capacity of energy storage equipment: i∈S,t∈T; storage capacity constraint: i∈S, t∈T; the energy storage device should also satisfy the following equality constraints: E i,T =E i,0 ,

[0138] The embodiments of the present application also provide a real-time optimization and scheduling module for a distributed energy system. This real-time optimization and scheduling module for a distributed energy system is used to execute the steps of a real-time optimization and scheduling method for a distributed energy system as described in the above embodiments. This real-time optimization and scheduling module for a distributed energy system can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, a laptop computer, a wearable device, or a robot.

[0139] like Figure 4 As shown, the real-time optimization scheduling module 200 of the distributed energy system includes:

[0140] Function acquisition unit 201 is used to obtain the global coupling function of the distributed energy system and the local smooth convex function and non-smooth convex function corresponding to each energy unit. The local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module; the non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system, and the non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint; the global coupling function characterizes the total power supply and demand balance constraint;

[0141] A target construction unit 202 is configured to construct a global optimization target function according to the global coupling function, the smooth convex function, and the non-smooth convex function;

[0142] The variable updating unit 203 sets the local step size corresponding to each energy unit and updates the non-smooth term, dual variable and original variable corresponding to the global optimization objective function;

[0143] The scheduling completion unit 204 is used to generate scheduling information for each of the energy units based on the global optimization objective function and the local constraint set to complete the real-time optimization scheduling of each of the energy units; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and the ramp rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charging and discharging power range of the energy storage module.

[0144] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working processes of the real-time optimization scheduling module and each unit of the distributed energy system described above can refer to the corresponding processes in the embodiment of the real-time optimization scheduling method of a distributed energy system described in the above embodiments, and will not be repeated here.

[0145] The above-mentioned real-time optimization scheduling method of the distributed energy system is implemented in the form of a computer program, which can be run on the above-mentioned module.

[0146] See also Figure 5 , Figure 5 1 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and an internal memory.

[0147] The storage medium can store an operating device and a computer program. The computer program includes program instructions, which, when executed, can cause a processor to execute any embodiment of a real-time optimization scheduling method for a distributed energy system.

[0148] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0149] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any real-time optimization scheduling method based on the distributed energy system.

[0150] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0151] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0152] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:

[0153] Obtain a global coupling function of the distributed energy system and a local smooth convex function and a non-smooth convex function corresponding to each energy unit. The local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module. The non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system. The non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint. The global coupling function characterizes the total power supply and demand balance constraint.

[0154] Constructing a global optimization objective function according to the global coupling function, the smooth convex function and the non-smooth convex function;

[0155] Setting the local step size and local relaxation factor corresponding to each energy unit, and updating the auxiliary variables, dual variables and original variables corresponding to the global optimization objective function;

[0156] The scheduling information of each energy unit is generated according to the global optimization objective function and the local constraint set to complete the real-time optimization scheduling of each energy unit; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and the ramp rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charge and discharge power range of the energy storage module. It should be noted that those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the processor described above can refer to the corresponding process in the method embodiments described in the above embodiments, and will not be repeated here.

[0157] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement the steps of a real-time optimization scheduling method for a distributed energy system provided in the above embodiments of the present application.

[0158] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a flash memory card, etc., equipped on the computer device.

[0159] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A real-time optimization scheduling method for a distributed energy system, characterized in that: include: Obtain a global coupling function of the distributed energy system and a local smooth convex function and a non-smooth convex function corresponding to each energy unit. The local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module. The non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system. The non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint. The global coupling function characterizes the total power supply and demand balance constraint. Constructing a global optimization objective function according to the global coupling function, the smooth convex function and the non-smooth convex function; Setting the local step size and local relaxation factor corresponding to each energy unit, and updating the auxiliary variables, dual variables and original variables corresponding to the global optimization objective function; The scheduling information of each energy unit is generated according to the global optimization objective function and the local constraint set to complete the real-time optimization scheduling of each energy unit; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and the ramp rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charging and discharging power range of the energy storage module.

2. The method according to claim 1, characterized in that The local smooth convex function includes at least a secondary fuel cost term of the diesel generator; The obtaining of the global coupling function of the distributed energy system and the local smooth convex function and non-smooth convex function corresponding to each energy unit includes: The total power balance constraint formed by the power coupling of each energy unit forms the global coupling function; Generate the secondary fuel cost term according to the fuel coefficient corresponding to the diesel generator and the square term, the linear term and the constant term of the power output; The minimum / maximum power limit of the diesel generator, the rise / fall rate limit of the power change in adjacent time periods, and the nonlinear relationship between the charge and discharge power and the energy storage capacity of the energy storage module are obtained to generate the non-smooth convex function.

3. The method according to claim 1, characterized in that The constructing of a global optimization objective function according to the global coupling function, the smooth convex function and the non-smooth convex function comprises: constructing a smooth convex function and a non-smooth convex function according to the original variables; The global optimization objective function is generated according to the original variables, dual variables and auxiliary variables; in the global optimization objective function, the local estimation of the global shared dual variables corresponding to the global coupling function is introduced, and the estimation has a distributed consistency constraint based on the communication topology, which is used for the connection relationship corresponding to multiple energy units, so that the local estimation value of the global dual variable corresponding to each of the energy units tends to be consistent.

4. The method according to claim 1, wherein The method comprises: If the energy unit is a diesel generator, the update step size of the original variable is generated according to the coefficient of the quadratic term of the fuel cost of the diesel generator; If the energy unit is an energy storage module, set the primitive variable step size related to the charge and discharge efficiency of the energy storage module.

5. The method according to claim 1, characterized in that The updating of auxiliary variables, dual variables, and original variables corresponding to the global optimization objective function includes: If the energy unit is a diesel generator, performing piecewise projection on the power variable of the diesel generator to iteratively update the auxiliary variable, the dual variable, and the original variable, and constraining the iteration result corresponding to the iterative update to be within the minimum / maximum power limit range; If the energy unit is an energy storage module, a segmented projection is performed on the charge and discharge power of the energy storage module to iteratively update the auxiliary variables, dual variables, and original variables, respectively limiting the charging power and discharging power to not exceed the rated capacity of the energy storage module; Among them, a local relaxation factor is introduced in the update of the auxiliary variables, dual variables and original variables, and the iterative results are relaxed to accelerate the convergence of the algorithm. The value range of the local relaxation factor is 0 to 2.

6. The method according to claim 1, characterized in that The local constraint set includes a dynamic constraint set corresponding to the diesel generator and an energy state recursion equation satisfied by the energy storage module; the establishment of a local constraint set for each energy unit corresponding to the distributed energy system includes: If the energy unit is a diesel generator, a dynamic constraint set including the power change rate of consecutive time periods is constructed for the diesel generator so that the power difference between adjacent time periods does not exceed a preset rise / or fall rate; If the energy unit is an energy storage module, an energy state recursive equation is constructed for the energy storage module so that the energy stored in each time period satisfies the conservation relationship of the initial value plus or minus the accumulated charge and discharge amount.

7. The method according to claim 1, characterized in that Generating the scheduling information of each energy unit according to the global optimization objective function and the local constraint set includes: An iterative update is performed on all variables of each energy unit based on a distributed proximal gradient algorithm. If the energy unit is a diesel generator, the power value is calculated based on the secondary fuel cost gradient term of the smooth convex function in the global optimization objective function, and this power value is projected into the feasible region of the output power range and ramp rate range defined by the non-smooth convex function. If the energy unit is an energy storage module, the power value is updated according to the direction of the charge and discharge efficiency gradient, and the projection operation constrains the upper and lower limits of the charging power respectively. For each energy unit, the dual variables and auxiliary variables corresponding to the adjacent nodes are obtained through the communication topology, and the local dual variables and auxiliary variables are updated based on the weighted combination relationship of the Laplace matrix; wherein the step range of the dual variable is related to the Laplace matrix, and the corresponding range of the auxiliary variable step is 0 to 0.25; finally, the scheduling information is generated through the relaxation operation.

8. A real-time optimization and scheduling device for a distributed energy system, characterized in that: include: A function acquisition unit is used to obtain the global coupling function of the distributed energy system and the local smooth convex function and non-smooth convex function corresponding to each energy unit, the local smooth convex function is used to characterize the fuel cost and operation and maintenance cost of the diesel generator and the energy storage module; the non-smooth convex function is used to establish a local constraint set for each energy unit corresponding to the distributed energy system, the non-smooth convex function includes a power ramp rate constraint and a charge and discharge efficiency constraint; the global coupling function characterizes the total power supply and demand balance constraint; A target construction unit, configured to construct a global optimization target function according to the global coupling function, the smooth convex function, and the non-smooth convex function; a variable updating unit, configured to set a local step size and a local relaxation factor corresponding to each energy unit, and to update auxiliary variables, dual variables, and primal variables corresponding to the global optimization objective function; A scheduling completion unit is used to generate scheduling information for each of the energy units based on the global optimization objective function and the local constraint set to complete real-time optimization scheduling of each of the energy units; if the energy unit is a diesel generator, the scheduling information includes at least the output power range and climbing rate range of the diesel generator; if the energy unit is an energy storage module, the scheduling information includes the charging and discharging power range of the energy storage module.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 7.