DSPRelated.com
Forums

Audio phase lock loop design

Started by Jorgito March 21, 2008
Hi All,

Looking for basic design reference info for audio phase lock loops.  For 
example, given a specified analog input S/N, what acquisition time is needed 
to achieve 1 degree phase resolution?

Thanks.

Jorgito



"Jorgito" <noooospam@nospam.com> writes:

> Hi All, > > Looking for basic design reference info for audio phase lock loops. For > example, given a specified analog input S/N, what acquisition time is needed > to achieve 1 degree phase resolution?
Hi Jorgito, A good place to start would be the old chestnut by Gardner. Since a PLL is a control system, you might also want to consult any control system book; I can recommend Nise. Our very own Tim Wescott also has published in this area. --Randy @book{gardner, title = "Phaselock Techniques", author = "Floyd M. Gardner", publishfer = "Wiley", edition = "second", year = "1979"} @book{nise, title = "Control Systems Engineering", author = "Norman S. Nise", publishfer = "Benjamin/Cummings", edition = "second", year = "1995"} @book{wescott, title = "Applied Control Theory for embedded systems", author = "Tim Wescott", publishfer = "Newnes", year = "2006"} -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://www.digitalsignallabs.com
Jorgito wrote:
> Hi All, > > Looking for basic design reference info for audio phase lock loops. For > example, given a specified analog input S/N, what acquisition time is needed > to achieve 1 degree phase resolution? > > Thanks. > > Jorgito
First: I notice that you have posted this on at least two groups. Please get onto Wikipedia and look up "cross-posting". Compare it to multiple posting -- then please stop multiple posting. Then: Are you undecided about whether you want to implement this in digital land or analog? Are you trying to synchronize to your source signal, or just determine its phase? Do you want to acquire phase and frequency and track them, are you trying to recover the original signal, what? In many ways, a PLL can be thought of as a means of implementing a very narrow-band filter. For the purposes of recovering a carrier or doing a one-time determination of phase, it may be better in a DSP environment to use a very narrow-band filter to acquire the signal of interest, then extract the phase or use the signal, as appropriate. Even if you need to track the signal, if it's important to lock onto the signal quickly it may be good to start by doing a rapid acquisition step that is easy in the digital world but would require a significant amount of extra circuitry in the analog world. So tell us more, please. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Hi Tim,

Thanks for replying.

I'm trying to determine the time between similar points on the waveforms of 
two sinusoidal signals of equal amplitude.  Their frequencies are known with 
good accuracy but they are uncorrelated and may be very slightly different 
from each other.  I assume the zero crossing times will be the most accurate 
points to use for a time measurement.

If that's a correct assumption I'd like to determine the time interval 
between a zero crossing of signal no 1, and the immediately next zero 
crossing time of signal no. 2.  I have several seconds available to acquire 
and lock, my S/N > 50 dB and I'm hoping to get tens of nsec (better than a 
degree) of resolution in this time interval measurement.

I only need to measure this time interval and have no interest in syncing, 
tracking or recovering the original signal.  I 've been assuming a DSP 
implementation and would use the DSP for front-end bandpass filtering as 
well.

Jorgito



