## 3 Analysis--Governing Equations  
The analysis of the microgrid takes into account the hour-by-hour operation of the microgrid for an entire year. The energy generation at a given hour of the year, \(i\), is the sum of the energy production by the PV cells and the wind turbines:  
\[E_{si}=(A\dot{I}_{i}\eta_{Ti}+\dot{W}_{i})t \tag{1}\]  
where \(E_{s}\) represents the energy generated during the hour, \(i\), \(\dot{I}_{i}\) is the total solar irradiance, \(A\) is the area of the PV system, \(\dot{W}_{i}\) is the average power produced by the wind turbines, and \(t\) is the time, which for the calculations that follow is 1 h or 3600 s.  
It is known that the efficiency of PV cells drops with rising temperature. Therefore, a closure equation for the efficiency of the PV system is adopted for the hours when the temperature exceeds 25 \({}^{\circ}\)C:  
\[\eta_{Ti}=\eta_{25}[1-k_{SC}(T_{i}-25)],\ \ T_{i}>25\ ^{\circ}\text{C} \tag{2}\]  
where \(\eta_{T}\) is the actual efficiency of the PV cell, \(\eta_{25}\) is the efficiency at 25 \({}^{\circ}\)C, \(k_{SC}\) is the temperature sensitivity coefficient, and \(T\) is the ambient temperature in \({}^{\circ}\)C. For the calculations, the sensitivity coefficient was chosen to be \(k_{SC}\) = 0.002 [22].  
For the determination of the hourly wind energy, Vestas V90 3.0 wind turbines were chosen to be employed. The turbines have diameter \(D\) = 90 m and are typically installed on top of a tower with a height \(H\) = 80 m. The cut-in wind velocity for these turbines is 3.5 m/s, and the cut-out velocity is 25 m/s. When the wind velocity is less than the cut-in velocity or greater than the cut-out velocity, the wind turbines do not generate any power. The rated velocity of these turbines is 15 m/s, and this implies that when the wind velocity is in the range \(15<V<25\) m/s, the turbines produce the rated power of 3.0 MW. When the wind velocity is between the cut-in and the rated velocity, the power produced by the wind turbine is determined by the expression [8]:  
\[W_{i}=\frac{\pi}{8}D^{2}\eta_{w}\rho V^{3} \tag{3}\]  
where \(W_{i}\) is the electric power produced by a single wind turbine at a given hour, \(D\) is the diameter of the wind turbine, \(\eta_{w}\) is the efficiency of the turbine-generator system, \(\rho\) is the air density, and \(V\) is the average wind velocity at the nacelle/tower height. The local wind velocity, \(V\), was determined from hourly data obtained from the databases of the National Oceanic and Atmospheric Administration [23].  
Figure 2: Schematic diagram of the grid-independent cluster of buildings with hydrogen energy storage.  
The hourly energy demand of the cluster of buildings, \(E_{D}\), is met either by the hourly energy production of the solar and wind systems or by the hydrogen energy storage system. During a given hour of the year, if the energy supply is greater than the demand, the generated excess energy, \(E_{ex}\), is directed to the electrolysis system and the produced hydrogen is added to the hydrogen tank. If the demand is greater than the generated energy, the fuel cells supply the deficit, \(E_{def}\), using the stored hydrogen. Therefore, at the end of the \(i\)th hourly time period, the energy storage level, \(S\), is determined by one of the following expressions:  
\[S_{(i+1)}=S_{i}+E_{ex}*\eta_{el},\ \ if\ E_{si}\geq E_{Di} \tag{4}\]  
\[S_{(i+1)}=S_{i}-\frac{E_{def}}{\eta_{fc}},\ \ if\ E_{si}\leq E_{Di}\]  
where \(\eta_{el}\) is the overall efficiency of the electrolysis system, and \(\eta_{fc}\) is the efficiency of the fuel cells. It is apparent from the last equation that the storage and recovery of the generated energy entails dissipation, which depends on the efficiencies of the electrolysis and fuel cells systems. It must be noted that the values of these two efficiencies also include any minor losses in the inverters and any transformers.