Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Building and Environment 133 (2018) 237–245

Contents lists available at ScienceDirect

Building and Environment


journal homepage: www.elsevier.com/locate/buildenv

Design and construction of a non-linear model predictive controller for T


building's cooling system
Arash Erfani, Abbas Rajabi-Ghahnaviyeh, Mehrdad Boroushaki∗
Department of Energy Engineering, Sharif University of Technology, P.O.Box 14565-114, Azadi Ave, Tehran, Iran

A R T I C L E I N F O A B S T R A C T

Keywords: This research aims to optimize a multi-zone Air Handling Unit's (AHU) energy consumption by using a Non-
Model predictive control linear Model Predictive Control (NMPC) approach. In this paper, Genetic Algorithm (GA) and Non-linear au-
Building energy saving toregressive network with exogenous inputs (NARX) have been utilized to design NMPC for a multi-zone AHU.
NARX modeling The NMPC problem could be divided into two main sections: internal model and the optimizer. NARX serves as
Building management system
the controller's internal model to predict the building's thermal dynamics. GA is then used to solve the NMPC
HVAC control
Multi-zone building
problem and find the optimal value of the control signals at each time step. The proposed NMPC jointly mini-
mizes energy consumption of the AHU and the deviation from the set-point temperature. Finally, the designed
controller was implemented and applied to the mentioned AHU. Also, a data acquisition system has been fab-
ricated to secure training and test data for NARX. Utilizing NARX for modeling system's dynamics resulted in a
highly accurate model with an accuracy of 97.71%. The empirical results of the proposed NMPC showed sig-
nificant reduction in gas and electricity consumption of the AHU. NMPC yielded a 55.1% and 43.7% reduction in
electricity and gas consumption of the AHU respectively.

1. Introduction vector that minimizes a certain objective function over a control hor-
izon [5]. Model Predictive Controller (MPC) is suitable for controlling
Considering the increasing importance of energy conservation in thermal behavior of a building, because it can handle plants with slow
recent decades, various methods and technologies have been developed dynamics, time-variant disturbances and non-linear constraints [6].
to improve different energy systems. Building section is responsible for MPC is comprised of two integral parts: an internal model to predict the
almost 40% of the global final energy use and 40% of greenhouse gas future outputs and an optimizer to generate the optimal control signals.
emissions in the United States of America [1,2]. Taking into account the Due to the decreasing cost of applying data-driven methods to different
huge contribution of Heating, Ventilation and Air Conditioning (HVAC) complex plants, there has been a significant increase in utilizing in-
systems in a building's energy use, optimizing these systems could have telligent and optimal control methods for Building Management Sys-
a substantial effect on a building's energy consumption. HVAC systems tems (BMS). Among the intelligent modeling methods, Artificial Neural
account for 50% of the building sector's energy consumption [3]. Networks have gained a lot of attention since they can learn the thermal
Hence, optimizing these systems is both economically and en- dynamics of a building pretty well and they are capable of efficiently
vironmentally beneficial. HVAC systems are employed to provide predicting the future thermal behaviors of a building. They have been
thermal comfort for the occupants in buildings. widely used for HVAC control [7–12] and energy consumption esti-
To control HVAC systems, many control strategies have been pro- mation applications [13–19]. HVAC systems have high non-linearity
posed. The most common controllers applied to HVAC systems are PID and delay which makes the control process sophisticated. An Artificial
(Proportional-Integral-Derivative), PI and on/off controllers. These Neural Network (ANN) has been used as the internal model of the
controllers use current thermal parameters to generate control signals. controller in order to predict the future outputs of the Air Handling Unit
But, since buildings have a very slow thermal dynamic, a large amount (AHU). Since ANNs have a non-linear nature, the problem becomes a
of energy is wasted in the control process. It has been shown that model Non-linear Model Predictive Control (NMPC) one. The most important
predictive control is the best approach towards controlling building's task of NMPC is finding the optimal control inputs to apply to the ac-
HVAC system [4]. MPC utilizes a model of the plant to predict the fu- tuators. Previous researches have demonstrated that Genetic Algorithm
ture outputs or states of the system, and then it generates a control (GA) is the most effective tool for optimizing the performance of HVAC


Corresponding author.
E-mail address: boroushaki@sharif.edu (M. Boroushaki).

https://doi.org/10.1016/j.buildenv.2018.02.022
Received 23 November 2017; Received in revised form 14 February 2018; Accepted 14 February 2018
Available online 19 February 2018
0360-1323/ © 2018 Elsevier Ltd. All rights reserved.
A. Erfani et al. Building and Environment 133 (2018) 237–245

Nomenclature Tmin Minimum allowed temperature (°C)


Tmax Maximum allowed temperature (°C)
HVAC Heating, ventilation and air conditioning systems NARX Non-linear autoregressive network with exogenous inputs
AHU Air handling unit ANN Artificial neural networks
CAV Constant air volume GA Genetic algorithm
VAV Variable air volume BMS Building management system
MPC Model predictive control PCB Printed circuit board
NMPC Non-linear model predictive control REA Robust evolutionary algorithm
PMV Predicted mean vote MREP Mean of relative error percentage
k Time step
Variables Hc Control horizon
Hp Prediction horizon
ṁ ret,z Return air from zth zone (m3/s) z Indices for zones
ṁ dis,z Discharge air to the zth zone (m3/s) p Output delay numbers
Pz Damper position of zth zone (%) q Input delay numbers
Pfa Fresh air damper position (%) rz zth zone reference trajectory
Ta Ambient temperature (°C) →
X Controller input vector
ṁ c Chilled water flow rate (%) →
Y Plant's output
Sahu AHU status →
C Control signals
CCin,w Cooling coil input water (kg/s)
Ptest Number of test patterns
CCout,w Cooling coil output water (kg/s)
Ptrain Number of training patterns
Tz zth zone temperature (°C)
Ts Set-point temperature
T̂z zth zone predicted temperature (°C)

systems [20–24]. Therefore, GA has been used as the optimizer in this two control methods: MPC and exact linearization. They concluded that
study. in general MPC tracks the reference trajectory better than the other
Zhao et al. thoroughly investigated different methods for modeling approach [31]. Fong et al. optimized the operation of a simulated HVAC
building's thermal dynamics. It was shown that data-driven methods are system by means of a Robust Evolutionary Algorithm (REA) by de-
most useful for on-line control applications in this literature. In addi- termining the optimal set-point of chilled water supply temperature
tion, intelligent methods yield more accurate results than statistical chiller and set-point of supply air temperature of AHU [32].
methods which makes them more reasonable for control applications This paper addresses the problem of NMPC design and im-
[25]. Afram and Janabi-Sharifi divided control strategies for HVAC plementation for a multi-zone Constant Air Volume (CAV) air handling
systems into four categories. Then a rigorous comparison was made unit. The plant's outputs are the zones' temperature which are to track
between these methods. Various experimental and simulation results of set-point temperature, while minimizing the energy consumption. The
different control methods were brought up and investigated based on control signals in this work are damper positions related to each zone,
the established performance criteria in the literature. It was shown that chilled water's flow rate and the AHU status (on/off). NMPC problem
MPC proves more useful in HVAC system control applications [4]. could be divided into two main sections: internal model and the opti-
Huang simulated zone temperature and damper position in a mizer [33]. Artificial neural network serves as the controller's internal
Variable Air Volume (VAV) unit and controlled them using MPC. The model, and its role is to predict the future temperature of each zone.
MPC results showed better transient response compared to a PI con- The optimal value for each of the control signals is calculated by means
troller [26]. Avci et al. developed an algorithm for determining the of a genetic algorithm (which is the optimizer in this study) at each step
temperature set-point regarding variable electricity price in California and then these signals are applied to the AHU through actuators. The
and then tried to track the generated set-point by applying MPC [2]. proposed NMPC strategy aims to minimize the electricity and gas en-
Morosan et al. presented simulation of zone temperature regulation by ergy carriers' consumption of the aforementioned AHU and the devia-
using decentralized, distributed and centralized MPCs [27]. Privara tion from the set-point temperature of each zone.
et al. compared performance of MPC to a well-tuned controller with a The paper is organized as follows. In section 2 the AHU system
weather compensator in a big university [28]. Oldewurtel et al. took along with the data logging system are described. Section 3, elaborates
into account the weather predictions and the uncertainty of the system. on the ANN model utilized for predicting the zones' temperature. In
Then, results of a Stochastic Model Predictive Controller (SMPC), non- section 4, model predictive control method is succinctly described. In
stochastic predictive controller or in other terms Certainty Equivalence section 5, designing the proposed NMPC for the AHU is rigorously ex-
(CE) Rule-Based Controller (RBC) and Performance Bound Controller plained and then experimental results of applying the NMPC to the
(PB) were presented and compared with one another. The results plant are presented and discussed in section 6. Section 7 concludes the
showed that the best performance is obtained when the SMPC is applied paper.
[1]. Ferreira et al. designed and implemented MPC to maintain thermal
comfort quantified as Predicted Mean Vote (PMV) index while mini-
mizing energy consumption. They used ANN to model building's 2. AHU system
thermal behavior [29]. Liang et al. designed MPC for controlling a
multi-zone VAV AHU and the simulation results were compared to the 2.1. AHU system structure
installed PID controller. It was shown that MPC outperforms the PID
controller [6]. Siroky et al. computed set-point temperature for supply Case study in this research is an AHU with 3 zones. It is categorized
water and room temperature periodically and weather forecasts were as a CAV air handling unit, which means that the volume of its input air
downloaded and served as the MPC inputs. The results showed more is constant while the temperature of this air is variable. A simple
than 15% energy saving potential for a large building's heating system schematic of the aforementioned AHU is shown in Fig. 1. First, the
[30]. Rehrl et al. compared both experimental and simulation results of returned air from the zones enters the mixing chamber and there it is
mixed with the fresh air (if the fresh air damper position is open). In the

238
A. Erfani et al. Building and Environment 133 (2018) 237–245

3. NARX model

A brief introduction to Artificial Neural Networks (ANN) and


especially NARX is given. As for the next part of this section, NARX
model of the building's cooling system is presented at length.

3.1. NARX structure

Since the buildings thermal dynamic is highly nonlinear and in-


