Efficient flowrate control is paramount for the seamless operation and reliability of petroleum transportation systems, where precise control of fluid movement ensures not only operational efficiency but also safety and cost-effectiveness. The main aim of this paper is to develop a highly effective modified model reference PID controller, tailored to ensure optimal flowrate control of petroleum products throughout their transportation. Initially, the petrol transportation process is analyzed to establish a suitable mathematical model based on vital factors like pipeline diameter, length, and pump attributes. However, using a basic first-order time delay model for petrol transportation systems is limiting due to inaccuracies, variable delay issues, safety oversights, and real-time control complexities. To improve this, the delay portion is approximated as a third-order transfer function to better reflect complex physical conditions. Subsequently, the PID controller is synthesized by modifying its structure to address flowrate control issues. These modifications primarily focus on the controller’s derivative component, involving the addition of a first-order filter and alterations to its structure. To optimize the proposed controller, the genetic, black hole, and zebra optimization techniques are employed, aiming to minimize an integral time absolute error cost function and ensure that the outlet flow of the controlled system closely follows the response of an appropriate reference model. They are chosen for their proficiency in complex optimization to enhance the controller's effectiveness by optimizing parameters within constraints, adapting to system dynamics, and ensuring optimal conditions. Through simulations, it is demonstrated that the proposed controller significantly enhances the stability and efficiency of the control system, while maintaining practical control signals. Moreover, the proposed modifications and intelligent tuning of the PID controller yield remarkable improvements compared to previous related work, resulting in a 36% reduction in rise time, a 63% reduction in settling time, an 80% reduction in overshoot, and a 98% reduction in cost value.