A boost dc-ac inverter is one which is capable of generating in a single stage ac voltage whose peak value can be higher or lower than the given input dc voltage. The major problem with this system is that the closed loop gain parameters kp and ki have to be optimized because these parameters help us to get desired result with better system response by lowering the rise time, settling time, peak overshoot and steady state error. Moreover when they are not optimized load line disturbances arise because of which the stability of output voltage decreases and THD value increases. So to overcome these difficulties bacterial foraging algorithm is being used. © 2016 The Authors.