In this article, the control of a DC/DC converter was carried out using the proposed methods of conventional PI, PSO-based PI, PSO-based FOPI, GA-based PI, and GA-based FOPI controllers in order to improve the performance of PEMFCs. Simulink models of a PEMFC model with two inputs—hydrogen consumption and oxygen air flow—and with controllers were developed. Then, the outputs of a system based on conventional PI were compared with the proposed methods. IAE, ISTE, and ITAE were employed as fitness functions in optimization algorithms such as PSO and GA. Fitness function value, maximum overshoot, and rising time were utilized as metrics to compare the performance of the methods. PI and FOPI parameters were optimized with the proposed methods and the results were compared with traditional PI in which the optimum parameters were determined by an empirical approach. This research study indicates that the proposed methods perform better than the conventional PI method. However, it becomes apparent that the GA-FOPI approach outperforms the others. The simulation result also shows that the PEMFC model with conventional PI and FOPI controllers in which the controller parameters are tuned using PSO and GA has an acceptable control performance.