1 Introduction

In today’s world, electric transportation is being developed as a satisfactory solution to the problem of air pollution in large cities. Among these modes of electric transportations, electric trains have always been renowned for their high speed, the large volume capacity of freight and passenger, and zero-emission. These trains receive their required electricity from the third rail or overhead catenary system (OCS) which comes from a traction power supply substation (TPS). These TPSs are met by fossil fuel power plants which are polluting the Earth’s atmosphere by producing greenhouse gas emissions in a place far from the cities [1]. On the other hand, fossil fuel resources have been depleting and this has been leading to an increase in their price. These two economic-environmental contributors have made renewable energies as an alternative to fossil fuel resources [2].

Renewable Energy Systems (RESs) are often combined together or with backup units, such as grid, diesel generator, or storage systems, in order to increase their efficiency and strength the weaknesses of each other like unreliable output power of wind turbines and solar cells [3,4,5]. This integration is called Hybrid Renewable Energy Systems (HRESs) [6]. Among these, batteries commanded a great deal of attention in published articles [7,8,9,10,11]. After that, pumped hydro storage (PHS) is utilized to support the output power of RESs [12, 13] and finally, fuel cells have been proven to be not economical yet [10, 14,15,16]. Conversely, there are some articles in which diesel generators [16,17,18,19] or grid [9, 20, 21] play the backup role in HRESs. Although these backups produce reliable and inexpensive power, they are usually criticized because of their environmental unfriendliness.

Operating together in order to meet an electrical load, these sources are faced a challenge of finding the optimum size of each component. HRESs are usually sized according to their reliability, emissions, economic qualities, and fuel flexibility [22,23,24,25]. Therefore, there is a list of criteria for finding the optimal size of each component of a HRES that Luna-Rubio et al [26] and Emad et al [27] have tried to study all of them. Most of these criteria are in terms of reliability or economy [28]. The most important criteria that lay in reliability category are: Loss of power supply probability (LPSP) [29, 30], the State of Charge (SOC) of the storage unit [31], Level of Autonomy (LA) [32], and Expected Energy Not Supplied (EENS) [33]. On the other hand, the economic criteria include: Levelized Cost of Energy (LCE or COE) [30, 34,35,36] total Net Present Cost (NPC) [37] (some papers have preferred to use the negative form of NPC which is called Net Present Value or NPV [38, 39]), and the Total Annualized Cost of system (TAC) [40]. Among all of these criteria, the NPC (or NPV) captures the lion’s share of optimal sizing articles.

In order to find the optimum size of a HRES component, one or more than one of these criteria could be applied. Nowadays, by developing software technology and coding, a large number of algorithms are used for optimal sizing. The objective of all these algorithms is to find the best solution to size, location, and configuration of HRES components when the applied criterion is on its optimum condition [41,42,43,44]. Today, the most common method of finding the optimum size of a HRES is to use commercial software tools. Among these tools; HOMER, HYBRID2, RETScreen, and HOGA are the most famous ones that can analyze HRESs economically and environmentally [45, 46]. The foremost of them, HOMER, has different models of wind turbines, PV module, batteries, hydro turbine, and generators that could analyze both grid-connected and stand-alone HRESs by considering NPC criterion. Bahramara et al [47] have reviewed all papers that utilized HOMER as their optimization tool. Authors of these papers have believed that using the grid as a backup is cheaper and more reliable than storage units [48]. Moreover, storage units have been implemented in remote areas for which the grid extension has not been economical [46, 49,50,51,52,53,54,55,56,57,58,59].

The other approach to reach the optimum size of a HRES is the use of population-based optimization algorithms that are more effective when all data is available and the problem is complex [60]. The most common and preliminary optimal sizing algorithms are Genetic Algorithm (GA) and Particle Swarm Optimization (PSO). The first and foremost of them is GA that is used by many authors [9, 61,62,63,64,65,66,67,68,69]. Other authors have a tendency towards using PSO as their optimization technique [19, 69,70,71,72]. Although GA and PSO are the most popular approaches for optimization, they always encounter premature convergence and their convergence rates are not thus satisfactory when dealing with some complex functions [73]. To handle this problem, many researchers employed different metaheuristic and nature-inspiring algorithms [74, 75]. The recent population-based algorithms are: the Atom search optimization (ASO) [76], Harris Hawks Optimization (HHO) [77], Coyote Optimization Algorithm (COA) [78], Multi-population Ensemble Differential Evolution (MPEDE) [79], Bird Swarm Algorithm (BSA) [80], Ant Lion Optimizer (ALO) [81], Grey Wolf Optimizer (GWO) [82] and Artificial Bee Colony (ABC) [83].

After choosing the criteria and approach of sizing, the time is ripe for proposing a HRES system and doing the simulations. Using renewable energy resources to meet a traction substation load has not been studied vastly. Only have Pankovits et al [84] proposed Hybrid Railway Power Substation (HRPS) and has utilized storage unit, solar cells, and grid to meet a traction substation load in France electrical railway system. He has done an hourly daily analysis by using GA and Sequential Quadratic Programming (SQP) to find the optimal size of HRES by an economic criterion. Eventually, it has been concluded that a 20 MW traction load needed 200,000 m2 solar cells by SQP and 221,500 m2 by GA.

According to what has been mentioned, the vanity of papers about studying the economic and environmental aspects of using renewable energies in the electric transportation sector has been revealed. Furthermore, in an oil-rich country, like the case study region, most of the electrical energy is generated by burning fossil fuels (particularly natural gas) which causes massive air pollution. Also, the ever-increasing cost of fossil fuels is leading to a rise in the price of electricity and the costs of transportation services. On the other hand, we see most published papers about optimal sizing of HRESs tended to use only one optimization algorithm and compared the obtained result with conventional ones such as GA or PSO, while this article has done a comparative study of the newest algorithms which have not been used so far in the optimal sizing problems. All these gaps sparked the idea of a comparative study of various optimization techniques for a Green Hybrid Traction Power Supply Substation (GHTPS), which includes a canopy of grid-connected solar cells above railroad with wind turbines and it is optimized based on NPC and real-time data. Thus, ASO, HHO, COA, MPEDE, BSA, ALO, GWO, ABC, PSO, and GA are separately applied to find the optimum size of the proposed system components, investigate the application of each algorithm, and evaluate the economic-environmental factors such as NPC, COE, PT, operating cost, and greenhouse gases emissions. This paper is also willing to carry out research on the effect of changing economic parameters including capital cost of wind turbines and grid electricity costs in order to survey the fluctuation in this market’s prices.

In this paper, the components of the proposed GHTPS are described in Sect. 22, Sect. 3 provides information on the simulation methods and a brief review of the optimization methods employed in this work, required data for simulations and the comparative analysis of results are discussed in Sect. 4 and Sect. 5 gives the conclusion of this project.

2 System Description

Figure 1 illustrates a typical schematic diagram of the proposed Green Hybrid Traction Power Supply Substation (GHTPS). Because of the uncertainty of solar irradiation and wind speed, a backup system is considered to operate with renewable energy sources. Power electric storages or grid can be utilized as such backup systems. In this work, the electrical grid has been opted for the backup system, due to its ability to provide low-cost and massive energy. Moreover, life cycle cost can be reduced by 40–50% in this case in comparison with using storage units [85, 86].

Fig. 1
figure 1

Proposed Green Hybrid Traction Power Supply Substation (GHTPS)

As it can be seen from Fig. 1, the solar cell, wind turbine and grid, as system’s backup, are the main parts of the system. Furthermore, the DC output power of solar cell converts to AC power by using an inverter in order to meet the load. All of these components operate together to supply the power of traction substation. Two different states are proposed for installing solar cells:

  1. 1

    Buying land around traction substation and installing solar cells on the ground.

  2. 2

    Utilizing available area through the path and installing the solar system above the railroad by using foundations and structures

In configuration one, the cost of buying land is imposed on the proposed system. Hence, the second form is used in the GHTPS as land charges no money.

2.1 PV Array and Converter Model

AmeriSolar AS-5 M monocrystalline module is utilized in this case study which can produce 210 W DC output power by covering an area of 1.277 m2 (1580×808×35 mm). Therefore, approximately 6.08 m2 is occupied for installing each kW of PV array [87]. Adding a large-scale PV to the grid needs a smart converter and many contributors must be factored in according to [88]. The nominal power of the converter assumed to be the same as solar cells’ nominal power.

The output power of the solar cell neglecting temperature effect can be calculated in HOMER software using the following equation:

$$P_{PV} = {\text{PVsize}} \times f_{PV} \times \left( {\frac{{G_{T} }}{{G_{T,STC} }}} \right)$$
(1)

In which, \(PVsize\) is the nominal power of solar cell and converter in standard test condition (kW), \(f_{PV}\) is Derating factor, \(G_{T}\) is the solar irradiation on the cells (kW/ m2), and \(G_{T, STC}\) is the amount of irradiation in the standard test condition. The amount of irradiation and solar cell temperature are considered to be 1 lW/m2 and 25 ℃ respectively in standard test condition when there is no wind blowing. However, the equation which is used for calculating solar cell power in MATLAB software can be expressed as bellows [40]:

$$P_{PV} = \eta \times PVsize \times G_{T}$$
(2)

In this equation, \(\eta\) is the efficiency of solar cell achieved by multiplying converter efficiency by efficiency of all of transmission wires (lines) and \(G_{T}\) denotes the irradiation level based on kW/m2.

2.2 Wind turbine model

Vestas-V82 wind turbine is used in the present study which its hub height is 80 meters high and its nominal power is 1650 kW [89]. Output AC power of this turbine is demonstrated in Fig. 2 based on wind speed.

Fig. 2
figure 2

Output power of Vestas-V82 wind turbine

Three stages must be followed in order to calculate the output power of the wind turbine:

  1. 1

    Firstly, wind speed in anemometer height converts to hub height using the following equation:

$$\frac{{V_{hub} }}{{V_{anem} }} = \left( {\frac{{Z_{hub} }}{{Z_{anem} }}} \right)^{a}$$
(3)

where \(V_{hub}\) is wind speed in hub height, \(V_{anem}\) is wind speed in anemometer height, \(Z_{hub}\) is turbine hub height, \(Z_{anem}\) is anemometer height, and \(a\) is power-law exponent which equals 1/7 (=0.143) for turbulent flow over a flat plate based on fluid mechanic calculations. It depends on the season, temperature, terrain roughness, environment, and several other parameters.

  1. 1

    In this stage, the output power of the wind turbine is calculated according to power-wind speed curve of the turbine shown in Fig. 2.

  2. 2

    Calculated power in the previous step multiplies by air density coefficient. The coefficient is air density ratio which specifies the ratio of real density to air density in standard condition (sea level and temperature of 15°C in which air has a density of 1.225 kg/m3). This coefficient is extracted from Fig. 3 regarding altitude.

    Fig. 3
    figure 3

    The relationship between altitude and air density ratio proposed by [90]

