## 3 Results
### Investigation of the Behavior of the Optimal EMS
Start: Day 4. Window: 12 h. Day WWC. \(\Phi=5.5\%\). Figure 9: Behavior of the optimal EMS. Example No. 3: Scenario 20. Start: Day 240. Window: 3 days. Sequence: TWF TSF SWX. First day: \(\Phi\) 5.9%. Second day: \(\Phi\) 2.3%. Third day: \(\Phi\) 6.9%, minimum values, EMS_HE 0.250 kW, EMS_O 0.374 kW. The reason that EMS_H achieves greater savings than EMS_HE in some scenarios (15, 36-39, Figure 3), despite following heat not being an optimal pattern, lies in the fact that the economic performances considered are annual, whereas when discussing optimal operating patterns, a local time window (hours) is assumed. In particular, in those scenarios, the following occurs: in summer, the most cost-effective approach is to turn off the system, and the behavior of EMS_H is closer to that pattern (since there is no heating demand) than that of EMS_HE, which follows electricity. It is important to note that most of the behavioral differences quantified in the global \(\Phi\) values (Table 4) are of the type shown in Figures 7 and 8: distinct behaviors from each other but both equal to some of the first four identified behaviors. We will refer to these differences as _type A behavioral differences_. The rest of the behavioral differences are those specific to what has been termed \"other behaviors\" (item number 5 in the list of identified behaviors), that is, differences of the type shown in Figure 9 (first and third day) and in Figure 10. We will refer to these differences as _type B behavioral differences_. An additional indicator, \(\Psi\) (Equation (36)), was devised to provide numerical evidence of the stated fact, namely, that most of the behavioral differences quantified in the global \(\Phi\) values are type A differences. In the calculation of \(\Psi\), Equation (36), type A behavioral differences become zero, so that only type B behavioral differences contribute to the value of \(\Psi\). The values of \(\Psi\) are listed in Table 4.  
\[\Psi=\frac{\frac{\frac{1}{5}\sum_{k=1}^{5}\min\left|Pe_{SYS_{k}(j)}-Pe_{SYS_{ k}(O)}\right|}{Pe_{SYS_{N}}}\times 100\qquad\forall j\in\{E,HE,off,max\}}{ \tag{36}\]  
The range of \(\Psi\) is 0-6.4% and its average value is 2.2%. From the average values of \(\Phi\) and \(\Psi\), it can be inferred that, globally (considering all 46 scenarios), 74% of the accumulated absolute difference (between the signal of the optimal EMS and that of the best rule-based EMS) is due to type A behavioral differences, while 26% corresponds to type B behavioral differences; in effect, ((\(8.5-2.2\))/8.5) \(\times\) 100 = 74%, and 100 - 74 = 26%. Figure 11 shows the cumulative histograms of the differences in \(\Phi\) and \(\Psi\) (that is, the differences that contribute to the values of \(\Phi\) and \(\Psi\)). In both cases, the number of differences represented is 24,177,600 (365 days \(\times\) 1440 min/day \(\times\) 46 scenarios). The cumulative histograms display how the differences are distributed. The cumulative histogram of the differences in \(\Phi\), Equation (35), shows that most of the differences are small: 78% of the differences in \(\Phi\) are less than or equal to 75 W (10% of  
\[\Phi=\frac{\frac{1}{S}\sum_{k=1}^{S}\Bigl{|}Pe_{SYS_{k}(bRE)}-Pe_{SYS_{k}(O)} \Bigr{|}}{Pe_{SYS_{k}}}\times 100 \tag{35}\]0 Cumulative histograms of the differences in \(\Phi\) and \(\Psi\). the nominal power of the stack). Consequently, this reaffirms that, in general, the behavior of the optimal EMS is similar to that of the best rule-based EMS. In the cumulative histogram of the differences in \(\Psi\), all differences are type B differences, since in the calculation of \(\Psi\), type A differences become zero (see Equation (36)). Type B differences are significantly more densely distributed towards the lower end of the range.