The focus of this work is to analyse the performance of automatic generation control (AGC) of two area four units interconnected deregulated power system for implementing modified sine cosine algorithm (MSCA) to design the conventional PID and fuzzy-PID (FPID) controllers. Each area consists of thermal generating unit with reheat turbine and a gas generating unit. Thermal generating units of both areas are employed with appropriate generation rate constraint. At first, sine cosine algorithm (SCA) is modified to implement MSCA technique and superiority of MSCA is proved over SCA using four benchmark functions. Then the work is extended to design the conventional PID and FPID controllers using both the algorithms. Three different situations of deregulated markets are considered. For the design of optimal controller gains integral time absolute error is taken as the objective function. To analyse the dynamic behaviour of the deregulated power system undershoot, overshoot and settling time are considered as transient parameters. After the analysis, it is found that MSCA-based FPID controller exhibits a better transient response in terms of less undershoot, overshoot and settling time. Robustness analysis is performed by varying some of the important parameters of the power system to show the proposed FPID controller is less sensitive to parametric variations. © The Institution of Engineering and Technology 2019.