8
COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim 1 , Wangda Zuo 2, James E. Braun 1 and Michael Wetter 2 1 Ray W. Herrick Laboratories, School of Mechanical Engineering, Purdue University, West Lafayette, IN, USA 2 Environmental Energy Technologies Division, Lawrence Berkeley National Laboratory, Berkeley, CA, USA Current employer: Department of Civil, Architectural and Environmental Engineering, University of Miami, Miami, FL, USA ABSTRACT To design and evaluate advanced controls for build- ings , building system models that can show detailed dynamics of feedback control loops are required. The models should also be computationally efficient if they are used for model-based control in real time. How- ever, most building energy simulation programs apply idealized feedback control and steady-state model for HVAC equipment. TRNSYS and Modelica may be applicable to study and design local controllers such as ON-OFF sequencing controller and proportional- integral controller, which are most commonly em- ployed for feedback control of set-points in local con- trollers of HVAC equipment. In this paper, results computed by different models for a case study were compared with respect to overall energy consumption, peak power demand, computing time, and short-term dynamics, which are necessary for controls design and verification. To compare the computing time between high and low fidelity models, this study also included reduced order models for the envelope of the same building. INTRODUCTION Commercial buildings utilize complex HVAC systems for the conditioning of indoor environment. Those systems often have a large number of subsystems and components under non-linear interactions. Due to the nonlinearities in the system, it is difficult to analyze and evaluate the controls performance for such sys- tems. On the other side, this also provides significant opportunities for optimizing control set-points and op- eration modes in response to dynamic forcing func- tions and utility rate incentives. By providing simu- lated system performance before the system is actually built or evaluating the different operation alternatives without interfering the actual operation, building sim- ulation tools can accelerate the development and de- ployment of advanced control algorithms. The tools can be further applied to model-based control in real time if the simulation is sufficiently fast. There are a number of simulation tools available for calculating building energy consumptions. About 400 building software tools are summarized on the Department of Energy (DOE) website at http: //apps1.eere.energy.gov/buildings/ tools_directory/. Unfortunately, most exist- ing building simulation programs are developed for building and HVAC system design and retrofit analy- sis, not for studying advanced control algorithms. There are generally two control hierarchies in the building control system: local and supervisory con- trol. Local control is implemented in a low-level con- troller that manipulates an actuator to maintain a given control set-point or follows a command for a mode change. Single-input, single-output proportional- integral (PI) control is most commonly employed for the feedback control of set-points in local controllers for the HVAC equipment. Sequencing control de- fines the order and conditions for switching the equip- ment ON and OFF. Supervisory control determines the mode changes and set-points based on a higher level control algorithm from typical rule-based control to optimal model predictive control. Energy simulation programs, such as eQuest (Hirsch et al. (2006)) and EnergyPlus (Crawley et al. (2000)), often apply ide- alized feedback control that is sufficient for annual energy analysis. Since they do not consider short- term dynamics of the feedback control loops, their su- pervisory control implementations are typically based on the scheduled set-points which are not suitable for studying feedback control algorithms. TRNSYS (Klein (1983)) and Modelica (Wetter et al. (2013)) are applicable to study controllers. The com- parison of the two tools are intriguing because of their distinct modeling approaches and numerical al- gorithms. TRNSYS may be categorized into tradi- tional building simulation programs (Wetter, 2009): by the terminology, it means each physical component is formulated by a block predefined inputs and outputs. On the other hand, Modelica is based on equation- based object-oriented acasual modeling. Inputs and outputs need not be predefined. The default numeri- cal solver in TRNSYS is successive substitution with fixed time step. It treats algebraic loops by calculat- ing outputs of a model based on inputs from the up- stream model and by transferring the outputs as inputs to the downstream model until the changes of all out- puts are less than a defined tolerance. To avoid infinite iterations in case of non-convergence or long compu- tational time, there is a limit on the number of itera- tions. If the limit is reached, the simulation will go to Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28 - 3267 -

COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

COMPARISONS OF BUILDING SYSTEM MODELING APPROACHESFOR CONTROL SYSTEM DESIGN

