Dual Loop PID Control w/ External Velocity Loop

More
26 Mar 2020 21:03 #161618 by apt403
Howdy,

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.

Thanks,

- Apt

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

More
28 Mar 2020 12:38 #161800 by andypugh

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.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum