Skip to main content
Ronny Landsverk
Associate III
August 20, 2023
Solved

Current PI sampling period for STMC FOC SDK

  • August 20, 2023
  • 1 reply
  • 1238 views

For calculating apriori PID parameters when running ST FOC SDK, you obviously need to consider the sampling time of the regulator for the integral term. According to UM1052, current sensing is synchronous to the PWM. Is the sampling period of the current sensing ADC the same as the sampling period of the current PI controllers ?

Again, referencing UM1052, page 38/178, formula for Ki; is T equal to 1 / pwm_freq ?

@cedric H 

This topic has been closed for replies.
Best answer by FouadB

Yes, the sampling period of the current sensing ADC is the same as the sampling period of the current PI controllers. This regulation loop is triggered at the end of ADC conversion. This period, called T, is equal to 1/PWM_Frequency if the execution rate parameter (set in the "drive settings" section in ST FOC SDK GUI interface) is set to 1. Otherwise, the execution rate has to be taken into account: T = 1 / PWM_Frequency / Execution_Rate.

Best regards

1 reply

FouadB
FouadBBest answer
ST Employee
August 29, 2023

Yes, the sampling period of the current sensing ADC is the same as the sampling period of the current PI controllers. This regulation loop is triggered at the end of ADC conversion. This period, called T, is equal to 1/PWM_Frequency if the execution rate parameter (set in the "drive settings" section in ST FOC SDK GUI interface) is set to 1. Otherwise, the execution rate has to be taken into account: T = 1 / PWM_Frequency / Execution_Rate.

Best regards

If you agree with my answer, please accept it by clicking on 'Accept as solution'.""