Expected machine wiggle/resonance/tolerance at speed?

So I think I’m finally near the end of my tweaking and tuning journey, I still need to do final shimming of the gantry. Using a laser as a “path tracer” I’m still seeing about 0.005" of 20Hz vibration/wiggle/resonance in the lines the laser leaves. This is at about 2000 mm/min. The tuning software says about 0.001 of this is servo tracking. Heck, the laser itself might be flexing.

Yes, I can run slower and get cleaner lines, but my question here is - what do people think the limits of this machine (pro 60x120) are? How fast do you think you can reliably run, and how accurate do you assume your cuts et al are? What are reasonable max’s for roughing vs finish, just because of machine rigidity?

Without some comparison, I don’t know if my results are great or terrible…

FWIW, the design limit of these servos is about 6000 IPM, which I am a bit scared to approach without caution… 1000 IPM rapids is possible but I’m limiting it to 500 for now due to power supply limitations.

I got a KX134 accelerometer and hooked up back last year. It’s still on the machine and it’s constantly recording when I run. It has certainly opened my eyes as to the true performance of the machine.

I’m not going to publish the numbers I see because with these DIY machines my numbers wouldn’t be yours.

But! You are running LinuxCNC so your post processor does allow you to alter your acceleration curves on the fly. In Mach4 it has a table of presets which just absolutely… Well. You know :rofl:

Go to sparkfun.com and get a KX134 and just read it and log to the serial port and save that to a file. There are plenty of examples of plotting it in spreadsheets. I placed mine on the Z axis so I get a pretty clear picture but I wish there was a way to eliminate the spindle vibration. When I cut plasma, wow, yeah. You can really see where you are at.

I am not surprised at your numbers but I am jealous.

Heh, that tells me a lot, too :slight_smile: Of course, I’ve spent a TON of time working on this, so I’m glad I got something to be jealous of. Now, if only I didn’t need it to be a bit better… I guess slower it is

I like the accelerometer idea. I suppose I could just strap my cell phone to the spindle too. Now I get to go down another rabbit hole… :slight_smile:

Er, it occurs to me that I need to plot the accelerometer data alongside the encoder data, which means custom software… again…

I was thinking of syncing the data to the g-code line numbers.

If you can play back the g-code and the data together then you can isolate the cause of many of these problems.

When I get this tool changer into production I will look into this as it is a major thorn in my side.

It would be nice if you could beat me to it though :grin:

In my case I have a custom gtk app that listens to a serial port on the bldc driver board and can plot the motion/current/lag information in real time, at 10 KHz. If I can get the accelerometer data into the laptop at the same time, I can plot actual motion against driven motion. Other than natural resonance, I’m not sure what I can do with the data, as linuxcnc doesn’t have an easy way to work around this for me (remember, I’m using a step/dir interface, not native servo control)

I can look at what the laser’s drawing and see which gcode causes which vibrations.

Oh, you aren’t going to be able to make the machine smarter. But what you can do is tune the acceleration curves whereas we can’t.

I forget where it was but I had several posts with one of our laser guys about this. They were trying to futz with the global max acceleration and I was telling them it was a waste of time. I specifically compared LinuxCNC and Mach4 and the fact you have a preset table in Mach4 and you have a parameter in the g-code in LinuxCNC.

So you would tune out the vibration using your post processor is where I am going with this. I would look all of this up for you again but I am buried in bad news for the next few weeks. Ugh! :weary:

Ok, I found my notes;

LinuxCNC uses G64 but with a P word that sets the path-blending error.

So normally the G64 enables CV mode. But doing something like this;

G64 P0.01

Would enable the CV mode with a path tolerance of 0.01 units.

Of course G61 will put you back into EP (exact path).

In LinuxCNC you set the global value in the INI file, just in case you forgot.

There is no question that Newfangled’s approach is inferior. Look up tables are just garbage.



Yeah, I know about G64. The latest official release of linuxcnc resets it to “infinity” each time you E-stop. I’ve wrecked a few jobs because of that, and one tool pocket. I’ve backported the patch for it but haven’t tested it. All my scripts and jobs set it to 0.001 at the moment.

Next time I’m down there I’ll try setting G64 a bit higher than the wiggle I’m seeing and see if that “fixes” it.

It doesn’t look like linuxcnc has any way to monitor an accelerometer while running to “tune out” resonance on the fly, though, like the latest 3D printer software does.

Give it time.

I can promise you it will be available to you long before we get it in Mach4.

I built a Voron 2.4 3D printer which is run by a program called Klipper. Klipper supports 2 different 3 axes 9 Degrees of Freedom accelerometers to do what they call input shaping. It detects ringing (harmonics) in the printer and can auto-tune some of it out besides building graphs. Klipper is open source so the code is available. I started looking at this but by not being a software guy I didn’t get very far. Auto tuning is out but a standalone system to gather data may help a lot. Just my 2¢.

Yup, Klipper was what I was thinking of… not that I want to run my mill with it :wink:

Yep, it is filtering down slowly from the high end systems. It isn’t hard to implement. Sparkfun has lots of examples and of course their QWIIC system is darn cool for connecting them up.

Now, all that said, you can only account for so much through mechanical manipulation (like for instance Teknic’s G-Stop). Eventually you will have to also implement a “Tuned Mass” damped system. Something more advanced like an eddie current friction style TMD like they use on F15/18 fighter jet tails.

More projects, more chances to make money I guess.

This is what I am talking about;

Of course if you want to understand this more in depth;

I’m not saying to run our CNC on Klipper just that the source code is available. Someone should be able to dig out the part of the code we need. It’s used to tune the acceleration and the deacceleration values to reduce harmonics. Not sure if PID is involved. Because the core of Mach4 is written in C or C++ I think it could be added or used as a stand alone tool.

Those are pretty good results. It isn’t as much about how high your feedrate is, its about how you get it up to speed. You have a nice tunable system that can dynamically change the acceleration profile so that it doesn’t create a hard impulse that would stimulate the system’s resonant frequency as bad. Mach4 is dumb and just has a fixed acceleration value. You can reduce the acceleration setting in Mach4, but it comes at a much larger cost to getting up to speed vs. a system like yours, which means you spend less time at the feedrate you want (especially on “artsy” toolpaths that have very few long straight vectors), and it takes longer to run the full toolpath.

On my 48x48 system with stock ESS and Mach4, I can get the peak to peak oscilation below 0.005" if I want. The Y axis direction is the hard one on my machine, its just springier (lots more mass to move for one thing). I have to run 10i/s^2 or so to get to 0.005" or less. At that acceleration it takes 1.3sec to get to your 2000mm/min speed. I’m sure you get up to speed in a much shorter time.

I’d be really curious to see how fast your machine gets up to speed just to compare to fixed acceleration. Does your software give you any info on that when you plug in your settings? Or we could run a complicated laser toolpath between the two machines to see what the overall runtime difference is.

Just watch the first 5 minutes of the “19. Introduction to Mechanical Vibration”

There is a reason he uses that aluminum rod. The longitudinal vibration vs bending vibration frequencies are audible and gives you a very clear picture of what is happening in your machines.

The bending vibration is short lived and very low frequency. It will manifest as short period low frequency oscillation in your laser or surface finish. I think @Bstanga posted a great picture of a laser etching that showed that beautifully a while back. Every time there was a change in direction of travel it was followed by short period, low frequency oscillations.

So most of the time we are talking about “bending mode vibration.”

What was described as “longitudinal vibration” is also present and mostly comes from the motors, whether the drive or the spindle. Those manifest as rough patches in the surface finish. Since those waves last longer and are higher frequency they tend to not be noticed as much. They produce a matte like finish. You would never notice it in wood.

So, something to think about.

So I changed the accel limits to 100x normal and bumped max speed to 2000 IPM. Turns out the mesa card didn’t like that clock speed, but oh well :wink: After testing I reset it all back to “normal” for now, and 1000 IPM max (that’s still “length of my table” in 7 seconds)

Keep in mind that with the PRO setup, 1 motor rev is about 1 inch of travel, so RPM = IPM. I’m reading RPM in my software but I’ll report IPM below.

My math might be wrong (I never discount that possibility) but it looks like the following…

X axis

0 to 1130 IPM in 0.27 sec (er, 250,000 I/M^2 ish ? 70 I/s^2)
0 to 1560 in 0.67s (er, 140,000 I/M^2 ish, 39 I/s^2 - accel started dropping off as my tiny power supply gave up and browned out; I have a bigger one but it needs 240VAC wiring)

1232 down to 0 in 0.0815 sec (er, 900,000 I/M^2, 252 I/s^2). I could visibly see the carriage overshoot the target and come back.

Also, at about 1600 IPM either linuxcnc hung or I got a “following error” (which should not be possible, as that feedback is missing). It’s not much of a PC so maybe there are software limits too.

Y axis

0 to 1300 IPM in 0.148 sec (527,000 I/M^2 ish, 146 I/s^s). The Y axis is tuned more aggressively for the extra mass, IIRC about 4X the P value.

Note that these are what the motors can do, and that they are NOT accurately tracking where they should be at those accelerations. Position accuracy is WAY off here (servos, not steppers). Also, these are 1/2 HP (400W) servos.

I’ve never looked at the servos or their setup before, so I’m curious about the tuning knobs they give you. That acceleration you are stating is the max allowed, and then I assume you give it other parameters (like maybe the mass of the moving part and its oscilation frequency or spring constant?) and then it works out the best acceleration profile for all of that, but not to exceed the max acceleration you entered? So the average acceleration is probably slightly lower than the max since it is going to “soft start” as it gets going and probably as it aproaches the programmed feedrate.

So, which settings were you using to get the 0.005" p-p oscillation, the really high ones that were giving the positional errors, or the “normal” one? If it was the really high ones, then thats a really impressive vibration number.

Just for comparisons sake, I have the NEMA 34s steppers and I can go up to around 125i/s^2 (constant of course) without losing steps on the X axis. Y axis is probably less, but I haven’t pushed it since I don’t really have any need to run that axis that hard (I only do the X that hard when I’m goofing around with fast laser rastering, but thats only for play, there really isn’t much point in that because most materials don’t burn that well with that short of a pixel duration).

1 Like

Heh, you missed the part in my build thread where I explained that these are custom servo drivers designed and built by me. If there’s a knob to turn, it’s because I put it there. The acceleration I’m giving with all that math is what happens when you give the servos max current and let them rip… at least, under linuxcnc’s max acceleration curves, which I can tell are even faster.

The 0.005" oscillation is under normal accel, which is 30 I/s^2

1 Like