On Wednesday 21 July 2021 22:58:21 Chris Albertson wrote:

> The noise here is not electrical noise on the cables.  We assume the
> signal is perfect square waves.    This is "quantization noise".
>
> Here is what happens...   Say you have 50 slots on the spindle and the
> motor is turning at 100 RPM.   This is 1.67 revolutions per second so
> 350 pulses per second.  Now let's say your PID algorithm samples the
> encoder 100 times per second.  On average, it will get 3.5 pulses, but
> the count must always be a whole number so sometimes it gets 3 and
> sometimes 4.  Each time, the PID sees this as an error and tries to
> correct it.
>  Quantization noise is what happens when the measurement lacks enough
> resolution.
>
> Noise is defined as an error in the signal and there will always, on
> average be 1/2 count of noise error in the signal, even if it is
> electrically perfect.  If the typical number of counts is 100 per
> period than a 1/2 count noise is only 0.5% but at low speed where you
> expect only 2 counts the 1/2 count error is 25%
>
> The solution is to either add more counts per revolution or use a ten
> times more complex control algorithm.
>
100% correct Chris. so I added resolution. My working scale's for that 
are now in the low 7000's in high gear, and the low 14,000's in low 
gear, all switched by tally switches on the gear shift knobs skirt.

My Pgain in use went from 2.5 to as high as 40, but 20 is good enough 
that the only indication of loading I get is the iron in the motor 
chirping when the servo amps current limits kick in at around 17 amps.
Since the motor is a 9.7 fla motor, I figure its peaking right at 2hp 
when I hear the iron chirp.

I also took advantage of the huge gap in time when neither is valid when 
turniing the knob, so I'm not stopping the motor to save the gears, but 
running it at about 60 rpm when the knob is between positions, doing 
away with the need to reach the spindle and turn it by hand to engage 
the gear being entered. This speed reduction is done long before the 
gear being switched from is dis-engaged.

With Jon's controller, I can do this gear shift at wide open motor 
speeds, 3000 spindle revs in high gear, because the motor is reduced to 
this inbetween speed in about 50 milliseconds, and turning that slow the 
next gear is engaged without giving it help by hand. Normal control is 
restored only when the gears are fully engaged, and 50 milliseconds 
after the new switch has closed, its back up to top speed for whichever 
gear its now in.

However, despite that the gearing between he motor and spindle is random,  
I can still rigid tap with it, because the index pulse is now an ats-667 
watching a steel screw silly glued to the side of the drawbar cap, so I 
still have a once per turn index coming in.

> On Wed, Jul 21, 2021 at 3:36 PM John Dammeyer <jo...@autoartisans.com>
>
> wrote:
> > It's been a while since I did quadrature programming but if you have
> > two sensors don't the two work together to validate signals because
> > they can only change under certain conditions.  So noise can't
> > totally screw things up.
> >
> > Now having said that of course I did change from US Digital on my DC
> > Servos to CUI because they were impacted by noise and over time
> > there were more counts in one direction than the other.  So a return
> > to zero wasn't the original zero.
> >
> > So I'm probably all wet.  But 60 pulses per rev is a lot different
> > from thousands.  Might be better to clean up the signals at the
> > source before they are ever counted.
> >
> > John
> >
> > > -----Original Message-----
> > > From: andy pugh [mailto:bodge...@gmail.com]
> > > Sent: July-21-21 11:54 AM
> > > To: Enhanced Machine Controller (EMC)
> > > Subject: Re: [Emc-users] A new lathe encoder option.
> > >
> > > On Wed, 21 Jul 2021 at 19:49, Chris Albertson
> > > <albertson.ch...@gmail.com>
> >
> > wrote:
> > > > Could you solve the noise issue with a phase-locked loop?
> > >
> > > Yes, this would be a far better solution. But I didn't want to
> > > re-write the encoder counter from scratch.
> > >
> > > Ideally you would use two PLLs, one for the pulses and one for the
> > > index, to predict the pulse gap and extrapolate through it.
> > >
> > > --
> > > 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
> >
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users


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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to