A PD control law for trajectory tracking of flexible joint robots