3 Methodology Description

In this paper, two measuring methods are used to determine the optimum size of the grid-connected hybrid system. The first method implements HOMER and the second one is conducted by different population-based optimization algorithms in MATLAB environment. All of the calculations are done in the total hours of a year, which means in every 24 h of 365 days of a year (8760 points).

3.1 Homer

Hybrid Optimization of Multiple Energy Resources (HOMER) has been developed by National Renewable Energy Laboratory (NREL) [90]. This software performs the simulations based on the input data which receives from the user and the internet. The data includes solar irradiation and wind speed in a specific region (which can be downloaded from NASA website based on location data), demand data, system installation cost (including: initial capital cost, replacement cost, operating and maintenance (O&M) cost, and fuel cost of diesel generator), and also simulation constraints and economic limits of the system. Search space in HOMER software is a discrete area and also determined by the user. If this space gets larger, simulation time will become longer. Finally, the software ranks the solutions which are technically feasible based on their NPC. NPC denotes life cycle cost of the system which includes the following concerns:

  • Costs: including initial capital cost, replacement cost, maintenance cost, fuel cost, cost of buying electricity from the electrical grid and other costs like tax and penalties imposed by air polluting.

  • Incomes: including selling excess energy to the grid and selling components at the end of the project lifetime.

HOMER software calculates NPC by the following equation:

$$NPC = \frac{{C_{ann,tot} }}{{CRF\left( {i,N} \right)}}$$
(4)

where \(C_{ann,tot}\) is the total annualized cost of each component of the system. Capital recovery factor is calculated by

$$CRF = \frac{{i\left( {1 + i} \right)^{N} }}{{\left( {1 + i} \right)^{N} - 1}}$$
(5)

where N is the project lifetime period and i specifies the annual interest rate. One of the problems of HOMER is that it considers interest rate similarly for all components and also neglects the inflation rate. HOMER suggests the following equation for importing inflation in equations:

$$i = \frac{{i^{\prime} - f}}{1 + f}$$
(6)

Salvage incomes obtained by selling components at the end of project lifetime is calculated by

$$SC = C_{rep} \frac{{R_{rem} }}{{R_{comp} }}$$
(7)

Which \(C_{rep}\) is the components replacement cost, \(R_{rem}\) denotes remained years of project lifetime and \(R_{comp}\) specifies component lifetime.

Renewable Fraction (RF) is the ratio of supplied energy by renewables (Solar and wind) to total energy which is delivered to the load.

COE is the average annual cost of each kWh of energy which is delivered to load. By dividing total annual costs, including investment cost, replacement cost, maintenance cost and salvage income which are converted to annual values (based on dollar per year), to annual energy consumed by the load (based on kWh per year) COE can be obtained in $/kWh.

$$COE = \frac{{C_{ann,tot} }}{{E_{served} }}$$
(8)

Simple payback time is the time which has to be spent in order to project income compensates the initial investment cost.

$$- IC + \mathop \sum \limits_{j = 1}^{p} \frac{{CF_{j} }}{{\left( {1 + i} \right)^{p} }} = 0$$
(9)

In the above equation, IC is the initial cost, \(CF_{j}\) is the net cash flow of the year j and p denotes the payback time which can be calculated by setting the equation equals zero. Moreover, in this equation, it should be noticed that payback time is obtained by comparing two projects. This means that payback time depends on the differentiation between initial capital costs and cash flows of each year of two systems that one of them is grid most of the time. In order to simplify Eq. 9 and make it understandable, another simpler equation is proposed which is the differentiation between initial capital costs of two systems in [$] divided by the differentiation between operating costs of two systems in [$/year] as bellows:

$$simplified payback time \left( {year} \right) = \frac{{Difference between initial capital costs \left( {{\$}} \right)}}{{Difference between operating costs \left( {\frac{{{\$}}}{year}} \right)}}$$
(10)

In this equation operating cost includes (annual cost of bought electricity from the grid + annual replacement cost + annual operating and maintenance cost) − (annual salvage income + annual income of sold electricity to the grid). This equation is used to find the payback time of proposed systems in population-based optimization algorithms.

3.2 Population-Based Optimization Algorithms

Definition of cost function plays a significant role in optimal sizing problems. As it has been said earlier, the cost function includes two major parts: project costs and project incomes. In the present research, NPC is selected to be optimized based on PV covered area (m2) and Power (number) of wind turbines. Costs can be categorized to:

The initial capital cost which does not need to be converted to present value because it is spent in the zeroth year. Following equation is applied to calculate this cost for component k:

$$NPCinv_{k} = Cinv_{k} \times size_{k}$$
(11)

\(NPCinv_{k}\) is the investment cost of each component based on the dollar, \(Cinv_{k}\) is the initial cost of each unit of component k ([dollar]/[unit size]) and \(size_{k}\) is the size of installed component k ([unit size]). In this equation, for each component, the cost of land possession and foundation must be considered in addition to the initial cost.

Annual maintenance cost which must be converted to zeroth year with respect to interest rate and inflation rate from the annual point of view is calculated as bellows:

