cancel
Showing results for 
Search instead for 
Did you mean: 

how to calculate gains like (PID_SPEED_KP_DEFAULT,PID_SPEED_KI_DEFAULT,PID_SPEED_KD_DEFAULT) and speed PID parameter dividers like (SP_KPDIV) in PMSM motor STM32 , in STEVAL-ESC001V1

OBEHE.1
Associate II
1 ACCEPTED SOLUTION

Accepted Solutions

Actually, If you are working in the speed control mode you can use the monitor feature of the MCWB, then go to advanced and dynamically change the PIDs whoever if you are working in the position control mode this will not be possible.

View solution in original post

6 REPLIES 6
Laurent Ca...
Lead II

Dear OBEHE.1

Do you have still this problem to solve?

Best regards

Laurent Ca...

OBEHE.1
Associate II

i am trying to calculate these parameter with out generating code , i mean i want to calculate dynamically these parameters from motor parameters like friction and inertia

What is the reason of changing the PIDs dynamically? I'd suggest to find the best combination of PIDs with the highest payload the motor will EVER have. DO NOT RELY ON AUTOMATIC PIDs gains calculated by the MCWB as I don't think they will be anywhere near the values they should be (at least this was the case for me).

i have to dynamic the value , i does not want to generate the code by MCWB every time . i want to dynamically change the parameter of profiled motor to the code.

Unfortunately I haven't found a way to dynamically change the PID gains (it would have been very useful) but I have located the parameters inside the code so instead of going back to the MCWB I changed the values in code and saved time. You can find these in:

drive_parameters.h

Hope this helps.

Actually, If you are working in the speed control mode you can use the monitor feature of the MCWB, then go to advanced and dynamically change the PIDs whoever if you are working in the position control mode this will not be possible.