Multi-energy collaborative predictive control method and system based on digital twinning

By combining digital twin technology and LSTM prediction models with a multi-verification and optimization mechanism of virtual system models, the sawtooth deviation problem between predicted and actual values ​​in multi-energy systems is solved, and the safe and efficient operation of multi-energy systems is achieved.

CN122000945APending Publication Date: 2026-05-08ZHONGYI GANGNENG (SHANGHAI) ENERGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGYI GANGNENG (SHANGHAI) ENERGY DEVELOPMENT CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In multi-energy collaborative operation control scenarios with a high proportion of renewable energy grid connection and extensive participation of energy storage devices and flexible loads, the feedback loop problem caused by the reliance of the prediction model on the control execution results in the existing technology leads to a regular sawtooth deviation between the predicted value and the actual value, causing power fluctuations of energy equipment and system instability, increasing the risk of equipment failure and energy supply interruption.

Method used

A multi-energy collaborative predictive control method based on digital twins is adopted. Robust load forecast values ​​are generated through an LSTM prediction model. Combined with a virtual system model, simulation and secondary optimization are performed to construct a closed-loop control system, including modules for data acquisition, prediction, solution, correction, and execution, to realize the correction and feedback adjustment of the initial scheduling plan.

Benefits of technology

It effectively solves the problem of endogenous feedback loops caused by predictive-dependent control execution results, reduces the fluctuation of energy equipment at the constraint boundary, improves the accuracy of supply and demand matching, ensures the stability and security of the system, and reduces the risk of equipment failure and energy supply interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000945A_ABST
    Figure CN122000945A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-energy collaborative predictive control method and system based on digital twinning, and relates to the technical field of industrial control. The method comprises the following steps: inputting each energy historical load of a plurality of historical periods and meteorological prediction data of a next period into a trained LSTM prediction model to carry out multi-energy load prediction, and outputting to obtain each energy load prediction value of the next period; constructing an optimization model, and solving the optimization model to obtain a preliminary scheduling plan; performing simulation deduction on the control instruction in the preliminary scheduling plan to obtain a pre-estimated system state in the next period; if the simulation deduction result is deviated from expectation, correcting the preliminary scheduling plan based on the state of a next-period pre-estimated system to obtain a final control instruction set; the problem of endogenous feedback circulation caused by the fact that prediction depends on a control execution result in existing multi-energy control is solved, sawtooth-shaped deviation between a predicted value and an actual value is avoided, and safe and efficient operation of a multi-energy system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial control technology, and more specifically, to a multi-energy collaborative predictive control method and system based on digital twins. Background Technology

[0002] In multi-energy collaborative operation control scenarios with a high proportion of renewable energy grid connection and extensive participation of energy storage devices and flexible loads, a closed-loop control system encompassing prediction, optimization, and execution is needed to address random fluctuations on the source and load sides in order to achieve dynamic balance and efficient utilization of energy supply and demand. The core principle of this technology is as follows: the prediction module collects historical operating data and real-time status information to establish a predictive model of load and renewable energy output, providing data support for subsequent optimization decisions; the optimization module, based on the prediction results and combined with system operating constraints and economic and environmental goals, generates optimal strategies for power output adjustment, energy storage charging and discharging control, and load regulation; the execution module issues optimization commands to each energy device and simultaneously feeds back actual operating data from the devices to the prediction module, achieving dynamic updates and closed-loop iterations of the model.

[0003] However, since the construction of the predictive model directly depends on the execution results of the previous round of control commands, the control actions generated by the optimization module will change the actual operating state of the system. This causes the data fed back to the predictive module to deviate from the natural operating trend, resulting in a deviation in the prediction results of the next round. The optimization module then uses this deviation prediction value as the basis for formulating control strategies, further amplifying the deviation between the system's operating state and the natural trend, forming an endogenous feedback loop in which prediction deviation and control actions reinforce each other. This problem leads to a regular sawtooth-shaped deviation between the predicted and actual values, with the power of energy equipment fluctuating back and forth on the operating constraint boundary. This not only fails to achieve the expected energy-saving and efficiency-enhancing goals but also causes an abnormal increase in the number of charge-discharge cycles of energy storage equipment, exacerbating the instability of system operation and increasing the risk of equipment failure and energy supply interruption.

[0004] In view of this, the present invention proposes a multi-energy collaborative predictive control method and system based on digital twins to solve the above problems. Summary of the Invention

[0005] To overcome the aforementioned shortcomings of the prior art and achieve the above objectives, the present invention provides the following technical solution: a multi-energy collaborative predictive control method based on digital twins, comprising:

[0006] The historical energy load data from multiple historical cycles and the meteorological forecast data for the next cycle are input into a trained LSTM prediction model to predict the multi-energy load, and the predicted values ​​of each energy load for the next cycle are output.

[0007] Based on the pre-selected decision variables, the predicted values ​​of each energy load for the next cycle, and the preset constraint parameters, an optimization model is constructed and solved to obtain a preliminary scheduling plan.

[0008] The control instructions in the preliminary scheduling plan are simulated and extrapolated to obtain the estimated system state for the next cycle. If the simulation results deviate from the expectations, the preliminary scheduling plan is revised based on the estimated system state for the next cycle to obtain the final control instruction set.

[0009] Control commands are executed based on the final control instruction set, and feedback monitoring and model correction are performed.

[0010] Furthermore, the decision variables used to construct the optimization model include generator output commands, energy storage charging and discharging commands, load adjustment commands, cooling output commands, heating output commands, and gas supply equipment output commands.

[0011] Furthermore, the objective function of the optimization model includes stability-related terms;

[0012] The constraints and constraint parameters of the optimization model are consistent.

[0013] Furthermore, stability-related items include minimizing the output variation of each device, minimizing the rate of change of the energy storage state of charge, minimizing the degree to which the operating parameters of each energy network deviate from the preset safety margin, and minimizing the fluctuation of grid frequency and voltage.

[0014] Furthermore, the constraint parameters include the upper limit of generator output, the lower limit of generator output, the upper limit of energy storage charging power, the upper limit of energy storage discharging power, energy storage capacity, the upper and lower limits of energy storage SOC, the upper limit of chiller output, the upper limit of boiler output, the upper limit of load regulation, coupled constraint parameters, and safety margin requirements.

[0015] Furthermore, methods for obtaining the predicted system state for the next cycle include:

[0016] A virtual system model is pre-built, with the predicted values ​​of each energy load and the planned control actions as inputs, and the output is the estimated system state for the next cycle;

[0017] The virtual system model is a digital twin of the entire system. The planned control actions are the control instructions corresponding to the initial scheduling scheme. The initial scheduling scheme is derived by continuing the control instructions actually executed in the previous cycle and by calculating the control instructions for the equipment in combination with the predicted values ​​of each energy load.

[0018] Furthermore, the virtual system model performs system state evolution calculations based on the law of conservation of energy;

[0019] The virtual system model establishes supply and demand balance equations for electricity, cooling energy, heating energy, and gas respectively. In the electricity balance equation, the total power supply equals the sum of the total electrical load and the power grid loss. The total power supply is the sum of the predicted output of renewable energy, the output command of the generator, and the discharge power of energy storage. The total electrical load is the predicted electrical load. In the cooling energy balance equation, the total cooling capacity equals the predicted cooling load. The total cooling capacity is the sum of the output command of the chiller and the release of cold energy storage. In the heating energy balance equation, the total heating capacity equals the predicted heating load. The total heating capacity is the sum of the output command of the boiler, the heating output command of the CHP unit, and the release of thermal energy storage. In the gas balance equation, the total gas supply equals the sum of the predicted gas load and the gas consumption of gas equipment. The total gas supply is the sum of the output command of the gas supply equipment and the release of gas energy storage.

[0020] Furthermore, methods for determining whether the simulation results deviate from expectations include:

[0021] In the next cycle of system state prediction, if the simulated value of any key indicator exceeds the allowable range of the corresponding preset target value, or if the distance between the simulated value of any key indicator and the constraint boundary is less than the preset safety threshold, it is determined to be a deviation from the expectation.

[0022] The constraint boundaries are the upper and lower limits of the constraint parameters;

[0023] Key indicators include energy storage status of charge, generator output, chiller output, boiler output, grid voltage, grid frequency, heating network supply and return water temperature, heating network supply and return water pressure, gas network pressure, and gas network flow rate.

[0024] The preset target value is the standard range for the safe and stable operation of the system, and the preset safety threshold is the buffer zone between the constraint boundary and the allowable range of the preset target value.

[0025] Furthermore, methods for obtaining the final control instruction set include:

[0026] A quadratic optimization model is constructed, which includes minimizing the total deviation of supply and demand balance of multiple energy sources, minimizing the weighted sum of adjustment of control commands of each device, minimizing the weighted sum of change rate of control commands of each device, and minimizing the total sum of penalty terms for deviation from safety margin.

[0027] Solve the quadratic optimization model to obtain the adjustment amount of the control command;

[0028] The adjustment amount of the control command is superimposed on the control command of the preliminary scheduling plan to obtain the final control command set.

[0029] A multi-energy collaborative predictive control system based on digital twins includes:

[0030] The data acquisition module is used to collect data on various energy loads in real time.

[0031] The prediction module is used to input historical energy load data from multiple historical cycles and meteorological forecast data for the next cycle into a trained LSTM prediction model to perform multi-energy load prediction and output the predicted values ​​of energy load for the next cycle.

[0032] The solution module constructs an optimization model based on pre-selected decision variables, the predicted values ​​of each energy load for the next cycle, and preset constraint parameters, and solves the optimization model to obtain a preliminary scheduling plan.

[0033] The correction module is used to simulate and extrapolate the control instructions in the preliminary scheduling plan to obtain the estimated system state for the next cycle. If the simulation result deviates from the expectation, the preliminary scheduling plan is corrected based on the estimated system state for the next cycle to obtain the final control instruction set.

[0034] The execution module executes control commands based on the final control instruction set and performs feedback monitoring and model correction.

[0035] Compared with existing technologies, the technical effects and advantages of the multi-energy collaborative predictive control method and system based on digital twins of the present invention are as follows:

[0036] This invention constructs a closed-loop control system for data acquisition, prediction, solution, correction, and execution. By acquiring multi-energy load and meteorological data, robust multi-energy load prediction values ​​are generated using an LSTM prediction model combined with a dual-channel mechanism. An optimization model is constructed based on decision variables, prediction values, and constraint parameters to obtain a preliminary scheduling plan. The preliminary scheduling plan is simulated and extrapolated using a virtual system model. Then, a secondary optimization model is used to correct the plan that deviates from the expected results. Finally, control commands are executed and the correction model is continuously fed back.

[0037] This invention effectively solves the endogenous feedback loop problem caused by prediction-dependent control execution results in the prior art through multiple verification and optimization mechanisms. It avoids the sawtooth deviation between predicted and actual values, reduces the back-and-forth fluctuations of energy equipment at the constraint boundary, reduces the abnormal cycle loss of energy storage equipment, improves the accuracy of multi-energy supply and demand matching, ensures the stability of system operation, reduces the risk of equipment failure and energy supply interruption, and realizes the safe and efficient operation of multi-energy systems. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of a multi-energy collaborative predictive control system based on digital twins, according to an embodiment of the present invention.

[0039] Figure 2 This is a flowchart of a multi-energy collaborative predictive control method based on digital twins according to an embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of a virtual system model according to an embodiment of the present invention. Detailed Implementation

[0041] The technical solutions of the embodiments of the present invention will be described in detail, clearly, and completely below with reference to the accompanying drawings. It should be particularly noted that the specific embodiments described below are only for better illustrating and explaining the technical solutions of the present invention, and are intended to enable those skilled in the art to better understand and implement the present invention, and should not be construed as limiting the scope of protection of the present invention. Without departing from the spirit and substance of the present invention, those skilled in the art can modify, adjust, or make equivalent substitutions based on the content disclosed in the present invention, and these should all be considered within the scope of protection of the present invention.

