A Stable Energy Saving Adaptive Control Scheme for Building Heating and Cooling Systems

This paper presents a stable, nonlinear, adaptive control scheme for building heating and cooling systems. The proposed controller utilizes the principle of adaptive one step ahead control and aims at reducing the energy consumed for heating or cooling a building. The design steps are discussed in details and a proof of global stability is also provided. Also, the performance of the proposed controller is demonstrated on a simulated building thermal model.


Introduction
According to EPA estimates, the cost of heating, ventilation and cooling (HVAC) of residential and commercial buildings constitute about 50% of the total electrical energy consumed in USA.Thus, minimization of this HVAC energy consumption can be very beneficial not only because of the resulting cost savings but also because of the reduction of carbon footprints of buildings.In recent years, the installation of smart meters in buildings and advent of smart grid technology have provided an impetus to development of advanced control schemes for reducing the energy consumption and maintaining the thermal comfort inside a building.A variety of such advanced control schemes have appeared in the literature [1]- [7].Some of these claim to be adaptive, efficient, and helpful in reducing the energy consumption while maintaining the occupants' comfort level.Examples include classical PID controller and PID plus fuzzy logic controller [1] [2], optimal, adaptive and intelligent controllers [2], adaptive neuro-fuzzy inference system (ANFIS) and artificial neural network (ANN) based controllers, and fuzzy logic (FL) controllers [3].Also, other approaches include model predictive control (MPC) [4] [5], and predicted mean vote (PMV) based adaptive or PID controller [6]- [8].Till this date, however, very little efforts have been made in employing truly adaptive techniques that learn the nonlinear thermal characteristics of a building and its environment, and presenting a nonlinear adaptive controller backed up by a proof of globally stability.This paper is aimed at addressing these concerns.
Notice that adaptive controllers are ideally suited for controlling the heating/cooling system of a building, because such controllers can estimate the building's physical parameters and occupancy levels online and adjust the control signals accordingly.The main difficulty in designing such controllers stems from the fact that a building thermal system is usually characterized by a bilinear model.In view of this, we investigate the application of adaptive one step ahead (OSA) and weighted one step ahead (WOSA) control schemes [9] here, because such controllers are easy to design and capable of controlling both linear and bilinear systems quite well.The contributions of this paper are threefold.First we investigate in details the application of adaptive one step a head (OSA) and weighted one step ahead (WOSA) control schemes for controlling the thermal system of a building.Then we investigate the criteria for global stability of the closed loop system, and present a detailed proof of the same.Finally, we present results of a simulation study that compares the performance of the adaptive OSA and WOSA controllers with that of a simple fuzzy control scheme, and show that OSA and WOSA controllers are capable of reducing the heating/cooling energy consumption in a building.
The organization of this paper is as follows.Section 2 presents a brief overview of the objectives and methodology.A dynamical model of a building's thermal system is described briefly in Section 3. A description of OSA and WOSA controllers and a discussion of parameter estimation issues are presented in Section 4. A detailed proof of global stability of the closed loop system is presented in Section 5. Then Section 6 presents results of some simulation studies, and finally, some concluding remarks are given in Section 7.

An Overview of Objectives and Methodology
The aim of this paper is to present a scheme for controlling the indoor temperature of a building in a desired way using a globally stable control scheme that also exhibits good tracking.Such a controller is based on a simple nonlinear dynamical model of the thermal system of a building.The parameters can be different for different buildings and can be time varying, and in most cases we have no knowledge of the parameter values.Therefore, due to the nonlinear nature of the dynamical model and the unknown parameters, an adaptive control approach is used to fulfill the objective.
The goal of a smart building temperature control system is to maintain the indoor temperature of a building by achieving an optimum tradeoff between heating/cooling energy consumption and occupants' comfort.The overall heating/cooling energy consumed in a building can be divided into two parts: 1) energy consumed to maintain the current conditions, and 2) energy consumed to raise (or lower) temperature to a different level.The latter becomes an important part of the overall energy saving strategy because during favorable outdoor conditions, periods of low occupancy levels and at nights, the target temperature can be lowered (during winter season) or raised (during summer season) to save energy, and subsequently brought back to the desired level whenever desired.However, in doing so, the reference temperature profile needs to be chosen carefully by avoiding steep gradients (to reduce energy consumption) and at the same time maintaining a desired comfort level.The proposed adaptive control scheme involves measurement of inputs and outputs of the system, estimation of unknown system parameters using a recursive least squares (RLS) parameter estimation algorithm, and computation of a control signal based on the estimated parameter values.The design of both OSA and WOSA controllers is discussed and their performance is studied.

