Page 1 of 2 12 LastLast
Results 1 to 12 of 16

Thread: Closed loop control with linear encoders

  1. #1
    Registered Xerxes's Avatar
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    1,201
    Downloads
    0
    Uploads
    0

    Closed loop control with linear encoders

    Hi!

    Is it possible to get a real closed loop positioning with EMC using linear encoders? If yes, how?

    How well this type of control works if there is any backlash in screws?

    Thanks


  2. #2
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,936
    Downloads
    0
    Uploads
    0
    Check the video out called Dual Loop Compensation
    http://www.galilmc.com/training/webconf.html
    Al
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  3. #3
    Registered
    Join Date
    Jul 2003
    Location
    north wales,u.k
    Posts
    46
    Downloads
    0
    Uploads
    0
    EMC? what is it?
    I use Linear Encoders to close the servo loop because they do eliminate backlash, and so do many CNC retrofits. However my system is running under DOS on a PC104 card. Should I be converting to EMC?
    mike potter


  4. #4
    Registered Xerxes's Avatar
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    1,201
    Downloads
    0
    Uploads
    0
    Thank you, Al_The_Man

    The dual loop method is much like I believed it to be. But is it possible with EMC? Anybody seen configuration files?

    mmjpotter: EMC is yet another CNC control software.


  • #5
    Banned
    Join Date
    Apr 2004
    Location
    Norway
    Posts
    678
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by mmjpotter
    EMC? what is it?
    I use Linear Encoders to close the servo loop because they do eliminate backlash, and so do many CNC retrofits.
    There should not be any backlash between the encoder and the motor.

    A linear encoder cannot eliminate backlash, it can compensate for it. But then the encoder used by the servo drive (the servo loop) must be on the motor (backlash free), and the linear encoder is there just to tell the controller how much backlash there is, so it can compensate for it. But what software do you have that can do this? In EMC there is backlash compensation, but it is just in a setup table, not dynamically.


  • #6
    Registered
    Join Date
    Jul 2003
    Location
    north wales,u.k
    Posts
    46
    Downloads
    0
    Uploads
    0
    Hi ESjaavik

    If an encoder is being used to control the speed of the motor, then I agree with you, it should be connected to the rear shaft of the motor with zero backlash. I use a tacho for this purpose. I use linear encoders for positional feedback. I will try to explain how my system uses these signals. I have a free running DC motor with a tacho driving a cold rolled ballscrew (40 microns backlash approx) via a timing belt and pulleys. The linear encoder is attached to the slide, thus maintaining accurate positioning of the slide. When the slide is in position, a zero voltage is applied the motor because no rotation is required. If the slide is physically moved out of position by 1 encoder pulse (0.01mm) the system will produce an error signal and a proportional voltage will be sent to the motor to initiate rotation in the direction to correct the error. The initial motor speed will be very slow and with little power, enough power to remove any free backlash but not enough to pull the slide. If the error persists the system will increase motor speed and power until there is sufficient power to correct the error but not to much power to overshoot and cause oscillation. The motors on any axis with backlash are continuously hunting for position but this is under controlled and stable conditions and is not detrimental to the machine’s mechanics or electronics, it is NOT unstable violent motor oscillation.

    This system does require a real time operating system and I decided to develop my software for DOS, but I believe that EMC has real time capabilities and I would be very interested to here your comments and reasons for choosing Linux/EMC . My source code is in ‘C’ and the real time interrupt routine is 80x86 assembly code . I don’t know if these will compile for Linux.
    mike potter


  • #7
    Banned
    Join Date
    Apr 2004
    Location
    Norway
    Posts
    678
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by mmjpotter
    If an encoder is being used to control the speed of the motor, then I agree with you, it should be connected to the rear shaft of the motor with zero backlash. I use a tacho for this purpose.
    Usually the encoders are used as feedback both to the speed loop and the position loop. Since it seems you do your own driver software this may not be true. Are you using separate feedbacks?

    The motors on any axis with backlash are continuously hunting for position but this is under controlled and stable conditions and is not detrimental to the machine’s mechanics or electronics, it is NOT unstable violent motor oscillation.
    Is this because you set the PID parameters to "calm it down"? If so, does it not then gouge your part on pocketing square corners? (Sudden setpoint changes)
    Or can you use feedforward to avoid it?

    . My source code is in ‘C’ and the real time interrupt routine is 80x86 assembly code . I don’t know if these will compile for Linux.
    Not without a lot of rewriting in the RT part. The principles seems quite similar to the old DOS way of "stealing interrupts" though. I don't have any experience in RTAI other than browsing docs and code. My RT experience is with OS9/68K.

    But Linux have one big advantage over DOS, it's on the rise and not dying. So I try to forget DOS. And I prefer having my fingernails pulled over doing 80 assembly!

    Anyway I suggest you look at EMC. The source is open if you want to do something odd. And if you made a system that can make parts using your own code, you might find it a nice environment to focus on what you do best and benefit from the work of others with a different background.


  • #8
    Registered
    Join Date
    Jul 2003
    Location
    north wales,u.k
    Posts
    46
    Downloads
    0
    Uploads
    0
    Thanks ESjaavik. Linux/EMC sounds like a good alternative RT system, but I still do not understand why backlash is a problem when using linear encoders.

    I still think DOS has a future with the PC104 range of products.

    As for my DOS system I don’t try to ‘calm down’ the PID loop but the parameters are set to maintain stability.
    Inputs to the loop are two +/- 10 volt analogue signals, 1 from the motor tacho, the speed input ,and 1 from the computer, the position input.

    Feedforward is not implemented but the system ‘looks ahead’ (to avoid SUDDEN setpoint changes) and the speed is adjusted depending on the angle of the next move. If the next move angle is 180 deg. then full speed is maintained, a 90 deg move requires the machine to ramp down to zero before implementing the next move thus avoiding any overshoot.
    mike potter


  • #9
    Banned
    Join Date
    Apr 2004
    Location
    Norway
    Posts
    678
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by mmjpotter
    Thanks ESjaavik. Linux/EMC sounds like a good alternative RT system, but I still do not understand why backlash is a problem when using linear encoders.
    It's because the torque requirement is very non-linear and the feedback is delayed. While running out the backlash the torque requirement is almost zero, then suddenly increasing when is has caught up. The feedback is none until the backlash is taken up. You have an unloaded motor in the backlash region. It has nothing to do with linear encoders, but the fact that the encoder "sits at the other side of the backlash".

    If you have ever tried to drive a 50 year old bus with worn steering knuckles and spring shackles you can probably relate to what the servo drive has to cope with. I have tried it. Maybe that's why I could relate to it when I found it explained.


  • #10
    Registered
    Join Date
    Jul 2003
    Location
    north wales,u.k
    Posts
    46
    Downloads
    0
    Uploads
    0
    During a machining cycle the torque requirements can vary considerably due to changes in feed rates, depths of cut, material hardness, cutter speed etc. Surely the purpose of a servo system is to control these non-linear torque requirements. Running out a bit of backlash seems like a rather trivial task, and I agree that these torque requirements have nothing to do with encoders, linear or rotary.

    Does anybody agree with the following:-

    A: That linear encoders return actual slide movements regardless of backlash.

    B: A DC servo can maintain a constant speed/torque under varying loads.

    C: If the linear encoder is replaced by 2 micro-switches or limit switches, the motor will drive the slide to the limits regardless of backlash.

    D: When a slide with backlash is driven by a stepper motor, 2000 pulses in one direction may not equate to the same distance for 2000 pulses in the opposite direction. If a linear encoder is fitted to the slide and the motor is driven by a CONTINUOUS train of pulses, then counting 2000 encoder pulses in any direction will equate to the same distance thus eliminating the backlash.
    mike potter


  • #11
    Gold Member
    Join Date
    Dec 2004
    Location
    Newtown, CT, USA
    Posts
    522
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by mmjpotter
    During a machining cycle the torque requirements can vary considerably due to changes in feed rates, depths of cut, material hardness, cutter speed etc. Surely the purpose of a servo system is to control these non-linear torque requirements. Running out a bit of backlash seems like a rather trivial task, and I agree that these torque requirements have nothing to do with encoders, linear or rotary.

    Does anybody agree with the following:-

    A: That linear encoders return actual slide movements regardless of backlash.
    Assuming they are mounted on the slide -- YES.

    Quote Originally Posted by mmjpotter
    B: A DC servo can maintain a constant speed/torque under varying loads.
    NO. -- They can maintain a more constant speed OR torque under varying loads. That's more constant than a system without feedback. The systems we are referring to do not measure the torque, so we're not really talking about maintaining a constant torque.

    Quote Originally Posted by mmjpotter
    C: If the linear encoder is replaced by 2 micro-switches or limit switches, the motor will drive the slide to the limits regardless of backlash.
    One could design a system to do that.

    Quote Originally Posted by mmjpotter
    D: When a slide with backlash is driven by a stepper motor, 2000 pulses in one direction may not equate to the same distance for 2000 pulses in the opposite direction. If a linear encoder is fitted to the slide and the motor is driven by a CONTINUOUS train of pulses, then counting 2000 encoder pulses in any direction will equate to the same distance thus eliminating the backlash.
    In response to the first sentence, it depends. If you mean that applying 2000 pulses in one direction, followed by 2000 pulses in the opposite direction, then, in general, the slide will not wind up in the same position. If one counts encoder pulses, the slide will wind up in the same position.

    But you are using steppers in one case and servos in the other. If you move slowly enough that you have zero overshoot, you are correct. But you might not wind up with a useful system. It depends on your application.

    Ken
    Kenneth Lerman
    55 Main Street
    Newtown, CT 06470


  • #12
    Registered
    Join Date
    Aug 2004
    Location
    Greece
    Posts
    145
    Downloads
    0
    Uploads
    0
    Can EMC use absolute encloders or only incremental?


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Open & closed loop
      By totsandman in forum Benchtop Machines
      Replies: 3
      Last Post: 05-07-2005, 09:49 AM
    2. How Should I Mount Linear Encoders?
      By lerman in forum General Metal Working Machines
      Replies: 6
      Last Post: 01-13-2005, 04:50 PM
    3. Closed loop....open loop?
      By DAB_Design in forum General Electronics Discussion
      Replies: 10
      Last Post: 06-26-2004, 05:02 PM
    4. Closed Loop Driver vs. Closed Loop Computer
      By ojibberish in forum Gecko Drives
      Replies: 3
      Last Post: 06-08-2004, 12:30 PM
    5. closed loop
      By georgebarr in forum DIY CNC Router Table Machines
      Replies: 9
      Last Post: 06-01-2003, 10:39 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.