ac servo parameter tuning (milling machine) - Page 1
Forum section: electronics / projects

author: Jester
author_rank: Frequent Contributor
timestamp: January 11, 2024, 06:50:23 pm
content: Anything (control theory related) I learned in school 40 years ago is a distant memory.I'm converting an old knee style milling machine to CNC and I'm using direct coupled 750W ac servos and their associated drives and tuning software. Servo's are direct coupled 1:1 to the ball screws.I'm playing (carefully) with the X axis and can move back and forth (slowly at the moment) however in most cases when the endpoint is reached the servo starts to oscillate.Tuning parameters are shown in image below.The X-axis weighs about 125lbs unloaded and 200lbs max loaded, the Y axis about 50lbs more than the X-axisI'm looking for advice on how to tune this (decent starting values would be helpful), more important a procedure for test and tune?Thanks in advance

author: jpanhalt
author_rank: Super Contributor
timestamp: January 11, 2024, 06:59:01 pm
content: Isn't tuning just a matter mostly of setting the control loop gain? See: Clough42 series on an electronic lead screw and others. Here's the first of that series:

author: Jester
author_rank: Frequent Contributor
timestamp: January 11, 2024, 07:29:52 pm
content: Quote from: jpanhalt on January 11, 2024, 06:59:01 pmI actually have an ELS on my lathe, no tuning required it uses stepper motors, quite different

author: jpanhalt
author_rank: Super Contributor
timestamp: January 11, 2024, 07:44:16 pm
content: I believe Clough42 looked at both and settled on a "hybrid servo," which is what I got for my lathe. Unfortunately, the series is about 27 episodes, and I forgot which one showed how he tuned the servo v. stepper motor. I am not aware he ever published an index, but as I recall, it was near the middle of the series when he compared a stepper to servo. He used a drum about 5-6" diameter with cord wrapped around it to apply tension and a fish scale to measure the tension applied. Basically, it was a tradeoff between stiffness and oscillation, so he went with a lower value with less stiffness but no oscillation.As I recall, the subject was in 2 episodes so it may be easier to find. I watched almost every early episode until he got it working. I just can't recall the exact one.Edit:He also has a Wiki and one section has to do with configuration:https://github.com/clough42/electronic-leadscrew/wiki/Configuration-SettingsThat might help find the video on tuning.

author: Jester
author_rank: Frequent Contributor
timestamp: January 15, 2024, 12:29:38 pm
content: Quote from: jpanhalt on January 11, 2024, 07:44:16 pmThanks for that lead.It is interesting in that even though C42 is using a completely different servo (smaller, integrated driver and D.C.) we both experienced :- the same communication issues that were cable / driver related- discrepancies between the manual and software- polite but in the end not very unhelpful tech. supportIn the end I was able to muddle my way through the software and performance seems excellent, the table moves quickly, silently and with no oscillation or resonance.I would do more tuning (just for educational purposes) if I could get detailed answers from tech support but that appears to be a lost cause.

author: jpanhalt
author_rank: Super Contributor
timestamp: January 15, 2024, 01:36:57 pm
content: I may be asking for your help when I take the step of adding a servo to the crossfeed (X-axis) of my lathe. Right now, I am focused on the firmware and getting a linear sensor attached. The bed axis (Z-axis) is no problem.John

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 15, 2024, 05:21:40 pm
content: Using direct coupling between the servo's and the lead screw is a bad choice. Those industrial servo's generally are optimized for speeds up to 3000 rpm, and with a ball spindle with a lead of 5mm per revolution that results in a travel speed of 15m/min. (250mm/s) And that is a speed only viable for highly optimised high-end machines.If you add a transmission of 1:2 or 1:3, the maximum speed is reduced, but the available torque is also increased. This also makes it easier to tune the PID loops, as tuning the loops is not as critical anymore. Effects of (static) friction is also reduced because of the multiplication of the available torque. Even total speed may be higher, because higher acceleration can be used. I don't know which transmission ratio would work best in your application, but it is not something you should choose lightly.As for tuning the drivers,https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_methodis still a decent way to start. Especially if the auto-tuning software does not work properly. You also have to be aware of interaction of PID loops if you start stacking them. Programs like LinuxCNC can do PID loops in software (with encoder feedback) and when that is combined with PID loops in your server drivers it probably results in a big mess and instabilities.After re-reading your post:When converting an old knee-style milling machine friction is significant. Static friction makes the whole system non-linear (friction is not proportional to speed) and the slip-stick effect makes it even worse. A simple method as Ziegler-Nichols is probably insufficient.