This article presents a modified version of atom search optimization (ASO) algorithm that uses the opposition-based learning (OBL) to improve the search space exploration. OBL is a commonly used machine learning strategy for increasing the performance of meta-heuristic algorithms. As a new design method, the opposition-based ASO (OBASO) algorithm was proposed for the first time in determining the optimum values of the proportional-integral-derivative plus second order derivative (PIDD2) controller parameters in an automatic voltage regulator (AVR) system. In the design problem, a new objective function, including the integral of time-weighted squared error (ITSE) and overshoot all together, was optimized with the proposed OBASO algorithm to find the best values of the PIDD2 controller parameters. The performance of the proposed OBASO tuned PIDD2 (OBASO-PIDD2) controller is compared to that of the classic ASO tuned PIDD2 (ASO-PIDD2) controller as well as the PID, fractional order PID (FOPID) and PIDD2 controllers tuned with modern meta-heuristic algorithms. Comparative transient and frequency response analyzes were conducted to assess the stability of the proposed approach. In addition, considering the possible changes in AVR parameters, the robustness of the proposed approach was tested. The extensive simulation results and comparisons with other existing controllers show that the proposed OBASO-PIDD2 controller with a new objective function has a superior control performance and can highly improve the system robustness with respect to model uncertainties.