[0042] Example 1:

[0043] Please see Figure 1 As shown, this embodiment discloses a multi-energy collaborative predictive control system based on digital twins, including a data acquisition module, a prediction module, a solution module, a correction module, and an execution module. Each module is connected via wired and / or wireless means to achieve data transmission.

[0044] The data acquisition module is used to collect data on various energy loads in real time.

[0045] The real-time collected data is cleaned and synchronized with time, removing outliers or missing values ​​such as sensor jumps. Actual load curves are smoothed using methods such as moving averages or median filtering. Feature sequences required for prediction are prepared, such as constructing load and weather sequences from the past few hours as LSTM input tensors. Weather forecasts are format-converted, for example, extracting temperature curves for the next few hours in 10-minute increments. Furthermore, constraint parameters are read as global constants for subsequent calculations. These constraint parameters include upper and lower limits for generator output, upper and lower limits for energy storage charging power, upper and lower limits for energy storage discharging power, energy storage capacity, upper and lower limits for energy storage SOC, upper and lower limits for chiller output, upper and lower limits for boiler output, upper limit for load regulation, coupling constraint parameters, and safety margin requirements. Among these, the upper and lower limits for generator output represent the allowable power output range of conventional generators or combined heat and power units, ensuring safe equipment operation. The upper and lower limits for energy storage charging power and energy storage discharging power are constraints on the maximum charging and discharging power per unit time of the energy storage system. The energy storage capacity is the upper limit of the total capacity of the energy storage equipment, used to constrain the calculation of energy storage SOC. The upper and lower limits of the State of Charge (SOC) for energy storage represent the safe range of the energy storage's state of charge, preventing overcharging or over-discharging. The upper limit of the chiller output is the maximum cooling power of refrigeration equipment such as electric chillers, preventing overload operation. The upper limit of the boiler output is the maximum heating capacity of heating equipment such as gas boilers or heat pumps. The upper limit of the load regulation is the maximum range of adjustable load, used for demand response. Coupling constraint parameters are the constraints on multi-energy coupled equipment, such as the electrothermal output coupling curve of a combined cooling, heating, and power (CCHP) unit, and the relationship between cooling and heat energy consumption in an absorption chiller, ensuring that the energy balance relationship conforms to the physical model during optimization. Safety margin requirements are reserved power margins or standby capacity to cope with prediction errors and sudden disturbances; for example, requiring generators and energy storage to retain a certain margin and not be fully utilized. These constraint parameters are usually given in the system planning or equipment ratings and stored in the configuration file of the dispatch control system. For example, the maximum and minimum output of a generator are determined by the equipment's rated power and technical limitations, and are configured in the Energy Management System (EMS); the power and capacity limits of energy storage are provided by the Battery Management System (BMS) and transmitted to the dispatch control system via a communication interface; the output limits of chillers and boilers are determined by the parameters on the equipment nameplate. For load regulation limits, maintenance personnel can set them based on the interruptible load list and store them in the dispatch strategy configuration. These parameters are usually static, stored within the dispatch optimization module, and are periodically checked and updated by operators as needed, such as adjusting safety margin requirements during seasonal changes.

[0046] After preprocessing, the prediction input dataset is obtained, which includes historical electricity load, historical cooling load, historical heating load, historical gas load sequences from recent periods, as well as meteorological forecast data. Historical electricity load is time-series data of electricity load from previous periods; historical cooling load is time-series data of cooling energy loads such as air conditioning cooling capacity from previous periods; historical heating load is time-series data of heating energy loads such as heating capacity from previous periods; historical gas load is gas consumption data from previous periods. Historical electricity load, cooling load, heating load, and gas load are all provided by the historical database in the EMS (Electronic Management System). This data is typically collected by smart meters installed at energy-consuming devices and pipelines. For example, electricity load is sampled and recorded at a frequency of 1 minute or higher using smart meters or distribution monitoring devices; cooling and heating loads are estimated per minute using flow meters and temperature sensors in the building automation system; gas load is measured and recorded using gas flow meters. Historical data is aggregated and stored in the edge gateway or local server for use in predictive model training and real-time retrieval.

[0047] Meteorological forecast data is obtained through third-party meteorological service APIs or local weather stations. For more refined load forecasting, the system should integrate weather forecasts for the next few hours, including parameters such as outdoor temperature, humidity, solar radiation intensity, and wind speed. The data collection frequency can be determined by the EMS periodically retrieving the latest forecast data based on the meteorological update frequency, and cached for use by the forecasting algorithm. Edge devices, such as on-site meteorological sensors, can also provide real-time local weather measurements to assist in refining forecasts.

[0048] The prediction module is used to input historical energy load data from multiple historical cycles and meteorological forecast data for the next cycle into a trained LSTM prediction model to perform multi-energy load prediction and output the predicted values ​​of each energy load for the next cycle.

[0049] A trained LSTM prediction model is used for multi-energy load forecasting. Historical electricity load, historical cooling load, historical heating load, and historical gas load sequences contain the inherent laws of load evolution over time, including intraday peak-valley variations, intraweek fluctuation characteristics, and medium- and long-term trends. Meanwhile, parameters such as ambient temperature and solar radiation intensity in meteorological forecast data directly affect cooling and heating load demand and renewable energy power generation efficiency, and are key external driving factors for load and output changes.

[0050] LSTM forecasting models, through their unique gating structure, can capture the time dependencies and correlations of influencing factors inherent in the input data. By learning the variation patterns of historical loads under corresponding meteorological conditions, they establish a mapping relationship between input data and future loads, thereby outputting the load forecast for the next period. A dual forecasting channel mechanism is introduced to improve forecast robustness: the main channel is LSTM forecasting, which can capture complex nonlinear trends; the auxiliary channel selects a recent trend linear extrapolation model and a persistent forecasting model. The selection of these two models is based on a design logic of complementarity and adaptation to different load change scenarios. The recent trend linear extrapolation model, by fitting the load change slope of the most recent five consecutive periods, can capture the short-term continuous trend of load changes, adapting to conditions where the load is rising or falling steadily, avoiding forecast lag caused by trend changes; the persistent forecasting model directly uses the actual load value of the previous period as the load forecast value for the next period, providing a stable benchmark reference under conditions where the load has no significant changes and fluctuations are gentle, preventing over-prediction bias when there is no trend. The two models complement each other, ensuring that the auxiliary channel can output reliable independent forecast estimates under different load change scenarios.

