Techno‐economic optimization of a grid‐connected hybrid energy system considering electric and thermal load prediction

Optimal planning of hybrid energy systems has always been a considerable task. While several studies have conducted techno‐economic analysis on hybrid energy systems, most of them have neglected to consider appropriate electric and thermal load growth rates. This paper proposes an efficient strategy for optimizing a grid‐connected hybrid energy system considering electric and thermal load growth rates. HOMER software is used for optimizing hybrid energy systems. It uses a nonderivative optimization to recognize the system with the minimum net present cost (NPC) among hundreds of configurations. The exponential smoothing method is also used for predicting upcoming load peak values based on historical data. The proposed hybrid system includes solar photovoltaic (SPV) system, wind turbine (WT) system, converter, battery storage system (BSS), gas generator (GasGen), fuel cell (FC), fuel‐fired boiler, and resistive boiler. Unlike previous studies, electricity price growth and SPV degradation rates are considered in this study. The grid‐connected system has also been compared to the stand‐alone system to understand grid connection impacts on the optimization results. Environmental analysis has been performed to analyze the greenhouse gas emissions of each system. The effects of growth rates in thermal and electric loads and electricity price are comprehensively investigated. Neglecting load growth rates affected the financial results severely. In this condition, the NPC and COE are achieved −11 383.4 US$ and −0.02376 US$/kWh. Results indicate that the combination of WT system (15 kW), converter (10 kW), resistive, and fuel‐fired (10 kW) boilers is the most economical configuration in grid‐connected mode. The WT system plays an essential role in the electric power provision and revenues of the hybrid system. The net present cost (NPC) and the cost of energy (COE) for grid‐connected operating mode are achieved −0.0162272 US$/kWh and −5243.956 US$, respectively. For off‐grid operating mode, the NPC and COE are obtained 47 024.19 US$ and 0.1983879 US$/kWh, respectively. Thanks to the feed‐in‐tariff (FiT) policy, the proposed grid‐connected system is more economical and environmentally friendly than the stand‐alone system. In off‐grid operating mode, 63 575.45285 kg CO2 is produced, which is higher than CO2 production in the grid‐connected mode (more than 8262 kg).


| INTRODUCTION
Fossil fuels are the predominant sources of electricity generation in Iran. Particularly, natural gas and oil, with production values of 49 804.0 GWh and 236 425.0 GWh, were the primary sources of electricity generation in 2019. 1 Fossil fuels are also responsible for 98% of national energy consumption. 2 On the other hand, renewable energy sources (RESs) play an insignificant role in the country's electricity production. The total amount of generated electricity from RESs, including solar photovoltaic (PV) and wind energy, was achieved as 622.0 GWh, far less than fossil fuels in general. 1 Uncontrolled consumption of fossil fuels has resulted in air pollution concerns. 3 To deal with greenhouse emissions issues, the Ministry of Energy (MOE) of Iran has introduced some meaningful strategic plans in recent years. One of the recent efforts is the MOE's legislation to raise the share of clean power plants and RESs to at least 5% of the country's power capacity until the end of 2021. 1,4 To this end, different incentives have been proposed for the proliferation of RESs by MOE of Iran. 5 An efficient feed-in-tariff (FiT) policy and low-interest loans for utilizing photovoltaics are two important incentives, which have been proposed by MOE in recent years. 6 Electrical and thermal load profiles are two effective parameters in the optimal planning of hybrid energy systems. 7 Due to the considerable population growth and technological advancements, Iran's energy consumption is growing year by year. 8,9 Figure 1 shows electricity consumption by different sectors over 29 years. 1 As can be seen, residential and industrial sectors are pioneers in electricity consumption. Even in some particular years like 2015, the residential sector was the main consumer among the others. Therefore, a new consumption peak value can be observed each year, which is different from the previous years. From this trend, it can be understood that any energy-oriented planning of hybrid systems, especially those that involve electrical or even thermal loads, needs to provide appropriate load growth rates for long-term optimization. Paying attention to this point could lead to realistic optimization results and fulfill the users' expectations. Reviewing recent studies in the field, it can be observed that many studies neglected to consider load growth rates in their long-term planning. [10][11][12][13][14][15][16] In these studies, hybrid energy systems are optimized using a one-year electrical (sometimes thermal) load consumption profile and then extrapolate that particular year to other years until the end of the optimization (static planning approach). While this procedure significantly saves simulation time, the results could be unrealistic, especially when the residential sector is taken as a case study.
Authors of Ref. 10 proposed a hybrid energy system, including PV/WT/biogas/biomass/FC/BSS for a village area in India. The goal of the study was to electrify an offgrid cluster of villages using low-carbon energy sources. While the suggested energy system was efficient and led to the lowest economic cost, the electrical load growth rates have been neglected in this study. As mentioned above, this could finally change the components' capacity or even systems architecture. In Ref. 11, a grid-connected mediumsize hotel located at Kish Island, Iran, has been investigated for the best combination of RESs and nonRESs. They found that the optimal economic system includes the WT system, DG, and BSS. Although the authors performed several sensitivity analyses on different system parameters, they ignored the effects of annual load changes. A residential Industry Residential Commercial and public services Agriculture / forestry Non-specified Transport building in Tehran, Iran, was analyzed in Ref. 12 for utilizing a hybrid RESs-based system. The SPV and WT systems were investigated for the optimal size along with the utilization of the BSS. In Ref. 13, the authors proposed eight feasible configurations including DG, DG/BSS, PV/DG/BSS, WT/DG/ BSS, PV/WT/DG/BSS, PV/DG, WT/DG, and PV/WT/ DG are proposed for an industrial area in Ardabil, Iran. Load demand profile considered unchanged over the optimization years. They found that the optimal configuration of hybrid systems significantly depends on environmental potentials. Optimization results indicated that since the understudy location has windy climatic conditions, a large percentage of the generated energy is supplied by the WT system. In Ref. 14, the authors performed optimal sizing of a hybrid energy system including PV, SPV, and DG in Golpayegan, Iran. The residential house's thermal modeling is conducted using BEopt software to estimate the house's power consumption. However, thermal load demand and multi-year analysis based on the load growth rate were neglected in their study. Another investigation 16 proposed a similar configuration to Ref. 14 for a remote place in Bangladesh. A multi-year analysis is done based on the optimal sizing of the components. In addition, a sensitivity analysis on the amount of solar irradiance and economic evaluation is conducted to understand the impact of solar irradiance on NPC and COE. Nevertheless, the load growth rate was neglected in this study, and all the assumption is based on a fixed load profile that is extrapolated to other years. In Ref. 15, the authors optimized hybrid systems including DG, SPV, WT, and BSS for Popov Island in Russia. They investigated how the uncertainty of the input parameters like RESs, fossil fuel energy, OPEX, CAPEX, discount rate, project lifetimes, and fuel cost affects the LCOE in the feasibility study of hybrid energy systems. To do this, different scenarios are generated by Monte Carlo simulation and fed into HOMER software to optimize each scenario. While this study incorporates some important and variable parameters in the model, there is no methodology for considering load uncertainties or load growth in optimization years. Optimal sizing of RESs and BSS is highly dependent on the load values. According to reviewed papers, more significant load consumption requires a higher capacity of the components. When the load growth rate is considered based on the consumer's historical load profiles, more realistic values are expected. This principle has been neglected in previous studies. [10][11][12][13][14][15][16] Some other studies emphasized both electrical and thermal load consumption of hybrid energy systems. [17][18][19] In real-world applications, residential households require both electrical and thermal power. Hence, a hybrid energy system that serves thermal and electrical loads is essential for the residential sector. In Ref. 17, the authors proposed an off-grid hybrid system for supplying electricity and thermal loads in Australia's five climate zones. They found that the combination of PV/WT/BSS/micro gas turbine has the least cost of energy (COE) for all the zones. However, this study lacks any methodology for considering electrical/ thermal load growth rates for multi-year optimization of hybrid energy systems. In Ref. 19, a similar hybrid system is proposed to supply both electric and thermal load demands. The authors investigated two different energy management strategies available in the HOMER software, ie, load following and cycle charging. Also. According to their assessments, both strategies were found effective in the optimal operation of resources. The proposed system is also analyzed in both grid-connected and off-grid modes. They examined system performance under different thermal to electric load ratios. They found that increasing thermal to electric load ratio led to lower NPC and COE at the cost of lower renewable fraction and higher CO 2 emissions. This study neglected load and electricity price growth rates in simulations. In Ref. 20, HOMER software and genetic algorithm (GA) were compared to optimize a hybrid system including PV/WT/BSS/resistive boiler. The GA optimization technique indicated that the suggested system is highly reliable (99.92%) while supplying the thermal and electric loads. Another study 18 assessed both electrical and thermal load profiles for optimization of a rural area in Iran. They found that PV/WT/biogas is the most economical configuration. On the other hand, utilizing BSS and fuel cells was not financially beneficial despite their ability to increase the system flexibility. This study also neglected to consider thermal and electrical load growth rates.
Very few studies considered load growth rates in the planning of hybrid energy systems. 21,22 The authors of Ref. 21 considered a fixed electrical load growth rate based on a simple assumption. Considering a fixed rate may not be accurate enough because, as illustrated in Figure 1, load consumption has an upward trend in the country. The recent paper 22 is the other study that considered electrical load growth rate more efficiently. Using four years of historical load data, they forecasted seven years of load demand by utilizing multi-layer perceptron artificial neural networks. The authors considered a fixed rate by the average of the predicted peak values. While optimization results indicated the effectiveness of the assumed load growth rate (compared to the case with no load growth rate), a fixed rate may not efficiently lead to accurate results. To the authors' best knowledge, while a few papers considered the annual electrical load growth rate in literature, the thermal load growth rate has not been considered in the previous works. Hence, utilizing such an important factor could improve optimization results.
Another important factor that needs to be considered in the optimal planning of grid-connected hybrid energy systems is the annual electricity price growth rate. Generally, residential electricity price in different countries of the world increases annually. In a particular case, the MOE of Iran recently legislated to consider a fixed annual 7% increase in residential electricity price. 23 Neglecting such an important parameter in optimal planning of hybrid energy systems may deviate optimization results from realistic values, especially in the residential sector. Because it is less beneficial to buy electricity from the grid as the price dramatically rises after a few years. Recent studies in this field have neglected to consider the annual electricity price growth rate. 5,18,24 Authors in Ref. 5 analyzed a renewablebased system for eight climate zones of Iran. They proposed an electricity pricing strategy according to the tariffs defined by the MOE of Iran. While the presented model was adequate, the annual electricity price increase was not regarded in the proposed strategy. Both 18,24 also suggested an optimal hybrid energy system for grid-connected residential areas. However, they neglected to consider the electricity price growth rate in their studies. Therefore, it would be more beneficial to consider the annual electricity price in the multi-year optimization.
In this paper, dynamic planning for a hybrid energy system is proposed to supply electric and thermal loads of a residential household in Tehran, Iran. The contributions of this paper are summarized as follows.
1. Unlike previous techno-economic work performed in Iran, this paper proposes a hybrid energy system including MGrid/PV/WT/BSS/converter/FC/DG/resistive and fuelfired boiler supplying electric and thermal load demands. 2. In contrast to the reviewed research works, 10-16 this paper considered both electric and thermal load growth rates using an efficient peak load forecasting method. 3. Annual electricity price growth has been considered based on the rate defined by the MOE of Iran, which was neglected in previous research works. 5,18,24 4. A simple degradation rate has also been assumed for the SPV system to get more realistic SPV system modeling. 5. Grid-connected and off-grid operating modes are technoenviro-economically compared. Emission production of MGrid and fuel-based components are also analyzed in this study.
Four case studies are proposed to have a better understanding of each dynamic planning of hybrid energy systems. Optimization results are analyzed and compared with some of the studies in the literature. Finally, some suggestions for future works have been recommended.

