On Tuesday 07 November 2017 10:08:33 Peter C. Wallace wrote: > On Tue, 7 Nov 2017, Gene Heskett wrote: > > I fail to see why a 2 or 3 percent error in duty cycle and or > > quadrature results in so much noise. There simply is no way in hell > > that spindle can be moving at 200 rpms on one servo-thread sample, > > and 600 rpms on the next sample one millisecond later while its > > filtered display on a pyvcp tach dial says 400 rpms. Thats > > physically impossible due to the mass of spinning material involved. > > One could expand the size of the fifo, but eventually the lag in > > seeing a real change in the velocity due to a tap starting to > > actually cut will become a factor in the Nyquist response causing > > even more instability since thats a direct Pgain input in any > > feedback calculations. That of course is self defeating. > > It may be that you have a EMI issue, false counts will play havoc with > the velocity estimation so impulse noise generated edges should be > eliminated by quadrature input filtering > Not too likely Peter, there is a 74ls04 used to clean up, square up, the waveforms from the photointerrupters. about 3" of cable away from them. Because of the limited space under the cover, and the longer lines to the electronics box I had to make it in two pieces. The square waves are nice and clean at the bob inputs on a 100 mhz dual trace scope, and at the encoder a/b inputs on the halscope. Limited there of coarse by the bandwidth of the halscope which shows a clean ramp. The little monster, with only 4 feet of cable between the same photointerrupter and the bob inputs. And it has the same problem, in fact it was on TLM that I first made this fifo based averager. And I incorporated it in the hal file in the pi version on the Sheldon, which has ATS667's watching the 60 tooth bull gear. It however has a vfd, which doesn't need the feedback to maintain within a couple percent of the requested speed.
> To set the input filtering, you set the encoder filter hal pin (set > means 15 counts to recognize an input) is set true. > and then set the encoder > sampling frequency (also a hal pin) so that at you highest spindle > speed you have about twice as many filter counts (30) as needed to > respond to the input square wave high and low states Thats the first time I've heard that, currently set at 50 megahertz I think. From the ini: ENCODER_SAMPLE = 500000 the hal: setp hm2_5i25.0.encoder.sample-frequency [SPINDLE_H]ENCODER_SAMPLE But I can try other settings there. And I was told thats multiplied by 1000 to get the sample clock. But even at 500khz if there is no multiplier, thats still good to more revs than it can do. But at 2850, its top speed, I'd need rps=[2850/60] to get rps, * [264 * 30]=112,200 counts for a sampling frequency, so at 500,000 thats way more than enough counts to have 30 per passing edge if my math is right. > > > The man page says I might be able to use some FF1, but 0.05 makes > > the whole thing oscillate at about 3 Hz. And I'm talking stopped to > > 500 revs, 3 times a second when 300 is requested. > > > > So, how does one get a velocity signal out of an encoder with > > perhaps a 5% peak to peak noise component for a 5% error in input > > signal timing? Thanks Peter. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
