Neil Baylis wrote: > On Sat, May 8, 2010 at 8:37 PM, Jon Elson <el...@pico-systems.com> wrote: > >> At these sorts of speeds, you may need to up the servo sampling rate >> quite a bit. You can easily go to 2 KHz, >> and with a good PCI parallel port card, you should be able to go to 4 or >> 5 KHz. >> >> > > Why do I need to do that? > > > The idea is to sample the encoder position more frequently. with the machine moving at 30 IPS and sampling at 1 KHz, it is moving 0.030" for every servo sample. If you need accurate positioning at this feedrate, then you may want to sample more frequently. > I'm using FF1 of about 5. I tweaked FF2 a couple of times, but it didn't > seem to make any difference. I was hoping it would let me lower the D. I > have more tests to do though, and as you probably know, it's easy to get > confused about which term you're tuning. > > FF2 is effective in reducing the error spikes during the accel/decel phase of a move. With the right amount of FF2, these spikes can be knocked all the way down to equal the error during the cruise part of the move. > > Won't that get worse if I increase the servo sample rate? > Well, at your low encoder resolution, maybe. But, it will also move the frequency of these errors up by an equal amount. This may get these errors pushed up to beyond the servo amp passband. >> For instance, at 15 IPS, you are getting 15 encoder >> counts/sample (assuming a 1 KHz servo rate). But, the real samples are >> likely to jump between 14, 15 and 16 each sample. That is perceived by >> the PID algorithm as a 6.7% jump in velocity. This is then amplified by >> the D term and added to the PWM output. The higher the D, the more you >> amplify these apparent velocity fluctuations, even though the real >> velocity is not actually fluctuating. This is another of the reasons >> low encoder resolution causes problems. >> > > Looking in the source code of the PID, I noticed there's no filtering on the > D term. I've used a filtered difference in the past to combat the derivative > noise, but of course it introduces phase shift. > Right, this is the conundrum. You can't allow much phase shift, of course, but these sharp deviations in perceived velocity are mostly at 1/2 the sampling rate. > I've ordered a higher resolution (5 micron) encoder, so it will be > interesting to see how much improvement that gives. That is roughly a 5:1 improvement, I think you should be able to tune for about 5 X tighter following error, and get less rumble as well.
Jon ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users