1 Introduction

The demand for environmentally benign renewable power sources is increasing. Indeed, the trend is escalating the preference of power generation from renewable resources rather than from fossil fuels. Wind Turbines (WT) and Photovoltaic (PV) panels are the most desired types of such systems [1,2,3]. The power produced from PV is available during the day when solar irradiance is available to be exploited, and the power produced from WT is at the peak when the wind blows favorably to the blades. Hence, for increasing the reliability of the power generation, the combination of these two systems is a feasible proposition [4,5,6,7,8,9,10,11]. Moreover, typically, the irradiance and wind complement each other [12,13,14,15]. Because the availability of irradiance and wind is not guaranteed, the inclusion of a storage system is important for improving the overall system reliability. Batteries are the most sought-after among the different hydrogen storage device technologies. However, because of their energy leakage between 1% and 5% per hour, and their low energy densities, they are not useful for long-term operation of power systems [16]. Hydrogen can be a good choice due to its high energy density, low energy loss, mature technology, on-site provision capability, and compactness [17,18,19,20]. One of the most promising ways of producing hydrogen is through the electrolysis of water using an electrolyzer. Hydrogen can be used in almost every application that fossil fuels are being used currently. In addition, hydrogen can be more efficiently transformed into other forms of energy and is as reliable as the conventional fuels such as coal, nuclear and natural gas.

Recently, many researchers have investigated the combination of renewable power resources, especially wind and PV systems, for hydrogen production [21,22,23]. The so generated hydrogen can be used as a power supply to fuel cells, which are secondary power sources.

A hybrid system comprising four modules: WT, PV array, fuel cell and ultra-capacitor was simulated in [24]. Handling an off-grid load for a diurnal period was the primary focus of their proposed system. In [25], WT and PV were used as power generation sources to design a hydrogen production and storage system. However, this study employed components based on simple models, and the monthly performance of the system was evaluated without taking into account any optimization. A similar model was proposed in [26], which looks at the economic optimization of the hybrid system by expanding its features to include WT, PV array, fuel cell and electrolyzer, and achieves its goal to meet the grid-connected load using Particle Swarm Optimization (PSO) algorithm. An elaborate review of the various energy management strategies using a combination of WT, PV, fuel cells and batteries is provided by [27]. The ICA employed in [28] explores the optimization of WT-PV hybrid system for meeting an AC load. However, the surplus power produced is lost in a dump load.

In [29], a standalone system that generates hydrogen was evaluated against the three possible ways of using WT and PV systems. An optimal sizing of the standalone power system was also done considering the cost of the system components to be variable with respect to time. So, another index for optimization is used which is independent of time. The introduced index relies on maximum hydrogen production through minimum excess power production of resources. The detailed components of WT, PV array, power electronic devices, electrolyzer, and storage tank which were used for the purpose of simulation were explained in detail.

In this paper, optimal combination of PV and WT for hydrogen production and storage is discussed by considering the system operation on a typical day. Most of the existing research perform only cost-based optimization which ignores technical issues. The system and component costs, however, are time-variant. It is to be noted that when excess power and system dimensions are minimized, cost is indirectly reduced as well. Indirectly optimizing cost this way makes it reliable, since variation in the costs of components does not affect the optimization result. In this paper, Imperialistic Competitive Algorithm (ICA) is used to maximize hydrogen generation and minimize excess power production. Electromechanical and electrochemical component models are used for simulation, and system electrical characteristics are analyzed. The rest of this paper is organized as follows. Section 2 discusses models and equations used for WT, PV, electric generator and electrolyzer. Section 3 provides a detailed description and pseudocode for the ICA. The flowchart of the proposed system is also documented. Section 4 provides the system setup, simulation analysis and results. Finally, Section 5 provides a brief conclusion.

2 Standalone power system models

As shown in the schematic block diagram of the proposed system in Fig. 1, a combination of WT and PV array is required for generating the needed power for the electrolysis in the alkaline electrolyzer. The system is proposed to be designed optimally sized to obtain as much hydrogen as possible from a 10 kW electrolyzer.

Fig. 1
figure 1

Schematic block diagram of the proposed system

2.1 WT module

The mechanical power that is reached to the generator of wind turbine is given by (1), as described in [30,31,32,33,34]:

$$ P = \frac{1}{2}\rho AV^{3} C_{p} $$

where ρ is the density of air; A is the area of the space that the blades rotate in;V is the wind speed and C p is the ratio of the extracted power to the incident power, which is called power coefficient, or rotor efficiency, and is derived from (2) and (3):

$$ C_{p} (\lambda ,\beta ) = 0.22(\lambda_{1} - 0.4\beta - 5){\text{e}}^{{ - ( {\frac{12.5}{{\lambda_{1} }}} )}} $$
$$ \frac{1}{{\lambda_{1} }} = \frac{1}{\lambda + 0.08\beta } - \frac{0.035}{{\beta^{3} + 1}} $$

