On Thu, 22 Jul 2021 at 04:01, Chris Albertson <albertson.ch...@gmail.com> wrote: > > The noise here is not electrical noise on the cables. We assume the signal > is perfect square waves. This is "quantization noise".
No, I am talking _specifically_ about electrical noise. With a single pulse counter electrical noise can cause a small position error and a huge velocity error. One extra pulse at a speed where there is one pulse per servo period will double the apparent speed. I have seen single real-pulse errors of 10x the real velocity in counter-mode. > The solution is to either add more counts per revolution or use a ten times > more complex control algorithm. Bear in mind that LinuxCNC timestamps the encoder pulses, and uses that to calculate velocity and position-interpolated. If there has been an encoder pulse this servo-period it takes the time between the last pulse of the previous servo thread when a pulse was seen, and the timestamp of the last pulse of the current servo period and uses that (and the total number of pulses) to calculate the velocity. It then uses that velocity to output a position-interpolated which is an extrapolation of the position at the current velocity since the last pulse was seen. If there has _not_ been a pulse then it calculates the velocity as if there was just about to be a pulse. This should only ever be an over-estimate, and is probably the best choice, but I had to over-ride that in missing-tooth mode for at least the tooth gap time. There is quantisation noise in this scheme, as the timestamping of the pulses can only be at base-thread resolution. (or clock-rate in the case of the FPGA counters, where it is _much_ less of an issue) -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users