# Energy Management of Virtual Power Plant Considering Distributed Generation Sizing and Pricing
## 6 Simulation Results and Discussion  
The capacity of each wind turbine is considered as 7.5 kW, 1 kW for each solar array, power of each electrolyzer and fuel cell are measured to 1 kW, then the size of each hydrogen tank is 1 Kg and the amount of energy stored per battery is 9.6 kWh. Tables 1 and 2 contain the specifications of the system equipment, which are modeled. Also, the real interest rate (u) is 0.08 \(ir\). Considering the useful life of the project is 20 years, the _PWA (ir, R)_ value is 9.818. Figure 2: PSO algorithm flowchart. The maximum power available at upstream network is 500 kW. Also, the energy prices sold to the high-voltage network during different hours of the day are from the spring and autumn periods are those written in accordance with Table 3. The seasonal coefficient of summer and winter is defined as 1.3 and 0.8. The interruption cost for a removable load equivalent is 0.1 ($/kWh) and for non-removable loads equivalent is 0.5 ($/kWh). The price of electricity sales to domestic grid users (which is considered as the maximum profit for these prices) is at different times according to Table 4.  
Transmission lines and transformer investment costs are 5% of equipment costs, as well as miscellaneous network costs. The cost cannot be evaluated precisely such as financial transaction fees, accounting costs, transportation, advertising and marketing, etc. Then there is 38% of the cost of installing scattered units and the cost of repairing and maintaining grid equipment, and 5% of the cost of repair and maintenance of dispersed production units. In this section, in order to validate the results of the developed software, initially, the results of the size and optimization of the three hybrid systems as shown in Figures 3-5. They are compared with the output results extracted from the HOMER software. Hybrid systems consist of solar panels, wind turbines, and energy storage systems. In the hybrid system number 1, the hydrogen tank, in system 2, the battery and in system number 3, the battery and hydrogen tank are used as an energy storage device. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Equipment** & **Initial Cost** & **Replacement Cost** & **Annual Cost of** & **Useful Life** & **Efficiency** \\  & **(USS/unit)** & **(USS/unit)** & **Maintenance** & **(Year)** & **Efficiency** \\ \hline Wind turbine & 19,400 & 15,000 & 75 & 20 & - \\ Solar array & 7000 & 6000 & 20 & 20 & - \\ Electrolyzer & 2000 & 1500 & 25 & 20 & 75 \\ Hydrogen tank & 1300 & 1200 & 15 & 20 & 95 \\ Fuel cell & 3000 & 2500 & 175 & 5 & 50 \\ DC/AC converter & 800 & 750 & 8 & 15 & 90 \\ Battery & 12,500 & 1100 & 65 & 4 & 85 \\ \hline \end{tabular}
\end{table} 
Table 1: Specifications of the system equipment. \begin{table}
\begin{tabular}{c c c c c} \hline
**Hour** & **Price (USS/kWh)** & **Hour** & **Price (USS/kWh)** \\ \hline
1 & 0.1 & 13 & 0.15 \\
2 & 0.1 & 14 & 0.15 \\
3 & 0.1 & 15 & 0.15 \\
4 & 0.1 & 16 & 0.15 \\
5 & 0.1 & 17 & 0.15 \\
6 & 0.1 & 18 & 0.3 \\
7 & 0.1 & 19 & 0.3 \\
8 & 0.1 & 20 & 0.3 \\
9 & 0.15 & 21 & 0.3 \\
10 & 0.15 & 22 & 0.3 \\
11 & 0.15 & 23 & 0.1 \\
12 & 0.15 & 24 & 0.1 \\ \hline \end{tabular}
\end{table} 
Table 3: Energy purchased price from upstream network. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Time** & **Price (USS/kWh) Interruptible Loads** & **Price (USS/kWh) Non-Interruptible Loads** \\ \hline  
\hline \hline \end{tabular}
\end{table} 
Table 4: Selling electricity price to domestic microgrid end users. Figure 3: Hybrid system No. 1 (with hydrogen tank). The results obtained from HOMER software are compared with the results obtained from the software developed in MATLAB environment, shown in Table 5.  
According to Table 5, the results obtained by HOMER software are very close to the results obtained from the developed software and confirm the accuracy of the developed coding. Also, the results of the review of the three hybrid systems show that the use of battery as a storage device instead of an electrolyzer assembly, hydrogen tank, and fuel cell will increase system costs.