## 1 Introduction  
As the rural population is progressively moving to urban areas and cities, more and more people are being exposed to pollution levels that exceed the recommended levels for air quality. This situation is more critical in undeveloped and developing countries, but even in developed countries, more than 50% of the cities cannot achieve the air quality levels declared by the World Health Organization [1]. Energy-related activities, such as industrial sectors or buildings, are significant stationary sources of air pollution, specifically for CO\({}_{2}\) emissions [2; 3]. Energy consumption of buildings is among the largest of society, accounting for around 40% of the total energy consumptions and 36% of greenhouse gases (GHG) emissions in Europe [4]. Within this sector, residential buildings constitute about 75% of the total European building floor area, and suppose a worldwide energy consumption of approximately 30% [5]. This makes this sector an attractive target for the use of more environmentally friendly fuels and energy technologies. These cleaner fuels to replace traditional fossil fuels, are expected to play an essential role in the achievement of healthy urban air quality standards, and reduce pollutant emissions [6]. Hydrogen fuel cells are efficient electrochemical energy conversion devices with very low emissions; therefore, they must be taken into consideration to implement alternatives for clean power generation for stationary applications. A hydrogen fuel cell works by consuming oxygen and hydrogen as reactants, using electrochemical processes to produce electrical energy as the output, meaning water is the only emission. Among hydrogen fuel cells, the Polymer Electrolyte Membrane (PEM) fuel cell is a highly promising technology thanks to its high power density, high efficiency, low emissions, rapid start, and additional advantages [7; 8]. Therefore, although hydrogen is still extensively used as chemical feedstock (refinery processes, ammonia production, coal refinement, organic and inorganic synthesis, metallurgy, etc. ), hydrogen demand as an energy carrier is expected to rise significantly in the near future in all economy sectors (road transport, buildings, and industry) [9], within a new energy scenario based on the implementation of a hydrogen economy. The definitive characteristics of this new hydrogen economy will depend on the solutions provided to the pending challenges, since considerable improvements are still needed to guarantee the competitiveness of hydrogen conversion devices. Nevertheless, the resolution of these aspects does not look unrealistic in the mid-term, which explains the increasing research interest and policy support for these technologies worldwide [10]. Among the challenges, hydrogen production is a critical cornerstone of this new hydrogen economy [11]. As in the case of electricity, since hydrogen is a secondary source of energy, it can be obtained from different primary sources, including fossil resources (oil, coal, natural gas) or renewable energies (biomass, wind, solar, etc.) [12]. Based on the nature of the chemical process, the hydrogen production methods can be categorized into thermochemical, electrochemical, and biological methods [13]. The well-established industrial hydrogen production methods include steam methane reforming, auto-thermal reforming, gasification of coal, and partial oxidation of hydrocarbons, but electrolysis of water into hydrogen and oxygen using electricity has gained relevance in the last few years [14; 15; 16]. An interesting alternative source of hydrogen, not fully developed yet, is its recovery from industrial waste gas streams. Several examples of waste gas streams rich in hydrogen can be identified, and this work has focused on two different options. On the one hand, ammonia-based production can be a promising sector to obtain safe and affordable hydrogen [17]. In the synthesis section of ammonia plants, the unconverted synthesis gas that involves methane as inert gas is recirculated to the reactor.