2023-07-19 01:48 AM
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.
Solved! Go to Solution.
2023-07-24 11:39 PM
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.
2023-07-24 11:39 PM
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.