Model Predictive Control a pplied for building thermal [600661]

Model Predictive Control a pplied for building thermal
control

Giorgian Neculoiu, Valentin Dache, Grigore Stamatescu, Valentin Sgarciu
Faculty of Automatic Control and Computers
Politehnica University of Bucharest
Bucharest, Romania
[anonimizat], [anonimizat], [anonimizat], [anonimizat]

Abstract — This paper presents an optimal strategy for
thermal control of a real building. The control algorithm uses a strategy based on model predictive control MPC (Model
Predictive Control). In this control strategy, in order to improve
system performance regarding the comfort and the energy consumption, weather forecast and occupancy of the building program are taken into consideration. To achieve optimal control
of a building or to characterize its energy performance, one of the
steps to follow is experimental identification of the dynamic model for heat transfer of that building. Using such a calculated model for the presented house, the implemented strategy provides better outcomes than other control solutions based on
classical PID controllers.
Keywords— Model Predictive Control; optimal control; thermal
control strategy; low-order model.
I. INTRODUCTION
When we discusse about building thermal control, their
thermal behavior must be taken into consideration which is characterized by a great inertia. It is strongly influenced by the weather forecast and the type of occupancy of the building. Thermal control has an important impact on energy consumption, especially in residential and tertiary sectors, where space heating is responsible for over 50% of all energy consumed [1].
However, most of the buildings have an intermittent
occupancy which implies an alternative reference for the internal temperature, but it brings savings in terms of energy consumption. In this situation, the comfort during the occupied period must not to be affected by the energy economics. People’s discomfort is more disadvantageous than the cost required for building maintenance [2].
A first method of reducing energy consumption can be
represented using conventional methods obtained by developments in mechanical and civil engineering (envelope thermal insulation, changing the windows etc.). The fact that considerable additional investment is needed not always turn these methods into energy reduction perfect solutions. Another solution for reducing energy consumption in buildings, a better solution that requires minimal additional costs, is represented by the establishment or improvement of a building's energy management system (BEMS). The aim of the study is to present a method used to achieve
thermal control of a building, presented as an optimal control problem. In order to predict future behavior, physical buildings can be represented by a mathematical model that takes into account their selected operating strategy, weather forecast and occupancy schedule. The main goal is to minimize energy consumption in compliance with all requirements on comfort. In order to minimize energy consumption, way we have to find a control strategy to satisfy those needs. Similarly, an advanced technique of building control will be described in this paper, denoted as Model Predictive Control (MPC).
In this paper, the building will be represented by a model in
which its physical knowledge is employed and the physical parameters of the model are identified using the method of least squares [3].
Finally, to verify the system performance, proposed control
algorithm is implemented via a microcontroller in a Building Energy Management System (BEMS) in order to test and compare the performance of another system based on classic PID controller.
II. C
URRENT HEATING CONTROL STRATEGIES
A. State of the art
In the following, we will compare briefly the most
important control techniques of heating a building with the proposed implementation of the MPC.
The simplest type of thermal control of a building is the
room temperature control through on-off principle. By using this method, the heating devices in the room is switched on and off depending on a certain room temperature error value ( e
θ =
θset-point – θroom), usually implemented as appropriate hysteresis
curves Con-off:
G = C on–off(eθ ). (1)
This is a type of command with feedback and is
characterized by its simplicity. The problem is that it does not contain any information about the system dynamics.
Another method of control is represented by the weather
compensated control, which is a feed-forward control. As with
the above method, the problem is represented by the fact that it
contains no information about the dynamics of the system. Heating environment represented by water ( θ
water) has set the

temperature depending on the outside temperature θoutside by a
predetermined heating curve Gw-c:
θwater = G w-c(θoutside ). (2)
The control strategy based on PID controllers use is the
most employed thermal control strategy in buildings. This is also a type of command with feedback, but unlike the other two strategies presented, it contains some information about the dynamics of the system ( θ
water heating water temperature, is
determined by eθ room temperature error, and a certain history
– history ) [4]:
θwater = f PID(eθ,history). (3)
From the studies made on thermal control strategies of the
buildings, it appears that in most buildings, the radiators are
fitted with thermostatic valves heads. If we relate to energy
savings obtained following the implementation of this type of control, the results are not very good, mainly because of the lack of experience of users who do not use them as constructive and technical characteristics. One of the negative effects of misuse of their premises is overheating. To mitigate this effect, these valves are equipped with PID controllers. In most cases, they are not specifically designed for energy saving, their feedback loops inserting a delay between the reference set-point the room temperature, so the comfort is negatively affected [5-6].
When we work with single-input, single-output (SISO)
systems, regulating them is easily accomplished using control strategies from the above. This problem becomes more difficult to implement when accomplishing desired control for multiple-input multiple-output (MIMO).
In order to satisfy the demands for control of these systems
(MIMO), we have to take into consideration another strategy to have feedback control ( e
θ error is used), use as many possible
variables (the temperature outside θoutside, the weather forecast
θpredicted , and others information x) and also to include system
dynamics ( history ):
twater = f MPC(eθ, θoutside , θpredicted , x, history). (4)
To apply this control strategy for MIMO systems, which
are typical for heating systems, a good solution can be the use of Model Predictive Control (MPC).
B. Requirements in building thermal control
The thermal comfort and energy savings are the two
thermal control requirements of the building. The requirement related to thermal comfort is assessed by a temperature range (defined by a lower and an upper limit) where the indoor temperature have to be. The specified temperature range varies for occupied and unoccupied periods. During occupied period (occupancy), this temperature range is called the comfort zone and during unoccupied period – safety zone (Fig. 1).
To supply the fact that the building dynamic is quite slow
(the building has high inertia), the heating process will be started in advance, so that at the beginning of the occupied period the temperature does not stay under the comfort zone.
When we desire to increase the indoor temperature, the
heating system will consume energy. Minimum energy control strategy will act against this temperature increase, attempting to conserve an acceptable lower limit. Counting that in this study,
the building cooling is not included, defining the lower limit of comfort and safety zones is sufficient for comfort requirements.
When you consider that the energy price may be fixed or
variable, economic criteria can be formulated as:

