This paper presents designing an optimal adaptive controller for tracking control of robot manipulators based on particle swarm optimization (PSO) algorithm. PSO algorithm has been employed to optimize parameters of the controller and hence to minimize the integral square of errors (ISE) as a performance criteria. In this paper, an improved PSO using logic is proposed to increase the convergence speed. In this case, the performance of PSO algorithms such as an improved PSO (IPSO), an improved PSO using fuzzy logic (F-PSO), a linearly decreasing inertia weight of PSO (LWD-PSO) and a nonlinearly decreasing inertia weight of PSO (NDW-PSO) are compared in terms of parameter accuracy and convergence speed. As a result, the simulation results show that the F-PSO approach presents a better performance in the tracking control of robot manipulators than other algorithms.