Minimalist RC network for building energy simulations: a case study based on OpenBPS

. Robust and fast dynamic simulation tools are crucial for the sizing of the components of complex HVAC system and for the definition of the optimal control strategy. In this work, a first step towards the extension of OpenBPS, a new building energy performance simulation tool, to the dynamic simulation of HVAC systems is presented. In particular, the building model has been reduced to a Resistors-Capacitors (RC) network and OpenBPS has been used for the identification of the parameters of the grey-box model. Indeed, the reduction and identification of the building energy model is the fundamental step for extension of the tool to perform dynamic simulations of complex HVAC systems with the advantage of low computational load, thus suitable for parametric yearly simulations and control strategy analyses. The toolkit of identification and cross validation of a minimalist RC network is presented in this paper, discussing the results obtained for a case study building under study in the European project Heat4Cool founded by Horizon 2020 programme. The identified model demonstrated a good accuracy in the estimation of the room temperature under different tests settings representative of the actual operating conditions.


Introduction
In order to fight the climate change and pursuit energy efficiency, nowadays, the new installed HVAC systems are becoming more and more complex, using renewable energy sources and the flexibility from energy storages and the building fabrique [1]. For this reason, robust and fast dynamic simulation tool are crucial for the sizing of the components of the system and for the definition of the optimal control strategy of the whole energy system [2].
In this work, a first step towards the extension of OpenBPS [3] -a new Building energy Performance Simulation tool -to the dynamic simulation of HVAC systems is presented. Specifically, OpenBPS has been used for the identification of the parameters of a grey-box model for the building fabrique dynamic response.
The main advantage in using a grey-box model is the low computational time, while keeping a good accuracy of the system dynamics, so it is suitable for: a) test different heating and cooling systems (new design or retrofit) through parametric yearly simulations; b) optimize control strategies (model predictive control); c) fault detection / on-going commissioning (machine learning); d) enhance building smartness (D-R, flexibility). Indeed, so far building energy simulations tools can be accurate but in most cases have some drawbacks: I) computationally intensive (not suitable for previous points b, c, d); II) lack of integration with the mechanical system modelling and simulation tools which consider: components thermal capacity, partial load behaviour, innovative energy systems (e.g. ad/absorption systems, solar thermal systems, heat pumps, PCM storages); III) advanced control strategy (coupling plant and building thermal capacities).
The current version of the extension tool allows the user to perform dynamic simulations of complex HVAC systems using the latest available technologies. The main models already present in the HVAC dynamic model library are: vapour compression heat pumps and chillers, thermally driven heat pumps (gas absorption), chillers and air-conditioners (gas adsorption), energy storages (water, PCM, ground), solar thermal and solar PV systems, distribution system (including long thermal networks, i.e. DH), substation for district heating/cooling, boiler.
In this paper a toolkit for automatic integration of complex, white box, building energy models is presented. The toolkit is based on a grey-box model linear identification (minimalist RC network) to reduce the model complexity and the computational time. The method is based on a state-space model representing the building as a simplified Resistors-Capacitors (RC) network [4]. This is among the best compromise between computational load and system dynamics accuracy (cycling, settling time, free floating).
The identification procedure capabilities are here proved, with the application on the case study of a multi-family residential building located in Chorzow (Poland), whose advanced HVAC system is under study in the European project Heat4Cool founded by Horizon 2020 programme.

Methodology
The toolkit aims to reduce the detailed white box model implemented in OpenBPS to a simplified Resistors-Capacitors network able to simulate the building and its heat exchanges with the external environment and among its parts.
The building RC-network is composed of four main nodes conveying the main building elements characteristics: the air node, the internal mass, the external walls, and the glazed envelope. Those nodes are connected to each other and to the outdoor as outlined in Section 3.
The grey-box identification procedure is comprehensively described in Section 4. The model coefficients are identified in MATLAB through the tool greyest (linear grey-box model estimation) and the optimization algorithm lsqnonlin (nonlinear least-squares solver). In particular, imposing the same inputs in terms of forcing functions (outdoor air and sky temperatures and heat inputs), the error on the output room temperature of the detailed and simplified models is optimized (Fig. 1).
In Section 6, once identified the parameters of the case study building in the training phase, different datasets are used for the validation, analysing the temperature error in two significant periods.

