A constrained model predictive control for the building thermal management with optimal setting design

Today, the building sector is the most important consumer of energy. The main challenge in building management is to obtain the desired performance taking into account many aspects such as comfort requirements, variation of building physical characteristics, system constraints, and energy management. For this purpose, a predictive control approach applied to the building thermal has been designed to achieve desired performances combined with an energy optimization approach based on intrinsic system parameters. The developed approach is applied with an online identification system for effective predictive control to take into account the reel building characteristics and to choose the optimal tuning parameters. The simulation results show good performances in terms of accuracy and robustness face to internal and external disturbances with respect to system constraints. This is an open access article under the CC BY-SA license.


INTRODUCTION
The building sector is the most important consumer of energy. It accounts for approximately 40% of the worldwide and contributes over 30% of the CO2 emissions, more than 50% of this energy used in buildings is dedicated to cooling, heating, and ventilation [1], [2]. In order to reduce CO2 emissions and energy consumption, several solutions for building thermal have been developed over the past decades by improving the physical efficiency of construction materials to help reduce energy demand and developing decentralized production solutions to ensure the energy need [3]. Many controls and conventional approaches have been designed to meet optimization and thermal regulation needs. Proportional integral derivative (PID) control strategy remains an efficient tool in regulation [4], but its limitations are mainly related to the conceding of system constraints and predicting the systems events such as intermittent occupancy and unexpected climate variations. Other intelligent approaches have been proposed within the literature like fuzzy logic or neural networks [5]- [7], aimed toward reducing energy consumption while maintaining the specified performances, but they are computationally complex.
The complexity of the problem is mainly due to the building being controlled whose thermal and physical behavior depends on various factors. Indeed, the building is subject to intrinsic factors such as the surface to be heated, the insulation characteristics which undergo variations due to natural degradation, etc. uncontrollable extrinsic factors such as meteorology, solar flux, thermal contributions due to the presence of individuals impacting the thermal behavior of the building. Furthermore, given recent rises in global temperatures as a result of climate change, it has become increasingly vital to offer acceptable comfort levels in indoor spaces, allowing for the growth of research in heating and cooling regulation and control. Model predictive control (MPC) has been one of the potentials for control schemes strategies to address these problems. It has been applied in several fields of biology, electrical equipment control [8], mecanique control [9], magnetic system [10], agriculture [11], [12], thermal control [13], [14]. In this paper, the predictive control approach with constraints, combined with an optimal tuning parameters design, is applied to the building thermal control in order to reduce energy consumption and increase occupant comfort. The basic idea is to find at each sampling time the optimal control vector resulting from a sequence of predicted outputs on a finite prediction horizon. Then these predicted outputs are compared to the reference value using a criterium called the cost function. The output vector that minimizes this cost function is selected to be applied in the next time sample [15].
This work is divided into four sections the first one is devoted to describing and modeling the building system. The control objective and design are explained in section 2. In this section, the constrained MPC method is used with a new proposed cost function and tunning parameters adjustment. The simulations are carried out in section 3 and the conclusion is given in section 4.

PROCESS DYNAMIC BUILDING MODELING 2.1. System modeling
The dynamic building modeling is an important step to describe the thermal and the physical system aspects. The different components of building models such as exterior and interior walls, floor, ceiling, windows, and interior equipment are designed and modeled according to their physical aspects [16] and behavior concerning thermal conduction and convection that depends on the dimensions and characteristics of the insulation materials [17]. We adopted models based on the first-order differential heat transfer equations of building components as: − Floor model − Ceiling model − Air model Where T(K) is temperatures, A(m 2 ) is area of the building components, C(J/K) is heat capacity, U(W/m 2 K) is heat transfer coefficients, Q(W) is heat flow, Qs(W) is solar heat, p is solar heat impact factor. Index: w: wall; f: floor; c: ceiling; a: air; i: intern; o: out; s: sud; n: nord; e: est; we: west.

State space modeling
From the differential equations describing the thermal behavior of simplified building components above, we designed a state-space thermal building model. Where MPC method requires a state-space discrete representation of the process to be controlled. For this purpose, we used the zero-order method to transform the continuous model (5) into a discrete model assuming a suitable sampling period. The problem of controlling attenuation or disturbance rejection has been a perennial subject of control theory. However, most methodologies can only deal with systems subject to controllable and measurable disturbances, for this, the new equation of state allows the development of disturbance attenuation: where