| METHODOLOGY
In this section, the mathematical formulation of the implemented load prediction method and components of the hybrid energy system is presented. Afterward, the optimization method is explained, and the proposed strategy for linking forecasted data to the optimization tool is discussed.

| Load prediction method
Predicting upcoming annual peak load values from the previous years' annual peak load values is a practical and efficient way to calculate yearly load growth rates. 22 The steps for predicting load peak values are indicated in Figure 2. While there are a number of classical and computational intelligence (CI)-based methods to predict annual peak load values, exponential smoothing is an efficient and simple-toimplement method. According to the assessments by Ref. 22, the prediction accuracy of the exponential smoothing method in comparison with complex methods like artificial neural networks is fairly satisfying. Hence, utilizing the exponential smoothing method could be beneficial because firstly, it is a simple-to-implement method and other researchers in the field can efficiently perform the proposed methodology of this paper; secondly, in contrast to complex methods, exponential smoothing is eased from heavy computational burden through efficient mathematical computations.
Generally, exponential smoothing is a process for revising a prediction based on the recent experience in a continuous way. This method designates exponentially decreasing weights as the observations become older. To put it another way, most recent observations have moderately more weights in prediction than the older observations. 25 In this paper, a double exponential smoothing is used for predicting electrical and thermal load data. This type of exponential smoothing is employed when the data indicate a trend. In addition, as two components of the methods, trend and level should be updated each period. Trend and level are smoothed estimates of average growth and the value of the data at the end of each period. The following formula is used for modeling double exponential smoothing. 25 where S t is smoothed statistic and α represents data smoothing factor. Also, b t is current observation and β is trend smoothing Step 1 S tep 2 Step 3 Step 4 factor. According to Equation (3), f t+m is the estimation of the value of y t+m at time m > 0 according to the raw data up to time t.
This paper has used the forecasting function in Microsoft Excel 2019 to create exponential smoothing predictions based on historical peak load data. It is an efficient method for forecasting time-series values. The Exponential Triple Smoothing (ETS) function, which predicts future values based on the exponential smoothing algorithm, is used in this study. More accurately, the function predicts a future value based on the AAA version of the ETS algorithm. The "AAA" abbreviates additive error, additive trend, and additive seasonality. Insignificant deviations in data trends are smoothed out by detecting seasonality patterns and confidence intervals. ETS method is very flexible and is supported by several analyses and practical applications like salinity rates and groundwater levels, 26 COVID-19 trends, 27,28 and sales of console games for the Italian market. 29 To perform prediction using ETS function, three types of data are required. The first is the target data, the data point for which to forecast a value. It can be represented by a number, date, and time. The second type of data is the value. Values include a range or array of historical data for which we want to forecast future values. The third type of required data is a timeline, an array of dates, times, or independent numeric data with a constant step between them. Seasonality is the other optional data that is used for data with seasonal patterns. 30

| Components of the hybrid energy system
In most recent studies conducted in Iran, the system design consisted of renewables (SPV and WT systems), DG, BSS, and electric load. [10][11][12][13][14][15][16] Mostly, they ignored to consider thermal load and thermal energy supply in their studies. Therefore, it would be more realistic to consider the thermal consumption of residential households in technoeconomic optimization. The proposed design configuration of the hybrid energy system includes renewables (SPV and WT systems), DG, BSS, electric and resistive boilers, FC, and electric and thermal loads. This design is suitable for supplying both the electric and thermal loads of the consumer. Using the resistive boiler, the excess renewable generation can be converted to provide thermal load. This would lead to lower emission production. The optimal system configuration combines components with minimum NPC to meet electric and thermal load demands considering technical and economic constraints. Figure 3 shows the architecture of the understudy hybrid system. The proposed hybrid system includes eight major components: SPV and WT systems as RESs, converter, BSS, fuel-fired boiler, resistive boiler, FC, and DG. SPV and BSS are connected to the DC bus, while other electrical sources are connected to the AC bus of the system. All the utilized components are described in the following subsections. In the proposed structure, the resistive boiler is able to convert excess electricity from RESs (ie, SPV and WT systems) to thermal energy that could be used to supply the thermal load of the system.

