ceturtd., 2025. g. 9. janv., plkst. 23:43 — lietotājs Todd Zuercher (<tzuercher1...@gmail.com>) rakstīja: > > The inner loops output would go to the drive. The feedback for the inner > loops would be the velocity feedback from the encoder, connect that to the > same pin on the inner loop's PID component as you do the position feedback > to the outer loop. The input command of the inner loop gets fed the > velocity command from the outer loop (aka the output.). Tune the inner loop > by feeding it a small square wave command that is long enough to get up to > near the commanded velocity and a command velocity of maybe a 10th of the > machine's max. (Not so much that a good jerk won't hurt it.) Tune a much P > and D as it can handle and be stable, then add I to try to minimize > following error. You want to have the fastest rise to a smooth constant > velocity as you can get without overshoot and no wobble. >
Thank you! Really good explanation! It looks to me that I already have correct HAL setup for inner loop - joint.vel-cmd on pid.command and encoder.velocity on pid.feedback. I found a forum thread where there was similar question discussed. In this post OP has square wave and sine wave for pid command: https://forum.linuxcnc.org/10-advanced-configuration/34827-joint-vel-cmd-for-torque-pid-loop-and-linear-encoder-pid#114280 Any idea how did he acquire that signal? Are there any HAL components for this purpose that I am unaware of? Viesturs _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users