# Distributed Model Predictive Control for Housing with Hourly Auction of Available Energy

F. A. Barata, R. N. Silva

► To cite this version:

F. A. Barata, R. N. Silva. Distributed Model Predictive Control for Housing with Hourly Auction of Available Energy. 4th Doctoral Conference on Computing, Electrical and Industrial Systems (Do-CEIS), Apr 2013, Costa de Caparica, Portugal. pp.469-476, 10.1007/978-3-642-37291-9_50 . hal-01348792

HAL Id: hal-01348792

https://hal.science/hal-01348792

Submitted on 25 Jul 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished 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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Distributed Model Predictive Control for Housing with Hourly Auction of Available Energy

F. A. Barata¹ and R. N. 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 model predictive control (DMPC) for indoor thermal comfort that simultaneously optimizes the consumption of a limited shared energy resource. The control objective of each subsystem is to minimize the heating/cooling energy cost while maintaining the indoor temperature and used power inside bounds. In a distributed coordinated environment, the control uses multiple dynamically decoupled agents (one for each subsystem/house) aiming to achieve satisfaction of coupling constraints. According to the hourly power demand profile, each house assigns a priority level that indicates how much is willing to bid in auction for consume the limited clean resource. This procedure allows the bidding value vary hourly and consequently, the agents order to access to the clean energy also varies. Despite of power constraints, all houses have also thermal comfort constraints that must be fulfilled. The system is simulated with several houses in a distributed environment.

**Keywords:** DMPC, DSM, Limited resources, Energy auction.

## 1 Introduction

Heating accounts for a significant proportion of the world's total energy demand. The building sector alone consumes 35.3%, of which 75% is for space heating and domestic water heating. In Europe, the final energy demand for heating and cooling (49%) is higher than for electricity (20%) or transport (31%) [1]. Therefore, it is important economically, socially, and environmentally to reduce the energy consumption of buildings. New models and control techniques must be developed to move beyond standard heuristic approaches and seek to incorporate predictions of weather, occupancy, renewable energy availability, and energy price signals that can support real time energy auction markets [2], [3]. The desire approach here presented intends to take advantage from the innovative technology characteristics provided by future Smart Grids (SGs) [4]. 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. Renewable energies will be a
common presence and any kW provided by these technologies should not be wasted. Active demand side management (DSM) will control the loads in order to adapt them to the available renewable energy source. Therefore, how can the demand be adjusted to an intermittent energy source in a distributed network, in order to maximize the energy efficiency?

