I term active only when desired velocity is zero

More
02 Jun 2014 01:18 #47606 by southbayguy
Hi -
Mine is a three-axis gantry router using servos. With help from the forum (thank you) I've been able to capture and plot desired velocity, actual velocity and error. I don't mind a non-zero error. I like to see an error trace that's congruent to the velocity traces. With a non-zero I term, the error trace spikes at accel and decel and pulls toward zero during the body of the move. To get an error trace that's congruent to the velocity traces, I set the I term to zero. But I would like the I term to come on and overcome slip-stick, pull the error to zero at the end of the move. So I'd like to tweak PID behavior so the I term is off until desired velocity is at or near zero. Is there any way to do that using built-in controls, or do I need to try to hack the code?

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

More
02 Jun 2014 02:00 #47608 by PCW
It may be possible (though the manual states that the PID settings are parameters rather than pins so maybe not easy)

Before going down this path, you might want to figure out why the integral term is behaving this way.

It may be simply that your FF1 setting is not adjusted to remove the position error when at speed (when too high, the feedback position leads the command, too low, the feedback position lags the command).

Also if you use any integral term you need to:
setp pid.N.error-previous-target true

or you will get a velocity dependent position error
The following user(s) said Thank You: southbayguy

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

More
02 Jun 2014 18:41 #47624 by andypugh

Is there any way to do that using built-in controls, or do I need to try to hack the code?


I actually wrote the "lincurve" compenent specifically for this sort of application.
www.linuxcnc.org/docs/devel/html/man/man9/lincurve.9.html
Note that the component isn't in the 2.5 release, so you would need to get the development version package using the instructions at builbot.linuxcnc.org
If you make the input to the lincurve component the axis velocity, then the output IO pin can be wired to the IGain pin of the PID.
If you want Igain of zero at 0.1mm/sec or above and 33.3 below that speed then then you would use a 4-entry lincurve with X values of -1, -0.1, 0.1 1 and Y values of 0, 33.3, 33,3, 0.

You might prefer a three-entry version, -1, 0, 2 / 0. 33,3, 0 if you wanted a linear interpolation towards zero.

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

More
02 Jun 2014 18:42 #47625 by andypugh

It may be possible (though the manual states that the PID settings are parameters rather than pins so maybe not easy)


It does say that, doesn't it?

It isn't true. They are (unhelpfully) IO pins. They should really be input pins.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum