If you mean, for a general second order,; however you have to specify whether there is a zero (positive or negative) or not in the open-loop transfer function. Then you can specify a third-order polynomial corresponding to three negative selected poles, then after you obtain three algebraic equations to solve for Kp and Ki under specific conditions and a stable operation. This is a complete algebraic method, the performance can be found and adjusted by simulation.
Hi Sai, there are plenty of methods for optimal PID parameter calculation. One simple method is e.g. Naslin method, You should find an example (2nd order system + PI) in the link below:
The simplest way is to obtain the simulatanuous alagebraic equations from comparing the closed loop characteristic equation to your desired one, and then solving those will give k_p and k_i etc.