Model Predictive Control (MPC) during the last years has been granted to reduce and optimize the energy consumption in the residential sector namely to deal with temperature set points regulations [5], [6]. Model predictive control can also naturally deal with the aforementioned predictions to improve building thermal comfort, decrease peak demand and reduce total energy costs. The optimal profile of delivered energy depends on various factors which include time varying utility prices, availability of renewable energy and ambient temperature variation. The MPC have also advantage in distributed systems [7], [8]. Distributed Model Predictive Control (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 DMPC strategy here presented uses the method of subsystems sharing coupled constraints [9], [10].

In this context, in a scenario with distributed infrastructures that are interconnected or related with each other, makes them suitable for Multi Agent System (MAS) technology, and consequently, for the autonomous management of houses and buildings.

The paper is organized as follows. Section 2 presents the technological contribution of this paper, Section 3 presents the implemented system, with the house dynamical thermal model, hourly auction scenario and DMPC formulation. Section 4 illustrates the used methodology with simulation results and in Section 5 some conclusions are drawn.

## 2 Relationship to Internet of Things

From the Internet of Things (IoT) perspective, SGs also predicts a future in which devices can communicate with one another across infrastructures much the way people communicate with one another via the web. As mentioned, simple household appliances will be linked in the grid and will be fully controllable, monitored and regulated in real time. Information will be exchanged between devices in order to manage energy demands more efficiently and incorporate the increasing amounts of renewable power from sources like the sun and wind.

Assuming that future communication infrastructures will support real time energy auction markets, the hourly auction here presented is, as far as we know, a novelty contribution for what is expected to be a nearby reality.

The work contributes with a new methodology to manage energy networks from the demand side with strong presence of intermittent energy sources. In a distributed network, the implementation of a constraint in the shared available resource consumption presented here, introduces a novelty that intends to give response to problem mentioned above. With this approach the system will try to adjust consumption to the value provided by the renewable resource maximizing the
efficiency and minimizing the consumer energy costs. The profile of delivered energy depends on several factors, such as price of conventional energy and availability of renewable energy. The MAS technology can solve the efficient management of *clean* (“green”) and *dirty* (“red”) resources, giving the priority to “green”.

# 3 Implemented System

## 3.1 Thermal Model of the House

The house for which MPC is designed is present in (1-3) and describes only the dominant dynamics of the house.

$$ \frac{dT_{house}}{dt} = \frac{1}{C}(Q_{heat} - Q_{losses}), \qquad (1) $$

$$ Q_{losses} = \frac{T_{house} - T_{oa}}{R_{eq}}, \qquad (2) $$

$$ R_{eq} = \frac{R_{wall} R_{window}}{R_{wall} + R_{window}}, \qquad (3) $$

where in (1), $Q_{losses}$ is heat and cooling losses (kW), $T_{house}$ the inside temperature (K), C the thermal capacitance (kJ/K), and $Q_{heat}$ the heat and cooling power (kW). In (3) $T_{oa}$ is the outdoor temperature (K) and the parameter $R_{eq}$ describes the equivalent thermal resistance of all walls (including roof and ceiling) and windows that isolate the house from outside, and can be described as a electrical parallel resistance circuit [5]. The plant model representation (1) can be rewritten and changed into a discrete model using Euler discretization with a sampling time of $\Delta t$.

$$ T(k+1) = AT(k) + Bu(k) + v(k), \qquad (4) $$

where $A = 1 - \frac{\Delta t}{R_{eq}C}$, $B = \frac{\Delta t}{C}$, $v = \frac{P_d}{C} + \frac{T_{oa}\Delta t}{R_{eq}C}$, $u(k)$ is the necessary heat/cooling power, $T(k)$ is the indoor temperature, $v(k)$ is a disturbance signal resulting from $P_d$ 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 (K).
## 3.2 Hourly Auction Scenario

The scenario considers two types of available energy resources, the *green* and the *red*. The *green* or *clean* resource must be always consumed (is non dispatchable) and it is limited to a maximum available value and it's considered a time variable resource. In opposition, the *red* is always available and it is considered a *dirty* resource, more expensive than the *green*. Therefore, if the *green* resource is insufficient to satisfy the demand required by the houses, the *red* must be consumed with an increase in the total energy cost. To incentive the *clean* resource consumption, it is considered that the *green* energy price per kWh has a maximum auction value (0.09€/kWh) always cheaper than the *red* energy price (0.14€/kWh). The agents (one by each house) must bid in an auction (provided by the market operator), the price that they are willing to pay to consume the *green* resource. The agents make their bid in the auction with one day ahead to show how much intend to pay per kWh to consume the *green* resource in each one of the next 24 hours. The bid can be made according to the consumption needs. Each house has a known fixed 24 hours consumption profile (Fig. 1) and it is established a priority level from 1 (low) to 3 (high), that indicates how important that hour is in terms of consumption (Fig. 3). Thus, the hours with high priority levels indicates high consumption and consequently a higher bid value (Table 1). Figure 2 show the outdoor temperature forecasts for all houses.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Fixed consumption profile of each house ($C_1, C_2$ and $C_3$).</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Outdoor temperature forecasting ($T_{oa}$).</figcaption></figure>

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

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

<figure><img src="image_6.png" /><figcaption>**Fig. 3.** Consumption priority level of each house.</figcaption></figure>
<table><caption>**Table 1.** Bid value for each consumption level by agent</caption><thead><tr><th>Consumption</th><th>Priority Level</th><th>House 1</th><th>House 2</th><th>House 3</th></tr></thead><tbody><tr><td>0-1 kW</td><td>1</td><td>2/5*0.09</td><td>3/5*0.09</td><td>1/2*0.09</td></tr><tr><td>1-2 kW</td><td>2</td><td>7/10*0.09</td><td>4/5*0.09</td><td>2/3*0.09</td></tr><tr><td>&gt;2 kW</td><td>3</td><td>8.5/10*0.09</td><td>9/10*0.09</td><td>3/4*0.09</td></tr></tbody></table>

The bid value establishes an order to access to the resource, being the green resource consumption made by the agents sequentially by that order. The first agent consumes and the remainder green resource is passed to the next agent as the maximum green available resource. As mentioned, when the green resource becomes insufficient to satisfy all the demand, the red resource is available. The red resource consumption implies a penalty in the final cost function (3) due to the soft constraint violation imposed by the maximum available green resource is exceeded.

### 3.3 Model Predictive Control

MPC principle of controlling house heating and cooling is to react on the heating/cooling actuators based on current measurements/estimates of temperatures in $T(k)$ and predictions of future disturbances in $v(k)$ (obtained from the weather forecast service). The MPC will explicitly take into account the constraints of heating/cooling actuators and the temperature comfort limits while minimizing the energy inserted from the actuators in the one-day-ahead period. The 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. At each time step, each one of the agents must solve is MPC problem.

$$ \begin{aligned} \min_{U, \bar{\epsilon}, \bar{\gamma}, \bar{\underline{\gamma}}} & \sum_{k=0}^{N-1} u_{t+k\underline{l}t}^2 \Delta t + \phi \max\{u_{t\underline{l}t}^2, \dots, u_{t+N-1\underline{l}t}^2\} \\ & + \rho \sum_{k=1}^{N} (\bar{\epsilon}_{t+k\underline{l}t}^2 + \underline{\epsilon}_{t+k\underline{l}t}^2) + \psi \sum_{k=1}^{N} (\bar{\gamma}_{t+k\underline{l}t}^2 + \underline{\gamma}_{t+k\underline{l}t}^2), \end{aligned} \quad (5) $$

Subject to the following constraints,

$$ T_{t+k+\underline{l}t} = AT_{t+k\underline{l}t} + Bu_{t+k\underline{l}t} + v_{t+k\underline{l}t}, \quad (6) $$

$$ \underline{T} - \underline{\epsilon}_{t+k\underline{l}t} \le T \le \bar{T} + \bar{\epsilon}_{t+k\underline{l}t}, \quad (7) $$

$$ \underline{U}_{A_i} - \underline{\gamma}_{t+k\underline{l}t} \le U \le \bar{U}_{A_i} + \bar{\gamma}_{t+k\underline{l}t}, \quad (8) $$

$$ \underline{\gamma}_{t+k\underline{l}t}, \bar{\gamma}_{t+k\underline{l}t}, \underline{\epsilon}_{t+k\underline{l}t}, \bar{\epsilon}_{t+k\underline{l}t} \ge 0. \quad (9) $$

In (5), $u$ represents the power control inputs, $\phi$ is the penalty on peak power consumption, $\rho$ is the penalty on the comfort constraint violation, $\psi$ the penalty on
the power constraint violation and N is the length of the prediction horizon. In (7), $\bar{\epsilon}$ and $\bar{\varepsilon}$ are the vectors of temperature violations that are above and below the desired comfort zone defined by $\bar{T}$ and $\bar{T}$. In (8), coupled constraint, $\bar{\gamma}$ and $\bar{\gamma}$ are the power violations that are above or lower the maximum, $\bar{U}_{A_i}$, and minimum, $\underline{U}_{A_i}$, available green power for heating/cooling the space, with $\underline{U}_{A_i} = -\bar{U}_{A_i}$. A scheme of the system implemented is shown in the next picture.

<figure><img src="image_7.png" /><figcaption>Fig. 4. Implemented system.</figcaption></figure>

$$C_i = [c_i(k), \dots, c_i(k+N)]^T, \qquad (10)$$

$$U_{Tgreen} = [\|u_{Tgreen}(k)|, \dots, \|u_{Tgreen}(k+N)\|^T, \qquad (11)$$

$$u_i = [\|u_i(k)|, \dots, \|u_i(k+N)\|^T, \qquad (12)$$

where, for a generic Agent i at the control horizon, $\bar{U}_{A_i}$ represents the green available resource for indoor comfort, $U_{Tgreen}$ represents the green available total resource, $C_i$ the fixed consumption profile and $u_i$ the used power to heating/cooling the space that results from the optimization program.

# 4 Results

The presented results were obtained with an optimization Matlab routine that finds a constrained minimum of a quadratic cost function that penalizes the sum of several objectives. It is considered that all houses have the same outdoor temperature presented in Fig. 1. The thermal characteristics, load disturbances profile (Fig. 4) and comfort temperature bounds are different for all houses (Table 2). Agents can also have distinct penalties on power and temperature constraints violations, they can hourly privilege comfort or cost according to consumer choice. Here, is assumed that the penalty values of each agent are always the same. Table 2 shows the used parameters.

In the figures here presented, the subtitles “Power constraint” represents $\bar{U}_{A_i} = \bar{U}_{A_{i-1}} - u_{i-1} - C_i$, “Green resource” represents $\bar{U}_{A_{i-1}} - u_{i-1}$ and “Heating/Cooling used power” represents $u_i$.
<table><caption>**Table 2.** Scenario parameters</caption><thead><tr><th>Parameter</th><th>A<sub>1</sub></th><th>A<sub>2</sub></th><th>A<sub>3</sub></th><th>Units</th></tr></thead><tbody><tr><td>R<sub>eq</sub></td><td>50</td><td>25</td><td>75</td><td>K/kW</td></tr><tr><td>C</td><td>9.2×10<sup>3</sup></td><td>4.6×10<sup>3</sup></td><td>11×10<sup>3</sup></td><td>kJ/K</td></tr><tr><td>ρ</td><td>100</td><td>100</td><td>300</td><td>-</td></tr><tr><td>ψ</td><td>500</td><td>200</td><td>300</td><td>-</td></tr><tr><td>φ</td><td>2</td><td>2</td><td>2</td><td>-</td></tr><tr><td>Δt</td><td>1</td><td>1</td><td>1</td><td>H</td></tr><tr><td>N</td><td>24</td><td>24</td><td>24</td><td>-</td></tr><tr><td>T(0)</td><td>297.15</td><td>296.15</td><td>297.15</td><td>°K</td></tr></tbody></table>

<figure><img src="image_8.png" /><figcaption>**Fig. 5.** Disturbance forecasting ($P_d$).</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>**Fig. 6.** A<sub>1</sub>, A<sub>2</sub> and A<sub>3</sub> indoor temperature and their constraints.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Fig. 7.** Used power to heat/cool and their constraints.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Fig. 8.** a) Total available green resource and used power. b) Heating/cooling total cost.</figcaption></figure>

In Figure 6, it can be seen that the comfort constraint is respected, the indoor temperature is always inside the comfort zone for all agents. Taking advantage of the predictive knowledge of the disturbance ($P_d$) and making use of the space thermal storage, it can also be seen that in both scenarios the MPC treats the indoor temperature before the disturbance beginning. The used power to heat/cool the space is maintained inside the constrained bounds. Note that when the “Power Constraint” is null the used power is also null, Fig. 7. The “Used Power”,
$U_{used}(k) = \sum_{i=1}^{3} [u_i(k) + C_i(k)]$, is sometimes above the daily maximum green available resource, meaning that the red resource was consumed, Fig 8(a). Figure 8(b) illustrates the effectiveness of the approach and demonstrates the advantage of the auction. For each one of the agents it can be seen that the “Real Cost” is much lower than the cost of not to bid in auction and only consume the red resource “Red Cost”.

## 5 Conclusions

In this paper, a distributed MPC control technique was presented in order to provide thermal house comfort. The obtained solution solves the problem of control of multiple subsystems subject to coupled constraint that changes hourly. Each subsystem solves its own problem involving its own state predictions and the shared constraints. It could be observed through the simulations and results analysis that were obtained suitable dynamic performances. Despite access orders being changing hourly, the predictive characteristics of the implemented system were not lost, being the soft constraints, temperature and power satisfied. By changing the penalties values during the day, the implemented system also allows the consumer to shift hourly between indoor comfort and lower costs.

## References

1. ESTTP. Solar Heating and Cooling for a Sustainable Energy Future in Europe.

2. Rosen, C., Madlener, R.: An auction mechanism for local energy markets: Results from theory and simulation. In: Complexity in Engineering (COMPENG), 2012, Pages 1-4.

3. Ramachandran, B., Srivastava, S., Cartes, D., Edrington, C.: Distributed energy resource management in a smart grid by risk based auction strategy for profit maximization. In: 2010 IEEE Power and Energy Society General Meeting, Pages 1-7.

4. Perrod, P., Critchley, R., Catz, E., Bazargan, M.: New participants in SmartGrids and associated challenges in the transition towards the grid of the future. In: IEEE Bucharest Power Tech Conference, 2009, Bucharest. Page(s): 1-5.

5. Moroşan, R., Bourdais, D., Dumur and J. Buisson.: Building temperature regulation using a distributed model predictive control. In: American Control Conference (ACC), 2010. Pp. 3174-3179.

6. 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.

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. In: 2010 International Journal of Control, Vol. 83, No. 8.

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.