Resistors-Capacitors network definition
The building structure is simplified into a RC network, as shown in Fig. 2, composed of three main capacitors: one for air volume of the thermal zone, one for the external envelope and one for the internal mass (slabs and internal walls).
The thermal zone, represented by node R, exchanges heat with the internal structures embedded in node I and towards the external environment through the nodes W and G, standing for the opaque and transparent envelope, respectively. In particular, the external opaque and transparent surfaces exchange at the external side with the outdoor environment (node O), via convection and radiation, and with the sky (S), via radiation. The internal and external opaque elements are discretized into sub-networks composed of, respectively, ten and five nodes, as reported in Fig. 3, splitting the total resistance and capacitance value among the N-nodes according to Eq. (1) and (7). Both sub-networks exchange heat each other and with the thermal zone on the inner node.

1
(1) Additional forcing function can be applied to the network to include solar radiation, internal heat generation, air changes due to infiltration and ventilation, and heating system thermal input.
The solar radiation absorbed by the external opaque surfaces and the radiation filtered through the windows are loaded on the two extreme nodes -outer and inner one respectively -of the opaque envelope sub-network. The values of these two forcing functions is calculated on the basis of the geometrical (area and orientation) and superficial characteristics (solar absorbance) of the external surfaces and the g-value of the windows; in addition, in both cases, an angular factor geometrically accounts for the variation of the solar incident angle, linearly decreasing till zero for the incident angles higher than 55°.
The thermal load due to the air changes is condensed on the air node, while the internal loads and the heating system heat input can be distributed between the thermal zone node and the inner envelope node, using proper coefficients.

