I am implementing a cartesian control of a robotic manipulator and below you can see the function which produces the joint velocities in order to perform the control: