A method for optimizing a thermo-mechanical energy storage system based on a data-driven agent model
By constructing an optimization method based on a data-driven proxy model, the efficiency and accuracy issues under high costs and complex constraints in the optimization of thermomechanical energy storage systems are solved. This approach achieves efficient global optimization and interpretability, thereby improving the system's optimization efficiency and reliability.
Patent Information
- Application Number
- CN202611299658.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-24
AI Technical Summary
Existing optimization methods for thermomechanical energy storage systems suffer from high costs associated with calling first-principles models and difficulties in balancing optimization accuracy and efficiency. In particular, they struggle to achieve efficient global search under complex constraints, and existing surrogate models lack interpretability.
An optimization method based on a data-driven agent model is constructed. An effective dataset is generated through Latin hypercube sampling. The architecture of multilayer perceptron, hybrid density network, or hurdle model is adaptively selected. Combined with hyperparameter optimization and feature attribution analysis, a global heuristic optimization algorithm is embedded to achieve global optimization of thermomechanical energy storage system.
It significantly reduces the cost of calling first-principles models, improves optimization efficiency, enhances the interpretability and reusability of models, ensures that optimization results conform to actual physical mechanisms, and improves the safety and reliability of engineering applications.
Smart Images

Figure CN123159593A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of energy system optimization technology, and in particular relates to an optimization method for thermomechanical energy storage systems based on a data-driven agent model. Background Technology
[0002] The inherent intermittency and volatility of renewable energy sources can easily cause shocks during large-scale grid integration, threatening the stability and security of the power grid. Currently, diverse new energy storage technologies are emerging, playing a crucial role in peak shaving and valley filling within the power system. These technologies can effectively smooth grid load fluctuations, thereby improving the absorption of renewable energy. Among them, thermomechanical energy storage technologies, such as liquefied air storage, compressed air storage, and Carnot battery storage, demonstrate broad engineering application prospects in next-generation clean energy management systems due to their advantages of large-scale, low-cost, and long-term energy storage.
[0003] Global optimization of process parameters for complex thermomechanical energy storage systems involving the coupling of multiple energy sources, including cold, heat, and electricity, is a core approach to improving energy utilization and techno-economic efficiency. Currently, process design and optimization in the energy and chemical industries mainly rely on numerical simulations based on rigorous mathematical modeling (i.e., first-principles models or mechanistic models). While this method can reproduce the underlying physical mechanisms with high fidelity, the solution process is extremely time-consuming due to the involvement of high-dimensional and tightly coupled nonlinear differential and algebraic equations. Therefore, when using heuristic algorithms such as genetic algorithms and particle swarm optimization for parameter optimization, the high cost of a single simulation combined with the need for tens of thousands of model calls results in excessively high time costs and difficulty in convergence in high-dimensional decision spaces.
[0004] To address the aforementioned issues, data-driven surrogate models have become a research hotspot in the field of energy system optimization. Optimization based on surrogate models utilizes input and output data sampled from first-principles models to construct approximate models, achieving orders-of-magnitude improvements in optimization efficiency while maintaining acceptable accuracy. However, multi-energy coupled thermomechanical energy storage systems exhibit numerous complex constraints (such as the minimum pinch temperature difference of heat exchangers), resulting in an extremely narrow feasible solution space with irregular fragmentation. Conventional surrogate model optimization strategies have significant drawbacks in dealing with such scenarios: on the one hand, if only feasible sample data is used for model training, the system boundary information contained in a large number of infeasible sample points will be ignored, leading to a serious bias in the surrogate model's understanding of the global search space and hindering surrogate model reuse; on the other hand, if a strategy of decomposing complex constraints and modeling them separately is adopted, the output dimension of the surrogate model will increase dramatically, increasing the training burden and making it unable to cope with complex processes involving numerous mechanical components and heat exchange units.
[0005] Furthermore, existing research on constructing surrogate models to replace first-principles models is largely limited by subjective experience or traditional grid search, lacking efficient and intelligent hyperparameter optimization mechanisms, thus failing to fully unleash the predictive potential of surrogate models. More importantly, neural network-based surrogate model applications generally lack physical constraints and mappings, leaving their internal decision-making logic opaque. This "black box" model, lacking interpretability, cannot meet the requirements of thermomechanical energy storage systems in high-risk, low-fault-tolerance industrial scenarios.
[0006] In summary, there is an urgent need in this field for an optimization method based on a data-driven proxy model that can significantly reduce the high cost of calling first-principles models, accurately handle a large number of infeasible points and complex constraints, and be interpretable, thereby breaking through the technical bottleneck of the current optimization of thermomechanical energy storage systems where it is difficult to balance computational efficiency and solution quality. Summary of the Invention
[0007] This invention provides an optimization method for thermomechanical energy storage systems based on a data-driven proxy model, which achieves an order-of-magnitude improvement in optimization efficiency while ensuring optimization accuracy.
[0008] An optimization method for thermomechanical energy storage systems based on a data-driven agent model, characterized by the following steps: S1: Construct a first-principles model of the target thermomechanical energy storage system, determine the decision variables to be optimized and their boundary ranges; use a sampling algorithm to generate initial sample points that uniformly cover the entire variable space within the boundary range of the decision variables, input them into the first-principles model for batch solution to obtain the optimization target value and constraint condition value, and construct an effective dataset; S2: Make hierarchical decisions based on the distribution characteristics of the effective dataset, and adaptively select an architecture to optimize the target agent model and the constraint agent model. The architecture is selected from one or more combinations of multilayer perceptron, hybrid density network or hurdle model. S3: Based on the effective dataset, a hyperparameter optimization algorithm is used to optimize the hyperparameters of the target proxy model and the constraint proxy model respectively, and training is completed using a specific loss function; then feature attribution analysis is performed on each trained proxy model, and its physical consistency is verified by combining sensitivity analysis based on the first principles model. S4: Embed the validated optimization target surrogate model and constraint surrogate model into the global heuristic optimization algorithm. Use an external penalty function to transform the predicted value output by the constraint surrogate model into a penalty term, and combine it with the predicted value output by the optimization target surrogate model to construct an unconstrained fitness function. Perform global optimization on the decision variables of the target thermomechanical energy storage system and output candidate optimal process parameters.
[0009] In step S1, the target thermomechanical energy storage system includes an energy input module, an energy storage module, and an energy output module; the first principle model is constructed based on steady-state chemical thermodynamic process simulation; the optimization objective is an evaluation index reflecting the thermodynamic or economic performance of the system, specifically including one or more combinations of the system's cycle efficiency, energy efficiency, energy storage density, or levelized cost of electricity; the constraints include at least the minimum pinch temperature difference of the heat exchangers in the system.
[0010] In step S1, the sampling algorithm is Latin hypercube sampling; when constructing the effective dataset, invalid samples caused by the non-convergence of the first-principles model numerical calculation are removed, and then the centering of the effective dataset is calculated. L 2. Bias; wherein, the effective dataset includes the training set, validation set and test set, which are all independent data subsets generated by independent sampling within the boundary range of the decision variable using the Latin hypercube sampling, rather than being generated by splitting a single total sample pool.
[0011] In step S2, the architecture is adaptively selected to optimize the target proxy model and the constraint proxy model, specifically including: The proportion of single-value clusters (i.e., the percentage of samples with a specific identical value in the dataset out of the total sample size) is calculated to detect the semi-continuity of the data. If the proportion of single-value clusters is less than a first preset threshold, Hartigan's dip test is used to evaluate the data distribution pattern. If the distribution is unimodal (the test result is positive), the distribution is considered semi-continuous. p If the value is greater than or equal to the preset significance threshold, a multilayer perceptron architecture is used; if it exhibits a multimodal distribution (tested for...), a multilayer perceptron architecture is employed. p If the value is less than the significance threshold, a hybrid density network architecture is adopted; If the proportion of single-value clustering is greater than or equal to the first preset threshold, the hurdle model architecture is adopted, and it is further determined whether the proportion of single-value clustering is greater than the second preset threshold. If it is greater than the second preset threshold, the regression component of the hurdle model is a multilayer perceptron by default. If it is not greater than the second preset threshold, the clustered data in the effective dataset is first removed, and then Hartigan's dip test is performed on the remaining data. The regression component is selected according to the test result: if it is unimodal, the multilayer perceptron regression component is selected; if it is multimodal, the mixed density network regression component is selected.
[0012] Specifically, optimization objectives diagnosed as having a unimodal distribution are assigned to an independent single-output multilayer perceptron architecture; constraints diagnosed as having a unimodal distribution are merged and assigned to a single multi-output multilayer perceptron architecture; optimization objectives and constraints diagnosed as having a multimodal distribution are assigned to a hybrid density network architecture; optimization objectives and constraints with a single value aggregation ratio greater than or equal to the first preset threshold are assigned to a hurdle model architecture, and the regression component of the hurdle model is determined based on the aforementioned judgment of the second preset threshold and the Hartigan's dip test results.
[0013] In step S3, the hyperparameter optimization algorithm adopts a Bayesian optimization strategy based on a probability model. Specifically, it uses a tree-structured Parzen estimator to build a probability model based on historical experimental data and guide the search. At the same time, a median pruning mechanism is introduced. After completing the warm-up period of the set training rounds, if the evaluation target value of the experiment in the current round is worse than the median evaluation target value of previous experiments in the same round, the invalid experiment is automatically terminated in advance.
[0014] In step S3, training is completed using a specific loss function, which includes: For multilayer perceptrons, mean squared error is used as the loss function; For hybrid density networks, negative log-likelihood is used as the loss function; For the hurdle model, a composite loss function combining classification cross-entropy and conditional regression loss is used.
[0015] In step S3, the following strategies are also introduced during the model training phase: a gradient pruning mechanism is used to limit the gradient norm during model updates; an adaptive learning rate decay strategy and an early stopping regularization strategy based on validation set loss are introduced; wherein, the patience value of the adaptive learning rate decay strategy is set to be less than the patience value of the early stopping regularization strategy.
[0016] In step S3, the feature attribution analysis specifically adopts the Shapley Additive Interpretation (SHAP) method; the specific process for verifying its physical consistency is as follows: parallel to the sampling process in step S1, Sobol sensitivity analysis is independently performed on the first-principles model based on the quasi-random sequence, the total order sensitivity index of each decision variable is calculated and ranked, and this is used as the baseline fact, and compared with the feature importance ranking resolved by the Shapley Additive Interpretation method.
[0017] In step S4, the global heuristic optimization algorithm is the differential evolution algorithm; the external penalty function is the exponential external penalty function.
[0018] Preferably, the optimization method of the present invention further includes step S5: inputting the candidate optimal process parameters output in step S4 into the first-principles model of the target thermomechanical energy storage system for verification, comparing the prediction output results of each surrogate model with the calculation output results of the first-principles model to determine the prediction error of each surrogate model at the candidate optimal process parameters, and judging whether the candidate optimal process parameters meet the preset constraints based on the calculation output results of the first-principles model.
[0019] When the verification results of the first principle model show that the candidate optimal process parameter violates at least one constraint, the surrogate model side constraint boundary corresponding to the violated constraint is conservatively adjusted, and steps S4 and S5 are re-executed based on the adjusted surrogate model side constraint boundary until feasible optimized process parameters that satisfy all constraints are obtained as verified by the first principle model.
[0020] The conservative adjustment includes: for constraints with a lower constraint limit, increasing the corresponding lower constraint limit on the surrogate model side; for constraints with an upper constraint limit, decreasing the corresponding upper constraint limit on the surrogate model side; and maintaining the model structure and model parameters of each surrogate model unchanged during the conservative adjustment of the surrogate model side constraint boundaries.
[0021] Compared with the prior art, the present invention has the following beneficial effects: 1. The dataset constructed in this invention fully maps the decision variable space, including a large number of infeasible samples, effectively improving the cognitive ability of the surrogate model trained on such datasets regarding the global search space and enhancing the model's reusability. Furthermore, this invention introduces an efficient and intelligent hyperparameter optimization mechanism, fully exploring the predictive potential of the surrogate model. Ultimately, while ensuring optimization accuracy, it significantly reduces the high cost of first-principles model invocation, achieving an order-of-magnitude improvement in optimization efficiency.
[0022] 2. To address the irregular data distribution caused by system complexity, this invention makes hierarchical decisions based on the distribution characteristics of the dataset. By introducing the single-value clustering ratio and Hartigan's dip test, it can accurately diagnose the semi-continuousness and unimodal / multimodal distribution characteristics of the data, and then adaptively match the optimal data-driven surrogate model architecture (multilayer perceptron, hybrid density network, or hurdle model). This fundamentally overcomes the shortcomings of single-architecture surrogate models in terms of insufficient fitting accuracy and poor generalization ability when facing highly nonlinear and fragmented spaces.
[0023] 3. This invention integrates SHAP feature attribution explanation and sensitivity analysis based on first-principles models. By comparing the nonlinear mapping mechanism learned by the surrogate model with the baseline facts presented by the actual physical mechanisms, the internal decision-making logic of the data-driven surrogate model is transparently verified. This step ensures that the optimization process and the obtained optimal process parameters conform to the actual physical mechanisms and thermodynamic laws, greatly enhancing the safety and reliability of the optimization results in practical engineering applications.
[0024] 4. This invention decouples the offline construction process of the surrogate model within the decision variable space from the online optimization process under different constraints. This allows the surrogate model, after completing data generation, training, and validation once, to serve as a reusable model base without needing to be rebuilt for changes in constraints, enabling rapid optimization of process parameters under different constraint settings. By repeatedly calling the surrogate model in multiple optimization tasks and iterative deployment processes, the computational costs incurred in the initial first-principles model data generation, surrogate model development, and validation can be further amortized, thus balancing the reusability of the surrogate model, online optimization efficiency, and rapid deployment capabilities under different engineering scenarios. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of a method for optimizing a thermomechanical energy storage system based on a data-driven proxy model, provided in an embodiment of the present invention.
[0027] Figure 2 This is a schematic diagram of the structure of the liquefied air energy storage system provided in an embodiment of the present invention.
[0028] Figure 3 This is a bar chart showing the Sobol total order sensitivity index ranking for the goal of optimizing cycle efficiency, provided in an embodiment of the present invention.
[0029] Figure 4 The distribution histogram of the effective dataset provided in the embodiments of the present invention.
[0030] Figure 5 This is a flowchart illustrating the adaptive agent selection model architecture provided in an embodiment of the present invention.
[0031] Figure 6 This is a histogram showing the importance ranking of SHAP features for the purpose of optimizing loop efficiency, provided in an embodiment of the present invention. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.
[0033] It should be noted that, unless otherwise specified, the features in the following embodiments and implementation methods can be combined with each other.
[0034] Unless otherwise defined, the thermomechanical energy storage system described in this invention refers to a system that stores and releases energy through thermodynamic cycles and mechanical components (compressors, pumps, expanders, etc.). Within the framework of this invention, this system includes, but is not limited to, liquefied air energy storage systems, compressed air energy storage systems, Carnot battery (pump thermal energy storage) systems, and other energy storage devices based on mechanical work and heat exchange. The method of this invention is described in detail below with reference to specific embodiments, but the following embodiments are only for understanding this invention and do not constitute a limitation on the scope of protection of this invention.
[0035] like Figure 1 As shown, an optimization method for thermomechanical energy storage systems based on a data-driven agent model, applied to liquefied air energy storage systems, includes the following steps: Step S1: In this embodiment, a first-principles model of the liquefied air energy storage system is constructed based on the steady-state chemical thermodynamic process simulation platform Aspen HYSYS. For example... Figure 2 As shown, the liquefied air energy storage system mainly includes an energy input module for off-peak periods, an energy storage module, and an energy output module for peak periods. The energy input module includes a multi-stage air compressor (AC), an air cooler (CAC), a cold box (CB), and a cryogenic expander (CT). The energy storage module includes a heat transfer oil thermal storage cycle, a methanol / propane dual-fluid cryogenic cold storage cycle, and a liquid air tank (LAT). The energy output module includes a cryogenic liquid air pump (LACP), an evaporator (EVA), an air heater (AH), a multi-stage air expander (AT), and a waste heat recovery module integrating an organic Rankine cycle.
[0036] For ease of understanding, Figure 2 The meanings of the labels in the attached figures are as follows: In the equipment markings, AC-1~AC-3 are air compressors, CAC-1~CAC-3 are air coolers, CB-1~CB-2 are cold boxes, CT is a cryogenic expander, LAT is a liquid air storage tank, LACP is a cryogenic liquid air pump, EVA-1~EVA-2 are evaporators, AH-1~AH-3 are air heaters, AT-1~AT-3 are air expanders, TOT-1~TOT-2 are heat transfer oil storage tanks, TOP-1~TOP-2 are heat transfer oil pumps, MT-1~MT-2 are methanol storage tanks, MCP is a cryogenic methanol pump, MP is a methanol pump, PT-1~PT-2 are propane storage tanks, PCP-1~PCP-2 are cryogenic propane pumps, OEVA is an organic Rankine cycle evaporator, OT is an organic Rankine cycle expander, OP is an organic Rankine cycle pump, HR-1~HR-2 are heat exchangers for heat exhaust, M is an electric motor, and G is a generator.
[0037] In the logistics labeling, A1~A24 represent air logistics, where A1 is pre-treated air entering the system and A24 is air discharged into the environment; TO1~TO23 represent heat transfer oil logistics; M1~M4 represent methanol logistics; P1~P4 represent propane logistics; O1~O4 represent organic Rankine cycle working fluid logistics, in this embodiment the organic Rankine cycle uses R134a as the working fluid; UW1~UW4 represent utility water logistics.
[0038] Furthermore, this embodiment uses T s Indicates flow s Temperature, with P s Indicates flow s Pressure, subscript s for Figure 2 and the stream numbers in Table 1, for example T A10 Indicates the temperature of the flow stream A10, P A7 This indicates the pressure on the A7 stock.
[0039] Based on the first-principles model, this embodiment determines the decision variables to be optimized and their boundary ranges, as shown in Table 1. The optimization objective selected in this embodiment is the cycle efficiency, which reflects the thermodynamic performance of the system. The constraints are set as follows: the minimum pinch temperature difference of the low-temperature heat exchangers, including CB-1–2 and EVA-1–2, is not less than 3 K; and the minimum pinch temperature difference of the medium-temperature or high-temperature heat exchangers, including CAC-1–3, AH-1–3, OEVA, and HR-1–2, is not less than 5 K. Furthermore, the cycle efficiency of the first-principles model under the initial design conditions before optimization is 0.6097, which is used as a benchmark for evaluating the subsequent optimization effect in this embodiment.
[0040] Table 1. Decision variables and their boundary ranges for liquefied air energy storage systems. This embodiment utilizes the Latin hypercube sampling algorithm to generate initial sample points that uniformly cover the entire variable space within the boundary range of the decision variables. These initial sample points are then input into the first-principles model for batch solving, and a small number of invalid samples are removed due to the numerical computation failure of the first-principles model. For the valid dataset after removing invalid samples, this embodiment calculates its centering. L 2. Deviations were used to verify the uniformity of distribution and space filling.
[0041] Table 2 shows the sample sizes and parameters of the effective datasets for the independent initial training, validation, and test sets generated by independent sampling within the boundary range of the decision variables using Latin hypercube sampling. Parallel to the Latin hypercube sampling algorithm, this embodiment independently performs Sobol sensitivity analysis on the first-principles model based on a quasi-random sequence, calculating the total order sensitivity index of each decision variable to the optimization objective, and sorting them from highest to lowest value. This ranking serves as the benchmark fact for subsequent verification of the physical consistency of the surrogate model. The top six decision variables in terms of total order sensitivity index are listed below. Figure 3 As shown, the error bars represent the 95% confidence intervals of the overall sensitivity index of each decision variable.
[0042] Table 2. Sample size of the independent initial dataset and parameters of the effective dataset. In Table 2, the ideal centering is described. L 2. Bias refers to generating a separate set of reference sample points without invalid samples using the same Latin hypercube sampling algorithm as in step S1, with the same decision variable dimensions and sample size, and calculating the centering using the same method. L 2. Bias, used as a benchmark for evaluating the spatial filling performance of the actual sample point set; before calculation, each sample point set is normalized to within a unit hypercube according to the boundary range of the decision variable. Actual centering. L 2. The closer the deviation is to the ideal centering L A bias of 2 indicates that the more uniform the distribution of sample points in the decision variable space, the better the space filling. Table 2 shows the actual centering of the training set, validation set, and test set in this embodiment. L Both deviations are related to their ideal centering. L The fact that the biases are on the same order of magnitude indicates that the valid dataset obtained after removing invalid samples still maintains good distribution uniformity and space filling.
[0043] Step S2: Due to the complexity of liquefied air energy storage systems, the system outputs corresponding to different combinations of variables exhibit highly irregular distributions, such as... Figure 4As shown in the figure. This embodiment performs hierarchical decision-making based on the distribution characteristics of the effective dataset, adaptively selecting the architecture to optimize the target proxy model and the constraint proxy model. The specific sub-steps are as follows: Figure 5 As shown: Extract the optimization objective value and each constraint value from the valid dataset, and calculate their single-value clustering ratio, i.e., the percentage of samples with a specific identical value in the dataset out of the total sample size, to detect the semi-continuity of the data. If the single-value clustering ratio is less than a first preset threshold of 1%, Hartigan's dip test is used to evaluate the data distribution pattern. If it shows a unimodal distribution (the test result is negative), the distribution is considered positive. p If the value is greater than or equal to the preset significance threshold of 0.05, then a multilayer perceptron is used; if it shows a multimodal distribution (tested for...), then... p If the value is less than the significance threshold, then a hybrid density network is used.
[0044] If the proportion of single-value clustering is greater than or equal to the first preset threshold, the hurdle model is adopted, and it is further determined whether the proportion of single-value clustering is greater than the second preset threshold of 90%. If it is greater than the second preset threshold, the regression component of the hurdle model is the multilayer perceptron by default. If it is not greater than the second preset threshold, the clustered data in the effective dataset is first removed, and then Hartigan's dip test is performed on the remaining data. The regression component is selected according to the test result: if it is unimodal, the multilayer perceptron regression component is selected; if it is multimodal, the mixed density network regression component is selected.
[0045] Specifically, the optimization target cycle efficiency diagnosed as unimodal distribution is assigned to an independent single-output multilayer perceptron architecture; constraints diagnosed as unimodal distribution, including the minimum pinch temperature difference of heat exchangers CAC-1–3, CB-1, EVA-1–2, AH-1–3, and OEVA, are merged and assigned to a single multi-output multilayer perceptron architecture; constraints diagnosed as multimodal distribution, including the minimum pinch temperature difference of heat exchangers CB-2 and HR-2, are assigned to two independent hybrid density network architectures; the constraint of minimum pinch temperature difference of heat exchanger HR-1, where the single-value aggregation ratio is greater than or equal to the first preset threshold, is assigned to the hurdle model architecture, and since its single-value aggregation ratio is greater than the second preset threshold, its regression component is selected as a multilayer perceptron architecture.
[0046] Step S3: After determining the architecture of the target surrogate model and the surrogate models for each constraint, this embodiment uses a Bayesian optimization strategy based on a tree-structured Parzen estimator for hyperparameter optimization. The complete search space is shown in Table 3. In this process, this embodiment introduces a median pruning mechanism. Using the first five complete trials as historical benchmarks, starting from the sixth trial, after a warm-up period of 20 training rounds for a single trial, if the target evaluation value in the current round is worse than the median target evaluation value of previous trials in the same round, the invalid trial is automatically terminated early, thus concentrating limited computational resources on more promising hyperparameter combinations.
[0047] Table 3. Complete search space for hyperparameter optimization During the model training phase, this embodiment employs differentiated loss functions for each selected architecture: The mean squared error loss function of the multilayer perceptron provided in this embodiment is: ; In the formula, It refers to the batch size; and They are the first The true and predicted values of each sample; The negative log-likelihood loss function of the hybrid density network provided in this embodiment is: ; In the formula, It is the number of Gaussian components; It is the input vector; It is the first The mixing coefficients of the Gaussian components satisfy the following conditions: and ; It is the first Each Gaussian component in The probability density at point A, whose conditional mean is The conditional variance is ; The composite loss function of the hurdle model provided in this embodiment, which combines the classification cross-entropy and conditional regression loss, is as follows: ; In the formula, It is the weight of the loss; subscript and These represent classification and regression tasks, respectively; the classification loss provided in this embodiment is: ; In the formula, It is the number of categories; It is the first The true category label of each sample; Is it a prediction of the first Each sample belongs to category The probability of; It is an indicator function that takes the value 1 when the condition inside the parentheses is true, and takes the value 0 otherwise. The conditional regression loss is calculated only on non-clustered samples, which are samples in the valid dataset where the output value is not equal to the single clustered value; if the regression component of the hurdle model is a multilayer perceptron, then According to the description Calculations show that if the regression component is a mixed-density network, then... According to the description Calculate, at this time in the formula The corresponding number of non-clustered samples in the current batch is retrieved.
[0048] In this embodiment, the following strategies are also introduced during the model training phase: a gradient clipping mechanism with a threshold of 1.0 is used to limit the gradient norm during model updates; an adaptive learning rate decay strategy is introduced, setting the patience value that triggers halving of the learning rate to 10 consecutive training epochs in which the validation set loss has not improved; and an early stopping regularization strategy is introduced, setting the patience value that triggers early stopping to 30 consecutive training epochs in which the validation set loss has not improved.
[0049] The patience value of the adaptive learning rate decay strategy is set to be strictly less than that of the early stopping regularization strategy, ensuring that the model has at least one (or even multiple) opportunity to perform adaptive learning rate decay before triggering early stopping of overall training.
[0050] After training, this embodiment uses the SHAP method to perform feature attribution analysis on the optimized target surrogate model. The feature importance is represented by the average absolute SHAP value of each decision variable on the test set, such as... Figure 6 As shown, the feature importance ranking obtained from SHAP is cross-validated with the Sobol total order sensitivity index ranking obtained in step S1. The validation results show high consistency in the global variable space, with the top six parameters in terms of importance ranked from highest to lowest as follows: T A10 , P A7 , T A19 , P A16 , T A4 , P A3 This indicates that the decision-making logic within the data-driven agent model conforms to the actual thermodynamic laws of the liquefied air energy storage system, thus endowing the agent model with reliable physical interpretability.
[0051] Step S4: In this embodiment, the validated optimized target surrogate model and each constraint surrogate model are embedded into the differential evolution algorithm. An exponential external penalty function is used to convert all 13 predicted minimum pinch point temperature differences of the heat exchangers output by each constraint surrogate model into penalty terms. These penalty terms are then combined with the predicted cycle efficiency output by the optimized target surrogate model to construct an unconstrained fitness function. This function is used to globally optimize the decision variables and output candidate optimal process parameters. The unconstrained fitness function provided in this embodiment is: ; In the formula, These are the decision variables of the liquefied air energy storage system; It is the objective function value predicted by the surrogate model, i.e., the loop efficiency; The total penalty value resulting from violating the constraints is obtained by weighted summation of the violation amounts of each constraint: For constraints with a lower constraint limit, when the predicted value of the surrogate model for that constraint is lower than the lower constraint limit, the violation amount is the difference between the lower constraint limit and the predicted value; otherwise, the violation amount is zero. For constraints with an upper constraint limit, when the predicted value of the surrogate model for that constraint is higher than the upper constraint limit, the violation amount is the difference between the predicted value and the upper constraint limit; otherwise, the violation amount is zero. In this embodiment, the weights of the 13 minimum pinch point temperature difference constraints for heat exchangers are all set to 1, i.e. The sum of all 13 violations; when all constraints are satisfied. At this time, the fitness function This equals the loop efficiency predicted by the surrogate model. The differential evolution algorithm aims to maximize... To find the best target.
[0052] Step S5: In this embodiment, the candidate optimal process parameters output in step S4 are substituted back into the first-principles model of the liquefied air energy storage system for verification. The error between the output results of the surrogate model and the output results of the first-principles model is compared, as shown in Table 4. The results provided by this embodiment show that the cycle efficiency of the liquefied air energy storage system is improved from 0.6097 in the initial design condition to 0.6748. The predicted values output by the optimization target surrogate model and the predicted values output by the surrogate models for each constraint condition have small errors compared with the actual output results of the first-principles model. Furthermore, the candidate optimal process parameters have been verified to fully satisfy the minimum pinch temperature difference constraint conditions of all heat exchangers, thus constituting feasible optimized process parameters, ensuring the accuracy and feasibility of the final design.
[0053] Furthermore, this embodiment also provides the following processing method: when the verification result of the first principle model shows that the candidate optimal process parameter violates at least one constraint, the constraint boundary of the surrogate model side corresponding to the violated constraint is conservatively adjusted. For example, as shown in Table 4, the predicted value of the minimum pinch temperature difference of EVA-2 is overestimated by 0.4692 K compared with the actual value. When this overestimate causes the minimum pinch temperature difference obtained by the first principle model verification to be lower than the constraint lower limit of 3 K, the constraint lower limit of the constraint on the surrogate model side is increased from 3 K to 3.5 K, so that the surrogate model side reserves a margin not less than the prediction deviation. Under the premise of keeping the model structure and model parameters of each surrogate model unchanged, steps S4 and S5 are re-executed based on the adjusted constraint boundary of the surrogate model side until feasible optimized process parameters that satisfy all constraints as verified by the first principle model are obtained.
[0054] Table 4 Comparison of output results from the surrogate model and the first-principles model The embodiments described above provide a detailed explanation of the technical solutions and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An optimization method for thermomechanical energy storage systems based on a data-driven proxy model, characterized in that, Includes the following steps: S1: Construct a first-principles model of the target thermomechanical energy storage system, determine the decision variables to be optimized and their boundary ranges; use a sampling algorithm to generate initial sample points that uniformly cover the entire variable space within the boundary range of the decision variables, input them into the first-principles model for batch solution to obtain the optimization target value and constraint condition value, and construct an effective dataset; S2: Make hierarchical decisions based on the distribution characteristics of the effective dataset, and adaptively select an architecture to optimize the target agent model and the constraint agent model. The architecture is selected from one or more combinations of multilayer perceptron, hybrid density network or hurdle model. S3: Based on the effective dataset, a hyperparameter optimization algorithm is used to optimize the hyperparameters of the target proxy model and the constraint proxy model respectively, and training is completed using a specific loss function; then feature attribution analysis is performed on each trained proxy model, and its physical consistency is verified by combining sensitivity analysis based on the first principles model. S4: Embed the validated optimization target surrogate model and constraint surrogate model into the global heuristic optimization algorithm. Use an external penalty function to transform the predicted value output by the constraint surrogate model into a penalty term, and combine it with the predicted value output by the optimization target surrogate model to construct an unconstrained fitness function. Perform global optimization on the decision variables of the target thermomechanical energy storage system and output candidate optimal process parameters.
2. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, In step S1, the target thermomechanical energy storage system includes an energy input module, an energy storage module, and an energy output module; the first principle model is constructed based on steady-state chemical thermodynamic process simulation; the optimization objective is an evaluation index reflecting the thermodynamic or economic performance of the system, specifically including one or more combinations of the system's cycle efficiency, energy efficiency, energy storage density, or levelized cost of electricity; the constraints include at least the minimum pinch temperature difference of the heat exchangers in the system.
3. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, In step S1, the sampling algorithm is Latin hypercube sampling; when constructing the effective dataset, invalid samples caused by the non-convergence of the first-principles model numerical calculation are removed, and then the centering of the effective dataset is calculated. L 2. Bias; wherein, the effective dataset includes the training set, validation set and test set, which are all independent data subsets generated by independent sampling within the boundary range of the decision variable using the Latin hypercube sampling, rather than being generated by splitting a single total sample pool.
4. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, In step S2, the architecture is adaptively selected to optimize the target proxy model and the constraint proxy model, specifically including: The single-value clustering ratio of the optimization target value and the constraint value is calculated to detect the semi-continuousness of the data. If the single-value clustering ratio is less than the first preset threshold, Hartigan's dip test is used to evaluate the data distribution pattern. If it is a unimodal distribution, a multilayer perceptron architecture is used; if it is a multimodal distribution, a hybrid density network architecture is used. If the proportion of single-value clustering is greater than or equal to the first preset threshold, the hurdle model architecture is adopted, and it is further determined whether the proportion of single-value clustering is greater than the second preset threshold. If it is greater than the second preset threshold, the regression component of the hurdle model is a multilayer perceptron by default. If it is not greater than the second preset threshold, the clustered data in the effective dataset is first removed, and then Hartigan's dip test is performed on the remaining data. The regression component is selected according to the test result: if it is unimodal, the multilayer perceptron regression component is selected; if it is multimodal, the mixed density network regression component is selected.
5. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, In step S3, the hyperparameter optimization algorithm adopts a Bayesian optimization strategy based on a probability model. Specifically, it uses a tree-structured Parzen estimator to build a probability model based on historical experimental data and guide the search. At the same time, a median pruning mechanism is introduced. After completing the warm-up period of the set training rounds, if the evaluation target value of the experiment in the current round is worse than the median evaluation target value of previous experiments in the same round, the invalid experiment is automatically terminated in advance.
6. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, In step S3, training is completed using a specific loss function, which includes: For multilayer perceptrons, mean squared error is used as the loss function; For hybrid density networks, negative log-likelihood is used as the loss function; For the hurdle model, a composite loss function combining classification cross-entropy and conditional regression loss is used.
7. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1 or 6, characterized in that, In step S3, the following strategies are also introduced during the model training phase: A gradient pruning mechanism is used to limit the gradient norm during model updates; an adaptive learning rate decay strategy and an early stopping regularization strategy based on validation set loss are introduced; wherein, the patience value of the adaptive learning rate decay strategy is set to be less than the patience value of the early stopping regularization strategy.
8. The optimization method for thermomechanical energy storage systems based on a data-driven agent model according to claim 1, characterized in that, In step S3, the feature attribution analysis specifically adopts the Shapley additivity interpretation method; the specific process of verifying its physical consistency is as follows: parallel to the sampling process in step S1, Sobol sensitivity analysis is independently performed on the first-principles model based on the quasi-random sequence, the total order sensitivity index of each decision variable is calculated and ranked, and it is used as the baseline fact and compared with the feature importance ranking resolved by the Shapley additivity interpretation method.
9. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, In step S4, the global heuristic optimization algorithm is the differential evolution algorithm; the external penalty function is the exponential external penalty function.
10. The optimization method for thermomechanical energy storage systems based on a data-driven proxy model according to claim 1, characterized in that, The method also includes step S5: inputting the candidate optimal process parameters output in step S4 into the first-principles model of the target thermomechanical energy storage system for verification, comparing the prediction output results of each proxy model with the calculation output results of the first-principles model to determine the prediction error of each proxy model at the candidate optimal process parameters, and judging whether the candidate optimal process parameters meet the preset constraints based on the calculation output results of the first-principles model. When the verification results of the first principle model show that the candidate optimal process parameter violates at least one constraint, the surrogate model side constraint boundary corresponding to the violated constraint is conservatively adjusted, and steps S4 and S5 are re-executed based on the adjusted surrogate model side constraint boundary until feasible optimized process parameters that satisfy all constraints are obtained as verified by the first principle model. The conservative adjustment includes: for constraints with a lower constraint limit, increasing the corresponding lower constraint limit on the surrogate model side; for constraints with an upper constraint limit, decreasing the corresponding upper constraint limit on the surrogate model side; and maintaining the model structure and model parameters of each surrogate model unchanged during the conservative adjustment of the surrogate model side constraint boundaries.
