This paper presents a time domain tuning technique for a fractional order PID controller based on optimizing an integral performance criterion. A Fourier series based method (FSM) is used to calculate accurately the step response of the closed loop control systems so as to determine the exact value of the error function performance criterion. The initial guesses for the FOPID controller parameters to be optimized are found using the analytical solution for integral squared error optimization for an integer order PID controller. The proposed method is used for two test plant transfer functions by comparing different optimal FOPID controllers. The results show that the design technique based on optimization of different integral performance criteria give good step responses for FOPID controller. (C) 2017, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.