## 5 Case Study  
The HVAC system under study is installed in a workplace room at the University of Girona. This room is situated on the first floor of the P4 building of the Montilivi campus, surrounded by other working areas. It has an exterior wall with northwest-facing windows. The geometrical dimensions of the room are 9.83 m (length) \(\times\) 7.25 m (width) \(\times\) 3.00 m (height).  
The room, hereafter referred to as the laboratory, is used daily by researchers as an office. It is equipped with numerous sensors for monitoring humidity, temperature, energy consumption and person zone by zone as displayed in Figure 4a,b.  
The HVAC system, depicted in Figure 5, utilizes geothermal energy during winter mode, extracted from a 100-m-deep well with a stable temperature range of 15.0-17.0 \({}^{\circ}\)C. Water circulates to harness the geothermal energy, which then passes through a compression/expansion heat pump. The extracted energy is stored in an inertia tank and subsequently used by the fan coil to acclimatize the laboratory. This system is versatile, capable of providing both cooling in summer and heating in winter.  
Figure 4: Top-down map of the laboratory showing the workstations and the precise locations of data collection devices and their distribution. Images extracted from Control Assistant page. (**a**) Ambient-related devices collecting data of temperature in light blue, humidity in dark blue, CO\({}_{2}\) concentration in gray, and light intensity in yellow. The temperature at which the fan coil expels the air is shown in red, the temperature used as the representative temperature of the laboratory is shown in green, and at the top center of the image, the number of people counted by the door sensor is shown. At the top left side corner of the image indicating the position of the door, four light blue squares with a circle disposed as a bigger square indicate the position of the air expelled by the fan coil and at the bottom of the image, four light blue rectangles indicate the position of the windows. (**b**) Energy consumption sensors of the room; in light blue, the consumption of each working place, in red, the accumulated energy consumed by each electric line, in yellow, the energy consumed by lights, and at the top center, the number of working places with consumption (not a physical device) are shown.  
Figure 5: Scheme of the HVAC system and its sensors. Image extracted from Control Assistant page.  
Figure 5 shows the four zones where data are collected. The first, in orange, is the laboratory or the acclimatized zone. The second, in light gray, is the machine room where the heat bomb and inertia tank are located, displaying its temperature. The light green zone is the exterior of the building where the temperature is collected. The last zone, in light orange, represents the well and its temperature at 100 m below ground.  
Every sensor and controller is monitored through a web interface called the Control Assistant, designed by the university researchers. This platform manages all instructions for the HVAC system, from setting the temperature of the inertia tank and laboratory to controlling the opening and closing of windows. Each sensor collects real-time data, which are stored in a database. The data storage rate can be adjusted to the desired frequency; however, to avoid overloading the database, the default setting is to collect data every five minutes.  
Within the Control Assistant, a set of target temperatures can be defined for both the laboratory and the inertia tank to maintain a comfortable indoor environment. These target temperatures should be adjusted according to seasonal variations in outdoor temperatures. Therefore, two modes are defined: summer mode and winter mode. Each mode sets specific temperature targets based on the time of day, \(h\).  
\[\text{Winter mode}=\left\{\begin{aligned} &\text{Laboratory temperature}=\left\{\begin{aligned} & 20\ ^{\circ