The present disclosure is directed to identifying suitable models for model predictive control of building heating, ventilation, and air conditioning, e.g., scalable models that can be solved in real-time. In one embodiment, a physics model of a building is determined. The physics model is linearized around an operating point. The linearized physics model defines thermodynamic relationships between zones of the building and a heating, ventilation, and air-conditioning (HVAC) system. Measurements received from sensors define a system state of the HVAC system. The linearized physics model is used as an equality constraint for a model predictive controller that determines a next control input to the HVAC system based on the system state by solving an optimization problem for a time horizon of size N. A constraint matrix H of the equality constraint into factors of a first matrix U and a second matrix V such that UUT and VTV are both diagonal matrices. An objective function of the model predictive controller is optimized by iteratively solving a linear system of equations that includes inverses of UUT and VTV to determining a sequence of inputs for a horizon of the model predictive controller. A first input of the sequence of inputs to is input to control the HVAC system.
These and other features and aspects of various embodiments may be understood in view of the following detailed discussion and accompanying drawings.
The discussion below makes reference to the following figures, wherein the same reference number may be used to identify the similar/same component in multiple figures. The figures are not necessarily to scale.
The present disclosure is generally related to heating, ventilation, and air-conditioning (HVAC) systems. Embodiments include a method and system that use an efficient optimization framework based on first order method with a novel factorization. This framework increases the computational efficiency and the scalability for solving large-scale model predictive building control problems with computationally expensive models.
According to recent estimates, residential and commercial buildings account for nearly 40% of energy usage in the United States. Most of this energy provides services to occupants, the greatest chunk of which can be associated with cooling and heating of spaces for occupant comfort and satisfaction. Better management of HVAC control systems can improve indoor thermal conditions and lead to more pleasant living spaces, better working conditions, and safer environments. Specific examples include better productivity in offices, better learning performance and pupil attendance in classrooms, and more recently, mitigation of transmission of COVID-19 in office buildings and hospitals. These can be achieved through a combination of heating and cooling for the indoor environment, more outdoor air circulation, and stricter standards for space pressure control, but may come at the cost of increasing the energy consumption for buildings and contributing to more carbon emission and less energy efficiency.
The problem quickly scales up for a large number of buildings where the HVAC control system can play the part of a variable load in a coordinated and integrated grid. To mitigate and manage, advanced controls, implemented as a supervisory control system, can be used to serve multiple end-use cases such as load shifting, demand response, and islanding. Model predictive control (MPC) is a particularly powerful approach for handling hard constraints for state and control inputs in nonlinear multivariable control systems. Generally, MPC is implemented as a controller that uses a current system state to determine a sequence of inputs for a horizon, generally a time horizon of size N. A first input of the sequence of inputs is applied to the control the HVAC system, after which the MPC controller uses the next system state at the next time to predict the inputs and resulting states over the next time horizon.
In simulation studies as well as field studies without time or budget constraints on the modeling process, MPC is the standard for comfort-oriented and energy-efficient building control, as long as a model of the plant exists or can be formulated and identified. MPC can reduce the cost by predicting the dynamically evolving temperature and humidity profile of the building based on the inside/outside influence and by optimal changing the temperature/humidity profile based on price structures to shift the energy load from peak hours to off-peak hours. This is considerably more efficient than heuristics based control approaches which do not predict the future model, varying model parameters or time-varying cost functions.
In practice, MPC has not found much use in consumer products due to implementability and dependability, where factors to consider include implementation of advanced numerical optimization algorithms on resource-limited embedded computing platforms and the associated complexity of verification. This challenge comes from a requirement of the use of ultra-reliable hardware and software architectures and low-cost hardware in consumer products. Solving a single optimization problem for a large building on low cost embedded controllers is infeasible using state of the art optimization methods. Common methods such as interior point and active set methods and more recently first order all have limitations when deployed in low computing devices. Interior point methods have scalability issue and require solvers that are not compatible with edge implementation. In first order methods, solving the linear system of equations or KKT matrix requires performing a large matrix inversion in a loop which creates the bottleneck for low computing implementation.
To deal with this problem regarding matrix inversion, direct and indirect approaches have been adopted. A direct approach computes the factors in a first iteration and then reuses them in subsequent iterations. An LDL decomposition is a method of choice in such applications. For large scale problems, the direct methods become prohibitive and indirect methods such as Preconditioned Conjugate Gradient (PCG) are iterative methods and provide an approximate solution and hence compromise on the quality of solution.
In this disclosure, we show a computationally efficient and scalable solution for solving large-scale model predictive building control problem. For purposes of this disclosure, large-scale models include those with four or more zones that are independently controllable and include a combination of central HVAC components, e.g., chillers, and zone-specific components, e.g., dampers, heaters, etc.
In
In the example model 100, a central cooling system 102 regulates the supply air temperature. A supply fan 104 controls the total airflow rate. The supply air 106 (central chilled) is divided equally between five separate zones 110 and is fed to each individual zone 110 via a variable air volume (VAV) reheat box 108. Each VAV reheat box 108 includes a heating unit (e.g., heating coil) and dampers. The reheat boxes 108 control zone-specific supply temperatures and flow rates to comply with the thermostat set points of each individual zone 110. The return air 112 from the zones is mixed with a fraction of outside air to achieve ventilation requirements. We use a thermal resistance-capacitance (RC) model to track average zone-level temperatures and neglect humidity.
In
Applying Kirchhoff's law, in continuous time the total heat load on a thermal node i for n zone building can be expressed via the following differential equations
where wall,i are the neighboring walls of a zone i which has thermal interactions with it. Similarly,
z,j are the neighboring zones of a wall j. For example,
z,1={1, 2} and
wall,2={1, 5, 8, 9} in the arrangement shown in
Typically a commercial HVAC systems have a central unit supplying air to several distributed components. Without loss of generality, we can also assume that each of these components are controlled by fine-tuned proportional-integral (PI) controllers as is common practice in commercial buildings. Looking at
We consider a PI controlled water-based cooling coil system that manipulates the water flow rate {dot over (m)}w,c in order to track a desired supply air temperature (cooling):
The dynamics of cooling supply is given by:
where, ρa is the density of air at 27° C., V is the volume of the heat exchanger, Tw,in, Tw,out are the water side temperatures and Tmix is the inlet temperature of the cooling coil. On a side note, Cpa may be considered to be constant and not vary with respect to air temperature. If we account for the temperature variation of Cpa in (3), then (3) is a nonlinear differential equation. For simplicity, depending on the temperature range, we assumed that Cpa is constant.
Further, Tmix is the mixed air temperature at the inlet of cooling system. Assuming no heat loss or gain in the ducts, the mixed air temperature is calculated as:
from all the room exhausts Tz,avg plus outside air given some mixing ratio rmix. The supply air with temperature Tsupp,c is distributed to all five zones, in each of which it is reheated to Tsupp,h.i by a water-based heating coil associated with zone i and controlled by a PI controller:
where kp, kp,i and ki, kint,i are PI controller gains for central cooling and reheat boxes, respectively.
For each iteration of the control problem, we identify a locally linear model (e.g., linearized around a current operating point) using the states x, control inputs u, time-varying disturbances d. The output of the surrogate model is the future state prediction xt+1:
where f is the nonlinear dynamics for combined HVAC and zone models explained earlier. Here, f is linearized as follows:
where Ak=∇xf∈N
N
N
Model Predictive Control (MPC) is often formulated as sparse or dense Quadratic Programming (QP) problem. We consider MPC formulation of a linear and time-invariant system
where xk∈n
u
It is a common practice to formulate MPC problem as a box constrained quadratic programming problem and then apply optimization methods to solve this problem. Alternating Direction Method of Multiplier (ADMM) is one of famous optimization method and various solvers for MPC applications are developed on the basis of this approach. In contrary to common practice, we formulate the MPC problem as a standard quadratic problem (e.g., mathematical optimization problem involving quadratic objective function) where we minimize a quadratic objective function subject to a set of linear equality and inequality constraints. Such formulation can be obtained by introducing the slack variable for corresponding lower and upper bounds constraints (7c) and (7d) of state and input of the system. equations (1)-(4):
where the variable z∈n is the new unknown variable, P∈
+n + and q∈
n are corresponding objective function costs, H∈
nxm is the compact constraint matrix, and s∈
m the slack variable. The transformation of variables from (7) to (8) is defined as follows:
We rewrite the objective of (8) by defining P=diag {Q1, Q2, . . . , QN, R1, . . . , RN} and q=[Q1xfQ2xf. . . QNxfON×n
whereas the inequality constraint (7c) and (7d) is Aineq=I(N+1)×n
The new equality constraint of reformulated quadratic program is defined as H=[Aeq−AineqAineq]τand the transformed system matrix b is given as
Motivated by the need of solving real-time MPC for finite horizon in large scale buildings and multi-building installations, we aim to solve this problem in a computationally efficient manner. For purposes of this disclosure, “real-time” refers to a system that can respond with control inputs sufficiently fast enough so that the system state does not change significantly (e.g., <5%) from when the measurements are made to when the inputs are applied. For example, a convergence time on the order of minutes (e.g., <5 minutes) for the control calculations can be sufficient for many HVAC applications.
Furthermore, it is desirable that a system achieve real-time performance on inexpensive and/or readily available computer equipment, such as embedded controllers, consumer grade computers, etc. In this way, and organization can maintain internal control of HVAC systems without reliance on cloud computing or other external services, which removes a possible security risk and can ensure data privacy. For example, a security policy can be implemented that prevents the controller nodes from connecting to the Internet or significantly reduces Internet access.
The ability to run advanced HVAC control on relatively lower-performance devices (e.g., single board computers) can also make parallel-computing implementations economically feasible. Generally, parallel computing or parallelism involves multiple controllers that cooperatively execute control functions, such as by providing redundancy and/or load sharing. Parallelism can provide, among other things, increase in performance by subdividing computing tasks and increase reliability by operating redundant/backup computing nodes. Parallel computing nodes can also be physically distributed around an installation (e.g., placed in multiple different buildings) which can add another layer of resilience to the control system. This can increase adoption of advanced MPC controllers which will lead to increased operational HVAC efficiencies. Scalability of the models to large installations (e.g., multiple building campuses with shared HVAC resources) can further increase the payback resulting from these efficiencies.
We disclose a first order method in conjunction with a novel UV factorization method to increase the scalability and reduce the computational complexity for solving large- scale MPC problems.
As a first step in this solution, we decompose the constraint matrix H=UV ∈mxn into two factors (U∈
nxo,
nxm ∈
oxm) in such a way that UUτand VτV are both diagonal. Here o is the number of non-zero elements of H. The factor U contains a single non-zero element in each column, whereas V contains a single non-zero entry in each row. These factors can be computed as follows:
where ekm, fk
o and gk
n are standard basis and Hik,jk are the non-zero elements of H. Based on this decomposition the MPC problem (8) can be reformulated as
where y∈m and w∈
n are auxiliary variables in (11c) and (11d), respectively. In order to solve (11) we apply Augmented Lagrangian Method and the corresponding Lagrangian for (11) is given as:
where λ1∈m, λ2∈
n and λ3∈
n are the corresponding Lagrange multipliers associated with (11b), (11c) and (11d), respectively, and μ is a constant penalty weight. The closed form solution of iterative steps of the algorithm can be computed by minimizing the Lagrangian function with respective to the corresponding variable and freezing the other variables at their previous values.
The update for each of the variables can be computed by finding the following closed form solution. The updates for Lagrangian multipliers are also easy to compute.
The variable updates in (13) and (14) involves solving the linear system of equations in each iteration. This system remains constant throughout the iterative steps, hence it is computationally beneficial to find the factors in first iteration and then reuse them in subsequent iterative steps. Since, we are dealing with large-scale and highly sparse system, the traditional factorization techniques becomes computationally prohibitive. The inherent structure of MPC problem and reformulation introduced in (11) provides a computationally efficient approach to deal with this problem. Based on this decomposition, the (P+μVτV+μI) term in in equation (13) is diagonal and it easy to compute the inverse of this term. Additionally, the term UτU in (14) is apparently not diagonal, but we will apply matrix inversion lemma to make this term diagonal. According to matrix inversion lemma
we can write (I+UτU)−1 as follows:
In equation (17), the term (I+UUτ) becomes diagonal which is easy to compute.
, z ∈
, y ∈
,
By finding the closed form solution of primal variables and Lagrange multipliers updates in previous discussion, we converge to Algorithm 1 for dealing with large-scale real-time MPC problem. A brief description of each step of the algorithm is provided in this section. The algorithm takes P, q, H, and b as input.
The algorithm returns the optimal values of variables as output when a satisfactory termination criterion is met. In this algorithm we use the following stopping criteria.
where εabs=10−4 and εrel=10−3 are default absolute and relative tolerance values, respectively.
The proposed algorithm is computationally efficient, requires less memory and amenable for warm-start. The algorithm is well suited for model predictive control applications as it exploits the sparsity structure of this problem and uses only the non-zero elements for operations. Moreover, the warm-start feature of this algorithm is very important in MPC problem as it requires to compute the factors only in first horizon of time and then it can be reused for the whole horizon.
5.1 Comparison with ADMM algorithm of box-constrained QP
In order to evaluate the performance of proposed formulation and algorithm, we generate random MPC problem instances and vary the size of problem (by increasing the number of states) and compare the computational performance of proposed algorithm with a commonly used Alternating Direction Method of Multipliers (ADMM) method on a box-constrained formulation of MPC. In these instances, we use 10 control inputs and solve the problem for 50 horizons. As illustrated in
The performance of proposed algorithm to be at least 20x times faster than IPOPT, as seen in the graph of
The initial states are
and control input is −0.75≤u≤1. In
Note that the embodiments above can be implemented in multi-zone HVAC systems that are centrally controlled. In
The system 700 uses conventional HVAC components (e.g., compressors, evaporators, chillers, heaters, VAV boxes, solar-thermal collectors, underground or underwater heat exchangers, fans, dehumidifiers, humidifiers, etc.) to affect the movement of heat through the buildings 702, and any of those HVAC components that can be affected by an input signal are indicated as controlled components 708-710 which are each associated with one of the zones 704-706. Each of the zones 704-706 includes sensors 712-714 (e.g., temperature sensors, flow sensors, humidity sensors, solar radiation sensors, etc.) that gather state data that can be fed into a centralized controller 720. Other sources of data 718 may also be used as state inputs to the controller 720, such as occupancy sensors, Internet-accessible weather data, etc. Generally, the inputs to the controlled components 708-710 affect the state variables measured by the sensors 712-714, and each controlled component 708-710 may primarily affect the zone in which the component is located, and secondarily affect other zones, e.g., via heat transfer through inter-zone boundaries.
The controller 720 may include conventional computing hardware such as a central processing unit (CPU) 721, memory 722, input/output (I/O) interfaces 723, and a non-volatile data storage unit 724 (e.g., hard disk drives, solid state drives). The controller 720 includes an external data interface 726 that receives state information from the sensors 712-714 and sends inputs to controlled components 708-710. The data storage unit 724 stores a linear physics model 728 of the building that defines thermodynamic relationships between the zones of the building and the HVAC system. The linear physics model 728 may be stored, for example, as a data file that is loaded into memory by a program and contains parameters that can be used to update the model 728 as described herein.
During operation of the system 700, e.g., when the system 700 is actively controlling the building HVAC, physics-based model 728 is used to determine control inputs to the controlled components 708-710, as well as having their parameters jointly updated at the same time based on a series of previous states and inputs. These control inputs and parameter updates may be calculated using an optimized MPC controller 730 that utilizes algorithms described above. For example, the processor 721 uses the linear physics model as an equality constraint for MPC computation by the MPC controller 730 that determines a next control input to the HVAC system based on a system state. The MPC controller 730 decomposes a constraint matrix H of the equality constraint into a factor of a first matrix U and a second matrix V such that UUτand VTV are both diagonal matrices.
The MPC controller 730 minimizes an objective function of the MPC computation by iteratively solving a linear system of equations that includes inverses of UUτand VτV to update state and control variables of the MPC computation. The MPC controller 730 determines a current input based on the minimization of the objective function and applying the current input to control the HVAC system. Note that various optimized math libraries 732 such as matrix libraries can be used to efficiently solve the above noted matrix operations such as inverses. Generally, even a relatively large system can be controlled by this type of MPC controller 730 using low-powered computing hardware, e.g., a single board computer such as a Raspberry Pi™.
The various embodiments described above may be implemented using circuitry, firmware, and/or software modules that interact to provide particular results. One of skill in the arts can readily implement such described functionality, either at a modular level or as a whole, using knowledge generally known in the art. For example, the flowcharts and control diagrams illustrated herein may be used to create computer-readable instructions/code for execution by a hardware processor. Such instructions may be stored on a non-transitory computer-readable medium and transferred to the processor for execution as is known in the art. The structures and procedures shown above are only a representative example of embodiments that can be used to provide the functions described hereinabove.
The various embodiments described above may be implemented using circuitry, firmware, and/or software modules that interact to provide particular results. One of skill in the arts can readily implement such described functionality, either at a modular level or as a whole, using knowledge generally known in the art. For example, the diagrams and algorithms illustrated herein may be used to create computer-readable instructions/code for execution by a processor. Such instructions may be stored on a non-transitory computer-readable medium and transferred to the processor for execution as is known in the art. The structures and procedures shown above are only a representative example of embodiments that can be used to provide the functions described hereinabove.
Unless otherwise indicated, all numbers expressing feature sizes, amounts, and physical properties used in the specification and claims are to be understood as being modified in all instances by the term “about.” Accordingly, unless indicated to the contrary, the numerical parameters set forth in the foregoing specification and attached claims are approximations that can vary depending upon the desired properties sought to be obtained by those skilled in the art utilizing the teachings disclosed herein. The use of numerical ranges by endpoints includes all numbers within that range (e.g., 1 to 5 includes 1, 1.5, 2, 2.75, 3, 3.80, 4, and 5) and any range within that range.
The foregoing description has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the embodiments to the precise form disclosed. Many modifications and variations are possible in light of the above teachings. Any or all features of the disclosed embodiments can be applied individually or in any combination and are not meant to be limiting, but purely illustrative. It is intended that the scope of the invention be limited not with this detailed description, but rather, determined by the claims appended hereto.