Rigid tapping and PID control

More
17 May 2022 12:14 #243141 by Masa
Replied by Masa on topic Rigid tapping and PID control
Thank you for the information, andypugh.

The index-enable matter is currently enabled.
It's a suggestion about PID gain, but when I gain was set to 0, it didn't run out of control.
However, it is rotating with a decrease of about 20% of the command rotation speed.
It is unthinkable in normal use. Normally
Pgain = 0.4
Igain = 0.5
Dgain = 0

Even if I gain is set to 0 and P gain is increased, overshoot may occur during rotation and the desired adjustment cannot be made.

If the servo amplifier is used for speed control, the orientation operation will be unstable, and it will take a long time to settle and time out. Therefore, the servo amplifier is used for torque control.

The encoder output from lcec will be count and Position when using the Beckhoff EM7004. The speed must be calculated using ddt. I don't know if I used another encoder module.

thank you for everything. I would like to try various things that can be considered.

Please Log in or Create an account to join the conversation.

More
17 May 2022 12:26 #243144 by andypugh
Setting I gain to zero was intended as a test only. The fact that it worked seems to suggest that my theory about what is happening is correct.

If index-enable is configured in the pid_sp then I think that the problem now is that the ddt, pid and encoder read are running in the wrong order.

Currently you have (keeping only the relevant items)
addf lcec.read-all servo-thread
addf ddt_spPos servo-thread
addf pid_sp.do-pid-calcs         servo-thread
addf lcec.write-all servo-thread

Which, actually, looks correct.

It might be possible to mask (but not fix) the issue by using:

pid.N.maxerrorI float in

Limit on error integrator. The error integrator used by the Igain term will be limited to this value, unless it is zero. Can be used to prevent integrator windup and the resulting overshoot during/after sustained errors. Not normally needed.


add
setp pid_sp.maxerrorI 500

To the HAL file and see if that helps.

500 is a guess. It might need to be higher to get spindle speed control, or lower to have the required result.

Please Log in or Create an account to join the conversation.

More
17 May 2022 23:51 #243223 by Masa
Replied by Masa on topic Rigid tapping and PID control
Thank you, andypugh.

setp pid_sp.maxerrorI 0.8

This value seems to solve the problem. If this value is small, it approaches I gain = 0, and if it is large, the acceleration will be large at the start and it will be a runaway.

Thank you for your proper advice.

Please Log in or Create an account to join the conversation.

More
18 May 2022 00:03 #243227 by andypugh
I have raised a request that this be addressed in the lcec driver:

github.com/sittner/linuxcnc-ethercat/issues/113

Please Log in or Create an account to join the conversation.

Time to create page: 1.763 seconds
Powered by Kunena Forum