Linear Encoder, PID and Backlash

More
04 Oct 2020 07:12 #184782 by boksi
Any update on this topic? My backlash on y axis is 0.6mm on old manual mill (Fritz Werner from the 80s) with trapezoidal threads. Idea here is small “research” how to implement different control strategies and to test how far it can go concerning backlash but without changing to ball screws. Currently axis is equipped with heidenhain linear encoder resolution of 0.5um and dc tacho directly coupled on dc motor shaft. Control loops are implemented on drive level. Until now tested positional loop using only linear encoder and dual loop using feedback from dc tacho and feedback from linear encoder. I have to tune it more but currently have some available info. There is a “lot” of friction(unequally distributed along the path). Friction is also different based on direction of travel. This might be handled with different set of gains based on direction. In both cases friction creates noise on velocity measurement especially when implemented dual loop(inner controller fighting against friction as its main purpose is velocity control and thus velocity is changing very fast and has lot of ripple). In both configurations velocity was measured with dc tacho. I didn’t do yet velocity estimation based on linear encoder. Currently closed loop with just linear encoder works better as it is easier to tune, lost motion is less then in dual loop and in the end of move motor reach position and not continuously hunting it(possibly due pid parameters and higher friction). When changing direction lost motion concerning backlash is 0.2mm and it lasts about 130mS( error is shape of triangle with peak in 0.2mm). I have to check for exact numbers concerning velocity and acc ramp. Didn’t start yet to test with diff acc ramps and diff max velocities. To my understanding smaller acc ramp and higher pid output should reduce this lost motion(backlash) as actual move should lag less from commanded( slow acc ramp should give more time for the move and higher pid output should shorten actual backlash move). Concerning dual loop move is more smooth but errors are little larger and motor is continuously hunting end position but in small boundaries depending of pid parameters (from -0.03mm to 0.03mm). Didn’t go yet in detail tuning dual loop. Maxon has some interesting things concerning dual loop implementation. If someone is interested it is in epos4 application notes. They say dual loop gives most benefits with an elastic drivetrain. Think that also in Galil paper about dual loop tests were done on system with big error introduced by compliance of belt and smaller error introduced by backlash.
I would like to hear opinons about this.I am wondering about how is backlash compensation implemented in linuxcnc engine. Is it done on the fly or all axes has to stop until backlash compensation is applied to current one which changed direction?
If it is done on the fly, for higher values of backlash shouldn’t be there any irregularities on produced part?
Also wouldn’t be the similiar
situation with linear encoders? In this case backlash compensation would be turned off but closed loop with linear encoders could hide some portion of backlash smaller or higher and there would be always lost motion more-less.
If it is implemented like in second case are acc ramps up and down respected concerning axes which has to stop and then start again?

Please Log in or Create an account to join the conversation.

More
05 Oct 2020 00:29 - 05 Oct 2020 22:15 #184891 by helioz2000
I can't answer your questions on LinuxCNC engine details, but here is a brief description of the current status of this machine:

My BF20LV mill is producing acceptable results. Here are a couple of videos showing hole cutting:
Hole cutting video 1
Hole cutting video 2
Hole cutting involves two direction changes by each axis for every circular movement, so it's a good indication of backlash issues. There is no visual indication of an issue and the resulting hole is round to within 0.1mm.

Each axis has stepper motors driving ACME lead screws and linear encoders providing position feedback. No motor tacho, velocity is derived from encoder feedback. Backlash compensation is disabled in the INI file. Here is link to a current backup of all linuxCNC configuration files:
BF20 linuxCNC configuration

The current tuning provides an acceptable compromise between speed and stable operation. I can get the PID loop to oscillate by very small (< 0.5mm) moves at high speed. The PID oscillation will increase until a following error trips the axis.
However, PID loop oscillation is only an issue while the machine is not cutting as cutting load provides a large "damping" effect and prevents oscillation. Therefore PID oscillation is only an issue when using the pendant hand wheel to move the axis (by small distance) while not cutting.

Another compromise element of PID tuning is that the maximum speed is set much lower than what the motor and axis is capable.

A high PID gain is an issue when it comes to backlash but is necessary for accurate cutting, so the tuning is about finding the sweet spot which produces an acceptable result but doesn't trip the axis when reversing direction in normal operation.

As has been mentioned in other posts, there is no replacement for smooth slides and low/no backlash lead screws.
Whilst I'm in the process of fitting ball screws to this machine so I can overcome the issues listed in this post, the ACME setup has worked better than I expected and produced very accurate parts over last few months.
Last edit: 05 Oct 2020 22:15 by helioz2000.

Please Log in or Create an account to join the conversation.

More
05 Oct 2020 20:34 #185004 by boksi
Thanks a lot for very detail explanations. I am glad that you have satisfactory results.

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum