The Automatic Voltage Regulator (AVR) system is one of the important systems in power grids. Proportional – Integral (PI) controller is usually used in industries to control the AVR system. However, to increase the flexibility or improving the performance of the PI controller, fractional order PID (FOPID) or combined PID and fuzzy controllers can be used. A new method for the control of AVR has been proposed in this paper. For this purpose, a Fuzzy-PID controller with optimized membership functions has been employed. Input membership functions along with gains of Fuzzy-PID controller have been optimized with imperialist competitive algorithm (ICA) to control the AVR system. Optimizations have been done with various fitness functions. To compare, simulations have been carried out by optimized fractional order PID (FOPID) controller, too. Results of simulations have illustrated that the proposed controller has better performance compared to the FOPID controller according to settling time, overshoot, fitness function and the maximum of control signal values in all cases in such a way that the minimum improvement of overshoot, settling time, the maximum value of control signal, and fitness function value have improved 59%, 33%, 65%, and 3%, respectively. Moreover, to verify the robustness of the proposed controller to system uncertainties, simulations have been carried out by changing the parameters of the system. Results of simulations have shown the perfect performance of the proposed controller.