Dynamical Model of a Building's Thermal System
At the outset, it should be noted that since the heating and cooling dynamics are very similar, we discuss only the heating dynamics here for the sake of brevity.Following the footsteps of Calvino et al. [7] and IBPT toolbox [10], a simplified dynamical model of a building's thermal system during a heating season can be described by the following equation: (1), which represents a simplified dynamical model of the building, now takes the following form: where y(t) denotes the indoor temperature, u(t) is the flow rate of the warming carrier and A, B and C denote the model parameters that are given by: As considered in [1], we assume that the thermal losses due to ventilation are insignificant, but the convective part of all heat sources, such as the solar heat gains and the heat gains from the heating system or casual gains, are considered to be parts of the model equation.The following discrete time equation is derived from the system Equation (1) using a first order Euler approximation for d d y t with a sampling period T s . ( where k denotes the discrete time index (i.e., 1, 2, 3, k =  ) and the time instance, s kT , is simply denoted by k.The above thermal model is characterized by three unknown parameters, namely, A, B and C.

Control of Indoor Temperature of a Building
To develop a control scheme for controlling the indoor temperature of a building governed by Equation ( 4), first thing to notice is that it represents a nonlinear system characterized by some unknown parameters.These parameters can vary from building to building, and in most cases we have no prior knowledge of the parameter values.In view of this, we propose to use a nonlinear, adaptive OSA and WOSA controllers [9].Furthermore, it is important to establish that the resulting closed loop system is stable and exhibits good tracking behavior.
The proposed adaptive control scheme involves measurement of inputs and outputs of the system, estimation of unknown system parameters using a recursive least squares (RLS) parameter estimation algorithm, and computation of a control signal based on the estimated parameter values.First the design of fixed OSA and WOSA controllers is discussed and their performance is studied.

Fixed One Step Ahead Control Algorithm
The goal of a fixed OSA controller is to track a desired reference temperature profile, ( ) * y k .Such a tracking is achieved by bringing the predicted output at time k + 1, i.e., ( ) The feedback control law that achieves this goal is found by minimizing the following cost function based on a squared prediction error: The discrete time control law, obtained by differentiating ( ) with respect to u(k) and setting it to zero, is given by [9]: However, in view of the fact that any furnace is limited by its maximum heat delivery capacity, it is necessary to constrain the above control signal, ( ) u k , and generate a constrained control signal, u(k), as follows: ( ) ( ) where max u denotes the maximum low rate of the warming carrier.

Fixed Weighted One Step Ahead Control Algorithm
Since OSA controllers attempt to achieve zero tracking error in one step, they often require large control efforts, u(k), which usually increases the overall energy consumption.To alleviate this drawback, a weighted OSA (WOSA) controller [9] is often found to be a good alternative.A WOSA controller attempts to achieve a tradeoff between tracking error and control efforts.It minimizes the following cost function: where the parameter, λ , controls the trade-off between tracking error and control efforts.A larger λ reduces control efforts at the cost of higher tracking error and vice versa.The control law that minimizes ( ) is given by [9]: which is once again constrained by max u to generate a constrained control signal, u(k), defined by Equations (7a)-(7c).

Adaptive OSA and WOSA Controllers
In an adaptive controller, the sampled measurements, u(k) and y(k), are used to estimate the model parameters, A, B and C in Equation ( 2), using a recursive parameter estimation method, such as recursive least squares (RLS).The estimated values of theses parameters are then used to compute the OSA/WOSA control signals.

Parameter Estimation
First we write model Equation (2) in the following form: where Next, the estimated value of * θ is computed recursively using the following RLS algorithm: ( ) where γ > 0 is a small number and σ > 0 is chosen to be large.Also, ( ) Â k is always constrained to be non- negative by using a projection algorithm [9], i.e., ( ) Given an estimate ( ) θ , we define the predicted output at time k + 1 as: ( ) ( ) ( )

