Skip to main content
Associate II
October 1, 2026
Question

Position Control PID Inner Loop Tuning

I am reading through AN5464 and UM1052 looking through the PID tuning sections.
https://www.st.com/resource/en/application_note/an5464-position-control-of-a-threephase-permanent-magnet-motor-using-xcubemcsdk-or-xcubemcsdkful-stmicroelectronics.pdf

https://www.st.com/resource/en/user_manual/um1052-stm32f-pmsm-singledual-foc-sdk-v43-stmicroelectronics.pdf

Typically one would tune the inner loop PI for Torque and Flux then go onto tune the outer loop position PID. The calculated position control PID parameters for the project by default are completely unstable. I am looking for any documentation around the recommended method of tuning the inner loops as in both the Flux and Torque PI parameters. Is there anything along these lines available?

2 replies

GMA
ST Technical Moderator
October 6, 2026

Hello ​@Vasalic,

Refer to the “5.9 PID tuning” chapter of the AN5464 Application note.

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
VasalicAuthor
Associate II
October 6, 2026

I have already read through this note. I am asking for further clarifications as this note does not cover the steps involved in tuning the inner loops. I believe one should most likely create a Speed Control project and tune the Torque and Flux loops first. Then subsequently with the Torque and Flux loops tuned one would then follow AN5464 and tune the Position PID.