## 4 Methodology  
This section outlines the novel preprocessing methodology based on expert knowledge for modeling HVAC system dynamics. The approach is designed for applicability to similar energy-efficient HVAC systems using data-driven models, with this new preprocessing method aimed at reducing and simplifying the dataset provided to the model. Notably, the methodology is designed to be applied to a recursive modeling strategy, where the model predicts a step in the future and utilizes its previous predictions to inform subsequent forecasts. A block diagram illustrating the complete process of modeling an HVAC system is presented in Figure 1.  
The methodology is composed of seven steps to model the temperature profile of a acclimatized room that uses an HVAC system:  
1. Analysis of the studied case: identification of key components of the HVAC system (e.g., energy storage device). 2. Data collection: raw data are gathered from the system's sensors, including temperature, humidity, energy consumption, and occupancy levels. 3. Feature selection and extraction: key features are selected and new ones are defined based on expert knowledge and thermodynamic principles to accurately capture the system's dynamics. 4. Acquisition and forecasting of essential features required at each time instant to ensure the model's completeness. 5. Model selection: a proper data-driven model is chosen to handle the non-linearities of the thermal system. 6. Model training: the model is trained using historical data from the system, tuning hyperparameters to optimize performance. 7. Model validation and evaluation: the trained model is validated using a separate test dataset, and performance is measured using R\({}^{2}\) and MAPE metrics. Step 1 focuses on thoroughly understanding the HVAC system under study. This involves identifying the critical components within the system, such as the energy storage device, heat exchangers, ventilation units, and other key equipment. Understanding the role of each component in the system helps establish a clear picture of the factors influencing the HVAC system's performance and energy dynamics. This analysis serves as the foundation for subsequent steps, ensuring that all relevant elements are considered when building the predictive model. Step 2 is to gather raw data from the system's sensors. The primary variables collected include temperature, humidity, energy consumption, and room occupancy, which all play significant roles in HVAC system behavior. These data often come from distributed sensors within different zones of a building, capturing a wide range of conditions. By collecting comprehensive data, it is ensured that the full spectrum of variables affecting the system is captured. Data quality and consistency are key here, as inaccuracies or gaps in data can adversely affect model performance. The critical contribution of this work lies in step 3, feature selection and extraction, which follows a specific format and introduces a novel approach to define key variables. This step transforms standard modeling practices by incorporating thermodynamic principles into the selection and creation of variables. This step is explained in detail in Sections 4.2 and 4.3. In step 4, essential features, identified as critical to each time instant of the modeling process, are either acquired or forecast as needed. This step ensures that all relevant features are available at every stage, supporting the model's completeness and accuracy. Forecasting may be employed when future values of certain variables (e.g., expected occupancy levels  
Figure 1: Process flow of the methodology. or outdoor temperatures) are required for predictions but are not directly measured in real-time. This step is explained in detail in Section 4.1. A suitable model is chosen in step 5 to account for the inherent complexities of the HVAC system, including its non-linear behaviors. A data-driven modeling approach is often appropriate here, allowing the model to capture complex relationships within the data.