10
3319, Page 1 Towards real MPC implementation in an office building using TACO Filip JORISSEN 1* , Damien PICARD 1,3 , Iago CUPEIRO FIGUEROA 1 , Wim BOYDENS 3 , Lieve HELSEN 1,2 * Corresponding Author [email protected] 1 KU Leuven, Department of Mechanical Engineering, Leuven, Belgium 2 EnergyVille, Waterschei, Belgium 3 boydens engineering, Dilbeek, Belgium ABSTRACT Model predictive control (MPC) is a promising alternative to rule-based control since it is more suitable to control increasingly complex buildings and thereby realising energy savings and comfort improvement. Practical implementations are however hampered by the complexity of MPC and the expertise required for developing MPC. Therefore, a toolchain for automated control and optimization (TACO) has been developed that automatically translates an object-oriented Modelica model into an efficient MPC code. Since object- oriented models from the Modelica IDEAS library are used, the expertise requirement and development time are reduced significantly. TACO has, however, not yet been applied to a real building and its robustness in real operation still must be demonstrated. The purpose of this paper is to provide a comprehensive overview of the steps that are proposed for implementing an MPC using TACO. We therefore summarise our existing methodology and describe our future extension plans to implement an MPC in the Infrax office building in Brussels by September 2018. 1. INTRODUCTION Building space heating and HVAC account for 15 % of the world final energy use (International Energy Agency, 2015). Therefore, according to the European Union’s Directive 2010/31/EN (European Parliament, 2010), an increasing effort is spent at increasing the building efficiency by improving their insulation level, by installing HVAC systems with a high primary energy efficiency (e.g. a combination of heat pump and floor heating or concrete core activation), and by increasing the share of renewable energy sources in build- ings. These measures however increase the complexity of building rule-based controllers (RBC). Firstly, the increase of the insulation level and often also the building thermal mass result in an increase of the building time constants, which is typically handled inadequately by RBC since such controllers usually do not antic- ipate the impact of future disturbances and control actions. Secondly, an efficient and economically viable HVAC system typically combines an efficient but expensive and slow base load system with a less ecological but cheaper and faster peak load system (Picard & Helsen, 2018). Such hybrid systems include many con- trol variables such as valve openings, pump speeds. Efficiently exploiting the multitude of control options becomes too complex for an RBC. For example, a modern building can be equipped with a heat pump, a gas boiler, concrete core activation, one or more air handling units with cooling and heating capacity, and each zone might have an additional VAV box. In this case each zone can be conditioned by three different emission systems and the heat can be provided by either the heat pump or the gas boiler. In such buildings, it is a challenge to design an RBC that can provide comfort to each zone and which uses the HVAC system optimally (e.g. provide the required heating and cooling with the most appropriate system at each point in time). Moreover, thermal comfort problems often arise due to inadequate rule-based control. This illustrates that state-of-the-art RBCs are not always capable to cope with the complexity of contem- porary thermal systems in buildings. Model Predictive Control (MPC) is a fundamentally different type of controller, that has the potential to solve many, if not all, of the aforementioned problems. MPC is a control strategy that optimizes a system’s control inputs using a computer model of the system such that a cost 5 th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 1

Towards real MPC implementation in an office building usingTACO

Filip JORISSEN1*, Damien PICARD1,3, Iago CUPEIRO FIGUEROA1, Wim BOYDENS3, LieveHELSEN1,2

* Corresponding [email protected]

1 KU Leuven, Department of Mechanical Engineering, Leuven, Belgium2 EnergyVille, Waterschei, Belgium

3 boydens engineering, Dilbeek, Belgium

ABSTRACT

Model predictive control (MPC) is a promising alternative to rule-based control since it is more suitableto control increasingly complex buildings and thereby realising energy savings and comfort improvement.Practical implementations are however hampered by the complexity of MPC and the expertise required fordeveloping MPC. Therefore, a toolchain for automated control and optimization (TACO) has been developedthat automatically translates an object-oriented Modelica model into an efficient MPC code. Since object-oriented models from the Modelica IDEAS library are used, the expertise requirement and development timeare reduced significantly. TACO has, however, not yet been applied to a real building and its robustness inreal operation still must be demonstrated. The purpose of this paper is to provide a comprehensive overviewof the steps that are proposed for implementing an MPC using TACO. We therefore summarise our existingmethodology and describe our future extension plans to implement an MPC in the Infrax office building inBrussels by September 2018.

1. INTRODUCTION

