Check the video out called Dual Loop Compensation
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?
CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).
“Logic will get you from A to B. Imagination will take you everywhere.”
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?
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.
There should not be any backlash between the encoder and the motor.Originally Posted by mmjpotter
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.
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.
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?Originally Posted by mmjpotter
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)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.
Or can you use feedforward to avoid it?
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.. 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.
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
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.
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.
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".Originally Posted by mmjpotter
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.
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.
Assuming they are mounted on the slide -- YES.Originally Posted by mmjpotter
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.Originally Posted by mmjpotter
One could design a system to do that.Originally Posted by mmjpotter
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.Originally Posted by mmjpotter
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.
55 Main Street
Newtown, CT 06470
Can EMC use absolute encloders or only incremental?