Automatic voltage regulators (AVRs) in electrical grids preserve the voltage at its nominal value. Regulating the parameters of proportional–integral–derivative (PID) controllers used for AVRs is a nonlinear optimization issue. The objective function is designed to minimize the settling time, rise time, and overshoot of step response of resultant voltage with subjugation to constraints of PID controller parameters. In this study, we suggest using an Archimedes optimization algorithm (AOA) to tune the parameters of the PID controllers for AVRs. In addition, using an AOA to optimize the parameters of a fractional-order PID (FOPID) controller and a PID plus second-order derivative (PIDD2) controller for AVRs is also investigated to validate their effectiveness. The disturbance repudiation and robustness of the AOA-PID controllers are also examined and confirmed. To validate the results of the AOA-PID controllers, they are compared with those of other optimized controllers for convergence speed, the quality of the step response. The results indicate that the AOA functions perfectly and it has good potential for optimizing the PID controller parameters with better step response compared with the PID controller based on other approaches while preferring the results of the AOA–PIDD2 controller over other kinds of the AOA-PID controllers.