where β is pitch angle and λ is the ratio of the speed of the tip of the blade to the speed of the wind. Having computed the power, the output torque, T, can be expressed by (4) and (5):

$$ T = \frac{P}{\omega } $$
$$ T_{mech} - T_{e} = J\frac{{{\text{d}}\omega }}{{{\text{d}}t}} + D $$

where ω is the angular speed of generator shaft; J is the moment of inertia of all its rotating parts, including the generator and turbine; D is the damping torque coefficient; T e is the electrical torque; T mech is mechanical torque and the difference between them is representative of loss in torque of the generator and load. The power production from wind turbine might have transient control issues, which have been discussed in recent literature [35, 36].

Figure 2 shows wind turbine’s output power based on generator nominal speed in different wind speeds. As observed, it reaches the maximum power when the wind speed is 12 m/s. WT works with cut in and cut out speeds of 3 and 15 m/s.

Fig. 2
figure 2

Characteristics of WT

2.2 PV module

The model of the PV cells is given in Fig. 3. The parallel resistance (R sh ) is assumed to be negligible for the simplicity of the model. In the absence of irradiance, the PV cells are not active and act like p-n junction diodes which do not produce any power or voltage. However, if it is installed with a connection to an external load with high voltage, it produces a current of I L . The considered model of the PV cell consists of a current source, a diode, and a series resistance which shows the internal resistance of the cells and the resistance of the connecting cells [37,38,39].

Fig. 3
figure 3

Circuit diagram of PV model

The current of the PV system is the difference between I L and the diode current, I D . According to the simplified model shown in Fig. 3, the equation of the voltage and current can be derived from (6) shown below:

$$ I = I_{L} - I_{D} = I_{L} - I_{0} \left[ {{\text{e}}^{{\left( {\frac{{U + IR_{s} }}{\alpha }} \right)}} - 1} \right] $$

where I 0 is the saturation current; I L is the light current; I is the load current; U is the output voltage; R S is the series resistance; α is the voltage thermal coefficient.

Since four parameters, namely I 0, I L , R S , α, have to be determined in this model, it is called a “four parameters model”. A PV module consists of N p panels in parallel and N s panels in series for each branch. Table 1 shows the characteristics of the panels used in this study.

Table 1 Electrical parameters of PV system [29]

As shown in Fig. 4, the rate of change in the PV voltage and current parameters for different irradiances is given. Furthermore, the output power of the system is shown in Fig. 5. For every value of irradiance for a specific voltage and current known as Maximum Power Point (MPP), the extracted power is in its peak point. By comparing Fig. 4 with Fig. 5, it can be shown that the MPP is at the knee-point of voltage and current curves.

Fig. 4
figure 4

Variation of PV voltage and current with irradiance

Fig. 5
figure 5

Voltage-power curves for different levels of irradiance

2.3 Electrolyzer

For the evaluation of the condition of the electrolyzer, the following assumptions should be considered [40,41,42,43]:

  1. 1)

    Hydrogen and oxygen are ideal gases.

  2. 2)

    Water is an incompressible fluid.

  3. 3)

    The phases of liquid and gas are separate from each other.

For an electrochemical model, the voltage and current equation, which is a function of temperature, is given by:

$$ \begin{aligned} U = U_{rev} + \frac{{r_{1} + r_{2} T}}{A}I + (s_{1} + s_{2} T + s_{3} T^{2} )\text{ } \cdot \hfill \\ \;\;\;\;\;\log \left( {\frac{{t_{1} + \frac{{t_{2} }}{T} + \frac{{t_{3} }}{{T^{2} }}}}{A}I + 1} \right) \hfill \\ \end{aligned} $$

where U rev is the activation voltage for this process; r is Ohmic resistance parameter; s and t are the parameters of over voltages; T is the temperature of the electrolyzer, and A is the area of the electrodes.

These parameters are given in Table 2. The electrochemical characteristics of the electrolyzer are given in Fig. 6. As can be seen in Fig. 6a, the voltage starts from 1.2 V, which is the activation voltage, and even for a slight change in this voltage, the variation of current is huge.

Table 2 Electrochemical parameters of alkaline electrolyzer [29]
Fig. 6
figure 6

Electrochemical characteristics of the electrolyzer

For the evaluation of the amount of hydrogen generated, the Faraday efficiency defined as the ratio of the hydrogen produced in practical conditions to that produced in theoretical conditions should be evaluated. Due to the influence of parasitic current loss in Faraday efficiency, it is also called current coefficient. The parasitic current caused by bubbles increases with a decrease in current because of the increasing portion of electrolyte and decreasing resistance. The increasing temperature causes an increase in the parasitic current loss, posing less electrical resistance, and therefore, less Faraday efficiency. Faraday efficiency is given by:

