Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables
Tom, thanks for digging into it.
My prior note about 10-14hz was for my prior tuning when I wrote it. After that, I did make the more aggressive tune that I used to generate the graphs and files. Yes, I then noticed and agree it was more proportional to the screw speed. I found it interesting that the motor output did not seem to follow/lead the position much in the areas of greater oscillation at the faster speeds. Maybe it does and I simply did not recognize it (EDIT: Looking again I do notice the mild corrections in output). I am still hopeful there is some way to dampen that in control.?
An interesting note about the area you measured, that was the returning direction of the step. That direction seems to be pretty smooth at the machine even with the oscillating position noted. The earlier direction in the step is where the chatter/shuddering appears more noticeable. Also interesting about this, with my prior screw and bearing setup, the directions of more chatter was the reverse. The only reverse of the new mechanics are the location of the fully fixed end of the screw were at the opposite end of the screw from the motor before, now at the motor. I now also keep a small amount of pretension on the screw (about 100 lbs). The direction that is more problematic is going toward the motor/fixed end. I would expect it to be the opposite if it were maybe screw compression causing an issue.
Another additional note about the location of most chatter... It is not very aggressive for the full length of travel. It is minor at the ends and middle. It is typically most apparent about 1/4 in from each end for a relatively short distance, maybe about 1/8-1/4 of the length of travel. This is again similar to my prior mechanics.
Regarding possible motor and pulley balance... For fun (yeah right) I swapped out my servo last night with a never used spare and found identical results. Actually, the data I posted was with the new servo. The new pulleys are really nice and suppose to be extremely concentric and balanced from CMT (https://www.cmtco.com/product-catalo...timing-pulleys). There again, full part exchange from the prior with similar oscillation results. It may be better than before, but not by much.
As I noted a while ago, I also installed new plain linear bearings from igus last year without any significant improvement. Yesterday, I cleaned and inspected the 1.25" dia rails (unhardened) in case there was a misalignment or boogers in the areas of most concern. I found one small ding I didn't think was culprit, but I stoned it just in case. I checked the rest of the rails and did not find any clear problems. Also, when the ballscrew was out of the machine, I was able to move the carriage by hand without any hiccups. I will say I keep coming back to the rails and linear bearings as a more probable source of mechanically injected oscillation since the knuckleheads that originally built the machine did not use appropriate bearing and rail spacing, but it does seem to move OK without sticking or binding and doesn't seem to be a likely source of the rotational linked frequency. However, I could see possible stiction of this style linear system resonating with the oscillation seen at the screw/step response at those more pesky areas of the travel.
I tested changing the belt tension with little change as well. Tried applying forces on the energy chain between X and Z in case it was tweaking the carriage just enough to cause bearing bind, no or little difference. I have changed out or tested the impact of everything I can think of with the mechanical. Short of rechecking for some loose screws, I am at a loss as to a real source.
Something that I keep coming back to that gives me some reason to believe this can be lessened by control loop is that my previous Centroid controller from the late 90's did not have the exaggerated chatter problem. Even with the same mechanics, as soon as it was moved to kflop and snapamp, the issue was apparent. Where the Centroid control was only configurable to P, I, and D, without any filtering configurable (at least that I recall) maybe it was soooo loose in how it was capable of following, sometimes more faceted as well, that it never became an apparent issue. Now that I do have the far better and preferred Dynomotion controls, maybe I am out of that ignorant bliss of the chatter free and sloppy operation.
Most of my parts to cut with this machine are small with fine detail in plastics. Trying not to lose those with a looser control loop, but fine detail with chatter is probably worse than smooth with less detail. I had tried much softer and sluggish tunes that still had the problem, but did not dig too far into them to see if I could find a sweet spot. What count of error would you suggest I allow with a less aggressive tune?
Thanks again,
Jason
3 Attachment(s)
Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables
Well, I found a few things.
I removed the belt from the motor and got this:
https://www.cnczone.com/forums/attac...d=434730&stc=1
The closeup matches the pattern of the previous plots pretty close and has the same frequency as the motor rotation. Sure, the tune should be different without the load. I tried several basic tunes and still saw the pattern. I swapped my old servo back and it does it too. The old servo may be a little bit noisier. These are baldor servo motors (see attached and for details of the MT-3363-C which is pretty close to the model I have). Should I expect this as a normal and acceptable for this setup, or is this a sign of a known motor driver or motor issue? Would any of the other watchdog or soft limit monitoring impact it?
Found a mechanical issue... I took a look at my bracket that the ball nut screws into at the Z carriage. There seems to be some issue there with alignment. Between that and a little wobble/bend in the ball screw, I think this is where the mechanical side of the chatter/shudder may be coming from. When I apply my full preload of the anti-backlash ball nut (max 240 lbs) it gets exaggerated. When I back it off, it is far better. The misalignment is applying a little flex to the screw which exaggerates, or may even be the cause of the screw wobble. This is challenging to correct. Almost tempted to make a ball mount for the ball nuts to fully self align to the screw and tell it to get back to work, but that would be a sloppy avoidance of finding the underlying cause. At least I found some real evidence of a dirty culprit.
I still think the oscillation with the motor/control is making those other things worse and would like to smooth it more, but maybe the nut mount is my major pain. I will see what I can do with it and re-align my ballscrew then get back to post.
Anybody need a large boat anchor????
1 Attachment(s)
Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables
Hi Jason,
Quote:
An interesting note about the area you measured, that was the returning direction of the step. That direction seems to be pretty smooth at the machine even with the oscillating position noted. The earlier direction in the step is where the chatter/shuddering appears more noticeable.
It would have been nice to know where in the plot the chatter occurs. I guess now you are saying 1/4 of travel from the ends and not at the ends or middle and only going in the positive direction. How long is the machine's travel? It seems you are testing a move of ~ 4 inches?
Quote:
Regarding possible motor and pulley balance... For fun (yeah right) I swapped out my servo last night with a never used spare and found identical results. Actually, the data I posted was with the new servo. The new pulleys are really nice and suppose to be extremely concentric and balanced from CMT (
https://www.cmtco.com/product-catalo...timing-pulleys).
Actually that pulley clamping method would seem to me to possibly make the pulley off center slightly. Doesn't the "Tighten" screw basically offset the shaft until it becomes tight? The shaft would need to be an exact size to be centered. Realize we are looking for a very small error of only several encoder counts which is something like 0.0001 inches.
Quote:
I removed the belt from the motor and got this:
The closeup matches the pattern of the previous plots pretty close and has the same frequency as the motor rotation. Sure, the tune should be different without the load. I tried several basic tunes and still saw the pattern. I swapped my old servo back and it does it too. The old servo may be a little bit noisier. These are baldor servo motors (see attached and for details of the MT-3363-C which is pretty close to the model I have). Should I expect this as a normal and acceptable for this setup, or is this a sign of a known motor driver or motor issue?
It seems you are referring to the ~ 0.5 count 26.3Hz p-p variation shown here? The one count of encoder quantization noise makes it hard to see. Significantly less than with the load attached.
This might be caused by the encoder. If the encoder is not perfectly centered it ,may cause such a non-linearity.
It might be fun to try to add a tiny sinusoidal correction factor.
Attachment 434746
Quote:
Something that I keep coming back to that gives me some reason to believe this can be lessened by control loop is that my previous Centroid controller from the late 90's did not have the exaggerated chatter problem. Even with the same mechanics, as soon as it was moved to kflop and snapamp, the issue was apparent. Where the Centroid control was only configurable to P, I, and D, without any filtering configurable (at least that I recall) maybe it was soooo loose in how it was capable of following, sometimes more faceted as well, that it never became an apparent issue. Now that I do have the far better and preferred Dynomotion controls, maybe I am out of that ignorant bliss of the chatter free and sloppy operation.
Most of my parts to cut with this machine are small with fine detail in plastics. Trying not to lose those with a looser control loop, but fine detail with chatter is probably worse than smooth with less detail. I had tried much softer and sluggish tunes that still had the problem, but did not dig too far into them to see if I could find a sweet spot. What count of error would you suggest I allow with a less aggressive tune?
Hard to say. Because the "chatter" changes in direction and position I would expect it to be something mechanical (stiction, compliance, binding, etc).
Since we can't seem to identify the "chatter" in the encoder position the servo isn't likely to be able to help with it.
Too bad we don't have linear scales to try to observe it.
To make the servo sloppy so the output is smooth and constant I would reduce the PID gains by a factor of 10 or more.
Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables
Could you make a chart that shows positional error over time? Also, what are the units on the graph? It would be good to see some zoomed in portions of the graph so that we could see real time performance a bit better.
- - - Updated - - -
By positional error, I mean actual position vs commanded position.
Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables
Hi burbingus,
Those are Position error vs time. Error is in Encoder counts at the motor. Resolution is 28000 counts/inch. If you download our software you can load in the data and zoom in as you wish and plot it in various ways.