Electronics-Related.com
Forums

really slow PLL

Started by John Larkin July 20, 2022
lørdag den 23. juli 2022 kl. 02.10.41 UTC+2 skrev Don Y:
> On 7/22/2022 4:52 PM, Lasse Langwadt Christensen wrote: > > fredag den 22. juli 2022 kl. 23.44.07 UTC+2 skrev Don Y: > >> On 7/22/2022 1:01 PM, Joe Gwinn wrote: > >>> On Fri, 22 Jul 2022 10:54:30 -0700 (PDT), Lasse Langwadt Christensen > >>> <lang...@fonz.dk> wrote: > >> > >>>>> If your device's *timing* was off by 0.05%, would that be consequential? > >>>> > >>>> https://youtu.be/AFaRIW-wZlw?t=54 > >> Note context of post... > >>> My recollection is the for a chorus to be in unison, all the singers > >>> must be within twenty milliseconds of one another. > >>> > >>> This is discussed a lot in the computer music literature. > >> Things get "painful" at about 50ms. I suspect your brain tries to > >> consider them as different events instead of indistinguishable. > > > > afaiu the limit for a phone system is >25ms round trip before you need echo canceling > Yes, but that addresses quality. A phone is still usable with > noticeable echo, esp if the echo is many dB down.
sure, but it seems that below ~25ms it is not noticable
> It seems like the brain has some (temporal) threshold beyond which it > can no longer treat things as being concurrent and starts a new "recognition > process" (so to speak) to deal with the "other" event.
at big concerts with speaker towers for the people far away from the stage those speakers gets delayed so they are 10-15ms behind the sound from the stage giving the illusion that all the sound is from the main Pa at the stage
Joe Gwinn wrote:
> On Fri, 22 Jul 2022 21:38:39 -0000 (UTC), "Don" <g@crcomp.net> wrote: > >> Joe Gwinn wrote: >> >> <snip> >> >>> Also, I'd lose the BNC connectors. Threaded connectors like SMA, TNC, >>> and Type N are far better. >>> >>> Or use shielded twisted pair to carry the 1PPS pulses. This would >>> work better over a backplane. >> >> This is good advice. Even though the lazy guy within me never truly >> gives up his fight to take the easy way out with BNC. >> Twisted pair (TP) sounds even easier than BNC. So, what's the >> "catch" with TP? Where's the "gotcha" to make TP harder than BNC? > > Depends on what you are trying to do. > > For nanosecond edges, coax is pretty useful, but short range and often > mechanically awkward. > > For microsecond edges at 1000 meters, RS422 over shielded twisted pair > is pretty good. > > For bus length links, LVDS or the like. > > And so on. And there is always optical links. > > Joe Gwinn >
BNCs are the bomb, as long as you aren't putting 500 of them in series, as with the old 10base2 coax Ethernet. TNCs are a very small niche, and N connectors belong only on spectrum analyzers. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
On 7/22/2022 5:24 PM, Lasse Langwadt Christensen wrote:
> l&oslash;rdag den 23. juli 2022 kl. 02.10.41 UTC+2 skrev Don Y: >> On 7/22/2022 4:52 PM, Lasse Langwadt Christensen wrote: >>> fredag den 22. juli 2022 kl. 23.44.07 UTC+2 skrev Don Y: >>>> On 7/22/2022 1:01 PM, Joe Gwinn wrote: >>>>> On Fri, 22 Jul 2022 10:54:30 -0700 (PDT), Lasse Langwadt Christensen >>>>> <lang...@fonz.dk> wrote: >>>> >>>>>>> If your device's *timing* was off by 0.05%, would that be consequential? >>>>>> >>>>>> https://youtu.be/AFaRIW-wZlw?t=54 >>>> Note context of post... >>>>> My recollection is the for a chorus to be in unison, all the singers >>>>> must be within twenty milliseconds of one another. >>>>> >>>>> This is discussed a lot in the computer music literature. >>>> Things get "painful" at about 50ms. I suspect your brain tries to >>>> consider them as different events instead of indistinguishable. >>> >>> afaiu the limit for a phone system is >25ms round trip before you need echo canceling >> Yes, but that addresses quality. A phone is still usable with >> noticeable echo, esp if the echo is many dB down. > > sure, but it seems that below ~25ms it is not noticable > >> It seems like the brain has some (temporal) threshold beyond which it >> can no longer treat things as being concurrent and starts a new "recognition >> process" (so to speak) to deal with the "other" event. > > at big concerts with speaker towers for the people far away from the stage > those speakers gets delayed so they are 10-15ms behind the sound from the stage > giving the illusion that all the sound is from the main Pa at the stage
I was near the close-in towers off stage left: <http://3.bp.blogspot.com/-syHkjhoSSr8/VeV32eq-8EI/AAAAAAABw1w/ippl8bx8kKE/s1600/Grateful%2BDead%2Blive%2Bin%2BRaceway%2BPark%252C%2B1977%2B%252816%2529.jpg>
On 7/22/2022 6:16 PM, Don Y wrote:
> On 7/22/2022 5:24 PM, Lasse Langwadt Christensen wrote: >> at big concerts with speaker towers for the people far away from the stage >> those speakers gets delayed so they are 10-15ms behind the sound from the stage >> giving the illusion that all the sound is from the main Pa at the stage > > I was near the close-in towers off stage left: > > <http://3.bp.blogspot.com/-syHkjhoSSr8/VeV32eq-8EI/AAAAAAABw1w/ippl8bx8kKE/s1600/Grateful%2BDead%2Blive%2Bin%2BRaceway%2BPark%252C%2B1977%2B%252816%2529.jpg>
Shot from a different viewpoint: <http://media.gettyimages.com/photos/more-than-125000-rock-fans-from-down-the-road-and-across-the-nation-picture-id127330716> The fence is made from "semi" trailers to give an idea of scale.
John Larkin wrote:
> > > Suppose I have several rackmount boxes and each has a BNC connector on > the back. Each of them has an open-drain mosfet, a weak pullup, and a > lowpass filtered schmitt gate back into our FPGA. > > I can daisy-chain several boxes with BNC cables and tees. > > Each box has a 40 MHz VCXO and I want to phase-lock them, or at least > time-align them to always be the same within a few microseconds, > longterm. > > I could call one the leader (not "master") and make the others > followers (not "slaves") and have the leader make an active low pulse > maybe once a second. A follower would use her (not "his") clock to > measure the incoming period and tweak its local VCXO in the right > direction. That should work. >
"Her" clock is not necessarily as stable as the 1PPS. How quickly does it need to converge? Is this just a "make it a wee bit better" thing or do you have a specific jitter spectrum in mind?
> Don't GPS receivers lock their 10 MHz oscillators to a 1 PPS pulse > from the satellites? >
"... and the other is a time-locked loop in the 1023 bit code space domain with the goal of tracking both the code and carrier phases for that signal." http://www.gpsinformation.net/main/gpslock.htm That sounds suspiciously like what I did ( in software ) for a terrestrial radio system once. The FPGA gave me a few bits of tuning data and it was a state machine. I *think* the output was a counter-delta value back to the FPGA. That was in the long ago. I put trimpots in the management plane , put those in a GUI and let the FPGA guy tune it. He was ecstatic and it beat him running back and forth. He tested it over coax; never did understand why this was needed at all unless you were over air/free space. The analog PLLs should have handled it. I think the RF amps we were using were pretty awful and not being run in a very linear range. System leaned heavily on some bandlimiting ( SAW ) filters.
> My system should work from a 1 PPS GPS pulse too, all boxes as > followers. >
A second is a long time. GPS is a couple of nanoseconds per day to a few msec. Yer average computer will go off to see the wizard and back in a day.
> The PLL algorithm might be interesting. >
It felt more like a "goalie" algorithm than a PLL. But it did show a measurable improvement. It's not really even an algorithm. It's a "bang bang" controller. Nine pound hammer in software. -- Les Cargill
Phil Hobbs wrote:
> jlarkin@highlandsniptechnology.com wrote:
<snip>
>> >> It dithers around the setpoint but nobody notices. >>
That's what lowpass filters are for.
>> This is immune to classic control theory so the concept annoys some >> people but it works great. > > A real old time control guy like Tim Wescott would probably be a fan > too--the great virtue of a bang-bang controller is that (as you say) > it's highly resistant to variations in the _plant_. >
Well, yeah - it's naturally constrained. When I jack the temp target on the A/C here, it take 30-45 seconds to turn everything off. Tim used to be a lot of fun and put up with much. FWIW rbj showed up on Reddit and lasted a couple days.
> Your furnace doesn't go nuts when you have a Christmas party, even > though all those people generate a lot of heat, and there's lots of > opening and closing of doors and ovens. >
You're just doing trust falls with slew rate limiting. :) There's probably a PhD paper somewhere with a madman low-pass filtering the output of a bangbang with a lowpass. Kinda like... the .047 uf cap in the tone circuit on a Telecaster :) It's there to limit damage.
> Cheers > > Phil Hobbs >
-- Les Cargill
bitrex wrote:
> On 7/20/2022 8:22 PM, John Larkin wrote: >> On Wed, 20 Jul 2022 19:32:20 -0400, Phil Hobbs >> <pcdhSpamMeSenseless@electrooptical.net> wrote: >> >>> John Larkin wrote: >>>> >>>> >>>> Suppose I have several rackmount boxes and each has a BNC connector on >>>> the back. Each of them has an open-drain mosfet, a weak pullup, and a >>>> lowpass filtered schmitt gate back into our FPGA. >>>> >>>> I can daisy-chain several boxes with BNC cables and tees. >>>> >>>> Each box has a 40 MHz VCXO and I want to phase-lock them, or at least >>>> time-align them to always be the same within a few microseconds, >>>> longterm. >>>> >>>> I could call one the leader (not "master") and make the others >>>> followers (not "slaves") and have the leader make an active low pulse >>>> maybe once a second. A follower would use her (not "his") clock to >>>> measure the incoming period and tweak its local VCXO in the right >>>> direction. That should work. >>>> >>>> Don't GPS receivers lock their 10 MHz oscillators to a 1 PPS pulse >>>> from the satellites? >>>> >>>> My system should work from a 1 PPS GPS pulse too, all boxes as >>>> followers. >>>> >>>> The PLL algorithm might be interesting. >>>> >>> >>> It's certainly possible.&nbsp; However, within whatever tiny loop bandwidth >>> you wound up with, the lockers would still have >>> >>> 20 log(40e6) = 152 dB >>> >>> higher phase noise than the lockee. >> >> GPS has that problem too. >> >>> >>> It would be interesting to do the math to see whether it's possible to >>> generate a concensus lock for the group: if you get everybody close >>> enough, just sum their sine wave outputs and lock each one of them to >>> that, with some bit of AC coupling or something so that they don't all >>> wander together off to the edge of the tuning range. >>> >>> Maybe have one doing the locking with a phase shifter and the others >>> with VCOs, or something like that. >>> >>> Definitely a partly-baked idea, but surely one could do better than >>> 152 dB! >>> >>> Cheers >>> >>> Phil Hobbs >> >> Each box is basically a multichannel power supply, but channels can be >> programmed to do stuff in timed sequences. I want different box >> outputs to time align within, say, one millisecond longterm once >> programs are kicked off together. So, many microseconds of equivalent >> RMS phase noise is OK as long as we stay time aligned longterm. > > It sounds like you're looking for a protocol like DMX if what you want > is to trigger sequences of events across boxes to within a millisecond, > I don't understand what this lock-the-40 MHz across boxes is about. > > <https://en.wikipedia.org/wiki/DMX512> > > >
DMX for this is like hunting deer with an artillery piece. DMX is for the big-ass risk scenarios in distributed topologies; this is a lot less profound. -- Les Cargill
l&oslash;rdag den 23. juli 2022 kl. 03.57.33 UTC+2 skrev Les Cargill:
> bitrex wrote: > > On 7/20/2022 8:22 PM, John Larkin wrote: > >> On Wed, 20 Jul 2022 19:32:20 -0400, Phil Hobbs > >> <pcdhSpamM...@electrooptical.net> wrote: > >> > >>> John Larkin wrote: > >>>> > >>>> > >>>> Suppose I have several rackmount boxes and each has a BNC connector on > >>>> the back. Each of them has an open-drain mosfet, a weak pullup, and a > >>>> lowpass filtered schmitt gate back into our FPGA. > >>>> > >>>> I can daisy-chain several boxes with BNC cables and tees. > >>>> > >>>> Each box has a 40 MHz VCXO and I want to phase-lock them, or at least > >>>> time-align them to always be the same within a few microseconds, > >>>> longterm. > >>>> > >>>> I could call one the leader (not "master") and make the others > >>>> followers (not "slaves") and have the leader make an active low pulse > >>>> maybe once a second. A follower would use her (not "his") clock to > >>>> measure the incoming period and tweak its local VCXO in the right > >>>> direction. That should work. > >>>> > >>>> Don't GPS receivers lock their 10 MHz oscillators to a 1 PPS pulse > >>>> from the satellites? > >>>> > >>>> My system should work from a 1 PPS GPS pulse too, all boxes as > >>>> followers. > >>>> > >>>> The PLL algorithm might be interesting. > >>>> > >>> > >>> It's certainly possible. However, within whatever tiny loop bandwidth > >>> you wound up with, the lockers would still have > >>> > >>> 20 log(40e6) = 152 dB > >>> > >>> higher phase noise than the lockee. > >> > >> GPS has that problem too. > >> > >>> > >>> It would be interesting to do the math to see whether it's possible to > >>> generate a concensus lock for the group: if you get everybody close > >>> enough, just sum their sine wave outputs and lock each one of them to > >>> that, with some bit of AC coupling or something so that they don't all > >>> wander together off to the edge of the tuning range. > >>> > >>> Maybe have one doing the locking with a phase shifter and the others > >>> with VCOs, or something like that. > >>> > >>> Definitely a partly-baked idea, but surely one could do better than > >>> 152 dB! > >>> > >>> Cheers > >>> > >>> Phil Hobbs > >> > >> Each box is basically a multichannel power supply, but channels can be > >> programmed to do stuff in timed sequences. I want different box > >> outputs to time align within, say, one millisecond longterm once > >> programs are kicked off together. So, many microseconds of equivalent > >> RMS phase noise is OK as long as we stay time aligned longterm. > > > > It sounds like you're looking for a protocol like DMX if what you want > > is to trigger sequences of events across boxes to within a millisecond, > > I don't understand what this lock-the-40 MHz across boxes is about. > > > > <https://en.wikipedia.org/wiki/DMX512> > > > > > > > > DMX for this is like hunting deer with an artillery piece. DMX is for > the big-ass risk scenarios in distributed topologies; this is a lot > less profound.
? it's a 250kbit uart on RS485, hardly rocket surgery
jlarkin@highlandsniptechnology.com wrote:
> On Thu, 21 Jul 2022 11:42:28 -0400, Phil Hobbs > <pcdhSpamMeSenseless@electrooptical.net> wrote:
<snip>
>> Phil Hobbs > > Mathematicians often like music. In my experience, music fandom is > negatively correlated to engineering design skill. Different brain > structure or something. >
Engineering is composition. Composition is the thin edge of the musical wedge. Musicianship is different; it's pattern identification. As is composition but in a different way. But it is all the same thing. It all depends on which wall you prefer to have your back against.
> One other thing I see a lot is undue respect for standards. As in "you > can't do that because it violates SCPI standards." Where are the SCPI > Police when you need them?
Over where they MATLAB. -- Les Cargill
On 7/22/2022 10:09 PM, Lasse Langwadt Christensen wrote:
> l&oslash;rdag den 23. juli 2022 kl. 03.57.33 UTC+2 skrev Les Cargill: >> bitrex wrote: >>> On 7/20/2022 8:22 PM, John Larkin wrote: >>>> On Wed, 20 Jul 2022 19:32:20 -0400, Phil Hobbs >>>> <pcdhSpamM...@electrooptical.net> wrote: >>>> >>>>> John Larkin wrote: >>>>>> >>>>>> >>>>>> Suppose I have several rackmount boxes and each has a BNC connector on >>>>>> the back. Each of them has an open-drain mosfet, a weak pullup, and a >>>>>> lowpass filtered schmitt gate back into our FPGA. >>>>>> >>>>>> I can daisy-chain several boxes with BNC cables and tees. >>>>>> >>>>>> Each box has a 40 MHz VCXO and I want to phase-lock them, or at least >>>>>> time-align them to always be the same within a few microseconds, >>>>>> longterm. >>>>>> >>>>>> I could call one the leader (not "master") and make the others >>>>>> followers (not "slaves") and have the leader make an active low pulse >>>>>> maybe once a second. A follower would use her (not "his") clock to >>>>>> measure the incoming period and tweak its local VCXO in the right >>>>>> direction. That should work. >>>>>> >>>>>> Don't GPS receivers lock their 10 MHz oscillators to a 1 PPS pulse >>>>>> from the satellites? >>>>>> >>>>>> My system should work from a 1 PPS GPS pulse too, all boxes as >>>>>> followers. >>>>>> >>>>>> The PLL algorithm might be interesting. >>>>>> >>>>> >>>>> It's certainly possible. However, within whatever tiny loop bandwidth >>>>> you wound up with, the lockers would still have >>>>> >>>>> 20 log(40e6) = 152 dB >>>>> >>>>> higher phase noise than the lockee. >>>> >>>> GPS has that problem too. >>>> >>>>> >>>>> It would be interesting to do the math to see whether it's possible to >>>>> generate a concensus lock for the group: if you get everybody close >>>>> enough, just sum their sine wave outputs and lock each one of them to >>>>> that, with some bit of AC coupling or something so that they don't all >>>>> wander together off to the edge of the tuning range. >>>>> >>>>> Maybe have one doing the locking with a phase shifter and the others >>>>> with VCOs, or something like that. >>>>> >>>>> Definitely a partly-baked idea, but surely one could do better than >>>>> 152 dB! >>>>> >>>>> Cheers >>>>> >>>>> Phil Hobbs >>>> >>>> Each box is basically a multichannel power supply, but channels can be >>>> programmed to do stuff in timed sequences. I want different box >>>> outputs to time align within, say, one millisecond longterm once >>>> programs are kicked off together. So, many microseconds of equivalent >>>> RMS phase noise is OK as long as we stay time aligned longterm. >>> >>> It sounds like you're looking for a protocol like DMX if what you want >>> is to trigger sequences of events across boxes to within a millisecond, >>> I don't understand what this lock-the-40 MHz across boxes is about. >>> >>> <https://en.wikipedia.org/wiki/DMX512> >>> >>> >>> >> >> DMX for this is like hunting deer with an artillery piece. DMX is for >> the big-ass risk scenarios in distributed topologies; this is a lot >> less profound. > > ? it's a 250kbit uart on RS485, hardly rocket surgery >
Right, it's glorified MIDI.