$$NPCo\& m_{k} = \mathop \sum \limits_{z = 1}^{N} Co\& m_{k} \times \frac{{\left( {1 + f} \right)^{z} }}{{\left( {1 + i} \right)^{z} }}$$
(12)

In this equation, f is the inflation rate, i is the interest rate, and \(Co\& m_{k}\) denotes annual operating and maintenance cost of component k. It should be mentioned that CRF which was described in Eq. 5 is calculated by the following equation as the inflation rate is considered:

$$CRF = \frac{i - f}{{\left( {1 + f} \right)\left( {1 - \left( {\frac{1 + f}{1 + i}} \right)^{N} } \right)}}$$
(13)

Throughout the project lifetime, the life of some components might be ended. Therefore, they must be replaced. There is more complication in the calculation of replacement cost in comparison with other costs, as the component price will be reduced in usage period because of technological advancements. However, in HOMER software this concern is not taken into account. The replacement cost of each component in zeroth year is calculated as follows

$$NPCrep_{k} = \sum \limits_{z = 1}^{{Nfirst\_rep_{k} }} Cinv_{k} \times \frac{{\left( {1 + f_{k} } \right)^{{zRcomp_{k} }} }}{{\left( {1 + i} \right)^{{zRcomp_{k} }} }} + \sum \limits_{{z = Nfirst\_rep_{k} + 1}}^{{N\_rep_{k} }} Cinv_{k} \frac{{\left( {1 + f_{k} } \right)^{{Y_{k} }} \left( {1 + f} \right)^{{zRcomp_{k} - Y_{k} }} }}{{\left( {1 + i} \right)^{{zRcomp_{k} }} }}$$
(14)
$$N\_rep_{k} = int\left[ {\frac{N}{{Rcomp_{k} }}} \right]$$
(15)
$$Nfirst\_rep_{k} = int\left[ {\frac{{Y_{k} }}{{Rcomp_{k} }}} \right]$$
(16)
$$Y_{k} = \frac{{{ \log }\left( {1 + L_{k} } \right)}}{{{ \log }\left( {1 + f_{k} } \right)}}$$
(17)

In this equation \(NPCrep_{k}\) denotes the replacement cost in the zeroth year for component k, \(f_{k}\) is the inflation rate of component k, \(Rcomp_{k}\) is the lifetime of component k, \(L_{k}\) denotes technological maturity limit of component k, \(Y_{k}\) is the time lasts for technologic maturity, \(N\_rep_{k}\) specifies the number of replacements of component k, and \(Nfirst\_rep_{k}\) is the number of replacements which is done when the cost of component is reducing based on inflation \(f_{k}\).

Another cost is the cost of buying electricity from the grid. After calculating hourly bought electricity from the grid, this hourly energy multiplies by its hourly cost and it transforms from annual view (8760 h in a year) to NPC according to inflation and interest rate. It describes as bellows:

$$NPC_{grid\_purchase} = \mathop \sum \limits_{z = 1}^{\text{N}} \mathop \sum \limits_{j = 1}^{8760} Egrid\_purchase_{j} \times Cgrid\_purchase_{j} \frac{{\left( {1 + f} \right)^{z} }}{{\left( {1 + i} \right)^{z} }}$$
(18)

Incomes are defined as follows.

The most notable income in grid-connected HRES is the revenue from selling excess energy to the grid. This can be calculated by multiplying hourly excess energy by its hourly sell back rate. Finally, it is converted to zeroth year according to interest rate and inflation rate. This income describes as follows:

$$NPC_{grid\_sell} = \mathop \sum \limits_{z = 1}^{N} \mathop \sum \limits_{j = 1}^{8760} Egrid\_sell_{j} \times Cgrid\_sellback_{j} \frac{{\left( {1 + f} \right)^{z} }}{{\left( {1 + i} \right)^{z} }}$$
(19)

\(Egrid\_sell_{j}\) is the amount of hourly sold energy to the grid and \(Cgrid\_sellback_{j}\) is the price of each kWh of selling energy to the grid.

Another income is related to selling components after the project lifetime. This happens in the last year and can be converted to the zeroth year term by the below equation:

$$NPCsalv_{k} = Cinv_{k} \left( {1 - \frac{{N\_rep_{k} \times Rcomp_{k} }}{N}} \right) \times \frac{{\left( {1 + f_{k} } \right)^{{Y_{k} }} \left( {1 + f} \right)^{{N - Y_{k} }} }}{{\left( {1 + i} \right)^{N} }}$$
(20)

Now, the cost function can be defined. The objective of optimization is to find the minimum of below equation according to its constraints which will be explained in the next section:

$$NPC = NPCinv + NPCrep + NPCgridpurchase + NPCo\& m - NPCgridsell - NPCsalv$$
(21)

3.2.1 General optimization procedure

Definition of the cost function starts the optimization process. The flowchart of defining the cost function is illustrated in Fig. 4. Firstly, hourly solar irradiation, hourly wind speed data, and hourly load profile data of 8760 points in a year are defined to the software as inputs. The amount of PV output and wind turbine output power of 8760 points can be calculated according to above-mentioned equations. After calculating the powers, the amount of Net Power Production (NPP) calculated. This is the major constraint that affects the PV area and power of wind turbines. This criterion does not allow the algorithm to produce a huge area of PV or large power of wind turbines.

$$NPP = P_{PV} + P_{WT} - P_{demand}$$
(22)
Fig. 4
figure 4

General optimization procedure of NPC [68]

