cancel
Showing results for 
Search instead for 
Did you mean: 

how does the divider work in PID tuning?

msingh
Senior

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.

2 REPLIES 2
Laurent Ca...
Lead II

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

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