A method for monitoring and optimizing energy consumption of a building energy system
By constructing a causal structure model on edge computing nodes, the energy consumption monitoring of building energy management systems is optimized, solving the problem of misjudgment in energy consumption assessment in existing technologies, and realizing efficient and accurate energy-saving optimization and real-time control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI YUANCHUANGXIANG DIGITAL ECOLOGICAL TECHNOLOGY CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-19
AI Technical Summary
Existing building energy management systems struggle to accurately distinguish the true impact of external environmental changes on energy consumption from internal controls, leading to misjudgments in energy-saving optimization decisions. Furthermore, traditional control methods are inefficient in scenarios with unstable networks or limited bandwidth.
A causal structure model is used to perform data cleaning, dimension unification, time alignment and feature construction on edge computing nodes, determine the set of causal variables and update them online, infer the counterfactual baseline energy consumption and perform rolling correction, generate candidate intervention actions and perform constraint verification, optimize the target intervention actions and form a closed-loop energy consumption monitoring system.
It improves the interpretability and accuracy of energy-saving assessments, reduces the risk of control failures due to model mismatch, ensures the system's real-time monitoring and optimization capabilities in unstable network scenarios, and prevents loss of user comfort and frequent equipment start-ups and shutdowns.
Smart Images

Figure CN122242922A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology for building energy, and in particular to a method for monitoring and optimizing the energy consumption of a building energy system. Background Technology
[0002] Building energy systems typically include energy-consuming subsystems such as air conditioning and ventilation, cold and heat sources, transmission and distribution systems, lighting, and power distribution. As building size increases and equipment types expand, the operation of building energy systems (such as air conditioning, lighting, and power) exhibits characteristics of strong coupling, nonlinearity, and frequent fluctuations in operating conditions.
[0003] Currently, building energy management in existing technologies mainly relies on traditional PID control or rule-based logic control, which makes it difficult to distinguish the actual weight of the impact of external environment (such as weather changes) and internal control (such as setpoint adjustment) on energy consumption. This limitation of correlation rather than causation makes it difficult for the system to accurately infer the actual energy-saving contribution of intervention actions, which can easily lead to misjudgment.
[0004] Therefore, we propose an energy consumption monitoring and optimization method for building energy systems; the information disclosed above in the background section is only for enhancing the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for monitoring and optimizing the energy consumption of building energy systems, thereby solving the technical problems mentioned in the background section.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method for monitoring and optimizing the energy consumption of a building energy system includes the following steps:
[0008] S1. Collect multi-source operation data of building energy system, and complete data cleaning, unit unification, time alignment and feature construction on edge computing nodes to generate state sample set;
[0009] S2. Determine the set of causal variables based on the state sample set and construct a causal structure model. Update the causal structure model online and calculate the causal parameter set on the edge computing node.
[0010] S3. Construct counterfactual scenarios based on causal structure models and causal parameter sets, infer counterfactual baseline energy consumption and generate counterfactual baseline energy consumption sequences, and perform rolling correction on the counterfactual baseline energy consumption sequences;
[0011] S4. Generate a set of candidate intervention actions and perform constraint verification. Calculate the causal energy-saving contribution of each candidate intervention action based on the counterfactual baseline energy consumption sequence, determine the target intervention action, and output the execution parameters.
[0012] S5. Execute the target intervention action and collect multi-source operation data after execution, calculate the actual energy saving and feed it back to update the causal structure model and causal parameter set to form a closed-loop energy consumption monitoring and optimization.
[0013] S1 specifically includes:
[0014] Collect multi-source operation data and assign a unified timestamp and data source identifier to each multi-source operation data; perform missing value completion, outlier removal and unit unification on the multi-source operation data on the edge computing node to obtain cleaned multi-source operation data; perform resampling and time alignment on the cleaned multi-source operation data and perform feature construction to generate a state sample set to characterize the current operation condition.
[0015] S2 specifically includes:
[0016] Based on the state sample set, a set of causal variables is determined, including energy consumption measurement variables, environmental state variables, equipment operation state variables, and control command variables. Based on the set of causal variables, a causal structure model that satisfies directional constraints and acyclic constraints is constructed. On the edge computing node, a sliding window containing the L most recent sampling points is used to update the causal structure model online. Based on the forgetting factor, the window-estimated causal parameter set and the historical causal parameter set are smoothly fused to obtain the causal parameter set.
[0017] S3 specifically includes:
[0018] Based on the causal structure model and causal parameter set, and using the baseline control command, a counterfactual scenario without target intervention is defined; on the edge computing node, the counterfactual baseline energy consumption corresponding to the current operating condition is inferred based on the counterfactual scenario, and a counterfactual baseline energy consumption sequence is generated; on the edge computing node, the counterfactual baseline energy consumption sequence is rolled over based on the deviation between the actual energy consumption and the counterfactual baseline energy consumption, and the rolling over is only performed using data within the historical window before the target intervention was executed or within the stable window where no operating mode switch occurred.
[0019] S4 specifically includes:
[0020] A set of candidate intervention actions, including setpoint adjustment, operating mode switching, load distribution, and start / stop strategies, is generated on the edge computing node. Each candidate intervention action is constrained and verified based on comfort constraints and equipment safety constraints. For each candidate intervention action that passes the constraint verification, the causal energy-saving contribution is calculated based on the causal structure model, causal parameter set, and counterfactual baseline energy consumption. Under the premise of satisfying comfort constraints and equipment safety constraints, the target intervention action is determined and the execution parameters are output with the maximum comprehensive causal energy-saving contribution as the optimization criterion.
[0021] S5 specifically includes:
[0022] The edge computing node sends the control command data corresponding to the target intervention action to the control execution unit and receives the execution confirmation information, and establishes an action execution log including the effective timestamp and the duration of retention; it collects multi-source operation data after execution and calculates the actual energy consumption on the edge computing node, and compares the actual energy consumption with the counterfactual baseline energy consumption sequence in the evaluation window to obtain the actual energy saving and evaluation results; when the target intervention action is successfully confirmed, the comfort constraints and equipment safety constraints are met, and the actual energy saving meets the preset validity criteria, the actual energy saving and evaluation results are fed back to update the causal structure model and causal parameter set and generate the corresponding version number; otherwise, the evaluation results are recorded but the causal structure model and causal parameter set are not updated.
[0023] The beneficial effects of this invention are as follows:
[0024] This invention constructs a causal structural model to clearly distinguish between environmental state variables (confounding variables) and control command variables (intervention variables), and infers counterfactual baseline energy consumption by constructing counterfactual scenarios. This method can separate the "real energy-saving contribution brought about by control actions" from the "apparent energy consumption fluctuations caused by environmental changes," thereby avoiding misjudgments that may occur when making optimization decisions based solely on data correlation, and significantly improving the interpretability and accuracy of energy-saving assessments.
[0025] To address the frequent fluctuations in operating conditions and the time-varying performance of equipment in building energy systems, this invention employs a sliding window and a forgetting factor to update the causal parameter set online, and performs rolling correction on the counterfactual baseline energy consumption sequence based on actual deviations. This dual dynamic adjustment mechanism enables the system to adapt to seasonal changes, equipment aging, and changes in load patterns, effectively reducing the risk of control failure due to model mismatch and ensuring long-term operational stability.
[0026] This invention, after generating the intervention action, does not directly pursue mathematical optimization, but first performs rigorous verification of "comfort constraints" and "equipment safety constraints" (such as minimum start-stop interval, maximum adjustment rate, etc.). Simultaneously, strategies such as "minimum hold time" are introduced. This design effectively prevents sacrificing user comfort for energy saving or causing frequent start-stop oscillations in the equipment, ensuring the safe implementation of the optimization strategy in practical engineering.
[0027] Through end-to-end design, data cleaning, model inference, action generation, and closed-loop evaluation are all completed on edge computing nodes. This not only avoids the privacy risks and bandwidth pressure caused by uploading massive amounts of building data to the cloud, but also significantly reduces communication latency, ensuring that the system can maintain efficient real-time monitoring and optimization control capabilities even in scenarios with unstable networks or limited bandwidth.
[0028] This invention establishes a complete closed-loop feedback process: it not only records detailed action execution logs but also calculates actual energy savings within the evaluation window and sets strict "update gating conditions" (updating the model only when execution is confirmed to be successful and energy savings are effective). This mechanism can automatically filter invalid or abnormal intervention results, preventing erroneous data from contaminating the model, thereby achieving continuous self-evolution of model accuracy and traceability of optimization effects. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of an energy consumption monitoring and optimization method for a building energy system according to the present invention.
[0030] Figure 2 This is a schematic diagram of the interface of the energy consumption monitoring system according to an embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of the interface for configuring the sampling period and time alignment of data in an embodiment of the present invention;
[0032] Figure 4 This is a schematic diagram of the data source connection status monitoring interface according to an embodiment of the present invention;
[0033] Figure 5 This is a schematic diagram of the constraint satisfaction monitoring interface according to an embodiment of the present invention;
[0034] Figure 6 This is a schematic diagram of the data quality statistics interface in an embodiment of the present invention;
[0035] Figure 7 This is a schematic diagram of the candidate intervention action list interface in an embodiment of the present invention;
[0036] Figure 8 This is a schematic diagram of the rolling correction parameter setting interface according to an embodiment of the present invention;
[0037] Figure 9This is a schematic diagram of the real-time energy consumption trend curve in an embodiment of the present invention. Detailed Implementation
[0038] 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.
[0039] Example 1: As Figure 1 As shown in the figure, this embodiment provides a method for monitoring and optimizing the energy consumption of a building energy system, including the following steps:
[0040] S1. Collect multi-source operation data of building energy systems, and complete data cleaning, dimension unification, time alignment and feature construction on edge computing nodes to generate state sample sets.
[0041] S2. Based on the state sample set, determine the causal variable set and construct the causal structure model. Update the causal structure model online and calculate the causal parameter set on the edge computing node.
[0042] S3. Construct counterfactual scenarios based on causal structure models and causal parameter sets, infer counterfactual baseline energy consumption and generate counterfactual baseline energy consumption sequences, and perform rolling correction on the counterfactual baseline energy consumption sequences.
[0043] S4. Generate a set of candidate intervention actions and perform constraint verification. Calculate the causal energy-saving contribution of each candidate intervention action based on the counterfactual baseline energy consumption sequence, determine the target intervention action, and output the execution parameters.
[0044] S5. Execute the target intervention action and collect multi-source operation data after execution, calculate the actual energy saving and feed it back to update the causal structure model and causal parameter set to form a closed-loop energy consumption monitoring and optimization.
[0045] S1 specifically includes the following sub-steps:
[0046] S110. Collect multi-source operational data and establish a unified timestamp and source identifier: Collect multi-source operational data in the building energy system. The multi-source operational data includes at least energy metering data, environmental status data, equipment operation status data, and control command data. Among them, the energy metering data includes at least one or more of the following: total building power, building sub-circuit power, and energy consumption increment per unit time; the environmental status data includes at least one or more of the following: outdoor temperature, outdoor humidity, indoor temperature, indoor humidity, and estimated number of occupants; the equipment operation status data includes at least one or more of the following: key equipment switch status, key equipment frequency or speed, valve opening, supply and return water temperature, and supply and return water flow; the control command data includes at least one or more of the following: set temperature, operation mode command, and start / stop command. Assign a unified timestamp and data source identifier to each multi-source operational data, and record it on the edge computing node using a unified clock as the alignment reference.
[0047] The sampling period for multi-source operational data is set to 1 to 60 seconds. When the sampling periods of different data sources are inconsistent, resampling and alignment are performed on each data source using a unified clock on the edge computing nodes, and the alignment error is limited to a preset threshold range. The edge computing nodes can be embedded industrial control computers or intelligent gateways, and the hardware configuration includes at least a multi-core ARM or x86 architecture processor, no less than 4GB of running memory, and an NPU or GPU acceleration unit that supports tensor computation. The operating system adopts a Linux real-time kernel to meet the computing power requirements for online updates of causal structure models and counterfactual inference.
[0048] During data collection, the corresponding communication protocol driver is loaded through the adapter for different device types. Modbus-RTU or Modbus-TCP protocol is used for electricity meters and cold / heat source devices, BACnet / IP protocol is used for air conditioning terminal controllers, and MQTT or CoAP protocol is used for environmental sensor networks. The original messages of different protocols are parsed into unified JSON format key-value pairs.
[0049] S120. Perform data cleaning and dimensional consistency processing on edge computing nodes: Perform data cleaning processing on multi-source operational data on edge computing nodes. Data cleaning processing includes at least missing value completion, outlier removal, and dimensional consistency to obtain cleaned multi-source operational data. Specifically, when the missing duration of a single variable does not exceed a preset window, linear interpolation is used for missing value completion; when the missing duration of a single variable exceeds the preset window, the most recent valid value is retained or an estimated value based on the relationship between similar variables is used for missing value completion. A missing flag is set for the completed samples; outlier removal includes at least physical boundary judgment and jump judgment. Physical boundary judgment restricts variable values to the range of equipment design boundaries. Variable values that exceed the range of equipment design boundaries are judged as outliers and removed or replaced. Jump judgment judges that when the difference between variables of adjacent sampling points exceeds a preset threshold, they are judged as outliers and removed or replaced. Dimensional unification includes at least unifying the dimension of temperature to degrees Celsius, the dimension of power to kilowatts, the dimension of energy to kilowatt-hours, and the dimension of flow rate to cubic meters per hour.
[0050] Furthermore, to reduce the impact of different units and numerical ranges on subsequent feature construction, at least some variables in the cleaned multi-source operational data are standardized. The standardization process satisfies the following formula: Where x is the value of the cleaned variable. For the standardized variable values, The mean of the variable within the sliding time window. Let be the standard deviation of the variable within the sliding time window.
[0051] S130. Perform time alignment and feature construction to generate a state sample set: Perform time alignment and feature construction on the cleaned multi-source operating data on the edge computing node to generate a state sample set; wherein, time alignment includes resampling data from different sampling periods to a unified sampling period, and aligning energy metering data, environmental status data, equipment operating status data, and control command data into feature vectors at the same moment based on a unified timestamp; feature construction includes at least instantaneous features and trend features, instantaneous features include at least one or more of the following: current power, current indoor temperature and humidity, current equipment on / off status, and current set temperature, and trend features include at least the moving average power; the moving average power satisfies the following formula:
[0052]
[0053] in, Let be the power at time t. Let be the moving average power at time t, N be the length of the sliding window (set to 3 to 12 sampling points), and i be the backtracking index of the sampling points within the window.
[0054] The state sample set is used to characterize the current operating conditions, and each state sample in the state sample set contains at least: aligned energy consumption metering characteristics, environmental state characteristics, equipment operating state characteristics, control command characteristics, timestamps, and missing flag bits, thereby providing candidate variable values for the causal variable set for subsequent causal structure model construction.
[0055] S2 specifically includes the following sub-steps:
[0056] S210. Determine the set of causal variables based on the state sample set: Determine the set of causal variables based on the state sample set generated in S130. The set of causal variables includes at least energy consumption measurement variables, environmental state variables, equipment operation state variables, and control command variables. Among them, energy consumption measurement variables are used as outcome variables to characterize the energy consumption level of the building energy system, control command variables are used as intervention variables to generate and evaluate control actions in the subsequent candidate intervention action set, and environmental state variables and occupancy-related variables are used as confounding variables to reduce the interference of external environmental changes on causal inference.
[0057] Furthermore, the determination of the causal variable set should at least satisfy the following rules: prioritize the selection of variables in the key energy-consuming loops and their upstream control links corresponding to the outcome variables as candidate variables, and include environmental state variables and occupancy-related variables that have a working condition coupling relationship with the candidate variables into the causal variable set, thereby ensuring that the causal variable set covers the main sources affecting the outcome variables.
[0058] S220. Construct a causal structure model and form causal relationship constraints: Construct a causal structure model based on the set of causal variables. The causal structure model uses directed relations to describe the causal relationships between the sets of causal variables and forms causal relationship constraints. Among them, the causal relationship constraints include at least directional constraints and acyclic constraints. The directional constraints include at least the directional constraints of "control command variables affecting equipment operating state variables, equipment operating state variables affecting energy consumption metering variables, and environmental state variables affecting equipment operating state variables or energy consumption metering variables". The acyclic constraints are used to ensure that there are no causal closed loops in the causal structure model.
[0059] Furthermore, the construction of the causal structure model includes at least the following steps: scoring candidate causal relationships based on the state sample set to obtain a set of candidate directed edges; eliminating candidate directed edges with conflicting directions based on directional constraints; when the set of candidate directed edges forms a loop, deleting candidate directed edges in order of increasing score until the loop-free constraint is satisfied; when there are bidirectional candidate directed edges for the same pair of variables, retaining the one-way candidate directed edge that satisfies the directional constraint and deleting the other-way candidate directed edge, thereby obtaining a causal structure model that satisfies the causal relationship constraints.
[0060] Specifically, the Bayesian Information Criterion (BIC) or the Akaike Information Criterion (AIC) can be used as scoring functions to score candidate causal relationships. The BIC scoring formula is as follows:
[0061]
[0062] Where L is the model likelihood function, k is the number of parameters, and n is the number of samples; furthermore, the algorithm for constructing the causal structure model can employ a score-based greedy equivalence search algorithm (GES) or a PC algorithm (Peter-Clark Algorithm). For example, when using the GES algorithm, a forward phase is first executed to add directed edges to improve the BIC score, and then a backward phase is executed to delete directed edges to further optimize the BIC score, until the score no longer improves and the acyclic constraint is satisfied.
[0063] Considering the computing power limitations of edge computing nodes, a maximum parent node number constraint (e.g., limiting the maximum number of parent nodes per node to no more than 5) and a search depth constraint are introduced when executing the GES or PC algorithm. Causal direction search is only performed on variable pairs whose absolute correlation coefficient is greater than a preset correlation threshold (e.g., 0.3), thereby controlling the time complexity of the algorithm to the polynomial level and ensuring the real-time nature of online updates.
[0064] S230. Online update of the causal structure model and calculation of the causal parameter set on the edge computing node: The causal structure model is updated online on the edge computing node based on the latest collected state sample set, and the causal parameter set corresponding to the updated causal structure model is calculated to ensure that the causal parameter set is consistent with the current operating conditions; wherein, the online update adopts a sliding window mechanism, the sliding window contains the state samples corresponding to the most recent N sampling points, and N is the number of sampling points in the sliding window; an online update is triggered when the preset update time interval is reached or the model consistency test fails.
[0065] Furthermore, after each online update is triggered, the parameters of each directed causal relationship in the causal structure model are estimated based on the state sample set within the sliding window to obtain the window estimated causal parameter set. The window estimated causal parameter set is then smoothly fused with the historical causal parameter set to obtain the updated causal parameter set.
[0066] Where θ is the set of historical causal parameters. Estimate the causal parameter set for the window. The forgetting factor, with values greater than 0 and less than 1, is used to balance the historical causal parameter set with the windowed estimated causal parameter set. The updated causal parameter set satisfies the following formula:
[0067]
[0068] Through the above online update process, the causal structure model and causal parameter set are adaptively updated as the operating conditions change, thereby providing a consistent causal inference basis for the subsequent construction of counterfactual baseline energy consumption.
[0069] Specifically, parameter estimation of directed causal relationships in a causal structure model based on a set of state samples within a sliding window can be achieved using either recursive least squares (RLS) or stochastic gradient descent (SGD). For example, when the energy consumption inference function is a linear model, least squares can be used to solve for the parameter estimates within the window. To make it satisfy the objective function Minimize, where The actual observed values within the window. Here are the model predictions, where This is the sum of squared prediction errors.
[0070] S3 specifically includes the following sub-steps:
[0071] S310. Define counterfactual scenarios based on causal structure models and causal parameter sets: Based on the causal structure model obtained in S220 and the causal parameter set obtained in S230, define a counterfactual scenario of "no target intervention action is applied"; wherein, the counterfactual scenario constrains the control instruction variables through baseline control instructions. The baseline control instructions are the control instructions for the most recent stable period before the target intervention action is determined. The stable period is the period in which the control instruction variables do not switch operating modes within multiple consecutive sampling points and the changes in the set value do not exceed the preset threshold.
[0072] Furthermore, to ensure that the counterfactual scenario is consistent with the current operating condition, the environmental state variables and occupancy-related variables in the counterfactual scenario are taken as observations at the same timestamp as the current operating condition. The equipment operating state variables in the counterfactual scenario are inferred by the causal structure model under the action of the baseline control command, thereby avoiding the replacement of the equipment operating state variables after the execution of the target intervention action with the equipment operating state variables of the counterfactual scenario.
[0073] S320. Inferring Counterfactual Baseline Energy Consumption and Generating a Counterfactual Baseline Energy Consumption Sequence on Edge Computing Nodes: On edge computing nodes, for each sampling moment under a unified sampling period, the counterfactual baseline energy consumption corresponding to the current operating condition is inferred based on the causal structure model and causal parameter set, resulting in a counterfactual baseline energy consumption sequence consistent with the unified sampling period. During inference, environmental state variables and occupancy-related variables are taken from the observed values at that sampling moment, control command variables are taken from the baseline control command, and the equipment operating state variables are inferred from the causal structure model under the constraints of the baseline control command, thereby obtaining the counterfactual baseline energy consumption. Further, the counterfactual baseline energy consumption satisfies the following expression:
[0074]
[0075] Where t is the time index. Let be the counterfactual baseline energy consumption at time t. The energy consumption inference function is determined by the causal structure model. For causal parameter set.
[0076] Specifically, energy consumption inference function It can be constructed based on a linear structural equation model (Linear SEM), and its mathematical expression is as follows:
[0077]
[0078] in, Calculate the energy consumption value for the model at time t. These are the weight coefficients corresponding to the causal parameter set. These are the values of the parent node variables (including environmental state variables, equipment operating state variables, etc.) at time t. This is the error term. Alternatively, it could be the energy consumption inference function. Nonlinear models such as multilayer perceptron (MLP) or Gaussian process regression (GPR) can also be used for fitting to adapt to the nonlinear characteristics of building energy consumption.
[0079] S330. Perform rolling correction on the counterfactual baseline energy consumption sequence at edge computing nodes: Perform rolling correction on the counterfactual baseline energy consumption sequence at edge computing nodes. The rolling correction is based on the deviation between the actual energy consumption and the counterfactual baseline energy consumption to reduce the counterfactual baseline energy consumption deviation caused by model uncertainty and operating condition disturbances. The triggering conditions for rolling correction include at least reaching a preset correction period or the model consistency test error continuously exceeding a preset threshold. Rolling correction only uses data from the historical window before the target intervention action or from a stable window where no operating mode switch has occurred, to avoid absorbing the energy consumption changes brought about by the target intervention action into the counterfactual baseline energy consumption sequence. Further, the rolling correction satisfies the following formula:
[0080]
[0081] in, The actual energy consumption at time t. The correction coefficient has a value range of greater than 0 and less than 1, and is used to control the rolling correction amplitude; the meanings of the other symbols are the same as those mentioned above.
[0082] In practical implementation, for water systems with high thermal inertia, the correction factor... A value of 0.05 to 0.15 is recommended to smooth out short-term fluctuations; for fast-responding electrical lighting systems, the correction factor should be... A value of 0.2 to 0.4 is recommended for quick tracking of baseline drift.
[0083] S4 specifically includes the following sub-steps:
[0084] S410: Generate a set of candidate intervention actions on the edge computing node and perform constraint verification. Generate a set of candidate intervention actions on the edge computing node. The set of candidate intervention actions includes at least one or more of the following: setpoint adjustment, operating mode switching, load distribution, and start / stop strategy. Specifically, for setpoint adjustment, multiple candidate setpoints are generated by enumerating upwards and downwards with the current setpoint as the center according to a preset step size, and each candidate setpoint is mapped to a corresponding candidate intervention action. For operating mode switching, candidate operating mode switching actions are allowed to be generated only when the environmental state variables or occupancy-related variables meet preset conditions. For load distribution and start / stop strategy, candidate combinations are generated according to the number of devices, device priority, and minimum runtime rules, and candidate combinations that violate the minimum start / stop interval rule are eliminated, thereby forming a set of candidate intervention actions.
[0085] Furthermore, to ensure the executableness of candidate intervention actions, an executable boundary is defined for each candidate intervention action in the candidate intervention action set on the edge computing node, and constraint verification is performed. Among them, the executable boundary includes at least comfort constraints and equipment safety constraints. The comfort constraints are determined by the allowable range of indoor temperature, indoor humidity, and occupancy-related indicators. The equipment safety constraints are determined by the equipment design boundary range, which includes at least the upper and lower limits of key equipment frequency or speed, valve opening upper and lower limits, supply and return water temperature upper and lower limits, maximum adjustment rate, minimum start-stop interval, and minimum hold time. Candidate intervention actions that fail the constraint verification will not enter the subsequent causal energy-saving contribution calculation steps.
[0086] For example, for the air conditioner set temperature, the preset step size is set to 0.5℃ or 1.0℃, and the enumeration range is the current set value ±2℃; for the fresh air unit frequency, the preset step size is set to 2Hz, and the enumeration range is 30Hz to 50Hz.
[0087] S420: Calculating Causal Energy Saving Contribution Based on Causal Structure Model, Causal Parameter Set, and Counterfactual Baseline Energy Consumption: On the edge computing node, for each candidate intervention action in the set of candidate intervention actions that have passed constraint verification, the causal energy saving contribution is calculated based on the causal structure model, causal parameter set, and counterfactual baseline energy consumption. Specifically, at each sampling time, the control command variable is set to the control command value corresponding to the candidate intervention action, and the environmental state variable and occupancy-related variable are taken as the observed values at that sampling time. Under the constraints of the candidate intervention action, the causal structure model infers the equipment operating state variable, and then infers the predicted energy consumption under that candidate intervention action. The predicted energy consumption is compared with the counterfactual baseline energy consumption at the same sampling time to obtain the causal energy saving contribution corresponding to that sampling time. If necessary, the causal energy saving contributions of multiple consecutive sampling times are accumulated or averaged to obtain the comprehensive causal energy saving contribution of the candidate intervention action. Further, the predicted energy consumption and the causal energy saving contribution satisfy the following formula:
[0088]
[0089]
[0090] Where t is the time index and a is the candidate intervention action. Let be the predicted energy consumption at time t when candidate intervention action a is applied. The sign for difference represents "difference". Let t be the causal energy-saving contribution of candidate intervention action a. Let be the counterfactual baseline energy consumption at time t. The energy consumption inference function is determined by the causal structure model. For causal parameter set.
[0091] S430. Determine the target intervention action and output execution parameters under the premise of satisfying constraints: Under the premise of satisfying comfort constraints and equipment safety constraints, the target intervention action is determined from the candidate intervention action set with the maximum comprehensive causal energy saving contribution as the optimization criterion, and the execution parameters corresponding to the target intervention action are output; Among them, when the comprehensive causal energy saving contributions of multiple candidate intervention actions are the same or the differences are not significant, the candidate intervention action with the smallest change with the current control command variable is selected as the target intervention action, and a minimum holding time or minimum switching interval is set. The new target intervention action is not switched before the minimum holding time or minimum switching interval is reached, so as to suppress the instability and equipment wear caused by frequent switching.
[0092] Furthermore, the execution parameters include at least the target setpoint, target operating mode, target start-stop combination, target load distribution ratio, and the effective timestamp and duration of the target intervention action. The edge computing node converts the execution parameters into control command data and sends them to the control execution unit of the building energy system for execution, thereby providing consistent action input for subsequent execution evaluation and closed-loop update.
[0093] S5 specifically includes the following sub-steps:
[0094] S510, Execute the target intervention action and collect multi-source operation data after execution: Execute the target intervention action determined in S430. The edge computing node converts the execution parameters corresponding to the target intervention action into control command data and sends it to the control execution unit of the building energy system for execution. After receiving the control command data, the control execution unit returns execution confirmation information. The edge computing node receives the execution confirmation information within the preset confirmation time limit to confirm that the target intervention action has taken effect. When no execution confirmation information is received within the preset confirmation time limit, a rollback mechanism is triggered to restore the control command variables to the baseline control command or the most recent stable control command, and the rollback reason is recorded.
[0095] Furthermore, to ensure traceability, an action execution log is established for each target intervention action. The action execution log includes at least the target intervention action, execution parameters, the effective timestamp of the target intervention action, the duration of the action, execution confirmation information, and the monitoring results of comfort constraints and equipment safety constraints during the execution period. After the target intervention action takes effect, multi-source operational data is continuously collected. The multi-source operational data after execution adopts the unified timestamp and data source identification rules of S110, as well as the data cleaning and dimension unification rules of S120 and the time alignment rules of S130, thereby ensuring that the multi-source operational data after execution corresponds to the counterfactual baseline energy consumption sequence at each time step under a unified sampling period.
[0096] S520. Calculate actual energy consumption and obtain actual energy savings and evaluation results: Calculate actual energy consumption on the edge computing node based on multi-source operation data after execution, and calculate the difference between actual energy consumption and counterfactual baseline energy consumption within the evaluation window to obtain actual energy savings; wherein, the evaluation window is a continuous sampling interval after the target intervention action takes effect. In order to reduce the impact of the delay effect caused by building thermal inertia and equipment response inertia, an evaluation start delay is set within the evaluation window. The evaluation start delay is the delay interval after passing through a number of sampling points from the effective timestamp to start energy consumption comparison calculation.
[0097] Furthermore, the actual energy consumption within the evaluation window satisfies the following formula:
[0098]
[0099] in, To assess the actual energy consumption within the window, Let be the power at time t, where t is the time index. This represents the sampling time interval.
[0100] Within the same assessment window, the actual energy consumption is compared with the counterfactual baseline energy consumption to obtain the actual energy savings, and assessment results are generated. The assessment results include at least the actual energy savings, the satisfaction of comfort constraints, the satisfaction of equipment safety constraints, and the proportion of abnormal samples.
[0101] S530. Closed-loop feedback update based on actual energy saving and evaluation results: Feed the actual energy saving and evaluation results back to the online update process of the causal structure model and causal parameter set to correct the causal relationship constraints and causal parameter set in the causal structure model, thereby forming a closed-loop energy consumption monitoring and optimization.
[0102] Updates are performed only when the following update gating conditions are met: the target intervention action is successfully confirmed, comfort constraints and equipment safety constraints are met within the evaluation window, and the actual energy saving meets the preset validity criteria. When the update gating conditions are not met, the evaluation results are recorded but the causal structure model and causal parameter set are not updated.
[0103] Furthermore, each update generates a version number for the causal structure model and causal parameter set, and saves key statistics and evaluation results before and after the update to support backtracking. When updating the causal structure model, local adjustments are made under the premise of satisfying directional constraints and acyclic constraints. The causal parameter set update follows the online update mechanism of S230, and the observation records of the control command variables corresponding to the current target intervention action are included in the estimation to reduce the risk of misabsorbing the impact of the target intervention action as environmental drift.
[0104] Example 2: This example provides an energy consumption monitoring and optimization system for a building energy system, including:
[0105] The data acquisition unit is used to collect multi-source operational data of the building energy system. The multi-source operational data includes at least energy metering data, environmental status data, equipment operating status data and control command data, and assigns a unified timestamp and data source identifier to the multi-source operational data.
[0106] An edge computing node, communicatively connected to a data acquisition unit, includes a processor, memory, and program instructions deployed in the memory. When executed by the processor, the program instructions are used for:
[0107] Perform data cleaning, unit unification, time alignment, and feature construction on multi-source operational data to generate a state sample set;
[0108] The set of causal variables is determined based on the state sample set, and a causal structure model that satisfies the directional constraint and the acyclic constraint is constructed. The causal structure model is then updated online to obtain the causal parameter set.
[0109] Based on the causal structure model and causal parameter set, a counterfactual scenario without target intervention is defined. The counterfactual baseline energy consumption is inferred and a counterfactual baseline energy consumption sequence is generated. The counterfactual baseline energy consumption sequence is then rolled over for correction.
[0110] A set of candidate intervention actions is generated and constrained based on comfort constraints and equipment safety constraints. The causal energy-saving contribution of the candidate intervention actions that pass the constraint verification is calculated, and the target intervention action and its execution parameters are determined by taking the maximum comprehensive causal energy-saving contribution as the optimization criterion.
[0111] After the target intervention action is executed, the actual energy consumption is calculated, and the actual energy saving and evaluation results are obtained based on the difference between the actual energy consumption and the counterfactual baseline energy consumption sequence within the evaluation window.
[0112] When the update gating condition is met, the actual energy saving and evaluation results are fed back to update the causal structure model and causal parameter set and generate the corresponding version number. When the update gating condition is not met, the evaluation results are recorded but the causal structure model and causal parameter set are not updated.
[0113] The control execution unit is connected to the edge computing node and is used to receive control command data issued by the edge computing node, execute the target intervention action, and return execution confirmation information to the edge computing node.
[0114] The action recording unit is used to establish an action execution log. The action execution log includes at least the target intervention action, execution parameters, effective timestamp, duration, execution confirmation information, and monitoring results of comfort constraints and equipment safety constraints during the execution period.
[0115] Figure 2 Used to display real-time energy consumption indicators, environmental status indicators, and system timestamp information under a unified sampling period;
[0116] Figure 3 Used to configure the unified sampling period, data source time alignment strategy, outlier detection rules, and missing value interpolation rules;
[0117] Figure 4 Used to display the communication protocol type, connection status, last heartbeat time, and data access rate of different data sources;
[0118] Figure 5 Used to display the satisfaction status of various constraints and the statistical results of over-limit events;
[0119] Figure 6Used to calculate the missing rate, number of outliers, and corresponding data processing methods for each data point;
[0120] Figure 7 This is used to display the action description, affected equipment, constraint verification results, and estimated energy savings for each candidate intervention action;
[0121] Figure 8 Used to configure calibration cycle, environmental impact weight, and operating mode calibration parameters;
[0122] Figure 9 The solid line represents the actual energy consumption.
[0123] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0124] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0125] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for monitoring and optimizing energy consumption of a building energy system, characterized in that, Includes the following steps: S1. Collect multi-source operation data of building energy systems, and complete data cleaning, dimension unification, time alignment and feature construction on edge computing nodes to generate state sample sets. 2.S2. Based on the state sample set, determine the causal variable set and construct the causal structure model. On the edge computing node, update the causal structure model online and calculate the causal parameter set. 3.S3. Construct counterfactual scenarios based on causal structure models and causal parameter sets, infer counterfactual baseline energy consumption and generate counterfactual baseline energy consumption sequences, and perform rolling correction on the counterfactual baseline energy consumption sequences. 4.S4. Generate a set of candidate intervention actions and perform constraint verification. Calculate the causal energy-saving contribution of each candidate intervention action based on the counterfactual baseline energy consumption sequence, determine the target intervention action, and output the execution parameters.
5. The method of claim 1, wherein, Also includes: S5. Execute the target intervention action and collect multi-source operation data after execution, calculate the actual energy saving and feed it back to update the causal structure model and causal parameter set to form a closed-loop energy consumption monitoring and optimization.
6. The method of claim 1, wherein, S1 specifically includes: Collect multi-source operational data and assign a unified timestamp and data source identifier to each piece of multi-source operational data; perform missing value completion, outlier removal and unit unification on the multi-source operational data on edge computing nodes to obtain cleaned multi-source operational data; The cleaned multi-source operational data is resampled and time-aligned, and features are constructed to generate a state sample set that characterizes the current operating conditions.
7. The method of claim 1, wherein the building energy system is a building energy management system. S2 specifically includes: Based on the state sample set, a set of causal variables is determined, including energy consumption measurement variables, environmental state variables, equipment operating state variables, and control command variables; based on the set of causal variables, a causal structure model that satisfies directional constraints and acyclic constraints is constructed. On edge computing nodes, a sliding window containing the most recent N sampling points is used to update the causal structure model online, and the window-estimated causal parameter set and the historical causal parameter set are smoothly fused based on the forgetting factor to obtain the causal parameter set.
8. The method of claim 1, wherein the building energy system is a building energy management system. S3 specifically includes: Based on the causal structure model and causal parameter set, and using the baseline control command, a counterfactual scenario without target intervention is defined; on the edge computing node, the counterfactual baseline energy consumption corresponding to the current operating condition is inferred based on the counterfactual scenario, and a counterfactual baseline energy consumption sequence is generated. On edge computing nodes, rolling correction is performed on the counterfactual baseline energy consumption sequence based on the deviation between the actual energy consumption and the counterfactual baseline energy consumption. The rolling correction is performed only using data from the historical window before the target intervention action was executed or from the stable window where no operating mode switch occurred.
9. The method of claim 1, wherein, S4 specifically includes: A set of candidate intervention actions, including setpoint adjustment, operation mode switching, load distribution and start-stop strategies, is generated on the edge computing node. Each candidate intervention action is constrained and verified based on comfort constraints and equipment safety constraints. For each candidate intervention action that passes the constraint verification, the causal energy saving contribution is calculated based on the causal structure model, causal parameter set and counterfactual baseline energy consumption.
10. The method of claim 6, wherein the building energy system is a building energy management system. Under the premise of satisfying comfort constraints and equipment safety constraints, the target intervention action is determined and the execution parameters are output based on the optimization criterion of maximizing the comprehensive causal energy-saving contribution.
11. The method of claim 2, wherein the building energy system is a building energy management system. S5 specifically includes: The edge computing node sends the control command data corresponding to the target intervention action to the control execution unit and receives the execution confirmation information, and establishes an action execution log including the effective timestamp and the duration of retention; collects multi-source operation data after execution and calculates the actual energy consumption on the edge computing node; compares the actual energy consumption with the counterfactual baseline energy consumption sequence within the evaluation window to obtain the actual energy saving and evaluation results.
12. The method of claim 8, wherein the building energy system is a building energy management system. When the target intervention action is successfully executed and the comfort constraints and equipment safety constraints are met, and the actual energy saving meets the preset validity criteria, the actual energy saving and evaluation results are fed back to update the causal structure model and causal parameter set and generate the corresponding version number; otherwise, the evaluation results are recorded but the causal structure model and causal parameter set are not updated.