Parameters identification
For the definition of the RC network, some parameters are known, while most of the quantities are identified following the procedure reported ahead.
The known parameters, directly taken from the building model, are: -net area and orientation of the opaque external surfaces; -area and orientation of the windows; -useful volume; -windows thermal transmittance and solar heat gain coefficient; -solar absorptance of the opaque surfaces. While the parameters to identify are reported in Table 1. Notice that, since in the RCmodel the building envelope surfaces are condensed in one single node, their geometrical distribution and view factors cannot be directly included, thus the equivalent radiative factors , and , somehow include the building shape in a global way.
, W/m 2 K 4 equivalent factor for the radiative heat exchange with the outdoor environment (assumed to be at the outdoor air temperature) of the transparent and opaque envelope. The radiative heat transfer to the outdoor environment (without the sky component treated separately) is calculated as: , W/m 2 K 4 equivalent factor for the radiative heat exchange with the sky of the transparent and opaque envelope. The radiative heat transfer to the sky is calculated as: , , -(5) J/K thermal capacity of the air node J/m 2 K thermal capacity per unit area of the external opaque envelope J/K thermal capacity of the internal constructions ℎ W/m 2 K convective heat transfer coefficient between the air node (R) and the opaque external envelope (W) ℎ W/K convective heat transfer coefficient between the air node (R) and the internal constructions (I) ℎ W/K radiative heat transfer coefficient between the opaque external envelope (W) and the internal constructions (I) W/m 2 K thermal transmittance of the external opaque envelope W/K UA value of the internal constructions As preliminary step, two simulations in OpenBPS are performed using two different couples of values for the external air and sky temperatures and imposing the following conditions: and constant distinct values; -steady-state conditions; -adiabatic windows ( 0); -absence of solar radiation; -zero internal heat generation; -zero infiltration / ventilation; -fixed convective heat transfer coefficient ℎ , . Reaching the equilibrium condition between external and internal operating temperature, the temperature of the external envelope node can be assumed equal to the room temperature ( ). Under these assumptions, the heat transfer rate balance at the envelope, Equation (6), is imposed twice with the temperatures obtained from the two simulations. The resulting linear homogeneous system of two equations in three unknowns provides the equivalent radiative factors to the outdoor environment , and to the sky , as a function of the convective heat transfer coefficient ℎ , .
For the subsequent identification process, the radiative heat exchanges are linearized as reported in equations (7) and (8). The radiative heat transfer coefficients (Eq. (9) and (10)) are calculated approximating the external surface temperature with the outdoor temperature. , ℎ , - , ℎ , - The identification of the building is performed in MATLAB using the tool greyest (linear grey-box model estimation) with the optimization algorithm lsqnonlin (nonlinear leastsquares solver). The error on room temperature is the cost function to minimize. The training dataset is given by the detailed building simulation in OpenBPS (with a timestep of 60 seconds) setting constant external air and sky temperature, adiabatic windows, no solar radiation, no internal heat generation, no infiltration, and a sequence of perturbations on heat input, firstly harmonic and then constant.
Lastly the heat exchanged through the windows is implemented in the model, including the thermal transmittance and the heat exchanged to the external environment and to the sky. The heat balance at the external surface of the glass, reported in Equation (11), is solved introducing the linearization of the radiative heat transfer coefficients, in the same way as seen for the opaque surfaces (eq. (9) and (10).

Case study
The case study is a building in Chorzow, Poland. The climate is cold and temperate, with yearly average temperature of 8.6°C, humid continental climate with cold, snowy, cloudy winters and warm, sunny, stormy summers, close to oceanic climate. The five-storey building was constructed in 1902, it is composed twelve apartments and three commercial activities on the ground floor, sharing a total floor area of around 1 300 m 2 . The total heating consumption is 93 583 kWh/y for space heating and 23 352 kWh/y for DHW, mostly provided by a natural gas boiler in each apartment, apart from a few apartments that have an electric heater. No energy is consumed for cooling.

Chorzów
The main building geometrical and technological characteristics of the building are summarized in Table 2 and Table 3. The internal loads due to people and appliances are estimated to 4 W/m 2 , while the value 0.4 vol/h is considered for the air changes.

Identification results
From the preliminary simulations, the equivalent radiative factors are calculated in function of the convective heat transfer coefficient (Eq. (12) and (13)) , 1.109 10 ℎ ,   Table 4.
The identification provides a very good fitting, higher than 99%. However, it is not possible to uniquely identify the heat transfer coefficients ℎ , ℎ , and ℎ . In particular, the identification brings the coefficient ℎ to zero, so from now on this parameter will be neglected.
The values obtained from the identification procedure are physically plausible and substantially in line with the physical parameters of the original model.

Cross validation results
The model obtained is validated against the results of the detailed building simulation in terms of indoor air temperature, gradually adding degrees of complexity. Using the available weather epw file of the closest city (Katowice), from the simple condition without solar radiation and any internal or system load, step by step additional forcing functions are included as shown in Table 5.   For the analyses, two representative periods are considered: one called "Winter" from February to May and one called "Summer" from June to September.
In Fig. 5 and Fig. 6 the results of the five simulations are summarized in boxplot charts for the two representative periods. The main difference among the five simulations is recorded passing from Sim1 to Sim2, where the solar radiation is introduced; in the "Winter" case the error in Sim1 spans approximately from -0.16 to 0.28 °C, while in Sim2 the lower and upper adjacent are moved to -0.75 and 1.12 respectively; similar values are recorded for the "Summer" case. Focusing on Sim5, which includes all the forcing functions, Fig. 7 and Fig. 8 show the comparison between the room temperature values obtained from the detailed building simulation (BPS) and using the grey box model (RC), highlighting their trends. In this case the RMSE is equal to 0.44 and 0.43 in the Winter and Summer period respectively. In particular for the Winter period the error has median equal to 0.25 °C with 50% frequency between 0.04 and 0.45; it spans from the lower adjacent of -0.59 and the upper one equal to 1.08, with outlier values reaching -1.04 and 1.47 °C. On the other hand, considering the freefloating conditions represented by the Summer period, the error is symmetrically distributed, having median around 0°C with 25 th percentile at -0.31 and 75 th percentile at +0.28°C, and reaching extreme values of -1.28 and 1.24 °C.

Conclusions
The process of identification of a grey-box building model has been developed and analysed in this work, with the aim to extend the building energy simulation tool OpenBPS to the dynamic simulation of HVAC system.
The case study building has been reduced to a RC-network and its parameters have been obtained training the linearized model with the results of the detailed building simulation in OpenBPS.
The cross-validation analysis has demonstrated a good accuracy in the room temperature estimation, with RMSE equal to 0.44 and 0.43 in the two representative periods analysed for the building model including external temperature variation, solar radiation, in addition to the heat exchanges due to air changes, internal appliances and heating system. Therefore, the procedure developed -that ideally could be applied to any third party building performance simulation tool -allows to achieve a good compromise between accuracy and computational load, that is fundamental for the dynamic simulation of complex HVAC systems.