Donghun Kim1, Wangda Zuo2⇤, James E. Braun1 and Michael Wetter21Ray W. Herrick Laboratories, School of Mechanical Engineering, Purdue University,

West Lafayette, IN, USA2Environmental Energy Technologies Division, Lawrence Berkeley National Laboratory,

Berkeley, CA, USA⇤Current employer: Department of Civil, Architectural and Environmental Engineering,

University of Miami, Miami, FL, USA

ABSTRACTTo design and evaluate advanced controls for build-ings , building system models that can show detaileddynamics of feedback control loops are required. Themodels should also be computationally efficient if theyare used for model-based control in real time. How-ever, most building energy simulation programs applyidealized feedback control and steady-state model forHVAC equipment. TRNSYS and Modelica may beapplicable to study and design local controllers suchas ON-OFF sequencing controller and proportional-integral controller, which are most commonly em-ployed for feedback control of set-points in local con-trollers of HVAC equipment. In this paper, resultscomputed by different models for a case study werecompared with respect to overall energy consumption,peak power demand, computing time, and short-termdynamics, which are necessary for controls design andverification. To compare the computing time betweenhigh and low fidelity models, this study also includedreduced order models for the envelope of the samebuilding.

INTRODUCTIONCommercial buildings utilize complex HVAC systemsfor the conditioning of indoor environment. Thosesystems often have a large number of subsystems andcomponents under non-linear interactions. Due to thenonlinearities in the system, it is difficult to analyzeand evaluate the controls performance for such sys-tems. On the other side, this also provides significantopportunities for optimizing control set-points and op-eration modes in response to dynamic forcing func-tions and utility rate incentives. By providing simu-lated system performance before the system is actuallybuilt or evaluating the different operation alternativeswithout interfering the actual operation, building sim-ulation tools can accelerate the development and de-ployment of advanced control algorithms. The toolscan be further applied to model-based control in realtime if the simulation is sufficiently fast.There are a number of simulation tools available forcalculating building energy consumptions. About400 building software tools are summarized on theDepartment of Energy (DOE) website at http:

//apps1.eere.energy.gov/buildings/

tools_directory/. Unfortunately, most exist-ing building simulation programs are developed forbuilding and HVAC system design and retrofit analy-sis, not for studying advanced control algorithms.There are generally two control hierarchies in thebuilding control system: local and supervisory con-trol. Local control is implemented in a low-level con-troller that manipulates an actuator to maintain a givencontrol set-point or follows a command for a modechange. Single-input, single-output proportional-integral (PI) control is most commonly employed forthe feedback control of set-points in local controllersfor the HVAC equipment. Sequencing control de-fines the order and conditions for switching the equip-ment ON and OFF. Supervisory control determines themode changes and set-points based on a higher levelcontrol algorithm from typical rule-based control tooptimal model predictive control. Energy simulationprograms, such as eQuest (Hirsch et al. (2006)) andEnergyPlus (Crawley et al. (2000)), often apply ide-alized feedback control that is sufficient for annualenergy analysis. Since they do not consider short-term dynamics of the feedback control loops, their su-pervisory control implementations are typically basedon the scheduled set-points which are not suitable forstudying feedback control algorithms.TRNSYS (Klein (1983)) and Modelica (Wetter et al.(2013)) are applicable to study controllers. The com-parison of the two tools are intriguing because oftheir distinct modeling approaches and numerical al-gorithms. TRNSYS may be categorized into tradi-tional building simulation programs (Wetter, 2009): bythe terminology, it means each physical component isformulated by a block predefined inputs and outputs.On the other hand, Modelica is based on equation-based object-oriented acasual modeling. Inputs andoutputs need not be predefined. The default numeri-cal solver in TRNSYS is successive substitution withfixed time step. It treats algebraic loops by calculat-ing outputs of a model based on inputs from the up-stream model and by transferring the outputs as inputsto the downstream model until the changes of all out-puts are less than a defined tolerance. To avoid infiniteiterations in case of non-convergence or long compu-tational time, there is a limit on the number of itera-tions. If the limit is reached, the simulation will go to

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3267 -

Page 2: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

next time step even if the sequence of iterations did notconverge to a solution.On the other hand, Modelica typically uses adaptivetime step for the differential-algebraic equation (DAE)solvers, which are provided by a Modelica simulationenvironment1. Although TRNSYS has a nonlinear al-gebraic equation solver and Modelica has solvers withfixed time step, we limit our scope to the compari-son between the distinct modeling approaches and thesolver algorithms.In summary, we are interested in comparing resultscomputed by the different modeling approaches for amulti-zone building with respect to overall energy con-sumption, peak power demand, computational costs,and short-term dynamics, which are critical for con-trols design, performance evaluation and model-basedcontrol. In addition, a reduced order building envelopemodel is evaluated for the comparison of the comput-ing time.

MODEL DESCRIPTIONSBuilding and HVAC ModelThe case study building is located at Philadelphia,Pennsylvania, USA. It has three occupied floors, anon-occupied ground floor and attics (Figure 1). Thebuilding contains three independent HVAC systemsfor the north, south and middle wings of the build-ing, respectively. This case study only investigated thenorth wing (right hand side wing in Figure 1). Al-though twenty geometric zones were modeled, onlynine zones were under the control of mechanical ven-tilation system and the rest of them were non-air-conditioned, such stairs and attics. As shown in Fig-ure 2, the HVAC system consisted of one air handlingunit, nine variable air volume terminal units (VAVboxes), cooling and heating plants. Some key parame-ters employed in the models include:

• 18 different types of layers were used for wallconstruction and consisted of concrete, insula-tion board, plaster board, and so on.

• 6 types of walls were used based on combina-tions of the layer types.

• Each zone was equipped with windows havingvarious orientations. For example the room lo-cated at the right side corner has 13 windowstoward all orientations of north, south, east andwest.

• TMY3 weather data in Philadelphia was used.• Convective heat transfer coefficients at the out-

side and inside surfaces of the building envelopewere 17.77 W/m2K and 3.05 W/m2K, respec-tively.

• For each thermal zone, a square pulse signalwith a 2 kW amplitude was injected during theoccupied time (7am to 6pm) as the internal heatgain.

• Constant effectiveness (✏ = 0.8) heat exchangermodels were used for heating, cooling and re-heating coils.

• Chilled water source was modeled only for ob-taining cooling coil load, although the DX coilwas installed in the existing building.

Envelope models were developed using Type 56in TRNSYS (version 17.00.0019) and Model-ica.Buildings.Rooms.MixedAir (Wetter et al. (2011a))in the Modelica Buildings library (version1.2 build1), respectively.

Figure 1: External view of the studied building (3DGoogle Map)

Default Control StrategiesThe implemented control strategy was a set of pre-defined rules based on the building control specifica-tion2. The control sequences are summarized as fol-lows:1. The economizer control was only to maintain the

minimum outdoor air mass flow rate of 1.0476kg/s.

2. A rule-based control was implemented for thetemperature set-point reset of the air entering thesupply air fan, TESF , as a function of the ambienttemperature (See Figure 2 and Figure 3).

Figure 3: Temperature set-point reset for the airentering the supply air fan

3. ON-OFF controls for the boiler and the chiller unitwere based on the outdoor air temperature. The

1In this study, Dymola version 2013 (32-bit) is utilized as the Modelica simulation environment2Obtained from the technical report, ”Building 101 TRNSYS Baseline Control Logics” written by United Technologies Research Center

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3268 -

Page 3: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

Figure 2: Schematic of the HVAC system

threshold temperatures were 16.7 oC and 7 oC, re-spectively. The temperatures of hot water leavingfor the boiler and chilled water leaving the coolingcoil were assumed to be fixed at 82.1oC and 5oC.It was also assumed that pumps for hot/cold waterwere turned on and off according to the ON-OFFsignals of the boiler/chiller.

4. The mass flow rates of hot and chilled water wereadjusted to meet the pre-defined set-point temper-ature, TESF . It was controlled by a PI controllerwith 0.07 kg/s-oC for the proportional gain and3600 seconds for the integral time constant. Thecontrol output was in the range [0, 1] where themaximum control signal corresponded to a maxi-mum flow rate of the hot water supply.

5. The supply air mass flow rate for each zone wasregulated to maintain a zone air temperature set-point of 21.11 oC. A PI controller with a propo-sitional gain of 1.5 kg/s-oC and an integral timeconstant of 3600 seconds was used. The range ofthe controller output was [0.4, 1] where the 0.4represented the minimum required ventilation airflow rate with respect to a maximum supply air foreach zone.

6. The PI controller manipulated the hot water sup-ply mass flow rate for each VAV box. The controlvariable was the zone air temperature. The pro-portional gain and the integral time constant were0.01 and 3600 s, respectively.

7. The supply air fan was controlled to meet the sum-mation of all supply air flow rates for all zones de-termined by the VAV air flow rate control.

Model ComparisonEnvelope ModelsIt is important to explain the differences in the build-ing envelope models between TRNSYS and Modelica.TRNSYS computes the heat transfer through opaqueconstructions using a conduction transfer method.This results in a finite sum representation which needs

to be evaluated every time base (the default value ofone hour Klein et al. (2004)) in order to compute sur-face temperatures. The window simulation is basedon the data sets which contain the spectrally averagedwindow properties as a function of solar incident an-gle. The properties are pre-calculated from WindowProgram (Mitchell et al. (2001)). The treatment oflong-wave radiation in default is based on ,so called,star network where long wave radiation exchange be-tween the inside surfaces and the convective heat fluxfrom the inside surfaces to the zone air are linearlyapproximated. The Modelica building envelop modeluses a finite difference scheme to compute the timerate of change of the wall temperatures. This results ina coupled system of linear ordinary differential equa-tions with temperatures as state variables. This equa-tion is integrated with the same time step as the systemsimulation. The window simulation is a layer-by-layersimulation similar to the Window 6 program. Long-wave radiation is based on an approximate view-factorcalculation, which we configured to be computed as alinearized equation.Besides the two high fidelity models mentioned above,we also developed a reduced-order model (ROM). Themodel construction for 20 rooms (9 thermal zones)was based on the formulation described in (Kim andBraun, 2012). To develop the ROM, a finite volumeformulation was used to describe the heat conductionthrough walls. On the external walls an energy balancewas applied considering convective heat exchange, aswell as short and long wave radiations. The radiositymethod was utilized to express the net heat flux un-der the assumption that the walls were gray, diffuseand opaque. The long-wave interaction terms werelinearized and fixed convective heat transfer coeffi-cients were assumed to construct a linear time invari-ant model for the building thermal network. The finalform of the state-space building envelope system is:

x(t) = Ax(t) +Buu(t) +Bww(t)

y(t) = Cx(t) (1)

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3269 -

Page 4: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

where the state variable (x(t) 2 Rn) contains alltemperature nodes in the thermal network, the in-put (u(t) 2 Rp) represents mechanical heat addi-tion/removal rate, and the input (w(t) 2 Rq) rep-resents several exogenous terms, including the heatflow due to solar radiation, outdoor air temperature,long-wave interaction between sky/ground and exte-rior walls. The output (y(t) 2 Rm) is chosen to bezone air temperatures. Although (linearly approxi-mated) mean radiant temperature, which is requiredto evaluate a thermal comfort index such as PredictedMean Vote (PMV), can be easily included in the out-put, it is not included in this study because only zoneair temperatures are compared. Based on the com-pact state-space representation in Equation 1, a bal-anced truncation method (Moore, 1981) was appliedto the representation to generate a ROM. The resultingROM has 74 state dimensions (n) and 65 input chan-nels (p + q). The comparison of simulation results bydifferent multi-zone envelope models are presented inTable 1, where maxMEAN and maxRMS represent themaximum values of mean and root mean square dif-ferences of the zone air temperatures over simulationperiod of a year and over all zones, i.e.

maxMEAN ⌘ max

(1

N(

NX

k=0

Ti[k]� Tj [k])

)9

n=1

maxRMS ⌘ max

8<

:

vuut 1