Adaptive Control Algorithms
The adaptive OSA and WOSA controllers use the above estimate, ( ) ˆk θ , to compute the control signal, u(k), from the following adaptive versions of Equations ( 6) and ( 9): For OSA: For WOSA: where ( ) Â k , ( ) B k and ( ) Ĉ k denote the estimated values of A, B and C, respectively, at time k.

Global Stability of the Closed Loop Adaptive Control System
A proof of global stability of the closed loop system governed by adaptive OSA controller is provided in this section under the following mild assumptions: Assumption 1 The building thermal parameters, A, B and C have finite, positive values, i.e., The room temperature, y(k), is always less than the average temperature, y fav , of the heat exchanger, i.e., ( ) fav y k y < for all k.The global stability of the closed loop system can now be established by first proving three Lemmas and finally proving Theorem 1 below.
Lemma 1 For the least squares algorithm describes by Equations (12a)-(12d), we have where a 1 is some constant and prediction error, e(k), is given by

Proof
The proof of Lemma 1 can be found in Goodwin and Sin [9].
Next the boundedness of y(k) is proved in Lemma 2 below.Lemma 2 Consider the closed loop adaptive OSA control system governed by Equations ( 2), ( 14) and (7a)-(7c).This system is BIBO stable and therefore, y(t) is bounded for all t.
Proof Notice that at any ( )  , the closed loop system governed by Equation ( 2) can be rewritten as: where ( ) ( ) , which is given by Equations ( 14) and (7a)-(7c), and α(t) is defined as In view of (7a)-(7c) and assumptions 1 and 2, we get First consider the homogeneous system associated with Equation (17), i.e., ( ) ( ) ( ) The state transition matrix [11] of this homogeneous system is given by ( ) In view of (19b), we have In view of ( 22), the homogeneous system given by Equation ( 20) is uniformly asymptotically stable [11].
Next, consider the closed loop system given by Equation (17).Since its homogeneous system described by (20) is uniformly asymptotically stable and the excitation given by the right hand side of Equation ( 17) is bounded for all times (in view of Assumption 1 and Equation (19a)), the system governed by ( 17) is BIBO stable [14].This implies y(t) is bounded for all t.Next, the following Lemma establishes the boundedness of the prediction error, e(k), defined by Equation (16c).Lemma 3

Tracking
In order to prove tracking properties of the adaptive OSA controller, we are going to assume (for the sake of simplicity) that ( ) * y t is a constant, * y .Notice that this is a reasonable assumption because ( ) * y t is actually piecewise constant for all t.
Theorem 1 Subject to the assumptions 1 and 2, the proposed adaptive OSA scheme assures that

Proof
We present an outline of the proof here, because it is very similar to the results presented in [12] [13] and details can be found there.First of all, notice that from Lemma 1, we get Thus, for a given η, there exists a 0 k such that for From here on we assume 0 k k ≥ and proceed to consider the following three possible cases for u(k) given by ( 28) and (7a)-(7c): (i) Case (i) If (i) holds, then ( ) * 0 1 y k y + = and clearly ( ) ( ) . This, in view of ( 14), yields ( )  .In a similar fashion like in case (ii), we can once again prove that there exists a 1 0 k k > such that ( ) From here on, by induction on (29), it follows that ( ) Finally, since η can be chosen arbitrarily, the above result also establishes (25).Remarks 1) In the above analysis, noise is assumed to be absent.In presence of bounded noise, the analysis can be modified slightly and following arguments similar to [12] [13], it can be shown that there exists a 1 k such that for where noise < ∆ for all times.
2) For the adaptive OSA, the tracking error is zero, whereas for the adaptive WOSA, the tracking error is proportional to the weight, λ, and inversely proportional to the square of the sampling time s T , which can be shown easily by substituting control u(k) in the equation for y(k).

