cancel
Showing results for 
Search instead for 
Did you mean: 

Why current regulator execution time must be higher than 83us in motor control workbench using STM32G71RB

Jinchun
Associate

Hi experts,

I'm using MC workbench to generate a project using NUCLE-G071RB to control a simple fan. No matter which power board or motor, i can't set the current regulator execution time higher than 83us. 

I need to use 20kHz PWM frequency so 50us current regulator execution time is preferred.

But from STM32 Ecosystem for Motor Control, i find the information below. When FOC is 10kHz, the total workload of G071B is just 37%. So i plan to use STM32G071B to do this motor control with 20kHz FOC frequency.

Jinchun_0-1729074600954.png

So it's confused for me and please help to clarify the reason why current regulator execution time should higher than 83us when the workload just 37%.

Could you tell me how long the FOC execution time once when using PLL observer, speed & current control and SVPWM? I have some other functions need to add, so i need to know that.

Thanks a lot!

Best Regards!

Jinchun Chen

1 REPLY 1
GMA
ST Employee

Hello @Jinchun,

Please refer to to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>"User manual" tab>"Single shunt phase shift overview", "3.Single shunt phase shift scheduling example" chapter. The High Frequency task (most CPU intensive task) is trigged once current samplings are done and should be finish before the new PWM Timer cycle, this means that only almost half CPU workload is available to run HF task.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA