Dual PID loops with motor encoder + scale encoder per axis

More
2 years 6 months ago #298165 by TangentAudio
It's been a busy week here, but I'm still working to wrap my head around this.  I posted a link earlier to a Galil video about dual loop compensation, and finally had a chance to watch it in detail.  It gives a good overview of the approaches and problems.  The proposed "improved dual loop" seems to be more or less the same approach that was described rather sparsely in the wiki.

Here's the video again: www.galil.com/learn/online-videos/dual-l...compensation-methods

And my re-drawing of their simplified dual loop.

 

To better my understanding I've been working through the process of translating that simplified loop to show the actual relevant HAL components and signals.  Here's my first approach.  It's much easier to understand and learn in diagram form than just seeing it as a pile of HAL commands.

 

I have not yet taken this back down to my shop to rework the config to match the drawing, but hopefully this weekend.  Anyone see any glaring mistakes or have other comments?

cheers,
Steve

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

More
2 years 6 months ago #298168 by TangentAudio
One thing I'm questioning is whether both the inner and outer PIDs should receive the same position command signal. It isn't really shown explicitly in the simplified Galil drawing, though the wiki example definitely does it this way.

Also, I want to make sure I understand the nomenclature. I think I wrongfully assumed this type of dual loop was a velocity loop (inner) and position loop (outer), but the outputs from both loops are velocities, so I think that's wrong. You can see my confusion in the initial configs I posted as I called the PIDs "vx" and "px".

Next up, the Prototrak DC servo amps are PWM input -> motor output voltage. Varying the voltage on an unloaded DC motor varies its speed (velocity). These are just amps and not closed loop drives - the motor encoder output just comes straight into the Mesa card. I am a bit confused on whether this is called "velocity mode," however. Is that term reserved for a drive which itself runs a loop with the motor encoder to maintain the commanded velocity?

Which leads me to wondering whether the velocity outputs from the motor encoders should be used. Andy, you kind of hinted at that the other day. I'm curious how you would see that fitting into this diagram.

Thanks in advance.

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

More
2 years 6 months ago #298172 by rodw
I thought the intention was to close the velocity loop on the drive/amp and to close the position loop from the scales in linuxcnc.
But I've not got any experience to add.
The following user(s) said Thank You: TangentAudio

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

More
2 years 6 months ago #298173 by TangentAudio
Hi Rod,
These 35 year old drives/amps don't have any way to close the loop internally. They're just offset PWM in -> +/- DC voltage out as far as I know. There's no microcontroller in them, and the motor encoders don't connect to them. The signals were passed directly to the primitive Prototrak Plus controller/DRO box.

cheers,
Steve

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

More
2 years 6 months ago #298176 by scotth
I assume you have a tach to close the velocity loop on the drive. The dovetail config on the Bridgeport should give you plenty of friction. Dual loop with scales should be very stable. Make sure the thrust bearings and ball screws are in good shape. The best cure for backlash problems is to fix the mechanical problems first, every thing else is to hide the real problem.

Good luck,
Scott
The following user(s) said Thank You: TangentAudio

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

More
2 years 6 months ago #298181 by TangentAudio
Hi Scott,

The motors do have 2000CPR encoders on them, but they do not tie in with the "dumb" servo amps.

The ballscrews/nuts (or maybe thrust bearings) have some wear and there is more backlash in both X and Y than I'd like to see. When/if I start spending any money to improve things on this machine, that's where it should go first. Maybe I'll luck out and the nuts can be refitted with the next size larger balls and it won't break the bank. I didn't pay that much for the machine, and it's primarily for hobby use, so I don't want it to become a money pit.

Until that time, it doesn't cost anything except my time to play around and see if I can get dual loop working. It's a good learning exercise if nothing else.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum