Techno-Economic and Environmental Assessment of the Hybrid Energy System Considering Electric and Thermal Loads

: Optimal sizing of hybrid energy systems has been considerably investigated in previous studies. Nevertheless, most studies only focused on providing AC electric loads by renewable energy sources (RESs) and energy storage systems (ESSs). In this paper, a hybrid energy system, including photovoltaic (PV) system, ESS, fuel cell (FC), natural gas (NG) boiler, thermal load controller (TLC), and converter is optimized for supplying different load demands. Three scenarios are introduced to investigate the feasibility of the energy system. Environmental aspects of each system are analyzed, as there are NG-consuming sources in the system structure. A sensitivity analysis is conducted on the inﬂuential parameters of the system, such as inﬂation rate and interest rate. Simulation results show that the proposed hybrid energy system is economically and technically feasible. The net present cost (NPC) and cost of energy (COE) of the system are obtained at $230,223 and $0.0409, respectively. The results indicate that the TLC plays a key role in the optimal operation of the PV system and the reduction in greenhouse gas emission productions.


Introduction
Global industrialization and world population growth have raised the demand for electricity, and the world's power consumption is estimated to increase by 50% until 2050 [1]. Fossil fuels are the primary source for supplying the world's energy demand, which contributes to global warming. By consuming fossil fuels, greenhouse gas emissions are emitted into the earth's atmosphere. Adverse effects on public health and climate change issues are inevitable due to the increased level of greenhouse gas emissions. Considering all the mentioned issues, it is essential to supply the world's power demand using renewable energy resources (RESs), such as photovoltaics (PV) and wind turbine (WT) systems [2]. The heat and radiant light from the Sun are the primary resource of all the RESs, excluding geothermal energy. Therefore, the energy from the Sun is the most promising energy, as it is capable of capturing energy to the world's yearly demand in less than an hour. By hybridizing PV systems, as the technology for capturing solar energy, with various energy storage systems (ESSs) and fuel cells (FCs), it is possible to generate unlimited energy, which eliminates the disadvantageous of the periodic nature of RESs [3][4][5].
Most of the papers in the scope of the enviro-techno-economic assessments have utilized RESs to merely supply electrical loads. Nevertheless, providing electric loads by RESs is not simply a way for sustainable development since about 29% of the gas RESs is not simply a way for sustainable development since about 29% of the gas emissions are produced by vehicles [6]. Hence, electric vehicles (EV) should be supplied with RESs besides the electric load. Furthermore, in real-world residential hybrid systems, thermal loads also exist in the system's configuration. An accurate design consists of the thermal requirements of the system, including thermal demand and supplying equipment. Therefore, we divided the literature review into three categories, as indicated in Figure 1. In the first category, electric loads are supplied by RESs, ESSs, and sometimes conventional generators. Due to the high intermittence of RESs, they are equipped with ESSs, diesel generators, and FCs. Utilizing these backup resources improves the stability and reliability of the hybrid systems significantly. In the second category, AC electric loads and EV electricity consumption are provided using RESs, ESSs, and conventional generators. In the last category, thermal and electric demands are provided by the mentioned sources. The reviewed papers generally utilized HOMER software for simulation and optimization of the hybrid energy systems. This is because of the reasonable accuracy and speed of the software in planning problems and techno-economic analysis [7]. The authors of [8] compared the optimization results of HOMER software with heuristic algorithms, such as particle swarm optimization (PSO) and artificial bee colony (ABC). According to their comparisons, HOMER software achieved identical results and accuracy.
Considering the first category, the authors of [9] analyzed the techno-economic feasibility of hybrid conventional fuel-based and RESs, as well as RESs and main grid, for a standalone system in a local place in Iran. HOMER software was used for performing optimization in this study. Simulation results indicated that a hybrid renewable energy system leads to an emission-free climate for both grid-connected and off-grid energy systems. Another study [10] investigated the optimal sizing of the hybrid energy systems for meeting power demands of a small hotel on Kish Island, Iran. It was revealed that the combination of WT/ESS/Diesel is the most economical configuration. In [11], the optimal system design of on and off-grid hybrid energy system is conducted for nonresidential users in the southern region of Iran. Additionally, the effect of government energy policies and yearly load growth rate on the system's viability was discussed. In [12], a hybrid energy system is optimized for supplying a household in Tehran, Iran by accounting for financial and reliability terms. In [13], optimal planning of PV/ESSs/Diesel was studied using HOMER. Furthermore, they studied the effect of the diesel fuel cost variations to guarantee whether the suggested system is proper for the cases. In another study [14], the scholars utilized HOMER software to assess techno-economic viability of the off-grid hybrid energy system. In a similar study [15], the planning of a hybrid PV/ESSs/Diesel system was conducted for a village Algerian Saharan community. Furthermore, the authors utilized HOMER software to perform the study. The PSO with the ε-constraint method is implemented for optimum design of hybrid PV/ESSs/Diesel system for a local place in Algeria [16]. The authors of [17] performed an economical-technical viability study for a standalone hybrid system with a variable climatic environment using HOMER software. In the second category, however, researchers incorporated EVs loads or charging station sizing in their studies. It should be mentioned that, even in charging stations, sizing EVs' Considering the first category, the authors of [9] analyzed the techno-economic feasibility of hybrid conventional fuel-based and RESs, as well as RESs and main grid, for a standalone system in a local place in Iran. HOMER software was used for performing optimization in this study. Simulation results indicated that a hybrid renewable energy system leads to an emission-free climate for both grid-connected and off-grid energy systems. Another study [10] investigated the optimal sizing of the hybrid energy systems for meeting power demands of a small hotel on Kish Island, Iran. It was revealed that the combination of WT/ESS/Diesel is the most economical configuration. In [11], the optimal system design of on and off-grid hybrid energy system is conducted for nonresidential users in the southern region of Iran. Additionally, the effect of government energy policies and yearly load growth rate on the system's viability was discussed. In [12], a hybrid energy system is optimized for supplying a household in Tehran, Iran by accounting for financial and reliability terms. In [13], optimal planning of PV/ESSs/Diesel was studied using HOMER. Furthermore, they studied the effect of the diesel fuel cost variations to guarantee whether the suggested system is proper for the cases. In another study [14], the scholars utilized HOMER software to assess techno-economic viability of the off-grid hybrid energy system. In a similar study [15], the planning of a hybrid PV/ESSs/Diesel system was conducted for a village Algerian Saharan community. Furthermore, the authors utilized HOMER software to perform the study. The PSO with the ε-constraint method is implemented for optimum design of hybrid PV/ESSs/Diesel system for a local place in Algeria [16]. The authors of [17] performed an economical-technical viability study for a standalone hybrid system with a variable climatic environment using HOMER software. In the second category, however, researchers incorporated EVs loads or charging station sizing in their studies. It should be mentioned that, even in charging stations, sizing EVs' consumption loads should be considered, according to the historical/estimated data. In [18], hybrid WT/PV/energy charging stations are designed and optimized by HOMER tools. The authors claim that the proposed sizing methodology applies to other places in the world. The optimal configuration for the hybrid system includes 44.4% of WT power and 55.6% of PV power. The electricity generation is 843,150 kWh/year with the 0.064 $/kWh generation cost. In another study conducted in Vietnam [19], the techno-economic analysis and optimum sizing of PV/EV charging stations are under various conditions of solar irradiation. The results indicated that the optimum system and investment efficiency of EV/PV charging stations in municipal areas are considerably dependent on the solar irradiation values and feed-in tariff (FIT) prices of rooftop PV systems. The economic and environmental benefits of stand-alone and grid integration are thoroughly analyzed in [20] for several climatic regions using hybrid optimization model for electric renewables (HOMER). The design and optimization of off-grid hybrid microgrid systems for different load dispatch strategies is presented in [21] by evaluating the component sizes, system responses, and various cost analyses of the system presented. In [22], a techno-economic assessment of the hybrid RESs system was conducted using HOMER software. The system is optimized to supply the loads including electric and hydrogen loads. It is assumed that the FC-based EV consumes hydrogen energy for transportation. The system is designed for a family house with 100% RESs. The studies from the third category consider both thermal and electric loads and their power supply sources. The researchers in [23] suggested a standalone hybrid system to provide electric and thermal demands in different climates of Australia. According to their findings, the WT/PV/ESS/conventional gas turbine system leads to the minimum COE for all the locations. They have used HOMER software for their investigations. In another study [24], an identical energy system is suggested to meet thermal and electric loads demands. The researchers analyzed two energy management methods utilized in HOMER software. The strategies are cycle charging and load following. Furthermore, based on their analysis, both cycle charging and load following methods effectively improve the system performance. The suggested system was also investigated in both on-grid and standalone modes.
Authors of [25] compared genetic algorithm and HOMER software for optimum configuration of a hybrid energy system, consisting of WT/PV/ESS/boiler. The genetic algorithm results showed that the suggested configuration is reliable (99.92%) and is suitable to meet thermal and electric loads. In [26], optimal sizing of hybrid energy systems is performed to provide thermal and electric demands of a small village in Iran. Simulation results indicated that the configuration of PV/WT/biogas is the optimal system configuration with the lowest NPC. Besides, utilization of the ESSs and FCs were not economically feasible, but their capability to raise the system flexibility was not negligible. In [27], a renewable-based energy system is suggested to provide thermal and electric loads. The optimization is performed by HOMER software. HOMER utilizes a non-derivative optimization for recognizing the best system with the lowest NPC among hundreds of structures. It was found that RESs play a key part in providing both electric and thermal loads. The cost of the system is also reduced by selling surplus power to the main grid.
Reviewing previous research works in the literature, it can be observed that there is a lack in the knowledge for proposing a hybrid energy system that meets the demands of EV, electric, and thermal loads. While these demands were separately investigated in previous papers, no comprehensive study is available that considers the combination of these loads in their research. However, it is essential to mention that residential households consume both electric and thermal loads in real-world applications. In addition, technological advances and global efforts to alleviate greenhouse emissions have increased EVs utilization in residential houses. It is estimated to grow in large cities such as Tehran. Considering all the mentioned terms, accurate planning and sizing are achieved by considering the mentioned demands in techno-economic analysis. The aim of this paper is to investigate an optimal design of the hybrid energy system for a residential household with EV, thermal, and electric loads. The proposed hybrid system is relatively novel and consists of the PV system, ESS, converter, gas-based FC, boiler, and thermal load controller (TLC). The contributions of the paper are summarized as below: 1.
EV load demand, thermal, and electric loads in the optimization of the hybrid energy system is considered.

2.
Utilizing a TLC, in addition to the gas-based FC, which is also utilized for converting excess RESs power generation to thermal energy, to reduce the amounts of greenhouse gas emissions.

3.
A sensitivity analysis on the influential parameters of the systems, such as inflation rate and interest rate, as well as analyzing the possible consequences on the optimization results are performed.
The remainder of the paper is as follows. In Section 2, methodology of the study including system structure, formulation, and modeling of the components, as well as system input data, are provided. In Section 3, simulation results of the paper, based on the introduced scenarios, are discussed. In Section 4, a sensitivity analysis on the economical parameters of the system is performed. In the last section, a conclusion including the important results of the study is provided.

Architecture of the Hybrid Energy System
The configuration of the suggested hybrid energy system is indicated in Figure 2. Generally, there are three types of loads in the system structure. The first type is the electric load, which consists of interior lights, exterior lights, fans HVAC, and interior equipment. The electric load is connected to the AC line since the electrical equipment uses AC power. The second type of load consumption is the EV's load consumption. The understudy house is equipped with a charging facility for the EV. Therefore, the EV is charged during particular times of the day and uses the charged power for transportation. The charging facility of the EV consumes DC power, unlike the household's electrical equipment. The third type of load demand is thermal load. Thermal energy is generally used for heating water and the environment. As indicated in Figure 1, the PV system and gas-based FC are responsible for providing electricity to the AC/DC loads of the system. The converter also transforms DC generation to AC power. The surplus power generation is stored in the ESS and is used for periods with higher electricity demand, such as night hours when the PV system does not produce energy. Both ESS and FC are backup resources of the system, which means that they are operated when the main electricity source (PV system) is not efficient. Moreover, TLC is able to transform the surplus generation of the PV system into thermal energy. Therefore, during higher generation of the PV system, TLC can produce clean thermal energy to supply thermal demand of the system. However, the gas boiler provides power whenever the transforming power of TLC is not sufficient. The gas-based FC is also capable of providing heat power to the hybrid system, which improves the system's performance.

Modeling of the Hybrid Energy System
In this sub-section, modeling of the hybrid energy system, including optimization problem and equipment formulation, is performed. The following optimization problem of the study (according to the HOMER software methodology) is introduced. Then, equipment formulas are provided.

Optimization Problem
In this study, the total NPC of the objective function (OF) is minimized, as determined by the OF (of ) in Equation (1), in which five decision variables (i.e., capacities of PV modules, ESSs, gas-based FCs, converter, TLC) are optimally adjusted concerning the following constraints [28,29].
Electronics 2021, 10, 3136  Figure 2. Different categories, according to the previous research works, in the field of the optimal sizing and techno-economic assessment of hybrid energy systems.

Modeling of the Hybrid Energy System
In this sub-section, modeling of the hybrid energy system, including optimization problem and equipment formulation, is performed. The following optimization problem of the study (according to the HOMER software methodology) is introduced. Then, equipment formulas are provided.

Optimization Problem
In this study, the total NPC of the objective function (OF) is minimized, as determined by the OF (of) in Equation (1), in which five decision variables (i.e., capacities of PV modules, ESSs, gas-based FCs, converter, TLC) are optimally adjusted concerning the following constraints [28,29] In Equation (1), the total NPC can be computed as the formula in (5). The NPC of each equipment is the present value of all costs minus all the revenues during its lifetime. In (5), CCAP is the capital cost of the equipment, which is expanded in Equation (6). CO&M is the operating and maintenance cost of the equipment. Equation (7) computes this cost. CREP is the replacement cost of equipment, calculated as (8). CFUEL is the cost of fuel, which is used for NG-consuming components, such as gas boiler and gas-based FC. Equitation (9) computes the fuel cost of the system [28,29]. In Equation (1), the total NPC can be computed as the formula in (5). The NPC of each equipment is the present value of all costs minus all the revenues during its lifetime. In (5), C CAP is the capital cost of the equipment, which is expanded in Equation (6). C O&M is the operating and maintenance cost of the equipment. Equation (7) computes this cost. C REP is the replacement cost of equipment, calculated as (8). C FUEL is the cost of fuel, which is used for NG-consuming components, such as gas boiler and gas-based FC. Equitation (9) computes the fuel cost of the system [28,29].
Renewable fraction (RF) is computed to denote the lowest value of PV system contribution in the total load served by all the sources of the hybrid system. Equation (10) calculates the RF of the proposed system [30].
Moreover, the LpSp is also calculated to analyze the system's reliability performance. Typically, LpSp is the ratio of the total deficit energy over the total demanded energy during one operational year. LPSP indicates the rate and value of the electric loads that have not been supplied. The below formula is used to calculate the LpSp of the system [31].
Another important cost of the hybrid system is the cost of energy (COE). COE is commensurate with the annualized system cost (total NPC multiply by capital recovery factor) and the annual energy served. It is computed as the Equations (12)-(14) [32].

Equipment Modeling
In this sub-section, the equations for the utilized equipment in the hybrid system are provided.

•
PV system PV cells convert solar energy into electricity. The electricity generated by the PV cells can be quantified according to the ambient temperature and solar irradiation. Equation (15) calculates the output power of the PV system [33]: • ESS In this study, the ESS agent consists of battery storage because of its higher efficiencies and availabilities [34,35]. Surplus generation from RESs is used for charging the ESS. The stored power can be used for supplying the loads during the power shortage period. The state of charge (SOC) of the ESS can be computed as (16) and (17). The ESS SOC should be constrained to lower and upper capacities of the storage, as indicated in (18) and (19). Depth of discharge (DoD) of the ESS relies on the type of the battery [36,37].
Electronics 2021, 10, 3136 In this study, a natural gas (NG)-based FC is utilized in the proposed model due to its highly efficient use of NG and high thermal efficiency. FC power creates a clean alternative for stationary power sources that substitute unclean Diesel Generator. The FC produces hydrogen directly from NG, utilizing an internal reforming process [38]. Afterward, it converts hydrogen to electricity through chemical reactions in which the hydrogen is oxidized and electricity is produced. The following equations indicate the process of generating electricity by the FC [27,39].
• Converter The role of power converters is to convert AC power to DC power or vice versa. In this study, the converter is mostly used for transforming the DC power into AC power for providing a household's electric demand. Equation (21) evaluates the efficiency of the converter.
η conv = P out P in (21) • TLC and Boiler In this paper, TLC is used for converting electricity by the PV system to thermal energy. In this way, the efficiency of the system will increase since all the generation of the PV system will be used for supplying systems loads. In addition, it will improve the environmental aspect of the system. The boiler is the main supplier of the heat demand of the household. The boiler, however, consumes fossil fuel to provide thermal energy. Considering the thermal power from TLC for providing the thermal load, there will not be any emissions since the PV system in the source of the thermal energy.

Site Location, Meteorological, and Loads Data
The location of the understudy residential household is depicted in Figure 3. The house is located in Tehran. This city is the most populated city of Iran, and in recent years, it has encountered several progresses in different sectors. However, one of the main issues of this city is the severe air pollution, which is mainly due to the internal combustion engines (ICE) of the cars. Therefore, many efforts have been devoted to the proliferation of RESs and EVs in recent years [40]. Several EV stations have been established by the government, and incentives are considered for using EVs such as VAT exemption [5]. Figure 4 shows a PV-based charging station for EVs in Iran [41].
As earlier mentioned, solar irradiance and ambient temperature are the most important meteorological data that should be indicated in the paper. Figure 5 shows the solar irradiance and ambient temperature's monthly values according to the NASA meteorological database [31]. As it is clear, the location of the study enjoys abundant solar resources during the year, which justifies the utilization of the PV system in the suggested hybrid energy system. Based on Figure 5a, during the summer months of the year, daily solar irradiation is significantly high. Moreover, during cold months of the year, a sufficient level of solar irradiation is available for providing power to loads. According to Figure 5b, the temperature is also moderate over the year, making the understudy location appropriate for the utilization of the PV system. of this city is the severe air pollution, which is mainly due to the internal combustion engines (ICE) of the cars. Therefore, many efforts have been devoted to the proliferation of RESs and EVs in recent years [40]. Several EV stations have been established by the government, and incentives are considered for using EVs such as VAT exemption [5]. Figure  4 shows a PV-based charging station for EVs in Iran [41].  As earlier mentioned, solar irradiance and ambient temperature are the most important meteorological data that should be indicated in the paper. Figure 5 shows the solar irradiance and ambient temperature's monthly values according to the NASA meteorological database [31]. As it is clear, the location of the study enjoys abundant solar resources during the year, which justifies the utilization of the PV system in the suggested hybrid energy system. Based on Figure 5a, during the summer months of the year, daily solar irradiation is significantly high. Moreover, during cold months of the year, a sufficient level of solar irradiation is available for providing power to loads. According to Figure 5b, the temperature is also moderate over the year, making the understudy location appropriate for the utilization of the PV system.

Location of the Study
Moreover, different types of load demands are indicated in Figures 6 and 7. In Figure  6, yearly values (8760 h) of electric, thermal loads, as well as EV electricity consumption are depicted [27]. As could be observed in Figure 6a, electric load consumption is raised during the summer season. However, a decline in load consumption can be seen in cold months. This pattern is typical for residential households since electric devices, such as air-cooling systems, are frequently used during the day. In contrast, thermal loads are less turned-on during the summer months, as the need for heating decreases in these months. of this city is the severe air pollution, which is mainly due to the internal combustion engines (ICE) of the cars. Therefore, many efforts have been devoted to the proliferation of RESs and EVs in recent years [40]. Several EV stations have been established by the government, and incentives are considered for using EVs such as VAT exemption [5]. Figure  4 shows a PV-based charging station for EVs in Iran [41].  As earlier mentioned, solar irradiance and ambient temperature are the most important meteorological data that should be indicated in the paper. Figure 5 shows the solar irradiance and ambient temperature's monthly values according to the NASA meteorological database [31]. As it is clear, the location of the study enjoys abundant solar resources during the year, which justifies the utilization of the PV system in the suggested hybrid energy system. Based on Figure 5a, during the summer months of the year, daily solar irradiation is significantly high. Moreover, during cold months of the year, a sufficient level of solar irradiation is available for providing power to loads. According to Figure 5b, the temperature is also moderate over the year, making the understudy location appropriate for the utilization of the PV system.

Location of the Study
Moreover, different types of load demands are indicated in Figures 6 and 7. In Figure  6, yearly values (8760 h) of electric, thermal loads, as well as EV electricity consumption are depicted [27]. As could be observed in Figure 6a, electric load consumption is raised during the summer season. However, a decline in load consumption can be seen in cold months. This pattern is typical for residential households since electric devices, such as air-cooling systems, are frequently used during the day. In contrast, thermal loads are less turned-on during the summer months, as the need for heating decreases in these months. The EV's electricity consumption generally follows a constant pattern with minor variations during the year. Figure 7 is provided to get more information on daily variations of loads. Average values for the electric load ( Figure 7a) show that there are two peaks during a day. One is at 8:00, and the other is at 19:00. However, there is only one peak for thermal load at 6:00 ( Figure 7b). According to Figure 7c, the EV is charged during night hours and is driven during day hours. The PV and ESS are assumed to be main sources of charging EV [42]. More statistical details on loads, including minimum, maximum, and mean values, are provided in Table 1. Moreover, different types of load demands are indicated in Figures 6 and 7. In Figure 6, yearly values (8760 h) of electric, thermal loads, as well as EV electricity consumption are depicted [27]. As could be observed in Figure 6a, electric load consumption is raised during the summer season. However, a decline in load consumption can be seen in cold months. This pattern is typical for residential households since electric devices, such as air-cooling systems, are frequently used during the day. In contrast, thermal loads are less turned-on during the summer months, as the need for heating decreases in these months. The EV's electricity consumption generally follows a constant pattern with minor variations during the year. Figure 7 is provided to get more information on daily variations of loads. Average values for the electric load (Figure 7a) show that there are two peaks during a day. One is at 8:00, and the other is at 19:00. However, there is only one peak for thermal load at 6:00 (Figure 7b). According to Figure 7c, the EV is charged during night hours and is driven during day hours. The PV and ESS are assumed to be main sources of charging EV [42]. More statistical details on loads, including minimum, maximum, and mean values, are provided in Table 1.  mean values, are provided in Table 1.

Scenario Definition
To comprehensively analyze the hybrid system, three scenarios are introduced, according to the components of the system. The scenarios illustrate the importance of utilizing RESs for supplying load demands. The suggested scenarios are as below: 1.
Scenario 1: Optimal sizing of the proposed hybrid system, including all the sources and loads; 2.
Scenario 2: Optimal sizing of hybrid system, neglecting the TLC from the architecture of the system; 3.
Scenario 3: Optimal sizing of hybrid system, neglecting the TLC from the architecture of the system.

