|dc.description.abstract||The main objective of this work is to develop a software tool to perform an techno-economic feasibility analysis of cogeneration systems for electricity and heat production, based on fuel cell technology (FC-CHP). The software tool should provide useful information to the decision makers. Moreover, the developed software will be applied to specific case studies to obtain the main indicators of the economic viability of the system. A FC-CHP system is a technology with potential to change the current paradigm, which consists in obtaining electricity from the power grid and, separately, heat through gas boilers. The method developed in this study allows to carry out a viability analysis over a specific time horizon, based on technical and economic parameters, to size the FC-CHP system and to adapt the calculations to the market conditions of each case study. It is important to consider the market conditions, because the previous works found in the literature remark that the viability of the FC-CHP technology depends on specific factors that vary by country and region. Local economic factors include government policies to support new technologies of distributed generation, that is, generation of electricity at or near where it will be used. Another local factor is the difference in prices between natural gas and electricity ("spark spread"), and the expected evolution of these prices. From the environmental point of view, the composition of the country's power generation mix has influence on the emissions reduction using FC-CHP. The pattern of thermal and electrical energy demand of each specific case also influence, and the relative amount of each one (heat-to-power ratio). The method developed requires a source of energy consumption data, which can be real or simulated. Special attention has been paid to see the impact of few consumption data in the results. A correction has to be made in the results for those situations when only the aggregate monthly or weekly consumption is available for analysis. From heat and electricity consumption data, a Matlab/Simulink model is used to calculate the amount of fuel needed so that the SOFC-CHP system can meet the demand, the amount of thermal energy that should be provided by an additional system (a conventional condensing boiler), as well as the electrical energy to be imported or exported from the electricity grid. The annual results are extrapolated to a time horizon of 10 years, to validate the economic viability of the project. Different operation modes (disconnected or connected to power grid) and operation strategies (heat-driven, power-driven, maximum-driven) of the SOFC-CHP system are analyzed in buildings of the Universitat Politècnica de Catalunya with varied heat-to-power 4 Memòria ratios, to determine the strategy that best suits each case. The results show that the high initial investment is one of the main obstacles to obtain a return on the investment in a reasonable time. However, the cogeneration system is economically viable in some of the studied cases, especially if the building has a heat to power ratio greater than one. The evolution of energy prices also greatly influences in the viability of the project. As for the operation strategies, those following maximum demand and those following electricity demand offer better results than the strategy that follows the thermal demand, because the former cases use the fuel cell throughout the year and can take more advantage of cogeneration.