## 1 Introduction  
Proton exchange membrane fuel cell (PEMFC)-based micro-combined heat and power (micro-CHP) systems can help to create a greener energy future in Europe [1, 2, 3]. Several studies in the current scientific literature address CHP systems based on PEMFC technology. A recent and particularly interesting example is presented in [4], where a PEMFC-based CHP system is combined with heat pumps to enhance energy efficiency, specifically targeting industrial installations. In the field of residential applications, there is a genuine interest in making these systems a reality at both the political and industrial levels [5]. The idea is that they will replace the current condensing boilers in the coming years. Several commercial products are already available, but mass market uptake has not yet been achieved, mainly due to their high cost. Work is being done on several fronts to achieve this goal. The PACE (Pathway to a Competitive European Fuel Cell micro-Cogeneration market) project is a good example [6]. One of these fronts is improving the energy efficiency of the systems. This would increase their cost-effectiveness and reduce their payback period, making them more attractive to the end user [7]. System efficiency in the laboratory (nominal efficiency) is different from the global energy efficiency of the system when it is operating in a specific application. The latter depends, among other factors, on how the system is operated, i.e., on its energy management system (EMS) [8; 9; 10]. Commercial micro-CHP appliances implement rule-based EMSs, which are simple and easy to program [11; 12; 13; 14]. In a previous study published by the authors, [PERSON] et al. [15], it was shown that these EMSs do not exploit the full savings potential of micro-CHP systems and that there is a significant profit margin that could be gained through better EMS design. The reason for this is that micro-CHP systems work in changing scenarios and rule-based EMSs are not able to adapt to changing scenarios. A scenario is the real-life situation in which the micro-CHP system is functioning. This situation is determined by several parameters that affect its economic performance, such as natural gas and electricity prices, household energy demands, etc. Therefore, the key to gaining this profit margin is that the EMS be able to adapt to changing scenarios. This means that it is possible to make micro-CHP systems more cost-effective simply by changing the way in which they are operated. This increase in cost-effectiveness can reach up to 14.5 percentage points in the annual energy bill. An EMS capable of adapting and, therefore, theoretically able to exploit this profit margin is an optimal EMS, that is, a model predictive control (MPC)-based EMS. This solution is the most widely used in microgrids [16]. Unfortunately, and despite the above, an MPC-based EMS is complex, its computational cost is high, and it is sensitive to uncertainty in both the energy demands predictions and the model. These disadvantages make its practical implementation complex and uncertain. However, the following question remains: What does the optimal EMS do? How does it adapt its behavior to the scenario? What does it do in each scenario? If this were known, it might be possible to design an EMS that emulates the optimal EMS. This new EMS would provide savings as high as the optimal EMS and would be as simple and fast as the rule-based EMSs, a solution, therefore, viable in practice. This prospect motivates the present research. This contribution has four parts:  
1. An optimal EMS is designed. 2. The parameters of the optimal EMS are adjusted (determination of the prediction horizon). 3. The economic performance of the optimal EMS is evaluated in 46 scenarios belonging to the European framework, and it is compared with those achieved by four typical rule-based EMSs. 4. The behavior of the optimal EMS is investigated in order to identify optimal operating patterns.