[0051] The results from the two channels are compared, and the absolute difference between the main channel prediction and the auxiliary channel prediction is calculated. This absolute difference is divided by the auxiliary channel prediction to obtain the relative rate of change. If this relative rate of change exceeds a preset reasonable rate of change threshold, and also exceeds the maximum value of the actual relative rate of change of load in the most recent ten consecutive periods, then the main channel LSTM prediction is deemed to have an abnormally aggressive change. At this time, a correction mechanism is triggered to harmonize the prediction values. The harmonization adopts a dynamic weighted average combined with a maximum change step size limit. In the dynamic weighted average, the weight of the main channel prediction is initially set to 0.7, and the weight of the auxiliary channel prediction is initially set to 0.3. The larger the relative rate of change between the main channel prediction and the auxiliary channel prediction, the lower the weight of the main channel prediction and the higher the weight of the auxiliary channel prediction. The weight adjustment range is limited to 0.3 to 0.7 for the main channel and 0.3 to 0.7 for the auxiliary channel. At the same time, the maximum change step size of the prediction value relative to the actual load of the previous period is limited. This maximum change step size does not exceed 1.2 times the maximum change step size of the actual load in the most recent twenty consecutive periods. This dual constraint avoids excessive bias in a single model. For renewable energy output forecasting, a dual-channel mechanism is also adopted. The main channel is LSTM prediction, and the auxiliary channel selects the photovoltaic cell equivalent circuit model. This model is based on the predicted irradiance, the predicted ambient temperature, and the rated parameters of the photovoltaic cell. The theoretical photovoltaic output is obtained by calculating the photoelectric conversion efficiency of the photovoltaic cell. The dual channels cross-validate the reliability of the prediction results.

[0052] The corrected energy load forecasts include electricity load forecasts, cooling load forecasts, heating load forecasts, gas load forecasts, and renewable energy output forecasts. The electricity load forecast is for the next cycle's electricity load; the cooling load forecast is for the next cycle's cooling energy demand; the heating load forecast is for the next cycle's heating energy demand; the gas load forecast is for the next cycle's gas consumption demand; and the renewable energy output forecast is for the next cycle's renewable energy power output. These energy load forecasts ensure responsiveness to future demand while mitigating potential excessive deviations through a dual-channel mechanism, providing a robust input basis for optimization.

[0053] The solution module constructs an optimization model based on pre-selected decision variables, the predicted values ​​of each energy load for the next cycle, and preset constraint parameters, and solves the optimization model to obtain a preliminary scheduling plan.

[0054] Before making scheduling decisions, a virtual system model is used to simulate and extrapolate the system behavior for one or more future cycles. The virtual system model is essentially a digital twin of the system; it accepts predicted energy load values ​​and planned control actions as inputs. The planned control actions are the control commands corresponding to the initial scheduling scheme, which is derived from the control commands actually executed in the previous cycle and calculated based on the predicted energy load values. Please refer to [link to relevant documentation]. Figure 3As shown, the virtual system model performs system state evolution calculations based on the law of conservation of energy and equipment characteristic models. The specific calculation process is as follows: First, supply and demand balance equations are established for each energy category: electricity, cooling energy, heating energy, and gas. In the electricity balance equation, the total power supply equals the sum of the total electrical load and the power grid loss. The total power supply is the sum of the predicted output of renewable energy, the output command of the generator, and the discharge power of energy storage. The total electrical load is the predicted electrical load. In the cooling energy balance equation, the total cooling capacity equals the predicted cooling load. The total cooling capacity is the sum of the output command of the chiller and the release of stored cooling energy. In the heating energy balance equation, the total heating capacity equals the predicted heating load. The total heating capacity is the sum of the output command of the boiler, the heating output command of the CHP unit, and the release of stored heating energy. In the gas balance equation, the total gas supply equals the sum of the predicted gas load and the gas consumption of the gas equipment. The total gas supply is the sum of the output command of the gas supply equipment and the release of stored gas. Simultaneously, combining the characteristic models of each device, including the generator's output-efficiency curve, the energy storage system's charge-discharge efficiency model, the CHP unit's electrothermal coupling output relationship model, the chiller's cooling capacity-energy consumption curve model, and the boiler's heating capacity-gas consumption curve model, a numerical integration method is used to progressively deduce the operating parameters of each device and the overall state changes of the system at each simulation step. The selection of the numerical integration method is based on the fact that the state evolution of a multi-energy system is a continuous-time dynamic process, and the device characteristic models contain nonlinear relationships. The numerical integration method can accurately capture the continuous change law of the system state over time through discretization processing, is compatible with the solution requirements of nonlinear models, and achieves a balance between computational accuracy and computational efficiency. It can complete multi-cycle derivations within a minute-level scheduling cycle, meeting the time constraints of real-time decision-making.

[0055] The initial scheduling scheme and predicted values ​​of each energy load are input into the virtual system model to simulate the system state in the short term. By comparing the simulation results with the expected values, potential problems caused by prediction deviations can be identified in advance. The expected values ​​are preset target values ​​for the safe and stable operation of the system, including the safe operating range of energy storage charge state, the safe margin range of generator output, the safe operating range of chiller and boiler output, the rated range of grid voltage and frequency, the safe range of heating network supply and return water temperature and pressure, and the safe range of gas network pressure and flow. These preset target values ​​are all derived from the system's constraint parameters and safety margin requirements. Specifically, the comparison method is to calculate the deviation between the simulated value and the corresponding expected value of each indicator in the virtual system state. If the simulated value of a certain indicator exceeds the allowable range of the expected value, or the distance between the simulated value and the constraint boundary is less than a preset threshold, it is determined that there is a problem caused by prediction deviation. The virtual system state feedback provided by the virtual system model can be regarded as a kind of feedforward verification, presenting the impact of external disturbances and model uncertainties on the system.

[0056] An optimization model is established with safety and stability as its objective. The decision variables of the optimization model include generator output commands, energy storage charging and discharging commands, load regulation commands, cooling output commands, heating output commands, and gas supply equipment output commands. These variables are chosen because they can directly regulate the supply and consumption of each energy type, covering all energy supply and demand regulation aspects of electricity, cooling, heating, and gas. Optimizing the configuration of these variables can directly achieve supply and demand balance for each energy type, while simultaneously meeting the core objectives of system safety, stability, economy, and environmental protection. Specifically, generator output commands are power setpoints issued to electrical energy equipment such as diesel engines, gas turbines, or electricity purchased from the grid. Energy storage charging and discharging commands are charging and discharging power commands issued to the energy storage system; positive values ​​indicate discharging for energy supply, and negative values ​​indicate charging for energy storage. Load regulation commands are demand-side management commands, such as reducing air conditioning load by a certain number of kilowatts or delaying the energy consumption time of non-critical loads. Cooling output commands are instructions issued to refrigeration equipment, such as turning on, off, or adjusting the power of chillers to provide the required cooling capacity. Heating output commands are instructions issued to heating equipment such as boilers and heat pumps, such as adjusting gas valves or electric heating power to provide the required heat.

[0057] The goal is to find the optimal plan under ideal conditions, assuming accurate predictions and no disturbances, to obtain the optimal instruction set that satisfies the energy supply and demand balance in the next cycle. Due to the emphasis on safety and stability, the objective function not only considers economic costs but also incorporates stability-related terms. These terms include minimizing the output variation of each device, minimizing the rate of change of energy storage state of charge, minimizing the deviation of key operating parameters of each energy network from safety margins, and minimizing the fluctuations in grid frequency and voltage. These stability-related terms are included because sudden changes in device output can exacerbate system operational fluctuations, rapid changes in energy storage state of charge can accelerate equipment aging and affect regulation capabilities, deviations of key operating parameters of the energy network from safety margins can increase the risk of exceeding limits, and grid frequency and voltage fluctuations directly threaten power supply stability. Constraints from these stability-related terms can ensure the smooth operation of the system from multiple dimensions. The constraints are completely consistent with the constraint parameters in the input, strictly ensuring that the upper limit of generator output, the lower limit of generator output, the upper limit of energy storage charging power, the upper limit of energy storage discharging power, energy storage capacity, the upper and lower limits of energy storage state of charge, the upper limit of chiller output, the upper limit of boiler output, the upper limit of load regulation, coupling constraint parameters, and safety margin requirements are not violated, and safety margin requirements are reserved in advance.

[0058] The solution is obtained as follows: First, the objective function and constraints are transformed into standard mathematical form. If the decision variables include discrete variables such as equipment start-up and shutdown states, a mixed-integer programming method is used. If the decision variables are only output variables that are continuously adjusted, a linear programming method is used. A mature mathematical programming solver is called, the transformed standard mathematical model is input, and the solution accuracy threshold and maximum computation time threshold are set. The solver gradually approaches the optimal solution through iterative search and outputs a feasible solution that meets the constraints within minutes, thus generating a preliminary scheduling plan for each piece of equipment.

[0059] The specific method of using the estimated system state for the next cycle as a constraint or correction term is as follows: extract the simulation values ​​of each key indicator in the estimated system state; if the simulation value of a key indicator is close to the corresponding constraint boundary or exceeds the safety margin requirement, adjust the constraint value corresponding to that indicator in the constraint parameters to increase the constraint threshold and reserve more safety buffer; if the estimated system state shows that there is a potential imbalance between the supply and demand of a certain type of energy, add the penalty weight of the supply and demand balance deviation of that type of energy in the optimization objective function to guide the optimization process to prioritize the supply and demand matching of that type of energy; in this way, the predictive information of the virtual simulation results is integrated into the optimization process to make up for the possible deficiencies in the prediction.

[0060] The final preliminary dispatch plan includes suggested generator output commands, energy storage charging and discharging commands, load adjustment commands, cooling output commands, heating output commands, gas supply equipment output commands, and other related equipment command values. At this point, the preliminary dispatch plan has not yet been issued, but is prepared as a candidate scheme for simulation and revision.

[0061] The correction module is used to simulate and extrapolate the control instructions in the preliminary scheduling plan to obtain the estimated system state for the next cycle. If the simulation result deviates from the expectation, the preliminary scheduling plan is corrected based on the estimated system state for the next cycle to obtain the final control instruction set.

[0062] By performing secondary corrections on the control commands in the initial scheduling plan, the direct coupling between forecast deviation and control commands is broken. In this stage, the system compares the scheduling plan with the current actual state and calculates the forecast deviation. The forecast deviation is the difference between the predicted value of each energy load and the actual value at the end of the previous cycle. The forecast deviation directly reflects the degree of deviation between the predicted value and the actual operating state.

[0063] The control commands from the initial scheduling plan are input into the virtual system model for another simulation to verify their effectiveness when considering the dynamics of the real system. If, in the next cycle's predicted system state obtained from the virtual simulation, the simulated value of any key indicator exceeds the corresponding preset target value's allowable range, or the distance between the simulated value and the constraint boundary is less than the preset safety threshold, it is determined to be a deviation from expectations. Key indicators include energy storage state of charge, generator output, chiller output, boiler output, power grid line voltage, power grid frequency, heating network supply and return water temperature, heating network supply and return water pressure, gas network pressure, and gas network flow rate. The preset target value is the standard range for safe and stable system operation, and the preset safety threshold is the buffer zone between the constraint boundary and the preset target value's allowable range. In this case, the commands need to be adjusted.

[0064] The specific criteria for determining whether the control commands in the preliminary scheduling plan are drastic, based on the changes in the actual control commands of the previous cycle, are as follows: Calculate the absolute difference between the control commands of the current cycle and the actual control commands of the previous cycle. Divide this absolute difference by the rated output of the corresponding equipment to obtain the relative rate of change. Simultaneously, calculate the absolute difference between the control commands of the current cycle and the actual control commands of the previous cycle and compare it with the maximum allowable ramp rate of the equipment. The maximum allowable ramp rate of the equipment is the maximum output change allowed per unit time specified in the constraint parameters. If the relative rate of change exceeds 30%, or the absolute difference exceeds the maximum allowable ramp rate of the equipment, the control command change is deemed too drastic. In this case, a smoothing constraint is added to limit the change in the commands of the current cycle to a safe range.

[0065] Based on the prediction error assessment, potential systematic biases in the current prediction are determined. This prediction error assessment is not directly measured by sensors, but rather calculated by the EMS software at the end of each cycle. After receiving actual load and output data, the dispatch system compares it with the corresponding predicted values ​​to calculate the prediction errors for each item in the current cycle. The calculation logic is implemented as an algorithm in the EMS, and the results are stored as a time series for adaptive correction of the prediction model or intermediate reconciliation optimization. If the difference between the predicted and actual values ​​of a certain type of energy load in the previous cycle shows a consistent deviation for more than three consecutive cycles, it is determined that a systematic bias exists. During the reconciliation in this cycle, feedforward compensation is performed at 50% to 80% of this systematic bias. This is achieved by adjusting the output commands or load adjustment commands of the corresponding energy supply equipment, reserving additional margin to prevent further insufficient bias.

[0066] Based on the above verification results, a small-scale quadratic optimization model is established. The objective function of the secondary optimization model comprises four terms, each designed around the core requirements of safe and stable system operation, equipment loss control, and robust command execution. These are explained below: The first term minimizes the total deviation of the multi-energy supply-demand balance, i.e., the sum of the absolute values ​​of the differences between the supply and demand of electricity, cooling, heating, and gas. This objective is designed because multi-energy supply-demand balance is the foundation of stable system operation. Supply-demand imbalance directly leads to problems such as grid frequency fluctuations, abnormal heating network pressure, and gas network flow imbalance. By minimizing this total deviation, precise matching of supply and demand for each energy type can be ensured, fundamentally avoiding operational risks caused by supply-demand mismatch. The second term minimizes the weighted sum of the control command adjustments for each device. The weights are set according to the device's adjustment sensitivity; devices with lower adjustment sensitivity have higher weights. This is because large boilers, gas turbines, and other devices with low adjustment sensitivity have slow response speeds and are difficult to adjust. Frequent or large adjustments increase mechanical wear, shorten service life, and may cause operational instability. Giving them higher weights reduces unnecessary adjustments while also considering the adaptability of devices with flexible adjustments. The first objective is to achieve optimal overall equipment losses. The second objective is to minimize the weighted sum of the change rates of control commands for each device. The change rate is the ratio of the difference between the adjusted command and the actual command in the previous cycle to the rated output of the device. The weights are set according to the stability requirements of the devices, with higher weights for devices with higher stability requirements. This is because sudden changes in the output of devices with high stability requirements, such as grid interconnection lines and core energy storage systems, can cause system fluctuations and even trigger chain reactions. By limiting the change rate of commands and assigning higher weights to devices with high stability requirements, a smooth transition in device output can be ensured, avoiding secondary disturbances to the system caused by sudden command changes and maintaining the stability of system operation. The third objective is to minimize the sum of penalty terms for deviations from the safety margin. If the distance between the system state corresponding to the adjusted command and the safety margin boundary is less than a preset threshold, a penalty value is calculated inversely proportional to the distance. This is because the safety margin is a key buffer against prediction errors and sudden disturbances. The closer the system state is to the safety margin boundary, the higher the risk of exceeding the limit. Setting the penalty value inversely proportional to the distance can strengthen the constraint on the near-critical state, guide the optimization results away from the constraint boundary, reserve sufficient safety redundancy, and avoid the system exceeding the limit due to small fluctuations. The decision variables of the quadratic optimization model are the adjustment amounts of the control commands for each device. The constraints and constraint parameters are completely consistent. At the same time, constraints on the rate of change of control commands in the current cycle and the upper limit of adjustment amount are added.During the solution process, the quadratic optimization model is transformed into standard mathematical form. Based on the type of decision variables, either linear programming or mixed-integer programming is selected. A mature mathematical programming solver is invoked, and thresholds for solution accuracy and maximum computation time are set. Due to the small model size and low variable dimensionality, the solver can output the optimal solution within seconds, obtaining the adjustment amounts for the control commands of each device. These adjustments are then superimposed on the initial commands of the scheduling plan to form a corrected control command set. This process is equivalent to adding a layer of safety-ensuring correction control to the initial economic scheduling scheme, making the final commands more robust and reliable.

[0067] The final control command set, after harmonization and correction, is obtained. This includes optimized and adjusted generator output commands, energy storage charging and discharging commands, load regulation commands, cooling output commands, heating output commands, gas supply equipment output commands, and control commands for any other equipment. The final control command set has undergone multiple verifications, balancing compensation for prediction deviations with strict adherence to physical constraints, thus providing safer guidance for actual execution. While the harmonized commands may be slightly more conservative than the initial plan, they effectively prevent the cumulative amplification of prediction errors within the closed loop.

[0068] The execution module executes control commands based on the final control instruction set and performs feedback monitoring and model correction.

[0069] EMS sends commands to the corresponding device controllers via the fieldbus for execution. In the field, generator regulating valves or converters adjust output power according to generator output commands; the battery management system receives energy storage charging and discharging commands and controls the bidirectional converter to perform constant power charging and discharging operations; the building automation system adjusts air conditioning temperature settings or starts / stops specific units to reduce load according to load adjustment commands; the boiler adjusts the gas supply rate according to heating commands, and the chiller adjusts the compressor frequency according to cooling commands, etc. During execution, the local controllers of each device perform closed-loop control based on set values ​​to ensure that the target output is actually achieved. In addition, after the system enters its current operating cycle, it continuously monitors key safety indicators: for example, when the microgrid operates independently, it monitors the stability of the bus frequency, and the energy storage responds quickly to balance the power; if frequency or voltage exceeds limits, graded control intervenes immediately, for example, when the frequency drops, the energy storage automatically increases discharge to ensure immediate stability.

[0070] For the actual energy generated or consumed by each energy device, such as the actual output of the generator after adjustment reaching X kW, the actual discharge of the battery being Y kW, and the actual load reduction being Z kW, the field sensors record these execution feedback data in real time. Simultaneously, new system states are obtained, including: energy storage SOC updates, regional temperature changes, and grid switching power changes. If no limit-over-limit alarms occur during system execution, it indicates that the current cycle is operating safely and stably.

[0071] By comparing the actual load with the load forecast, the forecast deviation values ​​for electricity, cooling, heating, and gas are obtained; similarly, the actual renewable energy output is compared with the forecast output.

[0072] Compare the actual generator output with the command value to check the accuracy of execution tracking. If there is a large difference, it may be that the equipment has not met the command or has malfunctioned, and an alarm record is required. Compare the actual value of energy storage SOC with the previous simulation estimate to evaluate the accuracy of the virtual system model.

[0073] If a systematic bias in the prediction occurs for several consecutive cycles, adjust the bias terms of the LSTM prediction model or introduce online incremental learning to fine-tune the model weights with new data; alternatively, use a simple residual correction method, which adds a certain proportion of the prediction error from the previous cycle to the prediction output of the next cycle to offset the bias trend. For virtual system models, if the virtual system state deviates significantly from the actual feedback, the model parameters also need to be calibrated periodically, such as adjusting equipment efficiency parameters to make the simulation more realistic.

[0074] Key data for the current period, including predicted values, actual values, control commands, and errors, will be archived and written into a historical database to provide data support for future offline analysis and model retraining.

[0075] The final output includes an LSTM prediction model with updated weights learned online, a virtual system model with corrected parameters, and a new initial system state for use in the next cycle. These outputs ensure that each model can more accurately reflect system behavior in subsequent control cycles, thereby further reducing deviation accumulation. The system then begins the control calculation cycle for the next cycle, and the entire closed-loop process continues to execute in real time, ensuring the safe and stable operation of the multi-energy system.

[0076] This embodiment proactively mitigates the amplification trend of deviations in the prediction-optimization closed loop by introducing a dual-layer control mechanism that combines virtual and real elements. Specifically, this is manifested in:

[0077] The virtual system model is equivalent to a parallel "virtual state feedback" loop. Before making optimization decisions, it simulates future states, feeding back the impact of external disturbances and model uncertainties on the system to the controller in the form of virtual system states. Control decisions are then made based on this, performing feedforward compensation and constraint adjustments. This is equivalent to adding a barrier outside of feedback control, preventing prediction errors from directly affecting the actual system. This mechanism is similar to adding a parallel predictive correction loop to closed-loop control to weaken the propagation of deviations and shield against external disturbances. Even if the prediction is flawed, the virtual model can detect problems early and prompt adjustments to the control scheme, thus preventing small deviations from escalating into major errors.

[0078] In addition to the conventional predictive optimization closed loop, a fast-response harmonic optimization layer is added. Based on the initial optimization scheme, it combines real-time feedback fine-tuning instructions to ensure that the final control action does not overly rely on the accuracy of the prediction. Specifically, this layer ensures smooth operation by limiting the rate of change of instructions and maintaining a margin, preventing the deviation from the previous cycle from being fully reflected in the drastic control action of the current cycle. This two-layer optimization architecture ensures that the strategy considers both future predictions and does not overly rely on single prediction values, but rather makes decisions based on a comprehensive consideration of the current actual state. In control theory, this is equivalent to dual-loop control: the outer loop is prediction-driven optimization, and the inner loop is real-time correction optimization; both work together to ensure closed-loop stability. Because the inner loop suppresses the amplified response to prediction noise, the robustness of the closed-loop system is greatly enhanced. Just as closed-loop control requires deviation correction, the design mechanism in this embodiment avoids excessive correction, thus escaping the vicious cycle where prediction deviation leads to control deviation, which in turn leads to even larger deviations.

[0079] The dual-channel prediction verification introduced in the embodiment provides a more reliable reference for control. The auxiliary measures effectively constrain the extreme predictions that LSTM may produce. When prediction uncertainty increases, the control strategy tends to be conservative, for example, by maintaining more reserves or coordinating multiple sources to share the error, preventing any single source from bearing the entire risk of the deviation. This is equivalent to adding redundancy and verification at the information level, preventing prediction errors from being amplified into system-wide risks. Therefore, the closed-loop intelligent system does not accumulate and deteriorate due to a single deviation, but rather achieves stable control through small corrections in each cycle.

[0080] In summary, the combined mechanisms of virtual system modeling, intermediate reconciliation optimization, and dual-channel prediction ensure that each control cycle considers both historical and future factors while simultaneously correcting current decisions in real time, forming a robust closed-loop control system. Small deviations are promptly mitigated, and large deviations are addressed with early warnings, preventing them from amplifying and leading to loss of control through cyclical feedback. This scheme fully meets the requirements of prioritizing safety and stability, can be implemented in engineering projects, and provides reliable assurance for the intelligent scheduling of multi-energy systems.

[0081] Example 2:

[0082] Please see Figure 2 As shown, this embodiment provides a multi-energy collaborative predictive control method based on digital twins, including:

[0083] The historical energy load data from multiple historical cycles and the meteorological forecast data for the next cycle are input into a trained LSTM prediction model to predict the multi-energy load, and the predicted values ​​of each energy load for the next cycle are output.

[0084] Based on the pre-selected decision variables, the predicted values ​​of each energy load for the next cycle, and the preset constraint parameters, an optimization model is constructed and solved to obtain a preliminary scheduling plan.

[0085] The control instructions in the preliminary scheduling plan are simulated and extrapolated to obtain the estimated system state for the next cycle. If the simulation results deviate from the expectations, the preliminary scheduling plan is revised based on the estimated system state for the next cycle to obtain the final control instruction set.

[0086] Control commands are executed based on the final control instruction set, and feedback monitoring and model correction are performed.

