## 4 Energy Management Strategy  
The proposed DC microgrid architecture has three renewable energy sources with the storage device and diesel generator to supply the load continuously. In villages, agriculture is the main occupation of people. Thus, the microgrid is designed to meet the commercial DC and agricultural vehicle load. The lighting of the village will be considered as a priority load in the system. The net generated power and load power \(P_{net}\) and \(P_{L}\) is given by Equations (43) and (44). \[P_{net}=P_{PV}+P_{Wind}+P_{fuelcell} \tag{43}\]  
\[P_{L}=P_{DL}+P_{AGL}+P_{PL} \tag{44}\]  
where,  
\(P_{PV}\) = power generated by PV (kW);  
\(P_{wind}\) = power generated by Wind (kW);  
\(P_{fuelcell}\) = power generated by Fuel cell (kW);  
\(P_{L}\) = Domestic load (kW);  
\(P_{AGL}\) = Agriculture vehicle load (kW);  
\(P_{PL}\) = Priority load (kW). The priority battery is used to supply the lighting load.It will charge during the day and discharge during the night. The generated power will supply the loads by the three cases with the help of the battery and diesel generator. The process is represented as a flow chart in Figure 8. First, the load demand and generated by various sources will be measured based on the condition as follows  
* Case 1: Generated power equal to total load. In this condition, the power generated by wind, PV, and fuel cell is equal to the total load, hence the load will be supplied by the generation without any interruption. * Case 2: Generated power higher than the load. In this case, the generated power is higher than the load, hence the renewable power is fully supplied to the required load. The excess power from the generation is charged to the battery. The proposed architecture has two batteries: one is the priority load battery, and the other is the domestic and agricultural load side battery.While the load is supplied, at the same time, the priority battery \(SoC\) will be checked. Thus, the condition of priority the load battery and domestic load battery is discussed in Case 3 and Case 4. * Case 3: Priority load battery charging. In this case, the \(SoC\) of the priority load battery is measured. If the priority is minimum, the battery is charged until it reaches the rate power on that interval. Once it reaches the rated power, the priority battery will not charge, and the excess power generated by the energy source will charge the commercial battery. \[SoC_{min}<SoC_{priority}<SoC_{max}\]  
\[P_{power}>P_{rated}=charging\]  
\[P_{power}<P_{rated}=discharging\]  
\[P_{priority}=\left\{ \begin{array}{l}7\;\text{a.m.}\;<charging\;<6\;\text{p. m.}\;\;\;\;\;\;\text{rated (kW/h)}\\ 6\;\text{p.m.}\;<discharging\;<7\;\text{a.m. rated (kW/h)}\end{array} \right\}\]  
where, \(P_{power}\) = priority load power \(P_{rated}\) = rated (kW/h) to be charged on the condition of \(P_{priority}\) interval, charging on daytime \(P_{rated}\) = rated (kW/h) to be discharged on the condition of \(P_{priority}\) interval discharging on night time. \(\bullet\) Case 4: Domestic and agricultural charging. In this case, the \(SoC\) of the commercial load battery is measured, if the \(SoC_{Combattery}\) is minimized then the battery is charged till the \(SoC\) of the battery reaches the maximum value. Once it is fully charged excess power generated will be reduced by controlling the output of the fuel cell. \[SoC_{min}<SoC_{Combattery}<SoC_{\max}\]  
\[SoC_{Combattery}>SoC_{min}=charging\]  
\[SoC_{Combattery}>SoC_{\max}=discharging\]  
\(\bullet\) Case 5: \(P_{G}<P_{L}\). The generated power will be less than the required load, in this case. This case will be treated with caution to supply the load with the help of the battery by cases 6 and 7. Whatever the load profile may be, the priority load will be supplied by generation, which is the major consideration in this case. The difference in power from the generation and load will be calculated, and then whether the available generation is enough to meet the priority load will be checked.