This paper focuses on the angular stabilization of inverted cart-pendulum system using PI D controller. The tuning of PI D controller is formulated as a nonlinear optimization problem, in which the objective function is composed of five design conditions in frequency domain. Particle swarm optimization technique has been used for optimizing PI D parameters. Also a PID controller has been designed based on same specifications, and a comparative study has been carried out. All the responses have been calculated using FOMCON toolbox of Matlab/Simulink.