PI Current Control Loop
The PI Current Control Loop is the main controller used in Field-Oriented Control (FOC).
At every FOC cycle, the demanded current vector is compared to the feedback current vector, and the resulting voltage vector is generated to drive the modulators.
The controller consists of proportional and integral gains, with a simple anti-windup protection mechanism to prevent undesired current oscillations.