Energy system planning method, device and equipment and storage medium
By constructing a double-nested optimization model and utilizing gradient optimization algorithms, the complexity problem of planning models for integrated energy systems in universities was solved, achieving efficient equipment capacity configuration and operation strategies, and improving planning efficiency and cost optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-10
AI Technical Summary
The planning model for integrated energy systems in universities is complex and difficult to solve quickly using traditional gradient-based optimization algorithms. Existing heuristic algorithms are slow to compute, which limits the real-time planning capability of large-scale systems.
A two-layer nested optimization model based on minimizing total lifecycle cost is constructed. This model is then converted into a single-layer continuously differentiable model using mathematical correction methods. The model is then solved using a gradient optimization algorithm, and the optimal capacity configuration and operation strategy for the device are output.
It improves the efficiency of energy system planning, achieves a significant increase in optimization efficiency and a reduction in total life cycle costs, and provides minute-level real-time optimization capabilities.
Smart Images

Figure CN121836434A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of energy planning, and in particular to an energy system planning method, device, equipment and storage medium. BACKGROUND
[0002] With the increasing importance of sustainable energy research, universities, as models of sustainable practice, also need to introduce a large amount of hydrogen energy and photovoltaic sustainable energy in the university campus energy system. In order to realize energy transformation and comply with the concept of sustainability, schools need to integrate renewable energy and distributed energy and other energy carriers to form a regional integrated energy system. Due to the large area occupied by universities, the types and quantities of buildings are large, and the pipe networks of electricity, gas, heat and cold cover a wide range and have a large quantity, energy management is not in place, and resources are wasted. Therefore, it is necessary to study the capacity planning and operation optimization of the university campus integrated energy system to ensure the economic and efficient operation of the university campus integrated energy system.
[0003] In the prior art, the university integrated energy system planning usually adopts a model, which is a double-layer nested optimization structure model.
[0004] However, the above model has certain complexity and is difficult to be directly solved quickly by a traditional gradient-based optimization algorithm, therefore, the prior art mainly focuses on non-gradient optimization algorithm calculation to solve the capacity of each device and the device operation details in the integrated energy system. In the planning stage, the existing optimization solving algorithm generally uses a heuristic algorithm such as a genetic algorithm to design an optimal energy hub, and such an algorithm generally has a slow calculation speed, which limits the real-time planning ability of a large-scale system. SUMMARY
[0005] The embodiments of the present application provide an energy system planning method, device, equipment and storage medium to solve the problem of how to improve the energy system planning efficiency.
[0006] In a first aspect, the embodiments of the present application provide an energy system planning method, comprising:
[0007] Based on a pre-established device model of a target energy system, a double-layer nested optimization model is constructed with the objective of minimizing the total cost of the whole life cycle, and the double-layer nested optimization model includes a device capacity planning layer and an energy operation scheduling layer;
[0008] The double-layer nested optimization model is modified by a mathematical modification method to obtain a single-layer continuous derivable model;
[0009] The single-layer continuous derivable model is solved based on a gradient optimization algorithm, and the optimal device capacity configuration and operation strategy are output.
[0010] In a possible implementation, the method further includes:
[0011] modeling multiple devices of the target energy system by multi-energy flow coupling to obtain the device model.
[0012] In a possible implementation, the modifying the double-layer nested optimization model by the mathematical modification method includes:
[0013] reconstructing binary discrete variables, charging power variables and discharging power variables in the charging and discharging logic of the energy storage device in the double-layer nested optimization model into single continuous variables by a continuously differentiable function;
[0014] calculating capacity demand by a maximum function of device operation power, and equivalencing the maximum function into a continuously differentiable form to eliminate discrete variables of device selection in the double-layer nested optimization model.
[0015] In a possible implementation, the multiple devices include a combined heat and power unit, an electric boiler, a photovoltaic device, an electric refrigerator, an absorption refrigerator and an energy storage device, and the energy storage device includes a battery energy storage and an ice storage system.
[0016] In a possible implementation, the double-layer nested optimization model is constructed based on a pre-established device model of the target energy system, with the objective of minimizing total life cycle cost, and includes:
[0017] constructing a first objective function based on minimizing the total life cycle cost;
[0018] setting a first constraint condition based on an upper limit of device capacity and a regional limit, and combining the first constraint condition with the first objective function to form the device capacity planning layer;
[0019] constructing a second objective function based on minimizing daily operation cost;
[0020] setting a second constraint condition based on energy supply and demand balance, and combining the second constraint condition with the second objective function to form the energy operation scheduling layer.
[0021] In a possible implementation, the continuously differentiable function includes a hyperbolic tangent function or an exponential moving average function.
[0022] In a possible implementation, equivalencing the maximum function into a continuously differentiable form includes exponential weighted or polynomial weighted average.
[0023] In a second aspect, an embodiment of the present application provides an energy system planning device, including:
[0024] The module is used to construct a two-layer nested optimization model based on a pre-established equipment model of the target energy system, with the goal of minimizing the total life cycle cost. The two-layer nested optimization model includes an equipment capacity planning layer and an energy operation scheduling layer.
[0025] The correction module is used to correct the double-nested optimization model using mathematical correction methods to obtain a single-layer continuously differentiable model.
[0026] The output module is used to solve the single-layer continuous differentiable model based on the gradient optimization algorithm and output the optimal capacity configuration and operation strategy of the device.
[0027] In one possible implementation, the building module is further configured to:
[0028] Multi-energy flow coupling modeling is performed on multiple devices of the target energy system to obtain the device model.
[0029] In one possible implementation, the correction module specifically includes:
[0030] The binary discrete variables, charging power variables, and discharging power variables in the energy storage device charging and discharging logic of the double-layer nested optimization model are reconstructed into single continuous variables by using continuously differentiable functions.
[0031] The capacity requirement is calculated by using the maximum value function of the equipment operating power, and the maximum value function is converted into a continuously differentiable form to eliminate the discrete variables of equipment selection in the double-nested optimization model.
[0032] In one possible implementation, the plurality of devices includes a combined heat and power unit, an electric boiler, a photovoltaic device, an electric chiller, an absorption chiller, and an energy storage device, wherein the energy storage device includes battery energy storage and an ice storage system.
[0033] In one possible implementation, the building module specifically includes:
[0034] A first objective function is constructed based on minimizing the total lifecycle cost.
[0035] Based on the upper limit of equipment capacity and regional restrictions, a first constraint condition is set, and together with the first objective function, they form the equipment capacity planning layer;
[0036] A second objective function is constructed based on minimizing daily operating costs;
[0037] Based on the balance of energy supply and demand, a second constraint condition is set, and together with the second objective function, they form the energy operation scheduling layer.
[0038] In one possible implementation, the continuously differentiable function includes a hyperbolic tangent function or an exponential moving average function.
[0039] In one possible implementation, the maximum value function is equivalent to a continuously differentiable form, including exponentially weighted or polynomial-weighted averages.
[0040] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0041] The memory stores computer-executed instructions;
[0042] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0043] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0044] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0045] The energy system planning method, apparatus, equipment, and storage medium provided in this application are based on a pre-established equipment model of the target energy system. With the goal of minimizing the total lifecycle cost, a two-layer nested optimization model is constructed. This model is then corrected using mathematical correction methods to obtain a single-layer continuously differentiable model. A gradient optimization algorithm is used to solve the single-layer continuously differentiable model, outputting the optimal equipment capacity configuration and operating strategy. This method achieves an order-of-magnitude improvement in optimization efficiency by making discrete variables continuous and flattening the two-layer structure, while simultaneously ensuring a reduction in the total lifecycle cost, thus improving planning efficiency. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0047] Figure 1 The schematic diagram of the campus integrated energy system provided for this application;
[0048] Figure 2 A general technical roadmap provided for this application;
[0049] Figure 3 Flowchart of the energy system planning method provided in this application Figure 1 ;
[0050] Figure 4 Flowchart of the energy system planning method provided in this application Figure 2 ;
[0051] Figure 5 Flowchart of the energy system planning method provided in this application Figure 3 ;
[0052] Figure 6 A structural schematic diagram of the energy system planning device provided in this application;
[0053] Figure 7 A schematic diagram of the structure of the electronic device provided in this application.
[0054] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0055] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0056] With the increasing importance of sustainable energy research, universities, as exemplars of sustainable practice, need to introduce large amounts of sustainable energy sources such as hydrogen and photovoltaics into their campus energy systems. To achieve energy transition and align with the concept of sustainable development, universities urgently need to integrate various energy carriers, including renewable and distributed energy, to form a regional integrated energy system. However, due to their large land area, numerous and diverse buildings, and extensive and numerous power, gas, heat, and cooling pipelines, universities often suffer from inadequate energy management and significant resource waste. Therefore, it is necessary to conduct capacity planning and operational optimization research on university campus integrated energy systems to ensure their economical and efficient operation. Since the planning model for a university integrated energy system is a two-layer nested optimization structure model, it possesses considerable complexity and is difficult to solve quickly using traditional gradient-based optimization algorithms. Therefore, existing technologies mainly focus on non-gradient optimization algorithms to calculate the capacity and operational details of each device in the integrated energy system. In the planning stage, existing optimization algorithms generally utilize heuristic algorithms such as genetic algorithms for optimal energy hub design, but these algorithms are generally slow.
[0057] To address the aforementioned problems, this application provides an energy system planning method, apparatus, equipment, and storage medium, improving the efficiency of energy system planning. Specifically, in existing technologies, the planning of integrated energy systems in universities typically employs a model, which is a two-layer nested optimization structure model. However, this model has a certain complexity and is difficult to solve quickly using traditional gradient-based optimization algorithms. Therefore, existing technologies mainly focus on non-gradient optimization algorithms to calculate the capacity and operational details of each device in the integrated energy system. In the planning stage, existing optimization algorithms generally utilize heuristic algorithms such as genetic algorithms for optimal energy hub design, but these algorithms are generally slow, limiting the real-time planning capabilities of large-scale systems. Considering these issues, the inventors investigated whether a new two-stage planning model modification method could be proposed to address the computational complexity of the two-stage optimization structure in the planning of integrated energy systems in university campuses dominated by photovoltaic and hydrogen energy. This equivalent modification transforms the two-stage optimization structure into a single-stage optimization structure that can utilize gradient methods. This paper addresses the drawback of slow computation speed in existing technologies for planning integrated energy systems on university campuses dominated by photovoltaic and hydrogen energy. The proposed gradient-based model correction algorithm achieves optimization results similar to genetic algorithms, while significantly outperforming traditional planning algorithms. Furthermore, the proposed model considers public cooling supply, as well as public electricity and natural gas supply, reflecting the actual conditions of typical university campuses in university towns. Based on these considerations, the proposed solution is presented in this application.
[0058] Figure 1 This is a schematic diagram of the campus integrated energy system structure provided in this application. Figure 2 The overall technical roadmap provided for this application, such as Figure 1 As shown, a campus integrated energy system with combined heat and cooling (CHP) as its core is presented, adopting an integrated "source-grid-load-storage" architecture. This system achieves multi-energy complementarity through three energy flows:
[0059] Power flow: power grid → power pool → energy consumer.
[0060] Heat flow: Cogeneration → Heat pool → Heating terminal.
[0061] Cold flow: refrigeration equipment → cold pool → cooling terminal.
[0062] The main power source is connected to the power grid, while the hydrogen cogeneration serves as a backup power source for peak shaving. Through intelligent scheduling of the power pool, time-limited load balancing and peak-valley regulation can be achieved.
[0063] The heat supply network is a combined heat and power (CHP) system, fueled by hydrogen and natural gas, which generates electricity and heat through a heat pool.
[0064] The refrigeration supply matrix is a three-level refrigeration system: electric chiller, absorption refrigeration, and ice storage system, which is optimized through a cold energy pool.
[0065] In order to improve the above Figure 1 System planning can be achieved through Figure 2 The implementation of the technology bus, such as Figure 2 As shown, a two-tiered "planning-operation" architecture is adopted to form a closed-loop feedback mechanism. The upper layer is responsible for long-term capacity planning (equipment selection and capacity configuration), while the lower layer is responsible for short-term operation scheduling (energy allocation and equipment control). The two layers work together to iteratively optimize based on cost indicators.
[0066] Core functions of the upper capacity planning layer:
[0067] The input module includes system parameters such as campus load characteristics and energy demand curves, and economic parameters such as equipment unit price, maintenance rate, and interest rate. A genetic algorithm is used for global search to output the optimal equipment combination (e.g., CHP unit capacity, photovoltaic installed capacity, energy storage scale), and to comprehensively calculate the initial investment and total lifecycle operating cost.
[0068] The core functions of the lower-level operation optimization layer are as follows:
[0069] The input module includes market parameters such as real-time data like time-of-use electricity prices and gas prices, equipment parameters such as efficiency curves and ramp rates, and constraints such as energy balance (e.g., instantaneous supply and demand matching of electricity, heat, and cooling) and equipment limitations (e.g., number of start-ups and shutdowns, minimum operating time). It employs gradient descent for rapid local optimization and finally outputs equipment output plans and energy procurement strategies for each time period.
[0070] The two-layer interaction mechanism allows the upper layer to pass equipment configuration parameters to the lower layer for operation simulation, while the lower layer feeds back the simulated operating costs to the upper layer. Through multiple iterations, the collaborative optimization of planning and operation is achieved.
[0071] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0072] Figure 3 Flowchart of the energy system planning method provided in this application Figure 1 ,like Figure 3 As shown, the method includes:
[0073] S301: Based on the pre-established equipment model of the target energy system, a two-layer nested optimization model is constructed with the goal of minimizing the total cost over the entire life cycle.
[0074] In this step, in order to solve the problem that traditional single-layer optimization models cannot simultaneously take into account the contradiction between long-term investment decisions and short-term operation scheduling, equipment capacity planning and operation scheduling are decoupled to avoid decision conflicts. Through hierarchical optimization, the dimensionality of decision variables is reduced. Then, based on the established equipment model, with the goal of minimizing the total cost over the entire life cycle, a two-layer nested optimization model including an equipment capacity planning layer and an energy operation scheduling layer is constructed.
[0075] Specifically, a first objective function is constructed based on minimizing the total lifecycle cost. Based on the upper limit of equipment capacity and regional restrictions, a first constraint condition is set, which together with the first objective function form an equipment capacity planning layer. A second objective function is constructed based on minimizing the daily operating cost. Based on the balance of energy supply and demand, a second constraint condition is set, which together with the second objective function form an energy operation scheduling layer.
[0076] S302: The double-layer nested optimization model is modified by mathematical correction method to obtain a single-layer continuous differentiable model.
[0077] In this step, to overcome the slow convergence speed of traditional heuristic algorithms (such as genetic algorithms) when solving bi-level models, and thus improve computational efficiency and optimization accuracy, a mathematical correction method can be used to modify the bi-level nested optimization model to obtain a single-level continuously differentiable model.
[0078] Specifically, the binary discrete variables in the charging and discharging logic of energy storage devices in the double-layer nested optimization model are replaced by continuously differentiable functions. The capacity requirement is calculated through the maximum value function of the device's operating power, and the maximum value function is converted into a continuously differentiable form, thus eliminating the discrete variables in device selection in the double-layer nested optimization model.
[0079] S303: Solve a single-layer continuous differentiable model based on gradient optimization algorithm, and output the optimal capacity configuration and operation strategy of the device.
[0080] In this step, after correcting the double-nested optimization model, a gradient optimization algorithm is adapted to a single-layer continuously differentiable model to achieve convergence within minutes, while simultaneously considering the joint optimality of planning and operation. Based on the corrected single-layer continuously differentiable model, energy system planning is then performed, resulting in the optimal capacity configuration and operating strategy for the equipment.
[0081] Specifically, the modified single-layer continuous differentiable model can be expressed by the following formula: (1)
[0082] (2)
[0083] (3)
[0084] (4)
[0085] (5)
[0086] (6)
[0087] (7)
[0088] (8)
[0089] (9)
[0090] (10)
[0091] (11)
[0092] (12)
[0093] (13)
[0094] (14)
[0095] (15)
[0096] (16)
[0097] It should be noted that the meaning of each parameter in the above formula (1-16) is the same as the meaning of the same parameters in the subsequent embodiments, and will not be repeated here.
[0098] Formula (1) is the modified objective function, which aims to minimize the total life cycle cost. The other formulas are constraints, including energy balance, equipment efficiency, and capacity limits.
[0099] Optionally, the gradient optimization algorithm can be either the quasi-Newton method or the adaptive learning rate algorithm, which utilizes the analytical gradient information of the objective function with respect to the variables to accelerate convergence.
[0100] The energy balance constraint is given by formula (3-6). The supply and demand balance equations for electricity, heat, cooling energy, and natural gas are incorporated into the objective function as Lagrange multipliers. Variables (such as...) are dynamically adjusted through gradient descent. and (until the constraints are satisfied.)
[0101] Variable boundary constraints (Equation 7-15) are handled using the projection gradient method to handle upper and lower bound constraints. After each iteration, variables that exceed the boundary are truncated to the allowable range.
[0102] Optionally, the method further includes: performing multi-energy flow coupling modeling on multiple devices of the target energy system to obtain device models.
[0103] Specifically, the integrated energy system on the university campus aims to meet energy demands for electricity, heat, cooling, and natural gas. This system includes several candidate energy devices, namely multiple devices within the target energy system, including combined heat and power (CHP) units, electric boilers, photovoltaic equipment, electric chillers, absorption chillers, and energy storage devices, including battery storage and ice storage systems.
[0104] Cogeneration (CHP) units: CHP units are highly efficient energy conversion devices. CHP units that generate electricity by burning hydrogen can maximize the use of renewable energy, while simultaneously using waste heat through heat exchange technology to meet thermal energy demand. This integrated system can provide both electricity and heat energy, maximizing the use of energy resources. The electrical output of a CHP unit can be expressed by the following formula (17), and the thermal output of electricity generation can be expressed by formula (18), where thermal output of electricity generation represents the generated thermal energy. To ensure the optimal operation of the CHP unit, formula (19) represents the constraint on the adjustable power generation efficiency, ensuring that the unit operates within the specified efficiency range. In addition, formula (20) represents the constraint on the natural gas consumption of the CHP unit, ensuring that the usage remains within a predetermined range. These constraints help regulate the performance and energy consumption of the CHP unit in the system.
[0105] (17)
[0106] (18) (19)
[0107] (20)
[0108] in, This represents the electrical power output generated by the combined heat and power (CHP) at time t. This represents the amount of hydrogen consumed by the combined heat and power (CHP) at time t. This indicates the low calorific value of natural gas. This indicates the adjustable power generation efficiency of a combined heat and power (CHP) system. This indicates the output efficiency of the combined heat and power (CHP) system. and This indicates the upper and lower limits of the combined heat and power (CHP) generation efficiency regulation. This represents the amount of gas consumed by the combined heat and power (CHP) at time t. This indicates the maximum hydrogen consumption for combined heat and power (CHP).
[0109] Electric boiler: a device that converts electrical energy into heat energy. The following formula (21) describes the relationship between heat energy and electrical energy. Formula (22) describes the operating constraints of electric boiler.
[0110] (twenty one)
[0111] (twenty two)
[0112] in, This represents the heating power of the electric boiler at time t. This represents the efficiency of the boiler. This represents the electrical input power of the boiler at time t. This represents the maximum electrical input power of the boiler.
[0113] Electric chiller: a refrigeration device driven by electrical energy. The following formula (23) describes the relationship between refrigeration energy and electrical energy. Formula (24) describes the operating constraints of the electric chiller.
[0114] (twenty three)
[0115] (twenty four)
[0116] in: This represents the cooling output power of the electric chiller at time t. This represents the coefficient of performance of the electric refrigeration unit. This represents the electrical input power of the electric chiller at time t. This represents the maximum electrical input power of the electric chiller.
[0117] Absorption chiller: AC is driven by input heat, control equipment, heat is converted into cooling energy output, the relationship between cooling energy and heat energy is shown in formula (25), formula (26) describes the operating constraints of absorption chiller.
[0118] (25)
[0119] (26)
[0120] in, This represents the cooling output power of the absorption chiller at time t; This represents the performance coefficient of an absorption chiller; This represents the heat input power of the absorption chiller; This represents the maximum heat input power of the absorption chiller.
[0121] Photovoltaic equipment: When constructing a photovoltaic equipment model, its instability must be considered. By predicting its output curve on a typical day, upper and lower limits of its output are set. Formula (27) describes the operating constraints of photovoltaic equipment:
[0122] (27)
[0123] in, This represents the electrical power output of the photovoltaic power station at time t; This represents the maximum power output of a photovoltaic power station.
[0124] Energy storage devices:
[0125] (1) Battery energy storage: Battery energy storage can effectively achieve peak shaving and peak utilization of the system, thereby reducing operating costs. By storing excess electricity during low demand periods (valley filling) and supplying it during high demand periods (peak shaving), battery energy storage helps balance the power load and optimize overall energy consumption. This strategy saves costs by reducing reliance on expensive electricity during peak hours and utilizing cheaper electricity during off-peak hours, ultimately improving system efficiency and reducing operating costs. Equation (28) represents the change in energy storage of the battery energy storage at time interval at before and after charging and discharging. Equations (29) and (30) represent the maximum power constraints of charging power and discharging power. It is a binary variable of 0 and 1, ensuring that charging and discharging do not occur simultaneously. Formula (31) represents the upper and lower limits of the electrical energy stored in the battery.
[0126] (28)
[0127] (29)
[0128] (30)
[0129] (31)
[0130] in, This represents the total amount of electrical energy stored in the battery at time t; This represents the battery's charging efficiency; This represents the discharge efficiency of battery energy storage; This represents the energy decay coefficient of the battery; This represents the battery's charging power at time t; This represents the battery's discharge power at time t; This represents the maximum power of the battery charging. This represents the battery's maximum discharge power; This represents the maximum total energy storage capacity of the battery.
[0131] (2) Ice Storage System: The ice storage system consists of an ice maker and an ice storage tank. The purpose is to provide cooling by storing cooling capacity in the form of ice during periods of low power consumption, usually at night. This stored capacity is then released during periods of high power consumption, such as during the day when cooling demand is high, to meet the cooling needs of the university campus. Equation (32) represents the process of freezing water into ice using an ice maker and then storing it in an ice storage tank for later use. Equation (33) represents the change in cooling energy storage of the ice storage system over a time interval ΔT before and after ice making and melting. Equations (34) and (35) represent the maximum power limits for ice making and melting. It is a binary variable of 0 and 1, ensuring that ice making and melting do not occur simultaneously. Formula (36) represents the upper and lower limits of the cooling energy stored in the ice storage system.
[0132] (32)
[0133] (33)
[0134] (34)
[0135] (35)
[0136] (36)
[0137] in, This represents the performance coefficient of the ice maker; This represents the maximum electrical input power of the ice maker; This represents the energy attenuation coefficient of the ice storage system; This represents the efficiency of ice storage; This represents the melting efficiency of the ice storage system; This represents the maximum cooling power released by the ice storage system; This represents the maximum cooling capacity stored in the ice storage system; The cooling energy stored in the ice storage system at time t; It represents the melting force of the ice storage system at time t.
[0138] The energy system planning method provided in this application, based on a pre-established equipment model of the target energy system, constructs a two-layer nested optimization model with the goal of minimizing the total lifecycle cost. This model is then corrected using mathematical correction methods to obtain a single-layer continuously differentiable model. Finally, a gradient optimization algorithm is used to solve the single-layer continuously differentiable model, outputting the optimal equipment capacity configuration and operating strategy. This method achieves an order-of-magnitude improvement in optimization efficiency by making discrete variables continuous and flattening the two-layer structure, while simultaneously ensuring a reduction in the total lifecycle cost, thus improving planning efficiency.
[0139] Figure 4 Flowchart of the energy system planning method provided in this application Figure 2 ,like Figure 4 As shown, based on the above embodiment, step S302 specifically includes:
[0140] S401: The binary discrete variables, charging power variables, and discharging power variables in the energy storage device charging and discharging logic of the double-layer nested optimization model are reconstructed into a single continuous variable by using a continuously differentiable function.
[0141] In this step, in order to adapt the model to the gradient optimization algorithm and improve computational efficiency, it can be seen from the formulas (28-31) of the energy storage model in the aforementioned embodiments that the charging and discharging state is determined by a binary variable ( =1 charge / =0 discharge) control results in the model containing mixed integer nonlinear programming. This step replaces discrete variables with continuously differentiable functions, thereby achieving an adaptive gradient optimization algorithm.
[0142] Optional, continuously differentiable functions include hyperbolic tangent functions or exponential moving average functions.
[0143] For example, the modified formula can be expressed as:
[0144] (37)
[0145] (38)
[0146] Among them, the charging and discharging power of the battery is represented by a single variable. This means, in the formula , representing the net exchange power of the battery at time t, whose range can be determined by formula (38). This indicates charging behavior. This indicates the discharge behavior, and the selection of charge / discharge is achieved using... Continuous functions are used for substitution and equivalent modeling. Specifically, in the original formulas (28) to (31), the charging power The correction is equivalent to Discharge power The correction is equivalent to Its substitution logic can be expressed as the original charging power being broken down into... Positive part × continuous weight ( (continuous function), the original discharge power is decomposed into The negative part of the continuous weight, where the inequality constraint (38) removes the binary discrete variable. State variables After the correction, there are no explicit variables; its replacement logic is... The sign is implicitly determined without requiring a separate definition. This is achieved by introducing a single variable. and Continuous functions thus enable a continuous expression of charging and discharging behavior, eliminating discrete variables.
[0147] The ice storage system model is modified in the same way, and the modified ice storage system model is shown in the following formula, where formula (39) represents the cooling power of the ice storage system generated by the ice maker. Formula (40) is an equivalent modification of formula (16), where the cold energy absorption and release power of the ice storage system is represented by a single variable. This indicates the equivalence of selective power absorption and release of cold energy. The model is based on continuous functions. Inequality constraints eliminate the need for bivariate discrete variables. As shown in formula (40), represents the maximum power constraint of the ice storage system.
[0148] (39)
[0149] (40)
[0150] (41)
[0151] Similarly, the correction to the ice storage system model is the same as the correction theory for the aforementioned battery energy storage. From the original formulas (32) to (36), it can be seen that the ice-making power... and ice melting power Both are subject to binary discrete variables Constraints. After modification, a unified cooling power variable is adopted. This refers to ice making and ice melting, i.e. This indicates ice making. , then indicates that the ice has melted.
[0152] The replacement logic is also used Equivalent ice-making behavior, using Equivalent ice-melting behavior completely eliminates binary discrete variables. ,use Symbols implicitly determine ice making / melting.
[0153] S402: Calculate capacity requirements by using the maximum value function of equipment operating power, and convert the maximum value function into a continuously differentiable form to eliminate discrete variables in equipment selection in the double-nested optimization model.
[0154] Traditional equipment selection relies on discrete capacity specifications, requiring selection using integer variables. This step transforms capacity requirement calculation into a continuously differentiable function, eliminating the discreteness of equipment selection.
[0155] Equipment capacity requirements are determined by its maximum operating power over all time periods. In practical engineering, equipment capacity needs to be selected according to standard specifications and integer variables need to be introduced. However, the maximum value function is equivalent to a continuously differentiable form, which can realize the continuous expression of capacity requirements. Specifically, the maximum value function is equivalent to a continuously differentiable form, including exponential weighted or polynomial weighted average.
[0156] The energy system planning method provided in this application replaces the binary discrete variables in the charging and discharging logic of energy storage devices in a double-layer nested optimization model with continuously differentiable functions. It calculates capacity demand through a maximum value function of device operating power and converts this maximum value function into a continuously differentiable form, eliminating discrete variables in device selection within the double-layer nested optimization model. This method eliminates discrete variables and simplifies the model through mathematical correction, laying the foundation for efficient optimization. It utilizes gradient algorithms to achieve rapid global convergence, ensuring optimal economic performance under complex constraints. Together, these methods overcome the efficiency and accuracy bottlenecks of traditional energy planning, providing minute-level real-time optimization capabilities for campus integrated energy systems, combining economic efficiency with environmental friendliness.
[0157] Figure 5 Flowchart of the energy system planning method provided in this application Figure 3 ,like Figure 5 As shown, based on the above embodiment, step S301 specifically includes:
[0158] S501: Construct the first objective function based on minimizing the total lifecycle cost.
[0159] S502: Based on the upper limit of equipment capacity and regional restrictions, set the first constraint condition, and form the equipment capacity planning layer with the first objective function.
[0160] S503: Construct a second objective function based on minimizing daily operating costs.
[0161] S504: Based on the balance of energy supply and demand, a second constraint condition is set, and the second objective function forms an energy operation scheduling layer.
[0162] Constructing Equipment Capacity Planning Layer: The main objective of the overall optimization planning model for the university campus integrated energy system is to maximize economic benefits. This is achieved by minimizing the total cost, i.e., minimizing the total cost over the entire life cycle, which includes the initial system construction investment cost, equipment maintenance cost, and system operation cost. The objective function is represented by formula (42). Formula (43) captures the essence of the objective function, i.e., minimizing the sum of these costs over the entire life cycle of the integrated energy system. The initial system construction investment cost is calculated using formula (44), while considering the net present value of the investment. The equipment maintenance cost is calculated, taking into account the equipment's service life and maintenance expenses. In addition, formula (45) represents the system operation cost, which includes energy procurement costs, maintenance costs, and other operating expenses. Minimizing this cost helps to maximize the economic efficiency of the university campus integrated energy system. By formulating the objective function in this way and considering the net present value cost over the entire life cycle of the system, the optimization planning model can make informed decisions to minimize the cost and maximize the economic efficiency of the university campus integrated energy system. Formulas (46-52) indicate that the planning for constructing candidate equipment should be below the regional limitations of the university campus, where It is a binary 0 and 1 variable that indicates whether a candidate device is selected.
[0163] (42)
[0164] (43)
[0165] (44)
[0166] (45)
[0167] (46)
[0168] (47)
[0169] (48)
[0170] (49)
[0171] (50)
[0172] (51)
[0173] (52)
[0174] In the formula: This represents the maximum area that the selected candidate device is allowed to occupy; It represents the parameter set of the operating system; This represents the boundary conditions being When the set is defined, the output objective function is: optimal solution ; It represents the interest rate; This represents the proportional factor used to estimate equipment maintenance costs; This represents the investment cost required for one unit of candidate equipment k; This represents the total input cost; This represents the total maintenance cost; This represents the total operating cost.
[0175] Energy Operation and Scheduling Layer: The main objective of this optimization model is to optimize the operation of the university campus integrated energy system by minimizing operating costs while maintaining a harmonious balance between energy supply and demand. Operating costs include the expenses incurred in purchasing energy from external sources (such as the power grid and energy companies), as shown in formulas (53-57). Formula (53) represents the target value for quantifying the operating cost of the university campus integrated energy system. Its purpose is to minimize this cost, thereby achieving cost-effectiveness in system operation. Formulas (54-57) serve as constraints to ensure the supply and demand balance of different forms of energy during system operation. Specifically, formula (54) ensures the supply and demand balance of electrical energy within the integrated energy system. Formula (55) ensures the supply and demand balance of thermal energy, and formula (56) ensures the supply and demand balance of cooling energy. Formula (57) ensures the supply and demand balance of natural gas, an important energy source in the system. These formulas together ensure that energy supply meets demand while adhering to operating constraints, promoting the efficient and balanced operation of the university campus integrated energy system.
[0176] (53)
[0177] (54)
[0178] (55)
[0179] (56)
[0180] (57)
[0181] in, This represents the sales price of electricity supplied by the power grid; This represents the price of central cooling energy; This represents the natural gas sales price of the gas company; This represents the selling price of hydrogen by the gas company at time t; This represents the electrical energy that the university purchased from the power grid at time t; This represents the total amount of cooling energy purchased by the university from the central refrigeration department; This represents the total amount of natural gas purchased by the university from the natural gas company at time t.
[0182] The energy system planning method provided in this application constructs a first objective function based on minimizing the total lifecycle cost. Based on equipment capacity limits and regional restrictions, it sets first constraints, which, together with the first objective function, form an equipment capacity planning layer. A second objective function is constructed based on minimizing daily operating costs. Based on energy supply and demand balance, it sets second constraints, which, together with the second objective function, form an energy operation scheduling layer. This method resolves the contradiction between long-term investment and short-term operation that traditional single-layer models cannot balance. Through hierarchical optimization of the two-layer structure and continuous processing, it eliminates the bottleneck of discrete variables, ultimately achieving a triple improvement in economy, efficiency, and environmental protection.
[0183] Figure 6 A structural schematic diagram of the energy system planning device provided in this application, such as... Figure 6 As shown, the energy system planning device 600 provided in this embodiment includes:
[0184] Module 601 is used to construct a two-layer nested optimization model based on a pre-established equipment model of the target energy system, with the goal of minimizing the total life cycle cost. The two-layer nested optimization model includes an equipment capacity planning layer and an energy operation scheduling layer.
[0185] The correction module 602 is used to correct the double-nested optimization model through mathematical correction methods to obtain a single-layer continuously differentiable model.
[0186] Output module 603 is used to solve a single-layer continuous differentiable model based on gradient optimization algorithm, and output the optimal capacity configuration and operation strategy of the device.
[0187] Optionally, building module 601 is also used for:
[0188] Multi-energy flow coupling modeling is performed on multiple devices in the target energy system to obtain device models.
[0189] In one possible implementation, the correction module 602 specifically includes:
[0190] Replace the binary discrete variables in the energy storage device charging and discharging logic of the double-layer nested optimization model with continuously differentiable functions;
[0191] The capacity requirement is calculated by using the maximum function of the equipment's operating power, and the maximum function is converted into a continuously differentiable form to eliminate the discrete variables in equipment selection in the double-nested optimization model.
[0192] In one possible implementation, multiple devices include combined heat and power units, electric boilers, photovoltaic equipment, electric chillers, absorption chillers, and energy storage devices, including battery energy storage and ice storage systems.
[0193] Optionally, module 601 includes:
[0194] The first objective function is constructed based on minimizing the total lifecycle cost.
[0195] Based on the upper limit of equipment capacity and regional restrictions, the first constraint condition is set, and together with the first objective function, they form the equipment capacity planning layer;
[0196] A second objective function is constructed based on minimizing daily operating costs;
[0197] Based on the balance of energy supply and demand, a second constraint condition is set, and the second objective function forms an energy operation scheduling layer.
[0198] In one possible implementation, the continuously differentiable function includes a hyperbolic tangent function or an exponential moving average function.
[0199] In one possible implementation, equivalencing the maximum value function to a continuously differentiable form includes exponentially weighted or polynomial-weighted averages.
[0200] The energy system planning device provided in this embodiment can execute the energy system planning method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0201] Figure 7 A schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 700 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the electronic device 700 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.
[0202] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the methods of the above embodiments.
[0203] The specific implementation process of processor 701 can be found in the above-mentioned method embodiments, and its implementation principle and technical effect are similar. Therefore, it will not be repeated here.
[0204] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0205] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0206] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0207] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods of the various embodiments described above.
[0208] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods of the above embodiments.
[0209] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0210] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0211] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0212] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0213] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0214] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0215] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0216] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method of energy system planning, characterized by, The method comprises the following steps: Based on the pre-established equipment model of the target energy system, a double-layer nested optimization model is constructed with the objective of minimizing the total life cycle cost, which comprises an equipment capacity planning layer and an energy operation scheduling layer; The double-layer nested optimization model is modified by a mathematical modification method to obtain a single-layer continuous derivable model; The single-layer continuous derivable model is solved based on a gradient optimization algorithm to output the optimal equipment capacity configuration and operation strategy.
2. The method of claim 1, wherein, The method further comprises: A plurality of devices of the target energy system are subjected to multi-energy flow coupling modeling to obtain the equipment model.
3. The method of claim 1, wherein, The modification of the double-layer nested optimization model by the mathematical modification method comprises: Binary discrete variables, charging power variables and discharging power variables in the charging and discharging logic of energy storage devices in the double-layer nested optimization model are reconstructed into single continuous variables by a continuous differentiable function; The maximum value function of the device operation power is used to calculate the capacity demand, and the maximum value function is equivalent to a continuous differentiable form to eliminate the discrete variables of the device selection in the double-layer nested optimization model.
4. The method of claim 2, wherein, The plurality of devices comprise a combined heat and power unit, an electric boiler, a photovoltaic device, an electric refrigerator, an absorption refrigerator and an energy storage device, and the energy storage device comprises a battery energy storage and an ice storage system.
5. The method of claim 1, wherein, The double-layer nested optimization model is constructed based on the pre-established equipment model of the target energy system with the objective of minimizing the total life cycle cost, which comprises: A first objective function is constructed based on minimizing the total life cycle cost; A first constraint condition is set based on the upper limit of the equipment capacity and the regional restriction, and the first constraint condition and the first objective function constitute the equipment capacity planning layer; A second objective function is constructed based on minimizing the daily operation cost; A second constraint condition is set based on the energy supply and demand balance, and the second constraint condition and the second objective function constitute the energy operation scheduling layer.
6. The method of claim 3, wherein, The continuous differentiable function comprises a hyperbolic tangent function or an exponential moving average function.
7. The method of claim 3, wherein, The maximum value function is equivalent to a continuous differentiable form by exponential weighting or polynomial weighting average.
8. An energy system planning apparatus characterized by comprising: The method comprises the following steps: A construction module is configured to construct a double-layer nested optimization model based on the pre-established equipment model of the target energy system with the objective of minimizing the total life cycle cost, which comprises an equipment capacity planning layer and an energy operation scheduling layer; A modification module is configured to modify the double-layer nested optimization model by a mathematical modification method to obtain a single-layer continuous derivable model; An output module is configured to solve the single-layer continuous derivable model based on a gradient optimization algorithm to output the optimal equipment capacity configuration and operation strategy.
9. An electronic device, comprising: The method comprises the following steps: A memory and a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the energy system planning method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the energy system planning method according to any one of claims 1 to 7.