Since this problem is constrained, we need a constraint handling method. For the sake of simplicity to handle the constraints, penalty function scheme is implemented which transforms the constrained problem to an unconstrained one by adding an additional value corresponding to the level of constraint violation to the original objective value. The cost function could be described generally as follows.

$$J = f\left( X \right) + \mathop \sum \limits_{j = 1}^{n} R_{j} {{\varPhi }}_{j}$$
(23)

In which Rj is a penalty coefficient for constraint j having a relatively large value in comparison with original objective value f(X) and \({{\varPhi }}_{j}\) is a function of constraints. The value of Rj should be adjusted by a trial and error procedure. Readers can see [91] for details. As a result, in this paper, the following cost function J is considered.

$$J = NPC + 10^{20} \times MAX\left( {0, \left( {NPP - 10^{3} } \right)} \right)$$
(24)

If NPP meets the requirements, the cost function (NPC) could be optimized. This process has been done by ASO, HHO, COA, MPEDE, BSA, ALO, GWO, ABC, PSO, and GA. The amount of PV covered area and power of wind turbines come out as optimization results.

A brief review of the recent population-based optimization algorithms employed in this work are described as following and we only mention the main points. Interested researchers could receive detailed information by reading cited articles.

3.2.2 Atom Search Optimization (ASO)

Atom Search Optimization (ASO) is a novel metaheuristic algorithm inspired by basic molecular dynamics. This algorithm models the atomic motions in nature mathematically according to interaction and constraint forces as a result of Lennard-Jones potential and bond-length potential, respectively. In this algorithm, the position of each atom corresponds to a possible solution in the search space and this parameter is calculated by atoms’ mass. In other words, the heavier the atom is, the better the solution is. According to the atoms’ distances, all atoms could attract or repel each other in the population and this leads to a group move of lighter atoms to the heavier ones. In order to enhance the exploration at the first stage of iterations, the interaction between each atom and many atoms with best fitness value is needed and in order to improve exploitation at the final stage of iterations, each atom should interact with fewer atoms with the best fitness value [76].

3.2.3 Harris Hawks Optimization (HHO)

Harris Hawks Optimization is a novel population-based optimization algorithm which is inspired by Harris hawks’ cooperation and chasing fashion in the nature called surprise pounce. This nature-inspired algorithm models the group movements of hawks towards prey from different directions in order to surprise it. In the exploration phase, the Hawks scan and observe the desert completely in order to find the prey. Harris Hawks are candidate solutions and the best candidate solution is the intended prey. In the exploitation stage, the Hawks surprise the prey by chasing it with four possible strategies including soft besiege, hard besiege, soft besiege with progressive rapid dives, and hard besiege with progressive rapid dives [77].

3.2.4 Coyote Optimization Algorithm (COA)

COA is a population-based metaheuristic algorithm inspired by canis latrans species. Despite Grey Wolf Optimizer (GWO), COA has different structure and setup and it does not emphasize only on dominance, hierarchy, and hunting preys. Instead, it takes into account the social structure and experience exchange within the coyotes. In this algorithm, the population of coyotes is divided into packs. Each coyote is a possible solution and its social behavior is defined as the amount of fitness function. The activities of coyotes are influenced by two major factors: intrinsic (such as sex, social behavior, and the pack to which the coyote belongs) and extrinsic (the depth of snow, its hardness, carcass biomass, and temperature). This algorithm deals with new exploration and exploitation balancing structure and can solve with real-world optimization problems [78].

3.2.5 Multi-population Ensemble Differential Evolution (MPEDE)

Differential Evolution (DE) is one of the most applicable evolutionary algorithms for solving global optimization problems. DE requires various mutation strategies to solve the optimization problems and the best mutation strategy could be changed at different levels of iterations. Therefore, determining the best mutation strategy plays a vitally important role in the efficient optimization by DE. Multi-Population Ensemble DE (MPEDE) is the one including three mutation strategies simultaneously: “current-to-pbest/1” and “current-to-rand/1” and “rand/1”. The “rand/1” is known by its robustness, the “current-to-pbest/1” showed competitiveness, and the “current-to-rand/1” is famous in solving rotated problems. The ratio between fitness improvements and consumed function evaluations determines the best mutation strategy [79].

3.2.6 Bird Swarm Algorithm (BSA)

This is a bio-inspired algorithm based on social behavior and social interactions in bird swarms including foraging behavior, vigilance behavior and flight behavior in order to increase their survival chance. In this algorithm, the position of each bird represents a solution and modeling of these behaviors enables us to formulate four search strategies with five simplified rules for better exploration and exploitation. These make BSA more extensible with good diversity and efficient prematurity avoidance. According to the rules: 1. Birds can switch between the foraging behavior and the vigilance behavior, 2. the previous best experience of each bird could be recorded promptly during the foraging, 3. The birds tend to move towards the center of the swarm during the vigilance, 4. the birds could fly periodically to another site, and 5. Producers search for food actively [80].

3.2.7 Ant Lion Optimizer (ALO)

This is also a nature-inspired algorithm modeling the hunting mechanism of antlions in nature and its main source of inspiration comes from this fact that antlions usually dig a big pit when they are hungry and hide until the ant falls into the pit. In this algorithm, ants and antlions find solutions through five hunting steps consisting of random walk of ants, building traps, entrapment of ants in traps, catching preys, and re-building traps. The random walk of ants is a model of the stochastic move of ants during the search for food in nature and these movements are influenced by antlions’ traps. When the antlions find out the ants are trapped and want to escape, the radius decreases by the sliding process of ants. In the catching prey, the antlion comes to the pit and takes this position which is fitter than it and the process starts again by re-building the trap [81].

