Numerical Approach for the Design of Cost-Effective Renovation of Heating System Control in Buildings

This chapter focuses on advanced tools for transient energy simulation of existing buildings. Budget constraints often hinder the possibility of implementing large-scale retrofit projects. As a consequence, designers must work out low-cost renovation, which asks for a deep knowledge of the current state of the buildings. Furthermore, the performances of heating plants in existing buildings can be enhanced through the improvement of the control of the system. These types of retrofit actions can be carried out with a limited budget, but asks for the availability of very accurate transient energy simulation tools, which can compare the current and the renovated scenarios. On top of them, cost–benefit analyses can be developed. In this chapter, a model of a small hospital is developed in the Dymola/Modelica environment. The high flexibility of the transient simulation model and the very good agreement between numerical estimations and measurements are shown. Then, one scenario regarding enhanced regulation of the heating system by means of a customized ambient temperature control system is developed, and the expected energy savings are estimated.


Introduction
Buildings are responsible for a considerable amount of energy consumption [1]. Also, the studies by IPCC [2] and the European Community [3] are among the latest to uncover the very big energy-saving potentials in buildings. Once a building is accurately addressed in its current state, an informed analysis about the benefits that can be determined by several potential retrofit scenarios can be carried out [4]. In this process, the selection of the most suitable simulation tool is of utmost importance. Indeed, dynamic simulation tools should be developed, so that potential energy and money savings under real conditions of use can be estimated [5]. These outcomes will then be used to support cost-benefit analyses, where several prospective retrofit scenarios are compared to select the best one. An interesting example is the application of dynamic optimization methods to design retrofit actions that could improve comfort conditions in museums. This enhancement was able to solve the problems that an incorrect sizing of original HVAC systems had determined on comfort conditions [6]. In fact, building management systems (BMSs) are becoming increasingly important as they are an efficient means because they can both make buildings consume less and improve indoor air quality [7]. However, the implementation of these systems is still limited, even because of the need for setting BMS parameters at the design stage; this asks for the availability of dynamic simulators [7]. Indeed, dynamic models are of crucial importance in implementing an effective control strategy [8]. Our study was based on the open-source Modelica "Buildings" library v1.3 [9], which offers several advantages, among which the following can be cited: 1. the possibility to simulate advanced control systems and to customize the model, so as to accurately simulate even non-standard arrangements of building systems; 2. users are allowed to exploit, but also extend and adjust the library components, in order to suit the specific simulation requirements of the building under analysis [10].
Furthermore, the Modelica libraries are constantly being improved, and the latest releases published not only include new components [11] but also solve numerical problems that may arise during simulations. The model reported in this chapter was developed in the Dymola programming environment. The potentials of Dymola-like simulation tools were reported several years ago, when barely a few thermal models were developed in this programming environment [12]. Dymola brought in relevant innovations in terms of equation-based methods using program-neutral model description and domain-independent solution methods [12]. Since then, Dymola, which is based on the Modelica language, has been improving over time. It can show detailed dynamics of feedback control loops when evaluating different alternatives without interfering with real operating conditions [13]. Its open-source "Buildings v1.3" library allows the simulation of advanced control algorithms. Most existing building simulation programs are developed for building and HVAC system design and retrofit analyses, not for studying advanced (local and supervisory) control algorithms, which is one of the features offered by Dymola [14]. It has very good potentials even in the model calibration stage, too. As accurate and reliable simulation programs of control systems will soon be needed, because the expensive oversizing of plants can no longer be afforded, a detailed design of plants and buildings is necessary, and Modelica is the right language to simulate realistic operating conditions. Even more urgent is the need for the integrated simulation of heating, ventilation, and air-conditioning of existing buildings, in particular when not every zone is served by all the plants, but service conditions are variable depending on the age of the building block [15]. Our choice to use Modelica-based simulation is supported by a number of previous studies in which the performance of this tool has proved to be satisfactory, despite the complexity of the domains under analysis. In one case in which a French railway station building was modeled and its thermal and electrical loads estimated, the validation deviations were below 10% [16]. The same tool was suitable for accurately modeling single components of building equipment, such as a slinky-coil geothermal heat pump system [17] and mechanical air supply systems in subway stations [18]. Once the parameters are calibrated through comparison with real measured performance, the model can be used as the basis for the simulation of system regulation and control alternatives [19]. The refurbishment of the existing building stock is a further opportunity to improve the environmental sustainability of NHS buildings that should not be neglected [20]. Building energy management systems are becoming increasingly important as they are an efficient means to ensure that buildings consume less while offering improved indoor working and living environments [7]. When these approaches are adaptive, further energy savings may also be possible. One of these possibilities involves adapting the system to the user's temperature demand profile [21]. To create the demand profile, the users are asked to provide feedback about their thermal comfort simply by pushing a button. The system then calculates a usage profile for each room and controls the room temperature according to this usage profile. Simulations of advanced control strategies must rely on a reliable model of the object of analysis. To that end, a systematic, evidencebased methodology for calibrating these analyses may be carried out [22]. Mean Bias Error (MBE) and Cumulative Variation of Root Mean Squared Error (CVRMSE) are suggested by [22,23] as good indices for driving the calibration of energy models.
Section 2 of this chapter deals with the description of the audited building and the development of its Dymola/Modelica simulation model, whose calibration will be performed in Section 3. The capability of the simulation model to assess the savings that can be derived from an even slight enhancement of the currently installed control subsystems will be provided in Section 4. Conclusions are proposed in Section 5.

