## 3 Proposed Methodology
### Thermoeconomic Diagnosis
#### 3.2.2 Component-by-Component Comparison of Operating Condition vs. Individual Reference Condition  
Once the overall system overconsumption (\(\Delta C_{sist}=C_{sist}^{OP}-C_{sist}^{REF}\)) has been determined, the specific components with anomalies are identified by comparing the actual operating condition (\(OP_{i}\)) and analogous reference (\(REF_{i}\)) of each component i, using the reference operators; (see \"OP. COMPONENT (sensors)\" and \"REF.COMPONENT (ML)\" on the left of Figure 3). It should be noted that this approach is performed component by component, individually. * Reference Operator: the operator of each component \(i\), also modelled by ML techniques, defines the ideal behaviour of component \(i\) in the absence of anomalies. The idea of the reference operator concept is based on the exergy operators of [PERSON] et al. presented in 2016 [17] and which also applied in 2024 [25]. This methodology has been modified to adapt it to building systems and their specific sensors. This operator, after being trained, validated, and locked (as explained in Section 3.3), on the one hand, uses the operating variables acquired from the specific intermediate sensors of component \(i\) (\(\overline{x}_{i}^{OP}\)) as input variables (such as inlet temperature, primary flow rate, etc.). On the other hand, it generates the expected value of a predefined thermodynamic variable as output, that would characterise the anomaly free behaviour of the component (\(x_{out,i}^{REF}\)) (e.g., outlet temperature or the subsequently calculated unit exergy consumption (\(k_{i}^{REF}\))); (see \"REF.COMPONENT (ML)\" on the left of Figure 3). Figure 3: An example of an anomalous heat exchanger vs. reference one. Unit consumption comparison. If the output value obtained by the reference operator (\(x^{REF}_{out,i}\)) coincides with the value observed under the same operating conditions \(\overline{x}^{OP}_{i}\)(that is \(x^{OP}_{out,i}\)), it is concluded that component \(i\) has no intrinsic anomalies. Conversely, a discrepancy between \(x^{REF}_{out,i}\) and \(x^{OP}_{out}\) indicates the presence of an intrinsic anomaly in component \(i\), the magnitude of which is evaluated in terms of cost by means of the increase in unit exergy consumption (\(\Delta k_{i}=k^{OP}_{i}\Delta=-k^{REF}_{i}\)). (It is assumed that an intrinsic anomaly in component \(i\) increases the \(k_{i}\) (assuming that \(k^{OP}_{i}\Delta=>k^{REF}_{i}\)).) However, the induced effects in other components may increase their unit consumption (\(\Delta k_{ijnd}>0\)) or decrease it (\(\Delta k_{i,ind}<0\)).) It is essential to note that the individual result obtained from the reference operator of a component \(i\), calculated as the unit consumption value (\(k^{REF}_{i}\)), will be different from the unit consumption calculated in the reference condition of the whole system (\(k^{REF}_{i,jost}\)) since the input variables are different; (see \"REF.SYSTEM (ML)\" on the left of Figure 3). After all, the input variables for calculating the \(k^{REF}_{i}\), using individual operators, correspond to the intermediate variables in the operating conditions (\(\overline{x}^{OP}_{i,i}\)) and, conversely, the input variables for calculating the \(k^{REF}_{i,jost}\) as a whole, using the full system model, correspond to the intermediate variables in the reference conditions \(\overline{x}^{REF}_{sist}\), obtained from the independent variables to the anomalies (\(\overline{x}^{OP}_{exter}\)). The image on the right of Figure 3, which follows the characteristic curves approach [13], shows two \(k_{i}\) curves as a function of the input variables in a heat exchanger (HX) that, due to the fouling of the plates, the reference curve (\(k^{REF}_{HX}=f\big{(}\overline{x}^{REF}_{HX}\big{)}\)) differs from the degraded operation curve (\(k^{OP}_{HX}=f\big{(}\overline{x}^{OP}_{HX}\big{)}\)).