## 2 State of the Art
### Consumer Digital Twin  
In electricity markets, DTs are promising solutions for sustainability, control of energy assets, demand-side management, control of energy assets, reliable energy distribution, and monitoring of energy grid operations [25]. [PERSON] et al. [26] proposed a DT to address security issues and detect potential failures in a microgrid, such as instabilities and failures in power distribution, in a timely manner. [PERSON] et al. [27] introduced a real-time DT that optimizes DER operations for distribution voltage regulation and increases the awareness of power system dynamics. [PERSON] et al. [28] proposed a scalable and evolutionary DT framework to simulate the behavior of a power system under critical events by employing a neural network as a decision support infrastructure. [PERSON] et al. [29] introduced a DT of grid batteries to diagnose faults in time and control their usage to extend their lifetime, while [PERSON] et al. [30] proposed a virtual replica of solar PVs to promptly detect operational faults and evaluate their power generation performance. [PERSON] et al. [31] proposed a DT that performs simulations over the virtual copy of the physical grid to detect possible power supply interruptions. [PERSON] et al. [32] introduced an urban DT representing a real community to enable the execution of scenarios over the virtual twin and provide customized energy services to prosumers. [PERSON] et al. [33] mentioned the enhancement of microgrid operations through DTs. [PERSON] et al. [34] and [PERSON] et al. [35] utilized DTs as an orchestration mechanism to coordinate the operation of LEM and DER, respectively. [PERSON] et al. [36] used DTs as a tool to predict energy production in power systems with a high volume of RES. [PERSON] et al. [37] highlighted the benefits of DTs for providing flexibility in industrial power systems. In the energy sector, the employment of DTs has gained significant attention as a means to optimize the management of DERs. However, while DTs have proven to be versatile tools in representing and simulating physical entities, their application to human entities remains a challenge. The complexity of human behavior, influenced by factors such as mental activities, ethics, and social interactions, makes it difficult to model human behavior deterministically [38]. As a result, human DTs tend to only include key attributes and selected characteristics to represent the corresponding human entity from a specific socioeconomic perspective. Despite this limitation, the development of human-oriented DTs holds potential for further advancements in the energy sector, particularly in the areas of demand response and local energy markets. The proposed CDT is a human-oriented, simplified virtual replica that represents the entity of an electricity consumer within the context of an energy market. It incorporatesthe most informative and distinguishing characteristics, attributes, and behaviors of its physical counterpart, while ensuring synchronous and bidirectional data flow between the physical and virtual entities. To achieve this, raw data from both physical sources (smart meters and wearable devices) and digital sources (REST API services) are collected and processed to extract knowledge and facilitate informed decision-making. The functionalities performed by the CDT include developing dynamic constructs of prosumer energy behaviors, while also identifying consumer preferences with respect to energy usage, thermal comfort tolerance and openness to engaging in flexibility and DR actions, and the assessment of prosumer's indoor thermal comfort level according to the ASHRAE-55 standard [39] using environmental and physiological parameters captured by a wrist-worn device. Thermal comfort expresses the personal thermal satisfaction associated with indoor thermal environmental conditions and adheres to an ideal thermal condition and the appropriate tolerance limits within which the consumer feels comfortable.