Results and Discussion
This section provides the results of the study according to the introduced scenarios are provided. Besides, the results of the sensitivity analysis on the inflation rate and discount rate are discussed. Before that, economical-technical data, regarding the components of the study, are provided in the following paragraph.
Essential economic parameters include inflation and interest rates, which are considered as 18% and 36.5%, respectively [30,43]. The NG price is considered as 0.016 $/m 3 [44]. Table 2 indicates the technical and economic characteristics of the hybrid energy system's equipment. More information about the equipment specifications could be found in [27]. The emission productions of different gas-based components are indicated in Table 3 [27].  In this scenario, the proposed hybrid energy system, indicated in Figure 2, is optimized by HOMER. The optimal system configuration consists of 14 kW of PV system, 15 kW of FC, 2.86 kW of Converter, 100 kW of ESS, and 20 kW of TLC. The gas boiler is also equipped with the system in order to supply thermal load. Therefore, it can be observed that all the system components have been used in the system's structure. The COE and NPC of the system are obtained 0.0409 $/kWh and $230,223. The operating cost and initial capital are also achieved 605.70 $/yr and $64,287.
Furthermore, the renewable fraction (RF) is calculated at 66.2%. The value shows that 66.2% of the electric and EV loads are supplied with RESs. Total fuel consumption is also 1105 L/yr, which is used by the gas boiler and gas-based FC. To get more information on systems costs, Figure 8 is shown. According to this figure, salvage cost (the remaining value in an equipment of the energy system at the end of the project) is the main income of the system. Furthermore, most expenditure of the system belongs to the operating cost, which is the annualized value of all costs and revenues other than capital cost. On the other hand, the gas-based FC has the lowest cost, and the PV systems has the highest cost of the system.
According to the results, AC electric load consists of 39.7% of the system consumption, and DC electric load (EV electricity usage) includes the rest of the system electricity consumption as 60.3%. These loads are generally provided by the PV system and FC.
Around 91.8 of the loads (21,772 kWh/yr) are supplied by the PV system, and 8.16% of the load (1935 kWh/yr) is provided using FC. Figure 9 indicates the monthly energy supply of the electric loads of the system by the PV and FC. As illustrated, the PV system is the primary resource of electricity supply. However, during cold months, when the solar potential is lower than the other months, the FC provides the required electric power. It is important to mention that the value of unmet electric demand is achieved at zero, which shows the sufficiency of the available sources. Figure 10 shows the operation of the ESS during the year. It is clear that the ESS plays an important part in the power supplying of electric loads. In general, the ESS is mainly charged during the daylight and is discharged during night hours to supply both EV electricity consumption and electric loads of the consumer. The ESS's state of charge is relatively low in cold months. This is due to the lower production of the PV system and results in frequent utilization of the ESS during power deficiencies. Additionally, most of the ESS's charging is conducted during the PV system's peak generation, as illustrated in Figure 10a.
Electronics 2021, 10, x FOR PEER REVIEW 11 of 23 that all the system components have been used in the system's structure. The COE and NPC of the system are obtained 0.0409 $/kWh and 230,223 $. The operating cost and initial capital are also achieved 605.70 $/yr and 64,287 $. Furthermore, the renewable fraction (RF) is calculated at 66.2%. The value shows that 66.2% of the electric and EV loads are supplied with RESs. Total fuel consumption is also 1105 L/yr, which is used by the gas boiler and gas-based FC. To get more information on systems costs, Figure 8 is shown. According to this figure, salvage cost (the remaining value in an equipment of the energy system at the end of the project) is the main income of the system. Furthermore, most expenditure of the system belongs to the operating cost, which is the annualized value of all costs and revenues other than capital cost. On the other hand, the gas-based FC has the lowest cost, and the PV systems has the highest cost of the system. According to the results, AC electric load consists of 39.7% of the system consumption, and DC electric load (EV electricity usage) includes the rest of the system electricity consumption as 60.3%. These loads are generally provided by the PV system and FC. Around 91.8 of the loads (21,772 kWh/yr) are supplied by the PV system, and 8.16% of the load (1935 kWh/yr) is provided using FC. Figure 9 indicates the monthly energy supply of the electric loads of the system by the PV and FC. As illustrated, the PV system is the primary resource of electricity supply. However, during cold months, when the solar potential is lower than the other months, the FC provides the required electric power. It is important to mention that the value of unmet electric demand is achieved at zero, which shows the sufficiency of the available sources. Figure 10 shows the operation of the ESS during the year. It is clear that the ESS plays an important part in the power supplying of electric loads. In general, the ESS is mainly charged during the daylight and is discharged during night hours to supply both EV electricity consumption and electric loads of the consumer. The ESS's state of charge is relatively low in cold months. This is due to the lower production of the PV system and results in frequent utilization of the ESS during power deficiencies. Additionally, most of the ESS's charging is conducted during the PV system's peak generation, as illustrated in Figure 10a.    The thermal demand of the system is largely provided by the gas boiler 68.6% (5861'kWh/yr), TLC 16.8% (1431 kWh/yr), and FC 14.6% (1247 kWh/yr). This shows the significance of TLC in the thermal power provision, which has a higher ratio of supply than the FC. Figure 11 shows the output power of thermal power suppliers, namely, gas boiler, FC, and TLC. As indicated in Figure 11a, the gas boiler provides greater amounts of thermal power to the loads in cold months. This is because the thermal load consumption is higher in cold months (Figure 6a). In addition, the boiler is operated in most hours of a day, but larger amounts of power are produced during peak periods. As shown in Figure 11b, the FC is usually operated during night hours and mainly in peak demands. This is more visible in cold months of the year. On the other hand, the TLC mostly provides thermal mostly in the peak generation of the PV system. Therefore, excess electricity by solar energy is used for supplying the thermal demand of the system. According to the results, the boiler is operated 7956 h/yr, the FC is operated 529 h/yr, and the TLC is operated 419 h/yr.
Other important results of the study are related to the environmental performance of the hybrid energy system. The fuel consumption graph is depicted in Figure 12. As can be seen, fuel consumption is greater from November to December (cold months of the year). Total NG consumed is 1105 m 3 with an average per day consumption of 3.03 m 3 /day. The NG consumption of the boiler and FC are 698 m 3 /yr and 406 m 3 /yr. Consuming fossil fuels such as NG will lead to the production of greenhouse gas emissions such as CO 2 and CO. In this study, the proposed hybrid energy system emitted 2144 kg/yr of CO 2 and 0.0813 kg/yr of CO.  The thermal demand of the system is largely provided by the gas boiler 68.6% (5861 kWh/yr), TLC 16.8% (1431 kWh/yr), and FC 14.6% (1247 kWh/yr). This shows the significance of TLC in the thermal power provision, which has a higher ratio of supply than the FC. Figure 11 shows the output power of thermal power suppliers, namely, gas boiler, FC, and TLC. As indicated in Figure 11a, the gas boiler provides greater amounts of thermal power to the loads in cold months. This is because the thermal load consumption is higher in cold months (Figure 6a). In addition, the boiler is operated in most hours of a day, but larger amounts of power are produced during peak periods. As shown in Figure 11b, the FC is usually operated during night hours and mainly in peak demands. This is more visible in cold months of the year. On the other hand, the TLC mostly provides thermal mostly in the peak generation of the PV system. Therefore, excess electricity by solar energy is used for supplying the thermal demand of the system. According to the results, the boiler is operated 7956 h/yr, the FC is operated 529 h/yr, and the TLC is operated 419 h/yr. ii. Scenario 2 The hybrid energy system introduced in the previous scenario is optimized, neglecting the TLC from the system structure. Optimal sizing of the system includes 7.82 kW of the PV system, 15 kW of FC, 94 kW of ESS, and 4.88 kW of the converter. The NPC and COE obtained $422,122 and $0.0754, respectively. In addition, the operating cost and initial cost of the system achieved $1313 and $62,319. Comparing the economic results of this scenario and the previous one, it can be observed that the NPC and COE are relatively doubled in the second scenario. In addition, the RF of the system is significantly decreased to 24.7%. Figure 13 shows the electric power supply over different months of the year. Due to the lower capacity of the PV system, the gas-based FC has more contributions to supplying the electric loads (AC and DC loads). Unlike the previous scenario, 56.4% (12,114 kWh/yr) of electric loads is supplied with the PV system, and 43.6% (9370 kWh/yr) is provided by the FC. Furthermore, the unmet electric load obtained is zero, meaning no power shortage has occurred during the operation. According to Figure 14a, the performance of the ESS, in supplying electric loads, is not notable when comparing it to the previous scenario. One reason is the lower capacity of the PV system in this scenario. However, the ESS is mainly charged during peak PV generation, similar to Scenario 1. As depicted in Figure  14b, the state of charge of the ESS moderately decreases over hot months of the year. Figure 15 indicates the thermal energy provisions by boiler and FC. The boiler is the main supplier of thermal energy. Nevertheless, the FC is incorporated in supplying the loads in peak demand periods. The boiler produces more power during cold months. Due to the lack of TLC in the system's structure, the extra generation of the PV system cannot be used for supplying clean thermal energy. Therefore, the FC produces more power to supply the demand adequately. Other important results of the study are related to the environmental performance of the hybrid energy system. The fuel consumption graph is depicted in Figure 12. As can be seen, fuel consumption is greater from November to December (cold months of the year). Total NG consumed is 1105 m 3 with an average per day consumption of 3.03 m 3 /day. The NG consumption of the boiler and FC are 698 m 3 /yr and 406 m 3 /yr. Consuming fossil fuels such as NG will lead to the production of greenhouse gas emissions such as CO2 and CO. In this study, the proposed hybrid energy system emitted 2144 kg/yr of CO2 and 0.0813 kg/yr of CO. ii.

Scenario 2
The hybrid energy system introduced in the previous scenario is optimized, ne ing the TLC from the system structure. Optimal sizing of the system includes 7.82 The large share of FC in the thermal power provision could be interpreted to more consumption of NG during the project. Therefore, it is expected that the hybrid system consumes more NG to provide the thermal demand suitably. Figure 16 demonstrates NG consumption by different sources. It is evident that the NG consumption is significantly increased when compared with the previous scenario. This shows the importance of the TLC unit in alleviating fuel consumption. As a result, the greenhouse gas emissions are increased dramatically in this scenario. The values of CO 2 and CO are obtained at 4919 kWh/yr and 0.394 kg/yr, respectively. COE obtained 422,122 $ and 0.0754 $, respectively. In addition, the operating cost and initial cost of the system achieved 1313 $ and 62,319 $. Comparing the economic results of this scenario and the previous one, it can be observed that the NPC and COE are relatively doubled in the second scenario. In addition, the RF of the system is significantly decreased to 24.7%. Figure 13 shows the electric power supply over different months of the year. Due to the lower capacity of the PV system, the gas-based FC has more contributions to supplying the electric loads (AC and DC loads). Unlike the previous scenario, 56.4% (12,114 kWh/yr) of electric loads is supplied with the PV system, and 43.6% (9370 kWh/yr) is provided by the FC. Furthermore, the unmet electric load obtained is zero, meaning no power shortage has occurred during the operation. According to Figure 14a, the performance of the ESS, in supplying electric loads, is not notable when comparing it to the previous scenario. One reason is the lower capacity of the PV system in this scenario. However, the ESS is mainly charged during peak PV generation, similar to Scenario 1. As depicted in Figure 14b Figure 15 indicates the thermal energy provisions by boiler and FC. The boiler is the main supplier of thermal energy. Nevertheless, the FC is incorporated in supplying the loads in peak demand periods. The boiler produces more power during cold months. Due to the lack of TLC in the system's structure, the extra generation of the PV system cannot be used for supplying clean thermal energy. Therefore, the FC produces more power to supply the demand adequately.
The large share of FC in the thermal power provision could be interpreted to more consumption of NG during the project. Therefore, it is expected that the hybrid system consumes more NG to provide the thermal demand suitably. Figure 16 demonstrates NG consumption by different sources. It is evident that the NG consumption is significantly increased when compared with the previous scenario. This shows the importance of the TLC unit in alleviating fuel consumption. As a result, the greenhouse gas emissions are increased dramatically in this scenario. The values of CO2 and CO are obtained at 4919 kWh/yr and 0.394 kg/yr, respectively.

iii. Scenario 3
This scenario is introduced to analyze the impacts of PV generation on enviro-technoeconomic aspects of the system. Therefore, the PV system and ESS are excluded from the system structure. Meanwhile, it is essential to mention that the ESS could be merely charged by the PV system. Therefore, when the PV system is not available in the system's structure, the utilization of ESS is not economical. The optimum configuration of the hybrid system is achieved when FC and converter have capacities of 10 kW and 1.94 kW, respectively. The boiler is also equipped with the system. The NPC and COE are obtained $888,866 and 0.160 $/kWh. These values are considerably higher than the other scenarios. The initial and operating costs also achieved $30,731 and $3132, respectively. Figure 17 indicates the electric power production by the FC as the only electric source of the system. The system energy production is merely based on NG consumption. The FC is able to supply most of the AC/DC demand of the consumer, and the unmet electric load ratio is obtained at 0.00910% (1.85 kWh/yr).
to the lack of TLC in the system's structure, the extra generation of the PV system cannot be used for supplying clean thermal energy. Therefore, the FC produces more power to supply the demand adequately.
The large share of FC in the thermal power provision could be interpreted to more consumption of NG during the project. Therefore, it is expected that the hybrid system consumes more NG to provide the thermal demand suitably. Figure 16 demonstrates NG consumption by different sources. It is evident that the NG consumption is significantly increased when compared with the previous scenario. This shows the importance of the TLC unit in alleviating fuel consumption. As a result, the greenhouse gas emissions are increased dramatically in this scenario. The values of CO2 and CO are obtained at 4919 kWh/yr and 0.394 kg/yr, respectively. iii. Scenario 3 This scenario is introduced to analyze the impacts of PV generation on enviro-technoeconomic aspects of the system. Therefore, the PV system and ESS are excluded from the system structure. Meanwhile, it is essential to mention that the ESS could be merely charged by the PV system. Therefore, when the PV system is not available in the system's structure, the utilization of ESS is not economical. The optimum configuration of the hybrid system is achieved when FC and converter have capacities of 10 kW and 1.94 kW, respectively. The boiler is also equipped with the system. The NPC and COE are obtained 888,866 $ and 0.160 $/kWh. These values are considerably higher than the other scenarios. The initial and operating costs also achieved 30,731 $ and 3132 $, respectively. Figure 17 indicates the electric power production by the FC as the only electric source of the system. The system energy production is merely based on NG consumption. The FC is able to supply most of the AC/DC demand of the consumer, and the unmet electric load ratio is obtained at 0.00910% (1.85 kWh/yr).
The thermal demand of the system is provided by the boiler and FC. Unlike the previous cases, the FC is the predominant supplier of the thermal load, and the boiler plays a minor role in thermal power provision. In fact, the FC is the primary source of electricity iii. Scenario 3 This scenario is introduced to analyze the impacts of PV generation on enviro-technoeconomic aspects of the system. Therefore, the PV system and ESS are excluded from the system structure. Meanwhile, it is essential to mention that the ESS could be merely charged by the PV system. Therefore, when the PV system is not available in the system's structure, the utilization of ESS is not economical. The optimum configuration of the hybrid system is achieved when FC and converter have capacities of 10 kW and 1.94 kW, respectively. The boiler is also equipped with the system. The NPC and COE are obtained 888,866 $ and 0.160 $/kWh. These values are considerably higher than the other scenarios. The initial and operating costs also achieved 30,731 $ and 3132 $, respectively. Figure 17 indicates the electric power production by the FC as the only electric source of the system. The system energy production is merely based on NG consumption. The FC is able to supply most of the AC/DC demand of the consumer, and the unmet electric load ratio is obtained at 0.00910% (1.85 kWh/yr).
The thermal demand of the system is provided by the boiler and FC. Unlike the previous cases, the FC is the predominant supplier of the thermal load, and the boiler plays a minor role in thermal power provision. In fact, the FC is the primary source of electricity The thermal demand of the system is provided by the boiler and FC. Unlike the previous cases, the FC is the predominant supplier of the thermal load, and the boiler plays a minor role in thermal power provision. In fact, the FC is the primary source of electricity and thermal power production. The FC provided 91.6% (13,326 kWh/yr), and the boiler supplied 8.41% (1223 kWh/yr) of the thermal demand ( Figure 18). The energy system is based on NG consumption; hence, fuel consumption and greenhouse emission are greater in Scenario 3. Daily NG consumption is depicted in Figure 19. As can be observed, NG consumption is higher than in other scenarios. Yearly CO 2 and CO productions were 8712 kg/yr and 0.869 kg/yr, respectively.

Sensitivity Analysis
Due to the economic instability of Iran, a sensitivity analysis on influential parameters, such as inflation rate and the discount rate, is conducted in this section. Therefore, for the proposed hybrid energy system (PV/ESS/FC/Boiler/Converter), we analyzed both

Sensitivity Analysis
Due to the economic instability of Iran, a sensitivity analysis on influential parameters, such as inflation rate and the discount rate, is conducted in this section. Therefore, Figure 19. Daily NG consumption of the boiler and FC.

Sensitivity Analysis
Due to the economic instability of Iran, a sensitivity analysis on influential parameters, such as inflation rate and the discount rate, is conducted in this section. Therefore, for the proposed hybrid energy system (PV/ESS/FC/Boiler/Converter), we analyzed both increasing and decreasing trends in these two parameters. Therefore, corresponding impacts of other system specifications, such as NPC and COE of the system and system optimal configuration, are studied accordingly. The current values of inflation (36.5%) and discount (18.0%) rates are raised/decreased from 0% to 50%. The results of sensitivity analysis are indicated in Figure 20. According to Figure 20a, raising the discount rate ratio from 9% to 27% increases the NPC and COE values. In contrast, by increasing the ratio of the inflation rate from 18.25% to 54.75%, NPC and COE are decreased. It can be understood that the rise in the inflation rate has positive impacts on the economic criteria of the system. This is in accordance with the results of previous studies in this field [45]. Figure 20c shows the optimal system configuration over different ratios of inflation and discount rates. It is clear that the optimum configuration of the suggested hybrid energy system (PV/ESS/FC/Boiler/Converter) does not change by different rates. In addition, the CO 2 production values by the optimal configuration are indicated in the plot. It can be seen that, by raising the ratio of the inflation rate, the PV generation of the hybrid system increases, and, therefore, CO 2 emissions decrease significantly. Thus, the proposed configuration of the hybrid system does not change with the alteration in economic criteria.
increasing and decreasing trends in these two parameters. Therefore, corresponding impacts of other system specifications, such as NPC and COE of the system and system optimal configuration, are studied accordingly. The current values of inflation (36.5%) and discount (18.0%) rates are raised/decreased from 0% to 50%. The results of sensitivity analysis are indicated in Figure 20. According to Figure 20a, raising the discount rate ratio from 9% to 27% increases the NPC and COE values. In contrast, by increasing the ratio of the inflation rate from 18.25% to 54.75%, NPC and COE are decreased. It can be understood that the rise in the inflation rate has positive impacts on the economic criteria of the system. This is in accordance with the results of previous studies in this field [45]. Figure  20c shows the optimal system configuration over different ratios of inflation and discount rates. It is clear that the optimum configuration of the suggested hybrid energy system (PV/ESS/FC/Boiler/Converter) does not change by different rates. In addition, the CO2 production values by the optimal configuration are indicated in the plot. It can be seen that, by raising the ratio of the inflation rate, the PV generation of the hybrid system increases, and, therefore, CO2 emissions decrease significantly. Thus, the proposed configuration of the hybrid system does not change with the alteration in economic criteria.  Tables 4 and 5 show sensitivity analyses on the scaled annual average of EV, thermal loads, and the corresponding effects on the NPC of the hybrid energy system. The av-erage scaled values of EV (33.50 kWh/d) and thermal (17.81 kWh/d) loads are reduced gradually from 100% (full load) to 0% (no load). According to the provided information in these tables, EV and thermal loads have significant impacts on the NPC of the system. It can be revealed that realistic results of the hybrid system are achieved by considering the thermal and EV loads. This is due to the fact that the household consumes EV and thermal loads in addition to the electric load.

Discussion
In this sub-section, the results and findings of this study are compared with other research works in the literature. It is worth mentioning that all the compared studies in this sub-section are conducted in Tehran. In this way, meteorological data do not differ significantly. Compared to the previous research in this area [30], which was also conducted in Tehran, the utilization of ESS is found to be economical. This is mainly because the proposed system of this paper is off-grid, while Ref. [30] considered grid-connection in the structure of the study. Similar to [30,33], the PV system was the leading electricity supplier. Nevertheless, Ref. [31], which is also conducted in Tehran, found the combination of WT/ESS as an optimal combination for supplying load demands. Both [30,33] neglected thermal and EV loads in their modeling, which led to lower NPC compared to the findings of this paper. The authors of [27] considered thermal demand while neglecting EV load. They have considered the grid connection, and hence, most of the generation of renewables are sold back to the grid instead of converting to thermal power by the TLC. In contrast to [27], our proposed energy system is self-sufficient and able to supply three types of load demand using the available internal resources. The suggested systems in [27,29] require a grid connection in order to supply load demands fully. For future works, it is recommended to consider thermal energy storage and analyze the outcomes.

Conclusions
In this paper, a hybrid energy system, consisting of PV/ESS/FC/TLC/Boiler/Converter, is proposed to supply three types of loads. The loads consist of the consumer's AC electric demand, the EV's DC electricity consumption, and thermal load demand. The optimal system configuration included 14 kW of the PV system, 15 kW of FC, 2.86 kW of Converter, 100 kW of ESS, and 20 kW of TLC. The COE and NPC of the hybrid energy system achieved 0.0409 $/kWh and $230,223, respectively. The PV system provides most of the AC and DC loads of the system. The ESS plays a key role in supplying the EV's electricity consumption at night hours. The TLC converted the surplus generation of the PV system to thermal power. This has led to a decrease in emissions of the system. The FC also produced sufficient electrical and thermal power, especially during peak thermal loads. The proposed hybrid energy system emitted 2144 kg/yr of CO 2 and 0.0813 kg/yr of CO.
Neglecting TLC from the hybrid system configuration significantly affected the result. For instance, NPC and COE values increased considerably, and more NG is consumed to meet the thermal demand of the system, which led to the production of more emissions. Moreover, RF of the system decreased from 66.2% to 24.7%. The impact of PV/ESS ignorance was even more severe, such that the NPC and COE values had notable rises, and the operation of NG-based sources, such as FC and boiler, were significant. Therefore, notable emission production was observed, which indicates the importance of PV system utilization in hybrid energy systems. A sensitivity analysis is conducted on two influential parameters of the system, such as inflation rate and discount rate. The results indicate that the NPC and COE of the suggested hybrid system increase in higher ratios of the discount rate. In contrast, the NPC and COE of the hybrid system reduce when the inflation rate increases. In addition, an increase or decrease in inflation and discount rate of the system does not impact the optimal configuration of the hybrid energy system. The RF of the system, however, increases by raising the inflation rate of the system.  output power of PV system (kWh) P FC output power of FC (kWh) P ESS output power of PV system (kWh) P Load consumer's load demand (kWh) P Conv output power of converter (kWh) P gen output power of energy generators (kWh) P in, P out input and output power of converter (kWh) P TLC output power of TLC (kWh) Rf renewable fraction (%) LpSp loss of power supply probability (%) fuel cons fuel consumption CRF capital recovery factor P Npv nominal power of PV module G, G G and G represent solar radiation and at STD ( • C) K t temperature coefficient of PV