volves many uncertainties of parameters, simple physical models
cannot capture the real dynamics of the system. Since ANNs are non-
linear in nature, they can learn sophisticated mappings between inputs
and outputs, so ANN is chosen as the model in this work [34]. The first
thing to determine is the structure of the ANN model. A very important
point to consider for choosing the ANN structure is that the outputs of
the system which are the zones' temperature in this case, are highly
dependent to the previous temperatures.
NARX is a type of Recurrent Neural Network, which is used to
model nonlinear dynamic systems. This network is based on a Multi-
Layer Perceptron (MLP). Now consider a single–input single-output
Fig. 1. General schematic of the system including the studied AHU. system. The model has a single input that is applied to a tapped-delay-
line memory of p units. It has a single output that is applied to a tapped-
delay-line memory of q units. The content of these two tapped-delay-
next level, mixing chamber's output passes through the chilled water's
line memories are used to feed the input layer of the MLP.
coil. It should be noted that only a part of air is cooled at this stage and
It has been proven that NARX have a better performance in learning
some of it is just circulated in the zones. The ratio of air cooled by the
long-term dependencies than the other structures of ANN [35]. Taking
chilled water coil is determined by the damper positions of the zones.
this fact into account, NARX structure was selected for the identifica-
After passing the air through the cooling coil chamber, the air is dis-
tion of the AHU system. Output in NARX structure is computed as
tributed and discharged to the zones by means of blowers and this cycle
follows.
is repeated, while the AHU is functioning. The cooling water is heated
after the hot air passes above the cooling coil. So the cooling water y (k+1) = F [x(k),… x(k-p+1), …, y(k),…y(k-q+1)] (1)
flows in the cycle of the absorption chiller to lose the extra heat as to be
y (k+1) is the future output of the system and x(k-i) and y(k-j) are the
able to chill the passing air again. It should also be mentioned that the
network's inputs and outputs in previous time steps respectively. p and
chilled water supply temperature is constant while the cooling system is
q are the number of input and output delays respectively. ANNs are
functional.
composed of a great number of elements called neurons, which are
connected to each other through weights. To model a plant, usually a
multi-layered perceptron (MLP) structure is used. It consists of an input
2.2. Data logging system
layer, an output layer and one or two hidden layers. Input data is in-
serted to the structure by the means of input nodes and after computing
AHU provides thermal comfort for four classes located at first floor
the output of every neuron in every layer, the final output is generated.
(each two adjacent rooms form a thermal zone) north of an educational
Each neuron's output is calculated by Eq. (2).
building, and the third zone is located at second floor of the mentioned
building above these four classes and it's used as the computer site.
⎛ ⎞
To collect data needed for training the neural network, a Printed
⎜∑ ij j
Oi = fi w o + θi

Circuit Board (PCB) was designed and constructed which has two tasks. ⎝ j ⎠ (2)
The first task is reading the sensors measured variables and sending it to
a web address through a SIM900 module. The second task is applying
the control signals to the AHU or in other words, carrying out the duties
of the actuators. Fig. 2 shows the electronic board designed for data
gathering.
A ST32F microprocessor is used to process received signals from the
sensors and transmit it through a SIM900 board. It should be mentioned
that microprocessor saves the sensors' measured values 6 times in a
single time step (17 min) and these values are averaged for each time
step to reduce noise and disturbance of data.
To collect temperature data of the 3 zones, three thermometers were
first calibrated and then placed in each zone. These thermometers are
equipped with a SIM900 module to send data to a predefined web
address. Data gathered for training the Non-linear autoregressive net-
work with exogenous inputs (NARX) model is saved in the mentioned
web address and then used for training and test purposes. As for the
actuating role, another web address is used that the module reads the
value written on this address each 17 min and applies those values
(which are the control signals) to the AHU.
Fig. 2. Electronic board used for Data logging.

239
A. Erfani et al. Building and Environment 133 (2018) 237–245

Where oi is the output of unit i, fi is the nonlinear activation function step. General idea of the MPC is shown in Fig. 4. In this section we
that determines the neuron's output, wij is the weight that connects unit consider a single-input single-output system, in which y(k) is the output
j to i, and θi is the bias for unit i. In ANN literature, learning is inter- value at kth time step and s(k) is the set-point trajectory that system's
preted as the process of tuning the weights between neurons. The most output (y(k)) is supposed to track. These two trajectories are familiar in
common algorithm for determining the weights is called the back- the control system's context. However there's another trajectory known
propagation algorithm which minimizes the learning error by a gra- as reference trajectory (r(k + i|k)) which is defined as the best course
dient decent method [36,37]. for the current output (y(k)) to follow and get to the set-point trajec-
tory. Reference trajectory plays an important role in the MPC design. It
3.2. NARX model of the building's cooling system is commonly assumed that r closes in on the set-point trajectory with a
exponential equation. This process is carried out by a time constant
The inputs of the NARX model of the AHU system have been defined which determines the speed of error reduction.
as follows: Now assume that tracking error at current time step (er(k)) is given
by Eq. (4):
• Chilled water flow rate (m• ) c er(k) = s(k) – y(k) (4)
• Damper position of the zones (P , P , P )
1 2 3

• Air handling unit's status (S ) ahu


Then reference trajectory is chosen so that the error in ith step
• Ambient temperature (T ) a
ahead is as below:
• Fresh air damper position (P ) fa

• Previous temperatures of the zones (T (k) … T z z (k-q+1)) where er( k+ i) = e−iTs/Tref er(k) (5)
q=2
In which Tref is the sampling time and Ts is the time constant that
Other factors such as return and discharge air flow rate, radiation determines the speed of error reduction. So the reference trajectory is
and mixing chamber's output temperature also affect the outputs. But given by Eq. (6).
there were many complications and challenges for setting up suitable
r( k+ i|k) = s( k+ i)− er( k+ i) = s( k+ i)−e−iTs/Tref er(k) (6)
sensors to measure some of the parameters such as return and discharge
air flow rate. Furthermore, many of the variables in this context aren't
In which r(k + i|k) is the value of the reference trajectory at i time
independent and they could be determined if the value of the variables
steps ahead, if system's output is y(k) at kth time step. So the control
in the list are available. Variables such as mixing chamber's output
signals are chosen so that the output trajectory follows the reference
temperatures are placed in this category.
trajectory to reduce the tracking error exponentially [5].
Fig. 3 shows the generic schematic of the optimum designed NARX
As explained earlier, MPC is a method that uses an internal model to
model in this study. One hidden layer of neurons has been considered to
predict the future outputs throughout a time horizon. This time hor-
capture and learn the system's dynamics. The number of hidden layer
izon, for which the future outputs are computed for, is called prediction
neurons and the number of delayed time feedbacks are to be de-
horizon (Hp). Main idea of the MPC is to find the control signal that
termined. The results based on which the optimal structure of the MLP
would lead to the best predicted performance. MPC also utilizes an
has been determined, are presented in section 6. In this study, output is
optimizer to generate the optimal control signals to track a reference
controlled via manipulating the value of the first three variables men-
trajectory or improve performance criteria [33]. In this paper we face a
tioned in the list above. So the variables used to control the AHU are
NMPC problem for which a NARX model (which was described in the
listed in Eq. (3), while two other parameters Pfa and Ta are sample data
preceding section) is used as the internal model of the NMPC and to find
from ambient temperature and fresh air damper position.
the optimal control signals at each time step genetic algorithm has been
→ used. In section 5 the NMPC applied in this study is presented along
C = [ṁ c,P1,P2,P3,Sahu] (3)
with the other important parameters in a NMPC.
As mentioned before, AHU distributes its output air among 3 zones
which are distinguished by their respective indices.

4. Model predictive control method

Model-based predictive control is a rather new control method


which first emerged in chemical processes at late seventies. MPC is not
a certain algorithm. It is just a method and various control strategies
could be used in a MPC scheme. MPC tries to find the most suitable
control signals in order to minimize an objective function subject to
some constraints, using a model of the system. If this model is non-
linear, the MPC problem becomes a non-linear one (NMPC). This pro-
cess of optimizing the objective function is repeated at each time step
and at each time step the optimal control signals are calculated
throughout a time horizon so the objective function is minimized
through this horizon. This time horizon, for which the control signals
are computed for, is called control horizon (Hc). The objective function
could take the form of tracking error, cost of energy, energy con-
sumption, environmental effects and other criteria or a combination of
them.
The most common method in MPC literature is the “receding horizon
method”, in this method only the first element of the control signal
vector is applied to the system (which corresponds to the control signal
Fig. 3. Generic schematic of the optimum NARX structure for modeling the AHU system.
of the current time step(k)) and the process is repeated in the next time

240
A. Erfani et al. Building and Environment 133 (2018) 237–245

Fig. 7. Results of the optimal NARX model (zone 2 results).

Fig. 4. General idea of the model predictive control [5].

Fig. 8. Zone 1 temperature results from NMPC implementation.

Fig. 9. Zone 2 temperature results from NMPC implementation.

Fig. 5. Whole control schematic and connection between NARX model and GA optimizer
where C = [mc, P1, P2, P3, Sahu] and X = [C,Ta,Tz,Ts] and Y = [T1, T2, T3].

Table 1
Results of simulating NARX model with different q values.

Number of feedbacks (q) Training patterns MREP Test pattern MREP

1 98.66 97.47
2 98.65 97.71
3 98.56 97.60

Fig. 10. Zone 3 temperature results from NMPC implementation.

Fig. 6. Error of learning pattern for different number of hidden layer neurons in NARX
Fig. 11. Optimal AHU status generated by the NMPC.
structure.

241
A. Erfani et al. Building and Environment 133 (2018) 237–245

5. Applying NMPC to the AHU system

5.1. Determinations of important NMPC factors

A centralized controller configuration is selected for this work, since


it considers the coupling effect between different outputs (temperature
of different zones). Energy conservation strategies used in this study are
natural thermal storage in building mass and reference temperature
reset during unoccupied hours [4]. Temperature set-points are different
based on the time of day and whether or not that zone is occupied
during that time. During the office hours reference temperature for
zones is set to 25.5 °C which is in the range specified in Ref. [38] and
Fig. 12. Optimal cold water flow rate generated by the NMPC. during the non-office hours it is set to 27 °C.
Three of the crucial design parameter in NMPC, are the value of Hc,
Hp and the time step. First of all, time step should be set. The faster the
system's dynamic the shorter the selected time step should be. In the
HVAC control literature, our system's dynamic is rather slow so a high
sampling rate is not mandatory. Furthermore, choosing a very low
sampling rate (long time step) may cause some problems in the iden-
tification process so that the model cannot capture all the system's
dynamics properly. In this work a 17 min time step is chosen. It is also
common to choose the Hp equal to Hc [5]. As for the control horizon,
the longer the better. But since we are going to implement the designed
NMPC on-line, a compromise between the computing time at each time
step and the efficiency of NMPC is absolutely necessary. Therefore,
Control horizon is set to 7 steps (119 min) in this research, so that the
Fig. 13. Optimal zone 1 damper position generated by the NMPC.
controller could have enough time to adjust to disturbances and
changes in reference temperatures. Prediction horizon is also set to 7
steps in this context.

5.2. NMPC problem

As stated earlier, NMPC solves an optimization problem to find the


best control signal during each time step. Since the plant's model is non-
linear, the optimization problem is most likely a non-convex one.
Solving a non-convex problem is usually a sophisticated task, especially
if one is using analytical methods.
Since we are going to solve an optimization problem, constraints
and objective function must be defined first. The more constraints we
Fig. 14. Optimal zone 2 damper position generated by the NMPC. have, the more possibility of facing an infeasibility situation [33].
Considering the on-line implementation of the controller and the many
issues that a high probability of infeasibility may bring with itself, it is
decided to apply as few constraints as possible to the optimization
problem. The only constraint applied to the optimization problem is
regarded to the temperature bounds in the system mentioned in Ref.
[38] (See Eq. (7)).

Tmin < Tz (k) < Tmax (7)

Tmin = 22 °C, Tmax = 28 °C.


There are also the restrictions of the damper positions changing
rates, which in this case they are negligible compared to the time step
and no constraint concerning them is added to the optimization pro-
blem.
Fig. 15. Optimal zone 3 damper position generated by the NMPC. Before the objective function and its solution are elaborated, it is
integral to describe the control signals. It should be noted that since a
Table 2 continuous GA is much more time consuming, a discrete GA is used in
Average temperature of the zones during NMPC and no-controller situation during the this work. So that the decision variables are defined as below:
office hours.

⎧ ṁ c = 5k k=0,1,2,…20
zone NMPC mean temperature Previous system mean temperature
Sahu = {1,2}

Zone 1 25.758 23.457 ⎩ P1 = 10k , P2 = 10k , P3 = 10k k=0,1,2,…10 (8)
Zone 2 25.763 23.643
Zone 3 25.67 23.313
• =0, 5, 10 …,
Where chilled water flow rate is divided into 20 steps (m c
100) which zero means that the coil is empty and 100 represents the full
capacity of the cooling coil. Sahu indicated the AHU status. The corre-
sponding values for on and off modes are 2 and 1 respectively. The

242
A. Erfani et al. Building and Environment 133 (2018) 237–245

position of dampers is divided into 10 equal steps (Pz = 0,10 …,100). the beginning of the kth time step. Therefore, a time limit of 2 min is
Zero means that the air that is going to be blown into the corresponding considered for GA (which is ignorable compared to the time step) so
zone, passes through the cooling coil chamber whole, while 100 means that after 2 min GA stops and the best answer is immediately applied to
that none of air volume is chilled by the cooling water. the AHU as the control signal of the current step C(k). Values of the
In order to set the objective function, performance criteria and en- control signal is determined so that the zones' temperature in the next
ergy saving terms are considered. Energy carriers which are consumed step Tz(k+1) would track the set-point temperature Ts as good as
by the AHU system are gas, which is used to chill the water coming out possible while minimizing the energy consumption (see Eq. (9)). In the
of the cooling coil and electricity, which is used to derive the blowers, next time step the whole process is repeated from measuring the zones'

motor and fans and water pump. Performance criteria is defined as the temperature to finding the optimal control signal C(k+1) is found. Y is
square of deviation from reference trajectory for each zone (Eq. (10)). the AHU output which consists of the zones' temperatures.
So the objective function is given by Equations (9)-(13). →
Y (k) = [T1 (k),T2 (k),T3 (k)] (15)
HC
min ⎛∑ N1 + N2−N3 + N4⎞ → →
⎝ i=1 ⎠ (9) X = [ C ,Ta,Tz,Ts] (16)

3
N1 = ∑ w1 [T̂z ( k+ i|k)−rz ( k+ i|k)]2 6. Result and discussion
z= 1 (10)
• ( k+ i−1) 6.1. NARX model results
N2 = w2 m c (11)

N3 = w3 (P1 ( k+ i−1|k) + P2 ( k+ i−1|k) + P3 ( k+ i−1|k)) (12) Training data was collected from July 13 to July 17, 2017 and test
data was gathered through 2 days: July 30 and July 31, 2017. 527
N4 = q.l.(Sahu ( k+ i−1)−1) (13) patterns were collected and saved, which 26.75% or in other terms 141
In Eq. (9), Hc is the control horizon, T̂z ( k+ i|k) is the model's pre- of these patterns were used for testing the neural network and the re-
diction of the future zone temperatures for i time steps later. rz is the maining 386 patterns were used for training the NARX. MATLAB code
reference trajectory which is defined in Eq. (6) in which the value for for NARX was developed. To evaluate the performance of the NARX
Ts/Tref is set to 0.3333. Hence, N2 states the chilled water flow rate; N3 model, Mean of Relative Error Percentage (MREP) is considered as the
represents the air flow rate that passes next to the cooling coil. The less accuracy criterion of the results (Eq. (17)).
air passing from the cooling coil chamber, the less the chilled water is Ptest
|di−ui | 100
heated and the less gas needed to chill it. AHU's electricity consumption MREP = ∑ di
*
Ptest
is denoted here by N4. q expresses the electricity consumption of the i= 1 (17)
studied AHU per hour (KW) and l is the time step (17 min). w1,w2 and di and ui are the desired output and NARX output respectively. Ptest is
w3 are the weights that specify the importance of each term in the the number of test patterns. In order to have the best performance, the
objective function. The value of these weights has been determined via optimal value for the design parameters of the NARX should be ob-
a trial and error during the simulation process so that there is a rational tained. First the number of feedback time steps from the NARX outputs
trade-off between the terms (Eq. (14)). (Fig. (3)) should be optimized. In order to do so, NARX with different q
w1 = 200, w2 = 1.8, w3 = 0.3 (14) values (Eq. (1)) was examined and the results are presented in Table 1.
As it could be concluded from Table 1, the optimal number of
GA has been applied to find the optimal solution of Eq. (9) at each output delays is q = 2. Since it is clear that the zones' temperature are
time step using GA MATLAB function. Seven steps ahead are considered only a function of current values of the X vector parameters, thus the
as the control horizon and at each step there are five control signals best value for the p is one. Now to determine the number of hidden
(m• ,P ,P ,P ,S ) to be determined. Therefore, there are 35 decision
c 1 2 3 ahu layer neurons, the number of hidden layer neurons has been swept from
variables on aggregate that should be determined at each time step. In 1 to 50 and the result are presented in Fig. 6.
order to solve the optimization problem at each time step, GA uses the Fig. 6 shows that for more than 30 neurons in the hidden layer, no
NARX model of the system (Fig. 5) to find the optimum control signals significant change in the performance of the model is detected and
throughout the control horizon. model's error has very small fluctuations. Selecting a big value for the
At each time step, temperature sensors measure zone temperature Tz number of hidden layer neurons, leads to a better model but it also
and ambient temperatures Ta and flow meters measure water's flow rate increases the computation time, so a compromise between the two
m• , these measured values along with the damper positions P , AHU
c z factors is essential. The number of hidden layer neurons in this work
status Sahu and set-point temperature Ts serve as the input for the NMPC has been set to 35. Thus the optimum NARX structure would be 13-35-

( X ). These values are sent to a pre-defined web address so that the 3. Model's prediction results for the test patterns are presented in Fig. 7.
NMPC could read them. At this point NMPC starts the search to find the The optimal model's accuracy is 97.71%.
optimal control signals. First, GA generates the initial population ran-
domly and then sends the value for the control signals to the NARX C(k 6.2. NMPC implementation results
+1|k) and then NARX computes the future outputs throughout the Hc
based on the C vector. At this point, GA has everything to calculate the Design parameters of the NMPC have been determined in section
value of the objective function (see Eq. (9)). After that the objective 3.2. In this section, first the results obtained from on-line im-
function for each chromosome is calculated, they are sorted based on plementation of NMPC are represented and then we discuss and eval-
the fitness function value and then the best chromosomes are used for uate these results. NMPC was run on a desktop computer with a dual
reproduction of the next generation. The same process is repeated for core CPU and 2.4 GHz clock frequency. To provide the ambient tem-
the next generation until the convergence criterion is met and the op- perature predictions throughout the controller implementation,
timal control signals are found. But in this case, we cannot wait until weather predictions presented in Ref. [39] are utilized. NMPC was
the best answer is found by GA because the controller is to be im- tested on August 21 and August 22, 2017 on the AHU. Figs. 8–10 show
plemented on-line and there is a crucial time limit on the on-line the temperature of the three aforementioned zones during the im-
computation time for finding the optimal control signals, since the plementation of the NMPC.
control signals (C(k)) are ideally to be applied to the AHU precisely at Figs. 8–10 indicate that the suggested NMPC was successful in

243
A. Erfani et al. Building and Environment 133 (2018) 237–245

following the reference temperature assigned to each zone. There are controlling a multi-zone air handing unit is presented. The proposed
three important points that could be derived from these pictures. The NMPC aims to minimize gas and electricity consumption of the AHU
first point is that during the night hours, controller tracked the set-point while maintaining the thermal comfort of the building's occupants. The
temperature by natural ventilation in the building, since the ambient control signals manipulated to alter the zone temperature in this study
temperature dropped at night. The second point is that in Figs. 9 and 10 are cooling coil's flow rate, damper position of each zone and AHU
the controller couldn't provide the set-point temperature during night status (on/off). To predict the future outputs of the plant (which is the
and afternoon hours because the ambient temperature was below 27 °C temperature of each zone) a recurrent neural network NARX model has
and the cooling system wasn't capable of increasing the room's tem- been developed in MATLAB environment. To generate the optimal
perature. The last and probably the most important point in these fig- value of the control signals in each time step, genetic algorithm has
ures is that 2 h before the set-point temperature changes, zones' tem- been utilized.
perature deviation from the set-point increases. This phenomenon To investigate and demonstrate the effectiveness of the proposed
occurred because the system's thermal dynamic is slow which is a control strategy, designed NMPC was implemented and applied to the
consequence of the strong thermal inertia. Therefore, it takes time for studied AHU. To store and send data, a web-based approach has been
the room temperature to change. So tracking the future set-point starts used in this work. The experimental results of the NMPC demonstrate
2 h (control horizon) before the change takes place. the effectiveness of this approach toward controlling a building's
The optimal control signals applied to the AHU during the test are thermal behavior. NMPC tracked the set-point temperature very well
shown in Figs. 11–15. It should be mentioned that in Fig. 12, the flow and achieved significant savings in gas and electricity consumption si-
rate percentage is directly related to the actual flow rate. multaneously. The results indicate a 55.1% and 43.7% reduction in
It should be noted that before the NMPC was applied to the system, electricity and gas consumption respectively, compared to the previous
the AHU was equipped with no controller. The air handling unit worked setup.
in full operation mode during the weekdays which meant the cooling A future extension of this work is considering the effect of occu-
coil flow rate was set to 100 and all the damper position were set to pants' presence in the NMPC framework. Also considering the effect of
zero and the AHU was constantly operating as well. other factors such as relative humidity in the definition of thermal
Figs. 11–15 imply that most part of the energy saving potential in comfort could be a new challenge in this subject. Another issue that
the system was related to the non-office hours, during which zones were could be addressed in the future is considering the importance of oc-
cooled, while there was no occupant in them and a part of the energy cupant hours in controller design, such as weighting different hours of a
saving potential was achieved through the strong thermal inertia of the day in the objective function. It also should be noted that designing a
building. During the night hours, mostly small values have been as- time-varying model and integrating it into the NMPC framework could
signed to the cooling coil flow rate and the NMPC often orders the AHU be extremely instrumental for the NMPC and would improve its ro-
to turn off. Also, the air volume passed through the cooling coil bustness against various uncertainties.
chamber was usually a low percentage of whole, which led to low gas This is our first step to implement the nonlinear controller in AHU
consumption. systems. One could peruse this job with more contemporary controllers
To quantify the energy conservation potential achieved by the such as: fuzzy, intelligent, and sliding model … controllers. In addition,
NMPC, energy consumption is compared using two methods. In the first to improve the NARX model performance, capturing more weather
method, to compare the electricity consumption we have assumed that variability is recommended. This point can simply be over by extending
the electrical power consumed by the AHU is constant. Based on this the data logging and train periods, which leads to improve the results of
consumption to find out how much electricity consumption has been the MPC controller.
decreased, the total time that the AHU was off is calculated according to
the signals applied to the plant. Using this simple method, it was found References
out that NMPC yields 55.1% reduction in electricity consumption.
In the second method, to calculate the gas savings achieved by the [1] F. Oldewurtel, A. Parisio, C.N. Jones, M. Morari, D. Gyalistras, M. Gwerder,
proposed NMPC, the amount of thermal energy lost by the chilled water V. Stauch, B. Lehmann, K. Wirth, Energy efficient building climate control using
Stochastic Model Predictive Control and weather predictions, Am. Control Conf.
after the heat exchanging process with air is measured by means of two (ACC) 2010 (2010) 5100–5105, http://dx.doi.org/10.1109/ACC.2010.5530680.
thermometers which measured the cooling water temperature before [2] M. Avci, M. Erkoc, A. Rahmani, S. Asfour, Model predictive HVAC load control in
and after the heat exchange with air, and a flow meter to measure the buildings using real-time electricity pricing, Energy Build. 60 (2013) 199–209,
http://dx.doi.org/10.1016/j.enbuild.2013.01.008.
chilled water's flow rate. Efficiency of the absorption chiller was as- [3] L. Pérez-Lombard, J. Ortiz, C. Pout, A review on buildings energy consumption
sumed to be constant throughout the test. It was found out that the information, Energy Build. 40 (2008) 394–398, http://dx.doi.org/10.1016/j.
proposed NMPC yields 43.7% gas savings for the AHU. enbuild.2007.03.007.
[4] A. Afram, F. Janabi-Sharifi, Theory and applications of HVAC control systems - a
To prove the efficiency of the proposed controller, NMPC was
review of model predictive control (MPC), Build. Environ. 72 (2014) 343–355,
compared with simulation results of a simple on/off controller. In this http://dx.doi.org/10.1016/j.buildenv.2013.11.016.
scenario, AHU unit was turned on 3 h before the start of the office hours [5] J.M. Maciejowski, Predictive Control with Constraints, first ed., Prentice hall, 2002,
https://www.amazon.com/Predictive-Control-Constraints-Jan-Maciejowski/dp/
and was turned off at the end of the office hours. The simulation results
0201398230.
showed 36.6% and 26.3% reduction in electricity and gas consumption [6] W. Liang, R. Quinte, X. Jia, J.Q. Sun, MPC control for improving energy efficiency
respectively. By comparing these results to the NMPC, it is concluded of a building air handler for multi-zone VAVs, Build. Environ. 92 (2015) 256–268,
that the proposed NMPC outperforms a scheduled controller. NMPC http://dx.doi.org/10.1016/j.buildenv.2015.04.033.
[7] A.I. Dounis, C. Caraiscos, Advanced control systems engineering for energy and
leads to 18.5% and 17.4% more saving in electricity and gas energy comfort management in a building environment-A review, Renew. Sustain. Energy
carriers respectively in comparison to the on/off controller. Rev. 13 (2009) 1246–1261, http://dx.doi.org/10.1016/j.rser.2008.09.015.
In Table 2 the average zones' temperature during the office hours [8] A.E. Ben-Nakhi, M.A. Mahmoud, Cooling load prediction for buildings using general
regression neural networks, Energy Convers. Manag. 45 (2004) 2127–2141, http://
are presented for the NMPC and the previous system. As it is presented dx.doi.org/10.1016/j.enconman.2003.10.009.
in Table 2, NMPC was able to tackle the problem of achieving energy [9] C. Chang, J. Zhao, N. Zhu, Energy saving effect prediction and post evaluation of
savings in a building's AHU system while maintaining the thermal air-conditioning system in public buildings, Energy Build. 43 (2011) 3243–3249,
http://dx.doi.org/10.1016/j.enbuild.2011.08.025.
comfort of the occupants. [10] S.W. Wang, Y.M. Chen, Fault-tolerant control for outdoor ventilation air flow rate in
buildings based on neural network, Build. Environ. 37 (2002) 691–704, http://dx.
7. Conclusion doi.org/10.1016/S0360-1323(01)00076-2 Pii S0360-1323(01)00076-2\r.
[11] A.E. Ben-nakhi, M. a Mahmoud, Energy conservation in buildings through efficient
A/C control using neural networks, Appl. Energy 73 (2002) 5–23.
In this paper a practical non-linear model predictive controller for

244
A. Erfani et al. Building and Environment 133 (2018) 237–245

[12] S. Soyguder, Intelligent system based on wavelet decomposition and neural network S0378-7788(97)00008-X.
for predicting of fan speed for energy saving in HVAC system, Energy Build. 43 [25] H.X. Zhao, F. Magoules, A review on the prediction of building energy consumption,
(2011) 814–822, http://dx.doi.org/10.1016/j.enbuild.2010.12.001. Renew. Sustain. Energy Rev. 16 (2012) 3586–3592, http://dx.doi.org/10.1016/j.
[13] S. Kalogirou, Artificial neural networks for the prediction of the energy consump- rser.2012.02.049.
tion of a passive solar building, Energy 25 (2000) 479–491, http://dx.doi.org/10. [26] G. Huang, Model predictive control of VAV zone thermal systems concerning bi-
1016/S0360-5442(99)00086-9. linearity and gain nonlinearity, Contr. Eng. Pract. 19 (2011) 700–710, http://dx.
[14] T. Olofsson, S. Andersson, R. Östin, A method for predicting the annual building doi.org/10.1016/j.conengprac.2011.03.005.
heating demand based on limited performance data, Energy Build. 28 (1998) [27] P.-D. Moroşan, R. Bourdais, D. Dumur, J. Buisson, Building temperature regulation
101–108, http://dx.doi.org/10.1016/S0378-7788(98)00004-8. using a distributed model predictive control, Energy Build. 42 (2010) 1445–1452,
[15] J.F. Kreider, D.E. Claridge, P. Curtiss, R. Dodier, J.S. Haberl, M. Krarti, Building http://dx.doi.org/10.1016/j.enbuild.2010.03.014.
energy use prediction and system identification using recurrent neural networks, J. [28] S. Privara, J. Siroky, L. Ferkl, J. Cigler, Model predictive control of a building
Sol. Energy Eng. 117 (1995) 161, http://dx.doi.org/10.1115/1.2847757. heating system: the first experience, Energy Build. 43 (2011) 564–572, http://dx.
[16] J. Yang, H. Rivard, R. Zmeureanu, On-line building energy prediction using adap- doi.org/10.1016/j.enbuild.2010.10.022.
tive artificial neural networks, Energy Build. 37 (2005) 1250–1259, http://dx.doi. [29] P.M. Ferreira, A.E. Ruano, S. Silva, E.Z.E. Conceição, Neural networks based pre-
org/10.1016/j.enbuild.2005.02.005. dictive control for thermal comfort and energy savings in public buildings, Energy
[17] P.A. González, J.M. Zamarreño, Prediction of hourly energy consumption in Build. 55 (2012) 238–251, http://dx.doi.org/10.1016/j.enbuild.2012.08.002.
buildings based on a feedback artificial neural network, Energy Build. 37 (2005) [30] J. Siroky, F. Oldewurtel, J. Cigler, S. Privara, Experimental analysis of model pre-
595–601, http://dx.doi.org/10.1016/j.enbuild.2004.09.006. dictive control for an energy efficient building heating system, Appl. Energy 88
[18] R. Yokoyama, T. Wakui, R. Satake, Prediction of energy demands using neural (2011) 3079–3087, http://dx.doi.org/10.1016/j.apenergy.2011.03.009.
network with model identification by global optimization, Energy Convers. Manag. [31] J. Rehrl, M. Horn, Temperature control for HVAC systems based on exact linear-
50 (2009) 319–327, http://dx.doi.org/10.1016/j.enconman.2008.09.017. ization and model predictive control, 2011 IEEE Int. Conf. Control Appl. CCA 2011
[19] B.B. Ekici, U.T. Aksoy, Prediction of building energy consumption by using artificial (2011) 1119–1124, http://dx.doi.org/10.1109/CCA.2011.6044437.
neural networks, Adv. Eng. Software 40 (2009) 356–362, http://dx.doi.org/10. [32] K.F. Fong, V.I. Hanby, T.T. Chow, System optimization for HVAC energy manage-
1016/j.advengsoft.2008.05.003. ment using the robust evolutionary algorithm, Appl. Therm. Eng. 29 (2009)
[20] L. Giraud-Moreau, P. Lafon, A Comparison of evolutionary algorithms for me- 2327–2334, http://dx.doi.org/10.1016/j.applthermaleng.2008.11.019.
chanical design components, Eng. Optim. 34 (2002) 307–322, http://dx.doi.org/ [33] F. Allgower, A. Zheng, Nonlinear Model Predictive Control, springer, 2000.
10.1080/03052150211750. [34] R. Beale, T. Jackson, A. Hilger, Neural Computing : an Introduction, (1990).
[21] Y. Asiedu, R. Besant, P. Gu, HVAC duct system design using genetic algorithms, [35] T. Lin, B. Horne, P. Tino, C.L. Giles, Learning long-term dependencies in NARX
HVAC R Res. 6 (2000) 149–173, http://dx.doi.org/10.1080/10789669.2000. recurrent neural networks, IEEE Trans. Neural Network. 7 (1996) 1329–1351.
10391255. [36] M. Boroushaki, M.B. Ghofrani, C. Lucas, Identification of a nuclear reactor core (
[22] J.A. Wright, HVAC optimisation studies: sizing by genetic algorithm, Build. Serv. VVER ) using recurrent neural networks, Ann. Nucl. Energy 29 (2002) 1225–1240.
Eng. Technol. 17 (1996) 7–14 http://bse.sagepub.com/content/17/1/7.abstract. [37] S. Haykin, Neural Networks and Learning Machines, third, Pearson, 2009.
[23] L. Lu, W. Cai, Y.C. Soh, L. Xie, S. Li, HVAC system optimization - condenser water [38] Thermal Environmental Conditions for Human Occupancy, Cond. Am. Soc. Heat.
loop, Energy Convers. Manag. 45 (2004) 613–630, http://dx.doi.org/10.1016/ Refrig. Air, (2003).
S0196-8904(03)00181-X. [39] Iran weather data, available at: https://www.accuweather.com/en/ir/iran-
[24] W. Huang, H.N. Lam, Using genetic algorithms to optimize controller parameters weather.
for HVAC systems, Energy Build. 26 (1997) 277–282, http://dx.doi.org/10.1016/

245

You might also like