| SPV system
SPV panels produce energy using the energy emitted from the sun. However, these resources are intermittent by nature and do not generate electricity at night when solar irradiance is not available. 31,32 According to previous investigations, 33 SPV systems are potential RESs for utilizing in Iran because this country benefits from an annual average of more than 280 sunny days covering more than 90% of its territorial lands. The output power of the SPV system is calculated using the following Equations (4)-(5). 34,35 2.2.2 | WT system WT systems generate electricity from the environment's wind energy. The development of WT systems is one of the priority research goals in Iran. There are a number of wind farms in suitable regions like Manjil and Binalood wind farms. In this paper, the WT system is also used as a potential RES for the hybrid energy system. The converter is used for converting DC power by the WT system to AC power used for supplying electric load demand. The output power of the WT system is calculated using Equation (6) as follows. 15

| BSS
BSSs are the backup energy sources that can store electricity during the surplus generation of RESs and inject it back to the system whenever it is essential. Since these resources do not produce emissions, they could be a suitable replacement for other backup resources like diesel generators, producing greenhouse emissions. 37 The output of the BSS is calculated using the following Equation (7). 38

| Converter
Electric converters are utilized for exchanging AC/DC and DC/AC power in hybrid energy systems. These units are essential when RESs and BSS are used in the system because they generate DC power while electric load needs AC power. Therefore, a bidirectional converter is considered in this study. The considered converter consists of a rectifier and inverter to convert DC to AC power and vice versa. Their efficiency can be described as follows. 5

| GasGen
In this paper, a typical gas generator (GasGen) is also considered for the proposed hybrid system. While traditional generators like diesel generators produce a large number of emissions due to the type of fuel consumption, GasGens are able to save a significant amount of greenhouse emissions. Equation (10) is used for modeling the fuel consumption rate of a GasGen. 39

| FC
Another auxiliary component of the proposed hybrid system is the fuel cell (FC). The utilized FC produces hydrogen directly from natural gas using an internal reforming process. Then, it converts hydrogen to electricity through a chemical reaction in which the hydrogen is oxidized, and electricity is generated. 40

| Resistive and fuel-fired boilers
A resistive boiler is a type of electric boiler energized via the excess electricity produced by the RESs. It permits a lower capacity of the system; thus, less CO 2 will be produced. This paper takes the heat recovery option into account. This option allows for supplying the thermal load demand whenever it is available. Nevertheless, this system only works under the condition that electric load demand is enough to run FC and GasGen. The rest of the thermal load demand is supplied by the fuel-fired boiler. The optimization tool assumes a fuelfired boiler for the water heating is an integral part of the residential building, thus requires no costing. 17

| Optimization method and energy management strategy
In this study, HOMER software is used for optimizing the proposed hybrid energy system. According to Ref. 41, HOMER software has an appropriate speed and accuracy for the optimization of hybrid energy systems. In a recent study, 42 researchers compared optimization results of HOMER software with the metaheuristic algorithms such as PSO and artificial bee colony (ABC). They concluded that the simulation results of metaheuristic algorithms lead to the same system configuration as HOMER. The implemented algorithm in the HOMER uses a nonderivative optimization to recognize the lowest-cost system among hundreds of design options. HOMER implements multiple optimizations under a range of input presumptions to evaluate the effects of uncertainty or changes in the model inputs. 43 Using heuristic methods for optimization is associated with considerable challenges. For instance, parameter tuning is a challenge in these methods because it is problem-dependent and should be tuned by the decision makers. Furthermore, heuristic methods are Architecture of the understudy hybrid energy system | 1319 QIU and FaRaJI typically computationally expensive. To put it differently, it takes a long time for the decision makers to run the simulations. This makes heuristics inappropriate for real-time applications. In addition to this, it would not be straightforward to check if the achieved solution is globally optimal or not. 44 Therefore, HOMER is used in this paper for further investigations and analyses. In HOMER, optimization of scenarios is performed based on a main economic parameter called net present cost (NPC). While net present value (NPV) might be a suitable term when grid sales are considered, HOMER software calculates system cost according to NPC. According to the definition, 40,45,46 the NPC of each component is the present value of all costs (ie, capital, replacement, operation and maintenance (O&M), fuel costs) minus all the revenues (MGrid sales and salvage values) during its lifetime. The objective function of the HOMER for optimizing system configurations is shown as follows. 47,48 It can be seen that C ann , the annual cost of the systems, is calculated based on the NPC of the system. Therefore, the dependability of the optimal configuration to the NPC is evident from the Equations (11)- (14).
The COE is another important criterion for determining the cost-effectiveness of the system. Equation (15) calculates the COE based on the annualized cost of the system. The COE is the average cost per kWh of useful electrical energy produced by the system. Therefore, the cost of the boiler thermal energy should be subtracted from the annual cost of the system. 17,18 The software also calculates the salvage cost of the system, which is the remaining value of each component after the operating years of the system. The salvage value of the components is considered as a revenue of the system. HOMER also calculates renewable penetration of the system as another important simulation output. Penetration refers to the percentage of electricity produced by a particular energy source. Renewable penetration is computed by dividing the total RES generated power by the total electric load supplied. The following Equations (16) and (17) are used for computing the salvage value and renewable penetration of the system, respectively. 47 There are two important energy management strategies in the software, ie, load following strategy and cycle charging strategy. 40 In this paper, the load following strategy is used for the simulations. According to this strategy, whenever the controllable power resources such as generators, grid, and BSS operate, they produce only sufficient power to supply the primary load demand. There are lower-priority objectives, charging the BSS or serving the deferrable load left to the RESs. Figure 4 shows the flowchart of the examined load following the energy management strategy for the grid-connected mode. During the simulations, the software searches for the best combination of dispatchable energy sources to serve the electric and thermal loads at the lowest marginal cost. The marginal cost of the MGrid is equal to the present electricity price. The MGrid's marginal cost can also change according to the electricity price because it varies from hour to hour. This is a critical system condition because HOMER may choose to run a dispatchable source only during higher price rates when the electricity price exceeds the cost of dispatchable sources. In gridconnected mode, excess electricity can be converted to thermal energy (through resistive boiler) or sold to the MGrid by the FiT defined by MOE of Iran. Therefore, HOMER chooses the cheapest approach based on the lowest marginal cost of components. However, in stand-alone mode, excess electricity can fully be converted to thermal energy because grid choices are omitted. Since the FiT is far greater than electricity price rates (even from peak price value), higher economic benefits could be obtained if the whole RESs generated electricity was sold to the MGrid, and the load demand was supplied by the MGrid. 5,49 However, the energy management strategy implemented in the HOMER (load following) does not follow this assumption. The generated electricity is used to supply electrical load first. Then, the surplus electricity is sold to the MGrid or stored in the BSS based on the marginal cost.

