In recent years, PSO algorithm has been one of the popular soft computing technique and increasingly used in optimizing the parameters of PID controller. However, before PSO or any optimization algorithm in general can be successfully used to solve optimization problems, the validation of their functionality must be done earlier. This paper proposed the functionality validation of PSO algorithm which will be focusing on the fitness functions and convergence of the particles. Due to the existence of P (1 dimensional), PI or PD (2 dimensional) and PID (3 dimensional) controllers, the functionality validation has been done with 1, 2 and 3 dimensional problems. The test functions used are Rastrigin and Rosenbrock. Experimental results shows the proposed PSO algorithm coded in MAT LAB has been successfully proven fit to be employed in optimizing 1, 2 and 3 dimensional problems which later can be used to optimize PID controllers and its variants with the same dimensions of problems.