Materials and methods
The existing stock of buildings has become the major field for real estate investments and for any related enhancement actions. When budget constraints hinder the possibility of implementing large-scale retrofit projects, low-cost renovation is the only feasible solution. The approach requires a thorough energy audit [24]. Once a building is accurately addressed in its current state, an informed analysis about the benefits that can be determined by several potential retrofit scenarios can be carried out [4]. In this process, the selection of the most suitable simulation tool is of utmost importance. The availability of transient simulation models is still more critical, in case both thermal comfort and energy behavior must be considered in the choice of the best combined retrofit and energy-saving actions [25]. To that end, in this chapter, a model of a small hospital is developed in the Dymola/Modelica environment. The model, developed in the following paragraphs, will be shown to have the level of detail that is necessary to analyze the behavior of each device and subsystem belonging to the building. Development, calibration, and the possibility to simulate the behavior of the buildings after the implementation of-even minor-retrofit solutions will be discussed. This approach is called a lumped parameter modeling. It supports features such as advanced control integration, multi-physics, and the integration of specific components and/or boundary conditions. At these boundaries, specific conditions in terms of heat flow, airflow, and mass transfer (water and pollutants) must be assigned in order to model the real dynamics [10]. The software builds on the Modelica language, an industry-driven, open, non-proprietary language and associated libraries, modeling, simulation, and optimization environments [26]. Equation-based languages allow a model builder to declare a set of algebraic equations, ordinary differential equations, and finite state machines that define the physics of a component or the logic of a control sequence. These equations need not be explicit or ordered. Then, a model translator analyzes these equations and rearranges and solves the systems of equations symbolically using computer algebra to reduce the number of variables that need to be solved iteratively during the time integration. Later, an executable code is generated, generally in the form of a C-code, and linked to numerical solvers. Using the same model architecture, different codes can be generated for simulation, for embedded systems, and for optimization. In addition, model linearization and state initialization are generally supported by equationbased simulation programs. This high-level model formulation leads to more flexible and intuitive model use as the composition of the system models can be done schematically using a causal model instead of a signal-flow chart. The decomposition of the system model does not need to follow primary and secondary HVAC system-loop structures or other non-intuitive constraints that may be imposed by a simulation engine. Since the model formulation is independent of the solution scheme of the simulation engine, it is easier to exchange between users and is more concise and faster to develop [9]. In addition, since domain-specific libraries can be developed separately from the simulation engines, the effort for engine development can be spread across various application domains [10].

Pilot/case study
A community clinic was as a pilot. It is a seven-storey building located in Sant'Elpidio, a Mare (Fermo, Italy), whose occupancy pattern has varied in the past (Figure 1). In this chapter, the simulation model will be calibrated and validated with respect to two scenarios. This choice was dictated by the awareness that the clinic has undergone several organizational rearrangements over recent years, which have determined variations in terms of occupancy levels, number, and typology of heated and non-heated thermal zones. The first scenario is relative to the building at the beginning of the year 2013, from January to March (Table 1).
In this period, the medical ward was open on the second floor, and the clinics were mainly accommodated on the first floor. The second scenario is relative to the months from January to March 2015, when the medical ward had been closed and the first floor, hosting the clinics, had been slightly renovated. The building is made up of two different blocks. The first (A1) was built in the 1970s (Figure 1a) and hosts all the wards and clinics of the hospital. The second block (A2) was built in the 1980s and serves the rest of the building through a large staircase, a lift, and some waiting rooms (Figure 1b). A representative plan of the building is depicted in Figure 1c, on which the two thermal zones "A1 gf" and "A2 gf" on the ground floor are explicitly labeled; the first zone is heated while the second is not. The layout of all the other floors is quite similar to this one. A reinforced concrete frame superstructure bears both blocks of the building. The insulation level of the envelope is quite low, due to the age of the external walls, windows, and roof. As a general rule, the performance of block A2 is slightly better than that of block A1. However, in both cases, energy performance is definitely worse than the standards and regulations currently in force. There is no mechanical air supply, and hence the indoor air quality is provided by infiltration and incidental air leakage through the building envelope. During the several on-site surveys, the personnel of the clinic witnessed that they usually open the windows when they feel that the indoor air quality is no longer adequate. As a result of the surveys, two instances of the clinic's model, which will be described in the following subsection, were developed. Each of them refers to one of the two simulation scenarios that were developed for the years 2013 and 2015. The difference between these model instances consisted mainly in the input parameters (e.g., occupancy of the rooms, use of equipment and lighting, heating system operation in the different thermal zones). Also, at the end of 2013, the heat generator was replaced with a new system (ref. Section 2).
The whole building is served by a hydronic heating system, whose central plant is located on the third floor below grade, inside block A1. The 2013 scenario consists of two cast-iron heating boilers installed in the central plant, fired by natural methane gas. Both these devices are fitted with high/low/off-burner control [27]. One methane gas primary heat generator of the "Ecoflam Ecomax NC 630" type with a capacity of 682 kW power was installed in 2006. Its full load overall efficiency is 92.3%, whereas the overall efficiency at a reduced (30%) load is 90.2%. A secondary redundant "Riello RTQ 400" heat generator was automatically turned on, in case the primary generator was no longer able to satisfy the energy needs. Its maximum capacity is 511 kW; its full load overall efficiency is equal to 91.8%, whereas its 30% load efficiency is 92.9%. However, due to a recent reduction in the building's energy requirements, the second heat generator was kept merely as a backup unit, to activate should there be a failure in the primary generator. In the whole building, cast-iron panel radiators are installed as heat emitters. The complete heating circuit is made up of two principal circuits: primary and secondary. The former contains the two boilers, whereas the latter distributes hot water to the building. This circuit is controlled so as to vary the water flow rate in the secondary circuit, while a constant flow rate is maintained in the primary one. The secondary circuit is, in turn, broken down into two independently operated parallel sub-circuits. The first secondary sub-circuit serves block A1 of the building, while the second secondary sub-circuit serves block A2. Three circulation pumps were installed: one along the primary circuit and two along the two secondary sub-circuits (block A1 is served by a 1350-W circulator pump of the "UPC 65-120" type, while block A2 is served by a 375-W circulation pump, which is called "UPC 50-60"). Two different types of control drive the distribution system. In the primary circuit, a flow temperature regulation is applied. It is achieved by driving the burner firing rate of the boiler according to a function relating the outdoor temperature to the required water flow temperature. The two pumps along the secondary sub-circuits run at a constant speed in the short run, but during the heating season, their speed may be manually varied by the technical staff to meet changeable energy needs. Furthermore, 2 three-way motorized mixing valves are installed upstream of the pumps of the two secondary sub-circuit branches, allowing the cooler return water to be variably mixed with the warmer primary circuit water. The mixing valves rely on a feedback signal of the real water flow temperature, which is kept constant. The connection between the primary and the secondary circuit was made by means of one supply and one return headers, located in a technical room on the third floor below grade, about 60 m from the central plant room. The two main distribution pipes of the secondary circuit serve the two blocks according to different distribution patterns. The water pipe serving block A1 is laid horizontal on the third floor below grade and feeds several vertical supply and return pipes serving all the floors. This vertical piping was built according to the two-pipe system distribution scheme, that is, every vertical pipe supplies hot water to the radiators it meets while rising through the seven floors, and a second pipe returns the water to the main return pipe on the third floor below grade, until it reaches the return header. The flow pipe serving block A2 rises through all seven floors of the block, and, on each floor, it feeds a manifold station, which has as many outlets as necessary to supply hot water to all the panel radiators on that floor. There is no local control in the heated zones of block A2. The return pipe follows the same path as the flow pipe and is located on the same technical shaft and framing cavities. In the 2015 scenario, the heat generator was replaced with respect to the 2013 scenario. The new heat generator is a modular, condensing "Riello Condexa Pro 3" boiler fired by natural gas and is made up of four heat exchange modules, each of which has a capacity of 115 kW. These modules are driven by an integral control package that provides basic sequence control for the multiple operations of the burners. The full load efficiency of the boiler at a design temperature differential of 80-60°C will be 98.6%, while its efficiency at a design temperature differential of 50-30°C will be 108.6%. In addition, the boiler that had been working as the primary heat generator in the 2013 scenario (i.e., heat generator "Ecoflam Ecomax NC 630" with 682 kW power) was downgraded to become the secondary boiler of the heating circuit in the 2015 scenario. As a consequence, the boiler which had been working as a secondary boiler in the 2013 scenario was disposed of.

Data collection for calibration
In order to perform the calibration and validation of the Dymola model (Section 3.2), two scenarios were considered and the relative data were collected. Consumption figures measured during the year 2013 ( Table 2) were derived not only from the bills invoiced by the utility company but also from energy metering, which monitors the energy delivered to the building ( Table 3). This was accomplished by means of a KWS (i.e., for measuring hot water) "Coster" energy meter, which is a Woltmann-type turbine, approved by PBT, the German meteorological institute. This meter is fitted with a pulse transmitter for remote transmission of measured flow rate. Readings were collected approximately every 15 days and then interpolated and grouped as reported in Table 3.
In addition, indoor environmental conditions were monitored by means of a HOBOTM wireless Temperature/RH Monitoring Kit. This was made up of one receiver, one router node, and two wireless temperature and relative humidity nodes, arranged on the ground floor (Figure 2a). It uploads real-time data onto a laptop running the "HOBOware 3.0 Pro" software program.
The HOBO data router directs any data recorded by the data nodes to the HOBO data receiver as well as the commands coming from the latter to HOBO data nodes, thus extending the communication range. The two temperature probes were placed in the entrance hall of block A2 and in the corridor of block A1 (Figure 2b). The router was placed inside a staff room (on the same floor) at a distance of 6 and 11 m, respectively, from the two temperature probes. A 5-min time step was used for logging the data. These data were then averaged at hourly time steps so as to set up the final dataset to be used for validation. The laptop Internet connection was supported by a UMTS Gateway. These sensors were installed on February 10, 2015, and were kept in place until the end of March. Figure 3 shows the schematic model of the hospital as implemented in Dymola/Modelica. It is made up of four main components, each including a set of models relating to separated groups of subsystems. More specifically, the heading thermal zones include the models of the thermal zones of the hospital. The ventilation component includes the models that simulate the air change due to natural ventilation in the various thermal zones.

