Hi, Peter,
There are "Fast Loop Period" and "slow loop period", the "Fast Loop Period" is the main loop, in the loop, the work of reconstructing 3 phase currents, calculating or estimating rotor position, clark/park transformation, Id and Iq PID, PWM modulation has to do. For the "slow loop period", in the loop, the actual speed is calculated, and the speed PID is calculated, the speed PID output is the reference Iq parameter for the current Iq PID. Generally, the "slow loop period" is about 1KHz, the "Fast Loop Period" is about 8K~10KHz.
Hope it can help you
BR
XiangJun Rong