cancel
Showing results for 
Search instead for 
Did you mean: 

Current PI sampling period for STMC FOC SDK

Ronny Landsverk
Associate III

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 

1 ACCEPTED SOLUTION

Accepted Solutions
FouadB
ST Employee

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'."

View solution in original post

1 REPLY 1
FouadB
ST Employee

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'."