This paper is dedicated to present one of newly developed evolutionary algorithm. We consider a new way to tune the PID controller of nonlinear systems where the parameters of PID are optimised using the optimisation method called artificial immune algorithm (AIA). This algorithm is inspired from the immune system defends to the body against harmful diseases and infections. This paper describes the application of AIA technique based on two fitness function to optimally tune the three terms of the classical PID controller, to control a nonlinear process. Simulations of the proposed algorithm are carried out over a mass-spring damper system. The results of simulation indicate that the genetic AIA is an effective method for parameter optimisation of PID controllers.