# Distributed MPC for Thermal Comfort in Buildings with Dynamically Coupled Zones and Limited Energy Resources

Filipe A. Barata, Rui Neves-Silva

<figure><img src="image_1.png" /></figure>

## To cite this version:

Filipe A. Barata, Rui Neves-Silva. Distributed MPC for Thermal Comfort in Buildings with Dynamically Coupled Zones and Limited Energy Resources. 5th Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Apr 2014, Costa de Caparica, Portugal. pp.305-312, 10.1007/978-3-642-54734-8_34. hal-01274982

HAL Id: hal-01274982

https://inria.hal.science/hal-01274982

Submitted on 16 Feb 2016

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>
# Distributed MPC for Thermal Comfort in Buildings with Dynamically Coupled Zones and Limited Energy Resources

F. A. Barata¹ and Rui Neves-Silva²

¹ Instituto Superior de Engenharia de Lisboa (ISEL), R. Conselheiro Emídio Navarro 1, 1959-007 Lisboa, Portugal

² Universidade Nova de Lisboa, Monte da Caparica, 2829-516 Caparica, Portugal

{fbarata@deea.isel.ipl.pt, rns@fct.unl.pt}

**Abstract.** This paper presents a distributed predictive control methodology for indoor thermal comfort that optimizes the consumption of a limited energy resource using a demand-side management approach. The building divisions are modeled using an electro-thermal modular scheme. For control purposes, this modular scheme allows an easy modeling of buildings with different plans where adjacent areas can thermally interact. The control objective of each subsystem is to minimize the energy cost while maintaining the indoor temperature in the selected comfort bounds. In a distributed coordinated environment, the control uses multiple dynamically coupled agents (one for each subsystem/zone) aiming to achieve satisfaction of available energy coupling constraints. The system is simulated with two zones in a distributed environment.

**Keywords:** Multi-zone thermal comfort; electro-thermal analogy; DMPC, limited energy resource;

## 1 Introduction

Buildings are responsible for a large share of our global energy use. Energy use is in fact the main determinant of a buildings global environmental footprint, considering its total life span.

Reducing energy consumption in the building stock is a trend in the world today, partly because of economic, partly because of environmental reasons. Energy dissipation depends on the construction of house, the materials from which the house is built, insulation during the year, outside temperature, and additional sources of energy. Consumption of energy is predominantly determined with a selection of materials and architectural solutions, and it can be further reduced with efficient management of heating or cooling. An effective heating/cooling management is provided in the framework of predictive control, particularly Model Predictive Control (MPC), has been granted to reduce and optimize the energy consumption in
the residential sector namely to deal with temperature set points regulations [1, 2, 3]
and load management [4, 5].

The distinct advantages of MPC based control solutions compared to classical
controllers are: using also relevant future information in making control decisions
using predicted profiles (e.g. ambient temperature and solar irradiation on outside
walls), routine handling of multi-input-multi-output (MIMO) systems; routine
respecting of system constraints (e.g. finite amount of heating/cooling power in room
possible, desired room temperature spans); and explicit orientation of control actions
towards the goal which can be using least energy possible, or spending least money
possible, or causing least CO₂ emissions possible, or their combination.

Optimal control for indoor environment requires preservation of comfort
conditions for buildings occupants and minimization of energy consumption and cost
[6]. Basically, MPC makes a tradeoff between energy savings and thermal comfort.
The MPC has also advantage when controlling distributed systems [7], [8].
Distributed Model Predictive Control (DMPC) algorithms are the state of the art in
complex control problems with many interconnected subsystems. DMPC allows the
distribution of decision-making while handling constraints in a systematic way.
DMPC strategies can be characterized by the type of couplings or interactions
assumed between constituent subsystems [9].

The method of subsystems sharing coupled constraints can be seen in [9], [10]
being the strategy here presented a DMPC with coupled constraints (renewable
energy must be shared by all divisions) and dynamically coupled zones. Thus, in a
distributed coordinated environment, the control uses multiple dynamically coupled
agents (one for each subsystem/division) aiming to achieve satisfaction of coupling
constraints.

The desired approach here presented intends to take advantage from the innovative
technology characteristics provided by future Smart Grids (SGs) [11]. In the smart
world, simple household appliances, like dishwashers, clothes dryers, heaters, air
conditioners will be fully controllable in order to achieve the network maximum
efficiency.

Compared with the aforementioned literature, the novel contributions of this work
are related with the existence of a system with coupled constraints and dynamically
coupled zones in a cost function with distinct objectives allowing thermal comfort
with a consumption to weatherize the divisions inside the available power constraints.

The remaining of this paper is organized as follows: Section 2 presents the
technological contribution of this paper and Section 3 presents the system
architecture. In Section 4 is introduced the house dynamic model and the model
predictive controller is presented in Section 5. Some results and analysis are shown in
Section 6 and conclusions are drawn in Section 7.

## 2 Relationship to Collective Awareness Systems

Collective awareness is an important issue to the use of groupware systems and
virtual collaboration. From the Collective Awareness Systems (CAS) perspective,
distributed networks with multi-agents may represent systems that are able to
collectively contribute to a same objective. The analysis in this paper is on a line of technological contributions related with the CAS characteristics. Future appliances will be linked in the grid and will be fully controllable, monitored and regulated in real time in order to collaborate to achieve energy efficiency, balance between demand and supply, intelligent load control consumer comfort and CO₂ emissions reduction.

## 3 System Architecture

In this paper the large scenario considers a distributed network that involves a residential community, with electricity power source generated by their own renewable energy park. Hence, two kinds of energy are considered, the *green* that is from the renewable source and the *red* energy, from the grid. The energy from the grid is always available, although at a higher price, and it is only consumed when the *green* energy is not enough to satisfy the demand.

<figure><img src="image_3.png" /><figcaption>Fig. 1. Global scenario.</figcaption></figure>

The houses/divisions may have different plans, thermal loads, thermal characteristics, occupancy and comfort temperature bounds, and consequently with different energy needs for heating/cooling the spaces. The idea is to apply a predictive control law to maintain the temperature and power consumption inside their bounds. The *green* energy is limited and predictable and must be shared by all houses/divisions. The *red* resource consumed for comfort implies a penalty in the final cost function (6) due to the soft constraint violation. This penalization means that the maximum available *green* resource was exceeded. It is considered that the outside temperature, disturbances and daily comfort temperature bounds are known by each system inside the predictive horizon (*N*). The *green* resource that is not consumed at a certain instant is stored in batteries or delivered to the grid.

## 4 Thermal Model of the House

The idea here presented is to apply the principle of analogy between two different physical domains that can be described by the same mathematical equations. Thus, a linear electrical circuit represents the building and the state-space equations are obtained by solving that circuit. Here, the temperature is equivalent to voltage, the
heat flux to current, the heat transmission resistance is represented by electrical resistance and the thermal capacity by electrical capacity. The equivalent circuit of the building is obtained by assembling models of the walls, windows, internal mass, etc. In the case of single-zone buildings, interior walls are being part of the internal thermal mass while exterior walls are forming the building envelope. Several approaches can be seen in [12, 5] where is shown that building models can be simpler or more complex depending on the objective. Fig. 2 shows the used thermal-electrical modular approach.

<figure><img src="image_4.png" /><figcaption>Fig. 2. Generic schematic representation of thermal-electrical modular analogy for several divisions.</figcaption></figure>

The model presented in (1-3) is a low order model describing the dominant dynamics for division i [2] with adjacent area, which can be considered suitable for control proposes.

$$ \frac{dT_i}{dt} = \frac{1}{C_i} (Q_{\text{heat},i} - Q_{\text{losses},i} + Q_{\text{pd},i}), \quad (1) $$

$$ Q_{\text{losses},i} = \frac{T_{\text{out},i} - T_i}{R_{eq,i}} + \sum_{j=1}^{n} \frac{T_j - T_i}{R_{ij}}, \quad (2) $$

$$ R_{\text{eq},i} = R_{\text{roof},i} // R_{\text{window},i} // R_{\text{wall},i} + R_{\text{th},i}, \quad \text{with } R_{\text{window},i} = \sum R_{\text{window materials},i}, R_{\text{roof},i} = \sum R_{\text{roof materials},i} \quad \text{and} \quad R_{\text{wall},i} = \sum R_{\text{wall materials},i} \quad (3) $$

For several adjacent zones (1) can be generically written as follows,

$$ \begin{bmatrix} \dot{T}_1 \\ \dot{T}_2 \\ \vdots \\ \dot{T}_n \end{bmatrix} = \begin{bmatrix} \frac{1}{R_{eq1}C_1} & \frac{1}{R_{12}C_1} & \cdots & \frac{1}{R_{1n}C_1} & \cdots & \frac{1}{R_{1n}C_1} & \cdots & \frac{1}{R_{1n}C_1} \\ \frac{1}{R_{21}C_2} & \frac{1}{R_{22}C_2} & \cdots & \frac{1}{R_{2n}C_2} & \cdots & \frac{1}{R_{2n}C_2} & \cdots & \frac{1}{R_{2n}C_2} \\ \vdots & \vdots & \ddots & \vdots & \ddots & \vdots & \ddots & \vdots \\ \frac{1}{R_{n1}C_n} & \frac{1}{R_{n2}C_n} & \cdots & \frac{1}{R_{n2}C_n} & \cdots & \frac{1}{R_{n2}C_n} & \cdots & \frac{1}{R_{n2}C_n} \end{bmatrix} + \begin{bmatrix} T_1 \\ T_2 \\ \vdots \\ T_n \end{bmatrix} + \begin{bmatrix} \frac{T_{\text{out}}}{R_{eq1}C_1} + \frac{Pd_1}{C_1} \\ \frac{T_{\text{out}}}{R_{eq2}C_2} + \frac{Pd_2}{C_2} \\ \vdots \\ \frac{T_{\text{out}}}{R_{eqn}C_n} + \frac{Pd_n}{C_n} \end{bmatrix} + \begin{bmatrix} \frac{1}{C_1} & 0 & \cdots & 0 \\ 0 & \frac{1}{C_2} & \cdots & \vdots \\ \vdots & \vdots & \ddots & \vdots \\ 0 & \cdots & 0 & \frac{1}{C_n} \end{bmatrix} \begin{bmatrix} u_1 \\ u_2 \\ \vdots \\ u_n \end{bmatrix} \quad (4) $$
where in (1), $Q_{losses_i}$ is heat and cooling losses (kW), $T_i$ the inside temperature (°C), $C_i$ the equivalent thermal capacitance (kJ/°C), and $Q_{heat_i}$ the heat and cooling power (kW) and $Q_{Pd_i}$ the external thermal disturbances (kW) (e.g. load generated by occupants, direct sunlight, electrical devices or doors and windows aperture to recycle the indoor air). In (2) $T_{out}$ is the outdoor temperature (°C), $R_{ij}$ the thermal resistance between divisions, $R_{eq_i}$ the equivalent thermal resistance [3] and $R_{th_i}$ the air thermal resistance to bulk of house.

The plant model representation (1) for one division with an adjacent zone can be approximated by a discrete model using Euler discretization [13] with a sampling time of $\Delta t$.

$$T_i(k+1) = A_i T_i(k) + B_i u_i(k) + D_i T_j(k) + d_i(k), \quad (5)$$

where $A_i = \left(1 - \frac{R_{eq_i} + R_{ij}}{R_{eq_i} C_i R_{ij}} \Delta t\right)$, $B_i = \frac{\Delta t}{C_i}$, $D_i = \frac{T_j}{C_i R_{ij}} \Delta t$, $d_i = \frac{P_{di} \Delta t}{C_i} + \frac{T_{oa} \Delta t}{R_{eq_i} C_i}$, $u_i(k)$ is the

necessary heat/cooling power, $T_i(k)$ is the indoor temperature, $d_i(k)$ is a disturbance signal resulting from $P_{di}$ the external disturbances (kW) (e.g. load generated by occupants, direct sunlight, electrical devices or doors and windows aperture to recycle the indoor air), and $T_{oa}$, the temperature of outside air (°C).

## 5 Model Predictive Control Cost Function

Fig. 3 shows the implemented MPC scheme. The controllers from the areas that are thermally coupled interchange information about their state prediction as can also be seen in (7).

<figure><img src="image_5.png" /><figcaption>Fig. 3. Block diagram of the implemented MPC system in each division.</figcaption></figure>

At each time step, each one of the agents must solve his MPC problem. The cost function objectives are: minimize the energy consumption to heating and cooling; minimize the peak power consumption; maintain the zones within a desired temperature range and maintain the used power within the green available bounds. The generic problem to be solved by each agent, assumes the following form:
$$
\min_{U, \bar{e}, \bar{\varepsilon}, \bar{\gamma}, \gamma^2} \sum_{k=0}^{N-1} u_{t+k\gamma}^2 \Delta t + \phi \max\{u_{t\gamma}^2, \dots, u_{t+N-k\gamma}^2\} + \rho \sum_{k=1}^{N} (\bar{\varepsilon}_{t+k\gamma}^2 + \varepsilon_{t+k\gamma}^2) + \psi \sum_{k=1}^{N} (\bar{\gamma}_{t+k\gamma}^2 + \gamma_{t+k\gamma}^2) \quad (6)
$$

subject to the following constraints,

$$
T_{t+k+1|t} = AT_{t+k|t} + Bu_{t+k|t} + DT_{j|t+k|t} + d_{t+k|t}, \quad (7)
$$

$$
\underline{T} - \underline{\varepsilon}_{t+k|t} \leq T \leq \bar{T} + \bar{\varepsilon}_{t+k|t}, \qquad (8)
$$

$$
\underline{U}_{A_i} - \underline{\gamma}_{t+k|t} \le U \le \bar{U}_{A_i} + \bar{\gamma}_{t+k|t}, \qquad (9)
$$

$$
\underline{\gamma}_{t+k|t}, \bar{\gamma}_{t+k|t}, \underline{\varepsilon}_{t+k|t}, \bar{\varepsilon}_{t+k|t} \ge 0. \qquad (10)
$$

In (6), *u* represents the power control inputs, *φ* is the penalty on peak power
consumption, *ρ* is the penalty on the comfort constraint violation, *ψ* the penalty on
the power constraint violation and *N* is the length of the prediction horizon. In (8), *ε̄*
and *ε* are the vectors of temperature violations that are above and below the desired
comfort zone defined by *T̄* and *T*. In (9), *γ̄* and *γ* are the power violations that are
above or lower the maximum, *Ū*<sub>*A*<sub>*i*</sub></sub>, and minimum, *U*<sub>*A*<sub>*i*</sub></sub>, available *green* power for
heating/cooling the space, with *U*<sub>*A*<sub>*i*</sub></sub> = -*Ū*<sub>*A*<sub>*i*</sub></sub>.

6 Results

The presented results were obtained with an optimization *Matlab* routine. As a first approach towards developing a control structure it is considered an individual house with two divisions thermally coupled. The used parameters that characterize the house are showed in Table 1.

<table><caption>**Table 1.** Scenario parameters.</caption>
  <thead>
    <tr>
      <th>C(kJ/°C)</th>
      <th>R<sub>roof</sub> (°C/W)</th>
      <th>R<sub>walls</sub> (°C/W)</th>
      <th>R<sub>th</sub> (°C/W)</th>
      <th>R<sub>windows</sub> (°C/W)</th>
      <th>R<sub>total</sub> (°C/W)</th>
      <th>R<sub>12</sub> (°C/W)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>9.2×10<sup>3</sup></td>
      <td>0.192</td>
      <td>0.031</td>
      <td>0.038</td>
      <td>0.023</td>
      <td>0.050</td>
      <td>0.030</td>
    </tr>
    <tr>
      <th>Divisions</th>
      <th>ρ</th>
      <th>ψ</th>
      <th>Φ</th>
      <th>Δt</th>
      <th>N</th>
      <th>T(0) (°C)</th>
    </tr>
    <tr>
      <td>D1</td>
      <td>100</td>
      <td>500</td>
      <td>2</td>
      <td>1</td>
      <td>24</td>
      <td>22</td>
    </tr>
    <tr>
      <td>D2</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td>23</td>
    </tr>
  </tbody>
</table>

It is considered that the divisions have the same thermal characteristics and penalties
in the cost function. The planned thermal perturbations are, however, different for the
two divisions (Table 1 and Fig. 4(b)). The division that uses the available green
energy first is Division 1 (D1) and Division 2 (D2) uses only the remainder. By this
reason, the maximum available energy to D1 is always the maximum green available
stock, and for D2 is given by (11):

$$
\bar{U}_{A2}(k:k+N) = \bar{U}_{A1}(k:k+N) - u_2(k:k+N). \quad (11)
$$
<figure><img src="image_6.png" /><figcaption>Fig. 4. (a) outdoor temperature forecasting ($T_{oa}$); (b) thermal disturbance profile ($P_d$).</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Fig. 5. Division 1 (a) power profile; (b) indoor temperature profile.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 6. Division 2 (a) power profile; (b) indoor temperature profile.</figcaption></figure>

