An offline optimized trigger control method for multi-energy complementary heating

By employing offline global optimization and event-triggered re-optimization methods in a photovoltaic-geothermal-energy storage multi-energy complementary heating system, the contradiction between optimization performance on low-computing-power embedded microcontrollers and online computing power requirements has been resolved. This has enabled efficient heating system control, reduced hardware costs and operating expenses, and improved photovoltaic self-consumption rate and control quality.

CN123067103APending Publication Date: 2026-11-10YINCHUAN ENERGY COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611107335.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies in photovoltaic-geothermal-energy storage multi-energy complementary heating systems cannot achieve near-standard model predictive control optimization on low-computing-power embedded microcontrollers, and suffer from problems such as high curtailment rate, high operating costs, and easy degradation of control quality.

Method used

An offline global optimization trigger control method is adopted. By migrating the optimization calculation to the offline stage, the computationally intensive global multi-objective optimization is completed offline. In the online normal stage, table lookup scheduling with low computational complexity is performed. Low-dimensional short-term re-optimization is triggered only when there is a large deviation between the measured state and the predicted state to correct the deviation.

Benefits of technology

Achieving near-standard MPC optimization results on a low-computing-power platform significantly reduces hardware costs, increases photovoltaic self-consumption rate and reduces operating expenses, while ensuring control quality and adapting to rural distributed heating application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067103A_ABST
    Figure CN123067103A_ABST
Patent Text Reader

Abstract

This invention discloses an offline optimization trigger control method for multi-energy complementary heating. The method includes: an offline construction step, which generates typical days based on historical meteorological data clustering, performs global multi-objective optimization on a daily basis to generate an optimal scheduling table library, and constructs a reduced-order linear deviation model that only describes the evolution law of deviation, and pre-installs it into an embedded controller; an online table scheduling step, which matches the most recent typical day according to the weather forecast every day, and executes control commands hourly by looking up the table with O(1) complexity; and a deviation trigger re-optimization step, which calculates the comprehensive deviation index in real time by integrating the three dimensions of temperature, irradiance, and energy storage state of charge, and triggers short-time domain simplified quadratic programming re-optimization based on the reduced-order model when the deviation exceeds the limit, and sets a cooling period. This invention migrates most of the optimization calculations to the offline stage by using asymmetric time allocation, and can achieve optimization effects close to standard model predictive control on an ARM CortexM4 microcontroller with extremely low hardware cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multi-energy complementary heating system operation and control technology, specifically involving a lightweight model predictive control method for photovoltaic-geothermal-energy storage multi-energy complementary heating systems, which can be deployed and run on low-computing-power embedded microcontrollers. Background Technology

[0002] In a photovoltaic-geothermal-energy storage multi-energy complementary heating system, photovoltaic output fluctuates dramatically throughout the day due to solar irradiance, while building heat load changes dynamically with outdoor temperature. Energy storage units (batteries, hot water storage tanks) need to be rationally scheduled between energy storage during off-peak hours and energy release during peak hours, and geothermal units, as a stable heating base load, need to avoid over-exploitation. To achieve efficient and economical operation with "prioritized photovoltaic consumption, peak shaving and valley filling by energy storage, and geothermal backup guarantee," it is necessary to solve an optimization scheduling problem involving multiple variables, multiple constraints, and cross-time period coupling.

[0003] Existing scheduling and control schemes are mainly divided into two categories: Option 1: Simple rule control. This method uses fixed logic to execute scheduling, resulting in low computational complexity and the ability to run on low-performance microcontrollers. However, it completely lacks predictive and global optimization capabilities, leading to high photovoltaic curtailment rates, unreasonable energy storage charging and discharging depths that accelerate cycle life degradation, and excessive use of geothermal and auxiliary electric heating, resulting in high operating costs.

[0004] Option 2: Standard Model Predictive Control (MPC). This option solves a constrained optimization problem covering a 24-hour rolling time domain online every 15 minutes. While this solution offers excellent optimization results, achieving a photovoltaic self-consumption rate of over 90% and reducing operating costs by approximately 20% compared to rule-based control, each control cycle requires solving a nonlinear programming problem with dozens of decision variables and constraints on a microcomputer. A single solution takes tens of seconds to several minutes, necessitating deployment using industrial PCs or cloud computing power, resulting in hardware costs of several thousand yuan. This makes it completely uneconomical for rural single-household heating scenarios.

[0005] Further analysis reveals that neither of the aforementioned solutions effectively utilizes a crucial engineering characteristic of heating systems: strong seasonality and daily repetition in meteorological conditions, with a large amount of highly similar weather patterns existing in historical data. Simple rule-based control completely ignores meteorological forecast information; while standard MPC utilizes forecast information, it solves a high-dimensional optimization problem from scratch in each control cycle, repeatedly consuming significant online computing power on optimizing similar scenarios, failing to transform this regularity into a means to reduce the online computational burden.

[0006] This has created an irreconcilable contradiction between optimization performance and online computing power requirements: achieving excellent scheduling optimization results necessitates the configuration of a high-performance online computing platform; conversely, reducing online computing power to accommodate low-cost embedded controllers inevitably sacrifices optimization performance. How to achieve online scheduling control of a multi-energy complementary heating system with near-standard MPC (operating cost difference less than 10%, photovoltaic self-consumption rate difference less than 8 percentage points) optimization performance on an embedded microcontroller with computing power at the ARM Cortex-M4 level (single chip price less than 50 yuan, Flash storage space less than 1MB, SRAM less than 256KB) remains an unsolved technical challenge in this field. Summary of the Invention

