Optimal Design of controllers for automatic generation control in conventional, Deregulated and Micro-grid systems