$$ \eta_{F} = \frac{{\left( {\frac{I}{A}} \right)^{2} }}{{f_{1} + \left( {\frac{I}{A}} \right)^{2} }}f_{2} $$

where f 1(mA2cm−4) and f 2 are parameters of Faraday efficiency which are given in Table 3.

Table 3 Parameters of Faraday efficiency [29]

The produced hydrogen is directly proportional to Faraday efficiency and current in the electrolyzer. So, the rate of produced hydrogen for cells in series is expressed as:

$$ \dot{n}_{{H_{2} }} = \eta_{F} \frac{{n_{c} I}}{zF} $$

where n c represents a stack of electrolyzers in series which, for a 10 kW electrolyzer, is equal to 21; F is the Faraday constant equal to 96485 C/mol; z is the number of electrons transformed in the process of electrolysis, equal to 2.

3 Imperialist competitive algorithm (ICA)

The ICA is predominantly used to find globally optimal solutions for a wide range of applications. As described in [44] and [45], this algorithm stemmed from the concept of imperialistic competition, which was employed originally used to solve continuous problems.

The target variables to be optimized are viewed as an array called “country”, much similar to the term “chromosome” in Genetic Algorithm (GA) nomenclature. Appraising the cost function delivers the “cost” of a country. The steps of this optimization algorithm are encapsulated by the pseudocode in Table 4 and depicted pictorially in Fig. 7.

Table 4 ICA optimization pseudocode
Fig. 7
figure 7

ICA Pseudo code depicted as a flowchart

As described further in [46], this optimization algorithm belongs to the class of Evolutionary Algorithms (EAs) and begins with a set of “countries” that can be analogous to the initial population in general. In the initial state, some of these countries are chosen to represent “imperialists” while the others become “colonies”. Each of this colony initially belongs to a specific imperialist. The power of an imperialist is inversely proportional to the cost, as is the case with fitness factor and cost in GA. Evolving from this initial setup, these colonies begin shifting towards their respective imperialistic countries [47].

The total power of an empire depends on both the power of the imperialist as well as its colonies. This forms the setup for further competition to happen between the different imperialists wherein each imperialist has the goal of maximizing the power by adding as many colonies as possible. Thus, in the process, those empires that lose all of their colonies to others collapse and are weeded out of the optimization problem. The strongest empire with the highest power and hence the least cost becomes the winner, more formally termed the “optimal solution”. In the final state, the colonies and imperialists will all have the same power.

The application of the ICA algorithm to the hybrid system of wind turbine and photovoltaic array to produce the maximum hydrogen needs the optimization to be added in the ongoing process of implementation. The flowchart of the process is given in Fig. 7. Maximum hydrogen production is desired in optimization. However, there should be constraints to restrict the size of energy production systems. Conventionally, the cost is chosen for this purpose. But, it varies during the time and the parameters for cost analysis is not stable. So, we chose to minimize the excess power production as an indirect index for cost which makes the system the most efficient. The optimization leads to finding the best size for wind turbine and PV system. As given in the objective function in (10), the maximum hydrogen production rate considering minimum excess power production of combined wind turbine and photovoltaic system is evaluated in this study.

$$ Objective\_Func = \frac{{\dot{n}_{{H_{2} }} }}{\Delta P} $$

where ∆P is excess power defined as the difference between the produced power by wind turbine and PV with electrolyzer nominal power when the produced power is more than nominal power of electrolyzer. It has been assumed that the excess power is available in the system and more than 15W. It should be mentioned that the system is optimized for the whole day. This step is calculated after assimilation and revolution of colonies, then the objective is calculated. It is considered that the system will definitely have excess power, because to reach the maximum average hydrogen production, electricity should reach the nominal power of electrolyzer. In this study, the cost of the system is not considered to be minimized because of instability during time. However, considering the minimization of excess power indirectly minimizes the cost. Fig. 8 shows the hydrogen production as a function of PV and WT size. As can be seen, the slope of production in high powers decreases because the produced power exceeds the nominal power of electrolyzer. So, the excess power minimization is a constraint for this optimization.

Fig. 8
figure 8

Hydrogen production rate based on WT and PV power generation

4 Simulation setup, results and discussion

Based on modeling of the hybrid PV-WT system connected to the advanced alkaline electrolyzer and implementation of optimization algorithm to it, the system is simulated and the results are analyzed. The process is done dynamically, due to ongoing optimization along with simulation running. The values of parameters of implemented ICA in the system is given in Table 5. The detailed description of the selection of parameter values and accurate definition of each parameter can be found in [44,45,46].

Table 5 Parameters of ICA

The following observations have been made based on the working of the proposed system based on conducting preliminary simulation using MATLAB. In this study, the effect of ambient temperature to the operation point of the system is neglected.

As can be seen below, Fig. 9 portrays the steady-state condition for one day on an average in the city of Miami. The data for the simulations have been obtained from the local utility with a resolution of 10 minutes. This dataset can be considered as the best case scenario wherein the wind and solar irradiance almost complement and compensate for each other’s losses. In other words, when the wind weakens, the irradiance peaks and vice versa. Considering the geographical location of Miami which experiences a tropical climate with frequent showers and storms supported by strong to moderate winds and highly erratic yet productive solar irradiance profile, the maximum power of the WT is observed to be 12 m/s while the vacillation in irradiance can be accounted for by the changes in cloud cover patterns.

Fig. 9
figure 9

Average steady-state scenario for a day in Miami

Figure 10 depicts the power of all the components of the proposed system. As it can be noted, the electrolyzer’s nominal power is 10 kW. This optimal system comprises a PV module with a power of 7.9 kW and a WT module with a power of 11 kW. The average generation of combined PV and WT system is 5.61 kW. A combination of power resources, creating a hybrid mode, in essence, increases the efficiency of the overall system by delivering more power to the electrolyzer, and hence covers more area of the power curve of the device. In this scenario, it is also noteworthy that the power loss which is the excess power as a result of the generation of combined PV and WT exceeding the nominal power of electrolyzer is minimized. The excess power minimization indirectly minimizes the cost because it restricts the dimensions of the system. The excess power happens at noon when irradiation is maximum and at night when the wind power generation is maximum. It can further be seen that the system operates at 53.7% of its nominal power.

Fig. 10
figure 10

Power of all components of the system

Figure 11a represents the loss of energy that is observed. It can be seen that against time the loss which begins at noon with the irradiance at its peak at which point maximum power is generated. The overall loss, however, is just 4.3% of the total power produced. The average power loss is 245.5 W. Hence this can be considered the least power loss for the optimal operation of the proposed system. For the purpose of these simulations, the loss of power in components was neglected, and more emphasis was laid on the loss due to power that is generated but cannot be used owing to the restrictions in the operation of the electrolyzer.

Fig. 11
figure 11

Simulation results

Total Hydrogen production is shown in Fig. 11b as a function of time which is 1628 mol with an average rate of 0.0192 mol/s. The production is almost fixed after sunrise because the system attains maximum operation. During its operation, hydrogen is stored in high-pressure storage tanks capable of storing in 8.64 MPa. The loss and energy for the pressurizing the hydrogen is neglected.

The system voltage is shown in Fig. 11c, from which it can be inferred that the average operating voltage is 28V, which is almost fixed. This voltage is the operating voltage of PV, WT, and Electrolyzer regulated by converters. The small changes in voltage cause major changes in current because the electrolyzers are stacked in series and the electrolyzer is sensitive to voltage fluctuations. This trend of the changing in characteristics stems from the meteorological data used.

The Faraday efficiency is plotted in Fig. 11d, from which the average efficiency value can be estimated to be around 86.9%. When compared with the full-time operation of the electrolyzer with a Faraday efficiency of 93.7, it is 6.8% deficit. The Faraday efficiency remains nearly fixed despite an increase in the power. The variation of the efficiency at higher magnitudes of power does not have a significant effect on the overall operation of the proposed system. At low speeds, the real condition of hydrogen production is almost 50% of the theoretical condition and this is because the parasitic current disrupts the operation of the electrolyzer at lower values of power.

5 Conclusion

Results from the previous study have been extended in this paper to implement the developed simulation model for the optimal RE system with hydrogen production and storage. Its operation under efficient integration of WT and PV modules was investigated for the region of Miami based on the datasets obtained from the local utility with a resolution of 10 minutes. The geographic conditions prevalent in Miami region are also taken into consideration while implementing this model for assessing the results. A combination of power resources, creating a hybrid mode in essence, increases the efficiency of the overall system by delivering more power to the electrolyzer, and hence covers more area of the power curve of the device. In this scenario, it is also noteworthy that the power loss is minimized. Minimal loss of power occurs at noon when irradiance is maximum and at night when wind speeds maximize.

The effect of WT in production is 49.8% more than PV array in hybrid system. Although the contribution of PV array is less than WT in power production, because the maximum production of PV is at noon, when the wind speed is low, the hybrid system is more reliable than the systems with one power source. The estimated Faraday efficiency of this hybrid system is about 86.9%, which when compared with the full-time operation of the electrolyzer with an efficiency of 93.7%, puts it at just 6.8% lower. Although the contribution of PV module in the system is less than that of WT as far as power generation is concerned, owing to maximum production of PV at noon when the wind speed is low, the hybrid system is more reliable than those systems with just one power source.