- Posts: 17533
- Thank you received: 5334
Please Log in or Create an account to join the conversation.
PCW wrote: Hey, didn't you add the velocity-rpm pin to the software and HM2 encoder?
That simplifies the PID setup
Please Log in or Create an account to join the conversation.
andypugh wrote: Y
Basically:
spindle-speed-command => PID command
spindle-speed-feedback => PID feedback
PID-output => PWM value
Be aware of units. Use a revs-per-second spindle speed command, as encoder velocity is in revs-per-second.
Please Log in or Create an account to join the conversation.
andypugh wrote: Yes, this is a perfect application for a PID controller.
There is an example here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
But it isn't a very good one.... It adds the PID output on to the spindle speed command. I presume this is because it is old and dates to a time before the PID component included feed-forward terms.
Basically:
spindle-speed-command => PID command
spindle-speed-feedback => PID feedback
PID-output => PWM value
(ie, the PID is inserted between the spindle command out and the PID command in)
Start with P, I, D all zero and adjust FF0 to give the right speed under no-load. Then adjust I (mainly) and some P to get good stiff speed control.
Be aware of units. Use a revs-per-second spindle speed command, as encoder velocity is in revs-per-second.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.