Mesa 7i77 and linear encoder tuning PID.

More
25 Aug 2012 12:47 #23659 by VNR

Editing source code for the control and re-compiling is a step too far! I’ve forgotten what it was I set out to do!

Don't worry, use standard HAL components.

This is way beyond my capabilities, please explain ….. how do I add the two, D and DD and then scale ….
I get the principle … and I get the math’s, I just have no idea how to do that in HAL

Try with tristate_float to linuxcnc.org/docs/html/man/man9/tristate_float.9.html to get an output of errorD only when commandDD is not 0
then use sum2 linuxcnc.org/docs/html/man/man9/sum2.9.html to sum that output and commandDD with scaling parameters and offset.

Don't forget to use the encoder as velocity feedback instead of the linear scale.

Sometimes I forget, I set out to make a scale model of an engine … ended up making / rebuilding the machines so I could make the model engine, then configuration of the CNC control and everything that goes with it, so I can control the machine I rebuilt ….. to build the model engine ……. Editing source code for the control and re-compiling is a step too far! I’ve forgotten what it was I set out to do!

I was going to make some money with an old manual lathe converted to CNC... but i ended up converting in a pseudo electronic technician, programmer and linuxcnc expert. Now the money seems further away than before. :laugh:

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

More
26 Aug 2012 01:02 - 26 Aug 2012 01:07 #23663 by PCW
I think theres got to be something fundamentally wrong here to require all these work-arounds
Tuning is just not this hard unless theres something wrong with the "plant"

Guesses:

Trouble with mechanics, too much spring in belt, etc

Trouble with drive (to much delay from command to torque etc)

I would be tempted to try the drive in pure torque mode with 0 filtering so that Linux CNC has full control of the loops
(other than current/torque of course) For this is would not use the linear scale at all, only the rotary encoder

Then I would first try D by itself and verify that you can get decent viscous damping (by feel)
to verify that everything is correct in the hal file and that the drive does not simply have too much delay to be stable

My 2 cents
Last edit: 26 Aug 2012 01:07 by PCW.

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

More
28 Aug 2012 14:00 #23713 by ROG
Just to update everyone...

Given that the one thing that’s given me so much grief is the 3 or so micron spike at the beginning of any move from a static position, and that the FE during the cruse phase is predominantly well under a micron, I think it’s time to move on and get the lathe actually cutting and see how things go.
I’m pretty much convinced that the drives are the main problem. Obviously there is delay in any mechanical system, but I don’t think that is what the main cause of the problem is.
I think there could be some scope for improvement by sending something to the Torque ref on the drive, but it seems to be create more of a problem than it solves at the moment.
I’ll stay on the lookout for replacement drives and make a start in the spindle drive.
If there’s anything interesting to report, I’ll post details.

Just to say thanks to everyone that has helped and contributed, it’s been much appreciated.

Rog

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

Time to create page: 0.084 seconds
Powered by Kunena Forum