## 3 Digital Twin for HEMS
### Parametric Standardized Digital Twin  
Based on the developed comprehensive standardized 3D model within the HEMS framework, a parametric standardized digital twin is created to dynamically simulate the indoor environment and related energy flow. Relevant 3D model data, such as the architectural, structural, and interior building parameters are used as operational parameters also in the DT. There, these are complemented with data about HVAC systems, appliances in the premises (e.g., type, location, power consumption profiles and usage patterns), energy related data (e.g., energy source type, usage patterns and historical data, historical and real-time energy prices), occupancy (e.g., number of occupants and demographics, routines and activities, etc. ), and indoor environmental data, such as temperature, humidity, lighting levels, CO\({}_{2}\) levels, air quality, and thermal comfort. Thermal comfort is commonly estimated using the Predical Mean Vote (PMV) index, a scientifically validated metric that predicts the average thermal sensation of occupants on a scale ranging from cold (\(-3\)) to hot (+3) [2]. It refers to state n in which individuals feel satisfied with the indoor conditions and is estimated by temperature, humidity, and personal factors (clothing, activity level) [2]. By leveraging the PMV index, HEMSs dynamically adjust heating, ventilation, and air conditioning while ensuring a balance between comfort and energy efficiency. Outdoor environmental data may also be relevant, as in almost all cases, they affect the inside of the premises as well. In this regard, local climate conditions, air pollution, or external obstacles such as shading from trees or buildings can be reflected and added to the DT. Once all this data is captured and integrated into a coherent system, it can be used for real-time monitoring. This is not only an informative feature, but also helps in identifying anomalies or deviation from normal patterns. Such data are key for predictive maintenance and addressing potential issues before they escalate, leading to reduced maintenance costs, improved system reliability, and enhanced overall home comfort and safety. Within the digital twin, the aggregated data are cleaned and pre-processed to remove any noise and inconsistencies. More than that, the captured data and their patterns and interactions can be analyzed and optimized. For example, analyzing occupancy patterns can help optimize heating and cooling schedules, while monitoring appliance usage can identify opportunities  
Figure 3: Workflow for 3D model development and DT integration in HEMS. for energy-efficient alternatives. At the same time, using ML, deep learning, or other artificial intelligence techniques allows DTs to continuously reflect and learn from new changes in the system and thus improve their predictive accuracy over time. By altering different parameters in the system and running simulations, different what-if scenarios can be simulated virtually, and based on the results, energy-saving strategies can be identified and implemented. Similarly, DTs can be used to predict future energy consumption based on historical data and current conditions. This feature allows for more efficient and proactive energy management. Actions can include, for example, scheduling appliances to work during off-peak hours or adjusting thermostat settings and can be either issued automatically by the system, or prompted by the user. In this regard, the DT can be imported and manipulated by any rendering engine. The model can be further enriched with data and user interactions offered by the capabilities of mainstream game engines. Homeowners can then interact with the DT through a user-friendly interface to monitor room conditions, energy consumption, receive personalized recommendations, and make adjustments as needed. Information relevant to the user is structured and presented in a comprehensive way.