Page 1 of 1

AllIn1DC Homing Oscillation

Posted: Tue Jan 24, 2023 3:04 pm
by tm-todd
Hi, I am a member of makerspace in Colorado and I have completed an AllIn1DC upgrade to our old Mitek 3-axis bed mill. I re-used the existing Glentek DC servomotors. It has all gone really well except for one issue. I am getting some oscillation/jerkiness during the homing of all 3 axes. I have attached my report.zip file and a link to a video showing the oscillation.
Here is the debug I've done so far. The issue seems to be related to having backlash compensation turned on. There is around 0.006" of backlash in all 3 axes. It is an old machine, and I know the backlash is more than what Centroid recommends, but being a non profit we barely scraped enough money together to do the upgrade. Upgrading the ballscrews isn't in the budget at this time. I am aware of the limitation of fixing backlash in software vs mechanics, but the limitations are good enough for occasional hobbyist use. Anyway, if I turn backlash compensation to zero, the oscillation goes away. If I turn down backlash compensation to 0.001", the oscillation is still there but a lot less noticeable. Also, if I detune the PID loops back to their "defaults" the oscillation amplitude is also reduced. This oscillation is not observed during normal operations running G-code, ONLY during he homing sequence. It seems to me that with backlash compensation turned on, the commanded position is somehow getting an instantaneous step change, sending an impulse into the servo loop causing the oscillation. Basically, a very high acceleration. For now, I've detuned the PID loops to minimize the homing oscillation, but leaving backlash compensation set to the appropriate 0.006"-ish value. Can Centroid verify my findings?

Video link: https://youtu.be/fQA1K_uk4t4

Re: AllIn1DC Homing Oscillation

Posted: Tue Jan 24, 2023 3:41 pm
by cnckeith
hello.

how did you determine the pid values to use with these motors?

other observations.

2000 counts per rev on x and y but 4000 on Z?

x and y motors look belted to the ballscrew, what is the ratio? (what size are the pulleys on the ballscrew and what size on the axis motor? how many teeth?)

.006 is a lot of backlash for a machine like this. most backlash will come from the ballscrew support bearings, (people tend to blame the ballscrew itself but its actually the support bearings that are installed wrong or are the wrong type that introduce this amount of backlash into the system. so i would take a look there.

Re: AllIn1DC Homing Oscillation

Posted: Tue Jan 24, 2023 3:54 pm
by cncsnw
Cut Ki in half (to 0.002).
Maybe also cut Kp in half.

Most important: remove the aluminum handwheels. They act as a flywheel on the end of the ballscrew, and cause multiple controllability problems. If you want to keep manual operation, buy or make some plastic handwheels, or small-diameter (3" to 4") knurled aluminum wheels.

Higher-resolution encoders would be a good investment as well.

Re: AllIn1DC Homing Oscillation

Posted: Wed Jan 25, 2023 10:49 am
by tm-todd
Thanks for the reply Keith. For the PID values, I went through the manual tuning process as outlined in the manual and TB, also drawing upon my 15 yr experience as a servo engineer.
Yes, good catch on the 2000 vs 4000 counts. Saying that I reused the existing motor wasn't entirely true, but not totally relevant to this situation.The original y-axis motor had a low impedance ground fault between the armature to chassis (varied between 600-3kohms) likely due to machine oil ingress into the motor internals. We purchased a new motor, moved the original z-axis motor to the y-axis and installed the new motor on the z-axis. The new motor encoder has a higher line count. All 3-axes have the homing only oscillation. The z-axis is out frame in the video but you can hear the oscillation in z in the first few secs of the video.
All 3 axes have 5:1 ballscrews and timing belt pulley ratio is 2:1 so 10:1 final ratio. So, we just barely meet the minimum 20,000 cnts per in requirement. I checked with sales before purchase and they said your are fine, but higher is always better.
Good point about the aluminum handwheels. I didn't think about that. You are probably right about the source of backlash being the thrust/angular contact bearings, if that's even what they are. On the y-axis the handwheel actually acts as a spacer and the mounting nut is what sets the bearing preload. Not thrilled with that design, but it's what we have.
I can play with the PID parameters as you suggest, but then I will be back to an underdamped situation during normal operations. My hunch is that when the limit switch is hit the controller immediately commands a reverse by the backlash amount, without any consideration for a reasonable acceleration value. With larger backlash, this will input a bigger impulse into the servo loop causing larger oscillations.

Re: AllIn1DC Homing Oscillation

Posted: Wed Jan 25, 2023 5:56 pm
by cnckeith
cncsnw wrote: Tue Jan 24, 2023 3:54 pm Cut Ki in half (to 0.002).
Maybe also cut Kp in half.

Most important: remove the aluminum handwheels. They act as a flywheel on the end of the ballscrew, and cause multiple controllability problems. If you want to keep manual operation, buy or make some plastic handwheels, or small-diameter (3" to 4") knurled aluminum wheels.

Higher-resolution encoders would be a good investment as well.
i second that!

i've heavily drilled out large handwheels to lighten the handwheel/flywheel and reduce inertia to eliminate this problem when customers wanted to keep them. but marc's suggestions are best.

Re: AllIn1DC Homing Oscillation

Posted: Wed Jan 25, 2023 8:49 pm
by tblough
I actually have these Kipp handwheels with fold-away handles on my machines and I love them. Light weight reinforced plastic for low inertia with rims that are easy to grip with the handles folded for small adjustments or very easy to use with the rotating handles extended for long moves. With the handles folded, they are well balanced for rapid power moves.

https://www.mscdirect.com/browse/tn?sea ... way+Handle
0072165-21.jpg
Be sure and fold the handle when in automatic mode, especially on the Y axis. You'll only make that mistake one time :o

Re: AllIn1DC Homing Oscillation

Posted: Thu Jan 26, 2023 1:56 pm
by cnckeith
thanks Tom, good info!