Thermal model of the building
The central plant component groups all the models of the heat generation. The heating unit component includes the heating system's distribution from the secondary circuit to the thermal zones and all heat emitters. All the models were developed using the "Modelica" library and the "Buildings" library-release 1.3. The thermal zones component (Figure 4a) includes both heated and non-heated thermal zones. Each thermal zone was simulated using the Buildings, Rooms, MixedAir class (Figure 4b) [10]. It is a model with completely mixed air, which is able to consider all the heat transfer phenomena that can reasonably occur in any room. Heat conduction was computed according to the specific arrangements found for each building component of the thermal zones. In the MixedAir data record labeled "Parameters," every component had to be assigned the proper type of opaque constructions and windows as well as geometrical properties and size.
The convection coefficients were assigned as 3.0 W/(m 2 ·K) for room-facing surfaces and 10.0 W/(m 2 ·K) for exterior-facing surfaces. In every thermal zone (Figure 4b), one heat port was used to add a sensible convective heat flow to the room air and another heat port was used to add a radiative heat flow. Both contributions were supplied by the panel radiators under the heating unit component. The heat port connected to air volume was coupled with a temperature sensor to measure the indoor air temperature of the room. The fluid port Apr14 May14 Jun14 Jul14 Aug14 Sep14 Oct14 Nov14 Dec14 Jan15 Feb15 Mar15 Tot (m 3 )  3388  1137  1004  730  710  864  1008  3768  5962  4540  9237  5751   H (m 3 )  2479  0  0  0  0  0  0  2859  5053  3631  8328  4842   Table 3. Total methane gas consumption (Tot) and heating (H) measured by the meter from April 2014 until march 2015.
placed at the bottom left of each thermal zone was used to couple the room with models that compute overall leakage through the envelope, which is implemented under the ventilation component. Two connectors were needed to model both the inlet and outlet connectors of the air circulating in the rooms. One of the two Realinput ports was used to account for the radiant, convective, and latent input to the room, due to three contributions: sensible gain due to people, equipment, and sensible gain due to lighting. Three classes of the type "Modelica.Blocks.Sources.constant" were used to input the average number of people occupying each thermal zone, the number of pieces of equipment, and the number of light fixtures. A component (IntGai) was inserted in the middle between the three inputs and the MixedAir component, in order to sum the three contributions and multiply by the metabolic rate emitted by each person [28], the average gain due to equipment, and the average power of light fixtures. Finally, all the thermal zones located below grade were connected to a   custom-made component (ground wall), inside which a model was implemented, so as to estimate depth-dependent earth temperature. To that end, a well-established model suggested by the study was adopted [29]: where T m is the yearly average ambient temperature and ΔT is its amplitude, which is half the total variation during the year, both computed from the weather file. ω is the frequency, which depends on penetration depth (d), soil's thermal conductivity (k), density (ρ), specific heat (c), and period (P).
These values were determined according to the suggestions in ISO EN 13370 [30]. This class requires all the above-listed parameters and the average depth of the below-grade walls to be defined by the user. An input connector comes from the weather data and subsequently computes the estimated temperature of the surface between the walls and the soil. The red lines on the pictures are connectors for heat ports that equate temperature T and conserve heat flow rates between the connected ports. The bright blue lines are fluid connectors that equate pressure and conserve mass flow rate. The yellow connector leaving the Weatherdata component was used to couple the external surface of each wall with the weather data arranged in the form of a TMY3 file. For calibration purposes, a tailored weather file related to a location close to the site under study was needed. This weather file was built by combining a weather file downloaded from Energy Plus (Ancona 161,910 (IGDG)) with historical weather data obtained from the "wunderground.com" database from the weather station called LIBP [31]. Two modified weather files were built in this way: one for the period January-March 2013, for which historical energy consumption data were used for calibration, and another relative to the period January-March 2015, for which environmental measures were also collected. In the ventilation set of models (Figure 5a), 14 fans with a controlled mass flow rate obtain outdoor air from an air source whose temperature is prescribed to be the same as the outdoor air, by means of a direct connection to the weather data component. Every mass-controlled fan is connected with a fluid port, in order to push that outdoor air into each of the hospital's thermal zones, whose flow rate is varied according to the thermal zone's glazed surface and volume, so as to generate an amount of air change rate that includes two contributions. The first is provided by air infiltration through the windows and the second is due to the opening of windows by users. Air infiltration through the windows was assumed according to the suggestions in the Italian standard UNI 7979. This standard is no longer in force, but it was considered useful for the purpose of our simulation, where an overall average air exchange with the outdoor environment is needed to be estimated. In addition, this standard is taken as a reference by an energy simulation software program that is usually used for energy audits of buildings and that was also applied to the building analyzed in this chapter [32]. In fact, this software is based on the technical standard UNI 7979 and estimates air infiltration rates through windows according to their category: A1, A2, A3, and non-classified. These categories are defined by means of laboratory tests according to the rate of air exchange through a window at a given pressure gradient between its two sides. In the building analyzed in this study, some windows were very old and were assigned to the "non-classified" category; only the windows installed in block A2 were considered better and were assumed to belong to the A1 category, which is the worst category contemplated by the abovementioned standard. Air infiltration rates of the same amount as defined by the standard were then set for air infiltration: on average, 5 m 3 /(h·m 2 ) in the non-classified category and 2.5 m 3 /(h·m 2 ) in the A1 category. These values were multiplied by the glazed surface in each thermal zone and were set as the first contribution from the ventilation component. The second contribution, due to the air change rate resulting from the opening of windows, was set at 0.3 vol/h, as suggested by the Italian technical standard UNI TS 11300-1 [33], whose approach for load estimation in buildings is in accordance with the international standard UNI EN ISO 13790 [34].
More importantly, when this value was applied to the energy audit phase of the building,  it provided a very good agreement (error < 5%) between estimated and measured overall consumption [32]. In order to facilitate the simulation of the renovation envisaged for the air supply system, a heat exchanger was interposed between each fan and each fluid port, whose purpose was to keep the directions of the air flows opposite to each other. The third group of components includes heat generation, together with the primary and secondary circuits, which are implemented in the central plant component (Figure 6a). The Ecoflam Ecomax NC 630 primary boiler, which served the hospital until October 2013, was inserted in the model. All the parameters were set according to the boiler datasheet. More specifically, of the three choices available, the "QuadraticLinear" efficiency curve was used to develop the efficiency plot suggested by the manufacturer, which is 92.3% at full load (100%) and 90.2% at partial load (30%). Interpolation was assumed to be linear. As a consequence, the coefficient array of the "QuadraticLinear" efficiency curve was assigned through the entries {1,2} = {0.893, 0.03}, which are the intercept and slope of the linear relationship, respectively. As the boiler is fuelled by natural gas whose net calorific value had been estimated equal to 34.54 MJ/m 3 by the utility company, the "fuel type" parameter in the Dymola model was set at "Natural gas, lower heating value." In accordance with estimations made by the burner manufacturer, the density was set at 0.715 kg/m 3 . Starting from these values, enthalpy was calculated as 48.3·106 J/kg and carbon dioxide emission as 2.75 kg The boiler pump was modeled by means of a controlled mass flow rate pump, whose input was set at the real constant value, given that fluid circulation through the primary circuit is kept constant. The value of this constant was set in accordance with the flow/power curve of the pump datasheet. Two instances were generated, in order to estimate the amount of heat wasted by the flow and return pipes running from and to the secondary circuits.
At the bottom of the boiler, a group of objects were connected, in order to adjust the boiler's heat delivery into the flow water, hence its temperature, according to outdoor air temperature, that is to say in order to set up an outdoor temperature reset control. A safety control device (logical switch) was interposed between the PID output and the boiler input, thereby setting a return water temperature threshold. If the return water temperature is higher than 90°C, the switch will set the boiler input to zero; otherwise, the boiler input will be sent to the PID output ("PID.y"). Four main splitters connect the primary and secondary circuits, in particular, the primary loop with the flow and return pipes of the two secondary circuits. Mixing of the water flowing into and returning from the secondary sub-circuits was carried out by 2 threeway valves. Further pipe components capable of controlling the amount of heat waste were also added even to these parts of the circuits and were coupled to the ground wall component. The only component in this group that was replaced within the time period considered for performing the simulations was the boiler. In fact, the Ecoflam Ecomax NC 630 primary boiler was replaced with a new condensation boiler in November 2013.
Therefore, considering that no class is available in the Modelica.buildings library to simulate a condensation boiler, a new class was developed in order to simulate the 2015 scenario.
The same class as before was used, but it was enhanced in order to be able to take into account the condensation phenomenon relative to the shape of the efficiency curve, the amplified efficiency plot due to condensation, and the dependence of efficiency on return water temperature. No general efficiency relationship was available in the boiler datasheet provided by the manufacturer, which listed no more than a few efficiency values at its maximum load and specified supply and return water temperatures. For that reason, the efficiency curve was defined according to a model that includes both return temperature (T) and load (y) as independent variables [35]: η = a ( 1 ) · T + a ( 2 ) · T^2 + a ( 3 ) · T 3 + a ( 4 ) · T^4 + a ( 5 ) · y + a ( 6 ) · T · y + a ( 7 ) · y · T^2 + a ( 8 ) (2) where a(i) is the coefficient array, whose entries were set according to the suggestions found in relevant literature in the field [36]. To that end, a new curve type was added to those already available in the boiler class, and the coefficients were defined in the form of the array a(i) = {8.663,−0.2866,0.003865,−0.000018676,−11.102,0.2822,−0.00177,7.626}.
In addition, the efficiency estimated by means of Eq. (2) is based on the gross calorific value of the fuel, while the model class in Dymola refers to the net calorific value of the fuel. As a consequence, a multiplication factor as high as 1.11 [27] was used to amplify the efficiency estimated by means of Eq. (2), so that it could include the additional input of heat at return pipe level, determined by the condensation of the vapor produced by fuel combustion.
This approach gave back an estimation of the boiler efficiency. Another change in the boiler class consisted in the generation of a new port for the return water temperature of the heating system that could be used by the enhanced class of the boiler, in order to consider this variable while computing Eq. (2). This new element is depicted in Figure 6b, where the temperature sensor placed along the return pipe is connected to the new real input port "T in " entering the class of the modified boiler. The third change concerns the fact that this model included not only one switch but two logical switches. One was used as a safety device, similar to the 2013 model. The other switch was needed to simulate the highly varying rate of the boiler in 2013.
The last group of components was labeled as heating units (Figure 5b). One radiator was coupled to the heat ports of each room implemented under the group thermal zones. Among the main parameters, the exponent for heat transfer and the fraction of radiant heat transfer were set according to the datasheet. The valves controlling water flow into the radiators were set fully open, because there is no control at this level in the building. The water flow and return between the heating units group and the central plant group were coupled by means of four fluid ports.

User profiles and available data
The main difference between the periods January-March in 2013 and 2015 was noticed in terms of the overall monthly consumption. In 2013, seven thermal zones were heated, compared with six thermal zones in 2015 having a smaller extension in terms of net area and gross volume. As a consequence, the corresponding consumption of methane gas during the same months was lower in 2015. The two thermal zones called "A1 l2" and "A2 att" had been closed in the middle of 2013. In November 2013, the old primary boiler was replaced by the new condensation one. Therefore, this contributed to a further reduction in the amount of fuel consumed, and it partially explains why the consumption records listed in Table 3 are smaller than those listed in Table 2. Finally, in January 2015, the heating system was switched off for some time, perhaps due to refurbishment; the system was operational again from February 2015. Another difference between the two simulated scenarios was dependent on the types of data available. As regards 2013, only the consumption readings were monitored. In 2015, the temperature plots in the two zones were also collected. Hence, the profiles for the presence of people in the hospital and the number of light fixtures that were on were managed differently. In 2013, the average daily values were considered. The owner of the community clinic supplied the estimated number of staff members, patients, and other visitors. For each category, a reasonable number of hours of daily permanence in the hospital and the right type of activity were assumed. Finally, the overall thermal gains derived from these assumptions were averaged over the whole simulation period and uniformly distributed throughout the day. This type of analysis was later refined for the 2015 scenario. Dedicated schedules including presence profiles were given as inputs in the simulation. The unit internal gains were estimated on the basis of the figures provided by ASHRAE [28]. The number of hours each fixture or piece of equipment was turned on per working day was determined on the basis of information provided by the hospital staff. In 2015, even temperature plots were given as input for calibration against measured temperature plots. Another parameter that was kept fixed was the air change rate (0.3 vol/h), because previous energy simulations showed that this value gave back the best agreement between the real and the simulated overall consumption of this building [32]. A further contribution was added to this air change rate due to the window permeability. Other relevant parameters were varied for calibration purposes. In particular, the water flow rate in the heating system was used for calibrating the 2013 scenario model. Similarly, the radiator exponent for heat transfer was adjusted in order to match real and simulated consumption figures in the year 2013. In the 2015 scenario, the radiator parameters were kept unvaried with respect to the year 2013. The water flow rate was recalibrated for 2015, because the maintenance team reported that from time to time the rate of the pumps was manually adjusted to the real needs of the building.

Calibration and validation
The 2013 scenario of the Dymola model is calibrated with respect to the consumption figures recorded from January to March. Some adjustments were then made to the model, in order to recalibrate it with respect to the changes made in 2015. Calibration was performed by means of a comparison between the simulated and monitored data on monthly consumption and indoor air temperature in two thermal zones of the building. In the months January-March 2013, eight readings of measured consumption were available (10 and 25 January, 5, 15, and 25 February;5, 15, and 25 March 2013). In 2015, six readings of measured consumption were available (5, 15, and 30 January; 27 February, and 13 and 31 March 2015). The modeling uncertainty was measured by means of the indicators: Mean Bias Error (MBE) and Cumulative Variation of Root Mean Squared Error (CVRMSE) values, calculated using the following formulae [27,28]: where M i is the list of measured data, S i is the set of simulated data, N P is the size of the database, and the average value of the measured data (M P ) will be calculated as The model calibration was carried out as an iterative process. The first set of parameters was the flow rate provided by the three pumps: the one belonging to the main heating circuit and the two included in the distribution subsystem. These parameters are represented as a three-element array listed in Table 4. It can be noticed that MBE and CVRMSE in the case of the initial model were equal to −0.19 and 0.22, respectively. In simulations relative to cases 2-5 listed in Table 4, both the water flow rate arrays and the radiator exponent were calibrated in order to improve MBE and CVRMSE with respect to the results obtained from the first simulation scenario. All the MBE indices are negative, so the model always estimated lower consumption than the real data. In Figure 7a, a comparison is shown between the cumulative real and simulated consumption plots from January to March 2013, where a very good matching between the two series is qualitatively demonstrated.
The modified model 4 was then adjusted and simulated over the 2015 scenario. The results are listed in line no. 6 of Table 4. They are still too far from the 5 and 15% thresholds recommended by technical standards. Considering the very disturbed plot for methane gas consumption in this period (Figure 7b), changeable water flow rates were assigned to the three pumps. These are expressed as the ratio of the maximum flow rate admissible for each pump: 0.025 of the maximum flow rate until January 15; turned off until January 30; 1.5 of the maximum at the restart (only on January 31); 100% of the maximum rate until February 15; 0.9 of the maximum rate until February 28; 0.02 of the maximum rate until March 31. The last line in Table 4 shows that the indices in Eqs. (3) and (4) were again constrained within the required limits. This result is even better if we consider the high variability in consumption and in the operational rate of the system in the period under consideration. As a second validation, the hourly temperature plots monitored in the period from February 10 to March 31 were compared with the plots estimated by the Dymola model in the same rooms. Figure 8 depicts the very good agreement between them. The real and simulated plots relative to "A2 gf" are in very good  Table 4. Analysis of the estimation error on methane gas consumption in the whole building.
agreement, and the average percentage deviation is around 5%. The deviations between the plots in "A1 gf" are still quite reasonable, although the average deviation this time is higher, being about 21%. This was deemed to be a good result, considering that no information had been recorded about real occupation and user behavior during the monitoring period.

Improved control of the regulation system
As a demonstration of the potential of this model, this paragraph provides an example of the enhanced control system that was integrated in the 2013 scenario. The first scenario was preferred because this baseline is relative to a period during which the heating system was running regularly and assessing to what extent low-cost energy refurbishment action is more expressive because the old heat generator was installed.
The assumption made about low-cost actions for energy performance improvement is relative to the installation of an enhanced control system. The community clinic may be equipped with a temperature probe in the most representative rooms, and the rate of the water supply valves might be controlled according to the feedback provided by such records. Two temperature sensors were placed on the ground floor of block A1 and on the second level below the grade of block A2. These two components were connected to two "Real.output" ports, which were then connected to two real input ports within the central plant component (Figure 9a). Between of these real inputs and the three-way valves, a hysteresis cluster of components was inserted that sets indoor temperatures between 19 and 21°C. Finally, the new fuel consumption was assessed.

Discussion of the results
As a result of the simulation performed within the scenario described, the new cumulative fuel consumption of the boiler plotted in Figure 9b was calculated. The final value is 18% lower than the benchmark, and such a value represents the average percentage savings that can be obtained each month as a result of the abovementioned enhancement of the control system. This value is strongly dependent on the lowest and highest thresholds set for temperature control in the hysteresis cluster of components and on the control logics chosen  for running the heating system. However, the generally valid conclusion is that, once the baseline model has been calibrated for the reference scenario, the benefits deriving from even tailored control policies can be simulated. In the case under analysis, the control subsystem enhancement was relative to a very slight change with respect to the reference scenario. Moreover, it was tailored to the building under analysis, in that only two sensors were placed in two rooms, rather than in every room of the building. Therefore, neither can be classified as a standard control system nor can it be simulated by means of standard whole building analysis tools. In fact, this scenario can be simulated in this model, which is also capable of providing detailed results, such as the temperature difference that this control would generate between floors.

Conclusions
In this chapter, the energy model of a typical small public building was developed. It can be considered as representative of a popular category of public buildings that cannot undergo extensive refurbishment because of budget limitations. Hence, the only option is to implement low-cost retrofit solutions that can make energy savings possible by means of reduced investments. This scheme applies to any case in which budget constraints prevent the adoption of complete refurbishment of the audited object. Therefore, in this case, an accurate assessment of potential energy savings is necessary under real dynamic conditions. The case study considered in this chapter was modeled in the Dymola/Modelica environment and was shown to be very flexible, adaptable, and capable of modeling any kind of technology that can reasonably be found in buildings, thanks to its open "Buildings" library. In addition, it was able to provide estimations about the improvements that may be determined by retrofit actions, even if relative to low-cost enhancement regarding minor devices of existing subsystems and components. Hence, this software tool may be considered as a valid support for performing reliable cost-benefit analyses for the energy retrofit of buildings.