Real-time control method and system for integrated energy system taking into account spot market electricity prices
By constructing a dynamic electricity price transmission path and machine learning algorithm in the electricity spot market, optimizing CCHP units and electrochemical energy storage, the problem that traditional scheduling strategies are difficult to follow spot market electricity prices is solved, and real-time supply and demand balance and economic operation of the integrated energy system are achieved.
Patent Information
- Application Number
- CN202511007914.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-22
AI Technical Summary
Traditional integrated energy system scheduling strategies are difficult to follow the real-time regulation of spot market electricity prices, resulting in difficulty in matching electricity supply and demand and insufficient operational economy. The existing regulation model fails to effectively reflect the complex changes in the electricity spot market and fails to achieve coordinated scheduling of multiple energy equipment.
By constructing a transmission path for dynamic electricity prices in the electricity spot market, combining model predictive control theory with machine learning algorithms, optimizing CCHP unit output, electrochemical energy storage, and load scheduling, and establishing a real-time optimization and control model for the integrated energy system, real-time supply and demand balance in the electricity spot market can be achieved.
It realizes the real-time tracking and regulation of spot market electricity prices by the integrated energy system, improves the absorption capacity of renewable energy, reduces the system operating costs, improves the economy, reliability and accuracy of regulation, simplifies the parameter adjustment of the optimization model, and shortens the optimization solution time.
Smart Images

Figure CN120511671B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of operation control optimization of integrated energy systems, and more specifically, relates to a real-time control method and system for an integrated energy system taking into account spot market electricity prices. Background Art
[0002] With economic development, global energy demand is expanding in scale and variety. China is gradually accelerating the process of transforming its energy structure and proposing a low-carbon energy development strategy. Integrated energy systems contain "generation, storage, and utilization" resources in different energy forms, enabling flexible regulation at multiple time scales. They are key elements in achieving the country's "dual carbon" goals and sustainable development. Traditional integrated energy system scheduling strategies are mostly based on fixed electricity prices or short-term price forecasts. Existing regulation optimization models often ignore the multi-path correlation of electricity price transmission. Furthermore, in the electricity spot market environment, the supply and demand of electricity is constantly changing. Traditional regulation strategies make it difficult to adjust adjustable resources in real time based on spot market prices. Consequently, the system faces problems such as difficulty matching electricity supply and demand in real time and insufficient operational economics.
[0003] As energy structure transformation accelerates, renewable energy accounts for an increasing share of the power system, exacerbating the uncertainty of sources and loads within integrated energy systems. Existing multi-timescale control optimization schemes are insufficient in tracking real-time supply and demand changes in the electricity spot market. It is necessary to clarify the transmission path of dynamic changes in electricity spot market prices and enable the adjustable resources within the integrated energy system to track and respond to changes in spot electricity prices.
[0004] Prior art document 1 (CN115081838B) discloses a source-load coordinated scheduling method for thermal storage electric heating to incorporate wind and solar power, based on dynamic electricity pricing. Its shortcomings lie in its focus on a single load, thermal storage electric heating, and its inability to achieve coordinated scheduling of multiple energy devices within an integrated energy system. Its application scenarios are too narrow, and its dynamic electricity pricing is relatively simple, based solely on scenarios where wind and solar power are blocked. This method fails to effectively reflect the complex, real-time dynamics of the electricity spot market. Furthermore, while intraday rolling adjustments are implemented, the method still primarily relies on day-ahead scheduling, making it difficult to meet the high-frequency, real-time supply and demand adjustments required by the spot market.
[0005] Prior art document 2 (CN115130777B) discloses a microgrid energy system optimization method based on real-time electricity price incentives. Its shortcomings are that this method primarily targets microgrid energy systems, optimizing only certain aspects such as energy storage charging and discharging and load response. It does not address the coordinated control of multiple energy-coupled devices such as CCHP units and heat pumps. It relies on offline training using a reinforcement learning algorithm, resulting in slow model parameter updates and difficulty adapting to rapid fluctuations in spot market electricity prices. It also lacks in-depth analysis of the impact of electricity price changes on multiple energy devices and lacks a clear path for electricity price transmission.
[0006] Prior art document 3 (CN114977187B) discloses a multi-agent energy storage control method and system based on node marginal electricity prices. Its shortcomings lie in its focus on the control strategy of a single energy storage device, its failure to jointly optimize multiple energy devices within the integrated energy system, its adoption of a non-cooperative game-based Nash equilibrium solution, and its failure to consider the dynamic impact of real-time spot market electricity price fluctuations on the game strategy. Strategy adjustments are subject to lags, and there is a lack of a linkage mechanism between electricity prices and multiple energy devices, making it difficult to proactively respond to price changes and resulting in limited control flexibility. Summary of the Invention
[0007] To address the deficiencies in the prior art, the present invention provides a method and system for real-time control of an integrated energy system taking into account spot market electricity prices. The present invention solves the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t through the dynamic electricity price of the electricity spot market at time t-1 to obtain a solution result, then solves the unit power generation cost according to the solution result, solves the transmission congestion cost according to the line utilization rate, solves the marginal cost of loss according to the load demand, constructs the auxiliary service cost according to the fluctuation of the auxiliary service demand at time t, and sums it with the unit power generation cost, transmission congestion cost and marginal cost of loss to obtain the dynamic electricity price of the electricity spot market at time t, and establishes a dynamic change transmission path of the electricity price; according to the dynamic electricity price of the electricity spot market at time t, constructs a real-time optimization and control model of the integrated energy system, combines model predictive control theory with machine learning algorithm to solve the real-time optimization and control model of the integrated energy system, obtains the optimal control strategy of the integrated energy system, realizes real-time supply and demand balance in the electricity spot market, reduces energy waste, realizes system economic and low-carbon operation, and realizes real-time tracking and control of the adjustable resources in the integrated energy system on the spot market electricity price.
[0008] The present invention adopts the following technical solutions.
[0009] A first aspect of the present invention provides a method for real-time control of an integrated energy system taking into account spot market electricity prices, comprising:
[0010] Based on the dynamic electricity price in the electricity spot market at time t-1, the CCHP (Combined Cooling-Heating and Power) unit output, electrochemical energy storage charging power, electrochemical energy storage discharging power, and load to be adjusted at time t are solved and the solution is obtained;
[0011] The unit power generation cost is solved based on the solution results, the transmission congestion cost is solved based on the line utilization rate, the marginal cost of loss is solved based on the load demand, and the ancillary service cost is constructed based on the fluctuation of ancillary service demand at time t. The cost is summed with the unit power generation cost, transmission congestion cost and marginal cost of loss to obtain the dynamic electricity price in the electricity spot market at time t.
[0012] Based on the dynamic electricity price in the electricity spot market at time t, a real-time optimization and control model for the integrated energy system is constructed;
[0013] Combining model predictive control theory with machine learning algorithms to solve the real-time optimization and control model of the integrated energy system, the optimal control strategy of the integrated energy system is obtained. Preferably, the output power of the CCHP unit at time t is solved by:
[0014] When the electricity price in the electricity spot market at time t-1 is less than or equal to the minimum electricity price threshold of the electricity spot market, the minimum output power of the CCHP unit is set to the output power of the CCHP unit at time t;
[0015] When the electricity price in the electricity spot market at time t-1 is greater than or equal to the maximum electricity price threshold of the electricity spot market, the maximum output power of the CCHP unit is set to the output power of the CCHP unit at time t;
[0016] When the electricity price in the electricity spot market at time t-1 is greater than the minimum electricity price threshold of the electricity spot market and less than the maximum electricity price threshold of the electricity spot market, the difference between the electricity price in the electricity spot market at time t-1 and the minimum electricity price threshold of the electricity spot market is divided by the difference between the maximum electricity price threshold of the electricity spot market and the minimum electricity price threshold of the electricity spot market to obtain the electricity price mapping output ratio, the difference between the maximum output power of the CCHP unit and the minimum output power of the CCHP unit is multiplied by the electricity price mapping output ratio to obtain the adjustable output range of the unit, the adjustable output range of the unit is added to the minimum output power of the CCHP unit to obtain the final output result, which is set as the output power of the CCHP unit at time t.
[0017] Preferably, the electrochemical energy storage charging power, the electrochemical energy storage discharging power and the load to be adjusted are solved by:
[0018] When the electricity price in the electricity spot market at time t-1 is less than or equal to the minimum electricity price threshold of the electricity spot market, it is determined that the electrochemical energy storage is charging, and the net power of the electrochemical energy storage is the electrochemical energy storage charging power at time t;
[0019] When the electricity price in the electricity spot market at time t-1 is greater than or equal to the maximum electricity price threshold of the electricity spot market, the electrochemical energy storage is determined to be discharged, and the net power of the electrochemical energy storage is the electrochemical energy storage discharge power at time t;
[0020] When the electricity price in the electricity spot market at time t-1 is less than the highest electricity price threshold of the electricity spot market and greater than the lowest electricity price threshold of the electricity spot market, it is determined that the electrochemical energy storage is neither charging nor discharging, and the net power of the electrochemical energy storage is 0. The electrochemical energy storage charging power at time t and the electrochemical energy storage discharging power at time t are both 0;
[0021] The load to be adjusted is obtained by taking the difference between the electricity price in the electricity spot market at time t-1 and the electricity price during normal periods, and then multiplying it by the electricity price elasticity coefficient of the adjustable load.
[0022] Preferably, the dynamic electricity price in the electricity spot market at time t is solved by:
[0023] The power generation cost of the unit is calculated based on the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t, combined with the power supply and demand difference, natural gas cost and carbon cost.
[0024] Solve the transmission congestion cost based on line utilization;
[0025] Solve for the marginal cost of losses based on load demand;
[0026] The marginal cost of unit power generation cost, transmission congestion cost and loss is used to construct the initial electricity spot market price model based on the node marginal electricity price mechanism. The ancillary service cost is introduced into the initial electricity spot market price formula to construct the dynamic electricity spot market price.
[0027] Preferably, solving the power generation cost of the unit based on the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t, combined with the difference between electricity supply and demand, natural gas cost and carbon cost, includes:
[0028] The total energy supply of the system is obtained by summing the CCHP unit output power, electrochemical energy storage discharge power, and renewable energy output at time t. The total system demand is obtained by summing the load demand and electrochemical energy storage charging power. The difference between the total system energy supply and the total system demand is obtained by subtracting the total system energy supply from the total system demand.
[0029] Subtract the load demand from the renewable energy output to get the new energy and load deviation;
[0030] Multiply the natural gas price by the lower heating value of natural gas and divide it by the CCHP unit efficiency to obtain the natural gas cost;
[0031] Multiply the carbon price and the carbon emission intensity per unit of electricity generation to obtain the carbon cost;
[0032] When the deviation between renewable energy and load is less than or equal to 0, the minimum value between the natural gas cost and the marginal cost of renewable energy is taken as the unit power generation cost;
[0033] When it is determined that the deviation between new energy and load is greater than 0, the ratio of the electric energy supply and demand difference to the benchmark load is multiplied by the supply and demand tension coefficient, and then added to 1 to obtain the natural gas cost coefficient. The natural gas cost coefficient is multiplied by the natural gas cost, and then summed with the carbon cost. The sum is set as the unit power generation cost.
[0034] Preferably, the auxiliary service cost is specifically solved by:
[0035] Compare the ancillary service demand fluctuation at time t with the ancillary service demand benchmark value to obtain the ancillary service demand fluctuation rate;
[0036] Multiply the ancillary service demand volatility by the ancillary cost transmission coefficient to obtain the unit power ancillary service cost coefficient;
[0037] Multiply the unit power auxiliary service cost coefficient by the benchmark load to obtain the auxiliary service cost.
[0038] Preferably, the construction of a real-time optimization and control model for an integrated energy system based on the dynamic electricity price in the electricity spot market at time t includes:
[0039] Taking the minimization of real-time adjustment cost as the optimization goal and combining the dynamic electricity price in the electricity spot market at time t, the first objective function of the real-time optimization and control model of the integrated energy system is constructed.
[0040] Taking the minimum demand-side response time as the optimization goal, the second objective function of the real-time optimization and control model of the integrated energy system is constructed;
[0041] The electric load at time t is obtained based on the load to be adjusted. Combined with the CCHP unit output power, electrochemical energy storage charging power and electrochemical energy storage discharging power at time t, a constraint set considering system balance and unit operation is constructed.
[0042] Preferably, the method of combining model predictive control theory with machine learning algorithms to solve the real-time optimization and control model of the integrated energy system includes:
[0043] Set the machine learning algorithm to a Transformer neural network based on a multi-head attention mechanism to build a wind and solar load prediction model;
[0044] Input historical data into the wind-solar load forecasting model to solve the predicted load demand, predicted photovoltaic output, and predicted wind power output at the next moment, which are used in the prediction process of model predictive control theory;
[0045] The machine learning algorithm is set as an artificial neural network agent model to build a generation model for the control strategy of electric energy storage and gas turbines. The current electric energy storage SOC and the predicted load demand at the next moment, the predicted photovoltaic output, and the predicted wind power output are input to perform a time-series recursive cycle to optimize the electric energy storage and gas turbine control strategy. The electric energy storage and gas turbine control strategy is output and used in the rolling optimization process of model predictive control theory.
[0046] The machine learning algorithm is set as an online incremental learning algorithm, a prediction error compensation model is constructed, and the electric energy storage and gas turbine control strategies are implemented to obtain actual wind and solar load data. The prediction error compensation model and the wind and solar load forecast values are input into the model to solve the loss gradient and iteratively update the parameters of the artificial neural network agent model for feedback correction in model predictive control theory.
[0047] When the mean square error of the corrected artificial neural network agent model is less than the set threshold, the iteration is stopped and the optimal electric energy storage and gas turbine control strategy of the integrated energy system is obtained.
[0048] Preferably, the machine learning algorithm is set as an online incremental learning algorithm, a prediction error compensation model is constructed, the electric energy storage and gas turbine control strategy is executed, the actual wind and solar load data are obtained, the prediction error compensation model and the wind and solar load prediction value are input into the prediction error compensation model to solve the loss gradient and iteratively update the parameters of the artificial neural network agent model for feedback correction of the model predictive control theory, including:
[0049] Execute the electric energy storage and gas turbine control strategy, only execute the control instructions of the first period, and obtain the actual wind and solar load data;
[0050] Calculate the wind and solar load prediction value based on the actual wind and solar load data, and use the weighted mean square error to measure the loss between the wind and solar load prediction value and the actual wind and solar load data;
[0051] Calculate the gradient between the wind and solar load prediction value and the actual wind and solar load data loss based on the artificial neural network proxy model parameter set;
[0052] According to the gradient of the loss, the parameter set of the artificial neural network agent model is iteratively updated until the mean square error of the neural network agent model is less than the set threshold. The iteration is stopped and the optimal electric energy storage charging and discharging direction recommendations and gas turbine start-stop recommendations for all samples are obtained and set as the optimal electric energy storage and gas turbine control strategy for the integrated energy system.
[0053] A second aspect of the present invention provides a real-time control system for an integrated energy system taking into account spot market electricity prices, which executes the real-time control method for an integrated energy system taking into account spot market electricity prices described in the first aspect, including:
[0054] The data acquisition module is used to solve the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t based on the dynamic electricity price of the electricity spot market at time t-1, and obtain the solution;
[0055] The electricity price calculation module is used to calculate the unit's power generation cost based on the calculation results, the transmission congestion cost based on the line utilization rate, the marginal cost of losses based on the load demand, and the ancillary service cost based on the fluctuation of ancillary service demand at time t. The cost is then summed with the unit's power generation cost, transmission congestion cost, and marginal cost of losses to obtain the dynamic electricity price in the electricity spot market at time t.
[0056] The model building module is used to build a real-time optimization and control model for the integrated energy system based on the dynamic electricity price in the electricity spot market at time t;
[0057] The control strategy solving module is used to combine model predictive control theory and machine learning algorithms to solve the real-time optimization control model of the integrated energy system and obtain the optimal control strategy of the integrated energy system.
[0058] Compared with the prior art, the beneficial effects of the present invention include at least:
[0059] The present invention constructs a real-time control optimization model for an integrated energy system under the electricity spot market. By establishing a closed-loop transmission path for real-time changes in electricity prices in the electricity spot market, the model is solved by combining MPC (Model Predictive Control) theory with a machine learning algorithm. The model predictive control theory represents the process of prediction, rolling optimization, and feedback correction, and a real-time control optimization strategy for the integrated energy system is derived. Through the coordinated scheduling of multiple energy devices, each energy device is guided to dynamically adjust its output according to the electricity price, thereby achieving a real-time supply and demand balance in the electricity spot market and significantly improving the integrated energy system's ability to absorb renewable energy. With the help of a dynamic electricity price transmission path, the supply and demand of electricity is more accurately balanced, the system operating cost is reduced, energy waste is reduced, and the system is economical and low-carbon. The economy, reliability, and accuracy of the integrated energy system control under the electricity spot market are improved, making the system control more in line with the needs of the spot market.
[0060] Based on the traditional model prediction MPC, this paper proposes a real-time control optimization model solution method that combines a multi-head attention mechanism algorithm, a neural network proxy model, an online incremental learning algorithm with the prediction input link, the rolling optimization link, and the feedback correction link of MPC. This method improves the source-load prediction accuracy, simplifies the real-time optimization model, and realizes the dynamic adjustment of the prediction model parameters. This enables the integrated energy system control strategy to quickly and accurately track the real-time changes in spot electricity prices, shortens the optimization solution time, and improves the timeliness and accuracy of integrated energy system control in the electricity spot market.
[0061] Actively optimizing the dual objectives of system adjustment cost and user impact, taking into account constraints such as system power balance and unit ramping, and constructing a real-time control optimization model for the integrated energy system will help balance the interests of the source side and the load side and improve user response willingness. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a schematic diagram of a technical process provided according to an embodiment of the present invention;
[0063] Figure 2 is a schematic diagram of a transmission path for dynamic changes in electricity prices provided in accordance with an embodiment of the present invention;
[0064] Figure 3 Schematic diagram of an MPC process combined with a machine learning algorithm provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION
[0065] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.
[0066] like Figure 1 As shown, embodiment 1 of the present invention provides a real-time control method for an integrated energy system taking into account spot market electricity prices, comprising the following steps:
[0067] Step 1: Based on the dynamic electricity price in the electricity spot market at time t-1, adjust the CCHP output strategy, electrochemical energy storage charging and discharging strategy, and demand-side user response strategy to obtain the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power, and load to be adjusted at time t.
[0068] In a preferred but non-limiting embodiment of the present invention, step 1 comprises:
[0069] Step 1.1: Adjust the CCHP output strategy based on the dynamic electricity price in the electricity spot market at time t-1.
[0070] Further preferably, step 1.1 includes:
[0071] If the dynamic fluctuations in electricity prices at time t-1 indicate a high electricity price period, full power generation will be implemented, reducing the use of electric heating equipment and electric refrigeration units. Heating will be switched to gas boilers or heat storage tanks, utilizing cold storage or absorption refrigeration, relying on waste heat. Examples of such electric heating equipment include, but are not limited to, electric boilers. Based on the dynamic electricity spot market prices at time t-1, the combined natural gas power generation (CCHP) output strategy will be adjusted. Specific adjustments include:
[0072] When the electricity price in the electricity spot market at time t-1 is less than or equal to the minimum electricity price threshold of the electricity spot market, the minimum output power of the CCHP unit is set to the output power of the CCHP unit at time t;
[0073] When the electricity price in the electricity spot market at time t-1 is greater than or equal to the maximum electricity price threshold of the electricity spot market, the maximum output power of the CCHP unit is set to the output power of the CCHP unit at time t;
[0074] When the electricity price in the electricity spot market at time t-1 is greater than the lowest electricity price threshold of the electricity spot market and less than the highest electricity price threshold of the electricity spot market, the difference between the electricity price in the electricity spot market at time t-1 and the lowest electricity price threshold of the electricity spot market is divided by the difference between the highest electricity price threshold of the electricity spot market and the lowest electricity price threshold of the electricity spot market to obtain the electricity price mapping output ratio;
[0075] The adjustable output range of the unit is obtained by multiplying the difference between the maximum output power of the CCHP unit and the minimum output power of the CCHP unit by the output ratio mapped by the electricity price.
[0076] The final output result is obtained by adding the adjustable output range of the unit to the minimum output power of the CCHP unit. It is set as the output power of the CCHP unit at time t and is expressed as the following formula:
[0077]
[0078] Where, 、 、 They are the CCHP unit output power at time t, the CCHP unit minimum output power, and the CCHP unit maximum output power, 、 They are respectively the minimum electricity price threshold and the maximum electricity price threshold set in the electricity spot market.
[0079] Step 1.2: Adjust the charge and discharge strategy of the electrochemical energy storage device according to the dynamic electricity price in the electricity spot market at time t-1.
[0080] Further preferably, step 1.2 includes:
[0081] Electrochemical energy storage is charged when electricity prices are low and discharged when electricity prices are high, performing peak-valley arbitrage and smoothing out electricity price fluctuations. Based on the dynamic electricity price in the electricity spot market obtained in step 1, the charging and discharging strategy of the electrochemical energy storage device is adjusted. The specific process includes:
[0082] When the electricity price in the electricity spot market at time t-1 is less than or equal to the minimum electricity price threshold of the electricity spot market, it is determined that the electrochemical energy storage is charging, and the net power of the electrochemical energy storage is the electrochemical energy storage charging power at time t;
[0083] When the electricity price in the electricity spot market at time t-1 is greater than or equal to the maximum electricity price threshold of the electricity spot market, the electrochemical energy storage is determined to be discharged, and the net power of the electrochemical energy storage is the electrochemical energy storage discharge power at time t;
[0084] When the electricity price in the electricity spot market at time t-1 is less than the highest electricity price threshold of the electricity spot market and greater than the lowest electricity price threshold of the electricity spot market, it is determined that the electrochemical energy storage is neither charging nor discharging, and the net power of the electrochemical energy storage is 0. The electrochemical energy storage charging power at time t and the electrochemical energy storage discharging power at time t are both 0, which can be expressed as the following formula:
[0085]
[0086] Where, 、 are the electrochemical energy storage charging power and electrochemical energy storage discharging power at time t, is the charge and discharge direction of electrochemical energy storage at time t.
[0087] Step 1.3: Adjust the demand-side user response strategy based on the dynamic electricity price in the electricity spot market at time t-1.
[0088] Further preferably, step 1.3 includes:
[0089] The electricity price is greater than or equal to When it is determined to be a high electricity price period, the load reduction amount is solved. The user reduces his own load according to the load reduction amount during the high electricity price period and transfers to the low electricity price period. The electricity price is less than or equal to It is determined to be a low electricity price period, and the load reduction / transfer amount is set as the load to be adjusted. During the low electricity price period, the user transfers the load of the high electricity price period to itself according to the load reduction / transfer amount, and dynamically adjusts the electricity consumption curve. Among them, the load to be adjusted is obtained by taking the difference between the electricity price in the electricity spot market at time t-1 and the electricity price during the normal period, and then multiplying it by the electricity price elasticity coefficient of the adjustable load, which is expressed by the following formula:
[0090]
[0091] Where, is the load to be adjusted, is the price elasticity coefficient of the adjustable load, This is the electricity price during normal times.
[0092] Load reduction occurs during periods of high electricity prices, which cannot be shifted. However, due to the high electricity prices, production costs are increased, so some load reduction is chosen. For example, but not limited to, a factory with morning and evening shifts can shift production to the evening, when electricity prices are high during the day, as long as the total production target is met. Meanwhile, another factory, operating only during the day and facing high electricity prices, cannot shift production, but the cost of completing production is too high. The grid compensates users for load reduction, so the factory directly reduces that portion of its load for the day, offsetting the lost profits with the reduction compensation. Based on market electricity prices, demand-side users can freely shift or reduce their load, unusing some of their load during high electricity prices and using it during the day when prices are lower, thus achieving load shifting.
[0093] Step 2: The unit power generation cost is calculated based on the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power, and load to be adjusted at time t obtained in step 1. The transmission congestion cost is calculated based on the line utilization rate. The marginal cost of loss is calculated based on the load demand. The auxiliary service cost is constructed based on the fluctuation of the auxiliary service demand at time t and is summed with the unit power generation cost, transmission congestion cost, and marginal cost of loss to obtain the dynamic electricity price in the electricity spot market at time t, as shown in the following example: Figure 2 shown.
[0094] In a preferred but non-limiting embodiment of the present invention, step 2 comprises:
[0095] Step 2.1: Based on the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power, and load to be adjusted at time t, the power generation cost of the unit is solved in combination with the power supply and demand gap, natural gas cost, and carbon cost.
[0096] Further preferably, step 2.1 includes:
[0097] The total energy supply of the system is obtained by summing the CCHP unit output power, electrochemical energy storage discharge power, and renewable energy output at time t. The total system demand is obtained by summing the load demand and electrochemical energy storage charging power. The difference between the total system energy supply and the total system demand is obtained by subtracting the total system energy supply from the total system demand.
[0098] Subtract the load demand from the renewable energy output to get the new energy and load deviation;
[0099] Multiply the natural gas price by the lower heating value of natural gas and divide it by the CCHP unit efficiency to obtain the natural gas cost;
[0100] Multiply the carbon price and the carbon emission intensity per unit of electricity generation to obtain the carbon cost;
[0101] When the deviation between renewable energy and load is less than or equal to 0, the minimum value between the natural gas cost and the marginal cost of renewable energy is taken as the unit power generation cost;
[0102] When it is determined that the deviation between renewable energy and load is greater than 0, the ratio of the electric energy supply and demand difference to the benchmark load is multiplied by the supply and demand tension coefficient, and then added to 1 to obtain the natural gas cost coefficient. The natural gas cost coefficient is multiplied by the natural gas cost, and then summed with the carbon cost. The sum is set as the unit power generation cost, which is expressed as the following formula:
[0103]
[0104] Where, 、 、 They are the difference between electricity supply and demand, new energy and load deviation, and benchmark load. 、 、 、 、 、 are the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power, load to be adjusted, load demand and renewable energy output at time t, 、 are the cost of natural gas and the marginal cost of renewable energy, 、 are natural gas price, natural gas lower calorific value, 、 are CCHP unit efficiency and supply-demand tension coefficient, 、 、 They are carbon cost, carbon price and carbon emission intensity per unit of electricity generation respectively.
[0105] When wind and solar power generation exceeds load demand, there is excess output, the marginal unit becomes a renewable energy source with zero marginal cost, and the electricity price in the electricity spot market decreases; when wind and solar power generation is lower than load demand, there is insufficient output, and high-priced traditional power generation units are called upon to fill the power gap, and the electricity price in the electricity spot market increases.
[0106] Step 2.2: Calculate the transmission congestion cost based on line utilization.
[0107] Further preferably, step 2.2 includes:
[0108] The ratio of line utilization to line maximum utilization is multiplied by the congestion sensitivity coefficient and added to 1 to obtain the benchmark congestion cost coefficient;
[0109] The transmission congestion cost is obtained by multiplying the benchmark congestion cost coefficient by the benchmark congestion cost.
[0110]
[0111] Where, is the transmission congestion cost, is the baseline blocking cost, is the blocking sensitivity coefficient, 、 are line utilization and line maximum utilization respectively.
[0112] If there is insufficient renewable energy in the region and transmission is restricted, external high-priced electricity will be introduced, and electricity prices in the electricity spot market will rise. The benchmark congestion cost is determined by the power transmission of the external power grid and the integrated energy system under normal circumstances. The unplanned internal and external power transmission required in the real-time stage needs to take into account factors such as line utilization to quantify the electricity price.
[0113] Step 2.3, solve the marginal cost of loss based on load demand.
[0114] Further preferably, step 2.3 includes:
[0115] After squaring the load demand, multiply it by the load unit loss cost and the loss coefficient in sequence to obtain the marginal cost of loss.
[0116]
[0117] Where, is the marginal cost of loss, is the unit loss cost of the load, is the loss coefficient.
[0118] For price-sensitive loads, they can respond to high electricity prices and reduce their own electricity consumption to suppress peak electricity prices.
[0119] In step 2.4, the unit power generation cost, transmission congestion cost and marginal cost of loss obtained in steps 2.1-2.3 are used to construct an initial electricity spot market price model based on the node marginal electricity price mechanism. The ancillary service cost is introduced into the initial electricity spot market price formula to construct a dynamic electricity spot market price.
[0120] Further preferably, step 2.4 includes:
[0121] In step 2.4.1, the spot market adopts the node marginal price mechanism. Based on the unit power generation cost, transmission congestion cost, and marginal cost of losses, the initial electricity spot market price formula is constructed as follows:
[0122]
[0123] Where, represents the initial electricity spot market price, 、 、 They are the unit power generation cost, transmission congestion cost and marginal cost of loss respectively.
[0124] In the electricity spot market, the dynamic fluctuations of real-time electricity prices are highly correlated with changes in the supply and demand relationship of electricity energy. Uncertain factors such as fluctuations in renewable energy output and real-time fluctuations in load demand affect electricity prices through different mechanisms.
[0125] In step 2.4.2, the fluctuation of ancillary service demand is quantified as ancillary service cost, the initial electricity spot market price formula is introduced, and the dynamic electricity spot market price is constructed.
[0126] More preferably, step 2.4.2 comprises:
[0127]
[0128] Where, represents the electricity price in the electricity spot market at time t, represents the ancillary service cost, and the solution includes:
[0129] Compare the ancillary service demand fluctuation at time t with the ancillary service demand benchmark value to obtain the ancillary service demand fluctuation rate;
[0130] Multiply the ancillary service demand volatility by the ancillary cost transmission coefficient to obtain the unit power ancillary service cost coefficient;
[0131] Multiply the unit power auxiliary service cost coefficient by the benchmark load to obtain the auxiliary service cost, which is expressed as follows:
[0132]
[0133] Where, represents the auxiliary cost transmission coefficient, represents the fluctuation of ancillary service demand at time t, Indicates the baseline value of ancillary service demand.
[0134] When wind and solar output fluctuates significantly, the system requires more frequency regulation and reserve capacity, raising the ancillary services market clearing price and increasing electricity prices. The costs of ancillary services such as peak shaving, frequency regulation, and reserve capacity are transmitted to real-time spot market electricity prices through market mechanisms, such as, but not limited to, capacity payments and service bidding. Ancillary service demand here refers to the demand for ancillary services such as frequency regulation and reserve capacity.
[0135] CCHP units, energy storage equipment, and user responses make corresponding strategy adjustments based on real-time electricity prices. After the strategy is executed, electricity supply and demand, power generation costs, etc. will change, which will be fed back into the real-time electricity price, causing the electricity price to change.
[0136] Step 3: Based on the dynamic electricity price in the electricity spot market at time t, a real-time optimization and control model for the integrated energy system is constructed.
[0137] In a preferred but non-limiting embodiment of the present invention, step 3 comprises:
[0138] Real-time scheduling is based on intraday optimization scheduling. It adjusts unit output in real time and formulates the final output scheduling plan. The real-time and intraday scheduling cycles operate on different timescales. When selecting the optimization target, the results of the intraday scheduling period are considered.
[0139] Step 3.1: Taking the minimization of real-time adjustment cost as the optimization goal, combined with the dynamic electricity price in the electricity spot market at time t, the first objective function of the real-time optimization and control model of the integrated energy system is constructed. F 1, expressed as follows:
[0140]
[0141] Where, N, T, are the number of control scenarios, the number of scenario periods, and the probability of scenarios, respectively. 、 They are the deviation costs of electricity and natural gas in the real-time market respectively; in order to avoid the large penalty cost caused by the large deviation of electricity between the real-time stage and the day-ahead and day-intraday stages, the electricity deviation ratio is controlled within the range of λ through the day-ahead-day optimization regulation. 、 The specific calculation method is as follows:
[0142]
[0143] Where, is the dynamic electricity price in the electricity spot market at time t, 、 、 They represent the power demand and deviation power in the real-time control phase, and the cleared power in the day-ahead control phase. 、 、 、 They represent the wind curtailment penalty coefficient, solar curtailment penalty coefficient, actual wind curtailment amount and actual solar curtailment amount respectively. 、 They are the upward adjustment amount and downward adjustment amount in the intraday rolling optimization phase respectively. is the forecast deviation of natural gas load.
[0144] Step 3.2: Taking the minimum demand-side response time as the optimization goal, construct the second objective function of the integrated energy system real-time optimization and control model , expressed as follows:
[0145]
[0146] Where, It is the collection of electricity, cooling and heating loads in the integrated energy system. Load start time for real-time optimization strategy, The user's load start time, The larger the value of , the greater the impact of demand-side response on users in the integrated energy system and the lower the user comfort.
[0147] Step 3.3: Construct a set of constraints that take into account system balance and unit operation. The constraint set includes power balance constraints, energy storage device constraints, device model constraints, grid power constraints, and generator output deviation constraints.
[0148] Further preferably, step 3.3 includes:
[0149] Step 3.3.1: Construct the electric power balance constraint.
[0150]
[0151] Where, 、 、 、 are the electric power generated by the natural gas trigeneration, gas turbine, wind turbine and photovoltaic unit at the grid node i at the scheduling time t, is the grid interaction power, 、 、 They are the electric load of the grid node, the heat pump load power, and the electric energy storage charging and discharging power.
[0152] Step 3.3.2: Construct energy storage device constraints. Energy storage device constraints take into account the charge and discharge power constraints and are expressed as follows:
[0153]
[0154] Where, 、 is a 0-1 variable, representing the charging and discharging status of the energy storage device during period t. 、 、 Respectively represent the current storage capacity, minimum storage capacity, and maximum storage capacity of the energy storage device. 、 They are the upper limit of charging power and the upper limit of discharging power of energy storage equipment respectively.
[0155] Step 3.3.3, build device model constraints.
[0156]
[0157] Where, 、 are the output power of unit n in the dispatch period t and the output power of unit n in the dispatch period t+1, 、 are the minimum and maximum output power of unit n respectively, 、 are the ramping power and climbing power of unit n respectively.
[0158] Step 3.3.4, construct the grid power constraint.
[0159]
[0160] Where, represents the grid interaction power at time t, The upper limit of the transmission power out of the power grid is The upper limit of the power transmitted to the grid.
[0161] Step 3.3.5: Construct the generator set output deviation constraint.
[0162]
[0163] Where, is the real-time stage adjustment factor, 、 are the output powers of unit n in real-time scheduling and intraday rolling scheduling during period t respectively.
[0164] Step 4: Combine model predictive control theory with machine learning algorithms to solve the real-time optimization and control model of the integrated energy system, and obtain the optimal control strategy of the integrated energy system to achieve real-time control of the integrated energy system taking into account the spot market electricity price, such as Figure 3 shown.
[0165] In a preferred but non-limiting embodiment of the present invention, step 4 comprises:
[0166] In step 4.1, the machine learning algorithm is set to a Transformer neural network based on a multi-head attention mechanism to build a wind and solar load prediction model for the prediction process in model predictive control theory.
[0167] Further preferably, step 4.1 includes:
[0168] Step 4.1.1: Position encode the original time series data matrix X, add the position encoding matrix E to the original time series data matrix X, and obtain the position enhancement sequence H, which can be expressed as the following formula:
[0169]
[0170] Where, E i,2j 、E i,2j+1 are the elements in the i-th row, 2j-th column and the i-th row, 2j+1-th column in the position encoding matrix E, respectively. i and j are the position index and dimension index respectively. model Encodes the dimension for the load sequence.
[0171] In step 4.1.2, perform multi-head projection on the position enhancement matrix H to obtain the query vector, key vector, and value vector of each single head, which can be expressed as follows:
[0172]
[0173] Where, 、 、 are the query vector Q, key vector K and value vector V of the h-th single head respectively, 、 and are the Q, K, and V projection matrices of the h-th single head respectively.
[0174] In step 4.1.3, construct the single-head attention according to the query vector, key vector, and value vector of each single head.
[0175]
[0176] Where, represents the attention weight of the i-th position, which is calculated as follows:
[0177]
[0178] In the formula, softmax(.) is the normalization function, and F(.) is the attention score calculation function, which is expressed as follows:
[0179]
[0180] Where, Represents the key vector and query vector Dimensions, A vector representing the value at the i-th position.
[0181] Step 4.1.4, merge the single-head attention into the multi-head attention result to obtain the output of the multi-head attention mechanism , expressed as follows:
[0182]
[0183] Where n0 represents the number of groups of single attention mechanisms used, Indicates the connection operation performed on the last dimension, is the learnable parameter matrix.
[0184] Step 4.1.5: Input the output of the multi-head attention mechanism into the feedforward neural network , expressed as follows:
[0185]
[0186] Where, is the output of the multi-head attention mechanism, 、 are the weights of the first layer nonlinear transformation and the second layer nonlinear transformation, respectively. 、 are the bias parameters of the first layer nonlinear transformation and the bias parameters of the second layer nonlinear transformation, respectively.
[0187] In step 4.1.6, the output of the feedforward neural network is input into the fully connected layer for linear transformation, and the output of each position is weighted and dimensionally transformed to better meet the requirements of the time series prediction task. The feature expression ability is then enhanced through the nonlinear activation function ReLU, and denormalization is performed to obtain the final prediction result, thus constructing a wind and solar load prediction model.
[0188] In step 4.2, the data of the historical period is input into the wind-solar load model obtained in step 4.1 to obtain the predicted load demand, predicted photovoltaic output and predicted wind power output at the next moment.
[0189] Collect historical data, including load data, wind power / photovoltaic output data, meteorological data, etc. Take the next two hours of wind speed, sunlight and other meteorological and historical load time series data as input, and output the probability distribution of future wind power and photovoltaic output and load demand.
[0190]
[0191] Where, 、 、 They are respectively the wind power output forecast value, photovoltaic output forecast value and load forecast demand at the future time t+1, represents the wind power, photovoltaic output and load demand forecasting model taking into account the Transformer, which is constructed in step 4.1; 、 、 They are the historical wind speed, light intensity and load demand time series data from the past 24 hours to time t.
[0192] In step 4.3, the machine learning algorithm is set as an artificial neural network agent model, and a control strategy generation model for electric energy storage and gas turbines is constructed. The current electric energy storage SOC and the predicted load demand, predicted photovoltaic output, and predicted wind power output at the next moment obtained in step 4.2 are input to perform a time-series recursive cycle to generate the strategy output. The next round of load demand, predicted photovoltaic output, and predicted wind power output are predicted based on the actual execution results of the strategy. The strategy output is repeatedly optimized and used in the rolling optimization process of the model predictive control theory to output the electric energy storage and gas turbine control strategy. Among them, the electric energy storage and gas turbine control strategy includes suggestions on the charging and discharging direction of the electric energy storage and suggestions on the start and stop of the gas turbine.
[0193] Further preferably, step 4.3 includes:
[0194] Step 4.3.1, construct an artificial neural network agent model based on the artificial neural network, which is expressed as the following formula:
[0195]
[0196] Where W3, W4, W5, and W6 are the synaptic weights of each neuron; b3, b4, b5, and b6 are the bias parameters of each neuron; (.) is the sigmoid function, which compresses the output to the interval [0, 1]. GELU(.) is the Gaussian error linear unit activation function, and its expression is as follows:
[0197]
[0198] Where, is the input parameter; is the cumulative function of the standard normal distribution.
[0199] In step 4.3.2, the current energy storage SOC and the predicted load demand, predicted photovoltaic output, and predicted wind power output obtained in step 4.2 are input into the artificial neural network agent model in step 4.3.1, and the energy storage charging and discharging direction recommendations and gas turbine start and stop recommendations are output, which are the energy storage and gas turbine control strategies.
[0200]
[0201] Where, Suggestions for the direction of charging and discharging of electric energy storage, ; Provide gas turbine start-up and shutdown recommendations, ; It is an artificial neural network agent model; is the current SOC of the energy storage, ; is the weight parameter of the neural network at time t, which is obtained through training with historical data.
[0202] In step 4.3.3, the energy storage charging and discharging direction recommendations and the gas turbine start-up and shutdown recommendations of step 4.3.2 are executed, triggering step 4.2 to re-forecast the next round of load demand, photovoltaic output, and wind power output. The predicted next round of load demand, photovoltaic output, and wind power output are re-input into the artificial neural network agent model, and the optimized energy storage and gas turbine control strategies for subsequent time periods are generated in a cyclic iteration for the rolling optimization process of the model predictive control theory.
[0203] In step 4.4, the machine learning algorithm is set as an online incremental learning algorithm, and a prediction error compensation model is constructed for the feedback correction process in the model predictive control theory. The electric energy storage and gas turbine control strategy obtained in step 4.3 is executed to obtain the actual real-time data of wind, solar and load, namely wind power output, photovoltaic output, and load demand data. The prediction error compensation model is input, and the loss gradient is solved with the prediction value at the corresponding time and the parameters of the artificial neural network agent model are updated so that the prediction value continuously approaches the actual observation value, realizing the feedback correction in the model predictive control theory.
[0204] Further preferably, step 4.4 includes:
[0205] Step 4.4.1: Execute the electric energy storage and gas turbine control strategy obtained in step 4.3, and only execute the control instructions for the first period. , obtain the actual data of wind and solar load after the command is executed .
[0206] Step 4.4.2: Calculate the predicted value and actual data loss of wind and solar load based on the real-time data of wind and solar load obtained in step 4.4.1.
[0207] More preferably, step 4.4.2 comprises:
[0208] Loss Function It is expressed as weighted mean square error (WMSE), which is used to measure the difference between the predicted value and the actual value. The specific expression is as follows:
[0209]
[0210] Where, is the lookback time step of the loss function; is the time decay factor, giving more weight to recent data. .
[0211] In step 4.4.3, based on the artificial neural network proxy model parameter set, the gradient of the loss between the predicted value in step 4.4.2 and the actual value in the actual wind and solar load data is calculated, which can be expressed as the following formula:
[0212]
[0213] Where, is the parameter set of the artificial neural network agent model, , The loss gradient indicates the direction in which the loss function grows fastest. In order to minimize the loss function, the gradient is calculated by the back propagation algorithm, and only some network parameters (such as the neural network weight parameters) are updated. , decoder weight W and bias parameter b), parameters The updates of , W and b need to be performed in the opposite direction of the gradient to make the prediction closer to the actual value.
[0214] Step 4.4.4: Update the model parameter set of steps 4.1 to 4.3 based on the loss gradient of step 4.4.3, expressed as follows:
[0215]
[0216] Where, is the parameter set of the model at time t; is the online learning rate (step size), which controls the amplitude of parameter updates; is the model prediction value, ; is the actual observed value, .
[0217] Step 4.5: When the neural network is updated and iterated, the training process is stopped when a certain level is reached, and the mean square error of the artificial neural network proxy model is used. To reflect the threshold for stopping training, when the mean square error is less than the set threshold, it is considered that the model has converged or is about to overfit, and the iteration is stopped at this time. The optimal electric energy storage charging and discharging direction recommendations and gas turbine start and stop recommendations for all samples are obtained, and the optimal electric energy storage and gas turbine control strategy for the integrated energy system is obtained. The calculation method is as follows:
[0218]
[0219] Where, n 、 N are the neural network training sample index and total number of samples respectively; 、 They are respectively the recommendations of the neural network model on the charging and discharging direction of the electric energy storage and the starting and stopping of the gas turbine for the nth sample; 、 are the real discrete decisions of electric energy storage and gas turbine, respectively.
[0220] Embodiment 2 of the present invention provides a real-time control system for an integrated energy system taking into account spot market electricity prices, and executes the real-time control method for an integrated energy system taking into account spot market electricity prices described in embodiment 1, including:
[0221] The data acquisition module is used to solve the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t based on the dynamic electricity price of the electricity spot market at time t-1, and obtain the solution;
[0222] The electricity price calculation module is used to calculate the unit's power generation cost based on the calculation results, the transmission congestion cost based on the line utilization rate, the marginal cost of losses based on the load demand, and the ancillary service cost based on the fluctuation of ancillary service demand at time t. The cost is then summed with the unit's power generation cost, transmission congestion cost, and marginal cost of losses to obtain the dynamic electricity price in the electricity spot market at time t.
[0223] The model building module is used to build a real-time optimization and control model for the integrated energy system based on the dynamic electricity price in the electricity spot market at time t;
[0224] The control strategy solving module is used to combine model predictive control theory and machine learning algorithms to solve the real-time optimization control model of the integrated energy system and obtain the optimal control strategy of the integrated energy system.
[0225] Compared with the prior art, the beneficial effects of the present invention include at least:
[0226] The present invention constructs a real-time control optimization model for an integrated energy system under the electricity spot market. By establishing a closed-loop transmission path for real-time changes in electricity prices in the electricity spot market, the model is solved by combining model predictive control theory with a machine learning algorithm to derive a real-time control optimization strategy for the integrated energy system. Through the coordinated dispatch of multiple energy devices, each energy device is guided to dynamically adjust its output according to the electricity price, thereby achieving a real-time supply and demand balance in the electricity spot market and significantly improving the integrated energy system's ability to absorb renewable energy. With the help of a dynamic electricity price transmission path, the supply and demand of electricity is more accurately balanced, the system's operating costs are reduced, energy waste is reduced, and economical and low-carbon operation of the system is achieved. This improves the economy, reliability, and accuracy of the integrated energy system's control under the electricity spot market, making the system's control more in line with spot market demand.
[0227] Based on the traditional model prediction MPC, this paper proposes a real-time control optimization model solution method that combines a multi-head attention mechanism algorithm, an artificial neural network agent model, an online incremental learning algorithm with the prediction input link, rolling optimization link, and feedback correction link of MPC. This method improves the source-load prediction accuracy, simplifies the real-time optimization model, and realizes dynamic adjustment of the prediction model parameters. This enables the integrated energy system control strategy to quickly and accurately track real-time changes in spot electricity prices, shortens the optimization solution time, and improves the timeliness and accuracy of integrated energy system control in the electricity spot market.
[0228] Actively optimizing the dual objectives of system adjustment cost and user impact, taking into account constraints such as system power balance and unit ramping, and constructing a real-time control optimization model for the integrated energy system will help balance the interests of the source side and the load side and improve user response willingness.
[0229] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0230] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A method for real-time control of an integrated energy system taking into account spot market electricity prices, characterized by: According to the dynamic electricity price in the electricity spot market at time t-1, the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t are solved and the solution is obtained; The unit power generation cost is solved based on the solution results, the transmission congestion cost is solved based on the line utilization rate, the marginal cost of loss is solved based on the load demand, and the ancillary service cost is constructed based on the fluctuation of ancillary service demand at time t. The cost is summed with the unit power generation cost, transmission congestion cost and marginal cost of loss to obtain the dynamic electricity price in the electricity spot market at time t. Based on the dynamic electricity price in the electricity spot market at time t, a real-time optimization and control model for the integrated energy system is constructed, including: taking the minimization of the real-time adjustment cost as the optimization goal, and combining the dynamic electricity price in the electricity spot market at time t, constructing the first objective function of the real-time optimization and control model for the integrated energy system; Taking the minimum demand-side response time as the optimization goal, the second objective function of the real-time optimization and control model of the integrated energy system is constructed; The electric load at time t is obtained based on the load to be adjusted. Combined with the CCHP unit output power, electrochemical energy storage charging power, and electrochemical energy storage discharging power at time t, a constraint set that takes into account system balance and unit operation is constructed. Combining model predictive control theory with machine learning algorithms to solve the real-time optimization and control model of the integrated energy system and obtain the optimal control strategy of the integrated energy system. Combining model predictive control theory with machine learning algorithms to solve the real-time optimization and control model of the integrated energy system includes: setting the machine learning algorithm to a Transformer neural network based on a multi-head attention mechanism to construct a wind and solar load prediction model; Input historical data into the wind-solar load forecasting model to solve the predicted load demand, predicted photovoltaic output, and predicted wind power output at the next moment, which are used in the prediction process of model predictive control theory; The machine learning algorithm is set as an artificial neural network agent model to build a generation model for the control strategy of electric energy storage and gas turbines. The current electric energy storage SOC and the predicted load demand at the next moment, the predicted photovoltaic output, and the predicted wind power output are input to perform a time-series recursive cycle to optimize the electric energy storage and gas turbine control strategy. The electric energy storage and gas turbine control strategy is output and used in the rolling optimization process of model predictive control theory. The machine learning algorithm is set as an online incremental learning algorithm, a prediction error compensation model is constructed, and the electric energy storage and gas turbine control strategies are implemented to obtain actual wind and solar load data. The prediction error compensation model and the wind and solar load forecast values are input into the model to solve the loss gradient and iteratively update the parameters of the artificial neural network agent model for feedback correction in model predictive control theory. When the mean square error of the corrected artificial neural network agent model is less than the set threshold, the iteration is stopped and the optimal electric energy storage and gas turbine control strategy of the integrated energy system is obtained.
2. The method for real-time control of an integrated energy system taking into account spot market electricity prices according to claim 1, characterized in that: The output power of the CCHP unit at time t is solved by: When the electricity price in the electricity spot market at time t-1 is less than or equal to the minimum electricity price threshold of the electricity spot market, the minimum output power of the CCHP unit is set to the output power of the CCHP unit at time t; When the electricity price in the electricity spot market at time t-1 is greater than or equal to the maximum electricity price threshold of the electricity spot market, the maximum output power of the CCHP unit is set to the output power of the CCHP unit at time t; When the electricity price in the electricity spot market at time t-1 is greater than the minimum electricity price threshold of the electricity spot market and less than the maximum electricity price threshold of the electricity spot market, the difference between the electricity price in the electricity spot market at time t-1 and the minimum electricity price threshold of the electricity spot market is divided by the difference between the maximum electricity price threshold of the electricity spot market and the minimum electricity price threshold of the electricity spot market to obtain the electricity price mapping output ratio, the difference between the maximum output power of the CCHP unit and the minimum output power of the CCHP unit is multiplied by the electricity price mapping output ratio to obtain the adjustable output range of the unit, the adjustable output range of the unit is added to the minimum output power of the CCHP unit to obtain the final output result, which is set as the output power of the CCHP unit at time t.
3. The method for real-time control of an integrated energy system taking into account spot market electricity prices according to claim 1, characterized in that: The electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted are solved by: When the electricity price in the electricity spot market at time t-1 is less than or equal to the minimum electricity price threshold of the electricity spot market, it is determined that the electrochemical energy storage is charging, and the net power of the electrochemical energy storage is the electrochemical energy storage charging power at time t; When the electricity price in the electricity spot market at time t-1 is greater than or equal to the maximum electricity price threshold of the electricity spot market, the electrochemical energy storage is determined to be discharged, and the net power of the electrochemical energy storage is the electrochemical energy storage discharge power at time t; When the electricity price in the electricity spot market at time t-1 is less than the highest electricity price threshold of the electricity spot market and greater than the lowest electricity price threshold of the electricity spot market, it is determined that the electrochemical energy storage is neither charging nor discharging, and the net power of the electrochemical energy storage is 0. The electrochemical energy storage charging power at time t and the electrochemical energy storage discharging power at time t are both 0; The load to be adjusted is obtained by taking the difference between the electricity price in the electricity spot market at time t-1 and the electricity price during normal periods, and then multiplying it by the electricity price elasticity coefficient of the adjustable load.
4. The method for real-time control of an integrated energy system taking into account spot market electricity prices according to claim 1, characterized in that: The dynamic electricity price in the electricity spot market at time t is solved by: The power generation cost of the unit is calculated based on the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t, combined with the power supply and demand difference, natural gas cost and carbon cost. Solve the transmission congestion cost based on line utilization; Solve for the marginal cost of losses based on load demand; The marginal cost of unit power generation cost, transmission congestion cost and loss is used to construct the initial electricity spot market price model based on the node marginal electricity price mechanism. The ancillary service cost is introduced into the initial electricity spot market price formula to construct the dynamic electricity spot market price.
5. The method for real-time control of an integrated energy system taking into account spot market electricity prices according to claim 4, characterized in that: The power generation cost of the unit is solved based on the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t, combined with the power supply and demand difference, natural gas cost and carbon cost, including: The total energy supply of the system is obtained by summing the CCHP unit output power, electrochemical energy storage discharge power, and renewable energy output at time t. The total system demand is obtained by summing the load demand and electrochemical energy storage charging power. The difference between the total system energy supply and the total system demand is obtained by subtracting the total system energy supply from the total system demand. Subtract the load demand from the renewable energy output to get the new energy and load deviation; Multiply the natural gas price by the lower heating value of natural gas and divide it by the CCHP unit efficiency to obtain the natural gas cost; Multiply the carbon price and the carbon emission intensity per unit of electricity generation to obtain the carbon cost; When the deviation between renewable energy and load is less than or equal to 0, the minimum value between the natural gas cost and the marginal cost of renewable energy is taken as the unit power generation cost; When it is determined that the deviation between new energy and load is greater than 0, the ratio of the electric energy supply and demand difference to the benchmark load is multiplied by the supply and demand tension coefficient, and then added to 1 to obtain the natural gas cost coefficient. The natural gas cost coefficient is multiplied by the natural gas cost, and then summed with the carbon cost. The sum is set as the unit power generation cost.
6. A method for real-time control of an integrated energy system taking into account spot market electricity prices according to claim 1 or 4, characterized in that: The auxiliary service cost is solved by: Compare the ancillary service demand fluctuation at time t with the ancillary service demand benchmark value to obtain the ancillary service demand fluctuation rate; Multiply the ancillary service demand volatility by the ancillary cost transmission coefficient to obtain the unit power ancillary service cost coefficient; Multiply the unit power auxiliary service cost coefficient by the benchmark load to obtain the auxiliary service cost.
7. The method for real-time control of an integrated energy system taking into account spot market electricity prices according to claim 1, characterized in that: The machine learning algorithm is set as an online incremental learning algorithm, a prediction error compensation model is constructed, the electric energy storage and gas turbine control strategy is executed, the actual wind and solar load data is obtained, the prediction error compensation model and the wind and solar load prediction values are input into the prediction error compensation model to solve the loss gradient and iteratively update the parameters of the artificial neural network agent model for feedback correction of the model predictive control theory, including: Execute the electric energy storage and gas turbine control strategy, only execute the control instructions of the first period, and obtain the actual wind and solar load data; Calculate the wind and solar load prediction value based on the actual wind and solar load data, and use the weighted mean square error to measure the loss between the wind and solar load prediction value and the actual wind and solar load data; Calculate the gradient between the wind and solar load prediction value and the actual wind and solar load data loss based on the artificial neural network proxy model parameter set; According to the gradient of the loss, the parameter set of the artificial neural network agent model is iteratively updated until the mean square error of the neural network agent model is less than the set threshold. The iteration is stopped and the optimal electric energy storage charging and discharging direction recommendations and gas turbine start-stop recommendations for all samples are obtained and set as the optimal electric energy storage and gas turbine control strategy for the integrated energy system.
8. A real-time control system for an integrated energy system taking into account spot market electricity prices, which implements a real-time control method for an integrated energy system taking into account spot market electricity prices according to any one of claims 1 to 7, characterized in that: The data acquisition module is used to solve the CCHP unit output power, electrochemical energy storage charging power, electrochemical energy storage discharging power and load to be adjusted at time t based on the dynamic electricity price of the electricity spot market at time t-1, and obtain the solution; The electricity price calculation module is used to calculate the unit's power generation cost based on the calculation results, the transmission congestion cost based on the line utilization rate, the marginal cost of losses based on the load demand, and the ancillary service cost based on the fluctuation of ancillary service demand at time t. The cost is then summed with the unit's power generation cost, transmission congestion cost, and marginal cost of losses to obtain the dynamic electricity price in the electricity spot market at time t. The model building module is used to build a real-time optimization and control model for the integrated energy system based on the dynamic electricity price in the electricity spot market at time t; The control strategy solving module is used to combine model predictive control theory and machine learning algorithms to solve the real-time optimization control model of the integrated energy system and obtain the optimal control strategy of the integrated energy system.
Citation Information
Patent Citations
A multi-agent energy storage control method and system based on node marginal electricity price
CN114977187B
Source-load coordination dispatch method for thermal storage electric heating absorbing wind and solar power based on dynamic electricity price
CN115081838B
A microgrid energy system optimization method based on real-time electricity price incentives
CN115130777B
Grid-connected coordinated planning method and system for integrated energy system
CN112084705A
Multi-park microgrid demand response method and system
CN118472963A