Skip to main content
msingh
Senior
November 3, 2020
Question

how does the divider work in PID tuning?

  • November 3, 2020
  • 1 reply
  • 802 views

I am using NUCLEO-F303RE, X-NUCLEO-IHM08M1, MotorControl Workbench 5.4.4 and STM32CubeMX 5.5.0. I have managed to generate a project as position control and it seems to work fine however I am wondering if I can improve further the performance of the motor by fine tuning the PID controller (for now I just tried some random values). Each parameter of the PID has a divider associated with it and I would like to know how this affects the performance. Once the code is generated the dividers are the followings:

#define SP_KPDIV           16384

#define SP_KIDIV           16384

#define SP_KDDIV           16

#define SP_KPDIV_LOG         LOG2(16384)

#define SP_KIDIV_LOG         LOG2(16384)

#define SP_KDDIV_LOG         LOG2(16)

it is obvious that the LOG has the same value, but what if I change this how will it affect the performance. what values are best to be used?

Thanks in advance for your help.

This topic has been closed for replies.

1 reply

Laurent Ca...
Senior III
December 31, 2020

Dear @msingh​ 

Sorry for the late answer.

Do you have still this problem to solve?

And just in case, if not, do not hesitate to share the final solution you found. Thanks by advance.

Best regards

Laurent Ca...

msingh
msinghAuthor
Senior
January 18, 2021

Dear @Laurent Ca...​ ,

Yes I still haven't understood properly how the divider works, is there any documentation you can suggest?

Kind Regards

Manpreet Singh