[0007] (a) Technical problems to be solved The purpose of this invention is to address the shortcomings of existing technologies by providing an offline optimization trigger control method for multi-energy complementary heating, breaking the core contradiction between optimization effect and online computing power requirements, achieving scheduling optimization effect close to standard model predictive control on a low-computing-power embedded microcontroller platform, while ensuring operational stability and control quality under fluctuating weather conditions.

[0008] Specifically, the following technical issues need to be addressed: 1. To address the issue of excessive online computation for standard model predictive control, which prevents its deployment on low-cost embedded controllers, the majority of optimization computations are migrated to the offline stage through asymmetric time allocation of computational workload; 2. To address the issues of poor optimization performance, high light wastage rate, and high operating costs associated with simple rule-based control, offline global optimization is used to ensure the global optimality of the scheduling scheme. 3. To address the issues of pure offline table lookup scheduling failing to adapt to actual meteorological deviations and easily degrading control quality, a low-computing-power event-triggered re-optimization mechanism is used to correct deviations without significantly increasing the online computing power burden; 4. Overcome the limitations of offline optimization and reduction techniques in the field of industrial process control, which cannot be directly adapted to the meteorological driving characteristics of multi-energy complementary heating, and build a lightweight control architecture that is adapted to heating scenarios.

[0009] (II) Technical Solution The core idea of ​​this invention is to asymmetrically distribute optimization computation in the time dimension: all computationally intensive global multi-objective optimizations are migrated to the offline stage and completed in one go, while only computationally complex operations are performed in the online normal stage. The table lookup scheduling only triggers low-dimensional short-term re-optimization to correct deviations when there is a large deviation between the actual and predicted states.

[0010] A holistic explanation of the three stages This method consists of three linearly progressive and indispensable steps forming a complete closed loop. These three steps are not simply a superposition of independent technical features, but rather an organic whole formed around the core objective of "achieving high-performance scheduling with extremely low computing power." The technical effect of this invention cannot be achieved if any step is missing. Step 1 (offline construction) provides the data foundation for Step 2 and the model support for Step 3: Without the offline generated scheduling table library, there is no basis for online table lookup scheduling; without the offline-built reduced-order linear deviation model, online re-optimization cannot be achieved under low computing power.

[0011] Step 2 (online table lookup scheduling) provides a low-computing-power implementation solution for the optimization results of Step 1: only by reducing the online routine computation to... Complex table lookup operations are necessary to implement the results of offline global optimization on embedded microcontrollers with limited storage and computing power.

[0012] Step 3 (deviation-triggered re-optimization) provides a closed-loop guarantee for Step 2: If there is only table lookup scheduling without a deviation-triggered re-optimization mechanism, when the actual weather deviates from the typical day, the control quality will degrade sharply to a level comparable to rule control, and the value of offline optimization will be greatly reduced.

[0013] Only through the coordinated efforts of these three elements can the technical goal of "achieving approximately 95% of the optimization effect of standard MPC with 1 / 50th of the hardware cost" be achieved. The following is a detailed explanation of each of the three elements: (1) Step 1: Construction of offline typical daily optimal scheduling table library and reduced-order linear deviation model This step is completed in one go on a PC or server, outputting two types of data products: a typical daily optimal scheduling table library and a reduced-order linear deviation model. These are pre-stored in the Flash storage space of the embedded controller, providing the data and model foundation for all online operations.

