In this paper a hybrid distributed generation (DG) system connected to isolated load is studied. The DG system consisting of photo voltaic (PV) system, fuel cells, aqua electrolyzer, diesel engine generator and a battery energy storage system. The ambient temperature value of PV is taken as constant to make the output power of PV is directly proportional to the radiation and output power of other DG sources and frequency of the system is controlled by simple integral (I), proportional plus integral (PI), and proportional plus integral and derivative(PID) controllers. A maiden attempt is made to apply a more recent and powerful optimization technique named as bacterial foraging technique for optimization of controllers gains of the proposed hybrid DG system. The system responses with bacterial foraging based controllers are compared with that of classical method. Investigations reveal that bacterial foraging based controllers gives better responses than the classical method and also PID controller is best. Sensitivity analysis is carried out which demonstrates the robustness of the optimized gain values for system loading condition.