Particle swarm optimization of a PD controller for robotic manipulators