Linear Encoder, PID and Backlash

More
6 years 5 months ago #166870 by helioz2000
I'm integrating encoders into and existing linuxCNC mill with stepper motors.
The BACKLASH setting (0.4mm) has been carefully tuned to give reliable positioning without encoder use.

Now I'm modifying the system to use a linear encoder and PID.
The linear encoder is measuring table travel.
Everything is functioning as expected and I'm in the process of tuning the PID controller.
My questions are prompted by this observation:
With a high P-term, on every direction change I get a big oscillation on PID output which takes a fews of cycles to settle.
This oscillation only occurs on change of direction.
I fully understand why the PID controller produces a high output/overshoot during the backlash take-up period as the motor is speeding up but velocity feedback stays at zero.

My question relates to the interaction between PID and BACKLASH:
What part (if any) does BACKLASH play when using a PID controller (with velocity command output)?
Should the BACKLASH setting be set to 0 when using a PID controller?
Is it possible to "limit" the pid output during the backlash take-up period?
What is considered "best practice" in this scenario?

Thanks for looking at my question.

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

More
6 years 5 months ago #166871 by tommylight
I do not think using scales and backlash together is the way to, can you test with no backlash set at all ?

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

More
6 years 5 months ago - 6 years 5 months ago #167126 by helioz2000
Thanks tommylight, I have everything configured and it is working but I'm not 100% satisfied, even with BACKLASH=0.

Without direction change the position feedback follows the velocity command very closely.
On a direction change the backlash causes the PID to do this:

The purple trace (velocity feedback) clearly shows the delay between the motor starting to turn (i.e. green trace) and (after backlash) the table finally starting to move.

I realise the solution to the problem is to use ball screws (on order) but I was wondering if there is any way to overcome the pid-backlash problem?

To complete the picture, here is the same trace but without direction change:

Note: Following error trace is on high zoom level.
Last edit: 6 years 5 months ago by helioz2000.

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

More
6 years 5 months ago #167130 by tommylight

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

More
6 years 5 months ago #167131 by bbsr_5a
why is there a horrible jitter in the feedback
isent the cable shielded
and or the connectors gronded

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

More
6 years 5 months ago #167134 by chris@cnc
Hi, the combination of backlash and scale is difficult. On real cnc machines there are parameters around the backlash control loop. But the first rule is: before the parameters are tuned, the mechanics must be 100% okay. And 4/10 backlash is far from a good machanic. I also have a rack as a drive with a similar backlash and scale but with servo motors. they can be resolved higher and regulate more precisely with a small PID. To do this, the rack and gear must also be 100% parallel. my mechanics are also not perfectly aligned and each axis plays differently even though the parameters are the same. But when I mill a circle it is round to 0.1mm and that's okay for me.
A smaller pitch could improve your problem. So you would have more pulses for the control loop. And there is a lot of noise on your scale feedack. Vibrations or something wrong with the cable.

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

Time to create page: 0.319 seconds
Powered by Kunena Forum