3.2.8 Grey Wolf Optimizer (GWO)

GWO is a meta-heuristic algorithm which mimics the leadership hierarchy and hunting methods of grey wolves (Canis lupus). This algorithm has four variable for showing hierarchy and also includes three steps of hunting (optimization) including tracking, encircling and attacking the prey. In order to show the internal hierarchy, the wolves are divided into four groups: alpha, beta, delta, and omega in order from the best individual to the worst individual. Alpha, beta, and delta determine the hunting (optimization) procedure and they are the leaders of finding preys in the search space. These three solutions reduce the possibility of trapping in a local optimum. In this algorithm, exploration means wolves could change their path and move towards an unknown region and also exploitation means a detailed search in a potential region [82].

3.2.9 Artificial Bee Colony (ABC)

This algorithm is a swarm-based optimization algorithm inspired by the intelligent behavior of honey bees’ swarming towards finding new food sources around the beehive. In this algorithm, the bees are divided into three groups: employed bees, onlooker bees, and scouts. One artificial employed bee is assumed for each food source. This means that food sources equal the number of employed bees. The employed bees are responsible for finding food and when they come back to the hive, they dance and this dance affects the onlookers for choosing the food sources. Each employed bee which leaves their source of food is labeled as a scout and they try to search new food resources. In ABC, the position of food corresponds to the possible solutions, the employed bees represent solutions, and the amount of food resources is similar to the fitness function values [83].

3.2.10 Particle Swarm Optimization (PSO)

This algorithm is a famous population-based stochastic algorithm which models the foraging group movement of the birds in a flock for food. PSO is originally attributed to Kennedy and Eberhart [92] and despite other evolutionary algorithms that select single particles, a swarm of particles move towards the best solution and all members have a chance of survival from the beginning to the end of optimization. This algorithm does not need gradient information of objective function and it is started with random particles in the search space. The position of particles (solutions) is updated according to three parameters and the velocity of each particle for moving to a new position is determined by previous velocity (momentum component), best previous position (the cognitive component), and the best previous position of its neighborhood (social component) [93].

3.2.11 Genetic Algorithm (GA)

GA has widespread uses for solving optimization problems and it is the most well-known global optimization method introduced by John Holland based on Darwin’s evolution theory [94]. This algorithm starts with producing random individuals in an iterative process in the search space. These individuals are called a generation (candidate solution) and then the amount of fitness function for each generation is evaluated. Among these evaluations, the generations having the best fit function’s value are selected and evolve to a better and better generation through two steps of genetic operations: Crossing and mutation. During these steps, a pair of good parents are selected to reproduce a child that inherits good characteristics of their parents. After that, the amount of fitness function is recalculated and this process repeats until an acceptable amount of fitness function is achieved or the generations’ productions reach their limit [95].

3.2.12 Calculating the amount of yearly emissions

In this project, three power sources have been used that only one of them use fossil fuels as the source of its energy and it is known as the grid. HOMER proposes an equation in which the amount of emissions can be calculated when the amount of sold energy to the grid is subtracted from the amount of bought energy from the grid. This can cause misunderstanding. Although some energy is bought from the grid, the emissions can be negative because annual sold energy to the grid is more than annual bought energy from the grid. Thus, the authors have tried to calculate the amount of emissions by multiplying the amount of annual bought energy from the grid by the amount of released emissions for producing each kWh energy in power plants. The unit of energy is kWh/year and the unit of released emissions in power plants is g/kWh. Therefore, the unit of annual emissions would be g/year.

4 Simulation Results and Discussion

4.1 Input Data

In this section, the required data has been defined as input data in order to do the simulations. As it has been said earlier, this data includes hourly load data, hourly solar irradiation and wind speed data, price of components, and the amount of emissions which are produced in power plants. Table 1 shows the input data briefly.

Table 1 Summary of input data

4.1.1 Traction load and location data

Binalood is the second windiest region in Iran and it is located in the northeastern part of Iran. It has the longitude of 28°48ʹ East and the latitude of 36°12ʹ North. This region is near the under-construction Tehran-Mashhad electric railway system. Hourly traction load in a year is estimated to be as Fig. 5.

Fig. 5
figure 5

Hourly load profile of proposed HTPS in Binalood region

4.1.2 Meteorological Data

Stochastic data includes weather-related variables such as wind speed and solar irradiation must be 8760 h in a year. Hourly solar irradiation profile of Binalood region is shown in Fig. 6. It reaches its minimum of 2.38 kWh/m2/day in December and it experiences its maximum of 7.07 kWh/m2/day in June. The annual average of solar irradiation equals 4.79 kWh/m2/day [96].

Fig. 6
figure 6

Hourly solar irradiation of Binalood region [96]

Binalood has a great potential for using wind turbines [97] because its annual average wind speed at 40 m above sea level is 6.82 m/s. this region also enjoys Dizbad wind [58]. Monthly wind profile is illustrated in Fig. 7 [98].

Fig. 7
figure 7

Monthly average wind speed of Binalood region [98]

4.1.3 Economic data

