Re: Can linear encoders be combined with digital step drives?
Originally Posted by
MechanoMan
I look at the market and high accuracy linear encoders are pretty cheap now
About $100/axis for 1 micron units, I prefer magnetic linear encoders.
Steppers are still probably the best option. I do go for the closed-loop variant..
But I'm looking to counter backlash and torsional stiffness of the reduction drive by following a linear encoder. I have microcontroller skills.
That is, say I have a rack and pinion with gearbox reduction system with 0.008" of linear backlash due to gear backlash, not counting the torsional stiffness. It's not terrible, but it is an error. I might do this with a belt-axis CO2 laser too which has a "springiness" error when accelerating. Can we add a linear encoder to get the positioning "perfect"?
It is possible to create a dual loop system. But normally you would look at the load position vs. the commanded position and issue corrections on the fly every few milliseconds or even microseconds. This can be done with steppers, but is normally used with servo systems. I have done this with steppers, but it requires some creative software to make it happen. Using linear encoders with analog servos and closing the loop at the controller level is generally quite accurate and will for the most part automatically compensate for backlash. But there is no substitute for a tight machine.
On an analog servo drive, a controller gives a voltage which basically translates into a velocity, and a DAC calcs the diff between commanded position and linear encoder feedback and generates a velocity command voltage. But analog servos don't seem as attractive, esp in terms of power and cost.
I would disagree in terms of power. Any servo drive will far out perform a similar size stepper. Yes, the cost is higher.
I could imagine instead putting in a microcontroller to insert forward/reverse steps based on encoder feedback.
But this seems difficult to apply to a digital step drive. This could be a clash from initially adding extra steps due to belt stretch then when it comes to a stop, and then a flurry of high speed positive and negative step pulses to correct as it overshoots back and forth. It seems likely this would be asking the drive for corrections in the reverse direction that will be offset by a command in the other direction before ever reversing. Is such a system possible?
I ran the low-level through my head. Say it's a springy belt. The controller commands say 10 microsteps from a stop, there's a microcontroller diffing the commanded position and encoder, and it's the equivalent of 5 steps behind because the belt is stretching. Do you command in an extra 5 steps? Hypoththetically, if this were a very springy belt, you might need 50 steps to wind it up and get going. Then as a stop, it's got to do a lot to unwind the belt in that direction and wind up the other way to avoid overshooting. But the diff system is just going to see the linear encoder crosses the target stopping point and overshoots and it won't know if if needs to inject 5 reverse pulses or 500 to wind the belt the other way and prevent overshooting.
I think what you propose there would result in an incredibly unstable system simply because the overall system can not react fast enough to keep up with the controller. Under all conditions you want to have the actual position slightly lag the commanded position to prevent overshoot. By slightly lag I mean a few encoder pulses, maybe 2 to 3 pulses when moving, but hitting 0 when stopped. Excess lag error is not good either.
I did wonder about using a closed-loop step drive with an open-loop stepper motor, and replacing the shaft encoder with the linear encoder input and just programming the new ratio into the drive. So then it's just controller steps into the drive and the encoder feedback handles it from there. But doesn't the closed-loop drive adjust the drive current based on the rotor phase versus the commanded position? I actually don't know that, I just assumed.
I think in most cases this could work. It depends on the update rate of the stepper drive and the maximum read frequency of the encoder input. Closed loop stepper drives are not very high resolution.
Jim Dawson
Sandy, Oregon, USA