The paper presents the novel application of Particle Swarm optimization (PSO) for the optimal tuning of the new PID controller which is called generalized PID (GPID). In 2009, Zhao Xiaodong, Li Yongqiang , Xue Anke proposed a generalized PID(GPID) to improve the time response and control quality of the traditional PID control algorithm This paper applies the Particle Swarm Optimization(PSO) algorithm for GPID controllers. The main goal is to eliminate the steady state error of the system and minimize the error performance index. The method searches the GPID parameter that realizes the expected step response of the plant. The expected response is defined by the overshoot ratio, the rising time, the settling time. The numerical result and the experiment result show the effectiveness of the proposed tuning method when the results are compared with the Traditional PID Controller.