Simulation Results and Discussion
In this section, we present results of a simulation study to show the performance of OSA and WOSA controllers and also compare them with a simple fuzzy logic controller.These simulations are conducted on a simplified thermal dynamical model of a small family home that was studied by Calvino et al. [7].However, in our case, this home is assumed to be located in Michigan, USA.The physical parameters of this home are assumed to be Table 1.
The simulations are carried out over a period of 24 hours, or equivalently 86,400 seconds.The outdoor temperature during this period is assumed to vary slowly in a sinusoidal fashion as follows: which represents the outdoor temperature variation on a typical winter day in Michigan, USA.However, the desired indoor temperature profile, y * (t), is assumed to be just a two-level signal consisting of a low level and a high level.It is set to be at the high level during early morning and evening hours, whereas it is lowered to the low-level setting during night time as well as office hours when the place is devoid of occupants.The performance of an adaptive OSA controller is depicted in Figure 1 and Figure 2.These simulations were carried out using two different values of maximum blower speed (u max ) of the furnace, 0.1 Kg/sec and 0.5 Kg/sec.Figure 1(a) and Figure 1(b) compare the actual indoor temperature with the desired one for the above settings of u max .Although both show good tracking between the actual temperature and the desired one, we notice that the furnace with a higher u max results in a faster rise of the actual temperature.Figure 2(a) and Figure 2(b) depict the behavior of the control signal, u(t), in these two cases.As can be seen from these figures, the furnace with a higher u max results in a smoother control signal.However, this improvement in performance has to be traded off against a higher capital cost for the high-capacity furnace.
The performance of an adaptive WOSA controller is depicted in Figure 3 and Figure 4. Since we wish to show the effect of variation of the controller trade-off parameter, λ , we just use a lower capacity furnace with u max = 0.1 Kg/s for this part of the study.However, the value of λ is chosen to be 0.1 and 0.05, respectively, for these two case.The performance of the above OSA and WOSA controllers is next compared with that of a simple fuzzy controller, described by the following equations:   A fuzzy controller, consisting of 25 Sugeno-style decision rules, was designed using Matlab fuzzy logic toolbox and used in this part of our study.The performance of the above controller is depicted in Figure 5 and Figure 6. Figure 5(a) shows the tracking performance for u max = 0.1 Kg/seccc, which seems to be rather poor.The controller is unable to track the desired temperature profile because of the lower heat delivery capacity of the furnace.In view of this, u max was increased to 0.5 Kg/sec to see if it would improve the tracking performance.As shown in Figure 5(b), this indeed is the case, but the overall tracking performance is not as good as adaptive OSA and WOSA controllers.Finally, the energy consumptions of OSA, WOSA and fuzzy controllers using same reference temperature profile are compared in Table 2.It is evident from this table that both OSA and WOSA controllers can deliver significant energy savings per day, which becomes even more significant when the total number of cold days in a winter season is taken into consideration.

Conclusion
An adaptive one-step ahead control scheme and a weighted one-step ahead control scheme for a building's    HVAC systems are presented in this paper.A proof of global stability of the closed-loop system for the adaptive OSA controller is also presented.The performance of the proposed controllers is compared with that of a fuzzy-logic controller.The results of some simulation studies show that the adaptive OSA and WOSA controllers deliver better performance in terms of both tracking the desired temperature profile and reducing the overall energy consumption as compared to the Fuzzy controller.Further reduction of energy consumption by utilizing an optimized reference temperature profile is currently under investigation.

Figure 3 (
a) and Figure 3(b) compare the tracking errors for the above two cases.As can be seen from these figures, a smaller value of λ improves the tracking between the actual temperature and the desired one.Figure 4(a) and Figure 4(b) show the corresponding control signals.A comparison of these figures with Figure 4(a) and Figure 4(b) clearly shows that a WOSA controller substantially reduces the control efforts.

Figure 1 .Figure 2 .Figure 3 .
Figure 1.Comparison of actual and desired temperatures using adaptive OSA controller for (a) u max = 0.1 Kg/s and (b) u max = 0.5 Kg/s.

Figure 6 (
a) and Figure 6(b) depict the behavior of the control signals for the above two cases.

Figure 6 .
Figure 6.Behavior of fuzzy control signal for (a) u max = 0.1 Kg/s and (b) u max = 0.5 Kg/s.

Table 1 .
Physical parameters of the simulated building.

Table 2 .
Comparison of energy consumption/day for Fuzzy, OSA and WOSA controllers.