| Site location and meteorological data
The understudy system is a residential household located in Tehran, Iran. Tehran is the capital and the most populated city in Iran. Figure 5 shows the location of the site on the map of Iran. Figure 6 also illustrates meteorological data, including wind speed, ambient temperature, and solar radiation over the months of the year. The data is collected from NASA Surface Meteorology available in the software environment. According to Figure 6A, the site has good wind potential during the year. However, significant potential can be observed during the summer months. The site also has a moderate temperature and solar radiation over the year. As can be seen in Figure 6B,C, the maximum daily temperature is below 30°C, and solar radiation hardly obtains its peak value at 0.95 kWh/m 2 /d.

| Economic and technical data
In order to have adequate planning for the hybrid energy system, it is essential to consider objective economic and technical data. In this study, important economic parameters, such as interest and inflation rates, are considered 18% and 16.18%. 5 Project lifetime and SPV degradation rate are assumed 25 years and 1%/year, respectively. 47 Also, the carbon content of natural gas and fuel price are considered 67% and 0.3 US$/m 3 , respectively. Table 1 also shows the economic and technical specifications of the system's components. More detailed information regarding the components of the hybrid system can be found in Refs. 17,47. Table 2 shows emission production by the fuel-based resources. 19,40,50 According to this table, whenever DG and FC are operated, they produce greenhouse gas emissions. All the generators including DG and FC and also electric boiler consume natural gas to produce energy. The fuel properties of natural gas are described as follows. Lower heating value is considered 45 MJ/kg. The density and carbon content are considered 0.790 kg/m 3 and 67%, respectively.

| MGrid
This study assumes that the understudy system is connected to the national grid. Therefore, electricity price and FiT rate are both considered in this study based on the tariffs defined by the MOE of Iran. The scheduled rates based on Iranian electricity prices are depicted in Figure 7. 43,47 As illustrated, there are three different rates during a day: off-peak, midpeak, and peak rates. These rates are defined to incentivize consumers to shift their power consumption from peak times to mid/off-peak times. The MOE of Iran is also responsible for buying surplus generated electricity from the consumers based on the defined FiT rate. 5 Therefore, the understudy hybrid system can have some revenues from selling electricity to MGrid. Moreover, MGrid interconnection charge is considered as 23.53 US$. 22 Annual electricity price growth entered as 7%/ year according to the recent legislation of MOE. 23 According to Ref. 47, the Iranian national grid is followed by random outages annually. Hence, five random outages with a duration of 30 minutes are applied in this paper. Figure 8 shows the generated random outages over the year. During grid outage, RESs and dispatchable resources are responsible for meeting the system's electric load demand. In addition to grid outages, grid emissions are also considered in this paper. Table 3 indicates the values of the grid emissions according to the Iranian national grid. 43 2.4.4 | Electric and thermal load demands In this paper, two different load types, ie, electric and thermal loads, are considered for further simulations. Figure 9 shows monthly profiles of the electric and thermal load data for the year 2018. It can be seen from Figure 9A that electric load consumption increased in warm months of the year, and the peak month is September. According to Figure 9B, thermal load consumption increased in cold months of the year, when the consumer needs to use natural gas for heating purposes. In contrast, it can be observed that the warm months of the year had the least thermal consumption. In order to have a proper load prediction, it is essential to have historical load data. Therefore, historical load data for the last ten years (from 2009 to 2018) in hourly time steps are collected in this study. Figure 10 shows hourly historical data for electric and thermal loads used for annual peak load prediction of the upcoming years. It is evident that the consumer demands for both electric and thermal loads have an upward trend. Therefore, neglecting consumers' load growth rate for long-term planning could be followed by deviations from realistic results. In the fixed growth rate method, an average growth rate based on the past two-or three-years peak load data is taken into account. No load prediction is performed in this method, and the fixed growth rate will be used in the multi-year inputs. HOMER will use this fixed rate as year-by-year percentage growth in the load. However, in the proposed method, exponential smoothing is used to predict upcoming values based on historical data. The main difference is that a simple fixed rate is not used in the proposed method, but a series of predicted rates are used in the software. In fact, predicted rates are used instead of an average rate based on historical data.
The load data is collected by in-person attendance to the Tehran Power Distribution Company (TPDC). 51 The data has been thoroughly analyzed. Some important statistical values for electric and thermal loads are shown in Table 4. There were about 123 and 98 missing data for electric and thermal data, respectively. Using the mean substitution technique, 52 the substitute mean value of the load data is used in place of the missing data value for that same load. This is because the mean is a reasonable estimate for a randomly selected observation from a normal distribution. The outliers due to the measurement error have been replaced with the mean value of the same data for further analysis.
The overall process of the proposed method can be observed in Figure 11. In the first part of the method, load prediction is performed based on the previous annual peak load values. Then, predicted peak values are applied to the software for optimizing the hybrid energy system. As mentioned before, the optimization of the problem is based on an economic objective function. Therefore, output configurations of the software are categorized based on the minimum NPC of the systems.

F I G U R E 5
The location of the understudy residential system on the map of Iran

| RESULTS AND DISCUSSION
In this section, optimization results are presented and discussed accordingly. Therefore, four case studies are introduced to analyze the behavior of the system based on different load growth rates and grid connection modes. The introduced case studies are as below.
• Case 1: Optimal static planning of the grid-connected hybrid energy system neglecting load growth rate. 5  • Case 2: Optimal dynamic planning of the grid-connected hybrid energy system considering a fixed load growth rate. 21 • Case 3: Optimal dynamic planning of the grid-connected hybrid energy system considering the proposed method for load growth and electricity price rates. • Case 4: Optimal dynamic planning of the off-grid hybrid energy system considering the proposed method for load growth rates.
The overall structure of the study based on the proposed case studies is shown in Figure 12.
In this study, a private computer (PC) with the following specifications was used to conduct the simulations: 8 GIG-RAM, Core i5 CPU, and ×64 bit OS. In addition, HOMER software version 3.11.2 was installed on the PC.

| Case 1
In this case study, the static planning of the grid-connected hybrid energy system is performed by neglecting the load growth rate. The proposed hybrid energy system is optimized using electric and thermal load profiles presented in Figure 9. Also, the electricity price growth rate (7%/year) and the SPV degradation rate have been neglected, similar to previous studies in the field. 5,11 Optimization results of the system, including optimal sizing and economic costs of the system, are presented in Table 5. It can be seen that the optimal system consists of a 15 kW WT, a 10 kW resistive boiler, and a 10 kW converter. Also, the fuel-fired boiler is equipped in all of the configurations. Based on the results, the utilization of the SPV system has not been economical in grid-connected mode. This result according to the local solar potential and cost of the panels. BSS, FC, and GasGen were found uneconomical mainly because MGrid was a cheaper approach to the electric power supply. It can be seen that the NPC of the optimal system is achieved −11 383.4 US$, which shows the profitability of the configuration. The utilization of BSS (10 kW in the second configuration) in the second configuration worsens the economic results, especially the NPC of the system (an increase of 2432.32 US$). Configuration 3 with 10 kW FC and configuration 4 with 10 kW GasGen also demonstrate that the application of backup resources in grid-connected operating mode could not be economically feasible because the available capacity of the WT system and MGrid can provide sufficient power to the consumer's load demand. Figures 13 and 14 show the electric and thermal power provision for the optimal energy system. According to Figure 13, the WT system is the primary energy production source, and most of the load demand is supplied with the WT system. The T A B L E 1 Economic and technical specification of the system components 17 MGrid contributes to electrifying the system load when the generated power of the WT system is insufficient. Figure 14 shows thermal power provided by the fuel-fired and resistive boilers. It is clear that the particular amount of the WT surplus generation was converted to thermal energy by the resistive boiler. However, the fueled-fired boiler is the primary source of energy for supplying the thermal load of the consumer. The operating hours of the resistive boiler were around 506 per year, while the fueled-fired boiler operated around 8462 hours/y.

| Case 2
In the second case study, dynamic planning of the gridconnected hybrid energy system is performed using a fixed growth rate (based on the previous two-year peak load values) for each thermal and electric load profile. Figure 15 shows the extracted peak values for electric and thermal loads from 2016 to 2018. The average growth rates are calculated as 1.889%/year and 2.0495%/year for electric and thermal loads. While the annual SPV degradation rate has been considered in this case study, the electricity price has been neglected, similar to the previous study.
Optimization results for the second case study are represented in Table 6. The optimal system includes MGrid, WT system (15 kW), converter (10 kW), resistive, and fuel-fired (10 kW) boilers. Since the system is connected to the MGrid, the utilization of BSS (10 kW), GasGen (10 kW), and FC (10 kW) did not provide economically. The optimum system benefits from the WT system for generating renewable energy. Economic results created significant differences between the current case study and the previous one. While the initial cost of both case studies for the optimum configurations achieved 15 212.93 US$, the NPC of the optimum hybrid system increased significantly in Case 2 (5542.951 US$). This increase shows the severe impact of the load growth rates in the economy of the system.
To get a better understanding of dynamic planning results, Figures 16 and 17 are provided. Figure 16A shows monthly load values over the 25 years. An upward trend can be seen from the monthly load patterns due to considering the load growth rate. The increase in load values forced the system to buy more electricity from the MGrid as going further to the last years ( Figure 16B). This is mainly because of the constant generation of the WT system over the project horizon ( Figure 16C). In fact, most of the generated power of the WT system should be used for supplying load demand. This leads to lower renewable penetration of the system.  Figure 17 indicates annual and monthly values of thermal demand and supply of the optimum system. Similar to electric load demand, an increasing trend in total values of thermal load demand can be seen over the project horizon ( Figure 17A). Figure 17B shows monthly values for fuelfired boiler power provision. It is clear that the fuel-fired boiler is the primary source. Still, the resistive boiler operates in some hours of the year, especially when there is significant renewable power. Figure 17C shows annual operating hours as well as the maximum output power of the resistive boiler. Since the resistive boiler converts surplus power of the WT system to thermal energy, there is a meaningful link between electric load demand and the output power of the resistive boiler. In other words, most of the generated electricity by the WT system is spent to supply electric load demand, and the excess electricity decreases significantly over time. Therefore, it can be observed that the resistive boiler maximum output power has a falling trend compared to the fueled-fired boiler, which is available over the project horizon.

| Case 3
In Case 3, dynamic planning of the grid-connected hybrid energy system is performed using the introduced method for load growth and electricity price rates. Relying on the previous two-year peak load values may deviate optimization results from realistic ones. Therefore, it is wiser to consider load growth rates based on future trends. As illustrated in Figure 18, historical peak load values (10 years) are used for predicting future trends of the load values. It is clear that thermal load demand is sharply increasing over the years while electric load demand is steadily growing year by year. The electricity price growth rate has also been considered in this case study (7%/year).
The STAT function returns a particular statistical value relating to a time series ETS forecasting. Using this function, it is possible to indicate different statistical values. Some essential criteria shown in this study are as follows. 30 α (constant base value): The smoothing value between [0,1] that controls the data points weighting.  Table 7 shows the statistical value relating to electric and thermal loads prediction.
Optimization results for the third case study are indicated in Table 8. Similar to previous cases, the optimum system configuration consists of the WT system (15 kW), resistive and fuel-fired (10 kW) boilers, and converter (10 kW). It

| 1327
QIU and FaRaJI is clear that utilizing 10 kW BSS is more economical than 10 kW FC or 10 kW GasGen. In addition, it is utilizing two backup resources like GasGen and BSS or BSS and FC, both with 10 kW capacity. As a remarkable result, it was found that the growth in the electricity price rate does not affect the configuration of the system. Therefore, it can be concluded that purchasing electricity from MGrid has more economic merits than adding proposed hybrid components to the system. While configuration remained unchanged, the economics of the system has been changed. The NPC and COE of the system are increased by considering forecasted load growth rates. Therefore, realistic values for NPC and COE (compared to previous case studies) could be −5243.956 US$ and −0.0162272 US$/kWh. Dynamic planning results are indicated in Figures 19 and  20. As can be seen, the electric load is increased by considering load growth rates ( Figure 19A). This increased average electricity purchases from the MGrid ( Figure 19B) because WT output power is constant over the years, but renewable penetration decreases annually. Figure 20 indicates the monthly and annual thermal power supply/demand of the optimum system. Figure 20A shows monthly thermal load values after applying growth rates. The fuel-fired boiler is the major supplier of the thermal load demand (Figure 20B), while the resistive boiler supplies whenever there is surplus electricity by the WT system. Figure 20C shows annual operating hours and the maximum output power of the resistive boiler.

| Case 4
In the last case study, dynamic planning of the off-grid hybrid energy system is performed using the introduced method for load growth rates. Table 9 shows the optimization results for the fourth case study. It can be seen that both configurations and economics of the optimal system are entirely different from other cases. Due to the lack of MGrid, other components like BSS and GasGen are utilized in the optimum system configuration. As can be seen, both BSS and GasGen have 10 kW power capacity. These two backup sources supply electric load demand during the hours when the WT system could not fully supply the load demand. The capacity of the WT system and consequently the converter is reduced mainly because two backup resources are available in the system. The new capacities for both WT system and converter are achieved 5 kW. It can be seen that other configurations also benefit from backup resources. Configuration 2 includes a 30 kW BSS; configuration 3 consists of a 10 kW FC and a 20 kW BSS. It can be seen from the last two configurations that utilizing SPV (5 kW) would decrease the economic profits of the system. Resistive and fuel-fired boilers are also included in the optimum system.
The financial results of the system are quite different from the previous cases because of the positive values for NPC and COE of the system. Since the hybrid system is operating in stand-alone mode, grid revenues have not been considered in simulations. Therefore, the only revenue of the system is salvage value which is not significant compared to grid revenues. It can be concluded that electricity sell-back to the MGrid has a major effect on the financial results of the system. Figure 21 shows the dynamic planning results of the stand-alone system. Figure 21A shows monthly load values based on the load growth rates. Figure 21B indicates the output power of GasGen over the project lifetime. It is evident that the need for electricity is increasing over the years. Figure 21C illustrates the charging and discharging power of the BSS. As can be seen, the BSS contributes to the system power provision. This contribution is more significant in the final years of the simulation. The BSS state of charge (SOC) had a decreasing trend over the years ( Figure 21D) because of the declining trend of renewable penetration ( Figure 21F). This remarkable result shows the importance of the BSS utilization in stand-alone hybrid energy systems, which helps the system avoid capacity shortage. Figure 22 shows the monthly thermal supply/demand of the optimum system. The thermal load demand is identical to the previous case study ( Figure 22A). As mentioned before, the GasGen is able to produce electrical and thermal energy. Figure 22B indicates the monthly thermal supply by the GasGen. As the load demand increases over the years, the  power provided by the GasGen unit rises as well. Similarly, the fuel-fired boiler has an increasing trend of power supplying ( Figure 22C). However, the share of fuel-fire boiler is much more remarkable than the GasGen in thermal power provision. In contrast to GasGen and fuel-fired boiler, resistive boiler loses its large share of thermal power provision as the surplus power by the WT system decreases over the years.

| Emission production comparison
This subsection analyzes the emission produced by the optimum system of each case study. Emission productions, according to the simulation results, are illustrated in Table 10. Generally, the MGrid and electric boiler are the primary emissions production sources for the first three case studies. Due to the off-grid operating mode, DG is replaced with the MGrid in case four. For generators like DG and FC, carbon monoxide (CO), nitrogen oxides (NO X ), and particulate matter (PM) are the main pollutants. And for MGrid, carbon dioxide (CO 2 ), sulfur dioxide (SO 2 ), and nitrogen oxides (NO X ) are the main pollutants. Greenhouse gas emissions of the mentioned pollutants generally result from the consumption of the MGrid electricity, thermal energy production by the electric boiler, and electricity production by DG. HOMER models DG, FC, and the electric boiler emissions identically because they consume fuel of known properties. However, HOMER models the MGrid differently. For generators like DG and FC, the software determines the emission factor (kilogram of pollutant emitted per unit of fuel consumed) for each pollutant before simulating the power system. After the simulation, the software computes the annual emissions by multiplying the total annual fuel consumption by the emission factor. The software calculates the net MGrid purchases in the grid-connected simulation, equal to the total MGrid purchases minus the total grid sales. By multiplying the net MGrid purchases (in kWh) by the emission factor (in g/kWh) for each pollutant, the emissions of each pollutant associated with these net MGrid purchases are calculated. 40 As can be seen from Table 10, the cases with multi-year optimization have the highest amounts of emission productions. Therefore, Case 1 has a minimum quantity of emissions production compared to other cases. However, the results of Case 1 are not reliable because, as mentioned in the text, load growth rates are not neglectable. It is clear that the proposed hybrid energy of this study in Case 4 emitted fewer emissions than the other two cases. Therefore, it can be concluded that proper consideration of load growth rates would significantly affect the system's emissions. It is remarkable that Case 4 emitted a large number of emissions while it was disconnected from the MGrid. Regarding the produced emissions, the GasGen unit was the main contributor. Therefore, the proposed system in Case 4 had realistic results regarding both economic and environmental aspects. In this study, four case studies are introduced. Case 3 is based on the proposed method of this paper, and Cases 1 and  systems considering load growth rates. The off-grid operating results indicated that the system configuration and economic costs are positively affected by the load growth rates.
The NPC and COE, as well as greenhouse gas emissions, were significantly increased.

| CONCLUSIONS
In this paper, dynamic planning of a hybrid energy system, including MGrid/PV/WT/BSS/FC/DG/resistive boiler/ fuel-fired boiler, is performed for a residential household in Tehran, Iran. Since the consumer load demand has an upward trend over the years, electric and thermal load growth rates are considered in this paper. Electricity price and PV degradation rates were also considered in the simulation.
Considering the proposed growth rates led to realistic optimization results. The optimum configuration was achieved as MGrid/WT (15 kW)/resistive boiler/fuel-fired boiler (10 kW)/converter (10 kW). By ignoring electric and thermal load growth rates, the financial results were severely affected. In this regard, NPC and COE are achieved −11 383.4 US$ and −0.02376 US$/kWh. It was found that considering load growth rates ultimately increased annual load consumption. Therefore, the purchasing power from the MGrid increased due to the reduction in renewable penetration. None of the proposed backup resources were found to be economical in gridconnected mode. The fuel-fired boiler was the primary source of thermal power provision. However, resistive boiler incorporated in system power supplying whenever there was surplus power renewable generation. To analyze grid connection impacts on the results, a case study was performed assuming stand-alone operating mode. In contrast to the grid-connected system, the BSS (10 kW) and GasGen (10 kW) were economical to be utilized in stand-alone operating mode. However, GasGen contributed to greenhouse gas emissions even more than MGrid with about 8262.9238 kg more CO 2 emission productions. In addition, more contribution by the resistive boiler could be observed in stand-alone mode.
Electricity sell-back to the MGrid (base on feed-in-tariff) was the primary revenue of the optimum system. The NPC and COE of the optimum grid-connected system achieved −5243.956 US$ and −0.0162272 US$/kWh, respectively. However, the NPC and COE of the optimum stand-alone system obtained 47 024.19 US$/kW and 0.1983879 US$. The electricity price growth rate did not change the system configuration. In other words, it was still economical to buy electricity from the MGrid than adding different components. The FC, due to higher initial cost, was not economical in none of the on/off-grid operating modes. The proposed hybrid system has the potential merits of supplying electric and thermal loads. Nevertheless, further investigations are warranted to examine the impacts of integrating thermal energy storage into the sizing of the components.    WT output power (kW) P t,BSS BSS output power (kW) P INV,OUT inverter output power (kW) P REC,OUT rectifier output power (kW) P AC , P DC AC and DC power (kW) P Gen electrical output of the generator (kW) P t,elec electric power demand (kW) P t,ther thermal power demand (kW) P t,RES total renewable energy power (kW) P t,net net power (kW) P supp,min supply power of FC and/or GasGen (kW) p RES renewable penetration [%] S t smoothed statistic