The proposed system includes wind turbines, PV array, converter, and grid. The lifetime of the project is 25 years and the inflation rate and interest rate for taking a loan from the bank equal 10% and 20%, respectively. The solar cells installed on the top of the railroad need a stronger foundation than on the roof of a building or on the ground. Therefore, the initial capital cost of each KW PV array is $1800 and the lifetime of them is 25 years. These cells have a derating factor of 80%, slope degree of 35°, ground reflectance of 20% and without a tracking system.

The initial capital cost of converter for the proposed system is $800/kW and its lifetime is 15 years with an efficiency of 90%. Cost reduction limit due to the technological maturity of converters equals − 25% and its selling price inflation rate is − 5%. The price of buying electricity from the grid is $0.1/kWh and sell back rate is $0.233/kWh. Each unit of Vestas V-82 has $3,630,000 initial capital cost and its operating cost is $72,600/year. This unit has a lifetime of 25 years.

4.1.4 Emissions Data

Four major gases which are emitted by power plants are carbon dioxide, carbon monoxide, sulfur dioxide, and nitrogen monoxide. The amount of emissions for producing each kWh of energy in a power plant at case study area are 700 g for carbon dioxide, 3.21 g for carbon monoxide, 3.18 g for nitrogen monoxide, and 0.94 g for sulfur dioxide.

4.2 Results

According to the data in the previous section, the optimization was done by ASO, HHO, COA, MPEDE, BSA, ALO, GWO, ABC, PSO, GA, and HOMER for the case study. All population-based algorithms were implemented by MATLAB. In order to study the robustness of the compared population-based algorithms, the computational results were obtained by running each algorithm for 10 independent times. For a fair comparison between the convergence behavior of the algorithms, population size was selected as 250. Also, 100,000 Function Evaluations (FEs) was chosen as a stop condition. For the ASO [76], HHO [77], COA [78], MPEDE [79], BSA [80], ALO [81], GWO [82], ABC [83], PSO [93, 99] and GA [100], the parameters setting was same with the recommended settings in the original papers. The corresponding search spaces for the PV array covered area and total output power of wind turbines were also chosen as x(1) ∈ [0 400000] and x(2) ∈ [0 100000], respectively. Table 2 shows the obtained results by each algorithm for all runs. The statistical results associated with all runs were recorded as the worst, best, median, mean and standard deviation (SD) in Table 3. The better result among the ten optimizers was shown with bold. Referring to Tables 2 and 3, it is obvious that BSA, COA, MPEDE, and PSO are able to find the best value among the algorithms. However, the BSA algorithm is the most robust for solving the optimal size of GHTPS problem with standard deviation values of 1.40E−08, followed by ABC, ALO, ASO, COA, GA, GWO, HHO, MPEDE, and PSO. The convergence profile of the mean cost function was also shown in Fig. 8. As it can be seen in Fig. 8, the superiority of BSA in terms of accuracy and convergence speed is confirmed.

Table 2 The obtained results by each algorithm for all runs
Table 3 Statistical results by each algorithm for all runs on the cost function
Fig. 8
figure 8

The convergence profile of the mean cost function

As NPP constraint was set to avoid the huge power of wind turbines and a large area of PV, the NPP of BSA result is around 999 kW in a year, which means that the amount of renewables’ production could meet the load in a whole year. This is a point that we could define the concept of Net Zero Energy TPS, a traction power supply substation that its annual production from its renewable resources equals its annual bought energy from the grid. However, in each hour, we may need to buy electricity from the grid or sell excess electricity to the grid.

To further comparison, the optimization was done by HOMER software and the results are compared with BSA results. The complete optimization results are categorized in Table 4.

Table 4 The results of BSA and HOMER for the proposed GHTPS

BSA results show that the produced energy by the PV system is zero which means that solar cells are not economical in the Binalood region in comparison with the wind turbines and this is also confirmed by HOMER results. BSA results have the best NPC of $82,863,135 and COE of $0.0619/kWh which are far less than the grid-only system. Fairy 40 wind turbines are needed in order to produce 65,236 MW power. These wind turbines have an investment cost of $143,520,329. The operating cost of this configuration is $− 6,220,825 and 10.99 years will be taken in order to return the investment cost. About 66.75% of the load is met by the by wind turbines and this leads to the reduction of greenhouse gases with respect to the grid-only system by the amount of 48 Million kg CO2, 221,000 kg CO, 64,000 kg SO2, and 219,000 kg NO. The monthly power flow diagram of the BSA result is indicated in Fig. 9.

Fig. 9
figure 9

Monthly Power flow diagram of BSA results

According to this figure, wind turbines produce 137,231,489 kWh energy in a year, while the load needs 137,230,490 kWh annually. This means that we have a system that its annual produced energy roughly equals its annual demand and it is known as a Net Zero Energy system. Moreover, the amount of PV production is zero and it can be said that PV arrays are not economical in Binalood region comparing with the wind turbines. On the other hand, 68,353,380 kWh energy has been purchased from the grid and 68,354,379 kWh has been sold to the grid in a year. As it can be seen from this figure, wind turbines produce more energy in July than other months because the average wind speed is 7.6 m/s and it is more than other months. In July, 17,093,122 kWh energy is produced by the wind turbines while the load needs 11,545,464 kWh. Therefore, the monthly excess energy of 9,593,631 kWh is sold to the grid and 4,045,972 kWh is bought from the grid in hours that wind turbines cannot meet the load. As the amount of wind turbines’ production grows, the amount of sold energy to the grid increases and the amount of bought energy from the grid decreases.

