This paper presents an investigation into precise trajectory tracking and synchronization of two-axes direct current (DC)
motor control, with an emphasis on a cascade proportional-plus-integral (P-PI) controller to regulate the speed and position of a single-axis permanent magnet DC (PMDC) motor. Various methods were explored for the controller’s design process, including classical methods (CM) and three optimization strategies: genetic algorithm (GA), dandelion optimization algorithm (DOA), and butterfly optimization algorithm (BOA), with the latter found to be the most effective. Simulation was a crucial component in assessing the efficiency of these methods. A comparative analysis of four tuning strategies (CM, GA, BOA, and DOA) was conducted to ascertain optimal settings for the P-PI cascade controller. The DOA outperformed the others, providing accurate tracking with no deviation from the reference location or speed overshoot. Moreover, DOA ensured safety by limiting voltage and current to prevent potential damage to the motor. The findings thus suggest that the proposed P-PI controller with DOA can serve as a reliable solution for speed and position control in single-axis PMDC motors.