This needs to be in wire SVN imo , save some time (basically saves an E-Gate and alot of time for many applications)![]()
yup, this PID rocks, i had thruster multiplier wrong hahahaha.
i have one question , i understand all but the inegration of e with respect to time, what are the limits, and how does this integration know how long the error has been present ?
i know the effect the "I" has, i just dont see how it knows how long the Error has been present (somethign to do with the limits changing.)
And for anyone trying to understand this, but understands the delta upgrade on the turret in orbs tutorial, the P and D are the same as what he did in the E gate (the P and D values you select are the constants you multiply the error (difference between targetvalue and actual value), and the derivative of error by), the I here just adds a third item, which increaes if there there is no change in error over time (this is proportional to both time and error value) , and will continue to increase until the error is eliminated and the setvalue is reached.
in otehr words, setting the I value to 0 makes this the same as orbs delta turret etc, the I just can help make it reach the setpoint as the difference approaches zero and thrust would normally be to low to move the final tiny angle (or whatever).
This needs to be in wire SVN imo , save some time (basically saves an E-Gate and alot of time for many applications)![]()
Hmm, lookin' a little wobbly there. The delta systems already in use seem to work well enough, and they even seem to correct faster and with less wobble than this.
I think you are right there, Eagle, BUT...
this is better for hydraulics (at least) because delta-based systems won't necessarily reach the desired length, whereas a PID corrects its own output until it does.
That's the difference.
And yes, I do hate wobbliness too. Unfortunately, with Source physics it may not always be possible to get rid of that with complex contraptions... :-I
ummm, if you leave the I value at 0 it is the same as the delta exactly, so i dont see why it would be more wobbly unless you just arent settigng your values correctly.
(the I value can be useful as it can counteract things like the moment of gravity on beams etc changing with the angle the beam is supposed to be balanced or w/e.)
Uploaded new rar. I added an output limit, don't know why I didn't have it in there to begin with. It just limits the output to +/- whatever you set it to so that contraptions don't "blow up" when errors get large. Anticept, the SVN should be updated.
Eagle, I didn't spend a whole lot of time tuning the PID parameters. The platform and pole could be made perfectly stable and incredibly fast (no overshoot or hunting) if you were to spend some time and get them perfect.
Edit:
Whodunnit, it doesn't know how long the error has been present. If you look at the lua, it simply does i = i + e*dt where i is the integral term, e is the error, and dt is the time between this loop through and the last one.
Last edited by Moyer; 07-04-2008 at 06:33 PM.
This thread is kind of "oldish", but still I'd like to know if there is possibility that we'll see this PID controller added to the main wire svn? I've seen it in extras, but most of the servers doesn't have extras installed, and this controller IMO would speed things up for some of us in multiplayer constructs![]()
2d head with 3d brains
Bookmarks