CONSTRAINED MPC DESIGN 3.1. Objectives and motivation
The general objective of control laws is to design a control signal to ensure energy optimization by minimizing control value and improving system performance despite external climatic conditions variations and uncertainties due to the building's physical degradation [18], [19]. In practice, as for any physical system, the thermal building system is subjected to constraints on input/output signals imposed by the available actuator power and indoor conditions which be acceptable to occupants. This problem can be solved by incorporating appropriate control constraints and costs in the optimal control problem to be solved in each MPC step [20].
To achieve this objective, a control law has been developed to satisfy the regulation requirement and output monitoring based on the minimization of a cost function at every instant in the prediction horizon. We have chosen a quadratic performance criterion designed from the difference, on the one hand, between the desired response and predicted response system, and on the other hand, the control signal variation. Every sampling period, a new control law result is computed, and thermal predictions are updated in accordance with the new measurements obtained. The cost function is presented as (7): where y(k+j)k is output temperature at time k+j predicted at time k. yc(k+j)k is output temperature at time k+j desired at time k. Δu(k+j)k is control increment at time k+j designed at time k. Hp is horizon of prediction expressing the sequences number to anticipate the state values. Hc is horizon of control shows the sequences number utilized to determine the control values. h is weighting output coefficient. r is weighting control coefficient.
To design an appropriate control law within constraints limits, we use ( ) = ( ) − ( − 1) in (6) to design a new state-space representation (8). In the prediction horizon the output prediction is represented in matrix form (9) The criterion (7) is expressed as (10): H R Hp x Hp , R R Hc x Hc are square diagonal matrices. Consequently, by replacing (9) in (10) we obtain: The challenge is to obtain the lowest possible value of the criterion which depends on the control variation. The derivative of (11) according to ΔU leads to: This equation leads to an optimal increment sequence ΔUopt provided by = ( + ) −1 including Hc values of the control signal. According to the MPC strategy, only the first value is used for temperature control.

Control and output constraints
Without control limitations, the MPC's estimated control signal is limited to meet system performance and requirements [21]. The following are the limitations of the signal control in vector form: where: The sequence ΔU of increments of the control input should be designed according to the constraints of input systems specified by the following two inequalities: We define ymin and ymax as temperature range limitations depending on the desired level of comfort in the building. The output prediction sequence is constrained by the following criterion in (15). Therefore, the output temperature constraint is expressed in a compact form in (16): Where: In conclusion, the constrained MPC control approach consists of generating an optimal sequence of control increment signals at each sampling period, which is the resolution to the next optimization problem: .

Indoor occupation comfort, weather prediction, and optimal tuning parameters
It's evident that expectations of thermal comfort, while the outdoors is undergoing climate changes be it seasonal or sustainable, are increasingly significant and the occupants don't appreciate an important variability in the indoor environment [22]. The indoor occupation and comfort are introduced in the control design. The first one, allows a significant reduction in the control energy by controlling the system during occupation periods [23]. The second one is a parameter imposing constraints on indoor temperature and its variability. The external climatic uncontrollable conditions, considered disturbances, can contribute to improving the energy optimization of the control system. In fact, with the improvement of intelligent systems [24], [25], and the availability of meteorological information, it is possible to predict climate data which makes the predicted control more reliable and adapted to comfort needs in real-time [26].
All the parameters necessary for the design of the MPC control have been defined, except the optimal Hc and Hp parameters which must be analyzed. Several studies have focused on the optimal tuning parameters [27]- [29] which have a significant impact on the results. An algorithm is designed with a statistical method for an optimal choice of tunning values in Figure 1.
Like all systems, the building's physical characteristics are subjected to degradation and change. To take into account the new physical characteristics in the control design, we introduce into the control design iterative modeling over an appropriate period. Several MATLAB functions allow the modeling from the system outputs and inputs [30].

SIMULATION AND RESULTS
In accordance with the diagram shown in Figure 2, the simulation is run using MATLAB Software. In Table 1 are shown the general system parameters, output and control input signals constraints. The simulations have been carried out over two days with external disturbances: the outside temperature is measured; the solar heat is introduced in a sinusoidal form. the presence factor is considered ON during simulation time. Figure 3 shows the performance tracking of the output with tuning parameters: Hp =12, Hc=12, h=10 3 , and r=0.1, respectively without and with constraints. The optimal tuning parameters have been made according to the energy optimization and improving tracking and regulation performance. The results listed in Table 2 show the impact of Hp and Hc parameters, it contains the energy consumption data and the root-mean-square-error between the output and the desired  Figure 4 shows the impact of these parameters on regulation performance and energy savings.

CONCLUSION
This paper proposes a constrained MPC control design for building thermal control. The simulation results prove the efficiency and robustness of the adopted approach through optimal and efficient control. It has been shown that the constrained MPC approach with optimal tunning parameters from the building model permits the achievement of expected dynamic and robustness performance results face to complex physical constraints. Furthermore, reducing energy consumption by considering the comfort requirements, climatic conditions, and occupation strategies. This approach is successfully applied to control the building's internal temperature, so it can be easily applied to other processes with several constraints combined with other approaches notably real-time adaptive modeling.