I have a motor with an quadrature encoder attached.
Reading the encoder, I can get the counts okay.
I would like to be able to go to a certain position (count), using a set max speed, a set acell and decell rate, possible a S curve for smooth operation, including some sort sort of correction in case of over/under shoot.
I have searched this site but not found anything.
Google hasn't produced much either. Either some very theoretical paper or nothing complete
You could use the AccelStepper library, keep track of the encoder counts while in your stepper.run() loop, then correct / stop / restart if what you expected to see isn't what the encoder says it sees.
Well, from what I can gather, I properly need to update speed/count/corrections every 1mS or so.
It seems that generally a PI function is used, instead of a PID, when it comes to motor control.
I'll spend some time trolling through PIC, Freescale, etc website looking for papers.
Some of the specific motor control chips may have some S/W that I can look at.