Dual Loop PID Control w/ External Velocity Loop
I've got an application that calls for dual encoder feedback on the servos. Rotary for velocity control, linear for position control. I know LinuxCNC is setup to do this natively. The hitch is, I also need a non-trapezoidal motion profile.
I would prefer to use LinuxCNC as it's open source, and I can easily implement the backend logic and operator interface requirements for this project.
Now, there do exist closed loop servos (ClearPath, etc) that handle the acceleration profiles internally. Would it be practical to try and implement the dual loop PID by using LinuxCNC for the positional portion (feeding it the linear scale output for error correction), and simply sending velocity control signals to a ClearPath?
Following errors will abound, since the motor isn't following LinuxCNC's instructions. The question then becomes, I suppose, 'how much error is too much?'.
There are a few posts w/ folks who have used closed loop steppers/servos in LinuxCNC, and it seems like w/ conservative settings for acceleration smoothing on the motor side, they've been able to use them. Not sure about trying to cascade multiple loops together, however.
apt403 wrote: I've got an application that calls for dual encoder feedback on the servos. Rotary for velocity control, linear for position control. I know LinuxCNC is setup to do this natively. The hitch is, I also need a non-trapezoidal motion profile.
Is the requirement purely to have accurate positioning using the linear encoders?
If so, then I would suggest running the servos in position control, with their internal jerk limits, and use a single LinuxCNC PID purely as a correction.
I think that in this arrangement the LinuxCNC would be almost entirely using FF0 to pass the position commands straight through, but with a hint of I-gain to tweak the commanded position. The LinuxCNC PID would use the linear scale for feedback, the servo drives would use the motor encoders.
I see. Thank you for the info. That arrangement *seemed* like it would work, but without having practical experience, it's very helpful to have that confirmation.
I'll update this thread w/ any relevant setup/config info when I've got the system up and running.