Stepper configs have suboptimal P term setting

More
10 years 8 months ago #69800 by PCW
PnPConf created stepper configs use a initial P value of 50

This is much too low for stepper configs and will result in following errors (50 is ok as a starting point for servos)

For stepper configs, P should be 1/Servo-thread-period so P=1000 for the standard 1ms servo thread period

Please Log in to join the conversation.

More
10 years 8 months ago #69806 by cmorley
Ok I will see what I can do

Please Log in to join the conversation.

More
10 years 8 months ago #69807 by cmorley
I pushed a better fix into 2.7

steppers get a calculated P
servos get 50

This could still be screwed up if the user set the axis as a servo then changes to a stepper but its a little better.
Thanks for the heads up

Chris M

Please Log in to join the conversation.

More
10 years 8 months ago #69808 by PCW
I think you may have the calculation wrong,
P should be 1/ servo-period-in-seconds, not servo period/1000

so P=1000 at 1 ms, 500 at 2 ms, 4000 at 250 usec

servo-period-in-ns/1000 is correct for 1 ms but wrong everywhere else

Please Log in to join the conversation.

More
10 years 8 months ago #69822 by cmorley
damn ok ill fix :)

Please Log in to join the conversation.

More
10 years 8 months ago #69823 by cmorley
ok pushed a fix again.
Thanks for checking!

Chris M

Please Log in to join the conversation.

More
9 years 10 months ago #83920 by guymalpass
Hi Peter,
I'm running a closed loop stepper system using a 7i76, 7i77 and 5i25 and have recently noticed your post about P terms being 1/servo period. I have been using a P term of 170 so decided to try out 1000 (my servo period is 1000000) but I just get oscillation. Is there anything I should be looking at to explain why I am so far off your recommended value?
To clarify my stable settings are P-170 I-0 D-0 FF1-0.994 FF2-0.000025 on master branch.
Thanks,
Guy

Please Log in to join the conversation.

More
9 years 10 months ago #83921 by PCW
For a closed loop system (closed with encoder feedback)
1/T-servo is probably way too much P gain
because of delays from step output to physical motion

Only very tiny delays are present for "local" pid feedback so the 1/T-servo works and matches
the drivers position mode settings (that correct the position error completely in the next servo period)

Please Log in to join the conversation.

More
9 years 10 months ago #83922 by guymalpass
My mistake I thought the post was referring to closed loop setups.
Thanks

Please Log in to join the conversation.

More
9 years 10 months ago #83923 by PCW
NP, I probably was not clear, its a bit confusing since they are both closed loop
(though one is closed locally to the stepgen position counter)

Please Log in to join the conversation.

Time to create page: 0.177 seconds
Powered by Kunena Forum