∫=
te dtttp F )()(φ
, (5)
where p(t) is a weight factor, related to energy price and (t) is
the heat flux that is delivered in the building. If the energy price is constant throughout the day, minimizing F
e function is
equivalent to minimize energy consumption. When the price varies during the day, weight factor p(t) is modulated in time
depending on the energy price. Minimizing F
e criterion of the
(5) is the second performance requirement in the building thermal control.
Minimizing a cost function on a well-defined future time
horizon, can be calculated by the MPC via command sequences. The performance incorporated into the cost function is predicted using a model of the building, of the future reference points variation and future disturbance variation. Since the building model is indispensable for the MPC we can
find algorithms using classical formulations, using transfer
functions, state space and convolution models [7].
A building model can be naturally defined by state space
representations, but MPC is easier to understand in discrete-time than in continuous time [8]. Thus, in this paper we use the MPC algorithm on discrete-time based on a state-space model.
If we take into account only the building heating, the indoor
temperature must be above the lower limit's comfort zone / safety. Since the heat flux is the manipulated variable u and the indoor temperature is output of the system, y, the new formulation of the MPC problem is [3]:
Minimized cost function:
∑=+ =uN
iipu pF1) ( )(
With the next conditions:
y minu max
1…Nj ), ( ) (ˆ1…Ni , ) ( 0
= + ≥+= ≤+ ≤
jp jpyuipu
θ, (6)
where u(p+i) is the power heating system, which should be
positive on all the future command horizon- Nu , umax is the
maximum power of the heating system, θmin is the lower bound
of the comfort / safety zones, being the only limit in heating. The predicted output of the system for the next time samples-
N
y isyˆ. The prediction horizon value- Ny will be chosen so as to
be higher than the unoccupied period, in order to ensure the
solution under dynamic constraints introduced by the inertia of the building and because of the occupation end, so that the optimization problem can catch the beginning of the next period occupation.

Fig. 1. Comfort requirements and possible scenarios for indoor temperature.

C. The optimization problem
Solving the optimization problem in (6) provides finding
the command sequence made for dealing with the system. This problem is solved by the MPC. Since the problem is formulated in linear form and knowing that the system is a linear model, this can be solved by linear programming (LP). For this operation, the control problem (4) must be formulated in the following canonical form:
Minimized cost function: a
Tu
With the next conditions: N u≤b , (7)
where a, b and N are vectors and matrix of known coefficients,
and u is the vector of variables, which in our case is the control
sequence.
The novelty that occurs when LP canonical form (7) is that
in order to estimate future output, yˆ, from (6), it is necessary to
extract the system model. This can be easily done because the
system can be represented by a discrete linear representation in states-space:

⎩⎨⎧
+ + =+ + =+
)( )( )( )()( )( )( )1 (
22 1
pwD pDu pCxpypwB puB pAx px
, (8)
where u is the manipulated entry system (heat flux) and w
represents the inputs (disturbances), measurable, but uncontrollable (outside temperature and solar radiation).
Thus, predicting future output
yˆ from matrix form is:
d u pGxy2 1)( ˆ β β+ + =, (9)
where the matrix G, 1β and 2β are model functions with
constant parameters, and the vectors are:
T
yT T T TT
yT
y
Npw pw pwpw dNpu pu pupu uNpy py py py y
)]1 ( … )2 ( )1 ( )([)]1 ( … )2 ( )1 ( )([)] (ˆ … )3 (ˆ )2 (ˆ )1 (ˆ[ˆ
− + + + =− + + + =+ + + + =
. (10)
We can observe in (9) that predicting future output depends
only on the current state, x(p), and on the current and future
input u(p) … u(p + N y – 1), and the disruptions w(p) … w(p + N y
– 1). Future interference usually can be obtained from the
weather forecast. By defining the lower limit of safety / comfort zone in vector form is:
T
yNp p p p y )] ( … )3 ( )2 ( )1( [min min min min min + + + + = θ θ θ θ.(11)
Defining in vector-shaped the lower limit safety / comfort
zone for Ny, time horizon, as in (11), and replacing (7) in
predicting future output by (9), optimization problem in canonical form is:

Minimized cost function: aTu    
If: ⎥⎥⎥
⎦⎤
⎢⎢⎢
⎣⎡
− +≤
⎥⎥⎥
⎦⎤
⎢⎢⎢
⎣⎡
−−
min 2max
1 )(0
yd pGxau uII
β β , (12)
where a and I are the vector unit and identity matrix of
appropriate size of the appropriate system. Thus, by using LP to solve the optimization problem of (12), the control strategy is obtained which maintains the indoor temperature over a
lower limit with minimum energy consumption.
III. M
ODEL PREDICTIVE CONTROL
A. State of the art
Model Predictive Control (MPC) minimizes discomfort and
energy criteria by including in the weather forecast control strategy, the future employment program established by points and constraints from optimization. In simulation studies, MPC has proved to be more efficient than other controllers tested in terms of energy consumption and comfort criteria [9]. There are also practical tests showed that the simulation results are maintained in practice too [10-12].
B. Building modeling
To estimate the future outputs, MPC needs a dynamic
model of the system. Even if there is very good theoretical basis to determine the system, identifying practically a model for a building remains by far an intractable problem.
For conducting experiments, we used data from a typical
house, with a footprint of 100 m
2. The houses are situated in
Germany (near Munich). The elevation above mean sea level (MSL) is 680 m (Fig. 2).
The recorded data for the weather correspond to the time
zone of Germany (near Munich) from August 2013 to April 2014. The meteorological records were realized for the outside temperature and for the solar radiation. The measurements were performed in order to record air temperature through ventilation. The total amount of solar radiation was obtained by calculating the amount of solar glare on each side of the tire, multiplied by its surface [13].
In order to obtain a low order model of the building, there
are two stages. First, based on physical knowledge about the building and a model structure is obtained from a representation of the focused capacity building through thermal networks. In the second stage, the model parameters are
obtained by experimental identification.
For buildings, especially when you want the control
internal parameters, models are usually inferior and obtained through linear network focused parameters. In this case, an analogy is made between two different physical domains through the same mathematical representations. In the case of building, the model construction is represented by a linear

Fig. 2. The plan of the reference building

electric circuit, and the state-space equation results from
solving this circuit. Considering a building that is approximated as a single thermal zone, as shown in Fig. 2, linear thermal network is equivalent to that shown in Fig. 3.
Building envelope is represented by a network 2R-C. The
envelope, windows, ventilation, infiltration and internal thermal mass are considered passive components of the building. Stored thermal capacity is represented by
Cp and the
wall insulation is represented by conductive resistances Rp1 and
Rp2. Thermal resistance located at the boundary between the
tire and indoor air and outdoor air is represented by convective resistances
Rsi and Rse. The heating capacity of the internal
mass is represented by Cz and ventilation and infiltration in the
building are the resistance Rv. Outside temperature, ventilated
air temperature, solar radiation and internal heat flow are
considered as being active components of the building.
In this case, the voltage source refers to the temperatures,
the current source refers to the heat flow, the electrical resistance refers to resistance heat transmission and the thermal capacity replaces the electrical capacity of the model.
Indoor temperature,
zθ represents the exit system, and in
this case, it is influenced by four inputs: outdoor temperature, solar radiation, internal heat flow and ventilated air temperature.
Internal heat flow has a controllable size, and it is usually
the command system. Outdoor temperature, solar radiation and ventilated air temperature are uncontrollable sources, but measurable.
In order to obtain state-space equations for the circuit
shown in Fig. 3, it is necessary to apply the superposition theorem. By separating controllable and uncontrollable inputs, we obtain the following multi-input single-output (MISO) state-space model:

wDuD CxywBuB Axx
2 12 1
+ + =+ + = , (13)
where T
p x ] [zθθ=is the state vector ( pθ is the wall
temperature and zθ is the zone temperature; yis the output of the system; elp uφ= is the command; T
s ep ev QTT w ] [= are the
measurable disturbances of the system ( Tev is supply air
temperature, Tep is the outdoor air temperature and Qs is the
solar radiation on the walls). The matrix dimensions that are involved in the MISO system are: A matrix dimension is 2×2, B
1 matrix dimension is 2×1, B 2 matrix dimension is 2×3, C
matrix dimension is 1×2, D 1 matrix dimension is 1×1 and D 2
matrix dimension is 1×3.
Since the used model is defined for a building with a single
area, the system output is considered to be the average
temperature of the building. This value is calculated as the
area-weighted average temperature of the rooms.
For a system as the one presented in this paper, the link
between inputs and outputs can be represented as a set of transfer functions obtained from the following relation:

S S S S S D B A sIC H + − =−1) (. (14)
Using the least squares method to identify the discrete
transfer function parameters of the system, the following form of the building model will be obtained. In this way, we can identify the parameters
m1, m2, n11 … n 42:
⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟
⎠⎞
⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜
⎝⎛
+ +++ ++ ++ ++
=
⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟
⎠⎞
⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜
⎝⎛
=− −− −− −−− −−− −− −
−−−−−−−−

2
21
12
421
412
21
12
322
21
12
222
21
12
121
11
11111111
1
1111
)()()()()()()()(
)(
zm zmzn znzm zmznzm zmznzm zmzn zn
z QzzQzzTzzTz
zH
elpzszepzevz
θθθθ
. (15)
The parameters n11 and n12 correspond to the system output
when it interacts with the ventilated air temperature variation, parameter
n22 corresponds to the system output when it
interacts with the outside air temperature variation, n32
parameter corresponds to the system output when it interacts with the solar flux variation incident on the building envelope and the parameters
n41 and n42 correspond to the system output
when it interacts with the internal heat flux variation.

Fig. 3 Equivalent linear thermal network representation of a low-order thermal model of a building

IV. MPC PERFORMANCE EVALUATION
The thermal control system performance used in tests
(MPC controller-based system) are assessed in comparison with those of a conventional PID regulator based system. These systems are actually subsystems that are incorporated in the BEMS system of the building. BEMS system function is to power each pump and valve of the heating system, in order to maintain the indoor temperature above the minimum imposed level using a small amount of energy.
The indoor temperature is controlled by the proposed MPC
algorithm which is implemented in a microcontroller. The results are compared to those offered by a PID controller based
system that servers the same purpose. Having these given
solutions and the dynamic model of the building, the results that are subjected to performance comparison are obtained by emulating the thermal behavior of the building.
As we are talking about a house with different occupancy
program (the period of occupied and unoccupied period) at the beginning of the occupied period, the temperature will be increasing unitary in the range 17°C – 22°C. Given the building large inertia, the temperature reaches the respective level in a certain delay. To avoid this drawback, the heating system must be restarted in advance.
A. Performance comparison criteria
To get a good performance comparison of the two control
systems, it is necessary to establish the criteria that meet this performance. Actuators and heat pumps are usually found as parts of the control system. These equipments are quite expensive and sensitive to frequent start-stop cycles. Therefore, a special feature of the control system is the command aggression which refers to the number of start-stop cycles and has a decisive weight for driving ageing.
The system performance criteria can include: • Number of start-stop cycles
The system considered in this paper uses a heat pump
which is very sensitive to several reboot cycles. A possible malfunction of the heat pump leads to an increase of the system maintenance cost. A smaller number of reboot cycles is considered to be better for the actuator ageing decrease [14].
• Optimum start
The ability to restart heating at the right time is one of the
main points of a BEMS system. This process is made in order to recover the building in time from the benchmark set for the night. European Standard EN 12098-2 provides clear indications for optimum system startup test. This test is passed if the indoor temperature passes through the optimum check window at start which provides a temperature interval of 1°C
for 30 minutes [15-16].
• Excessive PPD weight
Excessive PPD weight, introduced by European Standard
EN 15251, measures the thermal discomfort of the people for a certain period of time [17]. This weight can be calculated from the index values that give information about the discomfort instantly. These indices are Predictive Mean Vote (PMV) and Predicted Percentage of dissatisfied people (PPD), which are also used by many international regulations. Presuming that
PPD min = 10% represents the lower limit of
the comfort zone [16], the calculation of the excessive PPD weight for the occupied period can be defined as:
⎪⎩⎪⎨⎧
≤>=
10 ,010 ,
min
PPD candPPD candPPDPPD
wf
. (16)
From equation (16), we can use the weight distribution
function obtained for the excessive PPD weight calculation as a sum of the weight function values multiplied by the time interval each distinct value was obtained in:

∑=⋅ =n
i wf iit wf h PPD1., (17)
where n represents the number of weight function distinct
values and twfi represents the time at which the weight function
value was obtained.
B. The results of the experimental test
In the experimental test that was performed, we used two
different BEMS systems (MPC control strategy based system that was implemented in a microcontroller and control strategy based system that was implemented on classical PID controllers). Using the reduced order model presented and applied on the building from Fig. 3, the tests were performed by emulation. To carry out the tests, two periods of five representative days for winter weather and summer weather were selected. The reason for this choice was the outdoor temperature amplitude variation that leads to the frequent start / stop of the heating system.
Outdoor temperature and solar radiation level variations for
the five days considered can be seen through Fig. 4 and Fig. 5. As shown in the paper, as limits for the benchmark to be followed will consider only the lower limit of the comfort / safety zone. For our example, the lower limit is 22°C for the occupied period (7:00 a.m. to 10:00 p.m.) and 17°C for the unoccupied period (10 p.m. to 7 a.m.).
After the implementation of the two presented control
strategies, the indoor temperature variations are shown in Fig. 6. It can be seen that the average temperature obtained through the control strategy based on PID controller is generally higher than the MPC control strategy based result. However, in case of the MPC control strategy, the temperature does not fall below the lower limit of the comfort / safety zone, which means that MPC strategy is a good solution. This means that the method of tuning using PID controller has consumed more
energy than necessary.
In terms of comfort, it can be seen that at the beginning of

Fig. 4. Outdoor air temperature samples for test periods .

occupied period PID controller has an unfavorable behavior. It
restarts the heating when the reference point changes and introduce a gap between the indoor temperature and reference point. As it is expected, the PID controller has not passed the test of optimal start.
For the winter testing period, MPC has consumed the least
amount of thermal energy for heating and offered the best thermal comfort. Although the energy savings achieved are not as substantial (4.5% compared to PID), improving thermal comfort is visibly higher, excess-weighted PPD being reduced by 77% compared to PID.
C
ONCLUSIONS
In this paper, using a reduced order model through which it
is possible to study the thermal behavior of a building, it was studied the control performance achieved by implementing a control strategy based on MPC technology, compared to a control strategy based on PID controller.
The building was considered as a model with a single
thermal area for which the state-space representation was calculated. Within this paper, there were considered four inputs. The model output was defined as a weighted average of
the room temperatures.
The performance regarding thermal control and total energy
consumption of the heating system was evaluated for both control strategies. Their comparison showed that MPC control strategy reduces thermal discomfort and energy consumption. The optimum start test was passed just by the MPC, which means that the MPC is able to adapt to current weather
conditions.
A
CKNOWLEDGMENT
The work has been funded by the Sectoral Operational
Programme Human Resources Development 2007-2013 of the Ministry of European Funds through the Financial Agreement POSDRU/159/1.5/S/132397.
Grigore Stamatescu’s work has been supported by the
Romanian Executive Agency for Higher Education, Research,
Development and Innovation Funding (UEFISCDI) through
the project ”Intelligent Decision Support System applied to
Low Voltage Electric Networks with Distributed Power
Generation from Renewable Energy Sources” (InDeSEN).
REFERENCES
[1] ADEME, Chiffres clés du Bâtiment – Energie – Environnement, 2010
ed. Agence de l'Environnement et de la Maîtrise de l'Energie, 2011.
[2] D.N. Wand, Economic cost of Thermal Discomfort and its Application
in Building Environmental Control, University of California, Berkeley,
2005.
[3] I. Hazyuk, C. Ghiaus, D. Penhouet, Optimal temperature control of
intermittently heated buildings using Model Predictive Control: part II
— control algorithm, Build. Environ. 51 (2012) 388–394.
[4] Samuel Privara, Jan Siroky, Lukas Ferkl, Jiri Cigler, Model predictive
control of a building heating system: The first experience, Energy and
Buildings 43 (2011), 564-572.
[5] Z. Liao, M. Swainson, A.L. Dexter, On the control of heating systems in
the UK, Build. Environ. 40 (2005) 343–351.
[6] L. Peeters, J. Van der Veken, H. Hens, L. Helsen, W. D'Haeseleer,
Control of heating systems in residential buildings: current practice,
Energy Build. 40 (2008) 1446–1455.
[7] E.F. Camacho, A.C. Bordons, Model Predictive Control, 2nd ed.
Springer-Verlag, London, 2004.
[8] L. Wang, Model Predictive Control System Design and Implementation
Using MATLAB, Springer-Verlag, London, 2009.
[9] B . P a r i s , J . E y n a r d , S . G r i e u , T . T a l b e r t , M . P o l i t , H e a t i n g c o n t r o l
schemes for energy management in buildings, Energy Build. 42 (2010)
1908–1917.
[10] T.Y. Chen, Real-time predictive supervisory operation of building
thermal systems with thermal mass, Energy Build. 33 (2001) 141–150.
[11] T.Y. Chen, Application of adaptive predictive control to a floor heating
systemwith a large thermal lag, Energy Build. 34 (2002) 45–51.
[12] P. Gruber, M. Gwerder, J. Tödtli, Predictive Control for Heating
Applications, 7th REHVA World Congress (Clima 2000/Napoli 2001),
2001. (Napoli, Italy).
[13] Paul Strachan, Ingo Heusler, Matthias Kersken. Maria Jose Jimenez,
“Test Case Twin_House_Experiment_2. Validation of Building Energy
Simulation Tools (Subtask 4). Version 4”, IEA ECB Annex 58, 2014.
[14] I. Hazyuk, C. Ghiaus, D. Penhouet, Model Predictive Control of thermal
comfort as a benchmark for controller performance, Automation in
Construction 43 (2014) 98–109.
[15] CEN, Indoor Environmental Input Parameters for Design and
Assessment of Energy Performance of Buildings Addressing Indoor Air Quality, Thermal Environment, Lighting and Acoustics, European
Committee for Standardization, Brussels, Belgium, 2007.
[16] CEN, Controls for Heating Systems — Part 2: Optimum Start–Stop
Control Equipment for Hot Water Heating Systems, European
Committee for Standardization, Brussels, Belgium, 2001.
[17] D. Kolokotsa, A. Pouliezos, G. Stavrakakis, C. Lazos, Predictive control
techniques for energy and indoor environmental quality management in
buildings, Build. Environ. 44 (2009) 1850–1863.

Fig. 6. Comparisons of the indoor temperature evolution obtained with PID
and MPC controllers in (up) winter and (down) mid-season.

Fig. 5. Beam and diffuse solar radiation samples for test periods.

Similar Posts