cancel
Showing results for 
Search instead for 
Did you mean: 

How can I optimize my position loop control?

gtop.1
Associate III

I am using MCSDK 5.Y.4 and add position loop.My controller sends a position command every 4ms.

err=target_pos - current_pos,then the err value (multiply by P) is the speed loop pid input.But I found that the speed is not smooth when the motor changes direction.

There is a lag problem between the current position curve and the target position of the position loop.My position loop only uses P control, no I.

微信截图_20230719162859.png

1 ACCEPTED SOLUTION

Accepted Solutions
Johi
Senior III

If I understand your question correctly: P controllers need err in order to generate a PID output different from 0. Therefore, using P controller implies that you always will have a difference between actual and target value (ist & soll) values. If you want to have actual and target spot on you need to add integrating action. But integrators will make the system less stable as incrementing P action will. You could improve behavior when changing direction using an S-curve as is done in industry with large drives.

View solution in original post

1 REPLY 1
Johi
Senior III

If I understand your question correctly: P controllers need err in order to generate a PID output different from 0. Therefore, using P controller implies that you always will have a difference between actual and target value (ist & soll) values. If you want to have actual and target spot on you need to add integrating action. But integrators will make the system less stable as incrementing P action will. You could improve behavior when changing direction using an S-curve as is done in industry with large drives.