. .
  1. #1
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 10 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,387. Received thanks 266 times, giving thanks to others 6 times.
    I'm planning a new machine retrofit, but can't decide what option to take.

    So anybody got any thoughts either way?

    I can think of plenty pros and cons of both methods, but am wondering what other's thoughts are, to try and break my current indecision.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  2. Like you say both have pro's n cons so go with what feels best for you is my 2 pence worth. Me I'd go with Step n Dir so not messing around with PID tuning etc.

  3. #3
    Neale's Avatar
    Lives in Plymouth, United Kingdom. Last Activity: 20 Hours Ago Has been a member for 6-7 years. Has a total post count of 1,357. Received thanks 259 times, giving thanks to others 6 times.
    I ask this question from a position of ignorance, but if you use step/dir with a modern AC servo plus appropriate driver, does that mean that there is a PID tuning issue but it is hidden from the user and is pre-programmed into the driver somewhere? Maybe some kind of adaptive self-tuning? Given that a servo system relies on feedback for positioning speed and accuracy, basic feedback theory says that the PID parameters will be relevant somewhere - just that they're not available to tweak?

    I keep thinking about a CNC conversion for my vertical mill and although it could probably just use big steppers (except possibly for the knee) it looks as if AC servos are becoming available at more attractive prices these days.

  4. #4
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 10 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,387. Received thanks 266 times, giving thanks to others 6 times.
    Jazz, I am swaying towards step/dir, but was just wondering what other's views on the options are.


    Neale, in short, yes, there is tuning in any kind of closed loop. It might not be PID, but closed loops need some form of tuning, otherwise they likely won't perform satisfactorily.
    Although many servo drives will have some form of automatic tuning, they can often be improved with manual tuning. I'd suspect lots of users at the DIY retrofit end of the spectrum, probably just run the drives with the default tuning, and have no idea how accurate the commanded position really is.

    If I go with the step/dir option, I'll still be at least running the encoder feedback to the controller for tuning purposes, but at a later date, I may opt to add linear scales to axes, to have a dual closed loop system, with the servo drives simply running step/dir, and the linear scales providing an outer closed loop via the controller.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  5. Quote Originally Posted by Neale View Post
    I ask this question from a position of ignorance, but if you use step/dir with a modern AC servo plus appropriate driver, does that mean that there is a PID tuning issue but it is hidden from the user and is pre-programmed into the driver somewhere?
    It's not simple to be honest because what you are actually dealing with is 3 PID controllers in what's called a Cascade control setup. Position, Current and Velocity PIDS.

    The Controller just deals with the Position PID and the Amplifiers deal with Position, Current and/or Velocity PIDS. When setting up an Amplifier you choose if running in Velocity or Current Mode. (Some will let you change between modes using inputs but won't get into that.)

    So before you can properly set up position in the controller the Motor and amplifier first have to be tuned to each other regards Velocity or Current. This is done in the Amplifier.
    Now with an Analog controller, you have to tune the Position PID in the controller so the voltage can react quickly to Position error Feed back and make any corrections needed in the position loop to try and reach Zero Error. However, In reality, the error never actually reaches Zero and there is always some slight error that is constantly trying to be corrected by the controller's Position and Amp's Position PID's. So you can say servo never actually stops moving, this means the Position PID has to correct and settle quickly so the motor doesn't twitch n jiggle around while trying to constantly reach Zero Error.

    Now with Step n Dir then I'm not quite sure how Full Closed-loop back to the controller is done because never used Step n Dir Controller that is a Fully closed loop but I would imagine the principle is very similar but except instead of outputting a Voltage it sends out pulses to try and correct position error.

    This is a very simple explanation to what is quite a complex system and I'm no expert with servos either so please excuse if any of what I said not fully correct.

  6. #6
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 10 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,387. Received thanks 266 times, giving thanks to others 6 times.
    Here's a servo flow diagram courtesy of Dynomotion -
    Click image for larger version. 

Name:	ServoFlowDiagram.png 
Views:	28 
Size:	28.9 KB 
ID:	26877

    That's essentially how most servo's will work, it's just depending on the type, certain parts of that diagram may be handled by different components, and certain parts may be duplicated, or just not exist.
    It is essentially black magic involving lots of mathematics!

    P(roportional) controls how much output to generate for the given difference between position and destination (destination being where you want the servo to be, and position being where the servo actuall is). This is the key output that does the most of the heavy lifting.
    I(ntegral/integrator) is how quickly to increase output for positional difference. This is the output that tries to compensate for following error, but can cause loss of stability if set too high (aka it'll cause wild oscillations)
    D(erivative) is like a damper on the PI output, to increase stability, but go too high and the servo loop will become overdamped and increase following error.

    Then you have the various Filters. The aim of these are to smooth the generated outputs, so you can push the PID values a bit further. I.e. say you have a stability problem at a certain frequency, you can add a filter that will smooth the output at that certain frequency (pay particular attention to my previous comment about mathematics and black magic!).

    Feed Forward is then essentially a bypass function, and often seen a bit like a sticking plaster similar to backlash compensation, however it can be useful.
    It essentially bypasses the PID loop, which can help improve following error. If you know the PID loop is slow to respond, you can use some FF to 'kick start' motion change, so by the time the PID loop has responded, the following error is already pretty minimal. However the drawback is, if the motion has some kind of change/interruption, the PID loop will still be slow to respond, which will give you a spike in following error.



    Using the KFlop for example In +/-10V operation, all that functionality is internal to the KFlop, however the servo drive will also contain some of that functionality.
    In Position mode, the drive will be using PD to create a stable speed output for any given input, regardless of servo load.
    In Torque mode, PD in the servo drive is mostly bypassed, and the drive essentially operates like an old fashioned amplifier drive. Torque mode gives the controller the most control over the servo, however it's naturally more unstable than speed mode, as the generated motor speed is directly related to the motor load

    To give a practical example, if the motor load changes during travel say due to cutting load changes.
    In speed control mode, the servo drive will mostly compensate for that change in load to keep the motor speed constant, with the KFlop only needing to give minor correction to maintain position.
    In torque control mode, the servo drive will not compensate, so it's up to the KFlop to change the required torque demand, to keep motor speed constant, which will involve quite a major output correction to maintain position.

    To give a good analogy, torque control is how the accelerator pedal in a modern vehicle works. You want to speed up, you put your foot down, you want to slow down, you lift your foot up. To maintain speed, you hold the pedal partially pressed. This is why you'll get maximum revs before the pedal hits the floor with no load.
    If the accelerator pedal worked in speed mode, moving the pedal slightly would cause full acceleration until the new target speed was reached.


    Run open loop step/dir, everything after the trajectory planner is handled by the drive.

    Run closed loop step/dir, you end up with two of those loops, which allows the controller to fine tune position and try and compensate for performance changes. However, with just closed loop just with the motor, once tuned, closed loop step/dir doesn't really have much benefit, other than the controller knows exactly where the motor is. When you have an outer loop closed using linear scales, it gives the ability to potentially compensate better for minor positional variances. I say potentially, because although it can improve things, it still won't compensate for things like excess backlash or stiction.


    It is all essentially one big mathematical balancing challenge.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  7. #7
    Quote Originally Posted by JAZZCNC View Post
    Now with Step n Dir then I'm not quite sure how Full Closed-loop back to the controller is done because never used Step n Dir Controller that is a Fully closed loop but I would imagine the principle is very similar but except instead of outputting a Voltage it sends out pulses to try and correct position error.
    I would guess that the loop moves the motor to within at the minimum +/-1 increment of the encoder resolution (e.g. on the usual closed loop steppers +/-1/1000 revolution). There will have to be a bit of hysteresis (i.e. a window of accuracy) otherwise if you tried to take it to a certain position it would tend to hunt back and forth 1 encoder step.

  8. Quote Originally Posted by Voicecoil View Post
    I would guess that the loop moves the motor to within at the minimum +/-1 increment of the encoder resolution (e.g. on the usual closed loop steppers +/-1/1000 revolution). There will have to be a bit of hysteresis (i.e. a window of accuracy) otherwise if you tried to take it to a certain position it would tend to hunt back and forth 1 encoder step.
    It's a fair bit more complicated than just that and can't really compare Closed-loop stepper system to real Servo drives as they simple in comparison.

    Like Moray says Full closed-loop servo system is a lot of black magic and I while I personally understand PID and what all it's terms mean and handle in the system. I tried to keep my explanation simple and kept it mostly just to position but the reality is that it's a bit more complicated than just position when getting a Servo driven machine running nice.
    So when I said don't understand how Step n Dir Closed-loop is done what I probably should have said was don't understand how the PID for Step n Dir output is handled by the Controller.

    Regards the hunting back n forth then that's exactly what does happen. The Closed-loop system is constantly making corrections to maintain position, Torque or speed and this is where the black magic and mathematics come into play. It's also why setting a Servo machine up to be accurate with smooth movement, fast accelerations and directional changes with quick settle times can be a challenge. Because changing any one of the PID settings in either drive or controller can affect the others and how the system works. Real hair pulling stuff.!!

    That said Modern Servo drives are getting much better and come with built-in tuning aids to help tune motor to drive. The Old AC and DC Amplifiers like what's on some of my machines are what real nightmares are made from. They are also very unforgiving and blow up for Fun which is an area where modern servo drives are much much more forgiving.

  9. #9
    Chaz's Avatar
    Lives in Ickenham, West London, United Kingdom. Last Activity: 16 Hours Ago Has been a member for 6-7 years. Has a total post count of 1,446. Received thanks 104 times, giving thanks to others 67 times.
    I've also been thinking about this a lot recently. I run 3 setups on 3 different machines.

    Step / Dir - Steppers with encoders.
    Step / Dir - Panasonic Servos.
    Analog - CS Labs - Panasonic Servos.

    For me the easiest is the middle one. I think however some tuning can be done, on the Panasonics and also on the controller (Acorn).

    For the CS Labs Mach 3 setup I struggled a lot to tune the system. The SimCNC software is easier and autotunes better. I know some will say 'tune by ear'. Good luck with that, its not easy, many variables.

    The downside of the middle setup is no true DRO unless you have an external setup. Ive never lost steps on my Bridgeport running Step / Direction but I dont think I am challenging the machine either. It has a 3500 RPM spindle so not doing fancy high speed stuff.

    On Thor I need to decide to buy SimCNC or go Acorn. I am loathed to run Mach 3, doesnt do it for me.

  10. #10
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 10 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 2,387. Received thanks 266 times, giving thanks to others 6 times.
    Tuning servos isn't that bad, provided you have the required information available, which unfortunately, Mach and CS-Labs don't make available, and have you mostly rely on their auto-tune functionality to get something that hopefully works.
    Galil does have good tuning functionality, provided you spend $200 on their Galil Development Kit (this kind of thing I hate, whereby you pay good money for a product, then have to pay extra to be able to use what is essentially a key feature of the product. It's not like you're going to buy an analogue controller, and then not want to tune the servos..)

    Tune by ear is a load of rubbish, apart from it letting you know tuning is majorly off as you can hear the motor oscillating!

    To get a bit better understanding, it's probably worth reading these pages of the Dynomotion manual-
    https://dynomotion.com/Help/StepScreen/StepScreen.htm
    https://dynomotion.com/Help/BodeScreen/BodeScreen.htm
    https://dynomotion.com/Help/FilterSc...lterScreen.htm
    Although they are KMotion specific, I think they explain the fundamentals behind servo tuning very well.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Closed loop steppers vs servo ?
    By threedee in forum Stepper & Servo Motors
    Replies: 6
    Last Post: 29-06-2019, 01:00 PM
  2. Closed loop Step Servo Drive Driver 2HSS86H + 4.5N.M Motor + Encoder
    By george uk in forum Motor Drivers & Controllers
    Replies: 20
    Last Post: 23-06-2014, 08:38 PM
  3. Closed Loop Stepper Compared with Open Loop Stepper
    By Leadshine-Erci in forum Stepper & Servo Motors
    Replies: 0
    Last Post: 25-05-2012, 08:11 AM
  4. Closed Loop steppers
    By funkmonkey in forum Stepper & Servo Motors
    Replies: 24
    Last Post: 18-07-2009, 09:56 PM
  5. Droping Steps, closed loop ? HELP !!!
    By bobin in forum Machine Discussion
    Replies: 7
    Last Post: 20-05-2009, 03:56 PM

Bookmarks

Posting Permissions

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