584,863 active members*
4,938 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Servo Motors / Drives > Tuning servos within +- 1 encoder count
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2009
    Posts
    38

    Tuning servos within +- 1 encoder count

    Greetings,
    I was wondering if anyone can teach me how to tune a servo within +- one encoder count. I read that it's possible and I've seen that some companies advertise that their products are +- one encoder count, but I wasn't able to get it.

    My system is a Dynomotion Kflop+Kanalog controlling Granite Devices VSD-E drives through +-10V. My motors are cheap chinese BLDC motors, with US Digital rotary encoders, 2000CPR. Right now I have the system tuned to +-20 counts, and the system is very stable. With the belt drive and lead screws, that means that +-20 counts corresponds to having a control that is +-.00025".
    Here's the math:
    Belt Drive: 2:1
    Lead Screw: 5 turns per inch
    Counts per inch: 8000ppr * 2 * 5 = 80000
    Resoluton = 20 counts / 80000 = .00025

    What I was thinking of doing though is experimenting with some linear scales though, and some of those are only .00025" resolution, meaning that if I did +-20 counts, my overall control resolution would go to .005", which would not give a good part.

    I learned some of the basics of servo tuning from the Galil website:
    On-Line Tutorials - Galil: We Move The World
    On there I learned that you have to tune the P and D first, then tune the feed forwards and then the I, but I wasn't able to get it to +-1 encoder count.

    Can anyone post a video or something of how to really tune a servo system properly.
    Thank you.
    Dave

  2. #2
    Join Date
    Sep 2010
    Posts
    1765
    Quote Originally Posted by speedydumpster View Post
    ..... I was wondering if anyone can teach me how to tune a servo within +- one encoder count.......

    .....Right now I have the system tuned to +-20 counts, and the system is very stable. Counts per inch: 8000ppr * 2 * 5 = 80000
    Resoluton = 20 counts / 80000 = .00025

    What I was thinking of doing though is experimenting with some linear scales though, and some of those are only .00025" resolution, meaning that if I did +-20 counts, my overall control resolution would go to .005", which would not give a good part........

    .....I learned that you have to tune the P and D first, then tune the feed forwards and then the I, but I wasn't able to get it to +-1 encoder count.....
    no comments yet so I thought I would help open the flood gates by making some.....

    So you have 80,000 PULSE per inch now..... your r thinking of going to linear scales to help..... I would suggest this could not help. here is my reasons... 1) assuming you DID get scales with more resolution, more than 80kppr will not give you any higher bandwidth - 80kppr is way more than enough to not be a limiting factor here. 2) putting the feedback on the OTHER side of your system compliance will do nothing to help you run higher bandwidth; putting it INSIDE your loop will if anything lower your gains. so i say a scale will not help your situation.

    'the system is very stable;' not necessarily the best tuning then; it is not uncommon to have a count of jitter-ness; so if you are at 20 counts and it never shakes around, your gains are lower than they have to be.

    You ask for +/-1 count error, so you are referring to when stopped. so u should realize any feedforward terms won;t make a hill of beans difference. also, feedforward terms dont get 'tuned:' they get added to a loop to reduce following error during steady state motion and/or acc/dec; so you tune the system then add any feedforward to reduce error while moving. said another way, feedforward terms do nothing to change tuning unless you make them too large and make the loop unstable by getting the actual motion feedback ahead of the command. so you can simplify your tuning to just pid terms.

    Best way to tune is to start with the inner most loops and work outwards. so make sure ur current loop if you have one is adjusted as hi as it can be (turn it up until you here it whistle at 1-2khz - it is too hot and oscillating - back gain down until it stops audable whistle. velo loop is prob heart of what you want to tune. some say put D & I to 0 and increase prop as hi as u can before it makes things bad, then increase I until you get to 20% velocity overshoot on accel. not sure what to do with D as our systems dont bother with it. then move to pos loop and increase prop gain as high as u can.

    if you go to a position, stop, and have cosnstant 20 counts error that does not go down to 1 count after 1-2-3 sec, then your integral term is too small.

    there. this should get some rebuttals! hope it helps you.

  3. #3
    Join Date
    Jun 2009
    Posts
    38
    Thank you for the reply. I was thinking of going with linear scales just for the fact of no backlash. I think that their documentation is wrong though, and the scales are actually +-.01mm, not inch. If I go +/-20 counts on that then I will not get a good part. When I'm getting +/-20 cts, that's actually in motion, not when stationary. When stationary I'm fine because of my integral term. Maybe I just need to turn the P and D gains up.

    I'm running just a torque loop in the drive, so you need the D to make sure that you don't overshoot as much. Galil mentioned to set D to about 10X the P value.

    So if you tune for +/- 1 encoder count that other companies claim to have, that is not actually during the motion profile itself (projected profile vs actual profile move)?

    Anyone have a good link or video to share?
    Thanks for the feedback!
    Dave

  4. #4
    Join Date
    Sep 2010
    Posts
    1765
    my experience is +/-1 count is while stopped. While moving, it depends on your speed what your following error will be unless you have feedforward terms active.

    Old school on NCs was 1"/min/mil was a gain of 1 and considered good. Nowadays folks can get 2 or 3 or 4. but what it means might help you see how you compare to those others you keep referring to:

    If you run 1 IPM then your following error will be 0.001" for a gain of 1.... so go 100 IPM and expect a fe of 0.100"

    If you get this you should feel good with your machine I'd predict. What so speed is this 0.00025" at?

    FF terms then work to reduce this steady state error by artificially increasing the command; these FF terms are not gain settings like PID; they do nothing other than feed forward the command based on speed or accel or decel depending on the term; hence my earlier comment that they do not 'tune' they just reduce the error based on formula - until you get carried away and make command ahead of actual in which case of course it will oscillate.

    So since you have FF, why can't you turn it up and make the 20 go to 3-4 or 5? Or is it already +/-20 at speed, in which case you ARE bouncing ahead of the command so have it too high? Based on the hardware you described in first post, Your mechanics & servos are likely such that 20 counts is going to the best you can get - it does not sound bad at all if this is while moving - in my experience & opinion.

  5. #5
    Join Date
    Jun 2009
    Posts
    38
    Mike,
    Thanks for replying. This is while in motion while making a move. Start at 0 velocity, then go to 65, hold for moment at 65, then ramp down. Max velocity is set to ~65 ipm. Maybe this isn't too bad, maybe that's about as good as I could expect.
    Thanks,
    Dave

  6. #6
    Join Date
    Sep 2010
    Posts
    1765
    so at 65 ipm a decent machine would have .065" error w/o FF... you have .00025: equiv to a system gain of 260! I think you just didn't realize how good you are doing and got sidetracked with comments of +/-1 count.

    Perhaps others can give you their experiences on similar speed moves.....

Similar Threads

  1. G320x encoder x4,x2,x1 count setting
    By lepton in forum Gecko Drives
    Replies: 3
    Last Post: 04-06-2012, 03:35 AM
  2. Servo Encoder Count in Mach3
    By thosj in forum Automation Technology Products
    Replies: 4
    Last Post: 05-21-2010, 09:44 AM
  3. encoder count recomendation
    By johnscnc in forum Viper Servo drives
    Replies: 10
    Last Post: 04-06-2009, 02:30 PM
  4. 320 encoder count max ?
    By LUCKY13 in forum Gecko Drives
    Replies: 10
    Last Post: 04-04-2009, 11:11 AM
  5. Encoder Count
    By Billiam in forum Servo Motors / Drives
    Replies: 1
    Last Post: 03-16-2009, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •