With FOC, two PI current controllers can be used to control both aspects of the motor current vector separately. One current controller (IQ) is used to control the motor’s torque and is thereby called the torque controller; the other one (ID) controls the magnetic flux inside the motor. Transformations are based on the actual rotor angle, which is acquired by position sensors like Hall sensors or encoders. The magnetic flux is mainly generated by the rotor, so its target value is usually zero.
Servo control adds speed and position controllers to this architecture to make it fully functional for positioning applications. All controllers require proper feedback to work at high dynamics and to compensate for unknown load forces. For current controllers, this means that the coil currents need to be measured. Position can be measured with encoders or roughly with Hall sensors. As velocity sensors are not common, the velocity of the motor is often computed by differentiation of the position signal.