Author Topic: Practical guide to servo tuning  (Read 1572 times)

0 Members and 1 Guest are viewing this topic.

Offline JesterTopic starter

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Practical guide to servo tuning
« on: January 05, 2025, 11:07:28 am »
I have added CNC capability to two mills in the past from scratch, no kits, I'm now doing the same for my lathe.

First mill I used steppers and Mach, it worked fairly well but had limitations. Second mill I used servos and even with minimal tuning (because I'm basically clueless in this sphere), they are vastly superior to the steppers I used in the past in several ways; speed, usable power, noise etc. I chose to use less expensive T6 ac servos from StepperOnline and my understanding is that these are actually made by Leadshine?

The one thing really lacking with these particular drives is a proper guide on how to tune them. The vendor does supply calibration software that allows graphical response to step changes and even an auto-tune feature, however the written description on the logical steps to actually use the software are sorely lacking.

I realize servo tuning can be fairly complex on large and complex systems, however these are 1HP servo's on a 400lb lathe so I'm not exactly trying to land a Space-X rocket on the pad in reverse. I'm an EE by training, I'm happy to read or watch videos on the process I just need to be pointed in the right direction.

Advice and links to a decent guide or video are welcome.

Please and thank you.
 

Offline timeandfrequency

  • Frequent Contributor
  • **
  • Posts: 497
  • Country: fr
Re: Practical guide to servo tuning
« Reply #1 on: January 05, 2025, 07:56:10 pm »
Hello Jester,

It would be so nice that you provide some links about the drives/servomotors you are seeking help for.

In the meantime, here are two videos about the autotune feature of 'LS  Electric' servo drive :
https://www.youtube.com/watch?  v=hX5obmQgc8Y  (edit URL to remove space characters)
https://www.youtube.com/watch?  v=0BSzOueDWmo  (edit URL to remove space characters)

AC servo drive tuning means setting up the PID control loop parameters. You want the fastest tracking to an input step, but without any overshoot. If the latter exists, you will eat more matter than expected and - worst case- ruin your machined part.
« Last Edit: January 06, 2025, 12:43:23 pm by timeandfrequency »
 
The following users thanked this post: Jester

Offline JesterTopic starter

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
 

Offline timeandfrequency

  • Frequent Contributor
  • **
  • Posts: 497
  • Country: fr
Re: Practical guide to servo tuning
« Reply #3 on: January 06, 2025, 12:42:51 pm »
Hello Jester,

How to autotune these drives seems a rather frequent request.

I had a look in the full manual (144 pages). There seem to be only limited autotune features provided by this servo kit.
I could find those parameters that have something to do with the functionnality :
Pr0.00 Mode loop gain
Pr0.01 Control Mode Setup
Pr0.02 Real-time Auto-gain  Tuning
Pr0.03 Selection of machine stiffness at real- time auto-gain tuning

I guess you will have to make most of the adjustement and tuning manually. There seems to be only a loop gain involved in autotune. I could not find any Integral or Derivative parameter in the manual. Pretty weird, unless there's a different kind of control regulator than a PID that is used inside the drive. The post of 'joeavaerage' in the thead linked above talks about multiple 'notch filters' and underscores the importance of calculating the moment of inertia ratio. I have to admit that position/velocity control loops using notch filters (*) are uncharted territory for me, and it might certainly be interesting to dive into that subject.
Perhaps that other members on this forum have extensive knowledge of how to deal with this kind of control loop ?

(*) Notch filters were used in the past with PIDs to limit chassis ringing or general noise issues. But this seems to be something different.


Did you install the 'Debug software' where it seems that parameters of current loop, velocity loop, position loop, and change the value of input and output signals and the parameter of motor can be adjusted ?
I found this video 'Auto Tuning with Motion Studio'. Is it the same software than the one provided by Stepperonline or was it actually beefed-up by Basicmicro ?

You can google 'CNC PID Control loop adjustment' and 'CNC Notch filter Control loop adjustment' for howtos documents. It is a good practice to stick an accelerometer and/or a digital linear scale on the axis to see how it behaves : If your ballscrew has some backlash or chassis shows up some resonance or lack of stiffness, the internal software oscilloscope will not be able to show the true motion of the axis.


Pièce of advice
Before buying a closed loop (or dual closed loop) servo drive system, it is wise to check the features the drive and it's setup software provide.
We are here in a different realm than for open loop steppers, where acceleration ramps, current per phase and # of steps per revolution are the main parameters.
In closed loop systems (for steppers and for 3 phase brushless servos), electrical (winding inductance), mechanical (motor + load static and dynamic inertia), control loop type (PI, PID), mechanical brake or regenerative resistor management, resonance management and autotune convergence algorithm become very important.
Always prefer brushless servos with a brake (quite compulsory for the Z axis of a mill, unles the latter is weight compensated). For a small lathe, the brake feature is not really required.
Depending on the drive setup, the result on the machined part can start from total fail (dents, round corners) to full respect of all tolerances especially on curved trajectories, showing a very smooth surface finish.

Most of the time, the result of the autotune feature is just average, and you have to go manually to improve it. Especially when it goes to vibration/chassis ringing avoidance, much effort and patience is required.
For your guidance, on a fully unknown CNC PID based control system, a skilled technician needs two to four days to perform the setup of a medium sized 4 axis CNC production workshop mill that weights between 3 to 6 tons.

Update #1 : contents enhanced, especially about notch filters control loops.
« Last Edit: January 07, 2025, 05:12:00 am by timeandfrequency »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->