Multi-energy complementary power system scheduling rule extraction method
By constructing a Physically Constrained Long Short-Term Memory (PC-LSTM) network, the adaptability and physical constraint problems of multi-energy complementary power system scheduling methods under changing energy scenarios are solved, achieving high-precision and physically consistent scheduling rule output, and improving the efficiency and security of scheduling decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2026-03-13
- Publication Date
- 2026-04-10
AI Technical Summary
Existing multi-energy complementary power system dispatching methods lack structural adaptability to variable energy scenarios, making it difficult to guarantee that the output results strictly satisfy the physical conservation law. Furthermore, the models have poor generality and require reconstruction and retraining to adapt to changes in input data.
A Physically Constrained Long Short-Term Memory (PC-LSTM) network is constructed, which includes cascaded feature extraction layers and structured physical constraint layers. The network parameters are optimized through a training sample set, and a loss function containing a physical bias term is used to output scheduling rules that satisfy physical consistency.
It enables automatic identification and adaptation to different energy scenarios, ensuring high accuracy and physical consistency of scheduling rules, and improving the efficiency and security of scheduling decisions.
Smart Images

Figure CN121835867A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system dispatching technology, and in particular to a method for extracting dispatching rules for multi-energy complementary power systems. Background Technology
[0002] With the large-scale grid connection of renewable energy, the construction of multi-energy complementary power systems has become a core direction for the development of new power systems. How to extract efficient and stable dispatch rules from massive operational data under strong uncertainties on both the source and load sides is of significant research importance for ensuring the safe operation and economic benefits of the power system.
[0003] Currently, the extraction of dispatch rules for multi-energy complementary power systems mainly relies on model-driven explicit optimization and data-driven implicit optimization. Explicit optimization solves scenarios by constructing mechanistic models, while data-driven methods utilize machine learning algorithms to mine mapping relationships in historical data. Current research often employs standard recurrent neural networks (RNNs) or long short-term memory networks (LSTMs) to construct end-to-end dispatch prediction models, generating dispatch strategies by learning input-output patterns from historical samples.
[0004] However, existing data-driven scheduling methods generally lack structural adaptability to variable energy scenarios and struggle to guarantee that the output strictly satisfies physical conservation laws. Specifically, existing models are mostly based on fixed input dimensions and static network structure designs, failing to automatically identify and adapt to the dynamic switching of different energy combinations such as hydro-solar-storage and wind-thermal-storage. Once the input data source changes, the model often needs to be rebuilt and retrained, resulting in poor versatility. Furthermore, although some studies have attempted to incorporate physical information, most only treat physical constraints as soft penalty terms in the loss function. This leads to a lack of rigorous logical decoupling between the network's output decision variables (such as power generation) and state variables (such as reservoir capacity), easily generating illusory solutions that violate water or energy balance equations near extreme points, rendering the scheduling rules impractical in engineering. Summary of the Invention
[0005] The purpose of this invention is to provide a method for extracting dispatch rules for multi-energy complementary power systems, so as to solve the above-mentioned problems existing in the prior art.
[0006] According to one aspect of this application, a method for extracting dispatch rules for a multi-energy complementary power system includes:
[0007] Acquire engineering parameters and historical operating data of multi-energy complementary power systems;
[0008] A scheduling scenario space is constructed based on historical operational data and engineering parameters, and a training sample set containing input features and label data is generated.
[0009] A physically constrained long short-term memory network is constructed, which includes a cascaded feature extraction layer and a structured physical constraint layer. The structured physical constraint layer is configured to decouple the output variable into free variables and derived variables.
[0010] The physical constraint long short-term memory network is trained using a training sample set, and the network parameters are optimized using a loss function that includes a physical bias term.
[0011] The real-time input data of the time period to be scheduled is obtained and fed into the feature extraction layer of the trained physical constraint long short-term memory network to obtain the temporal feature vector. Based on the temporal feature vector, the scheduling rules that satisfy physical consistency are output through the structured physical constraint layer.
[0012] According to another aspect of this application, a multi-energy complementary power system dispatching device includes:
[0013] Memory, used to store computer programs;
[0014] A processor is used to implement the steps of any of the methods described above when executing a computer program.
[0015] Beneficial effects: This invention achieves automatic identification and adaptation to different energy scenarios through a modular architecture, and realizes physical hard constraints through variable decoupling, ensuring that the scheduling rules have both high precision and physical consistency. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the overall process for extracting dispatch rules in a multi-energy complementary power system.
[0017] Figure 2 This is a schematic diagram of the process for generating scheduling rules.
[0018] Figure 3 This is a schematic diagram of the process for generating scene configuration vectors.
[0019] Figure 4 This is a schematic diagram illustrating the process of acquiring real-time input data for the scheduled time period and inputting it into a trained physical constraint long short-term memory network.
[0020] Figure 5 This is a flowchart illustrating a method for extracting scheduling rules for hydro-solar-storage power generation systems based on orthogonal experimental design and a physically constrained LSTM model. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] Example 1 details the overall process of extracting dispatch rules for multi-energy complementary power systems based on physical constraint neural networks, demonstrating the complete closed loop from data input to rule output, such as... Figure 1 As shown.
[0023] Step 101: Obtain the engineering parameters and historical operating data of the multi-energy complementary power system.
[0024] In this embodiment, a multi-energy complementary power system refers to an integrated energy system that includes two or more energy forms and operates in a complementary and coordinated manner to meet power demand. Specific engineering parameters may include, but are not limited to: the installed capacity, reservoir capacity curve, characteristic water levels (such as dead water level, normal storage water level), unit efficiency curve, and head loss coefficient of hydropower stations; the installed capacity, photoelectric conversion efficiency, inverter parameters, and geographical coordinates of photovoltaic power stations; the rated capacity, rated power, charge / discharge efficiency, and maximum and minimum state of charge constraints of energy storage power stations; and the maximum transmission capacity and line impedance parameters of the system's transmission channels. Historical operating data may include, but are not limited to: the historical natural runoff sequence, historical inflow, outflow, and power generation of each hydropower station; the historical irradiance sequence, temperature sequence, and actual output power of each photovoltaic power station; the historical state of charge curve and charge / discharge power records of each energy storage power station; and the system's historical load demand curve and power balance deviation data. The data acquisition frequency can be set according to actual needs, such as once per hour, once every 15 minutes, or a finer time resolution. Data can be obtained in real-time or periodically through database interfaces deployed in various power plants' SCADA systems, meteorological monitoring stations, and power dispatch centers. Obtaining detailed and accurate basic data is a prerequisite for building a high-precision dispatch model, determining the quality of training samples and the model's generalization ability.
[0025] In some alternative implementations, missing values in historical data can be preprocessed using linear interpolation, spline interpolation, or imputation methods based on historical data from similar days. For engineering parameters, a static parameter database can be established for management and updated promptly after equipment expansion or modification.
[0026] Step 102: Construct a scheduling scenario space based on historical operation data and engineering parameters, and generate a training sample set containing input features and label data.
[0027] In this embodiment, the scheduling scenario space refers to a multi-dimensional state space composed of key factors affecting system operation. Constructing the scheduling scenario space is to cover various operating conditions the system may face, avoiding the model's effectiveness only under normal conditions and failure under extreme conditions. Specifically, the main uncertain input factors of the system can be identified, such as natural inflow, photovoltaic irradiance, and system load, as well as the main boundary condition factors, such as the starting water level of each reservoir and the transmission limit of each section of the system. A space of all factor combinations is constructed using these factors, and representative scheduling scenarios are selected from it using orthogonal experimental design. For each representative scheduling scenario, a short-term optimization scheduling model is established with the goal of maximizing the overall system benefit (e.g., maximizing grid-connected electricity and minimizing wind and solar curtailment), and engineering parameters are introduced as constraints. The model is solved using optimization solvers such as linear programming, mixed-integer programming, or dynamic programming to obtain the corresponding optimal scheduling result. The input factors in the scheduling scenario (such as inflow forecast, illumination forecast, load forecast, initial state, etc.) are used as input features, and the optimal scheduling results obtained by solving (such as the output of each power station, changes in water storage, etc.) are used as label data. The pairing of the two constitutes the training sample set.
[0028] Using the optimization results as labels allows the subsequently trained neural network to learn the globally optimal scheduling strategy, achieving knowledge distillation from mechanism optimization to data-driven rules.
[0029] In some alternative implementations, to improve sample diversity, Monte Carlo simulations can be introduced to generate partially random scenarios, or predetermined scenarios based on historical extreme weather events (such as catastrophic floods or extreme cold with no sunlight) can be constructed and added to the sample set to enhance the robustness of the model.
[0030] Step 103: Construct a physically constrained long short-term memory network. The physically constrained long short-term memory network includes a cascaded feature extraction layer and a structured physical constraint layer. The structured physical constraint layer is configured to decouple the output variables into free variables and derived variables.
[0031] In this embodiment, the Physically Constrained Long Short-Term Memory (PC-LSTM) network is a hybrid model that combines the fitting capabilities of deep learning with the constraints imposed by physical mechanisms. The feature extraction layer is primarily responsible for extracting implicit feature patterns from the time-series input data, and its core component is the Long Short-Term Memory (LSTM) unit. By introducing input gates, forget gates, and output gates, the LSTM unit can effectively capture long-term dependencies in time series data, overcoming the gradient vanishing or exploding problems inherent in traditional Recurrent Neural Networks (RNNs). For example, the feature extraction layer can consist of multiple stacked LSTM layers, each containing several neurons, with Dropout layers added between layers to prevent overfitting.
[0032] The structured physical constraint layer, located after the feature extraction layer, differs from traditional fully connected layers that directly output all target variables. Instead, it employs a variable decoupling design. Specifically, free variables are decision quantities that possess independent degrees of freedom in physical control and can be directly set by the dispatcher or automatic control system, such as the power generation flow of a hydropower station or the charging and discharging power of an energy storage station. These are directly predicted by the neural network based on input features. Derived variables are state quantities derived from the free variables and the current state of the system through strict physical conservation laws, such as the reservoir capacity at the next moment or the state of charge of an energy storage station at the next moment. These are not directly predicted by the neural network but are calculated through physical equations embedded within the layer. This decoupling design links the soft neural network prediction with the hard physical equation calculation, ensuring from the network structure that the output strictly satisfies basic physical conservation constraints, such as water balance and energy balance. This solves the problem of purely data-driven models easily producing results that violate physical common sense.
[0033] In some alternative implementations, the feature extraction layer can also use a gated recurrent unit (GRU) or other variant RNN structure instead of an LSTM, as long as it has the ability to process time-series data. The structured physical constraint layer can be implemented as a custom neural network layer containing fixed computation graph nodes for performing physical equation calculations, and the parameters of this part are not trainable, i.e., there are no gradient updates, only forward propagation calculations.
[0034] In some preferred embodiments, the specific network structure parameters of the feature extraction layer can be configured as follows:
[0035] The LSTM network consists of 2 to 4 stacked LSTM layers, each containing 64 to 256 neurons. Dropout layers are placed between layers, with the dropout ratio set to 0.2 to 0.5. The input sequence length can be set according to the scheduling period; for example, for day-ahead scheduling, the input sequence length can be set to 24 to 96 time steps, corresponding to a time resolution of 1 hour to 15 minutes. The structured physical constraint layer contains 1 to 2 fully connected layers used to generate free variables; the number of neurons in the fully connected layer is consistent with the dimension of the free variables.
[0036] Step 104: Train the physical constraint long short-term memory network using the training sample set, and optimize the network parameters using a loss function that includes a physical bias term.
[0037] In this embodiment, the model training process is essentially adjusting network weights to minimize prediction error. Traditional loss functions typically only consider the error between the predicted value and the true value (label) (e.g., mean squared error, MSE). This embodiment employs a joint loss function that includes a physical bias term. Specifically, this loss function includes not only a prediction error term for the free variables, measuring whether the network's output decision is close to the optimal solution, but also a physical bias term for the derived variables, measuring whether the derived state variables deviate from the physical trajectory or violate boundary constraints. For example, if, during training, the network's output free variables cause the calculated storage capacity to exceed the maximum storage capacity limit, the physical bias term will generate a large penalty value, forcing the network to adjust its parameters through backpropagation and learn to find the optimal solution within the physically feasible region. Furthermore, the loss function can also include coupling constraint terms to penalize imbalances at the system level, such as total output not equaling load. Through multi-objective joint optimization, the trained model can not only fit excellent scheduling strategies in the samples but also internalize the operating rules of the physical system.
[0038] In some alternative implementations, the training process can employ optimization algorithms such as Adam and SGD. To balance the weights of various losses, a dynamic weight adjustment strategy can be introduced. For example, in the early stages of training, a larger weight can be assigned to the prediction error to accelerate convergence, while in the later stages of training, the weight of the physical bias term can be increased to refine physical consistency.
[0039] Step 105: Obtain the real-time input data of the time period to be scheduled, input it into the feature extraction layer of the trained physical constraint long short-term memory network to obtain the temporal feature vector, and output the scheduling rules that satisfy physical consistency through the structured physical constraint layer based on the temporal feature vector.
[0040] In this embodiment, this step is the inference phase of the model's online operation. The time period to be scheduled can be one hour, one day, or one week in the future. Real-time input data refers to the current operating status of the system (such as the current water level and current state of charge, SOC) and the predicted data for future periods (such as inflow forecast, sunshine forecast, and load forecast for the next 24 hours). The above data is organized into the same format as during training and input into the trained PC-LSTM model. The data passes through the feature extraction layer and is transformed into a high-dimensional temporal feature vector; then it enters the structured physical constraint layer, which maps out the free variables, i.e., the specific scheduling instructions, such as the power output plans of each power station. Combined with the current state, derived variables, i.e., the future state trajectory, such as the water level change curve, are derived in real time through physical equations. The final output scheduling rules include both directly executable control instructions and a preview of the future system state. Moreover, these rules naturally satisfy physical constraints such as water balance and energy balance, which can be directly adopted by dispatchers or only require fine-tuning, improving the efficiency and safety of scheduling decisions.
[0041] In some alternative implementations, the output scheduling rules can be presented to the dispatcher in the form of charts, reports, or sequences of control instructions, or can be directly sent to each plant for execution via the AGC (Automatic Generation Control) interface.
[0042] Example 2 describes in detail the modular design of the structured physical constraint layer and the data-driven automatic identification and dynamic activation mechanism to solve the problem of poor model universality in multi-energy complementary power systems due to the diverse energy combinations (such as hydropower, solar power, wind power, thermal power, storage, and all energy sources).
[0043] Step 201: The structured physical constraint layer adopts a modular architecture, including multiple pre-set physical constraint modules. The physical constraint modules include at least one of hydropower constraint modules, photovoltaic constraint modules, and energy storage constraint modules. Each physical constraint module independently encapsulates the physical conservation relationship of the corresponding energy type and is configured to derive the corresponding derived variables based on the input free variables when activated.
[0044] In this embodiment, to address different energy combination scenarios, the structured physical constraint layer is no longer a single entity, but rather designed as a container composed of multiple independent sub-modules. The pre-built physical constraint module library may include: a HydroModule, a WindModule, a SolarModule, a ThermalModule, a StorageModule, and a CouplingModule. Each module acts as an independent black box or plug-in, encapsulating the physical properties and conservation equations specific to that energy type. For example, the HydroModule encapsulates the water balance equation and the head-output conversion relationship; the StorageModule encapsulates the state-of-charge integral formula and the charge-discharge efficiency model. These modules are dormant when inactive, consuming no computational resources and not participating in forward propagation; once activated, they immediately execute the encapsulated physical calculations based on the input free variables and state variables. The modular architecture makes the model highly scalable and reusable. When a new energy type is added to the system, only the corresponding constraint module needs to be developed and added to the library, without having to reconstruct the entire network architecture.
[0045] In some alternative implementations, the input / output interfaces of each module adopt standardized definitions. For example, all modules receive the hidden state vector from the shared LSTM layer as input and output free variable vectors and derived variable vectors in a standard format. The system coupling module is responsible for receiving the outputs of all other activated modules and performing system-level power balance calculations.
[0046] Step 202: Obtain the real-time input data for the time period to be scheduled, input it into the feature extraction layer of the trained physical constraint long short-term memory network to obtain a temporal feature vector. Based on the temporal feature vector, the structured physical constraint layer outputs scheduling rules that satisfy physical consistency, such as... Figure 2 As shown, this specifically includes: detecting valid data fields contained in real-time input data.
[0047] In this embodiment, this step is the first step in achieving automatic scene recognition. Since the fields contained in the real-time data input differ across different scenarios—for example, a pure photovoltaic scenario lacks runoff data—the system first needs to parse and scan the raw input data packets. A valid data domain refers to the set of energy data that exists in the current input data and contains valid information. For example, the system will check whether the input data contains hydropower data domains (such as inflow sequences) and wind power data domains (such as wind speed sequences). This step is equivalent to performing a comprehensive check on the input data to determine exactly which types of energy data the system has accessed.
[0048] Step 203: Generate a scene configuration vector based on the detected valid data domains.
[0049] In this embodiment, the Scene Configuration Vector (α) is a control vector used to characterize the current energy combination scenario. The dimension of this vector is the same as the number of preset physical constraint modules, and each bit corresponds to a module type. For example, the Scene Configuration Vector can be defined as:
[0050] α=[α H ,α W ,α S ,α T ,α E ,α C ] T ;
[0051] Where α is the scene configuration vector; T represents the vector transpose; α H The hydroelectric module is in an active state (0 or 1); α W The wind power module is in an active state; α S The photovoltaic module is in an active state; α T The thermal power module is in an activated state; α E The energy storage module is in an activated state; α C This indicates that the system coupling module is in an active state.
[0052] If step 202 detects that the hydropower data domain and the photovoltaic data domain are valid, while the other domains are invalid, then α=[1,0,1,0,0,1] is generated. T (Assuming the system's coupled modules are always active). This vector will serve as a routing table or switch instruction for subsequent computation processes, guiding data flow to the correct processing path.
[0053] Step 204: Input the temporal feature vector into the structured physical constraint layer, and dynamically activate the corresponding physical constraint module using the scene configuration vector. Physical constraint modules that are not activated do not participate in the calculation.
[0054] In this embodiment, this is the dynamic routing stage in the model inference process. When the time-series feature vector is output from the feature extraction layer, the structured physical constraint layer reads the scene configuration vector α. For dimensions with a value of 1 in α, the corresponding physical constraint modules are activated or awakened, and the feature vector is fed into these modules for calculation; for dimensions with a value of 0 in α, the corresponding modules remain closed or are bypassed, and the output defaults to zero or a null value. For example, in the aforementioned water-solar hybrid scene (α... H =1,α SIn the configuration (=1), only the hydropower and photovoltaic modules perform calculations; the wind power and energy storage modules are skipped. This dynamic activation mechanism saves computational resources, prevents invalid input (such as missing wind speed data) from entering the wind power module, thus avoiding calculation errors or noise interference, and achieves adaptive compatibility across different physical scenarios under the same model weights. This eliminates the need for users to train models separately for each combination, truly achieving plug-and-play functionality.
[0055] Step 205: Collect the free variables and derived variables output by the activated physical constraint module to generate scheduling rules.
[0056] In this embodiment, after each activated module completes its parallel calculations, it outputs its own free variables (such as hydropower output and photovoltaic output) and derived variables (such as reservoir capacity changes). The system coupling module (usually always active) collects these outputs and, in conjunction with system load demand, calculates system-level indicators such as power balance deviation. Based on this, all the above variables are integrated into a complete list of scheduling rules. For inactive modules, their corresponding items in the list can be displayed as none or zero, or directly hidden in the final report, to provide clear and targeted decision support information.
[0057] Step 206: Detect valid data domains contained in the real-time input data, and generate a scene configuration vector based on the detected valid data domains, such as... Figure 3 As shown, this includes: using a preset data field validity detection function to traverse each data field in the real-time input data.
[0058] In this embodiment, in order to accurately determine whether a certain data domain is valid, the system presets a detection function (φ) for each energy type. m The detection function encapsulates the specific logic for determining data availability. The traversal operation means the system sequentially executes the corresponding detection functions for the hydropower, wind power, and other components in the input data packet.
[0059] Step 207: Determine whether each data field meets the preset validity conditions. The validity conditions include at least one of the following: the data sequence is not empty, there is a non-zero valid value, and the key parameter field is complete.
[0060] In this embodiment, the validity condition is a strict criterion for determining the usability of the data domain. The mere existence of a data structure is insufficient; it must contain meaningful numerical values. For example, for the hydropower data domain, the detection function φ... H It may contain the following logic:
[0061] Check if the data packet contains a runoff field (not empty);
[0062] Check if there are any values greater than zero in the runoff series (if there are valid non-zero values, exclude invalid series with all zeros).
[0063] Check if the water level-reservoir capacity curve parameters of the hydropower station are included (key parameter fields are complete).
[0064] Only if all of the above conditions are met can the hydropower data domain be considered valid.
[0065] Similarly, for the photovoltaic data domain, it may be necessary to check whether the irradiance sequence is all zero (e.g., data with only nighttime data may be considered invalid for power generation forecasting) and whether the installed capacity parameters are missing.
[0066] Multi-dimensional verification ensures that activated modules have sufficient data to support their physical calculations, preventing model crashes due to data quality issues.
[0067] Step 208: Mark the data fields that meet the validity conditions as active and the data fields that do not meet the validity conditions as inactive, and combine them to obtain the scene configuration vector.
[0068] In this embodiment, based on the judgment result of step 207, the system assigns a value to each dimension. If the condition is met, it is set to 1 (activated); otherwise, it is set to 0 (deactivated). The state values of all dimensions are arranged in a predetermined order, thus forming the final scene configuration vector α. This process is fully automated, requiring no manual intervention, thereby improving the user experience and the system's intelligence level.
[0069] Step 209, after generating the scene configuration vector and before dynamically activating the corresponding physical constraint module, further includes: identifying the physical constraint module currently marked as active based on the scene configuration vector.
[0070] In this embodiment, this is a secondary confirmation or preprocessing step. The system reads the newly generated vector α and parses out the currently determined list of active modules. For example, the list may include the hydro-constrained module HydroModule and the photovoltaic-constrained module SolarModule.
[0071] Step 210: Check whether the real-time input data contains the necessary data fields required for calculation by the activated physical constraint module.
[0072] In this embodiment, this is a deeper level of data integrity verification. Although step 207 performs a basic validity check, it is necessary to ensure that all necessary input parameters are in place before the activation module performs precise physical calculations. Necessary data fields refer to variables indispensable in the physical equation calculations. For example, for a hydropower module, calculating output power requires not only runoff but also specific turbine efficiency coefficients η and head loss coefficients; for an energy storage module, calculating the state of charge (SOC) requires not only power but also specific rated capacity E. cap and charge / discharge efficiency ηc η d This step will check one by one whether the parameter fields required by the modules in the active list exist in the input data.
[0073] Step 211: If any necessary data fields are missing, perform an exception handling operation. The exception handling operation includes generating a missing data alarm or filling in the missing fields using preset rules. After obtaining complete input data, continue to perform the dynamic activation step.
[0074] In this embodiment, if a critical parameter is found to be missing, the system will not force operation and cause an error, but will trigger an exception handling mechanism. If the missing parameter is critical and cannot be inferred, such as the rated capacity, the system will generate a clear missing parameter alarm, such as "Error: Photovoltaic site S01 lacks installed capacity parameter," and may suspend the current calculation or fall back to safe mode, prompting the user to supplement the data. If the missing parameter is non-critical or can be estimated, such as the head loss coefficient at a certain moment, the system can fill it in using preset rules, such as using the default value, historical average, or industry standard experience value as a substitute, and record this filling operation in the log. The above mechanism enhances the robustness of the system, ensuring that the program can still provide the most reasonable scheduling suggestions possible, or at least provide clear error guidance, even when the data is imperfect, thus avoiding program crashes.
[0075] Example 3 elaborates on the mathematical mechanism inside the structured physical constraint layer, that is, how to achieve hard constraints on the output of the neural network through variable decoupling and embedding of physical equations, revealing the specific combination of AI data-driven and physical mechanism-driven approaches inside the model, and achieving physical consistency scheduling.
[0076] The structured physical constraint layer decouples the output variables into free variables and derived variables. Specifically, it includes: receiving the temporal feature vector output from the feature extraction layer, performing a nonlinear mapping on the temporal feature vector using the gating mechanism inside the physical constraint long short-term memory network to directly generate free variables; using the free variables as independent variables to input a pre-set physical conservation relation function, and calculating derived variables based on the physical conservation laws; where the free variables are active decision quantities driven by data optimization, and the derived variables are passive state quantities strictly constrained by physical laws.
[0077] In this embodiment, the decoupling mechanism breaks away from the traditional end-to-end neural network approach of treating all output variables as homogeneous prediction targets. Specifically, free variables refer to variables in a physical system that have independent degrees of freedom and can be directly manipulated or scheduled. For example, in hydropower scheduling, the outflow or power generation flow of a reservoir is a free variable because the scheduler can directly control it by adjusting the gate opening; in energy storage scheduling, the charging and discharging power of a battery is a free variable. The values of free variables are usually constrained by maximum and minimum values, but their trajectory is mainly determined by the optimization objective (such as maximizing power generation). Therefore, it is suitable for LSTM networks with strong fitting capabilities to learn from historical data and directly predict them through their gating mechanisms (input gate, forget gate, output gate). The specific implementation of the gating mechanism can use the Sigmoid activation function to control the information throughput and the Tanh activation function to generate candidate states.
[0078] Derived variables are state variables that cannot be directly manipulated but are determined by the system's current state, external inputs, and free variables. For example, the capacity or water level of a reservoir is a derived variable because once the capacity at the previous moment, the current inflow (external input), and the current outflow (free variable) are determined, the capacity at the next moment is uniquely determined, with no other possible values. Similarly, the state of charge (SOC) of an energy storage battery is also a derived variable. If a neural network is forced to predict these derived variables, the network output may deviate slightly from the value calculated by the physical equations (AI illusion), leading to uneven water flow or non-conservation of energy. This embodiment eliminates this deviation mathematically by embedding non-trainable physical computation nodes in the network layer, forcing derived variables to be calculated from free variables through physical equations.
[0079] The physical conservation relation function includes at least one or more of the following logical equations:
[0080] Water balance equation: Based on the reservoir capacity status at the previous moment, the inflow at the current moment, and the outflow in the free variables, calculate the reservoir capacity derived variables at the current moment;
[0081] Energy balance equation: Based on the state of charge, charging and discharging efficiency, and charging and discharging power in the free variables of the previous moment, calculate the derived variables of the state of charge at the current moment.
[0082] Power balance equation: Based on the output values of various power sources and the system load demand values in the free variables, the derived variables of system power balance deviation are calculated.
[0083] In this embodiment, the physical conservation relationship function is the specific mathematical logic encapsulated within each physical constraint module. The specific equation forms of each module in the preferred embodiment are listed below:
[0084] For the hydropower constraint module, the water balance equation can be specifically expressed as:
[0085] V i,t+1 =V i,t +(Q i,t nat +Q i,t up -q i,t out )*Δt*γ;
[0086] Among them, V i,t+1 V represents the reservoir capacity (derived variable) of the i-th hydropower station at time t+1. i,t Let Q be the storage capacity at time t; i,t nat For the interval natural inflow; Q i,t up The inflow rate after the evolution of the outflow from the upstream power station; q i,t out Let t be the outflow rate at time t (free variable); Δt be the scheduling time step; and γ be the unit conversion factor from flow rate to storage capacity.
[0087] The formula for calculating hydropower output is:
[0088] P i,t hyd =η i *ρ*g*H i (V i,t )*q i,t gen / 1000;
[0089] Among them, P i,t hyd Let η be the output power of the i-th hydropower station at time t (derived variable); i The overall efficiency of the turbine unit; ρ is the density of water; g is the acceleration due to gravity; H i (V i,t ) represents the head function obtained by looking up a table or fitting data based on the current reservoir capacity; q i,t gen t represents the power generation flow rate at time t (free variable); 1000 is the unit conversion constant (converting watts to kilowatts).
[0090] For the energy storage constrained module, the energy balance equation can be specifically expressed as:
[0091] SOC m,t+1 =SOC m,t +(η m c *P m,t ch -P m,t dis / η m d )*Δt / E m cap ;
[0092] Among them, SOC m,t+1 The state of charge (SOC) of the m-th energy storage power station at time t+1 is a derived variable. m,t Let η be the state of charge at time t; m c For charging efficiency; P m,t ch P represents the charging power (free variable). m,t dis For discharge power (free variable); η m d E represents the discharge efficiency; Δt represents the time step; E m cap This refers to the rated capacity of the energy storage power station.
[0093] For the coupled modules of the system, the power balance equation can be specifically expressed as:
[0094] ΔP t balance =(∑P i,t hyd +∑P k,t wind +∑P j,t pv +∑P n,t th +∑(P m,t dis -P m,t ch ))-L t ;
[0095] Where, ΔP t balance Let ∑P be the system power balance deviation at time t (derived variable); i,t hyd The sum of the output of all hydroelectric power stations; ∑P k,t wind The sum of the power output of all wind farms; ∑P j,t pv The sum of the power output of all photovoltaic power plants; ∑P n,t th The sum of the output of all thermal power plants; P m,t dis and P m,t ch These represent the energy storage discharge and charging power, respectively; L t This represents the total system load requirement.
[0096] To illustrate this more intuitively, let's take a simple numerical calculation as an example:
[0097] Assume that the current capacity of a reservoir is V. t =10 billion cubic meters, current inflow Q in =50 cubic meters per second, and the corresponding coefficient after the time step Δt is converted is 1.
[0098] If the optimal outbound flow rate (free variable) predicted by LSTM is q out =40 cubic meters per second, then the structured physical constraint layer will not predict the reservoir capacity at the next moment, but will directly perform the calculation: V t+1 =100+(50-40)*1=11 billion cubic meters.
[0099] 110 is the derived variable of the output, which maintains strict physical consistency with the free variable 40.
[0100] In some alternative implementations, while the output of wind and solar modules is highly random, it can be limited by physical constraints. For example, a temperature correction formula can be included in the solar module:
[0101] P j,t pv,avail =P j cap *(G j,t / G STC )*[1+γ T *(T j,t cell -T STC )];
[0102] Among them, P j,t pv,avail P represents the available output of the j-th photovoltaic module at time t. j cap G represents the rated capacity of the j-th photovoltaic module. j,t For irradiance, G STC Represents the reference irradiance under standard test conditions (STC), γ T T represents the power temperature coefficient of a photovoltaic module. j,t cell For battery temperature, T STC This represents the reference battery temperature under standard test conditions. The actual output power (free variable) predicted by the LSTM cannot exceed this available output power P. j,t pv,avail Otherwise, the physical bias term in the loss function will increase significantly.
[0103] Example 4 elaborates on how to solve the problem of accessing multi-source heterogeneous data through a unified data interface and preprocessing mechanism, providing a standardized data foundation for achieving automatic identification and scheduling across scenarios. From an engineering implementation perspective, it demonstrates how to build a neural network input layer that can adapt to variable-length inputs.
[0104] Obtain the real-time input data for the scheduled time period and input it into the trained physical constraint long short-term memory network, such as... Figure 4 As shown, the specific steps include: presetting the maximum input dimension based on all energy type combinations supported by the multi-energy complementary power system; mapping real-time input data to a vector space with the maximum input dimension, performing zero-padding operations on data dimensions corresponding to energy types not included in the current scenario, and constructing a unified input vector; generating an input mask vector corresponding to the unified input vector dimension based on the validity status of each dimension in the real-time input data; and inputting the unified input vector and the input mask vector together into the feature extraction layer of the physically constrained long short-term memory network, using the input mask vector to shield the computational weights of invalid data dimensions.
[0105] In this embodiment, since neural networks (especially traditional LSTM structures) typically require input vectors to have a fixed dimension, while multi-energy complementary power systems may face various scenarios such as hydropower-solar power, wind power-thermal power-storage power, and all-energy power, the number of input features varies. To resolve this contradiction, this embodiment adopts a strategy of maximizing reservation + masking. Maximum input dimension d max This refers to the sum of the feature dimensions of all energy types supported by the system design. For example, suppose it supports at most one hydroelectric power station (feature dimension d). H ), 1 wind farm (dimensional d) W ) and 1 photovoltaic power station (dimensional d) S ), then d max =d H +d W +d S .
[0106] In constructing a unified input vector x t max In this case, if the current scenario is solely powered by photovoltaic (PV) data, meaning only PV data is valid, the system will fill the PV data into the corresponding d in the vector. S Dimensional location, and the corresponding d for hydropower H Location and wind power corresponding to d W All positions are filled with zeros. Therefore, regardless of the actual energy source connected, the physical length of the input vector is always d. max This satisfies the requirement of a fixed input layer size for neural networks.
[0107] Meanwhile, to prevent the network from misinterpreting the zeros as actual physical quantities with zero values—for example, zero-padding might be misunderstood as a dried-up river or no wind—the system synchronously generates an input mask vector m. t in The mask vector has the same dimension as the unified input vector, with positions corresponding to valid data marked as 1 and positions corresponding to zero padding marked as 0. During the computation of the feature extraction layer, the network multiplies the input vector element-wise with the mask vector, or in the attention mechanism, it uses the mask to force the weights of invalid dimensions to negative infinity (0 after Softmax). Thus, the network can clearly know which data is the real input and which are placeholders, achieving correct processing of variable-length inputs.
[0108] Before constructing the unified input vector, the process includes: defining a standard data domain containing fields for different energy types; receiving real-time input data in its original format, parsing and separating it into the corresponding standard data domain according to the field mapping relationship; normalizing the data in the standard data domain, and using the normalized data to construct the unified input vector.
[0109] In this embodiment, the standard data domain serves as an intermediary bridge connecting the original data and the unified vector. The system predefines standardized data structures, such as the hydropower data domain (mathcalD). H The data must include fields such as [inflow, head, outflow] (inflow being the inflow / flow rate, head being the head, and outflow being the outflow / flow rate); the wind power data domain (mathcalD) W The data must include fields such as [speed, direction] (where speed is wind speed and direction is wind direction). When receiving raw real-time data from different manufacturers and in different formats (such as JSON, CSV, Modbus registers), the system parses the heterogeneous data and loads it into the corresponding standard data fields using a pre-configured field mapping table.
[0110] Based on this, in order to eliminate the influence of different physical units (such as flow rate being hundreds of cubic meters per second, while power is hundreds of thousands of kilowatts) on gradient descent training, normalization is required. Preferred normalization methods are maximum value normalization or nominal value normalization. For example, the maximum value normalization formula is:
[0111] x norm =(xx min ) / (x max -x min );
[0112] Where, x norm x represents the normalized data value; x represents the original physical quantity data; xmin This refers to the historical minimum or design lower limit of the physical quantity; x max This refers to the historical maximum value or design upper limit of the physical quantity.
[0113] For example, for traffic data q, the normalization formula is: q norm =q / q max ;
[0114] Where, q norm q is the normalized flow rate value. max The maximum historical traffic or the maximum designed traffic.
[0115] For the power data P, the normalization formula is:
[0116] P norm =P / P cap ;
[0117] Among them, P norm P is the normalized power value; P is the actual power value; P cap This refers to the installed capacity or rated power of the corresponding power station.
[0118] For the state of charge (SOC), since it is itself a ratio between 0 and 1, no processing is required or only cut-off protection is needed.
[0119] By constructing a unified input vector using normalized data, it can be ensured that the numerical values of each dimension are distributed within a similar range, usually [0,1] or [-1,1], which accelerates the convergence speed of the model and improves its numerical stability.
[0120] Example 5 details the offline optimization strategies adopted to ensure model performance, including an efficient sample generation method based on orthogonal experimental design, a physical consistency joint training strategy, and a two-stage scheduling output strategy. These strategies address the technical problems of difficulty in sample generation due to the dimensionality curse in large-scale power system scheduling, poor physical interpretability of pure data-driven models, and lack of foresight in scheduling results.
[0121] Step 501 involves outputting scheduling rules that satisfy physical consistency through the structured physical constraint layer. Specifically, this includes: generating a current time-period decision variable for the current time period within the scheduling period based on the free variables and derived variables output by the structured physical constraint layer. The current time-period decision variable is used to guide the current real-time scheduling execution. Based on the free variables and derived variables, generating an average variable for the remaining time periods within the scheduling period. The average variable for the remaining time periods within the future period is used to provide a forward-looking constraint reference for the future scheduling process. Here, both the free variables and derived variables include the current time-period decision variable and the average variable for the remaining time periods within the future period.
[0122] In this embodiment, to balance the accuracy of short-term real-time control with the rationality of long-term resource planning, the present invention designs a two-stage output structure of current and future. The decision variable for the current time period (denoted as y) t () refers to the instruction that needs to be issued and executed immediately at the current scheduling time t, such as the reservoir outflow q at the current time t. out,t Or energy storage charging and discharging power P ch,t The average variable for the remaining future period (denoted as y) avg ) refers to the average planned value of the remaining time period (Tt) within the scheduling cycle. Its calculation formula is as follows:
[0123] y avg =(1 / (Tt))*∑ k=t+1 T y k ;
[0124] Among them, y avg y is the average value of the remaining time period; T is the end time of the entire scheduling cycle; t is the current scheduling time; k is the summation index variable; k This represents the predicted or planned value of the variable at time k in the future.
[0125] For example, in hydropower dispatching, if the dispatching cycle is 24 hours and the current time is the first hour, the model not only outputs the power generation flow rate for the first hour, but also the average power generation flow rate and average reservoir capacity change from the second hour to the 24th hour. This design allows the model to consider the impact on future head benefits or power balance when making decisions about the current action, avoiding short-sighted operations (such as emptying the reservoir to maximize current output, resulting in no water available later).
[0126] In some alternative implementations, future stage variables may also be replaced by weighted averages or key node values (such as end-of-period water storage) instead of arithmetic averages to accommodate different scheduling concerns.
[0127] Step 502 involves constructing a scheduling scenario space based on historical operating data and engineering parameters, and generating a training sample set containing input features and label data. Specifically, this includes: determining the uncertainty input factors and boundary condition factors of the multi-energy complementary power system, and constructing a scheduling scenario space with full factor combinations; using orthogonal experimental design methods, selecting representative scheduling scenarios from the scheduling scenario space with full factor combinations based on orthogonal arrays; establishing a short-term optimization scheduling model with the goal of maximizing the system's on-grid power, and using an optimization solver to solve each representative scheduling scenario to obtain the corresponding optimization scheduling results; and combining the representative scheduling scenarios as input features and the optimization scheduling results as label data to form a training sample set.
[0128] In this embodiment, facing the complex input state combinations of a multi-energy complementary power system, such as different inflow levels, different load levels, and different initial water levels, exhaustive combination of all factors would lead to an exponential explosion in computational complexity (curse of dimensionality). Therefore, this embodiment introduces an orthogonal experimental design. Specifically, firstly, the main input factors (such as natural inflow, photovoltaic power, and system load) are selected and several level states are set, such as three levels: high water, normal water, and low water; then, an orthogonal array is selected, for example, L9(3 4 An orthogonal array is generated by filling the level values of each factor into the table, producing several statistically representative scheduling scenarios. For factors with a large number of level states, such as boundary conditions, Cartesian products can be used to combine them with the orthogonal scenarios mentioned above. In this way, thousands of theoretical scenarios can be compressed into dozens or hundreds of representative scenarios, reducing the computational cost of sample generation.
[0129] For each generated representative scheduling scenario, a standard mathematical programming model is solved using commercial mathematical programming solvers (such as linear programming solvers and mixed-integer programming solvers) with the objective of maximizing the system's grid-connected power (while minimizing water and solar power curtailment). This solution process must strictly adhere to all physical constraints, including water balance, energy balance, and transmission channel limitations. The globally optimal solution obtained is used as the teacher signal (label) for the neural network, enabling the network to mimic the optimizer's decision-making behavior through supervised learning, while simultaneously utilizing its generalization ability to handle unseen scenarios.
[0130] Step 503 involves optimizing network parameters using a loss function that includes a physical bias term. Specifically, this includes constructing a joint loss function, which includes a free variable loss term that measures the prediction error of free variables and a derived variable loss term that measures the physical consistency bias of derived variables. During training, the weights of the derived variable loss terms are dynamically adjusted, and the parameters of the physically constrained long short-term memory network are updated using the backpropagation algorithm based on the objective of minimizing the joint loss function.
[0131] In this embodiment, the design of the joint loss function ensures that the model understands physics. The joint loss function L... total Specifically, it can be expressed as:
[0132] L total =L free +λ*L derived +β*L coupling ;
[0133] Among them, L total L represents the total loss function value. free λ represents the mean squared error (MSE) loss term for the free variables, which is the mean squared error between the predicted and labeled values of the free variables, used to ensure prediction accuracy; λ is the weighting coefficient of the derived variable loss term; Lderived The physical deviation loss term for the derived variable represents the error between the calculated value and the labeled value of the derived variable, or a penalty term for the derived variable violating physical boundaries (such as reservoir capacity being less than the dead water level), used to ensure physical consistency; β is the weighting coefficient of the coupling constraint loss term; L coupling This is a penalty term for system coupling constraints (such as power balance).
[0134] Furthermore, to improve training effectiveness, this embodiment employs a dynamic weight adjustment strategy. In the early stages of training, since the network has not yet converged and physical constraints are easily violated, a smaller λ value can be set to allow the network to prioritize learning the main trends in the data. As the training epochs increase, the value of λ is gradually increased, forcing the network to shrink towards the physically feasible region while satisfying data fitting requirements. This strategy effectively avoids gradient conflicts or training convergence difficulties caused by overly strict physical constraints.
[0135] As a preferred alternative to the above training strategy, this embodiment can also employ a three-stage transfer training strategy:
[0136] The first stage is pre-training, which uses large-scale mixed data containing all energy types to train a shared LSTM backbone network, enabling it to learn general time-series features.
[0137] The second phase is module-specific training, freezing the backbone network parameters, and using predetermined data of various energy sources to optimize the parameters of each physical constraint module (if the module contains adjustable parameters) or verify its logic.
[0138] The third stage is joint fine-tuning, which involves unfreezing all parameters and using data from the target scenario to perform end-to-end fine-tuning to achieve the best collaborative effect.
[0139] In addition, to comprehensively evaluate the model's performance, this embodiment also introduces multi-dimensional evaluation metrics. Besides the conventional root mean square error (RMSE) and coefficient of determination (R²), the focus is on calculating physical consistency metrics, such as the stage hydraulic balance error (FBE) and the water balance error (WBE).
[0140] In some preferred embodiments, the training hyperparameters of the physically constrained long short-term memory network can be configured as follows: the optimization algorithm uses the Adam optimizer, the initial learning rate is set to 0.001 to 0.01, the batch size is set to 32 to 128, the number of training epochs is set to 100 to 500, and an early stopping strategy is adopted, which stops training when the validation set loss no longer decreases for 10 to 20 consecutive epochs.
[0141] Regarding the weight coefficients in the joint loss function, the weight λ of the derived variable loss term is set to a small value (e.g., 0.1) in the early stage of training, increases linearly with the training rounds, reaches the target value (e.g., 1.0) in the middle of training and remains stable; the weight β of the coupling constraint loss term can be set to a fixed value (e.g., 0.5 to 2.0), and the specific value is determined according to the system power balance accuracy requirements.
[0142] Example 6: A detailed description of the hardware device architecture used to implement the above method.
[0143] A multi-energy complementary power system dispatching device includes: a memory for storing a computer program; and a processor for executing the computer program to implement any one of the method steps in the multi-energy complementary power system dispatching rule extraction method described above.
[0144] In this embodiment, the multi-energy complementary power system dispatching device can be implemented as one or more high-performance servers in a power dispatching and control center, or as a distributed cloud computing cluster. The processor can specifically be a central processing unit (CPU), graphics processing unit (GPU), tensor processor (TPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other processing units. Given that this invention relates to the training and inference of deep neural networks, servers equipped with high-performance GPUs are preferred to accelerate matrix operations in LSTM networks. The memory can specifically include non-volatile memory (such as hard disks, solid-state drives, and flash memory) and volatile memory (such as random access memory, RAM). The memory stores computer program instructions, which, when executed by the processor, can complete all steps including data acquisition, scene recognition, model building, network training, and dispatching rule generation.
[0145] In addition, the device may include a communication interface for data exchange with local control units (LCUs), meteorological data centers, and power grid energy management systems (EMS) at various power plants via the power dispatching data network (SPDnet) or the Internet. The device may also connect to a human-machine interface, such as a graphic display, keyboard, and mouse, to visually display the generated dispatching rule curves, physical consistency verification results, and system operation status alarm information to the dispatcher.
[0146] The embodiments of the present invention effectively solve the problems of poor model universality, insufficient physical interpretability, and difficulty in sample generation in the scheduling of multi-energy complementary power systems through modular physical constraint neural network architecture, automatic scene recognition mechanism based on input data, and hard constraint design with variable decoupling. They provide reliable intelligent scheduling decision support for building a new type of power system with new energy as the main body.
[0147] Example 7: As a supplement to the foregoing examples, this example describes in detail the specific mathematical calculation process inside the feature extraction layer, the physical equations of the extended energy modules (wind power, thermal power), and the quantitative evaluation indicators of the model performance, ensuring that those skilled in the art can reproduce the model details and verification methods of this invention.
[0148] Step 701, regarding the internal computation process of the Feature Extraction Layer (LSTM).
[0149] In this embodiment, although Embodiment 1 describes the function of LSTM, specific mathematical mapping relationships are required in actual encoding implementation. According to the technical method of this invention, the calculation logic of the LSTM unit at time t is as follows:
[0150] Computing the forget gate f t Input gate i t and output gate o t The state.
[0151] The formula for calculating the LSTM forget gate is:
[0152] f t =σ(W f ·[h t-1 ,x t ]+b f );
[0153] Among them, f t Let W be the output vector of the forget gate at time t; σ is the Sigmoid activation function; W f h is the weight matrix of the forget gate; t-1 x is the hidden state vector from the previous time step; t The input vector at the current time step; [h t-1 ,x t ] indicates vector concatenation operation; b f This is the bias vector for the forget gate.
[0154] The formula for calculating the LSTM input gate is:
[0155] i t =σ(W i ·[h t-1 ,x t ]+b i );
[0156] Among them, i t W is the output vector of the input gate at time t; i b is the weight matrix of the input gate; i is the bias vector of the input gate; other symbols are the same as above.
[0157] The formula for calculating the LSTM output gate is:
[0158] o t =σ(W o ·[h t-1 ,x t ]+b o );
[0159] Among them, o t W is the output vector of the output gate at time t; o Let b be the weight matrix of the output gate. o This is the bias vector for the output gate; other symbols are the same as above.
[0160] Further, update the LSTM cell status:
[0161] C t =f t ⊙C t-1 +i t ⊙tanh(W C ·[h t-1 ,x t ]+b C );
[0162] Among them, C t Let be the cell state at time t; ⊙ represents element-wise multiplication; C t-1 The cell state at the previous time step; tanh is the hyperbolic tangent activation function; W C b is the weight matrix for the candidate states; C is the bias vector of the candidate state.
[0163] Based on this, calculate the current hidden state h. t (i.e., the feature vector output to the physical constraint layer):
[0164] h t =o t ⊙tanh(C t );
[0165] This mathematical definition guarantees that the implementation path of the feature extraction layer is unique and deterministic.
[0166] Step 702 presents the specific physical equations for the extended physical constraint modules (wind power, thermal power).
[0167] In this embodiment, to illustrate the broad applicability of the modular architecture, the physical logic of wind power and thermal power is supplemented:
[0168] For the WindModule, the physical equations encapsulated within it include:
[0169] Available output calculation:
[0170] P k,tavail =P k (v k,t )*η k,t avail ;
[0171] Among them, P k,t avail P represents the available power output of the k-th wind farm at time t. k (v k,t (Based on the current wind speed v) k,t The theoretical power obtained from the power curve; η k,t avail This refers to the unit availability rate or reduction factor.
[0172] Slope constraint calculation:
[0173] ΔP k,t ramp =|P k,t wind -P k,t-1 wind |≤R k max ;
[0174] Where, ΔP k,t ramp To represent the actual ramp-up at time t for the k-th wind farm, i.e., the absolute value of the power output change, P k,t wind P represents the actual power output of the k-th wind farm at time t. k,t-1 wind R represents the actual power output of the same wind farm at time t-1. k max This represents the maximum allowable ramp rate limit for the k-th wind farm.
[0175] For the thermal confinement module, the internally encapsulated physical equations include:
[0176] The coal consumption characteristic function is:
[0177] C n,t coal =a n *(P n,t th ) 2 +b n *P n,t th +c n *u n,t ;
[0178] Among them, C n,t coal P represents the coal consumption of the nth thermal power plant at time t.n,t th To contribute to thermal power plants; u n,t The unit is in start / stop status (0 or 1); a n b n c n This is the consumption characteristic coefficient of the unit.
[0179] The addition of the above formulas ensures that the present invention still has complete implementation details when facing non-water scenarios such as wind, fire, and storage.
[0180] Step 703 shows the specific calculation formulas for the model performance evaluation indicators.
[0181] In this embodiment, the following indicator system is used to verify the effectiveness of the scheduling rules:
[0182] Prediction accuracy metrics: Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) are used.
[0183] RMSE = sqrt[(1 / N)*∑(y pred -y obs ) 2 ];
[0184] MAE=(1 / N)∑|y pred -y obs |;
[0185] Where RMSE is the root mean square error; N is the total number of samples; y pred y is the model's predicted value; obs These are actual observed or labeled values.
[0186] Physical consistency indicators: The main indicators used are the stage hydraulic balance error (FBE) and the water balance error (WBE).
[0187] FBE=|Q i,t total -(Q i,t nat +∑ u∈Ωi q u,t-τ out )|;
[0188] Among them, Q i,t total Let Q be the total inflow at time t passing through the i-th control section (or entering the i-th reservoir). i,t nat Let Ω be the interval natural inflow at the i-th cross-section at time t. i Let q be the set of upstream associated power stations at the i-th cross section. u,t-τ out Let ∑ be the outflow from the upstream power station u at an earlier time t-τ. u∈ΩiThis represents the summation of the outflows from all upstream associated power plants u.
[0189] WBE=|V i,t+1 -(V i,t +(Q i,t in -Q i,t out )*Δt)|;
[0190] Where WBE is the absolute value of the water balance error; V i,t+1 V represents the library capacity at time t+1 as output or derived from the model; i,t Let Q be the storage capacity at time t; i,t in Q represents the total inbound flow. i,t out Δt represents the total outbound flow rate; Δt represents the time step.
[0191] The cascade hydraulic balance error (FBE) measures whether the lag and superposition of flow propagation between upstream and downstream power stations conform to physical laws, while the water balance error (WBE) measures the water conservation in a single reservoir. These indicators are the basis for judging whether the PC-LSTM model is superior to the traditional pure data-driven model.
[0192] According to one aspect of this application, a method for extracting scheduling rules for a hydro-solar-storage power generation system based on orthogonal experimental design and a physically constrained LSTM model is provided, such as... Figure 5 As shown, it may also include the following steps:
[0193] Collect hydrological data, photovoltaic power output data, and engineering data;
[0194] A high-dimensional nonlinear scheduling scenario space is constructed, which is formed by the interaction of several factors such as runoff, photovoltaic power output, grid load and dynamic constraints between power stations. Orthogonal experimental design is used to systematically extract representative scheduling scenarios from the scheduling scenario space with full factor combination.
[0195] A short-term optimization scheduling model to maximize the system's power consumption was established. The objective function and constraints were set, and the optimization scheduling results were obtained using the LINGO solver, which were then used as training sample data for the LSTM model.
[0196] The design incorporates a two-stage scheduling function that considers physical consistency, and structurally improves the output layer of the traditional LSTM model by embedding a new physical constraint layer to construct a PC-LSTM model with stronger physical constraints. This allows the internal gating mechanism of the new model to adaptively predict physically consistent scheduling rules.
[0197] A comprehensive evaluation framework is constructed to fully evaluate the scheduling rule extraction results from multiple dimensions, including prediction accuracy, physical consistency, stability, and generalization performance.
[0198] According to one aspect of this application, a PC-LSTM model with stronger physical constraints is constructed, enabling the internal gating mechanism of the new model to adaptively predict physically consistent scheduling rules, as follows:
[0199] In the design of the scheduling function, decision variables are divided into variables for the current stage (i.e., the current time period t within the scheduling period) and average variables for the future stage (i.e., the remaining time period Tt within the scheduling period). Variables for the current stage include the outflow, power generation, photovoltaic output, and pumping and power generation of each hydropower station. Variables for the future stage are obtained by averaging the predicted values or optimization results for the remaining time period within the scheduling period. To ensure the physical feasibility of the scheduling results, physical derived quantities such as water balance, energy balance, load balance, and hydraulic connections are introduced into the function and calculated from the input conditions and free decision variables. The resulting two-stage scheduling function can generate forward-looking reference values for future operation while outputting the current scheduling scheme, and continuously updates the input and output through a rolling time-domain approach, ensuring the stability and physical consistency of the scheduling rules throughout the entire time period.
[0200] The scheduling rule for a hydro-solar-storage multi-energy complementary power generation system is an output control function given different input conditions. The traditional scheduling function form is as follows:
[0201] ;
[0202] in, It is a traditional scheduling function format; These represent the predicted outflow and power generation flow of hydropower station i at time t, respectively, in m³. 3 / s; The predicted output power of photovoltaic power station j during time period t, in ten thousand kW; These represent the predicted pumping power and generating power of pumped storage power station m during time period t, respectively, in units of 10,000 kW; t is the scheduling period, t=1,2,...,T,T=24; The water storage capacity of hydropower station i at the beginning of time period t, in 100 million cubic meters. 3 ; These represent the natural inflow and upstream reservoir outflow of hydropower station i at time t, respectively, in meters. 3 / s; The input power of the photovoltaic power station j during time period t is expressed in ten thousand kW. The energy stored in pumped storage power station m at the beginning of time period t is expressed in ten thousand kW·h. The energy stored at the end of the dispatch period for pumped storage power station m is expressed in ten thousand kW·h. The grid load during time period t is expressed in tens of thousands of kW.
[0203] In designing a two-stage scheduling function that considers physical consistency, we first introduce physical derived variables involving key physical constraints such as hydraulic connectivity, water balance, energy storage balance, and load balance:
[0204] ;
[0205] in, The predicted water storage capacity of hydropower station i at the beginning of time period t+1, in 100 million cubic meters. 3 ; The predicted water storage capacity at the end of the scheduling period for hydropower station i, in 100 million m³. 3 ; The predicted total inflow of hydropower station i during time period t, in m³. 3 / s; The predicted average total inflow of hydropower station i during the remaining Tt period, in m³. 3 / s; The predicted power output of hydropower station i during time period t is expressed in ten thousand kW. The predicted average power output of hydropower station i during the remaining Tt period is expressed in 10,000 kW. The predicted stored energy of pumped storage power station m at the beginning of time period t+1 is expressed in units of 10,000 kW·h. The projected remaining load for time period t, in ten thousand kW; This represents the predicted remaining load for the remaining Tt period, in units of 10,000 kW; the meanings of other symbolic variables are the same as before.
[0206] Furthermore, two-stage variables are introduced into the two-stage scheduling function design that considers physical consistency, so as to generate forward-looking decisions for future stages while obtaining real-time decisions for the current stage.
[0207] Introduce the input variable for the current time period t within the scheduling period:
[0208] ;
[0209] in, These represent the pumped storage energy and power generation energy of pumped storage power station m at the beginning of time period t, respectively, in ten thousand kW·h; , respectively, represent the pumped storage capacity and power generation capacity of pumped storage power station m at the end of the dispatch period, in ten thousand kW·h; the meanings of other symbolic variables are the same as before.
[0210] Introduce the decision variable for the current time period t within the scheduling period:
[0211] ;
[0212] Introduce the prediction input variable for the remaining time period Tt within the scheduling period:
[0213] ;
[0214] in, The average natural inflow of hydropower station i during the remaining Tt period, in meters. 3 / s; The average upstream reservoir outflow of hydropower station i during the remaining Tt period, in meters. 3 / s; The average input power of photovoltaic power station j during the remaining Tt period, in ten thousand kW; These represent the average pumped storage capacity and average power generation storage capacity of pumped storage power station m during the remaining Tt period, respectively, in ten thousand kW·h; The average grid load for the remaining Tt period is expressed in tens of thousands of kW; the meanings of other symbolic variables are the same as before.
[0215] Introduce the decision variable for the remaining time period Tt within the scheduling period:
[0216] ;
[0217] in, The predicted average power generation flow of hydropower station i during the remaining Tt period, in m³. 3 / s; The predicted average total outflow of hydropower station i during the remaining Tt period, in m³. 3 / s; The predicted average output power of photovoltaic power plant j during the remaining Tt period is expressed in 10,000 kW. These represent the predicted average pumping power and average generating power of pumped storage power station m during the remaining Tt period, respectively, in units of 10,000 kW; the meanings of other symbolic variables are the same as before.
[0218] The variables related to future phases mentioned above can be calculated using the following formula, representing the average value of the remaining time period Tt within the scheduling period. For example, the following formula shows how to calculate the average total outflow predicted by variables in the future phase; the calculation methods for other variables in the future phase are the same:
[0219] r is the index variable (or time step counter) for future time periods.
[0220] Based on this, the variables of the traditional scheduling function form f1(.) are adjusted to finally form a two-stage scheduling function form f2(.) that considers physical consistency, as shown below:
[0221] ;
[0222] ;
[0223] Y = f2(X).
[0224] Furthermore, a structured output layer is added to the original LSTM output layer, and a new physical constraint layer is embedded to decouple the free output variables and derived output variables before outputting them separately. Simultaneously, a joint loss function with dynamic weights is introduced during training, enabling the network to minimize both prediction error and physical bias. This ensures prediction accuracy while strictly satisfying physical constraints, resulting in a scheduling rule extraction model that is interpretable and feasible.
[0225] The optimized scheduling results training sample data are organized into the input format of a standard LSTM model, specifically:
[0226] In a standard LSTM, the current memory cell state (cell state) is defined as C. t The input vector is x t The predicted output is The gating variables for the forget gate, input gate, and output gate are respectively represented as f. t i t and o t :
[0227] ;
[0228] ;
[0229] ;
[0230] Where t is the current time, σ(.) is the Sigmoid activation function; h t-1 The hidden state from the previous moment; These are the weights for the forget gate, input gate, and output gate, respectively. These are the bias terms for the forget gate, input gate, and output gate, respectively.
[0231] Based on the control of the input gate and the forget gate, the current state of the memory unit (cell state) C is calculated. t :
[0232] ;
[0233] ;
[0234] in, Represents candidate memories at the current moment; It represents the state of the memory unit (cell state) at the previous moment.
[0235] The output is hidden depending on the control of the output gate. The final output is obtained through mapping. .
[0236] ;
[0237] ;
[0238] in, Given the current hidden state, tanh(.) is the hyperbolic tangent activation function. This represents the model's predicted output value at time t. The weight matrix of the output layer. This is the bias term for the output layer.
[0239] Furthermore, the output layer of the original LSTM is structured, and a new physical constraint layer is embedded to decouple the free output variables and derived output variables before outputting them separately. Specifically:
[0240] Output gating of standard LSTM (hidden state h) t Then, a free-derived output variable decoupling mechanism is introduced. Through the internal gate control mechanism of the LSTM, only the free output variables are controlled. The derived variables are derived through the physical relationship between the free output variables and the input variables.
[0241] ;
[0242] ;
[0243] ;
[0244] in, These are the free and derived output variables, respectively; The gating parameters are for the free variables. The physical equilibrium relationship function between derived variables and free output and input variables includes the hydraulic connections of the cascade, water balance, energy balance, and electrical balance, as shown in the following formula:
[0245] ;
[0246] Where I represents the total number of cascade hydropower stations, or the total number of hydropower stations within the basin.
[0247] By introducing a derived variable error auxiliary constraint mechanism, the prediction loss function for both free variables and derived variables is defined as follows:
[0248] ;
[0249] ;
[0250] in, These are the prediction loss functions for the free variables and the derived variables, respectively; These are the free variables, derived variables, and sample size, respectively. These are the observations of free and derived variables, respectively; These are the predicted values for free and derived variables, respectively.
[0251] ;
[0252] ;
[0253] in, The prediction loss function for all output variables; For the loss weight parameters of derived variables;
[0254] These are the current derived variable loss weight value and the initial weight value, respectively; e is the current training round; and k' is the decay rate.
[0255] In the LSTM model with a structured output layer, the free variable output not only needs to directly fit the observed data, but also must meet the consistency requirements of the derived variables generated by subsequent physical derivation. At the same time, during training, the loss function dynamically applies to both the free variable error and the derived variable derivation error. During the backpropagation stage, it prompts the LSTM's internal gate control mechanism (input gate, forget gate, output gate) to adaptively learn the hidden state evolution path that conforms to the physical laws.
[0256] This application adopts a modular architecture and an automatic scene recognition mechanism. By detecting the validity of input data, it automatically generates scene configuration vectors and dynamically activates pre-set physical constraint modules (such as hydropower and photovoltaic modules), achieving single-model, multi-scene adaptation and effectively solving the high cost problem of remodeling and training. It also solves the problem of the rigid structure of existing models and their inability to adapt to diverse energy scenarios (such as switching between hydropower and solar power, and wind power, thermal power, and energy storage).
[0257] This application employs a variable decoupling and structured hard constraint mechanism. By dividing the network output into free variables predicted by the neural network and derived variables derived from the built-in physical equations, the generation process of scheduling rules is forced to strictly follow physical laws such as water balance and energy balance. This eliminates the illusion of artificial intelligence and physical biases, ensuring the engineering usability of the scheduling results. It solves the problem that pure data-driven models relying solely on soft constraints suffer from poor physical consistency and are prone to violating conservation laws (such as uneven water flow).
[0258] Furthermore, this application describes an orthogonal experimental design and a two-stage output strategy that balances sample coverage and scheduling foresight, solving the problem of difficult sample generation for large-scale systems.
[0259] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.
Claims
1. A method for extracting dispatch rules for a multi-energy complementary power system, characterized in that, include: Acquire engineering parameters and historical operating data of multi-energy complementary power systems; A scheduling scenario space is constructed based on historical operational data and engineering parameters, and a training sample set containing input features and label data is generated. A physically constrained long short-term memory network is constructed, which includes a cascaded feature extraction layer and a structured physical constraint layer. The structured physical constraint layer is configured to decouple the output variable into free variables and derived variables. The physical constraint long short-term memory network is trained using a training sample set, and the network parameters are optimized using a loss function that includes a physical bias term. The real-time input data of the time period to be scheduled is obtained and fed into the feature extraction layer of the trained physical constraint long short-term memory network to obtain the temporal feature vector. Based on the temporal feature vector, the scheduling rules that satisfy physical consistency are output through the structured physical constraint layer.
2. The method according to claim 1, characterized in that: The structured physical constraint layer adopts a modular architecture, including multiple pre-built physical constraint modules, which include at least one of hydropower constraint module, photovoltaic constraint module and energy storage constraint module; Each physical constraint module independently encapsulates the physical conservation relationship for the corresponding energy type, and is configured to derive the corresponding derived variables based on the input free variables when activated.
3. The method according to claim 2, characterized in that, The real-time input data for the time period to be scheduled is obtained and fed into the feature extraction layer of a pre-trained physically constrained long short-term memory network to obtain a temporal feature vector. Based on the temporal feature vector, the structured physical constraint layer outputs scheduling rules that satisfy physical consistency, including: Detect valid data fields contained in real-time input data; Generate a scenario configuration vector based on the detected valid data domains; The temporal feature vector is input into the structured physical constraint layer, and the corresponding physical constraint module is dynamically activated using the scene configuration vector. The physical constraint module that is not activated does not participate in the calculation. The free and derived variables output by the activated physical constraint modules are collected to generate scheduling rules.
4. The method according to claim 3, characterized in that, Detect valid data fields contained in the real-time input data, and generate a scene configuration vector based on the detected valid data fields, including: Using a preset data field validity detection function, traverse each data field in the real-time input data; Determine whether each data field meets the preset validity conditions. The validity conditions include at least one of the following: the data sequence is not empty, there is a non-zero valid value, and the key parameter field is complete. Data fields that meet the validity criteria are marked as active, and data fields that do not meet the validity criteria are marked as inactive. These are combined to obtain the scenario configuration vector.
5. The method according to claim 3, characterized in that, After generating the scene configuration vector, and before dynamically activating the corresponding physical constraint module, the following is also included: Based on the scene configuration vector, identify the physical constraint module that is currently marked as active; Check whether the real-time input data contains the necessary data fields required for calculation by the activated physical constraint module; If any necessary data fields are missing, an exception handling operation is performed. The exception handling operation includes generating a missing field alarm or filling in the missing field using preset rules. After obtaining complete input data, the dynamic activation step is then executed.
6. The method according to claim 1, characterized in that, The structured physical constraint layer decouples the output variables into free variables and derived variables, including: The system receives the temporal feature vectors output by the feature extraction layer and performs a nonlinear mapping on them using the gating mechanism inside the physically constrained long short-term memory network to directly generate free variables. The free variables are input as independent variables into a pre-defined physical conservation relation function, and the derived variables are calculated based on the physical conservation laws. Among them, free variables are active decision quantities driven by data optimization, and derived variables are passive state quantities strictly constrained by physical laws.
7. The method according to claim 6, characterized in that, The physical conservation relation function includes at least one or more of the following logical equations: Water balance equation: Based on the reservoir capacity status at the previous moment, the inflow at the current moment, and the outflow in the free variables, calculate the reservoir capacity derived variables at the current moment; Energy balance equation: Based on the state of charge, charging and discharging efficiency, and charging and discharging power in the free variables of the previous moment, calculate the derived variables of the state of charge at the current moment. Power balance equation: Based on the output values of various power sources and the system load demand values in the free variables, the derived variables of system power balance deviation are calculated.
8. The method according to claim 1, characterized in that, Obtain the real-time input data for the scheduled time period and input it into the trained Physically Constrained Long Short-Term Memory network, including: The maximum input dimension is preset based on all combinations of energy types supported by the multi-energy complementary power system. Real-time input data is mapped to a vector space with the largest input dimension. Zero-padding is performed on the data dimensions corresponding to energy types not included in the current scenario to construct a unified input vector. Based on the validity status of each dimension in the real-time input data, an input mask vector corresponding to the dimension of the unified input vector is generated; The unified input vector and the input mask vector are input together into the feature extraction layer of the physically constrained long short-term memory network, and the input mask vector is used to shield the computational weights of invalid data dimensions.
9. The method according to claim 1, characterized in that, A scheduling scenario space is constructed based on historical operational data and engineering parameters, and a training sample set containing input features and label data is generated, including: Determine the uncertainty input factors and boundary condition factors of the multi-energy complementary power system, and construct a scheduling scenario space with full factor combination; Using orthogonal experimental design, representative scheduling scenarios are selected from the full factor combination scheduling scenario space based on orthogonal arrays; A short-term optimization scheduling model with the goal of maximizing the system's online power consumption is established. An optimization solver is used to solve various representative scheduling scenarios to obtain the corresponding optimization scheduling results. Representative scheduling scenarios are used as input features, and optimized scheduling results are used as label data to form a training sample set.
10. A multi-energy complementary power system dispatching device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program to implement the steps of the method as claimed in any one of claims 1 to 9.
Citation Information
Patent Citations
Dual-drive reservoir long-term delivery probability prediction method
CN120410281A
Rule-constraint collaborative multi-energy coupling system online operation optimization method
CN121480873A