Can't set MIN_FERROR less than 0.5mm..

More
27 Sep 2013 19:24 #39264 by machete
I'm trying to tune PID for my servos (mill 1.5 tones).

And I have noticed that following error on graph is near zero only then it's mooving, after that it became ±0.1mm of desired position.

For example, when i perform in MDI-mode: G0 Y215, when it stops, i will have real value 215.075.

Maybe it's ok, when axis is not in use??


But! I always have FOLLOWING ERROR when jogging, if MIN_FERROR in my .ini file is less 0.5mm!

I have encoders with 2000 impulses on 1mm, so i expected to have teoretical accuracy ~0.005mm or less on my servos....

What am I doing wrong?
[AXIS_2]
TYPE = LINEAR
HOME = 200
FERROR = 1
MIN_FERROR = 0.5
MAX_VELOCITY = 80
MAX_ACCELERATION = 100
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 0.0117
FF2 = 0.00058
BIAS = 0
DEADBAND = 0.001
OUTPUT_SCALE = -1
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 10
INPUT_SCALE = 2000

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

More
27 Sep 2013 21:18 #39267 by PCW
What type of drives (velocity or torque mode)?
This makes a big difference in tuning

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

More
28 Sep 2013 04:29 #39292 by machete

What type of drives (velocity or torque mode)?
This makes a big difference in tuning


I use direct current motors 550W 6.5Nm powered by Mesa 7i29 supplied from power transformer with rectifier.

Feedback from quadrature encoders 2500p/rev attached directly on drives.

As i understand, it is torque mode?

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

More
28 Sep 2013 06:12 #39297 by PCW
A bare HBridge(like the 7I29) is somewhere between a torque and
velocity mode drive.

One thing that's clearly missing is any D term.
I would add as much D term as you can (it will get "buzzy" with too much)

Having sufficient D term should allow you to increase the P term
and improve your following error.

FF1 should be then adjusted for minimum error during medium speed cruise

When tuning is very close, you can add some I term to null out any static error
note that you must zero the I term when tuning the previous terms as its effects will
mask the effects of adjusting the other terms.

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

More
29 Sep 2013 06:21 #39338 by machete
With some combination of I,D,FF1,FF2 i can rise P from 1 up to 20!

I have less static error, but it's not zero (as you can see on attached picture).

And the main problem now, that one of 4-5 moves finishing with oscillation (on the right part of graph).

Where to go next?

Attachments:

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

More
29 Sep 2013 10:02 #39339 by PCW
If you have oscillations you may need to decrease P/D a bit

I would increase the I term until you can see it pull in the
static error in a small fraction of a second

You seen to be within about +-10 U which is not bad
but more integral term should help with the static error

Consider that your static error (~5u) is about 1/200 of full output scale.
This error is multiplied by your I term of .001 and summed every servo thread
(asumming 1 KHz) If the error did not change, it would take 200 seconds
for the 5u error to add up to full output drive. So you need quite a bit more
I term for the integral term to be more responsive.

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

More
01 Oct 2013 02:24 - 01 Oct 2013 02:29 #39419 by machete
I have tested different I terms - from 0.4 up to 600(!):





But any way one of 3-5 moves i have oscilation: sound and small vibration of motor body.

And.. sorry: i should tell you that my motor is connected through a gear (but the encoder is attached directly to the motor shaft!):



I was thinking it is only important to the final axis accuracy (not for motor).

I'm stuck...
Attachments:
Last edit: 01 Oct 2013 02:29 by machete.

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

More
01 Oct 2013 02:49 #39420 by PCW
OK Notice how the I term of 600 has eliminated the static error?
thats mainly what its for... (even 600 may be too low, too much will result is large slow oscillations)

When any significant I term is used, you may have to set the
pid.N.error-previous-target bit true on the PID loop to avoid
getting the velocity dependent error that you see in the last plot

If you cannot reduce your following error any further with tuning, you might
try speeding up the servo thread a bit (to 2 KHZ or even 4 KHz if your system can manage it)

If your gears have any significant backlash this may cause some tuning difficulties
(Since motors intertial load may change suddenly)

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

More
01 Oct 2013 05:41 #39424 by machete
Actually i almost satisfied with my following error, even from first picture (sure, i'll try to make it even lower).

Thing that i don't know how to deal with, is oscillation in static. Do you mean, I term higher than 600 can help me with that?

If your gears have any significant backlash this may cause some tuning difficulties
(Since motors intertial load may change suddenly)


I don't think so, especially when axis in static.

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

More
02 Oct 2013 00:11 - 02 Oct 2013 00:25 #39457 by machete
I'm trying to activate this setting in my .hal-file: setp pid.2.error-previous-target true

But it's says: "parameter or pin 'pid.2.error-previous-target' not found"

My version is: 2.6.0-pre0-3633-g534777b

As i understand, this feature enabled in version 2.5.2, how can i mix it with my 2.6.0??
(i use 2.6.0 to be able remap M6 for my toolchange NGC program - is it possible in 2.5.2? Maybe i should just setup 2.5.2 on my machine?)
Last edit: 02 Oct 2013 00:25 by machete.

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

Time to create page: 0.267 seconds
Powered by Kunena Forum