On 3 February 2011 19:56, Igor Chudov <ichu...@gmail.com> wrote: >> Assuming that the input to the PID is position, then I have a feeling >> you could get the same effect by using a very large gain on FF1 with a >> limit (maxcmdD) set to ever so slightly less than the current required >> to move the table.
> Since you apparently know a lot about how PID loop is implemented (I just > looked into pid.c myself after seeing your older message), would you think > that adding a friction compensation is relatively straightforward? Well, first I would try doing what I suggested with the existing PID parameters, and see if that helps at all. > tmp1 += *(pid->fffgain) * sign( command - feedback ) > > where sign( ... ) is a function that returns +1 if its argument is above 0, > 0 if its argument is 0, and -1 if argument is < 0. x/absf(x) is close to that function, but will have a problem with zero. ( (x == 0) ? 0 : absf(x) / x ) should work. -- atp "Torque wrenches are for the obedience of fools and the guidance of wise men" ------------------------------------------------------------------------------ The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users