However, HOMER results are totally different from BSA results. This is chiefly because HOMER has not considered the NPP constraint. Therefore, 2 wind turbines without a PV array is the most economical system in HOMER, while BSA found 40 wind turbines more economical. However, both software declares that using PV arrays in Binalood region is not more economical than using the wind turbines. The NPC and COE of this system are $132,938,816 and $0.99/kWh respectively that both of them are less than grid-only system in HOMER. This system needs $7,260,000 for 2 wind turbine investment cost. The operating cost of this system is $12,898,706/year which is close to the operating cost of grid-only system due to this fact that grid meets 93.35% of the load. What is remarkable is that the PT is 8.81 years and it is dramatically lower than BSA results. Due to Eq. 9 and Eq. 10, although the differentiate of net cash flows (or operating costs) of two Vestas V-82 and grid-only system is very small which makes the PT very large, the low investment cost of proposed system makes PT comparatively lower than BSA results. This means that 2-vestas V-82 wind turbines can get $7,260,000 incomes by selling excess energy to the grid after 8.81 years. Figure 10 shows the electrical power flow in each month for grid-connected wind turbine in HOMER software. According to the results, wind turbines produce 9,194,625 kWh in a year, 636,066 kWh/year of which is sold to the grid and 129,017,088 kWh/year energy is purchased from the grid connection.

Fig. 10
figure 10

Monthly average electric production for a grid-connected wind turbine in HOMER

Monthly flow diagram of components illustrates in Fig. 11. According to Fig. 11a, in August, 11,405,916 kWh energy is purchased from the grid which is the most, because the load is maximum in this month. With respect to Figs. 7, and 11b, 1045120 kWh energy is produced by wind turbines in July that 73,558 kWh of it is sold to the grid because wind speed is maximum in this month. As it can be seen from Fig. 11, grid purchase and demand trend lines are similar to each other, so are grid sales and vestas V-82 production trend lines.

Fig. 11
figure 11

HOMER optimization results a monthly grid purchase and load b monthly grid sale and Vestas V-82 Production

The proposed system in HOMER, grid-connected two vestas V-82, can only reduce 6.44% of grid emissions which is not comparable to BSA results. Therefore, although the proposed system by HOMER has lower NPC than the grid-only system, it cannot play an environmentally effective role.

4.3 Sensitivity Analysis

As it has been said earlier, entering new technologies into the renewable energies’ markets causes a fall in the prices of present technologies. On the other hand, the price of natural gas and then the cost of energy produced by the fossil fuels have been growing since the past decades. As a result, it is necessary to do a sensitivity analysis of the prices of buying components such as wind turbine and buying electricity from the grid. In this section, the reaction of COE, NPC, and PT to the 50% reduction and 50% increase in wind turbine capital cost, and electricity price is investigated. When a parameter is changing, another parameter is assumed to be constant. The behavior of COE and NPC to the changes is similar to each other because they are related to the capital recovery factor (CRF). The basic numbers of comparisons are $82,863,135, $0.0619/kWh, and 10.99 years for NPC, COE, and PT, respectively (BSA results). Since PV array does not play any role in meeting the load, the variation of its investment cost is not included in the sensitivity analysis.

Sensitivity analysis on NPC (COE) and PT are shown in Fig. 12a, b with respect to changing prices from 50% reduction to 50% increase in wind turbines’ capital cost, and grid electricity buying price. As it can be seen from the figures, the capital cost of wind turbine is the most effective parameter for NPC, COE, and PT because wind turbine stands first and grid stands second in meeting the traction load. By increasing or decreasing the investment cost of wind turbines by 50%, the NPC (COE) could change by more than 80%. This means that technological advances in wind turbines could make the proposed system more economical. Moreover, the payback time could be reduced by more than 5 years. On the other hand, increasing the price of buying electricity from the grid by 50% in the aftermath of increasing the price of fossil fuel price in the near future, could approximately raise the NPC and PT by 40% and 4 years, respectively.

Fig. 12
figure 12

Sensitivity analysis on (a) NPC (COE) b Payback Time for changing economic parameters between − 50 and + 50%

5 Conclusion

This paper took the preliminary steps towards the concept of Green Hybrid Traction Power Supply substation in order to study its economic and environmental aspects. Therefore, a canopy of solar cells above the case study railroad with grid-connected wind turbines was proposed in order to meet a Traction Power Supply Substation. In this case, the size of the components was optimized in terms of Net Present Cost by recent population-based optimization algorithms including ASO, HHO, COA, MPEDE, BSA, ALO, GWO, ABC, PSO, and GA and the results were compared with HOMER software. According to the results, BSA algorithm outperformed other mentioned methods in terms of the solution quality, robustness and convergence speed and it resulted in no PV array with 65,236 MW (40 Vestas V-82) grid-connected wind turbines. This system had the NPC of $82,863,135, COE of $0.0619/kWh, PT of 10.99 years, and a NPP of 999 kWh/year, in which Zero Energy Train could be defined. Additionally, more than 48 Million kg CO2 was produced less than a grid-only system every year. In the end, a sensitivity analysis on COE (or NPC) and PT revealed that an increase in grid electricity price and a reduction in wind turbines investment cost could make the proposed GHTPS more competitive in the near future. Overall, it can be concluded that the used population-based optimization algorithms are effective in solving such real-world optimization problems and the proposed system is an efficient alternative for every country grappling with the ever-increasing price of energy, especially in the transport sector.