The optimal design of a proportional-integral-derivative controller with two cascaded first-order low-pass filters (PID-FF) for non-ideal buck converters faces significant challenges, including effective disturbance rejection, robustness to parameter variations, and the mitigation of high-frequency signal noise, with existing approaches often struggling and leading to suboptimal performance in practical applications. This study addresses these challenges by introducing a constraint on the open-loop crossover frequency to mitigate high-frequency noise and ensuring the controller prioritizes maintaining constant output voltage and robust responsiveness to input voltage and load current variations. This study also introduces an innovative metaheuristic algorithm, the opposition-based snake optimizer with pattern search (OSOPS), designed to address these limitations. OSOPS enhances the Snake Optimizer (SO) by integrating opposition-based learning (OBL) and Pattern Search (PS), thereby improving its exploration and exploitation capabilities. The proposed algorithm design includes a crossover frequency constraint aimed at counteracting high-frequency noise and ensuring robust performance under diverse disturbances. The efficacy of the OSOPS algorithm is demonstrated through rigorous statistical box plot analysis and convergence response comparisons with the original SO algorithm. Additionally, we systematically compare the performance of the OSOPS-based PID–FF–controlled non-ideal buck converter system against systems utilizing the original SO algorithm and the classical pole placement (PP) method. This evaluation encompasses transient and frequency responses, disturbance rejection, and robustness analysis. The results reveal that the OSOPS-based system outperforms the SO- and PP-based systems with 14.21 % and 32.10 % faster rise times, along with 15.38 % and 84.95 % faster settling times, respectively. The OSOPS and SO systems also exhibit higher bandwidths, exceeding the PP-based system by 18.74 % and 17.03 %, respectively. By addressing the key challenges in PID-FF controller design for non-ideal buck converters, this study provides a substantial advancement in control strategy, promising enhanced performance in practical applications.