Building space heating and HVAC account for 15 % of the world final energy use (International EnergyAgency, 2015). Therefore, according to the European Union’s Directive 2010/31/EN (European Parliament,2010), an increasing effort is spent at increasing the building efficiency by improving their insulation level,by installing HVAC systems with a high primary energy efficiency (e.g. a combination of heat pump andfloor heating or concrete core activation), and by increasing the share of renewable energy sources in build-ings. These measures however increase the complexity of building rule-based controllers (RBC). Firstly, theincrease of the insulation level and often also the building thermal mass result in an increase of the buildingtime constants, which is typically handled inadequately by RBC since such controllers usually do not antic-ipate the impact of future disturbances and control actions. Secondly, an efficient and economically viableHVAC system typically combines an efficient but expensive and slow base load system with a less ecologicalbut cheaper and faster peak load system (Picard & Helsen, 2018). Such hybrid systems include many con-trol variables such as valve openings, pump speeds. Efficiently exploiting the multitude of control optionsbecomes too complex for an RBC. For example, a modern building can be equipped with a heat pump, agas boiler, concrete core activation, one or more air handling units with cooling and heating capacity, andeach zone might have an additional VAV box. In this case each zone can be conditioned by three differentemission systems and the heat can be provided by either the heat pump or the gas boiler. In such buildings,it is a challenge to design an RBC that can provide comfort to each zone and which uses the HVAC systemoptimally (e.g. provide the required heating and cooling with the most appropriate system at each point intime). Moreover, thermal comfort problems often arise due to inadequate rule-based control.

This illustrates that state-of-the-art RBCs are not always capable to cope with the complexity of contem-porary thermal systems in buildings. Model Predictive Control (MPC) is a fundamentally different type ofcontroller, that has the potential to solve many, if not all, of the aforementioned problems. MPC is a controlstrategy that optimizes a system’s control inputs using a computer model of the system such that a cost

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 2: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 2

function (e.g. energy use) is minimized. Constraints can be enforced to bound the allowed solution space ofthe optimization problem.

In the literature, two types of MPC can be distinguished based on the type of HVAC and the type ofbuilding: MPC for light buildings with an air-based HVAC system and high cooling load, and MPC forheavy buildings with a water based HVAC system (e.g. geothermal thermally activated building systems -GEOTABS building). The former MPC focuses on saving energy by running the cooling machines at theiroptimal operating points by optimizing the supply air temperature and mass flow rates to the machinesand to the zones. The MPC also saves cost by exploiting variable electricity prices and by shaving peakloads. The building controller model is typically very simplified and obtained by black or grey-box systemidentification and the MPC formulation is often non-linear. Due to the low mass content of the building andthe fast reaction of the HVAC, optimal load shifting is not done at the building level but rather at a centralstorage tank level when available. Examples can be found in (Bengea et al., 2014; Ma et al., 2012; Risbecket al., 2015; Gruber et al., 2014; Braun, 2003; Braun & Lee, 2006a; Armstrong et al., 2006; Zaheer-Uddin &Zheng, 2000). The latter MPC type focuses on saving energy and improving thermal comfort by optimallyusing the inertia of the building. The thermal comfort range and the building inertia are used to shift thermalloads, to maximize the use of inexpensive energy sources like solar gains or passive cooling, and to use slowreacting HVAC systems like TABS in an efficient way. The following paragraphs focus on this second typeof MPC applied to (hybrid) GEOTABS buildings.

The energy use, energy cost and thermal discomfort saving potential of MPC for GEOTABS buildings hasbeen investigated both in simulation environments and in real buildings. Sourbron et al. (2013b) consideredtwo zones of a typical office building conditioned by a TABS and a ventilation system for which theydeveloped an MPC controlling the TABS supply temperature while the ventilation was controlled by RBC.The MPC controller model was a second order resistive-capacitive (RC) model whose parameters had beenobtained by grey-box system identification and the building model was developed in TRNSYS. Simulationresults showed savings of 15% of the energy use compared to RBC. Oldewurtel et al. (2012) and Gyalistras &Gwerder (2009) investigated the MPC savings potential for office buildings by simulating different versions ofa 12th order RC model (different orientations, construction types, building standards, window area fractions,internal gains levels, HVAC systems and climates were considered). The MPC optimized the operation ofthe blinds, the ventilation, the TABS and the supplementary emission system for one year. They found thatfor about 50% of the investigated building variants, MPC could save more than 40% of the non-renewableenergy use. These high energy savings are an over-estimation of the real possible savings as the controllerand the building models were identical (no model mismatch and perfect disturbance prediction) and theywere relatively simplified. Sturzenegger et al. (2013) used a similar white-box controller model to controlthe HVAC of a real office building of 6000 m2 floor area. Field tests showed that the implemented MPCcould save 17% of the annual energy use. The MPC optimization variables were the heating and coolingpowers delivered to the TABS, the solar transmission through the windows (blinds), the air flow through therecovery wheel or through its by-pass, and the flow through the ventilation heating and cooling coils. Theresulting Optimal Control Problem (OCP) was bi-linear in both its inputs and its states. Vana et al. (2014)developed an MPC controlling the TABS of a 3000 m2 real building. Experiments during the heating seasonshowed energy savings of 17%. The controller model was an 8th order model representing three thermalzones (one per floor) and its parameters were obtained by means of system identification. As the controllermodel had been identified using only winter measurement data, the MPC was only used for the heatingseason. Prıvara et al. (2011) also proposed an MPC to control the TABS power of a large university buildingduring the heating season. The controller model was obtained by subspace black-box model identificationand savings between 17 and 24% were found. Finally, De Coninck & Helsen (2016) obtained more than 30%energy saving in a Belgian office building in Brussels during winter months.

