This application relates in general to energy conservation and occupant comfort satisfaction, and in particular, to a system and method for modeling, parameter estimation and adaptive control of building heating, ventilation and air conditioning (HVAC) system with the aid of a digital computer.
Buildings are responsible for about 40% of the overall energy consumption in the US. Almost half of this amount is due to heating, ventilation and air-conditioning (HVAC). Accordingly, achieving an optimal control of building HVAC systems has the potential to significantly reduce power consumption while providing, and/or improving, occupant satisfaction and comfort. As extreme weather occurrences become more common in the United States and abroad, and building occupants depend more and more on HVAC systems to insulate themselves from such occurrences, managing the performance and energy consumption associated with HVAC systems becomes of prime importance to protect the individuals by maintaining performance and reducing the downstream potential negative effects on power grid associated with HVAC system-related excessive power usage, as well as financial and environmental effects of suboptimal power consumption.
Recently, predictive control techniques, and in particular Model Predictive Control (MPC), have gained popularity among in the research community towards an optimal control of HVAC. Multiple simulation studies alongside few limited field studies have already shown MPC potential in saving energy (anywhere from 15-65% savings) mostly leveraging pre-cooling and pre-heating via set point optimization, considering multiple future scenarios and picking one that best serves the objectives of the building control problem. These methods specifically have the upper hand in comparison with legacy controllers (most of which are rule based and/or PID systems) in that they are forward looking as opposed to reactive building controllers. However, models needed for such methods are a bottleneck to their cost effective implementation as they are estimated to cost 70% of the labor needed to setup MPC for a building, as described by Atam et al. “Control-oriented thermal modeling of multizone buildings: methods and issues: intelligent control of a building system.” IEEE Control systems magazine 36, no. 3 (2016): 86-111, the disclosure of which is incorporated by reference. The greatest challenge the use of MPC faces in the building control domain is the lack of a reliable mathematical model of the building and the building's HVAC heat transfer dynamics that can be integrated to accurately predict the variables of interest, such as temperature and humidity, for a control horizon of interest. In particular, a good model must realize accurate temperature and humidity predictions into the horizon of interest (>30 minutes). Advanced control algorithms can then use such predictions to provide control input for HVAC system that tracks desired temperature and humidity setpoints to guarantee comfort for the occupants and reduce the overall power consumption, and by extension carbon footprint, of buildings.
Existing mathematical models used for MPC-based building energy control are cumbersome to setup, hard to calibrate and lacking in accuracy. For example, the most popular choice, i.e., physics-based “white-box” model is often synonymous with a nodal characterization of a room, a wall, or loads (such as internal occupancy or equipment gains, and heating or cooling system loads). In this approach, solving the thermal transfer equations is the equivalent of solving a large system of ordinary differential equations (ODEs). This particular approach is well suited for an approximation of the energy consumption along with modeling the space-averaged temperature of a room. TrnSys™ distributed by Thermal Energy System Specialists, LLC of Madison, WI; EnergyPlus® developed under funding of U.S. department of energy; IDA-ICE distributed by EQUA Simulation AB of Sweden, and ESP-r created by University of Strathclyde are just a handful of software that use the nodal approach for building simulations. The models employed by all of these software need various input parameters such as meteorological data, geometrical data, thermo-physical variables or else occupancy, equipment scenario, and a 3D model of a building. As a result, initializing such models for multi-zone buildings can often be a very tedious task that involves many hours of labor for Building Energy Model (BEM) technicians. Also, the models need to be calibrated to historical data. However, a well-known problem is that BEM calibration can be often highly parameterized and under-determined (especially if performed on coarse energy billing data). In addition, the modeling approach makes certain simplifications to reduce the complexity of the thermal mechanisms which in turn introduces additional modeling uncertainty. These uncertainties eventually lead to a real difficulty in evaluating the degree of accuracy of the models that are further disturbed by stochastic inputs such as weather and occupancy.
Therefore, there is a need for an easy to deploy a modeling framework that can be used for controlling building HVAC systems via model predictive control.
The system and method disclosed below address many of the shortcomings of existing technology. Given metadata regarding a building, such as floor plan and room dimensions, and time series of environmental conditions within the building or associated with the HVAC system within the building (that may include but are not limited to both indoor and outdoor building air temperature and humidity, solar irradiance, azimuth, etc., as well as HVAC system level data such as inlet and outlet water temperatures for heating and cooling coils that are part of a water based HVAC system, temperature, humidity, and airflow of supply air etc.,) and other measured thermal loads such as occupancy, the system and method initializes a base model using the geometric data, the time series, and HVAC system information. The base model can be a lumped element model, specifically a simplified heat transfer ODE, representing the effect of ambient condition, disturbances such as occupant heat load, solar irradiance, other weather effects and stochastic terms, and control system on the rate of change of the quantities of interest (QoIs) such as one or more zone temperature and humidity. Model parameters are identified through online parameter estimation to fit the model output to the noisy measured variables. Specifically, online parameter estimation is formulated as a Moving Horizon Estimation (MHE). The model is then used for MPC-based energy-efficient and comfort-oriented control of the building environment, regulating QoIs such as temperature and humidity, and generating solutions fast enough for real-time implementation of optimization based predictive building controls.
In one embodiment, a system and method for modeling, parameter estimation and adaptive control of building heating, ventilation, and air conditioning (HVAC) system in built environments with the aid of a digital computer are provided. Data regarding a plurality of zones in a building and data regarding an HVAC system of the building is obtained. A reduced order model for building heat transfer dynamics is stood up using the zone data and the HVAC system data, the reduced order model including two differentiable lumped element physics-based modules, each of the modules a differentiable lumped element physics-based model, each of the models including a plurality of model parameters, state variables, and corresponding constraints on all parameters and variables. Using the reduced order model the physics of heat transfer inside the building envelope, between the building and the outside environment, and within the HVAC system is modeled, wherein the reduced order model represents a rate of change for model states, each model state including one or more quantities of interest (QoIs), each of the QoIs including one or more of the environmental conditions in one or more zones of the building and conditions of one or more of the states of interest for the HVAC system. A plurality of time series is continuously obtained, each time series including a plurality of data points, each data point including one of the QoIs measured at a one of a plurality of time points using the obtained data points in an end-to-end sequential recursive parameter estimation and control algorithm, including: using moving horizon estimation (MHE), a recursive estimation technique for a finite length sliding window, to estimate parameters and states of the reduced order model by solving a linear or nonlinear constrained optimization problem to calibrate the reduced order model parameters and minimize a discrepancy between last Mpast points of the measured QoIs, where Mpast is a predefined size of the window, and equivalent model predictions for the same window such that the solution adheres to a feasible set of model dynamics and constraints; obtaining targets including desired environmental conditions within one or more of the zones within the building and desired operating conditions of the HVAC system at a future time; obtaining data regarding one or more of the environmental conditions outside the building and building occupancy data at the future time; and solving a further linear or nonlinear constrained optimization problem that minimizes energy consumption of the HVAC system while satisfying all of the model dynamics and constraint for a predefined future window of size Mfuture and determining a control sequence for the mentioned window; and taking the solution of the further optimization for an immediate time step and applying that solution as a control input for one or more actuators of the HVAC system, wherein the HVAC system operates based on the control input. While the time series are being continuously obtained, for data points measured at each of the subsequent time points, shifting the finite length sliding window and the predefined future window one step into the future, and repeating the recursive parameter estimation and control algorithm, wherein the steps are performed by a suitably-programmed computer.
In a further embodiment, a system and method for modeling, parameter estimation and adaptive control of building heating, ventilation and air conditioning (HVAC) system in built environments with the aid of a digital computer are provided. Data regarding a plurality of zones in a building and data regarding an HVAC system of the building is obtained. A differentiable lumped element physics-based modular model is initialized using the zone data and the HVAC system data, the model including a plurality of parameters representing an effect of environmental condition outside the building and the HVAC system on the rate of change of one or more quantities of interest (QoIs), each of the QoIs comprising one or more of the environmental conditions in one or more zones of the building and conditions of one or more of the elements of HVAC system; The HVAC system is controlled over a time period comprising a plurality of time points, including: predicting using the modular model the QoIs at a plurality of the time points; continuously obtaining a plurality of time series, each time series comprising one of (noisy) measurements obtained at a plurality of time points; following the measurements at each of the time points, comparing the plurality of measured QoIs at that time point and the predicted QoIs at that time point and formulating a moving horizon estimation (as linear or nonlinear constrained optimization) that minimizes the discrepancy between the modular model's predicted QoIs and the measured QoIs; obtaining a target comprising desired environmental conditions within one or more of the zones within the building at a future time; obtaining data regarding one or more of the environmental conditions outside the building at the future time; and solving a (linear or nonlinear) constrained optimization problem to find a control input for one or more actuators of the HVAC system, i.e., performing model predictive building control based on the desired environmental conditions, the estimated modular model, and the outside environmental and occupancy conditions data at the future time, wherein the HVAC system operates as an actuator based on the control input and wherein the steps are performed by a suitably-programmed computer.
Still other embodiments of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is described embodiments of the invention by way of illustrating the best mode contemplated for carrying out the invention. As will be realized, the invention is capable of other and different embodiments and its several details are capable of modifications in various obvious respects, all without departing from the spirit and the scope of the present invention. Accordingly, the drawings and detailed description are to be regarded as illustrative in nature and not as restrictive.
The main shortfall in setting up a model predictive control system for buildings is establishing a computationally efficient model with high predictive accuracy at a low cost. This major bottleneck is addressed with model adaptation, specifically using a moving horizon estimation for parameter estimation of reduced order models, to help maintain predictive accuracy at a significantly lower computational cost compared to high fidelity physics-based emulators. As described below, the adaptation of the lumped model constrained by the physics of heat transfer allows to maintain predictive accuracy for a control horizon of interest in building management systems. Specifically, moving horizon estimation (MHE) maintains predictive accuracy by a continuous state and parameters estimation of lumped model. In MHE, unknown (constrained) model parameters are continuously estimated based on recent observed model outputs (using a finite length sliding time window). Continuously updating the parameter values for a reduced-order linear or nonlinear model result in a time-varying model that guarantees that model accurately reflects the state of the system at any point in time. The system and method described below automatically adjust for time-varying disturbances (e.g., occupancy) and exogenous inputs (e.g., solar radiation, weather, and other external environmental conditions). The system and method also take into account all the variable and parameter constraints that are provided by modeling and field experts and are rooted in both physics of the building and HVAC system and the desired (intentional) way they are supposed to be managed.
As a result of these continuous model updates and model constraints, the proposed modeling and calibration framework avoids the prediction errors plaguing typical lumped parameter models over long periods of time and the typical inaccuracies associated with black-box modeling approaches, guaranteeing prediction accuracy in a computationally modest manner, and allowing to both reduce HVAC-related power usage and increase building occupant comfort.
To compliment the advantages of moving horizon estimation, the approach to modeling used by the system 10 and method 40 described below is modular and based on lumped dynamics of zone and HVAC system heat transfer. The modular nature of the model used, allows plug-and-play functionality, allowing to integrate desired parameters of the building. Therefore, the approach can be extended to any number of building types and HVAC systems with virtually no limitation.
While the portion of the building management system (BMS) 34 shown with reference to
The devices that comprise the BMS could be centralized or distributed through the building 27. Likewise, the control over the devices could be centralized or distributed. All of the devices include actuators interfaced (through wired or wireless connection) to the central controller of the BMS 38, and control the devices based on commands from the BMS 38 central controller (though other sources of commands are also possible, as described below) that in turn can receive the control input from the computing devices 12. For example, an actuator 35 of the heat pump 34 could include a microcontroller in control of the heat pump and a wireless transceiver interfaced to the microcontroller through which the microcontroller receives commands from the BMS 38 controller. A similar actuator could be interfaced to the motors of the devices 32, 29. Similarly, actuators could include dampers controlling flow of air through ducts of the building based on commands from the central controller. In one embodiment, one of the actuators, such as a controller of the smart thermostat, could also act as a central controller of the BMS 38. In a further embodiment, the central controller of the BMS 38 could be physically separate from other actuators. In one embodiment, the central controller of the BMS 38 could be located inside the building 27. In a further embodiment, the central controller of the BMS 38 could be located outside of the building 27, and be implemented using a dedicated or distributed processors. In a still further embodiment, the BMS 38 could have no single central controller, and instead each individual actuator of a device would receive control input directly from the computing devices 12.
Returning to
The metadata obtained by the data module 20 further includes data 39 about the HVAC system, such as the number and kinds of devices (for example heating and cooling coils, variable refrigerant flow system, heat pumps, cooling tower etc.,) and how they connect to each other that are included in the HVAC system. The HVAC data 39 can be obtained from already prepared HVAC models available from third party sources or alternatively, or in addition, from a memory coupled to the BMS 38 central controller. The HVAC data 39 can be stored in the storage 11.
The data module 20 further continuously (when turned on) obtains time-series 14 of values of measurements from one or more sensor 33 in the BMS 38 that describes quantities of interest (QoIs): environmental conditions (such as temperature, humidity, water and air flow) within multiple zones of the building or of a condition an HVAC system element (such as water inlet and outlet temperatures for heating or cooling coils that are part of the HVAC system) in the building over multiple time points. Each time-series 14 is associated with a single measurement node that is used in the estimation and control algorithms. The time-series are stored in the storage 11 as they are obtained. The data points in the time series could be obtained by the data module 33 via interfacing with the BMS 38 (which collects the time series 14 using the sensors 33), though other sources of the time series data are possible. In one embodiment, a data point in the time series could be taken every minute, though other time intervals between the time points are possible.
Storage 11 stores an HVAC Model 15 stood up from HVAC data 39 which is a differentiable lumped element physics-based representation of the HVAC system of the building 27, specifically a simplified heat transfer ODE for such system, such as shown in one embodiment with reference to
Dynamics of a Heat Exchanger (HVAC Model 15)
The heat-exchanger (HX) is a thermodynamic system utilized to transfer the energy from one medium to another. In one embodiment, this can be air to chilled water for cooling or hot water to air for heating in a cooling and heating coil-based heat exchanger respectively. In one embodiment, a counter-flow arrangement can be considered in the HX. In one embodiment, a heat exchanger can have air side with mass flow rate ma inlet temperature Ta,in, outlet temperature Ta,out and a water side with mass flow rate mw inlet temperature Tw,in outlet temperature Tw,out. In the transient state or for example, when mw tuned by a PID controller, the Ta,out is temporally evolving.
The rate of change of thermal energy stored in HX is equal to flux of enthalpies, i.e.,
where ρa is the density of air at 300° K and Vex is the volume of the heat exchanger.
In the steady state, where all the quantities are independent of time, the rate of thermal energy lost by water should be equal to the rate of thermal energy gained by the air, i.e., mwCp,w[Tw,in−Tw,out]=maCp,a[Ta,in−Ta,out] where Cp,w and Cp,a are the specific heat constants of water and air, respectively. In other words, the right-hand side of equation is zero. In one embodiment, and for simplicity, depending on the temperature range, Cp,a is assumed constant to avoid nonlinearity.
Zone thermal model 22 is a differentiable lumped element physics-based system of bilinear equations based on first principal methods that is used to represent the zonal heat transfer inside multi-zone building 27. Computing device 12 stands up zone thermal model 22 via the model creation module 122 using geometric data 13. Zone thermal model 22 includes a plurality of model parameters, state variables, and corresponding constraints on all parameters and variables; and the details are provided below.
Dynamics of a Thermal Zone (Zone Thermal Model 22)
Consider a thermal zone of a temperature T and thermal capacitance C. Let a neighboring thermal zone of temperature Tn be separated by a wall of thermal resistance R. Let the heat load or thermal current is Q. Typically, Q is sum of thermal currents due to occupancy Qocc solar irradiation Qsol supply air entering the room Qhvac and conduction through a wall. The governing equation of T is given as
The adjacency matrix of zone is recovered from adjacency information from a floor plan of the building in Geometric Data 13 and is used to represent the dynamic couplings of a multi zone model as a system of bilinear equations based on first principal methods: The ith zone is associated with the ith node of the graph. The (i,j) element of the adjacency matrix represents direct heat transfer between zone thermal zone i and j. In a further embodiment, further dynamics and QoIs may be added to this model without loss of generality. For example, in one embodiment, humidity dynamics of a multi-zone model can also be represented as described by “MPC-based Building Climate Controller Incorporating Humidity,” Raman et al., American Control Conference, 2019, the disclosure of which is incorporated by reference.
ROM 16 is a differentiable reduced order modular model that combines (as described in in dynamics of coupled system) the differentiable lumped element physics-based HVAC model 15 and differentiable lumped element physics-based zone thermal model 22.
The details of this coupling are described below.
Dynamics of Coupled System (ROM 16)
Referring to
where Tmix represents the mixed air averaged from all the room exhausts Tz,avg plus outside air given some mixing ratio rmix. This modular approach is not limited to any particular HVAC setup and/or zone connections and can be easily configured from the floor plan and system information as mentioned before.
HVAC model 15, zone thermal model 22 and ROM 16 are all differentiable models and use automatic differentiation (AD) techniques implemented in open-source packages such as CasADi or JAX, (though other software packages are also possible) to generate efficient derivative information for the model.
Since ROM 16 is a very light (each zone can have as few as 3 parameters), easily extendible to floor plans with many rooms and door/window configurations through the graph based zone heat transfer modeling, and differentiable, ROM 16 is suitable to large scale real-time optimization for building control purposes, curtailing a major bottle-neck in setting up suitable models for real-time advanced predictive controls in medium-size and big buildings with HVAC and floor plan complexities.
Returning to
The moving horizon estimation module 21 updates the ROM 16 based on the received time series 14 that includes states such as temperature and humidity variables (measured and/or latent), control inputs such as water flow rates, setpoints etc., and exogenous inputs such as weather variables and building occupancy data for a fixed horizon of past measurements. In one embodiment, the length of this past horizon can be 4 hours though other horizon are acceptable and can be used based on use case and other preferences.
The MHE methodology is described by Allgöwer, Frank, et al. “Nonlinear predictive control and moving horizon estimation—an introductory overview.” Advances in control (1999): 391-449, the disclosure of which is incorporated by reference. Moving horizon estimation is a state-estimation method that relies on optimization for a fixed past horizon of measurements. The main advantages of MHE are its compatibility with non-linear dynamics and ability to account for physical bounds and inequalities, e.g, temperature dead bands. Assuming parameters as states of the dynamical model, the same technique can be leveraged to achieve parameter estimation. Therefore, the optimization for joint state and parameter estimation problem can be expressed as:
Where x represents all the states, p the parameters and w, v the state and measurement noise respectively. N represent the length of the horizon. This process is repeated at each time step where the latest measurements are included and oldest one is dropped from the window of interest. where, ∥l∥M:=lTMl is the weighted vector norm, Px, Pp and Pv are symmetric, positive semi-definite matrices with appropriate dimensions. In particular, Pv and Pw are inverse of covariance matrices for measurement and process noise and penalize the state and measurement discrepancies. All weight matrices are tuned on historical data. The feasible set Ω imposes the system dynamics as described previously is zone and heat exchanger dynamics section as well as all the state and parameter constraint for an ideal operation of the building as desired by building managers and occupants (e.g., HVAC system temperature and flow deadbands and desired thermostat deadbands) as well as modelers input (e.g., deadlands for parameters).
To solve the optimization in real time, the system 10 leverages differentiable models and automatic differentiation (AD) techniques implemented in open-source packages such as CasADi or JAX, (though other software packages are also possible) that greatly increases the accuracy and time efficiency of the parameter estimation by using gradients in first or second order optimization. Analyzing using moving horizon estimation of the continuously obtained time series 14 as each of additional ones of the values is obtained solves a linear programming (LP) or nonlinear programming (NLP) optimization, depending on modeling and constraint choices, that minimizes a discrepancy between a predefined window of measurement Mpast and a prediction made for the time point associated with those measurements using the initialized ROM 16. The results is a parameter and state set that reflect the latest state of the ROM 16 according to the most recent measurements (Mpast points). The iterative optimization is performed every time a new time point in the time series 14 is obtained. Thus, the ROM 16 is maintained up-to-date as the factors that affect the environmental conditions in the zones 28 of the building change over time. If an online update is deemed excessive, less frequent updates can be obtained with no loss of performance.
As the inside of the building 28 is not completely insulated from outside environmental conditions, prediction of environmental conditions within the building, such as temperature and humidity, needs to account for variations in outside conditions. Therefore, the data module 20 obtains data 18 environmental conditions outside of the building. The data 18 include both past environmental conditions for time points in the time series 14 and also environmental conditions predicted for a time frame of interest (time frame during which the environmental conditions inside the building will need to be controlled, as further described below). The environmental conditions (both past and predictions) can be obtained from external sources (such as weather websites) (not shown) via the Internetwork 25, though other sources of the data 18 are also possible.
The ROM 16 is used by a model predictive control (MPC) module 23 executed by one or more of the computing devices 12 to predict the environmental conditions (such as temperature and humidity) inside one or more of the zones 28 at a window of interest of size Mfuture, using model predictive control that utilizes the target environmental conditions 17 at the time frame of interest, the ROM 16, and the outside environmental conditions 18 at the time frame of interest. The size of time frame of interest, Mfuture, can be received as part of target conditions 17 that are desired to be created within one or more zones of the building. Such target conditions 17 can be received from a user (such via a computing device 26 associated with the user), with the user specifying the desired environmental conditions inside one or more zones 28 and the time frame for the desired environmental conditions. For example, the user's input may specify that a user desires a room to be 70° F. and a relative humidity to be 40% (though humidity could also be expressed as absolute humidity or specific humidity). In addition, and in one embodiment, the MPC module 23 will try to optimize (minimize) all the heating and cooling power associated with the building based on the predictions for the zones, with the optimization being solved using MPC as an LP or NLP optimization problem. The optimization can be effectively formulated as:
Where Ω imposes the system dynamics as well as all the state and parameter constraint for an ideal operation of the building as desired by building managers and occupants (e.g., HVAC system temperature and flow deadbands and desired thermostat deadbands) as well as modelers input (e.g., deadlands for parameters). Pc, Ph represent all the cooling and heating loads to be minimized and can be calculated based on system level data either provided by the manufacturer or estimated using the performance curves. In other embodiments, other objectives such as reference tracking may also be included. As was the case with MHE, to solve the optimization in real time, the system 10 leverages differentiable models and automatic differentiation (AD) techniques implemented in open-source packages such as CasADi or JAX, (though other software packages are also possible) that greatly increases the accuracy and time efficiency of the model predictive control by passing the first or second order derivative information to optimization efficiently. The calculated control inputs, i.e, control setpoints, made by the MPC and the user inputs are used by a signal dispatch module 24 executed by one or more of the computing devices 12 to perform optimal control (also referred to as control input below) 19, which includes the amount and kind of work that needs to be done by the devices forming part of the BMS 38, including devices forming part of the HVAC system, to achieve the desired conditions. The signal dispatch module 24 provides control input 19 to the BMS 38 (such as to the control controller) via the Internetwork 26, which in turn commands actuators of the devices to turn the devices on. Thus, the signal dispatch module 24 controls actions of devices making up the BMS 38.
While the one or more computing devices 12 are shown as servers with reference to
The use of the MHE and the MPC for performing adaptive HVAC control and implementing a recursive parameter estimation and control algorithm that optimizes HVAC system power usage while maintaining applicant comfort can be described as a method performed by the system 10 of
The system 10 of
As a result, the system 10 and method 40 can be used to control environmental conditions in a large number of zones 28 at the same time.
At least some of the flow of data and commands described above with reference to
While the invention has been particularly shown and described as referenced to the embodiments thereof, those skilled in the art will understand that the foregoing and other changes in form and detail may be made therein without departing from the spirit and scope of the invention.