[0087] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

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

Claims

1. A multi-energy collaborative predictive control method based on digital twins, characterized in that, include: The historical energy load data from multiple historical cycles and the meteorological forecast data for the next cycle are input into a trained LSTM prediction model to predict the multi-energy load, and the predicted values ​​of each energy load for the next cycle are output. Based on the pre-selected decision variables, the predicted values ​​of each energy load for the next cycle, and the preset constraint parameters, an optimization model is constructed and solved to obtain a preliminary scheduling plan. The control instructions in the preliminary scheduling plan are simulated and extrapolated to obtain the estimated system state for the next cycle. If the simulation results deviate from the expectations, the preliminary scheduling plan is revised based on the estimated system state for the next cycle to obtain the final control instruction set. Control commands are executed based on the final control instruction set, and feedback monitoring and model correction are performed.

2. The multi-energy collaborative predictive control method based on digital twins according to claim 1, characterized in that, The objective function of the optimization model includes stability-related terms; The constraints and constraint parameters of the optimization model are consistent.

3. The multi-energy collaborative predictive control method based on digital twins according to claim 2, characterized in that, Stability-related parameters include minimizing the output variation of each device, minimizing the rate of change of the state of charge of energy storage, minimizing the degree to which the operating parameters of each energy network deviate from the preset safety margin, and minimizing the fluctuation of grid frequency and voltage.

4. The multi-energy collaborative predictive control method based on digital twins according to claim 2, characterized in that, The constraint parameters include the upper limit of generator output, the lower limit of generator output, the upper limit of energy storage charging power, the upper limit of energy storage discharging power, energy storage capacity, the upper and lower limits of energy storage SOC, the upper limit of chiller output, the upper limit of boiler output, the upper limit of load regulation, coupled constraint parameters, and safety margin requirements.

5. The multi-energy collaborative predictive control method based on digital twins according to claim 1, characterized in that, Methods for obtaining the predicted system state for the next period include: A virtual system model is pre-built, with the predicted values ​​of each energy load and the planned control actions as inputs, and the output is the estimated system state for the next cycle; The virtual system model is a digital twin of the entire system. The planned control actions are the control instructions corresponding to the initial scheduling scheme. The initial scheduling scheme is derived by continuing the control instructions actually executed in the previous cycle and by calculating the control instructions for the equipment in combination with the predicted values ​​of each energy load.

6. The multi-energy collaborative predictive control method based on digital twins according to claim 5, characterized in that, The virtual system model performs system state evolution calculations based on the law of conservation of energy. The virtual system model establishes supply and demand balance equations for electricity, cooling energy, heating energy, and gas respectively. In the electricity balance equation, the total power supply equals the sum of the total electrical load and the power grid loss. The total power supply is the sum of the predicted output of renewable energy, the output command of the generator, and the discharge power of energy storage. The total electrical load is the predicted electrical load. In the cooling energy balance equation, the total cooling capacity equals the predicted cooling load. The total cooling capacity is the sum of the output command of the chiller and the release of cold energy storage. In the heating energy balance equation, the total heating capacity equals the predicted heating load. The total heating capacity is the sum of the output command of the boiler, the heating output command of the CHP unit, and the release of thermal energy storage. In the gas balance equation, the total gas supply equals the sum of the predicted gas load and the gas consumption of gas equipment. The total gas supply is the sum of the output command of the gas supply equipment and the release of gas energy storage.

7. The multi-energy collaborative predictive control method based on digital twins according to claim 2, characterized in that, Methods for determining whether simulation results deviate from expectations include: In the next cycle of system state prediction, if the simulated value of any key indicator exceeds the allowable range of the corresponding preset target value, or if the distance between the simulated value of any key indicator and the constraint boundary is less than the preset safety threshold, it is determined to be a deviation from the expectation. The constraint boundaries are the upper and lower limits of the constraint parameters; Key indicators include energy storage status of charge, generator output, chiller output, boiler output, grid voltage, grid frequency, heating network supply and return water temperature, heating network supply and return water pressure, gas network pressure, and gas network flow rate. The preset target value is the standard range for the safe and stable operation of the system, and the preset safety threshold is the buffer zone between the constraint boundary and the allowable range of the preset target value.

8. The multi-energy collaborative predictive control method based on digital twins according to claim 2, characterized in that, Methods for obtaining the final control instruction set include: A quadratic optimization model is constructed, which includes minimizing the total deviation of supply and demand balance of multiple energy sources, minimizing the weighted sum of adjustment of control commands of each device, minimizing the weighted sum of change rate of control commands of each device, and minimizing the total sum of penalty terms for deviation from safety margin. Solve the quadratic optimization model to obtain the adjustment amount of the control command; The adjustment amount of the control command is superimposed on the control command of the preliminary scheduling plan to obtain the final control command set.

9. The multi-energy collaborative predictive control method based on digital twins according to claim 1, characterized in that, The decision variables used to construct the optimization model include generator output commands, energy storage charging and discharging commands, load adjustment commands, cooling output commands, heating output commands, and gas supply equipment output commands.

10. A multi-energy cooperative predictive control system based on digital twins, used to implement the multi-energy cooperative predictive control method based on digital twins as described in any one of claims 1-9, characterized in that, include: The data acquisition module is used to collect data on various energy loads in real time. The prediction module is used to input historical energy load data from multiple historical cycles and meteorological forecast data for the next cycle into a trained LSTM prediction model to perform multi-energy load prediction and output the predicted values ​​of energy load for the next cycle. The solution module constructs an optimization model based on pre-selected decision variables, the predicted values ​​of each energy load for the next cycle, and preset constraint parameters, and solves the optimization model to obtain a preliminary scheduling plan. The correction module is used to simulate and extrapolate the control instructions in the preliminary scheduling plan to obtain the estimated system state for the next cycle. If the simulation result deviates from the expectation, the preliminary scheduling plan is corrected based on the estimated system state for the next cycle to obtain the final control instruction set. The execution module executes control commands based on the final control instruction set and performs feedback monitoring and model correction.