[0014] 1. Meteorological data preprocessing and typical daily clustering Step 1: Data Preparation. Collect hourly meteorological data for the target area for at least 3 years, including outdoor temperature. Horizontal total solar irradiance (unit: After missing value imputation and outlier removal, the following is obtained: A standardized meteorological data matrix of 24 hours per day.

[0015] Step 2: Daily Feature Extraction. Extract a three-dimensional feature vector for each day: in: , for the first The average daily temperature of the day, expressed in °C; , for the first Total daily radiation, in units of ; , for the first The daily temperature difference, expressed in °C.

[0016] Step 3: Cluster analysis. The K-means++ algorithm is used to cluster all... Cluster the feature vectors of the day into groups. kind, The value of is in the range of 8 to 15, and the optimal number of clusters is determined by the silhouette coefficient; after clustering, the following is obtained: Each cluster center and the corresponding set of members for each cluster.

[0017] Step 4: Reconstructing the meteorological time series of a typical day. For the first... For typical days, the hourly meteorological data is taken as the median of the corresponding times of all member days in that category, in order to suppress the interference of abnormal days and improve the robustness of typical days:

[0018]

[0019] in, For the first The class's member collection.

[0020] Technical Difference Explanation: Unlike the offline table building method based on uniform segmentation enumeration of variables in industrial process control, this step uses pattern recognition of historical meteorological data for clustering and dimensionality reduction. It makes full use of the daily repetitive characteristics of meteorological conditions in heating systems, covering the vast majority of operating conditions with a very small number of typical days. This fundamentally avoids the dimensionality curse problem of enumeration methods under multi-dimensional meteorological conditions, making it a table building method adapted to meteorological-driven systems.

[0021] 2. Global multi-objective optimization for typical days For each typical day A global multi-objective optimization problem covering 24 hours was established and solved to obtain the optimal scheduling scheme for this typical day.

[0022] (a) The system model uses TRNSYS or MATLAB / Simulink to establish a high-precision simulation model, including a building thermal dynamics model, a photovoltaic module model, a buried pipe heat exchange model, and an energy storage model. Its discrete-time state-space form is as follows:

[0023] in: State vector Including indoor temperature Status parameters include: layer temperature of hot water storage tank, state of charge (SOC) of battery, and water temperature at the outlet of underground pipe. Control Vector Including direct photovoltaic supply ratio Battery charging and discharging power Geothermal circulation pump flow rate Heat release power of hot water storage tank Auxiliary electric heating power Equal control quantity; For the first External inputs for a typical day include hourly irradiance and outdoor temperature.

[0024] (b) Optimization Objective With the objectives of minimizing daily operating costs and optimizing temperature comfort, a multi-objective optimization problem is established:

[0025] The objective function for daily operating costs is as follows:

[0026] In the formula, For grid electricity price, This is the equivalent degradation cost factor for the battery. This is the equivalent attenuation cost coefficient for the geothermal circulation pump. Mains power To control the time step.

[0027] The objective function for temperature comfort is:

[0028] In the formula, The lower limit of indoor temperature, This represents the upper limit of indoor temperature.

[0029] (c) Constraints The optimization problem satisfies the following constraints: Electric power balance constraints: ,in Contribute to photovoltaic power For electrical load; Thermal power balance constraint: ,in For direct solar power supply of heat, To provide heat to geothermal energy, To assist in the supply of heat by electric heating, For building heat load; Building heat load constraints: ,in The heat transfer coefficient of the building envelope; Energy storage SOC constraints: ,in , These are the lower and upper limits of the energy storage state of charge, respectively. Energy balance constraints of hot water storage tanks: ,in To store heat in the hot water tank, For heating power, , These are the heat charging efficiency and the heat release efficiency, respectively. Geothermal heat exchanger constraints: ,in , These are the lower and upper limits of the flow rate of the geothermal circulation pump, respectively. Upper and lower limits constraints for each control variable.

[0030] (d) Solving and Output The NSGA-II algorithm is used to solve the above multi-objective optimization problem, with a population size of 200 and 1000 generations. After obtaining the Pareto front, the results are calculated using a weighted sum. (in , Select the optimal compromise solution and generate the first... Optimal scheduling table for typical days: Simultaneously record the corresponding optimized predicted state trajectory:

[0031] 3. Construction of a reduced-order linear deviation model To support large-deviation re-optimization during the online phase, an ultra-low-dimensional linear approximation model is constructed. This model is only used to describe the evolution of the deviation between the actual state and the nominal predicted state, rather than describing the absolute state quantities themselves, which differs from conventional models that reduce the order of absolute state quantities.

[0032] The specific construction process is as follows: The state and control trajectory obtained from typical daily optimization are used as the nominal trajectory. Define the state deviation and control deviation:

[0033] For nonlinear system models A first-order Taylor expansion is performed within the neighborhood of the nominal trajectory to obtain the linear deviation model: Subsequently, the high-dimensional linear deviation model was reduced in order using the balanced truncation method, retaining... Dominant mode ( (After order reduction, the output only retains two directly measurable state variables: indoor temperature and energy storage SOC), ultimately yielding the reduced-order linear deviation model:

[0034] in: The reduced-order bias state vector has dimension . ; The output vector is the deviation vector, with a dimension of 2; For deviation control vectors, only retain One online adjustable key control quantity ( (This refers to the dimension of the control quantity after order reduction). , , This is the coefficient matrix of the reduced-order model.

[0035] Design principles (the core difference from conventional order reduction models): The modeling objects are different: conventional order reduction models (such as orthogonal decomposition POD order reduction) model the absolute state variables of the system and are used to replace the original high-precision model for online prediction under all working conditions; this model only models the "deviation between the actual state and the nominal trajectory", and only describes the evolution law of the deviation, making the modeling object more focused.

[0036] The design approaches differ: conventional order reduction aims to "reduce the order while maintaining accuracy under all operating conditions"; this model adopts a reverse design approach for embedded quadratic programming solutions—starting from the hard constraint of "the QP solution scale that the embedded microcontroller can handle," it works backward to determine the maximum order (3~4 orders) and output dimensions (only 2 measurable dimensions) of the model, prioritizing the feasibility and real-time performance of online solutions, and adapting to the operating requirements of platforms with extremely low computing power.

[0037] Significant advantages in storage and computing: Taking the 3rd order model as an example, the total number of matrix elements is only 30 floating-point numbers, occupying about 120 bytes of Flash storage space; the corresponding QP problem decision variables are only 12-dimensional, the worst case iteration does not exceed 12 times, and the single solution takes 30~50ms, which is fully compatible with the storage and computing power constraints of embedded controllers.

[0038] Deeply dependent on the scheduling table: The reduced-order deviation model is attached to the nominal trajectory of the corresponding typical day. Each typical day corresponds to a corresponding linearized reduced-order model, that is, "one typical day, one linearized model", which can guarantee the local modeling accuracy over a wide range of operating conditions, and is superior to the accuracy performance of a single full-condition linearized model.

[0039] The reduced-order linear deviation model and the scheduling table library are pre-stored in the Flash storage space of the embedded controller.

[0040] (2) Step 2: Online typical daily matching and table-driven scheduling This section presents a low-computing-power implementation solution for offline optimization results, running on an embedded controller and divided into two levels: daily matching and hourly execution.

[0041] 1. Typical daily matching It is triggered once a day at 00:00 to match the typical day for the next day and load the scheduling data.

[0042] The input is the public weather forecast data for the next day, including the average daily temperature for the next day. Total daily radiation Intraday temperature difference .

[0043] Calculate the normalized Euclidean distance between the eigenvector of the next day and the cluster centers of each typical day:

[0044] in: , , For the first Three-dimensional eigenvalues ​​of typical days; , , These are the historical standard deviations corresponding to the three characteristic dimensions of daily average temperature, daily total irradiance, and intraday temperature difference, respectively, used for normalization to eliminate dimensional differences.

[0045] The typical day with the smallest distance is selected as the matching result:

[0046] Load the optimal scheduling table corresponding to this typical day. and predicted state trajectory This serves as the nominal benchmark for scheduling on that day.

[0047] The computational workload for this step is... Second distance calculation On the ARM Cortex-M4 controller, the time taken is less than 1ms.

[0048] 2. Hourly scheduling and execution Triggered once per hour on the hour, at each control moment ( The control commands for the corresponding time moment are read directly from the pre-loaded scheduling table. The data is sent to each actuator via PWM, GPIO, or Modbus interfaces.

[0049] This step involves only one Flash read and one array indexing operation, with a computational complexity of O(n log n). It takes less than 1μs and can be executed stably with extremely low computing power.

[0050] (3) Step 3: Deviation monitoring and event triggering simplification and re-optimization This step provides a closed-loop guarantee for deviation correction in table-driven scheduling. It is executed synchronously at each control moment and only triggers re-optimization when the deviation exceeds the limit, which ensures control quality and strictly controls the amount of online calculation.

[0051] 1. Calculation of Comprehensive Deviation Index At each control moment, the measured data from the sensors is collected and compared with the predicted values ​​in the scheduling table to calculate the comprehensive deviation index. :

[0052] in: , , They are respectively Real-time indoor temperature, solar irradiance, and energy storage state of charge; , , These are the predicted values ​​of indoor temperature, solar irradiance, and energy storage state of charge at the corresponding time in the scheduling table; To allow for temperature deviation bandwidth; The operating range for energy storage in its charged state; A small constant to prevent division by zero errors; , , These are the weighting coefficients for the three deviation dimensions.

[0053] Design Description: Dimension selection: Indoor temperature, solar irradiance, and energy storage SOC are selected as three dimensions, corresponding to "user thermal comfort level", "photovoltaic output capacity" and "energy storage dispatch margin" respectively. These are necessary and sufficient measurable variables to measure the deviation of the operating status of the multi-energy complementary heating system, and can comprehensively reflect the degree of deviation of the system's operating conditions.

[0054] Form selection: A weighted sum form is used, containing only basic arithmetic operations and absolute value operations, with a computational complexity of O(n log n). On an ARM Cortex-M4 controller, the computation time is approximately 2μs, which is negligible and adapts to the computational constraints of embedded platforms. The weight values ​​are determined based on system sensitivity analysis, which can reflect the impact of the three types of deviations on the system's operational quality in a balanced manner.

[0055] 2. Two-level response strategy Based on the magnitude of the comprehensive deviation index, a two-level response mechanism is adopted:

[0056] Among them, the deviation threshold This means that re-optimization is triggered when the overall deviation reaches 15%.

[0057] Technical Selection Explanation: This solution does not employ the conventional three-level correction architecture of "table lookup-proportional fine-tuning-re-optimization" because: model-less PD proportional fine-tuning in multivariable coupled systems, relying solely on temperature deviations to correct multiple control variables (energy storage power, geothermal flow, auxiliary heating), is highly prone to generating conflicting correction directions, potentially triggering system oscillations. This solution skips the fine-tuning level entirely, employing a reduced-order model for short-time domain optimization, adding only approximately 50ms of computation time while achieving a correction effect far superior to proportional fine-tuning. This is a reasonable choice under computational constraints, based on a well-considered technical trade-off.

[0058] 3. Simplified quadratic programming re-optimization for event-triggered scenarios when Time-triggered re-optimization, with a cooldown period set. Even if the deviation exceeds the limit again during the hour-long cooldown period, it will not trigger again.

[0059] Cooling Period Design Specifications: The setting of the cooling period is based on clear physical principles: On the one hand, after the second-order programming solution, the system needs a certain amount of time to verify the correction effect in the actual environment. The thermal inertia of the building determines that the temperature state will not change instantaneously, and too frequent triggering cannot reflect the correction effect. On the other hand, the reduced-order deviation model is a locally linear approximation model. Frequent triggering of re-optimization may cause frequent jumps in the control sequence due to model errors, affecting indoor thermal comfort and increasing the computing burden on the controller. The 2-hour cooling period is determined based on a combination of the building's thermal inertia time constant and typical meteorological fluctuation cycles, achieving a balance between the timeliness of deviation correction and system stability.

[0060] The re-optimization is based on the aforementioned reduced-order linear deviation model, using the current measured deviation as the initial state, and in the future short time domain... Within an hour, solve a quadratic programming (QP) problem that minimizes the control increment and returns the indoor temperature to its nominal range:

[0061] The constraints are:

[0062] in, Indicates based on Time-state pair Predicted value at time, , As the weight of state deviation, To control the incremental weight matrix, , These are the lower and upper limits of the control quantity, respectively.

[0063] The decision variables for this quadratic programming problem have the following dimensions. The constraints are linear equality and inequality. The active set method is used to solve the problem. In the worst case, the number of iterations does not exceed the number of decision variables. Each iteration solves a 12×12 linear equation system. On an STM32F407@168MHz controller, the solution time for a single iteration is about 30~50ms, which is well within the computing power capacity of the embedded controller.

[0064] According to statistics from the heating season, the frequency of this optimization is low, with approximately 80 to 150 triggers throughout the entire heating season (151 days). The total online optimization time is only about 7.5 seconds, averaging less than 0.05 seconds per day, which does not affect the normal scheduling tasks of the controller.

[0065] 4. Optimize the application of results Quadratic programming yields the future After obtaining the optimal control increment sequence for each step, take the optimal control increment for the first step. This value is superimposed on the current nominal control value to form the final control output.

[0066] Remaining The control increment of each step covers the control instructions for the corresponding time period in the original scheduling table, and re-optimization is only allowed to be triggered again after the cooldown period ends.

[0067] (III) Beneficial Effects This invention addresses the meteorological driving characteristics of multi-energy complementary heating systems. Through a closed-loop architecture of "offline global optimization - online table lookup scheduling - deviation-triggered re-optimization," it breaks the inherent contradiction between optimization effectiveness and online computing power requirements, achieving the following beneficial effects: 1. Significantly reduced hardware costs, adapting to low-cost embedded deployments. This invention migrates over 95% of the optimization computation to the offline stage and completes it in one go, while the computational complexity of online routine scheduling is only [missing information]. The time taken for occasional re-optimization is in the millisecond range. It can run stably on ARM Cortex-M4 embedded microcontrollers with a unit price of less than 50 yuan. The cost of the controller core chip is only 1 / 50 of the standard MPC solution, making it suitable for cost-sensitive application scenarios such as rural distributed heating.

[0068] 2. The optimization effect is close to that of standard MPC, and significantly better than rule control. This invention can achieve approximately 95% of the optimization effect of standard MPC on a platform with extremely low computing power, and the operating cost and photovoltaic self-consumption rate are close to the standard MPC level. Compared with traditional rule control schemes, the operating cost and curtailment rate are significantly reduced, and the room temperature control quality is significantly improved.

[0069] 3. The three stages work together to form a complete closed loop, achieving the optimal balance between computing power and performance. The three components are interdependent and work together. They ensure the optimality of the scheduling scheme through offline global optimization, achieve low-computing-power deployment through online table lookup, and solve the problem of poor adaptability of the pure table lookup scheme through event-triggered re-optimization. They balance optimization performance and operational stability under extremely low computing power constraints.

[0070] 4. The reduced-order linear deviation model is specifically designed to adapt to the re-optimization needs of low-computing-power platforms. The reduced-order linear deviation model of this invention adopts deviation modeling and reverse design approach, which has low storage overhead and fast solution speed. At the same time, the "one typical day, one model" architecture ensures local accuracy under wide operating conditions. While meeting the accuracy of deviation correction, it strictly controls computing power and storage overhead.

[0071] 5. The event triggering mechanism is reasonably designed, balancing the corrective effect with system stability. The comprehensive deviation index can fully reflect the degree of system operation deviation. The two-level response strategy avoids the problem of fine-tuning oscillation under multi-variable coupling. The cooling period mechanism balances the timeliness of correction and system stability, ultimately achieving the operation effect of "low computing power overhead in normal state and light correction in occasional cases", maximizing control quality under computing power constraints. Attached Figure Description

[0072] Figure 1 This is a schematic diagram of the three-stage progressive logic of the present invention; Figure 2 This is a schematic diagram illustrating the complete process from meteorological data to the scheduling database in the offline stage. Figure 3 This is a schematic diagram of the online process: daily matching + hourly scheduling + deviation triggering. Detailed Implementation

[0073] The present invention will be further described in detail below with reference to specific embodiments, but the scope of protection of the present invention is not limited to the content described. This embodiment takes an 80㎡ single-household photovoltaic-geothermal-energy storage multi-energy complementary heating system in Yongning County, Yinchuan, Ningxia as the application carrier to implement the three-stage technical solution.

[0074] Example 1: Application of Rural Single-House Heating System in Yinchuan, Ningxia The heating system in this embodiment is configured as follows: 2kW photovoltaic modules, 120m underground pipe heat exchanger, 5kWh lithium iron phosphate battery, and 300L hot water storage tank. The offline optimized trigger control method described in this invention is used for operation scheduling.

[0075] I. System Hardware Configuration The core hardware components of this embodiment are as follows: the main controller adopts an ARM Cortex-M4 embedded microcontroller, which meets the low-cost, low-computing-power hardware requirements of this invention.

[0076] Among them, the main control chip STM32F407VET6 has a single chip price of less than 50 yuan, a Flash storage space of less than 1MB, and an SRAM of less than 256KB, which perfectly matches the hardware application scenario of this invention.

[0077] Part 2: Construction of Offline Typical Daily Optimal Scheduling Table Library and Reduced-Order Linear Deviation Model This stage is completed in one go on a PC or server, outputting two types of data products: a typical daily optimal scheduling table library and a reduced-order linear deviation model. These are pre-stored in the Flash storage space of the embedded controller, providing the data and model foundation for all online operations.

[0078] (1) Meteorological data preprocessing and typical daily clustering Hourly meteorological data (1826 valid days) from Yongning County, Yinchuan City, from 2020 to 2024 were used as the raw data and processed according to the following steps: ① Data preparation: Collect raw hourly outdoor temperatures Horizontal total solar irradiance (unit: After imputation of missing values ​​and removal of outliers, a standardized meteorological data matrix of 1826 days × 24 hours is obtained.

[0079] ②Daily Feature Extraction: Extract a three-dimensional feature vector for each day:

[0080] in: , for the first The average daily temperature of the day, expressed in °C; , for the first Total daily radiation, in units of ; , for the first The daily temperature difference, expressed in °C.

[0081] ③ Cluster analysis: The K-means++ algorithm was used to cluster the feature vectors of all 1826 days, and the optimal number of clusters was determined by the silhouette coefficient. The corresponding profile coefficient is 0.73; 10 typical day types cover all heating season day types from extremely cold cloudy days with temperatures ranging from -18.5℃ to sunny and warm winter days with temperatures ranging from 12℃. The key extreme type includes: D4 extremely cold sunny day (daily average temperature approximately -15.2℃, daily total irradiance approximately 3.8kWh / m²). 2 (occurring approximately 5% of the time), D5 extremely cold and cloudy weather (average daily temperature approximately -16.8℃, total daily irradiance approximately 0.9kWh / m²). 2 (occurring approximately 3% of the time), D10 Extreme Cold Day (average daily temperature approximately -18.5℃, total daily irradiance approximately 0.4 kWh / m²). 2 (occurring approximately 2% of the time).

[0082] ④ Typical daily meteorological time series reconstruction: For the first For typical days, the hourly meteorological data is taken as the median of the corresponding times of all member days in that category, in order to suppress the interference of abnormal days and improve the robustness of typical days:

[0083]

[0084] in, For the first The class's member collection.

[0085] (2) Global multi-objective optimization for typical days For each type of typical day A global multi-objective optimization problem covering 24 hours was established and solved to obtain the optimal scheduling scheme for this typical day.

[0086] ① System Model: A high-precision simulation model is established using TRNSYS or MATLAB / Simulink, including a building thermal dynamics model, a photovoltaic module model, a buried pipe heat exchange model, and an energy storage model. Its discrete-time state-space form is as follows:

[0087] in: State vector Including indoor temperature Status parameters include: hot water storage tank stratified temperature, battery state of charge (SOC), and water temperature at the outlet of the underground pipe. Control Vector Including direct photovoltaic supply ratio Battery charging and discharging power Geothermal circulation pump flow rate Heat release power of hot water storage tank Auxiliary electric heating power Equal control quantity; For the first External inputs for a typical day include hourly irradiance and outdoor temperature.

[0088] ② Optimization Objectives: A multi-objective optimization problem is established with the objectives of minimizing daily operating costs and optimizing temperature comfort.

[0089] The objective function for daily operating costs is as follows:

[0090] In the formula, For grid electricity price, This is the equivalent degradation cost factor for the battery. This is the equivalent attenuation cost coefficient for the geothermal circulation pump. Mains power To control the time step.

[0091] The objective function for temperature comfort is:

[0092] In the formula, The lower limit of indoor temperature, This represents the upper limit of indoor temperature.

[0093] ③ Constraints: The optimization problem satisfies the following constraints: Electric power balance constraints: ,in Contribute to photovoltaic power For electrical load; Thermal power balance constraint: ,in For direct solar power supply of heat, To provide heat to geothermal energy, To assist in the supply of heat by electric heating, For building heat load; Building heat load constraints: ,in The heat transfer coefficient of the building envelope; Energy storage SOC constraints: ,in , These are the lower and upper limits of the energy storage state of charge, respectively. Energy balance constraints of hot water storage tanks: ,in To store heat in the hot water tank, For heating power, , These are the heat charging efficiency and the heat release efficiency, respectively. Geothermal heat exchanger constraints: ,in , These are the lower and upper limits of the flow rate of the geothermal circulation pump, respectively. Upper and lower limits constraints for each control variable.

[0094] ④ Solution and Output: The NSGA-II algorithm is used to solve the above multi-objective optimization problem, with a population size of 200 and 1000 generations. After obtaining the Pareto front, the solution is calculated using a weighted sum. (in , Select the optimal compromise solution and generate the first... Optimal scheduling table for typical days:

[0095] Simultaneously record the corresponding optimized predicted state trajectory:

[0096] In this embodiment, the solution takes about 8 minutes for a single typical day, and about 80 minutes for 10 typical days. This is a one-time offline calculation cost and does not affect the efficiency of online operation.

[0097] (3) Construction of reduced-order linear deviation model The optimal state and control trajectory for each typical day are used as the nominal trajectory. A corresponding reduced-order linear deviation model is constructed to support online large deviation re-optimization.

[0098] The specific construction process is as follows: Define state deviation and control deviation: For nonlinear system models A first-order Taylor expansion is performed within the neighborhood of the nominal trajectory to obtain the linear deviation model:

[0099] Subsequently, the high-dimensional linear deviation model was reduced in order using the balanced truncation method, retaining... The dominant modes (corresponding to the building thermal inertia dominant mode, energy storage SOC mode, and water tank temperature mode, respectively) retain only the two directly measurable state variables, indoor temperature and energy storage SOC, resulting in a reduced-order linear deviation model:

[0100] in: The reduced-order bias state vector has dimension . ; The output vector is the deviation vector, with a dimension of 2; For deviation control vectors, only retain A key control quantity that is adjustable online; , , This is the coefficient matrix of the reduced-order model.

[0101] Taking a typical sunny and cold day (D2) as an example, the 3×3 state matrix is ​​obtained after order reduction. 3×3 input matrix 2×3D output matrix It contains 30 floating-point numbers and occupies approximately 120 bytes of Flash storage space. Each typical day corresponds to a set of reduced-order model parameters, i.e., "one typical day, one linearized model", which can guarantee the accuracy of local modeling over a wide range of operating conditions.

[0102] The optimal scheduling table library and the corresponding reduced-order linear deviation model for the above 10 typical days are pre-written into the Flash storage space of the STM32F407VET6 controller using a programming tool for online calling.

[0103] Part 2: Online Typical Daily Matching and Table-Driven Scheduling This process runs on the embedded main controller and is divided into two levels: daily typical matching and hourly scheduling execution.

[0104] (1) Daily typical day matching It is triggered once a day at 00:00 to match the typical day for that day and load the scheduling data. ① Input Acquisition: Obtain the next day's public weather forecast data via 4G DTU and extract the next day's average temperature. Total daily radiation Intraday temperature difference .

[0105] ② Distance Calculation: Calculate the normalized Euclidean distance between the feature vector of the next day and the cluster centers of each typical day:

[0106] in: , , For the first Three-dimensional eigenvalues ​​of typical days; , , These are the historical standard deviations corresponding to the three characteristic dimensions of daily average temperature, daily total irradiance, and intraday temperature difference, respectively, used for normalization to eliminate dimensional differences.

[0107] ③ Matching and Loading: Select the typical day with the smallest distance as the matching result:

[0108] Load the optimal scheduling table corresponding to this typical day. and predicted state trajectory This serves as the nominal benchmark for scheduling on that day.

[0109] The computational workload for this step is... Second distance calculation On an ARM Cortex-M4 controller, the time taken is less than 1ms, and the computational burden is negligible.

[0110] (2) Hourly scheduling execution Triggered once per hour on the hour, at each control moment ( The control commands for the corresponding time moment are read directly from the pre-loaded scheduling table. This includes the direct photovoltaic power ratio, battery charging and discharging power, geothermal circulation pump flow rate, hot water storage tank heat release power, auxiliary electric heating power, etc., which are sent to each actuator through PWM, GPIO or Modbus interfaces.

[0111] This step involves only one Flash read and one array indexing operation, with a computational complexity of O(n log n). It takes less than 1μs and can be executed stably with extremely low computing power.

[0112] IV. Step 3: Deviation Monitoring and Event Triggering Simplification and Re-optimization This step is executed synchronously with hourly scheduling, and re-optimization is triggered only when the overall deviation exceeds the limit, ensuring control quality without significantly increasing the computing power burden.

[0113] (1) Calculation of comprehensive deviation index At each control moment, the measured data from the sensors is collected and compared with the predicted values ​​in the scheduling table to calculate the comprehensive deviation index. :

[0114] in: , , They are respectively Real-time indoor temperature, solar irradiance, and energy storage state of charge; , , These are the predicted values ​​for the corresponding times in the scheduling table; To allow for temperature deviation bandwidth; The operating range for energy storage in its charged state; A small constant to prevent division by zero errors; , , These are the weighting coefficients for the three deviation dimensions.

[0115] This indicator only includes basic arithmetic operations and absolute value operations, with a computational complexity of O(n log n). On an ARM Cortex-M4 controller, it takes about 2μs, and the computational burden is negligible.

[0116] (2) Two-level response strategy Based on the magnitude of the comprehensive deviation index, a two-level response mechanism is adopted: like (Normal band): Maintain nominal scheduling commands No changes, no modifications; like (Exceeding the limit): Triggers simplified quadratic programming re-optimization. The deviation threshold is one of these factors. This means that re-optimization is triggered when the overall deviation reaches 15%. This scheme does not set a proportional fine-tuning intermediate level to avoid control oscillation problems caused by model-less PD correction in multivariable coupled systems, achieving a more stable correction effect with millisecond-level computational increments.

[0117] (3) Event-triggered simplified quadratic programming re-optimization when Time-triggered re-optimization, with a cooldown period set. Even if the deviation exceeds the limit again during the cooling period, it will not trigger repeatedly, thus avoiding frequent solving that could cause control sequence jumps and affect indoor thermal comfort, while also controlling the computational burden.

[0118] The re-optimization is based on the reduced-order linear deviation model of the current typical matching day, using the current measured deviation as the initial state, and in the future short time domain... Within an hour, solve a quadratic programming (QP) problem that minimizes the control increment and returns the indoor temperature to its nominal range:

[0119] The constraints are:

[0120] in, Indicates based on Time-state pair Predicted value at time, , As the weight of state deviation, To control the incremental weight matrix, , These are the lower and upper limits of the control quantity, respectively.

[0121] The decision variables for this QP problem have the following dimensions. The constraints are linear equations and inequalities; the active set method is used for solving the problem. In the worst case, the number of iterations does not exceed the number of decision variables, and each iteration solves a 12×12 system of linear equations. On an STM32F407@168MHz controller, the time taken for a single solution is approximately 30~50ms, which is well within the computing power capacity of the embedded controller.

[0122] (4) Application of optimization results Quadratic programming yields the future After obtaining the optimal control increment sequence for each step, take the optimal control increment for the first step. This value is superimposed on the current nominal control value to form the final control output.

[0123] Remaining The control increment of each step covers the control instructions for the corresponding time period in the original scheduling table until the normal scheduling logic is restored after the cooldown period ends.

[0124] V. Verification of the Implementation Results of the Example (1) Typical weekly operation effect The following statistics were obtained by selecting operational data from a week in January 2026:

[0125] January 15th was a cloudy and fluctuating day, deviating significantly from the typical matching day. A QP re-optimization was triggered at 10:00 AM, with a single solution taking 38ms. After correction, the room temperature returned to the normal range in the subsequent period. Only one re-optimization was triggered throughout the week, with a total online optimization time of 38ms. The total weekly operating electricity cost was 23.74 yuan, which was about 22.2% lower than the rule-based control scheme.

[0126] (2) Comparison of effects throughout the heating season Simulation verification was conducted for the entire heating season (November 1st to March 31st, a total of 151 days). The method of this invention was compared with two existing mainstream solutions, and the results are as follows:

[0127] As can be seen from the comparison, the total online optimization time of the method of the present invention is reduced by 4 orders of magnitude compared with the standard MPC, while the optimization effect is only degraded by about 5%. It achieves nearly 95% of the control performance of the standard MPC with 1 / 50 of the hardware cost, which verifies the practicality and technical effect of the solution.

[0128] VI. Comparison of Different Technical Approaches To verify the non-obviousness of the three-stage collaborative architecture of this invention, a comparative analysis of the performance of different technical approaches was conducted: 1. Offline table lookup + all-time online MPC correction route: All-dimensional online optimization is performed at every control moment. The optimization effect is comparable to that of standard MPC, but the online calculation is extremely large. It requires industrial control computer support and cannot run on embedded MCU. It exceeds the hardware constraints of low computing power and cannot meet the cost requirements of rural single-household heating.

[0129] 2. Offline lookup only, no correction mechanism: The missing deviation trigger re-optimization link leads to a sharp degradation in control quality when actual weather deviates from typical days. Room temperature fluctuations and operating costs increase significantly, greatly reducing the application value of offline global optimization and making it unable to cope with sudden weather fluctuations.

[0130] 3. Offline table lookup + simple PD correction route: Using proportional-derivative fine-tuning to replace re-optimization correction has low computing power overhead, but it is prone to control oscillation in multivariable coupled systems, the correction effect is unstable, and it is difficult to guarantee the quality of room temperature control.

[0131] 4. The three-stage collaborative approach of this invention: Through a closed-loop architecture of "offline global optimization - online table lookup scheduling - deviation-triggered re-optimization," it overcomes the core contradiction in existing technologies where "optimization effect and online computing power are mutually exclusive." It achieves near-standard MPC optimization results under extremely low computing power constraints, while also possessing adaptability to various operating conditions and operational stability. This architecture is not a simple superposition of existing technologies, but a targeted design for the meteorological driving characteristics of heating systems. The three stages are linearly progressive and indispensable, jointly achieving the technical objectives of this invention.

Claims

1. An offline optimized trigger control method for multi-energy complementary heating, characterized in that, include: Offline construction steps: Based on historical hourly meteorological data of the target area, generate data through clustering. A typical day and its meteorological time series; for each typical day, global multi-objective optimization is performed with daily operating cost and indoor temperature comfort as objectives to generate the corresponding optimal control scheduling table and predicted state trajectory; each optimized trajectory is linearized and reduced in order to obtain a reduced-order linear deviation model; the scheduling table library and the reduced-order linear deviation model are pre-loaded into the embedded controller; Online scheduling steps: Each day, based on the weather forecast data for the next day, calculate the characteristic distance between the forecast data and each typical day, match the nearest typical day and load the corresponding scheduling table; at each control moment, read and execute the preset control instructions from the scheduling table; Deviation-triggered re-optimization steps: At each control moment, a comprehensive deviation index is calculated based on the sensor measured values ​​and the scheduling table predicted values; when the comprehensive deviation index exceeds a preset threshold, the current measured deviation is used as the initial state, and a quadratic programming problem is established and solved in the short time domain using the reduced-order linear deviation model, and the solution result is used to correct the current control command and update the scheduling command for subsequent time periods.

2. The offline optimized triggering control method for multi-energy complementary heating according to claim 1, characterized in that, In the offline construction step, three-dimensional feature vectors are extracted from the hourly meteorological data of each day. in, For the first The average daily temperature of the day For the first Total daily radiation, For the first Daily temperature difference; The K-means++ algorithm was used to cluster the feature vectors; the hourly meteorological time series of a typical day in each cluster was taken as the median of all time periods of all member days in that cluster; the number of clusters... Determined by the profile coefficient, the value range is: to .

3. The offline optimized triggering control method for multi-energy complementary heating according to claim 1 or 2, characterized in that, The global multi-objective optimization is solved using the NSGA-II algorithm. The optimization problem is: Among them, the objective function for daily operating costs Temperature comfort objective function In the formula, For grid electricity price, This is the equivalent degradation cost factor for the battery. This is the equivalent attenuation cost coefficient for the geothermal circulation pump. Mains power To control the time step, The lower limit of indoor temperature, This is the upper limit of indoor temperature; After obtaining the Pareto front, by weighted sum Select the compromise optimal solution, where , The constraints include electrical power balance, thermal power balance, building heat load constraints, upper and lower limits of energy storage state of charge, energy balance of hot water storage tank, geothermal heat exchanger constraints, and upper and lower limits of various control quantities.

4. The offline optimized triggering control method for multi-energy complementary heating according to claim 1, characterized in that, The reduced-order linear deviation model is obtained by using a typical daily optimized trajectory as the nominal trajectory. Define the deviation amount For nonlinear system models Perform a first-order Taylor expansion in the neighborhood of the nominal trajectory. Then, the state dimension is reduced to a balance truncation method. The reduced-order linear deviation model is obtained by retaining only two directly measurable state variables: indoor temperature and energy storage state of charge. in, This is a 2D bias output vector. ( ) is the deviation control vector, retaining only the key control variables that are adjustable online.

5. The offline optimized triggering control method for multi-energy complementary heating according to claim 1, characterized in that, In the online table scheduling step, the next day's weather forecast data and the cluster centers of each typical day are... The normalized Euclidean distance is calculated using the following formula: in, , , For the first Three-dimensional eigenvalues ​​of typical days, , , The historical standard deviations of the three characteristic dimensions—daily average temperature, total daily irradiance, and intraday temperature range—are taken as follows: As a typical day for matching.

6. The offline optimized triggering control method for multi-energy complementary heating according to claim 1, characterized in that, In the deviation-triggered re-optimization step, the comprehensive deviation index is... Calculate using the following formula: in, , , These are the measured values ​​for indoor temperature, solar irradiance, and energy storage state of charge, respectively. , , This corresponds to the predicted value in the scheduling table. To allow for temperature deviation bands, This refers to the operating range of the energy storage system in its state of charge. To prevent small constants from being divided by zero, , , These are the weighting coefficients.

7. The offline optimized triggering control method for multi-energy complementary heating according to claim 6, characterized in that, The preset threshold is taken ;when The solution to the quadratic programming problem is triggered at certain times, and a cooldown period is set after each trigger. Even if the deviation exceeds the limit again during the cooldown period, the problem will not be triggered again.

8. The offline optimized triggering control method for multi-energy complementary heating according to claim 7, characterized in that, The cooling period is set to Hour.

9. The offline optimized triggering control method for multi-energy complementary heating according to claim 1, characterized in that, The optimization time domain of the quadratic programming problem for Hour, decision variable dimension is ,in This refers to the number of online adjustable control variables.

10. The offline optimized triggering control method for multi-energy complementary heating according to claim 1, characterized in that, The control command It must include at least three of the following control variables: the proportion of photovoltaic direct heating power. Battery charging and discharging power Geothermal circulation pump flow rate Heat release power of hot water storage tank .