"Tim Wescott" <tim@seemywebsite.com> wrote in message 
news:x4ednZZyDLUgu3nanZ2dnUVZ_hWdnZ2d@web-ster.com...
> Jorgito wrote: >> Hi All, >> >> Looking for basic design reference info for audio phase lock loops. For >> example, given a specified analog input S/N, what acquisition time is >> needed to achieve 1 degree phase resolution? >> >> Thanks. >> >> Jorgito > > First: I notice that you have posted this on at least two groups. Please > get onto Wikipedia and look up "cross-posting". Compare it to multiple > posting -- then please stop multiple posting. > > Then: > > Are you undecided about whether you want to implement this in digital land > or analog? Are you trying to synchronize to your source signal, or just > determine its phase? Do you want to acquire phase and frequency and track > them, are you trying to recover the original signal, what? > > In many ways, a PLL can be thought of as a means of implementing a very > narrow-band filter. For the purposes of recovering a carrier or doing a > one-time determination of phase, it may be better in a DSP environment to > use a very narrow-band filter to acquire the signal of interest, then > extract the phase or use the signal, as appropriate. > > Even if you need to track the signal, if it's important to lock onto the > signal quickly it may be good to start by doing a rapid acquisition step > that is easy in the digital world but would require a significant amount > of extra circuitry in the analog world. > > So tell us more, please. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Do you need to implement control loops in software? > "Applied Control Theory for Embedded Systems" gives you just what it says. > See details at http://www.wescottdesign.com/actfes/actfes.html
On Mar 21, 5:04 pm, "Jorgito." <nospample...@nospam.com> wrote:
> Hi Tim, > > Thanks for replying. > > I'm trying to determine the time between similar points on the waveforms of > two sinusoidal signals of equal amplitude. Their frequencies are known with > good accuracy but they are uncorrelated and may be very slightly different > from each other. I assume the zero crossing times will be the most accurate > points to use for a time measurement.
Using only a tiny subset of points, such as just those around two zero crossings, will be more susceptible to noise. If the frequency of your sinusoids is tightly bounded or has been estimated, you can use an interpolation from a 2-bin DFT as a phase estimator, from which a zero crossing estimate can be derived.
> If that's a correct assumption I'd like to determine the time interval > between a zero crossing of signal no 1, and the immediately next zero > crossing time of signal no. 2. I have several seconds available to acquire > and lock, my S/N > 50 dB and I'm hoping to get tens of nsec (better than a > degree) of resolution in this time interval measurement.
Would a linear regression of the difference between the last N zero-crossing pairs give you a workable estimate?
> I only need to measure this time interval and have no interest in syncing, > tracking or recovering the original signal. I 've been assuming a DSP > implementation and would use the DSP for front-end bandpass filtering as > well.
On Mar 22, 9:21 am, Tim Wescott <t...@seemywebsite.com> wrote:
> Jorgito wrote: > > Hi All, > > > Looking for basic design reference info for audio phase lock loops. For > > example, given a specified analog input S/N, what acquisition time is needed > > to achieve 1 degree phase resolution? > > > Thanks. > > > Jorgito > > First: I notice that you have posted this on at least two groups. > Please get onto Wikipedia and look up "cross-posting". Compare it to > multiple posting -- then please stop multiple posting. > > Then: > > Are you undecided about whether you want to implement this in digital > land or analog? Are you trying to synchronize to your source signal, or > just determine its phase? Do you want to acquire phase and frequency > and track them, are you trying to recover the original signal, what? > > In many ways, a PLL can be thought of as a means of implementing a very > narrow-band filter. For the purposes of recovering a carrier or doing a > one-time determination of phase, it may be better in a DSP environment > to use a very narrow-band filter to acquire the signal of interest, then > extract the phase or use the signal, as appropriate. > > Even if you need to track the signal, if it's important to lock onto the > signal quickly it may be good to start by doing a rapid acquisition step > that is easy in the digital world but would require a significant amount > of extra circuitry in the analog world. > > So tell us more, please. > > -- > > Tim Wescott > Wescott Design Serviceshttp://www.wescottdesign.com > > Do you need to implement control loops in software? > "Applied Control Theory for Embedded Systems" gives you just what it says. > See details athttp://www.wescottdesign.com/actfes/actfes.html
Rapid lock-in implies high bandwidth nomatter whether Analogue or Digital. The important point about PLL's is what limits my bandwidth? The answer is the 2Fc feedthrough term where Fc is the VCO free- running frequency. Your incoming signal must be centred on Fc of course. The best kind of "filter" to use is a lag-lead whereby you will get enhanced gain at low frequencies and stability via a good phase- margin. Once again this is possuble in digital or analogue. Probably analogue is easier since you only need two capacitors and a resistor! remember when you change the free-running frequency you also change the gain of the VCO so you cannot just do a linear translation if you get one working and wish to design a second at a different Fc. It's still pretty easy though and get's far easier after 20 years experience. K.
On Fri, 21 Mar 2008 17:04:02 -0700, Jorgito. wrote:
(top posting fixed)
> > "Tim Wescott" <tim@seemywebsite.com> wrote in message > news:x4ednZZyDLUgu3nanZ2dnUVZ_hWdnZ2d@web-ster.com... >> Jorgito wrote: >>> Hi All, >>> >>> Looking for basic design reference info for audio phase lock loops. >>> For example, given a specified analog input S/N, what acquisition time >>> is needed to achieve 1 degree phase resolution? >>> >>> Thanks. >>> >>> Jorgito >>
-- request to clarify question snipped --
>> >> So tell us more, please. >> > Hi Tim, > > Thanks for replying. > > I'm trying to determine the time between similar points on the waveforms > of two sinusoidal signals of equal amplitude. Their frequencies are > known with good accuracy but they are uncorrelated and may be very > slightly different from each other. I assume the zero crossing times > will be the most accurate points to use for a time measurement. > > If that's a correct assumption I'd like to determine the time interval > between a zero crossing of signal no 1, and the immediately next zero > crossing time of signal no. 2. I have several seconds available to > acquire and lock, my S/N > 50 dB and I'm hoping to get tens of nsec > (better than a degree) of resolution in this time interval measurement. > > I only need to measure this time interval and have no interest in > syncing, tracking or recovering the original signal. I 've been > assuming a DSP implementation and would use the DSP for front-end > bandpass filtering as well. > > Jorgito > >
Zero crossing detection on a DSP can be a pain in the behind. My first stab at this would be to collect a length of samples such that the phase deviation due to frequency differences would be less than five degrees or so, demodulate it against inphase and quadrature prototypes of the sine wave you think it is, integrate, and take the arctan. (you can think of the middle step as a '1-point DFT' -- my background is more radio, so I think of it as a demodulation step). If you make sure that all your phase references are against the middle of the prototype then you should even be able to absorb the frequency uncertainty and maintain a pretty good measurement. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html