Upload
yalllik
View
216
Download
0
Embed Size (px)
Citation preview
7/29/2019 1-s2.0-S0378778810000290-main
1/9
A software framework for model predictive control with GenOpt
Brian Coffey a,*, Fariborz Haghighat b, Edward Morofsky c, Edward Kutrowski c
a University of California, Berkeley, USAb Concordia University, Montreal, Canadac Public Works and Government Services, Ottawa, Canada
1. Introduction
There is currently a strong demand for very low energy
commercial buildings. Passive technologies, such as increased
insulation and climate-appropriate orientation and window
placements, are likely to account for part of the demanded
efficiency improvements. But active technologies, such as low
energy HVAC and variable-transmissivity window systems, are
also expected to play a significant role in most low energy
commercial buildings. Such low energy active systems can also
play a role in demand response by shedding or shifting electrical
load when necessary, which will likely become even more
important with more intermittent renewable electricity produc-
tion being added to the grid. Better integrated supervisory control
strategies are neededto fully address the potentials andchallenges
presented by these very low energy systems and by demand
response control objectives.
One such advanced control strategy is model predictive control
(MPC), where a building model is used within the supervisory
control system, automatically testing at each control time-stepvarious possible set-point configurations with simulations before
choosing the best one for use in the building. Optimization
algorithms determine set-points, rather than relying on rule-based
approaches that specify set-points based on schedules or in
response to particular conditions. There has been a modestamount
of research on MPC for buildings applications, but this body of
research is growing quickly and is expected to grow further in the
next few years. The underlying motive of the research presented in
this paper is to facilitate future research in this area by developing
a standard approach and software for model predictive control
(and for non-predictive model-based control) that can be easily
applied by buildings researchers to many different cases.
A Java software framework based around GenOpt [1] is
presented, along with an example MPC algorithm for use within
it, and an example case study. A beta version of the software is
freely available at [2]. It allows the use of any text-based
simulation tool and simplifies the setup process for simulation-
based studies or real-time implementations. It also facilitates the
use of optimization starting points and dynamic search-space
constraints based on the results of previous time-steps and on
heuristic rules, which is a promising and often overlooked
technique in MPC for buildings.
2. Background
2.1. Model predictive control in buildings research
Although still relatively uncommon in building engineering,
MPC has seen extensive research and application in other fields,
particularly in chemical, electrical and mechanical engineering
(see [3,4] for seminal papers, and [5] for an example application).
Within the buildings research field, the idea of MPC for
supervisory control was noted at least as early as 1988 [6], but
because of its computational requirements it has not received
much research attention until the past decade. It has been applied
to a number of different types of systems by buildings researchers,
often using standard simulation tools for the online building
Energy and Buildings 42 (2010) 10841092
A R T I C L E I N F O
Article history:
Received 15 December 2009
Accepted 29 January 2010
Keywords:
Building simulation
Optimization
Model predictive control
Demand response
A B S T R A C T
There is a growing interest in integrated control strategies for building systems with numerous
responsive elements,such as solarshadingdevices,thermal storage and hybrid ventilationsystems, both
for energy efficiency and for demand response. Model predictive control is a promising way of
approaching this challenge. This paper presents a flexible software framework for model predictive
controlusing GenOpt, along with a modified geneticalgorithmdeveloped foruse withinit, and appliesit
to a case study of demand response by zone temperature ramping in an office space. Various areas for
further research and development using this framework are discussed.
2010 Elsevier B.V. All rights reserved.
* Corresponding author.
E-mail addresses: [email protected] , [email protected]
(B. Coffey).
Contents lists available at ScienceDirect
Energy and Buildings
j o u r n a l h o m e p a g e : w w w . e l s e v i e r . c o m / l o c a t e / e n b u i l d
0378-7788/$ see front matter 2010 Elsevier B.V. All rights reserved.
doi:10.1016/j.enbuild.2010.01.022
mailto:[email protected]:[email protected]://www.sciencedirect.com/science/journal/03787788http://dx.doi.org/10.1016/j.enbuild.2010.01.022http://dx.doi.org/10.1016/j.enbuild.2010.01.022http://www.sciencedirect.com/science/journal/03787788mailto:[email protected]:[email protected]7/29/2019 1-s2.0-S0378778810000290-main
2/9
models. Research interest seems to be growing, and building
controls problems have recently attracted MPC experts from
outside of the buildings research field.
Theuse of MPCfor energyminimization through ice storage and
active building mass thermal storage has been studied by Henze
et al.: a real-time implementation experiment was carried out for
the control of a building with these systems, using a 24-h future
horizon and a 1-h controller time-step, with TRNSYS used for the
building model and Matlab used to control the optimization [7,8].
They noted some of the expected technical glitches (such as sensor
malfunctions and problems with information passing), but aside
from this the approach was generally successful, except for a few
points in time where the optimization algorithm was stuck in local
minima and actually performed worse than the default strategy
would have. They have also analyzed various aspects of MPC that
are peripheral to the central concept but essential in its
application: they have studied the importance of forecast and
model accuracy [9]; worked on the development of a method for
automated model calibration to ensure continued accuracy over
time [10]; and worked on the development of a hybrid control
system that attempts to incorporate the aspect of continual
updating (found in the learning-algorithm approach to control)
with the MPC approach [11,12].
The problem of determining the optimal start time for heatinghas been considered by a number of researchers. One such study
brought together researchers from Honeywell Controls Systems
Ltd. and the University of Strathclyde, and worked out some of the
interfacing concerns between a standard control system and a
simulation tools (ESP-r in particular) and optimizer [13]. A
modification of the optimal start problem was also considered
by Kummert et al. [14,15], who looked at the optimal control of
passive solar buildings with night setback, in an attempt to
minimize the energy consumption while also minimizingoccupant
discomfort due to morning undercooling and afternoon over-
heating. A simplified model (a linear state-space representation)
was used and the optimization was done by quadratic program-
ming.
Non-predictive model-based control has also been used by anumber of buildings researchers, for example in daylighting
research (controlling blinds and lights) by Mahdahvi et al. Their
experimental work has focused on the control of automated
shading devices [1618], using lighting simulation tools such as
LUMINA, but they have also considered control for natural
ventilation [19]. The purpose of using simulation in these cases
is to capture the complexities of a snapshot of the system, rather
than to capture the systems dynamics, so no prediction horizon
was used in these studies.1 Other examples of non-predictive
model-based supervisory control include studies of VAV control
(using highly simplified and fast-running system models) [20,21],
andchilled water plant control (using detailed TRNSYSmodels, but
conceived not for real-time implementation but for derivation of
heuristic control rules, so it did not have to contend with thecomputation time challenge associated with global HVAC control
using a detailed simulation model) [22].
It is also worth noting the extensive existing research and
applications of neural network control in building systems. An
illustrative example of how this approach can be conceived in a
way that is similar to the MPC approach (with a neural-network
empirical online model instead of a physics-based online model) is
the EDIFICIO project carried out by a number of European research
agencies and headed by a group from EPFL [23]. Clarke [24]
outlined the differences between these learning-algorithm
approaches and the model-based approach, and discusses the
advantages and disadvantages of each. In general, learning-
algorithm based controllers are easier to install and operate, and
do not have the same concerns about model accuracy or
computation time that MPC has. But unlike model-based
controllers, learning-algorithm controllers usually require an in
situ learning period before use, they do not deal well with physical
or occupant-use changes in the building, and they tend not to
perform well under anomalous conditions. And since they lack any
building physics in their internal calculations, they cannot be used
to explain why particular conditions or configurations produce
particular effects, so they are of less use in building diagnostics or
retrofit than arethe models used in MPC. But the ability to improve
performance over time, as embodied by these learning-algorithm
approaches, is a useful feature that could be incorporated into
software and methodologies for MPC.
Recent and ongoing research in MPC for buildings is being
carried out by research teams involving both buildings experts andMPC experts. Recent collaborative work between UC Berkeley,
Lawrence Berkeley National Lab and United Technologies Corpo-
ration has implemented MPC for a campus chilled water storage
system [25], and there is an ongoing research project on MPC in
buildings involving ETH Zurich, Siemens, EMPA Dubendorf and
MeteoSwiss [26].
2.2. Simulation, optimization and controls software
There is a broad collection of commonly used building energy
simulation software available, but most of this was created with
design applications in mindand tends not to beideal for use for the
online model in MPC because of slow run times, lack of optimizer
access to the underlying equations, and difficulties in re-initializing the model states for a particular time-step (most
require a warm-up period). Some existing programs (e.g. TRNSYS,
SPARK) present fewer difficulties for use in MPC than others, but
they are still not ideal.
Thedevelopmentof a Modelica library of buildings components
[27] is currently underway, in part to try to address these
problems. Some MPC researchers have turned to the creation of
models from scratch in Matlab (which is the tool of choice for
controls researchers, and the Matlab MPC Toolbox [28] is helpful)
or the creation of Matlab lookup tables off-line by simulating the
modeled components over their range of expected input condi-
tions and then using these lookup tables as the model in the on-
line optimization instead of using the first-principles directly.
This development of more controls-friendly building simula-tion tools is helpful. But it will require some time, and buildings
researchers and practitioners who are more familiar with the
standard building simulation tools may wish to use these for MPC
studies in the near-term. And those for whom the software cost is
prohibitive will always prefer to use free or inexpensive tools. As
such, the software framework described herein was constructed to
make use of any text-based simulation software (so either existing
or new-generation tools can be used), and uses GenOpt [1] for the
optimization.
GenOpt was developed in an effort to simplify and standardize
the process of optimization with building simulation. It is a Java
program and is freely downloadable. It essentially acts as an
interface between any text-based building simulation program
and any optimization algorithm. It has a standard library of
1 Note that the use of predicted values over a future horizon is necessary for any
system involving energy storage, but it may also be necessary for any system in
which there is a penalty incurred for changing control configurations. For example,
if the system requires x kWh to change the position of a solar shading device, and
such an action would save less than x kWh over any one particular controller time-
step, thisactionwould notbe selectedwithout theconsideration of furtherpointsin
the future, even though one change in position might save substantial energy over
the course of a day. So a prediction horizon may still be desired in solar shading
applications if an energy or occupant-distraction penalty is considered for position
changes.
B. Coffey et al./ Energy and Buildings 42 (2010) 10841092 1085
7/29/2019 1-s2.0-S0378778810000290-main
3/9
optimization algorithms, which includes generalized pattern
search algorithms, particle-swarm algorithms and algorithms for
parametric studies, and the library can be extended by the user by
adding new optimization algorithms.
3. Framework
The development of the software framework aims to provide a
free MPC tool that researchers and practitioners can use alongsidetheir modeling software of choice. It essentially acts as an
extension of GenOpt, providing the organization necessary to
use it as the optimizer in a model-based controller that is
connectedto a central building control system, andproviding some
functionality specifically appropriate to MPC problems. We begin
by looking at the MPC problem definition, then describe the
GenOpt-based framework developed to address it.
3.1. Generic problem definition
Fig. 1 provides a simple illustration of model predictive control,
where the projected control sequence over the prediction horizon
is determined by an online optimization with a system model. It
can be used for multi-input multi-output control of nonlinear
dynamic systems, and is most often applied to systems with slow
dynamics, application-critical and possibly nonlinear state con-
straints (as in many chemical process applications), and/or
complex interactions between inputs and outputs. Buildings
applications rarely have critical state constraints, but many
supervisory problems have complex interactions between com-
ponents (e.g. between solar shading, space cooling and lighting),
combined with relatively slow dynamics. The supervisory control-
lertime-step in buildings applications could range from minutes to
days. Since the objective function is evaluated by running a
simulation of the online model, there is an important tradeoff that
must be made between the controller time-step, the computation
time required by the simulation, and the precision (and global-vs-
local characteristics) of the optimizer.
Each time that the controller is asked to determine new valuesfor the control variables, it is facedwith the optimization problem
defined by the setof Eqs. (1)(4) (inan energyminimization case)
or the set of Eqs. (5)(8) (in a demand minimization case), where
g1 is the objectivefunction (theoutput of the online model),g2 are
theconstraintson the state andoutput (whichmay be nonlinear),
f maps the evolution of the system states (the evolution of the
model states),p is a terminal cost,and Uare the input constraints.
Note that for non-predictive control, one can use same ideas but
set t 1 as a constant, eliminate the terminal cost p and ignore
Eqs. (2) and (6).
minu
XN
t1
g1 ut; xt; wt p xN 1
s:t: xt1 f xt; ut; wt t 1;. . .
; N 2
g2 ut; xt; wt 0 t 1; . . . ; N 3
ut 2 U t 1; . . . ; N 4
minu
maxt2 1...N
g1 ut; xt; wt p xN 5
s:t: xt1 f xt; ut; wt t 1; . . . ; N 6
g2 ut; xt; wt 0 t 1; . . . ; N 7
ut 2 U t 1; . . . ; N 8
An important aspect of the MPC optimization problem is that
each problem faced is quite similar to the problem at the previoustime-step. And other earlier time-steps may have had similar
conditions to the current one. This feature of the MPC optimization
problem turns out to be quite useful in generating good
optimization starting points, although it is often overlooked, and
to the authors knowledge it has not yet been taken advantage of in
previous buildings research. One must be careful to avoid getting
stuck in local minima when using this idea, but this concern can be
overcome in a number of ways, one of which is to use a multi-start
optimization algorithm, as used in the example below.
3.2. Framework overview
Within the software framework, the problem is divided into
three layers. The first layer consists of the simulation software thatis being used for the on-line model. The second layer is the
optimization layer, which runs one of many possible algorithms to
try to solve the optimization problem for a given time-step. The
third layer is an organization layer, which interfaces with the
building central control system, sets up the optimization problem
at each time-step, and performs a number of other organizational
and learning tasks. Text files are used to pass information between
layers. The basic structure is shown in Fig. 2, along with how it
interfaces with the buildings energy management system and
with a prediction module (which is considered as a separate
problem from theoptimization problem itself, andis notdealtwith
in detail here).
The simulation layer of the software framework can use any
energy simulation program, as long as it reads and writes to textfiles and can be called from the command line. The optimization
layer uses GenOpt as the interface between the optimization
algorithms and the simulation program. The organization layer
uses a java program named SimCon, which was written to meet the
requirements of this layer. For a given time-step, SimCon begins
the computation process by reading the text files for the current
conditions and the predicted future conditions, and it ends by
writing the decisions text file. So from the point of view of a central
control system, its use requires just that it write some of its sensor
information to text files, call SimCon, wait a pre-determined
amount of time, and then read a decision text file which tells it
what set-points to use. Details of the text file configurations,
syntax, source code and example files are included with the beta
version download [2].Fig. 1. Receding horizon control.
B. Coffey et al./ Energy and Buildings 42 (2010) 108410921086
7/29/2019 1-s2.0-S0378778810000290-main
4/9
3.3. The organizational layer
Aside from its roles of interfacing and overall coordination, the
organizational layer does two important things: (1) it stores the
results from previous time-steps; and (2) it writes an optimization
instructions file which gets read by the optimization algorithm
within the optimization layer. Similar to how GenOpt has an
extendable library of optimization algorithms, SimCon has been
developed with an extendable library of optimization instruction
algorithms, from which the user can select (or develop) the
algorithm that will write the optimization instructions file. Since
this file must be read by the optimization algorithm in GenOpt,
these two algorithms must be coordinated. In the case study
considered below, the optimization instructions file is used to
specify starting points and constraints for the optimizationalgorithm. (Other uses are possible, as discussed in Section 6.)
In particular, the optimization instruction algorithms used here
specify optimization starting points based on the results from the
previous time-step, and starting points and constraints based on
knowledge-based rules.
3.4. Virtual testing environment
A single run of SimCon is just for one time-step. To test its
performance, it needs to be used within a real-time environment,
with a central controller sending it conditions and predictions at
each time-step, and then acting on its decisions. This can be an
actual buildings control system, or it can be connected to the
control system of a virtual building. This link between SimCon andanother building model can be done a number of different ways.
The Building Controls Virtual Test Bed, recently developed at LBNL
[29] provides a good framework for this. In the case study
considered below,the virtual building is a copy of theonline model
in the controller, but slowed down to real-time (through the
addition of a TRNSYS object that causes the model to sleep for a
specified time period at each time-step), and with the addition of a
supervisory control object in TRNSYS that writes conditions files,
calls SimCon and reads the decisions file. This two-model virtual
testing arrangement allows for easier testing of SimCon than
would be possible through an actual supervisory controller
implementation in a real building. But as importantly, it also
allows one to test various MPC configurations under identical
conditions, and allows one to systematically consider the impacts
of various model inaccuracies (by changing parameter values so
that they are different in the two models), improper initialization
of the online model, or prediction inaccuracies.
4. Example algorithm
An example optimization instructions algorithm and optimi-
zation algorithm pair was developed for this framework, based on
a genetic algorithm. Although genetic algorithms tend to have slow
convergence rates, it was used here because of interesting
possibilities for coupling with SimCon. In particular, a genetic
algorithm can be initialized with numerous starting points, so they
can use some rule-based or learning-based suggestions forstarting
points and still have other randomly generated starting points that
mayallowit to discover unexpected points that maybe betterthan
those around the given points.
4.1. Basic genetic algorithm description
Genetic algorithms (GAs) are inspired by biological evolution,
using concepts of mating, mutation and natural selection to
impel successive populations of individuals (with each individ-
ual representing a point in the search space) towards an
optimization of the objective function. An initial population ofpoints is chosen, usually at random from throughout the search
space, and as the population evolves from one generation to the
next new points emerge, with the evolutionary processes
favouring the emergence of points that are ever closer to
optimal. Their path through the search space is stochastic (there
is some randomness in the mutation and mating processes
through which new points are chosen), so they can sometimes be
less efficient as optimizers than other possible algorithms, but
their stochastic search path also makes them more able to avoid
being trapped in local minima. Genetic algorithms have been
used extensively in previous buildings research for design
optimization problems [3035], but their use in contr ol
optimization has been limited.
A genetic algorithm for GenOpt was written for this example,and is included in the SimCon beta download [2]. It uses one-point
crossover and uniform mutation, and allows the user to specify the
population size, the percentage elite to maintain, and the rates for
crossover and mutation. To avoid problems that may result in later
generations due to a depletion of diversity, the algorithm is
configured to test for stagnation and if necessary it increases the
mutation rate to 100% for a generation. It also allows the user to
stipulate the maximum numberof simulations to run (some sort of
time-limiting factor is necessary for use within control optimiza-
tion), and the user can choose to keep the values considered for
each variable to a desired level of precision by having theGA search
over points on a user-defined grid.
4.2. Using the optimization instructions file
The genetic algorithm in GenOpt is also configured to read and
use starting points and constraints from the optimization
instructions file. A companion optimization instructions algorithm
was written for the SimCon library which writes starting points
and constraints to the instructions file, based on the following
three considerations:
1. The values obtained in the previous optimization solution
(which are stored by SimCon) are transferred over to an initial
point in the current optimization by moving them all back one
time-step, and finding an arbitraryway of filling in thelast time-
step values for the current point (in the example case below, the
last time-step value is set equal to the second-last one).
Fig. 2. Structure overview.
B. Coffey et al./ Energy and Buildings 42 (2010) 10841092 1087
7/29/2019 1-s2.0-S0378778810000290-main
5/9
2. Using rules for suggesting starting points: When Henze et al.
performed their case study on thermal storage control using
model predictive control [7,8], they found a number of points
where the controller actually performed worse than the
standard heuristic controller they were comparing against, as
it was stuck in a local minimum. This situation of performing
worse than a heuristic controller can be avoided if the
knowledge embedded in the heuristic controller is also
embedded in the model predictive controller in the form of
optimization starting points. (Note that, however, with an
imperfect model or poor predictions, this knowledge is not
necessarily enough to keep MPC from performing worse than
the heuristic controller.)
3. Using rules to set search-space constraints: In order to make the
time-constrained optimization problem more tractable, it is
helpful to eliminateparts of the search space that areunlikely to
produce good control points. (In the case study below, for
example, it may be assumed that the optimal point does not
include set-points near the end of the trim that are less than
25 C, so the constraints for these variables can be modified to
25 < T< 26 C, rather than their original 22 < T< 26 C.)
5. Example application study
5.1. Demand response with zone temperature ramping
A number of previous studies [36,37] have shown that demand
response with zone temperature reset can be an effective demand
trimming strategy, helping to avoid blackouts or the need for new
electrical production capacity, by producing substantial decreases
in cooling demand over a critical period (usually in the range of 1
3 h) without causing too much occupant discomfort. Most of these
previous studies have considered very simple control strategies,
focusing on the demand response potential with strategies that
could easily be mass-deployed.
However, research by Lee and Braun [3841] has looked more
closely at the optimal control of this set-point modification to
minimize the peak demand over the trimming period. Their workhas been along two related tracks: (1) the development of an
inverse model of a small commercial building, and the use of this
model to determine optimal set-point trajectories [38,41]; and
(2) the development and evaluation of simple control rules that
can approximate optimal control [39,40]. In the first track, they
used the fact that the optimal set-point trajectory produces a flat
demand over the trimming period. They used the inverse model
to calculate, at any given point in time, what the set-point must
be to produce a particular demand level. They then iterated over
the demand level to find the minimum level possible within the
problem constraints, and the collection of set-points associated
with that level is thus the optimal set-point trajectory. This is a
clever approach to the problem. The implementation is only
slightly different than the model predictive control approachconsidered in this paper, in that it does not march along making
control decisions each time-step in real-time, but rather
determines the full trajectory before the trim. But it could easily
be made to march along and re-do the optimization at each time-
step as new information became available (as noted in [41]). The
use of the demand-target approach by backing out the set-point
values for a specific demand level was possible because they
were using a simplified inverse model, but it would be very
difficult with a more detailed model and a standard simulation
tool, as used in the example study below. The second track of Lee
and Brauns research in this area, that of developing and
evaluating near-optimal rule-based strategies for demand
response with zone temperature ramping, is what is used most
in this paper. In particular, they have determined that a very
effective strategy is to use a logarithmic set-point trajectory over
the trim period.
In general, the problem of optimizing demand response with
temperature ramping has been well covered by Lee and Braun, and
their simplified rule-based approaches are very effective. Having
such well-charted territory is useful for the case study, and their
insights and heuristic rules are used both as a starting point and as
a basis for comparison.
5.2. Case study description
The case study consideredis for optimal demand response using
zone temperature set-point ramping for an office space in Ottawa.
The office space considered is area 8B1 of Place-du-Portage, whichhas a fairly standard open plan configuration. It is the home of the
Innovations & Solutions Directorate of Public Works and Govern-
ment Services Canada, and it has been outfitted with a highly
instrumented experimental personal environmental control (PEC)
system that gives occupants control over their lighting and over a
jet-diffuser that provides conditioned air to their workspace. The
substantial data availability with this experimental system makes it
amenable to the creation and calibration of a detailed thermal
model,2 whichwas donein TRNSYS. This modelwasusedbothas the
online model within the controller, and also to act as the actual
building for the virtual tests. In the case study, the personal air-
conditioning controls are over-ridden in favour of a demand
response action, for one particularly hot afternoon in July. The goal
of the demand responseaction is to minimize the maximum15-mincoolingdemandbetween 1:00and 4:00 p.m., withthe controlaction
allowed to begin at 12:30 p.m., and the zone temperature set-point
constrained to remain between 22 and 26 C. Fig. 3 shows the base
case with no action.
5.3. Results
Some heuristic controls were considered for comparison with
MPC. Fig. 4 (jump trim) shows the effect of simply increasing the
set-point to 26 C immediately and leaving it at that level
throughout the demand response period (this is the most common
simple strategy used in applications). Fig. 5 (linear trim) shows
Fig. 3. No trim.
2
Model details are available in [42].
B. Coffey et al./ Energy and Buildings 42 (2010) 108410921088
7/29/2019 1-s2.0-S0378778810000290-main
6/9
the effect of increasing the set-point linearly over the demand
response period. Fig. 6 (log trim) shows the effect of increasing
the set-point logarithmically over the demand response period, as
suggested by Lee and Braun. (The log trim requires the setting of a
parameter to determine the steepness of the curve. For this study,
that parameter was selected by an iterative search, simulating
possible values before using the best one.) It should be noted here
that these heuristic controls were also implemented with a 15-min
control time-stepin thevirtual tests (aswere theMPC cases), butin
reality such simple control strategies could be implemented on a
much shorter time-step and thus may perform slightly better than
shown here, but the improvement would be minor.
TheMPC cases were split into twotypes: ideal cases,wherethe
online model exactly matched the virtual test simulation model,the model was initialized perfectly and the prediction was perfect;
and non-ideal cases, considering the effects of model mismatch,
imperfect initialization and imperfect prediction. The case shown
in Fig. 7 is an ideal case with the computation time constraint
removed so that the model predictive controller can be used to
more closely approximate optimal control (the computation was
allowed to run over three nights rather than being constrained to
the 3-h window it would have in a real-time application). Note
that, intuitively and supported by [38,41], the optimum should
produce a horizontal line in the load during the trim period. This
case comes closer to that optimum than do any of the heuristic
cases, but it is still not quite optimal.
The results of the heuristic control cases and some of the MPC
cases considered are shown in Table 1. It was found that the
logarithmic trim was nearly ideal in this case, and should be
recommended for use in other similar cases. The optimal set-point
configuration, however, is actually quite complex and likely highlycase-dependent, and it would be difficult to imagine a rule-based
approach that would capture it. The logarithmic approach
produced a 28.0% trim, while the optimal was estimated to be
Fig. 4. Jump trim.
Fig. 5. Linear trim.
Fig. 6. Log trim.
Fig. 7. MPC trim with loosened time constraints.
B. Coffey et al./ Energy and Buildings 42 (2010) 10841092 1089
7/29/2019 1-s2.0-S0378778810000290-main
7/9
slightly greater than the 30.1% produced by the ideal non-time-
constrained MPC. The application of MPC in the ideal case and with
the real-time computation constraints produced a 29.5% trim.
Without rule-based initial suggestions or previous-time-step
learning, MPC (as configured with the genetic algorithm) does
not perform nearly as well, because it does not converge quickly
enough towards the optimum. And the performance of the
controller drops off as circumstances move away from the ideal:
with imperfect model calibration but perfect initialization and
prediction, MPC performed slightly worse than the logarithmic
approach, producing a 27.1% trim; and with perfect modelcalibration but imperfect initialization and prediction, the MPC
results became more sporadic and much further from the optimal.
(It should be noted that since the genetic algorithm is stochastic,
the results can vary from test to test. But in the ideal cases with
logarithmic starting points, MPC always performs somewhere
between the log trim and the optimal.)
6. Discussion
The software framework presented here opens up a variety of
possibilities for further research.
6.1. Appropriate complexity level for application studies
In the case study presented above, heuristic control was
shown to perform nearly as well as MPC (or possibly better, if one
considers model mismatch and imperfections in initialization
and prediction). But if the scenario were more complex, for
example if light dimming is being applied alongside the zone
temperature ramping or if more detailed consideration is to be
given of occupant comfort under these transient thermal
conditions [43], then MPC may be worth considering. And one
must consider other benefits of MPC as, such as ability to easily
adapt to changing electricity rate structures, and its links with
other model-based building operations improvements as dis-
cussed below. But in general, the relative performance of
heuristic control and MPC in this case study suggests that there
might be a certain level of problem complexity below which MPCis simply not appropriate. It is difficult to assess what this level
might be, but future research should be considering more
complex problems (with more control variables and/or more
complex control objectives), if we are to test practical applica-
tions of MPC in buildings.
6.2. Improving optimization results
Genetic algorithms have the benefit of allowing multiple
starting-point suggestions alongside other random starting points
and thus can more easily avoid local minima, but they are perhaps
not ideal for this control-optimization application because they do
not converge to solutions very quickly. Other optimization
algorithms should be developed for use within this supervisory
control framework. (For example, the generalized pattern search
algorithms available in the standard GenOpt library should be
explored for use in this context.) Hybrid algorithms are also likely
worth developing for this application, with different approaches
used for a global search phase and for a local search phase, and the
optimization algorithm could be made to switch from one to the
other after a certain number of simulations.
And there could be more advanced ways of using the
organizational layer to inform the optimization algorithm.
The organizational layer could search for more complex patterns
in the previous results and pass these on to the optimization
algorithms: it couldfind correlation strengths between variables in
optimization outputs, noting conditions where variables should
take on similar values (e.g. if in previous time-step optimizations
the variable values tend to change very little over the time horizon,
then the optimization layer could restrict its search); and the
organizational layer could perform sensitivity analyses on the
previous results to determine which variables have the greatest
effect on the objective function, then tell the optimization
algorithm to focus on these variables first before tweaking the
other variable values. It is worth noting that with an increased use
of such techniques, SimConalgorithms could begin to take on some
of the characteristics and benefits of learning-algorithm (e.g.
neural network) approaches. Other possible improvements to theuse of organization-layer information include finding ways of
treating future time-steps differently the further into the future
they are (e.g. to decrease their relative precision or constrain their
search ranges as a way of placing more focus on the more-
immediately upcoming time-steps), and developing or refining
heuristic starting point rules based on results from previous
optimizations.
All of these changes could significantly improve the efficacy of
the optimization. However, they all still walk around the
simulation program, treating it essentially as a black box,
generating and testing possible points. If simulation tools were
todevelop in such a way as to provide the optimizer more access to
the problem equations and/or to ensure differentiability, the
optimizer could use this to parse the problem into sub-regions orto analytically derive gradients, both of which could dramatically
improve computational efficiency. Such development could also
allow for the backing-out of set-point values given a desired
objective, as was used in the inverse-model studies of Lee and
Braun [38,41].
6.3. Imperfect models, initializations and predictions
The case study results have highlighted the need for more
consideration of model accuracy, initial conditions and predictions.
If not dealt with effectively, these aspects could undermine the
performance of any practical or theoretical application of MPC.
More research is required in these areas, but the following are
some good starting points.
1. Continuous model calibration: The automated error minimiza-
tion approach to model calibration [10,44,45] allows for the
model to be continuously tuned to become more accurate over
time. The conditions and optimization results database in
SimCon could be used for this.
2. Initialization: As noted earlier, this is an inherent problem with
theuse of most building simulation tools, which do notallow for
explicit state initialization, but instead require a warm-up
period. Development of more controls-friendly building simu-
lation tools will help get around this. But in the meantime, it
would be helpful to devise ways of rewinding or copying the
simulation process such that the warm-up period only needs to
be run once per optimization.
Table 1
Summary of results: trim percentages.
Heuristic Base case
Jump trim 23.0%
Linear trim 13.7%
Log trim 28.0%
Model predictive Ideal, no time constraints 30.1%
I deal, with time con stra ints 2 9.5%
Ideal, no learning 28.0%
Ideal, no rule suggestions 5.9%
Imperfect calibration 27.1%
Imperfect initialization 10.1%
B. Coffey et al./ Energy and Buildings 42 (2010) 108410921090
7/29/2019 1-s2.0-S0378778810000290-main
8/9
6.4. Other potential research areas with SimCon
One of the most alluring aspects of simulation-based control is
that it overlaps well with a number of other possible applications
of simulation in building operations. A controllers well-tuned
physics-based model of the building could be of great use in
evaluatingpossible retrofit strategies. And the overlap between the
idea of a model-based controller with automated calibration and a
model-based diagnostics tool [46,47] is interesting. In the first case
you want an accurate model of how the building is actually
performing, but in the second case you want an accurate model of
howthe building should be performing. But the models must share
the same structure, and could be treated as two sides of the same
model within an integrated controls-and-diagnostics system,
differing only in terms of some parameter values.
Although this paper has focused on the study of real-time MPC,
it should be acknowledged that another possible use of SimCon
(and perhaps a much more practical use in the short and mid term,
and possibly even in the long term) is for the development and
evaluation of standard heuristic control sequences for complex
systems. By relaxing the computational time constraints and
providing ideal circumstances (perfect model calibration, initiali-
zation and prediction), SimCon could be used to approximate
optimal control for any given (simulated) set of conditions.Iterating over various sets of conditions and analyzing the SimCon
outputs could allow researchers to devise rules for near-optimal
control.
There is an R&D policy interest in knowing the technical energy
savings potential with near-optimal control of highly dynamic
integrated building systems, but there is currently only a modest
amount of literature available on the energy savings potential
through integrated systems control (e.g. [48,49]), and none of this
extends to full integration of HVAC, lighting and dynamic facades.
SimCon could be used to provide an approximation of optimal
control for any type of complex idealized building system, and so
could be usefulin estimating an upper bound on theenergy savings
potential.
Personal control tends to lead to better occupant satisfactionand can also lead to decreased energy use in some cases [50,51],
but not all. Perhaps the best configuration would involve some
combination of automated control and occupant control. SimCon
could be used to determine appropriate control for the automated
parts of a building given stochastic occupant control of other parts
of it. Or it could be used to determine optimal configurations and
suggest these to the occupant to accept or ignore. Or it could be
used to determine when to allow occupant control with a red-
green-light system.
7. Conclusions
The example application study and example algorithm have
provided an illustration and test of the software framework. Andthe study has supported the findings of Lee and Braun that a
logarithmic trim is near optimal for demand response by zone
temperature reset. The framework should be used for more
complex application studies in the future, and more optimization
and organization-layer algorithms should be developed.
Model predictive control holds promise for energy efficiency
and demand response in integrated supervisory building control
systems. It is hoped that the framework presented herein will help
to facilitate further research and development in this field.
Acknowledgement
The authors gratefully acknowledge the support of Public
Works and Government Services Canada for this research.
References
[1] M. Wetter, GenOpt: generic optimization program, http://gundog.lbl.gov/GO/.[2] B. Coffey, Simcon beta, http://ftp.tech-env.com/./pub/Coffey/SimCon.[3] M.Morari, J. Lee,Model predictive control:past, presentand future,Computers and
Chemical Engineering 23 (1999) 667682.[4] D. Mayne, J. Rawlings, C. Rao, P. Scokaert, Constrained model predictive control:
stability and optimality, Automatica 36 (6) (2000) 789814.[5] F. Borrelli, A. Bemporad, M. Fodor, D. Hrovat, An MPC/hybrid system approach to
traction control, IEEE Transactions of Control Systems and Technology 14 (3)(2006) 541552.
[6] G. Kelly, Control system simulation in North America, Energy and Buildings 10(1988) 193202.
[7] G. Henze, D. Kalz, S. Liu, C. Felsmann, Experimental analysis of model-basedpredictive optimal control for active and passive thermal storage inventory,HVAC&R Research 11 (2) (2005) 189213.
[8] G. Henze, M. Krarti, Predictive optimal control of active and passive buildingthermal storage inventory: final report, DOE Award Number: DE-FC-26-01NT41255, 2005.
[9] G. Henze, D. Kalz, C. Felsmann, G. Knabe, Impact of forecasting accuracy onpredictive optimal control of active and passive building thermal storage inven-tory, HVAC&R Research 10 (2) (2004) 153177.
[10] G. Henze, S. Liu, Calibration of building models for supervisory control ofcommercial buildings, in: Proceedings of the 9th International Building Perfor-mance Simulation Association (IBPSA) Conference, Montreal, Canada, 2005.
[11] S. Liu, G. Henze, Experimental analysis of simulated reinforcement learningcontrol for active and passive building thermal storage inventory, Part 1, Theo-retical foundation, Energy and Buildings 38 (2006) 142147.
[12] S. Liu, G. Henze, Experimental analysis of simulated reinforcement learningcontrol for active and passive building thermal storage inventory, Part 2, Results
and analysis, Energy and Buildings 38 (2006) 148161.[13] J. Clarke, J. Crockroft, S. Conner, J. Hand, N. Kelly, R. Moore, T. OBrien, P. Strachan,
Simulation-assisted control in building energy management systems, Energy andBuildings 34 (2002) 933940.
[14] M. Kummert, P. Andre, A. Argigiou, Performance comparison of heating controlstrategies combining simulation and experimental results, in: Proceedings of the9th International Building Performance Simulation Association (IBPSA) Confer-ence, Montreal, Canada, 2005.
[15] M. Kummert,P. Andre, Simulationof a model-based optimal controllerfor heatingsystems under realistic hypotheses, in: Proceedings of the 9th InternationalBuilding Performance Simulation Association (IBPSA) Conference, Montreal,Canada, 2005.
[16] A. Mahdavi, Simulation-based control of buildingsystemsoperation,Building andEnvironment 36 (2001) 789796.
[17] A. Mahdavi, B. Spasojevic, K. Brunner,Elements of a simulation-assisted daylight-responsive illumination systems control in buildings, in: Proceedings of the 9thInternational Building Performance Simulation Association (IBPSA) Conference,Montreal, Canada, 2005.
[18] G. Suter, O. Icoglu, A. Mahdavi, B. Spasojevic, Position uncertainty in space scenereconstruction for simulation-based lighting control, in: Proceedings of the 9thInternational Building Performance Simulation Association (IBPSA) Conference,Montreal, Canada, 2005.
[19] A. Mahdavi, C. Proglhof, A model-based method for the integration of naturalventilation in indoor climate systems operation, in: Proceedings of the 9thInternational Building Performance Simulation Association (IBPSA) Conference,Montreal, Canada, 2005.
[20] S. Wang, X. Jin, Model-based optimal control of VAV air-conditioning systemusing genetic algorithm, Building and Environment 35 (2000) 471487.
[21] N. Nassif, S. Kajl, R. Sabourin, Simplified model-based optimal control of VAVair-conditioning system, in: Proceedings of the 9th International BuildingPerformance Simulation Association (IBPSA) Conference, Montreal, Canada,2005.
[22] B. Flake, Parameter estimation and optimal supervisory control of chilled waterplants, PhD thesis, University of Wisconsin-Madison, 1998.
[23] C. Priolo, S. Sciuto, F. Sperduto, Efficient design incorporating fundamentalsimprovements for control and integrated optimisation: final report, http://lesowww.epfl.ch/anglais/techint/edificio.pdf, 2001.
[24] J. Clarke, Domain integration in building simulation, Energy and Buildings 33(2001) 303308.
[25] Y. Ma, F. Borrelli, B. Hencey, B. Coffey, S. Bengea, A. Packard, M. Wetter, P. Haves,Model predictive control for the operation of building cooling systems, in:American Control Conference, 2010.
[26] G. Ddfd, et al., Opticontrol project, http://www.opticontrol.ethz.ch/.[27] M. Wetter, Modelica-based modeling and simulation to support research and
development in building energy and controls systems, Journal of Building Per-formance Simulation, 2009.
[28] http://www.mathworks.com/products/mpc/.[29] M. Wetter, P. Haves, A modular building controls virtual test bed for the integra-
tion of heterogeneous systems, SimBuild 2008 (2008) 6976.[30] M. Wetter, J. Wright, A comparison of deterministic and probabilistic optimiza-
tion algorithms for nonsmooth simulation-based optimization, Building andEnvironment 39 (2004) 989999.
[31] W. Wang, R. Zmeureanu, H. Rivard, Two-phase application of multi-objectivegenetic algorithms in green building design, in: Proceedings of the 9th Interna-tional Building Performance Simulation Association (IBPSA) Conference, Mon-treal, Canada, 2005.
B. Coffey et al./ Energy and Buildings 42 (2010) 10841092 1091
http://gundog.lbl.gov/GO/http://ftp.tech-env.com/pub/Coffey/SimConhttp://lesowww.epfl.ch/anglais/techint/edificio.pdfhttp://lesowww.epfl.ch/anglais/techint/edificio.pdfhttp://www.opticontrol.ethz.ch/http://www.opticontrol.ethz.ch/http://www.mathworks.com/products/mpc/http://www.mathworks.com/products/mpc/http://www.opticontrol.ethz.ch/http://lesowww.epfl.ch/anglais/techint/edificio.pdfhttp://lesowww.epfl.ch/anglais/techint/edificio.pdfhttp://ftp.tech-env.com/pub/Coffey/SimConhttp://gundog.lbl.gov/GO/7/29/2019 1-s2.0-S0378778810000290-main
9/9
[32] J. Wright, A. Alajmi, The robustness of genetic algorithmsin solving unconstrainedbuildingoptimization problems, in: Proceedings of the 9th International BuildingPerformanceSimulation Association (IBPSA) Conference, Montreal, Canada, 2005.
[33] L. Zhou, F. Haghighat, Optimization of ventilation systems in office environment,Part I: methodology, Building and Environment 44 (2008) 651656.
[34] L. Zhou, F. Haghighat, Optimization of ventilation systems in office environment,Part II: results and discussion, Building and Environment (2008) 44.
[35] L. Magnier, F. Haghighat, Multiobjective optimization of building design usingTRNSYS simulations, genetic algorithm, and artificial neural network, Buildingand Environment 45 (2010) 739746.
[36] P. Xu, P. Haves, J. Braun, L. Hope, Peak demand reduction from pre-cooling with
zone temperature reset in an office building, in: ACEEE Summer Study on EnergyEfficiency in Buildings, 2004.[37] P. Xu, Evaluation of demand shifting strategies with thermal mass in two large
commercial buildings, in: Proceedings of SimBuild, 2006.[38] K. Lee, J. Braun, Development and application of an inverse building model for
demand responsein small commercial buildings,in: Proceedings of SimBuild,2006.[39] K. Lee, J. Braun, Development of methods for determining demand-limiting
setpoint trajectories in commercial buildings using short-term data analysis,in: Proceedings of SimBuild, 2006.
[40] K. Lee, J. Braun, Evaluation of methods for determining demand-limiting setpointtrajectories in commercial buildings using short-term data analysis, in: Proceed-ings of SimBuild, 2006.
[41] K.Lee, J. Braun, Reducing peak coolingloadsthroughmodel-based control of zonetemperature setpoints,in: Proceedingsof the American Control Conference, 2007.
[42] B. Coffey, A development and testing framework for simulation-based supervi-sory control with application to optimal zone temperature ramping demand
responseusing a modified genetic algorithm,M.A.Sc.thesis, ConcordiaUniversity,2008.
[43] G.Newsham, C.Donnelly,S. Mancini,R. Marchand,W. Lei, K.Charles, J.Veitch,Theeffect of ramps in temperature and electric light levels on office occupants: aliterature review and a laboratory experiment, ACEEE Summer Study on EnergyEfficiency in Buildings, 2006.
[44] J. Sun, T. Reddy, Calibration of building energy systemsimulation programs usingthe analytic optimization approach (rp-1051), International Journal of HVAC&RResearch 12 (1) (2006) 177196.
[45] T. Reddy, Literature review on calibration of building energy simulation pro-grams: uses, problems, procedures, uncertainty, and tools, ASHRAE Transactions
112 (2) (2006) 226240.[46] P. Xu,P. Haves,M. Kim,Model-based automated functionaltestingmethodologyand application to air-handling units, ASHRAE Transactions (2005) OR-05-13-4.
[47] P. Xu, P. Haves, D. Curtil, A library of HVAC component models for use inautomated diagnostics, in: Proceedings of Simbuild, 2006.
[48] E. Lee, D. DiBartolomeo, F. Rubinstein, S. Selkowitz, Low-cost networking fordynamic window systems, Energy and Buildings 36 (2004) 503513.
[49] P. Haves, R. Hitchcock, F. Rubinstein, P. Xu, Assessment of building controlsystems, Final report to BT, OERE, DOE, Contract No. DE-AC02-05CH11231, 2007.
[50] R. de Dear, G. Brager, The adaptive model of thermal comfort and energyconservation in the built environment, International Journal of Biometeorology45 (2001) 100108.
[51] G. Newsham, J. Veitch, C. Arsenault, C. Duval, Lighting for vdt workstations 1:effect of control on energy consumption and occupant mood, satisfaction anddiscomfort, Research report, Institute for Research in Construction, NationalResearch Council Canada, B3208.3 RR-165, 2004.
B. Coffey et al./ Energy and Buildings 42 (2010) 108410921092