The outdoor temperature forecasting ($T_{oa}$) has the profile present in [14]. The comfort limits and available renewable resource vary during the 24 period and it can be seen that both indoor temperature and consumed power are always maintained inside the constrained bounds (Fig. 5 and 6). Taking advantage of the predictive knowledge of the thermal disturbance and making use of the space thermal storage, it can also be seen that in both divisions the MPC changes the indoor temperature in anticipation to the thermal disturbance (Fig. 5(b) and 6(b)).

<figure><img src="image_9.png" /><figcaption>Fig. 7. (a) Cost profile with $\psi=500$ (b) Cost profile with $\psi=1$.</figcaption></figure>

For each one of the divisions it can be seen in Fig. 7 that the “Real Cost” is much lower than the cost of only consuming the red resource “Red Cost” at a higher fixed price. To illustrate the benefit of the power constraint penalization in (6), Fig. 7(b) shows that maintaining all the other features and changing only the penalty value $D1$ had a higher cost compared with Fig. 7(a).
## 7 Conclusions

In this paper, a distributed MPC control technique was presented along with a thermal-electrical modular scheme in order to provide thermal house comfort. The solution obtained solves the problem of control of multiple subsystems dynamically coupled subject to a coupled constraint. Each subsystem solves its own problem by involving its own and adjacent rooms state predictions and also the shared constraints. Changing the penalty values, the consumer can choose in each division between indoor comfort and lower costs. It could be observed through the simulations and results analysis that suitable dynamic performances were obtained.

## References

1. Moroşan, P., Bourdais, R., Dumur, D., Buisson, J.: Building temperature regulation using a distributed model predictive control. Journal Energy and buildings 2010. Pp. 1445–1452.

2. Ma., Y, Kelman, A., Daly, A., and Borrelli, F.: Predictive Control for Energy Efficient Buildings with Thermal Storage. In: IEEE Control System Magazine, February 2012. Vol 32, n°1, pp. 44 – 64.

3. Freire, R.Z., Oliveira, H.C., Mendes, N.: Predictive controllers for thermal comfort optimization and energy savings. In: Energy and Buildings 40 (2008) 1353-1365.

4. Giorgio, A.D., Pimpinella, L., Liberati, F.: A Model predictive Control Approach to the Load Shifting Problem in a household Equipped with an energy Storage Unit. In Proceedings of the 20th Mediterranean conference on control & Automation (MED), 2012, Barcelona, Spain, pp. 1491-1498.

5. Zong, Y., Kullmann, D., Thavlov, A., Gehrke, O., Bindner, H.W.: Application of predictive control for active load management in a distributed power system with high wind penetration. In: IEEE Transactions on smart Grid, vol. 3 N° 2 June 2012, pp 1055-1062.

6. Barata F, Igreja J, and Neves-Silva R.: Model Predictive Control for Thermal House Comfort with Limited Energy Resources, in Proc. of the 10th Portuguese Conference on Automatic Control, July 2012. Pp. 146-151.

7. Negenborn R. Multi-Agent Model Predictive Control with Applications to Power Networks. In: PhD Thesis, Technische Universiteit Delft. Nederland, 2007.

8. Scattolini R.: Architectures for distributed and hierarchical Model Predictive Control – A review. In: Journal of Process Control 2009, Vol.19. Pp 723–731.

9. Trodden P and Richards A.: Distributed model predictive control of linear systems with persistent disturbances, International Journal of Control, Vol. 83, 8, 2010, pp 1653–1663.

10. Keviczky T. Borrelli F. and Balas G.: Decentralized Receding Horizon Control for Large Scale Dynamically Decoupled Systems. In: Automatica, 2006, Vol. 42, pp. 2105–2115.

11. Siano P.: Demand response and smart grids—A survey, in Renewable and Sustainable Energy Reviews, February 2014, Vol. 30, pp 461–478.

12. Hazyuk I, Ghiaus C, and Penhouet D.: Optimal temperature control of intermittently heated buildings using Model Predictive Control: Part I e Building modelling. Building and Environment 51 (2012) 379-387.

13. Luyben, W.: Process Modeling, Simulation and control for Chemicals Engineers, 2^e edition. McGrawHill.

14. Barata F, and Neves-Silva R.: Distributed Model Predictive Control for Thermal House Comfort with Auction of Available Energy, in Proceedings of SG-TEP 2012: International Conference On Smart Grid Technology, Economics And Policies.