N(

NX

k=0

(Ti[k]� Tj [k])2

9=

;

9

n=1

(2)

where i and j are corresponding model names and 9represents the number of zones. ROM, MOD and TRNstand for the reduced-order model, high fidelity Mod-elica model and TRNSYS model, respectively. The nu-merical experiments were performed as an open-loopresponse test in which the dynamics of zone air tem-peratures were driven by only weather condition. Thegood agreements between the models indicates thatmodel discrepancies due to weather disturbances arenegligible. The computational requirements for theenvelope models are summarized in Table 2 and theenvironment for the numerical experiments is summa-rized in the Numerical Performance Section.

Table 1: Envelope Model Comparisons betweenTRNSYS, Modelica and ROM, Unit:K

TRN maxMEAN 0.31& ROM maxRMS 0.58MOD maxMEAN 0.15

& ROM maxRMS 0.57TRN maxMEAN 0.44

& MOD maxRMS 0.72

Table 2: Computing Time of Different Multi-zoneBuilding Models for a Simulation of a Year

Model Time [sec] Numerical SolverTRN 30.140 Successive substitution

with a time step size of60 minutes

TRN 59.160 Successive substitutionwith a time step size of30 minutes

MOD 27.8 Dassl algorithm with10�3 tolerance

MOD 77.5 Dassl algorithm with10�4 tolerance

ROM 0.8060 SIMULINK with a timestep size of 60 minutes

ROM 1.4126 SIMULINK with a timestep size of 30 minutes

Duct pressure networkIn TRNSYS, air flow rates in the duct network arecomputed as follows: Each thermal zone determinesthe mass flow rate that it requires. These mass flowrates are then added and used to compute the air han-dler unit’s mass flow rate. There is no pressure dropcalculations, and the flow distribution is therefore notcomputed based on damper positions and damper au-thority. In Modelica, we computed the required massflow rate of each zone using PI controllers. Outputof these controllers are the required zone mass flowrate. These become the setpoint for the PI controllersof the VAV boxes, which based on measured flow rateregulate the damper opening angle. The sum of allsetpoints is sent to the fan model, which will exactlymatch the required system-level flow rate at the airhandler level. A nonlinear duct pressure distributionof the entire flow network then determines how muchflow is distributed to each zone.

Feedback ResponseWe studied the closed-loop building performance byconnecting the building envelope model to the HVACsystem model. The Modelica models are built basedon the Modelica Buildings library (Wetter et al.(2011b)). Two different Modelica simulation mod-els for building envelopes were considered. One usedthe high fidelity envelope model (termed MOD) andthe other used the reduced order model (termed asMOD+ROM). The Modelcia HVAC system modelwas the same for both MOD and MOD+ROM. A highfidelity TRNSYS model (labeled as TRN) was also de-veloped for comparison. We performed annual simu-lations using these three models. To demonstrate thetemperature set-point reset for the air entering the sup-ply air fan and the mode change of the boiler, we showsimulation results for two mild days (March 17th and18th) in Figure 4.At the mid-night of March 17th, the air temperatureof the 4th zone, Tz,4, at the bottom of Figure 4d, was

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3270 -

Page 5: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

regulated by heating. Then a sudden temperature dropoccurred at around 6am due to the shutdown of theboiler. At 7am the zone air temperature returned to23oC, because of a step change in internal gain. Afterthat, the supply air flow rate controller kept the maxi-mum supply flow rate to regulate the zone air temper-ature at a level of 21.11oC based on the control se-quence 5. After the temperature Tz,4 reached the set-point, the controller also tended to hold the minimumlevel of supply flow rate. However the zone air temper-ature continued decreasing until around 4am the nextday, because there was no heating due to the OFF stateof the boiler. Aggressive heating action can be foundright after the boiler was turned on, at around 5am.Because the heating coil controller used the same sen-sor input as the cooling coil controller (as discussed inthe control sequence 4), both heating and cooling weresimultaneously activated for a wide range of the simu-lation period (See Figure 4b). All the models capturedthe feedback responses and showed good agreements.The maximum RMS differences in the predicted zoneair temperatures for a year between TRN and MOD,MOD+ROM and MOD, and MOD+ROM and TRNare 0.316 K, 0.549 K and 0.402 K, respectively. Themaximum RMS is defined in Equation 2.Despite of the consistent results in zone air temper-atures, there are noticeable differences between theother results. First, feedback response of the outdoorair mass flow rate (mOA) was available in the Model-ica results but not in the TRNSYS results (Figure 4b).For instance, the mOA was constant in the TRNSYSsimulation and changing with time in Modelcia sim-ulation. This is due to the different modeling ap-proaches between the two tools. Conventional build-ing simulation programs, such as EnergyPlus, DOE-2and TRNSYS, do not compute the pressure distribu-tion in the air and water loop systems. Instead of usingthe actual control signals for valve and damper posi-tions, they use desired flow rates. In other words, thecontrols within traditional programs are focused on thesupervisory control level by idealizing the local levelcontrol. On the other hand, the Modelica Buildingslibrary models the pressure distributions based on thecharacteristics of valves, dampers, pipes and fans. Itprovides a platform for design and analysis of the localactuator control. The knowledge of pressure distribu-tion is also important for testing interactions betweenlocal and supervisory level control algorithms.It is worth mentioning that the control action for sup-ply air flow rate for the zone 4 in Figure 4d showsnoticeable disagreement between all models. The pre-dicted room temperature, Tz,4, at the beginning ofMarch 18th was slightly higher than the zone air tem-perature set-point of 21.11oC. Although the devia-tion from the set-point was negligible, the VAV boxcontroller assigned the maximum flow rate until Tz,4

reached the set-point. This indicates the studied con-trol system is very sensitive to the disturbances of the

zone air temperature, thereby producing inconsistentHVAC system behavior. It might explain the large dis-agreements in the predicted heating and cooling coilloads shown in Table 3. Although the feedback re-sponses between the MOD+ROM and MOD perfectlymatch for the short period presented in Figure 4, over-all coil loads are different. Interestingly the load es-timation of MOD+ROM is close to that of the TRN,despite the fact that the MOD used exactly the sameHVAC control system model as the MOD+ROM. Fur-thermore, an unexpected fluctuation occurred in the re-sults of the TRN, shown at the bottom of Figure 4b. Itis due to a numerical algorithm in TRNSYS associatedwith the PID controller model, Type 23. With the de-fault mode of the Type 23, the controller model calcu-lates a control action signal based on a converged valueof equations for the HVAC and building system. Thenthe output is applied to the system at the next time step(Klein et al., 2004). This time lagging can easily in-troduce instability for a rapidly changing system. Toavoid instability and to bound the amplitude of the nu-merical oscillations in the simulation, the simulationtime step size had to be reduced to 10 minutes for thisstudy. The time lagging and the convention of timealso makes it difficult to analyze controls, in particu-lar discrete control that switch their mode: First, timelagging can lead to a delayed switching of a controller,and consequently a threshold can be crossed in a timestep without the controller switching its signal, makingverification difficult. Second, in TRNSYS, temper-atures are defined as averaged temperatures over thetime step. But control algorithms should be tested us-ing instantaneous temperatures, not the time averagedones. In Modelica, such controls are treated correctlybecause the numerical routines use event detection andadaptive time step length.

Numerical Performance

All numerical experiments were run on a desktop com-puter with a quad core 3.10GHz CPU, 3.16GB RAMand Window XP (32-bit) systems. After a parametricstudy, we found that the temperature and energy useof models were tolerance/step size independent withlower values of 10�3 solver tolerance for Modelicaand 10 minutes time step for TRNSYS. We variedthe solver tolerance of Modelica from 10�3 to 10�7

and the time step of TRNSYS from 10 minutes to 1minute to compare computing time as shown in Fig-ure 5. Each model was simulated for one month, dueto high computational costs, and the data was used toget averaged computational time (sec/day).

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3271 -

Page 6: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

(a) Control signals (b) Control Actions on the HVAC system w.r.t. Mass Flow Rate (kg/s)

(c) Feedback Responses of the HVAC System w.r.t. Air Temperatures(oC)

(d) Response of the Zone Air and VAV box of 4th zone

Figure 4: Feedback Response Comparisons for Days, red: TRN, black: MOD, blue: ROM+MOD

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3272 -

Page 7: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

Table 3: Comparisons of Predicted Coil Loads

TRN MOD MOD+ROMHC + RHC Load (MWh) 227.86 215.04 227.91CC Load (MWh) 168.13 164.05 170.42Peak HC + RHC Load (kW) 144.50 163.25 141.44Peak CC Load (kW) 57.54 57.59 60.46

Figure 5: Comparisons of Computing Time

Firstly, fast computing time of TRNSYS model is no-ticeable. When the solver tolerance in Modelica is10�3, the ROM+MOD and the MOD model require1.37 sec/day and 2.289 sec/day, respectively, whereas0.8 sec/day is required for TRNSYS model with 10min time step. In order words, the TRN is 1.67and 2.85 times faster than the MOD+ROM and MODmodel.At this point, it is important to highlight some differ-ences in the equations that are solved in the differentmodels: For the wall heat conduction, TRNSYS usesconduction transfer functions, which leads to a compu-tationally efficient time series representation. We useda wall time-base of one hour, which is default valueadequate for most cases, for the conduction transferfunctions, which means that heat flow rates are re-computed every hour. In MOD, finite differences areused, which are computationally slower than conduc-tion transfer functions. In MOD+ROM, heat conduc-tion was modeled using also finite different method butthe number of wall node has been reduced by usingbalanced truncation method. Second, in MOD and inMOD+ROM, we built the model in such a way thatair flow rates in the individual flow legs of the ductnetwork are computed based on a pressure balance ofthe duct network, taking into account flow rates anddamper positions. In TRNSYS, the air mass flow rateis prescribed, as TRNSYS does not compute flow fric-tion. Our experience is that solving the pressure bal-ance is computationally expensive as it involves thesolution of systems of nonlinear equations. Therefore,MOD and MOD+ROM solves a different, larger setof equations which, together with the higher tempo-ral resolution, we attribute to the increased computingtime.

Other reason for the slow computing times in MODand MOD+ROM is frequent occurrences of state-events. The state-events are triggered by a conditionalexpression. The maximum and minimum bounds ofthe output signal of a PI controller are good exam-ple. We reformulated three of the PI controllers insuch a way that the output limiter does not generatestate events. This led to a decrease in computing timeof a factor of 1.5 to 2. The computing times with theremoved state events reduced from (3.3, 6.7) to (2.1,4.1) and from (2.4, 4.6) to (1.1, 2.1) sec/day for MODand MOD+ROM respectively. The order correspondsto the solver tolerance of 10�4 and 10�5. This con-firms that avoiding state events can lead to a signifi-cant decrease in computing time, which we observedin other models as well, because at each state event, theintegrator re-initializes itself which is computationallyexpensive.The performance of the reduced order modeling ap-proach is also noticeable such that MOD+ROD is asfast as TRN with a time step of 5 minutes. By com-paring to the MOD, the MOD+ROM can achieve a30 to 40% reduction in the computational time for allrange of the tolerance. This indicates that couplinga reduced order model for the building envelope andHVAC system model in Modelica can overcome itscomputational requirement.Apart from the computational cost comparison, an-other advantage of the MOD is confirmed. The vari-able time steps, chosen by the adaptive solver with10�3 tolerance, ranges from 0.011 sec to 3864 sec. Itdemonstrates the stiffness solver, which is originallydeveloped for distinct timescale problems, can cap-ture dynamics in a very short time scale. This is rele-vant for HVAC control system to capture an equipmentshort cycling and is also needed to avoid the instabili-ties shown in Figure 4 between 15:00 and 18:00.

Conclusion and DiscussionWe compared temperatures and flow rates, and com-puting time, between TRNSYS, Modelica and Model-ica coupled to a reduced order model of the buildingenvelope. In our experiments, the temperatures andflow rates are similar. The main advantage of TRN-SYS is its computational speed. This may be attributedto an efficient implementation of the heat conductionby means of conduction transfer functions, and a sim-plification of the mass flow rate distribution which isuser-prescribed in TRNSYS, in contrast to a pressurebalance of the duct network in our Modelica model.

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3273 -

Page 8: COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES …€¦ · COMPARISONS OF BUILDING SYSTEM MODELING APPROACHES FOR CONTROL SYSTEM DESIGN Donghun Kim1, Wangda Zuo2⇤, James E

The fast computing time of TRNSYS will show itsstrength to design and test a supervisory level controlalgorithm where many simulations are required. How-ever the validity judgment must be made consideringthe fixed time step length, time lagging of control sig-nals, the lack of pressure-driven flow distribution andthe lack of interaction of control loops through the ductstatic pressure. On the other hand, Modelica’s adap-tive time step length and event detection allows it tobe used for the design and analysis of both supervi-sory and local level controllers. The developed controlalgorithms can be directly applied to a real buildingcontrol system due to the consistency of inputs andoutputs with actual control systems. It is shown thatthe relatively slow computational speed can be over-come by replacing the finite difference building en-velope model with a reduced order building envelopemodel.

ACKNOWLEDGEMENTThe authors wish to acknowledge coworkers at UnitedTechnologies Research Center for their valuable helpsfor model development. Special thanks to ZhengO’Neill. This work was supported by the Departmentof Energy through the Energy Efficient Buildings Hub.

NOMENCLATUREROM Reduced order building envelope

modelMOD Modelica modelTRN TRNSYS model

HC Heating coilRHC Reheat coilsCC Cooling coilSP Setpoint

B,ON/OFF Boiler ON/OFF signalC,ON/OFF Chiller ON/OFF signal

TOA Outdoor air temperatureTESF Entering supply fan temperatureTEHC Entering heating coil temperatureTECC Entering cooling coil temperatureTESF Entering supply fan temperatureTHWS Hot water supply temperatureTsup,i Supply air temperature for ith zoneTRT Return air temperature after air

mixingmOA Outdoor air mass flow ratemsup,i mass flow rate of supply air for ith

zonemsup

PNi msup,i

mHWS,HC Hot water supply mass flow rate cir-culating heating coil

mCWS Cold water supply mass flow ratecirculating cooling coil

REFERENCESCrawley, D., Lawrie, L., Pedersen, C., and Winkel-

mann, F. 2000. Energy plus: energy simulation pro-gram. ASHRAE journal, 42(4):49–56.

Hirsch, J. et al. 2006. equest, the quick energy simula-tion tool. DOE2. com.

Kim, D. and Braun, J. 2012. Reduced-order buildingmodeling for application to model-based predictivecontrol. SimBuild 2012 Conference in. Madison,Wisconsin.

Klein, S. 1983. TRNSYS, a Transient System Simula-tion Program. Solar Energy Laboratory, Universityof Wisconsin-Madison.

Klein, S., Beckman, W., Mitchell, J., Duffie, J., Duffie,N., Freeman, T., Mitchell, J., Braun, J., Evans,B., Kummer, J., et al. 2004. Trnsys 16–a tran-sient system simulation program, user manual. So-lar Energy Laboratory. Madison: University ofWisconsin-Madison.

Mitchell, R., Kohler, C., Arasteh, D., Huizenga, C.,Yu, T., and Curcija, D. 2001. Window 5.0 usermanual for analyzing window thermal performance.Technical report, Ernest Orlando Lawrence Berke-ley National Laboratory, Berkeley, CA (US).

Moore, B. 1981. Principal component analysis inlinear systems: Controllability, observability, andmodel reduction. Automatic Control, IEEE Trans-actions on, 26(1):17–32.

Wetter, M. 2009. Modelica-based modelling and simu-lation to support research and development in build-ing energy and control systems. Journal of BuildingPerformance Simulation, 2(2):143–161.

Wetter, M., Zuo, W., and Nouidui, T. 2011a. Model-ing of heat transfer in rooms in the modelica build-ings library. In Proc. of the 12th IBPSA Conference,pages 1096–1103.

Wetter, M., Zuo, W., and Nouidui, T. 2011b. Recentdevelopments of the modelica buildings library forbuilding energy and control systems. In Proc. ofthe 8th International Modelica Conference. Dres-den, Germany.

Wetter, M., Zuo, W., Nouidui, T., and Pang, X. 2013.Modelica buildings library. Journal of Building Per-formance Simulation, accepted for publication.

Proceedings of BS2013: 13th Conference of International Building Performance Simulation Association, Chambéry, France, August 26-28

- 3274 -