Despite numerous demonstrations of MPC in buildings, commercially exploiting this potential is difficultdue to the large amount of work incurred by setting up the MPC controller model (Sturzenegger et al., 2014;Cigler et al., 2013). Moreover, we lack a systematic approach that can be applied to any building, withoutrequiring expertise of both building energy simulation and optimization. In order to address these difficulties,TACO, a Toolchain for Automated Control and Optimization (Jorissen, Boydens, & Helsen, 2018; Jorissen,2018; Jorissen & Helsen, 2016), has recently been developed. TACO automatically generates a Non-Linear

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 3: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 3

Figure 1: The Infrax building

Problem (NLP) MPC code from a Modelica building model such that the toolchain user is only exposedto a software with the complexity of a typical building energy simulation tool. The Modelica buildingmodels are developed using the IDEAS Modelica library, which has been verified using BESTEST and theTwinHouse experiment (Jorissen, Reynders, et al., 2018). TACO has been demonstrated for Solarwind, aGEOTABS office building (Jorissen, 2018), where electrical energy savings of 82 % are projected.1 However,the toolchain has only been demonstrated using simulations and therefore has to be complemented withadditional software and hardware components for practical implementations. The purpose of this paper istherefore to provide a comprehensive overview of the steps that are proposed for implementing an MPC usingTACO. We therefore summarise existing work and further outline future implementation plans of MPC inthe Infrax office building in Brussels.

The structure of the paper is as follows: firstly, Section 2 describes the Infrax office building and buildingsimulation model. Section 3 then presents TACO and the MPC controller model of Infrax. Finally, Section 4proposes a software implementation that couples the MPC to an existing BACnet network.

2. BUILDING AND BUILDING MODEL DESCRIPTION

The proposed methodology is applied to an office building in Dilbeek, near Brussels (Belgium), which isillustrated in Figure 1. This section first presents the relevant aspects of the building and then explainsa simulation model that has been developed to test the developed MPC and to benchmark it against thebuilding RBC. This model is also modified in Section 3.2 to serve as controller model for the developedMPC.

2.1 Building

The Infrax building has 2232 m2 of floor space spread over 4 floors. This office building contains open-planoffices, cellular offices and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25and 0.14-0.15 W/(m2.K) respectively. The windows have double glazing with a U-value of 1.0 W/(m2.K)and g-values between 0.45-0.49. The air-tightness of the building is measured with a n50 value of 1.3 ACH.Solar gains can be controlled by means of movable horizontal fin shading on the 3rd and 2nd floors, andfixed horizontal fin shading combined with overhangs on the 1st and ground floors. On the building roof 61PV-panels of 136 Wp (8.3 kWp) are installed and connected to the grid.

Figure 2 shows the hydraulic scheme of the building. Thermal energy is produced by means of 2 geothermalheat pumps of 70 kWth each. The source-side of the heat pumps is connected to a geothermal borefield thatis composed of 38 vertical double-U boreholes of 94 m each. The sink-side of the heat pumps is connected toa 2500 l water storage tank and to a main collector, where heat is distributed to multiple distribution loops.In an initial stage, the building was designed to store and cool several server units. Consequently, a 150 kWcooling tower is installed on the source-side to relieve the cooling load of the borefield when needed. Due tothe low demand of domestic hot water, a small electrical boiler is installed.

The building has a hybrid emission system that is composed of TABS as a hydronic slow-reacting base load

1The thermal balance of the borefield is not maintained for this implementation.

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 4: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 4

2xHP

70kW 2500 l

tank

collecto

rs

Ven�la�on air hea�ng coils

45.4 kW

AHU hea�ng coil34 kW

CCA loopsHea�ng: 60kWCooling: 90kW

AHU cooling coil59.3 kW

Cooling tower150 kW

Server cooling

Borefield: 38 boreholes of 94m deep

Figure 2: Simplified hydronic schematic of the Infrax office building

system and of an air handling unit (AHU) that can heat or cool as an air-based, fast-reacting secondarysystem. The AHU has a nominal supply volumetric flow rate of 10 000 m3/h and a nominal extractionvolumetric flow rate of 8850 m3/h. The AHU is equipped with heating and cooling coils of 34 kW and 59kW respectively, and a heat recovery wheel placed between these coils. The air is distributed over the zonesof the building, of which some are equipped with Variable Air Volume (VAV) boxes. Air can be re-heated ifneeded by using heating coils inside the ducts.

For heating, the aforementioned collector distributes the thermal energy to 4 different heating loops: to theVAV heating coils in the air distribution system (45 kW), to the heating coil of the AHU (34 kW), to theTABS system (60 kW) and to the cooling tower (150 kW) in case of dissipation. For cooling, the source sideis connected through counterflow plate heat exchangers to the TABS system (90 kW), and to the coolingcoil of the AHU and to the server units (106 kW).

2.2 Building model

A white-box model of the building including the building envelope, the HVAC system, and the occupancy hasbeen developed using the Modelica modelling language combined with the IDEAS (Jorissen, Reynders, et al.,2018) and Buildings (Wetter et al., 2014) libraries. Technical sheets were used to configure the componentmodel parameters, and schematics determine the component interconnections.

The building envelope model is composed of 27 zones, of which 21 are conditioned. The 1st, 2nd and 3rd

floors are mainly open offices and separate zones exist for the north and south spaces, the individual meetingrooms and the bathrooms (not conditioned). The ground floor includes individual conference rooms andseveral facilities (first aid, cafeteria, storage and server rooms).

The HVAC model includes all important hydraulic components of the building, which are illustrated inFigure 2, and thus allows to control the model up to the component level. The model includes the pressuredrops in the main circuits to correctly model the pressure driven flows and to compute the electrical powerused by the circulation pump based on similarity laws (Wetter, 2013; Wetter et al., 2015). The valve modelscompute the pressure drop as a quadratic function of the mass flow rate and the flow-coefficient. Thisflow-coefficient depends on the control signal and on the valve characteristic. The heat pump model consistsof a simplified vapor compression cycle with parameters that are calibrated from manufacturer data, asdescribed by Cimmino & Wetter (2017). The borefield model allows simulating both the short and the longterm thermal response (Picard & Helsen, 2014).

A rule-based controller was also developed based on the technical description of the building. The first

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 5: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 5

Time

Buildingboundaryconditions

Building envelope

HVAC

Heat flow rates

Control signalsTechnical constraints

Comfortconstraints

Linear, dynamic

Non-linear C2,steady state

Discontinuous,tables,algorithms,steady state

Weather & occupancy

Objective

Building model

(a) Typical building model structure.

Building modeltemplate

MPC controllermodel

MPC simulationmodel

RBC simulationmodel

TACO

MPCcode

FMU

Creates

Input for

Extends

Communicates with

Postprocessing

(b) Model and software interdependencies.

Figure 3: Illustration of building model structure (a) and interdependencies (b).

heat pump works with an hysteresis controller to keep the storage tank temperature at 32◦C. If the desiredtemperature is not achieved within 10 minutes, the second heat pump is activated. The cooling tower controlis adapted to dissipate heat from the storage tank or to split the load in the borefield in some scenarios.The TABS and the secondary system are operated independently. The TABS has a building climate modethat is computed each day, whereas the secondary system is turned on only during office hours. The supplytemperature to the TABS is controlled using a three-way valve during heating mode or using the cooling heatexchanger during cooling mode. The supply mass flow rate of the TABS is controlled using four two-wayvalves, one for each floor. During the neutral mode, water circulates through the TABS in a closed loop.The AHU supply temperature set point is computed using a heating curve. When additional heating isrequired, the VAVs are opened to a zone-dependent fixed position and the heating coils supply heat up toa desired supply temperature set-point. When cooling is required, the heating coils are not used and theVAVs control the supply air mass flow rate. The building also includes control features for night ventilationand shading.

3. MPC METHODOLOGY

This section describes how the MPC is implemented, for which we rely on TACO, a Toolchain for AutomatedControl and Optimization (Jorissen, 2018; Jorissen, Boydens, & Helsen, 2018). The MPC methodology is firstsummarised in Section 3.1, after which its application to the Infrax model is presented in Section 3.2.

3.1 TACO

TACO is a toolchain that is derived from JModelica (Akesson et al., 2010) and that converts a Modelicamodel into an MPC code and executable. The executable evaluates the objective and constraint values andderivatives using CasADi (Andersson et al., 2012), which can then be optimized using IPOPT (Wachter& Biegler, 2006). TACO uses a problem formulation that is tailored to the mathematical structure thatbuilding models typically have. This structure is illustrated in Figure 3a, which shows that three mainequation groups exist.

The first group of equations are the boundary conditions, which depend on time only. I.e. they do notdepend on state or on optimization variables. Since these variables and equations depend on time only,their values can be pre-computed before starting the MPC optimization. Therefore TACO automaticallyidentifies what equations are a function of time only and generates an FMU from these equations. The FMUgeneration toolchain of JModelica supports algorithm sections and external C functions such as the Modelicadata reader (CombiTimeTable) implementation such that (weather) data readers are supported. Moreover,since the boundary condition values are fixed during one optimization, these equations can be discontinuous

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 6: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 6

functions of time.

The second group of equations are the building dynamics that correspond to the heat transfer within thebuilding envelope. We require that the building dynamics are linear such that linear algebra can be used toefficiently pre-compute the building dynamics. MPCs for buildings nearly always use linear (RC) envelopemodels such that this is common practice. The building envelope component models of the IDEAS Modelicalibrary (Jorissen, Reynders, et al., 2018) have been parameterised such that all heat transfer equations canbe linearised (Picard et al., 2015).

The third group of equations consists of the HVAC equations. These equations should be steady stateand they should be twice continuously differentiable (C2) with respect to the optimization and (buildingenvelope) state variables. Integer decision variables are not yet supported.

The objective function and any number of inequality constraints can be defined as long as they are twicecontinuously differentiable functions of the state variables and the optimization variables. Jorissen (2018);Jorissen, Boydens, & Helsen (2018) describe in more detail how these equation groups are treated andintegrated into a single efficient numerical code. Note that TACO automatically identifies what variablesbelong to what group.

3.2 Application to Infrax model

To be able to serve as the controller model, the Infrax simulation model is thus slightly modified by linearisingthe building dynamics and by removing HVAC dynamics. Furthermore, the algorithm section contained bythe cooling tower model is currently not supported. Therefore it is excluded from the optimization byremoving it from the optimization model implementation. The two on/off heat pumps are replaced by asingle modulating heat pump with a maximum thermal power of 140 kW. Since integer decision variables arecurrently not supported, the thermal power can be controlled continuously up to 140 kW. Similarly, manyon/off pumps are replaced by modulating pumps. Open/closed two-way valves that create a connectionbetween the TABS circuit and the cooling or the heating circuit, are replaced by a single, continuouslyoperated three-way valve that allows the MPC to switch between the two circuits. For these optimizationvariables, a post processing has to be defined that maps the continuous optimization variable into the booleancontrol signal. For pumps we therefore check whether the pump circuit is being used. E.g. when a heatexchanger in the pump circuit has a nonzero heat flow rate, or when a three-way valve in the pump circuitis not fully closed, the pump is enabled. For the heat pumps a hysteresis controller tracks the evaporatorsupply water temperature that is computed by the MPC. The cooling tower is not used, its pumps aredisabled. For the two-way valves a 50 % valve opening is chosen as a threshold for connecting that TABScircuit to the cooling or the heating circuit. Finally, pressure drops of many pipes are neglected such that nonon-linear algebraic loops are formed. Pressure drops of the TABS and VAVs are computed. For an exampleof the type of simplifications that are applied, see Chapter 5 and Appendix A of (Jorissen, 2018).

Furthermore, constraints are defined that ensure a maximum temperature difference of 4 K across the heatpump evaporator and condenser, and that constrain the condenser heat flow rate to be positive and smallerthan 140 kW. Zone temperatures are constrained between 21.5 ◦C and 24.5 ◦C.

The objective is to minimize the electrical power use of the building, which consists of all fan and pump powersand the heat pump compressor powers. For more details with respect to the mathematical implementationof these models we refer to Appendix A of (Jorissen, 2018).

The RBC and the MPC can be compared using the same simulation model. The MPC uses perfect stateupdates2. The MPC control signals are either directly applied to the model, or they are post-processedas outlined above. For the air handling unit cooling coil a PI controller is used to track the supply airtemperature that is computed by the MPC. I.e. the MPC-computed cooling coil valve position is notapplied directly, but implicitly by tracking the optimal supply air temperature that is computed by theMPC. The resulting software and model interdependencies are shown in Figure 3b.

2All state variable values are read from the model and used to update the MPC internal state.

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 7: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 7

Figure 4: MPC framework. Hardware components are shown on the left and a master algo-rithm that calls three processes is illustrated on the right.

4. PRACTICAL IMPLEMENTATION

This section describes the original hardware configuration used by the RBC controller and the plannedsoftware architecture to allow the MPC to take over the control of the building.

The Infrax building is operational since 2011 and is controlled by an RBC and a Building ManagementSystem (BMS) implemented on HX controllers from company Priva (Priva, 2018). A local windows computeris furthermore connected to the controllers by an ethernet cable to provide a graphical user interface andto run the database on which measurement data is stored. The HX controllers are wire-connected to eachcontrolled element, to each measurement equipment, and connected to each other through the network, asillustrated in Figure 4.

In contrast to Priva’s new products (e.g. Priva Blue ID S-line), HX controllers (Priva, 2018) do not havethe option to share the control variables on BACnet/IP, which we intend to use as the communication layer.Therefore, a BACnet router (SX100L + TC8/510) was recently added allowing access to all control variables.The implemented RBC writes its control values on the lowest BACnet priority (priority 16). We controleach valve, circulation pump, heat pump (on/off), register, compressor, etc., by simply writing a controlsignal on a higher BACnet priority than the RBC. We use priority 15 for this purpose. This approach hasthe advantage that the original RBC stays operational and it keeps writing its control actions on priority16. MPC can therefore control a subset of the control variables while leaving the other untouched and theoperational control can revert back to RBC by simply writing the value null on priority 15 to all MPCvariables.

The MPC master algorithm is composed of three independent python processes.

PROCESS 1 The first process is used to retrieve and store data from BACnet using a BACpypes application(Bender, 2018) and from a weather forecast website (Darksky team, 2018). The process also contains aBACpypes application which periodically broadcasts a watchdog signal on the BACnet network. The signalis read by an application running on the Windows computer. If the watchdog signal is not correctly received,the algorithm running on the Windows computer will reset the value of priority 15 of all controlled variablesin order to return the control of the building to the original RBC.

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 8: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 8

PROCESS 2 is the core of the algorithm. Every hour3, at a predefined timestamp ts, the followingsteps are performed. Firstly, the weather forecast is read for the coming days and saved to a json filets weatherforecast.json where ts is the predefined timestamp. Secondly, a state update is performed usingEstimator.exe, the measurement data from the database and the previous control actions ts umpc.json.The estimation value of the states is written to ts initialStates.json. Finally, the new control actions arecomputed by MPC.exe using the latest weather predictions and state estimation. The results are saved tots umpc.json, which contains the control actions of the coming 3 days at a sampling rate of 15 minutes. Eachcontrol action is saved in the json file including the timestamp at which it should be applied.

PROCESS 3 deals with the actual control of the valves and other HVAC components of the building.Every 15 minutes, at predefined timestamps, the folder containing all ts umpc.json is searched and thecontrol values corresponding to the current timestamp are read from the latest ts umpc.json. Since the MPCmodel does not directly compute set points for all control points (e.g. valves) of the system, the first stepconfigures the binary valves such that the MPC control actions can be performed. Only when each binaryvalve is in its correct position, the MPC control actions are post-processed to actual control signals by callingCTRL.fmu, which implements the post-processing of the MPC controller, such as PI controllers. The FMU isevaluated with a sample time of one second until new MPC control actions are read. Since a large numberof BACnet variables are written and read and as a failed BACnet request leads to a non-negligle timeout,the read and write requests are distributed over a pool of several threads.

Note that the developed software architecture is resistant to a failure of the blocks of PROCESS 2 becausethe different json files contain the required information for multiple hours. When a json file is not generatedthen the previous version can be used. The processes are called periodically and are closed again afterwards,which reduces the chance of memory leaks or other long term robustness problems of the developed software.Moreover, since all json input files will be stored, errors can be reproduced easily.

5. CONCLUSIONS

This paper presents a comprehensive overview of the steps that are proposed for real-life implementationof an MPC using TACO, a Toolchain for Automated Control and Optimization. We therefore summarisecurrent work and further outline future implementation plans of MPC in the Infrax office building in Brussels.Firstly the building is described and a building simulation model is explained. Then main features of TACOare presented and we explain how the simulation model is modified to obtain an MPC controller model.TACO is used to generate an MPC from the controller model. The generated MPC has to be coupled toan existing BACnet communication infrastructure, for which an implementation is finally proposed. Thisimplementation is designed such that it is simple, yet robust. Furthermore, the implementation is designedto be easy to debug since the master algorithm’s intermediate variables are stored as json input files. Thepresented methodology will serve as the basis for future implementations of MPC that are planned withinthe EU-Horizon 2020 hybridGEOTABS project.

REFERENCES

Akesson, J., Arzen, K.-E., Gafvert, M., Bergdahl, T., & Tummescheit, H. (2010, nov). Modeling andoptimization with Optimica and JModelica.orgLanguages and tools for solving large-scale dynamic opti-mization problems. Computers & Chemical Engineering , 34 (11), 1737–1749. doi: 10.1016/j.compchemeng.2009.11.011

Andersson, J., Akesson, J., & Diehl, M. (2012). CasADi: A Symbolic Package for Automatic Differentiationand Optimal Control. In T. J. Barth, M. Griebel, D. E. Keyes, R. M. Nieminen, D. Roose, & T. Schlick(Eds.), Lecture notes in computational science and engineering (Vol. 87, pp. 297–307). Berlin: Springer,Berlin, Heidelberg. doi: 10.1007/978-3-642-30023-3 27

Armstrong, P. R., Leeb, S. B., & Norford, L. K. (2006). Control with building mass-part ii: Simulation.Transactions-American Society of Heating Refrigerating and Air Conditioning Engineers, 112 (1), 462.

3The interval is user-defined.

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 9: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 9

Bender, J. (2018). BACpypes library for building bacnet applications using python. http://bacpypes

.sourceforge.net/index.html. (Accessed: 2018-04-26)

Bengea, S. C., Kelman, A. D., Borrelli, F., Taylor, R., & Narayanan, S. (2014). Implementation of modelpredictive control for an HVAC system in a mid-size commercial building. HVAC and Research, 20 (1),121–135.

Braun, J. E. (2003). Load control using building thermal mass. Transactions-American Society of MechanicalEngineers Journal of Solar Energy Engineering , 125 (3), 292–301.

Braun, J. E., & Lee, K.-H. (2006a). An experimental evaluation of demand limiting using building thermalmass in a small commercial building. ASHRAE Transactions, 112 (1), 559–571.

Cigler, J., Gyalistras, D., Siroky, J., Tiet, V.-N., & Ferkl, L. (2013). Beyond Theory: the Challenge ofImplementing Model Predictive Control in Buildings. In 11th rehva world congress and 8th internationalconference ”energy efficient, smart and healthy buildings” (pp. 1008–1018).

Cimmino, M., & Wetter, M. (2017). Modelling of heat pumps with calibrated parameters based on manu-facturer data. In Proceedings of the 12th international modelica conference, prague, czech republic, may15-17, 2017 (pp. 219–226).

Darksky team. (2018). The Dark Sky Company: weather forecasting and visualization. https://darksky

.net/. (Accessed: 2018-04-26)

De Coninck, R., & Helsen, L. (2016). Practical implementation and evaluation of model predictive controlfor an office building in Brussels. Energy & Buildings, 111 , 290–298. doi: 10.1016/j.enbuild.2015.11.014

European Parliament. (2010). Directive 2010/31/EU of the european parliament and of the council of 19 may2010 on the energy performance of buildings (recast). Official Journal of the European Union, 18 (06).

Gruber, M., Truschel, A., & Dalenback, J.-O. (2014). Model-based controllers for indoor climate control inoffice buildings–complexity and performance evaluation. Energy and Buildings, 68 , 213–222.

Gyalistras, D., & Gwerder, M. (2009). Use of weather and occupancy forecasts for optimal building climatecontrol (Opticontrol), two years progress report. (Tech. Rep.). Zurich, Switzerland: Terrestrial SystemsEcology ETH Zurich.

International Energy Agency. (2015). World energy outlook 2015 (Tech. Rep.).

Jorissen, F. (2018). Toolchain for Optimal Control and Design of Energy Systems in Buildings (PhD thesis).Arenberg Doctoral School, KU Leuven.

Jorissen, F., Boydens, W., & Helsen, L. (2018). TACO, an Automated Toolchain for Model Predictive Controlof Building Systems: Implementation and Verification. Journal of Building Performance Simulation.(Submitted)

Jorissen, F., & Helsen, L. (2016). Towards an Automated ToolChain for MPC in Multi-zone Buildings. InInternational high performance buildings conference. West-Lafayette, IN. (Paper 202)

Jorissen, F., Reynders, G., Baetens, R., Picard, D., Saelens, D., & Helsen, L. (2018). Implementationand Verification of the IDEAS Building Energy Simulation Library. Journal of Building PerformanceSimulation. (Published on line) doi: 10.1080/19401493.2018.1428361

Ma, Y., Kelman, A., Daly, A., & Borrelli, F. (2012, Feb). Predictive control for energy efficient buildingswith thermal storage: Modeling, simulation, and experiments. IEEE Control Systems, 32 (1), 44-64.

Oldewurtel, F., Parisio, A., Jones, C. N., Gyalistras, D., Gwerder, M., Stauch, V., . . . Morari, M. (2012).Use of model predictive control and weather forecasts for energy efficient building climate control. Energyand Buildings, 45 , 15–27.

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018

Page 10: Towards real MPC implementation in an o ce building using …o ces, cellular o ces and meeting rooms. The U-values for the outer walls and roof are between 0.18-0.25 and 0.14-0.15

3319, Page 10

Picard, D., & Helsen, L. (2014). A new hybrid model for borefield heat exchangers performance evaluation.ASHRAE Transactions, 120 , 1TT.

Picard, D., & Helsen, L. (2018). Economic optimal HVAC design for hybrid GEOTABS buildings and CO2

emissions analysis. Energies, 11 (2), 314.

Picard, D., Jorissen, F., & Helsen, L. (2015). Methodology for Obtaining Linear State Space BuildingEnergy Simulation Models. In 11th international modelica conference (pp. 51–58). Paris, France. doi:10.3384/ecp1511851

Priva. (2018). Priva: Creating a climate for growth. https://www.priva.com/be. (Accessed: 2018-04-26)

Prıvara, S., Siroky, J., Ferkl, L., & Cigler, J. (2011, February). Model predictive control of a building heatingsystem: The first experience. Energy and Buildings, 43 (2-3), 564–572.

Risbeck, M. J., Maravelias, C. T., Rawlings, J. B., & Turney, R. D. (2015). Cost optimization of combinedbuilding heating/cooling equipment via mixed-integer linear programming. In Proceedings of the AmericanControl Conference (ACC) (pp. 1689–1694). Chicago, IL, USA.

Sourbron, M., Verhelst, C., & Helsen, L. (2013b). Building models for model predictive control of officebuildings with concrete core activation. Journal of Building Performance Simulation, 6 (3), 175–198.

Sturzenegger, D., Gyalistras, D., Gwerder, M., Sagerschnig, C., Morari, M., & Smith, R. S. (2013). ModelPredictive Control of a Swiss office building. In 11th rehva world congress and 8th international conference”energy efficient, smart and healthy buildings” (pp. 3227 – 3236). Prague.

Sturzenegger, D., Gyalistras, D., Semeraro, V., Morari, M., & Smith, R. S. (2014). BRCM Matlab Toolbox: Model Generation for Model Predictive Building Control. In 2014 american control conference (pp.1063–1069). Portland.

Vana, Z., Cigler, J., Siroky, J., Zacekova, E., & Ferkl, L. (2014). Model-based energy efficient control appliedto an office building. Journal of Process Control , 24 (6), 790–797.

Wachter, A., & Biegler, L. T. (2006, 01). On the implementation of an interior-point filter line-searchalgorithm for large-scale nonlinear programming. Mathematical Programming , 106 (1), 25–57. doi: 10.1007/s10107-004-0559-y

Wetter, M. (2013). Fan And Pump Model That Has A Unique Solution For Any Boundary Condition AndControl Signal. In 13th Conference of International Building Performance Simulation Association (pp.3505–3512). Chambery, France.

Wetter, M., Fuchs, M., Grozman, P., Helsen, L., Jorissen, F., Muller, D., . . . Thorade, M. (2015). Iea ebcannex 60 modelica library-an international collaboration to develop a free open-source model library forbuildings and community energy systems. In Proceedings of building simulation 2015.

Wetter, M., Zuo, W., Nouidui, T. S., & Pang, X. (2014). Modelica buildings library. Journal of BuildingPerformance Simulation, 7 (4), 253–270.

Zaheer-Uddin, M., & Zheng, G. (2000). Optimal control of time-scheduled heating, ventilating and airconditioning processes in buildings. Energy conversion and Management , 41 (1), 49–60.

ACKNOWLEDGMENT

The authors gratefully acknowledge the funding of their research work by the EU within the H2020-EE-2016-RIA-IA programme for the project ‘Model Predictive Control and Innovative System Integration ofGEOTABS;-) in Hybrid Low Grade Thermal Energy Systems - Hybrid MPC GEOTABS’ (grant number723649 - MPC-; GT). The authors also thank Priva for providing they BACnet router for free and for theysupport.

5th International High Performance Buildings Conference at Purdue, July 9-12, 2018