DSPRelated.com
Forums

Frequency offset estimation.

Started by Andrey May 12, 2004
"Clay S. Turner" <CSTurner@WSE.Biz> writes:

> Jerry, Randy and others, > > You may find the following document on timekeeping very interesting. It > applies to the frequency estimation in the sense of how well can we measure > time. I.e., measure the period of a wave and then find its frequency. > > http://literature.agilent.com/litweb/pdf/5965-7984E.pdf
Hi Clay, I read roughly 25 percent of it so far and I do find the topic fascinating. Of particular interest for me are (so far) two items: 1. I had always wondered why Greenwich, England was some sort of standard. The ball dropping was a fascinating history lesson! 2. I noticed the accuracy for quartz given in the figure on page 51 (showing the accuracy of various timing devices) doesn't match my perception, at least not for the standard quartz watch you can buy at Walmart now for under $10. Come on, 1 *micro*second a day? 1 second in 2700 years? I don't think so. From my experience the average quartz watch is accurate to about 15 second per month. Desiring an accurate time-piece, I purchased one of Breitling's temperature-compensated quartz movements. Even these gems are advertised as accurate to only 10 seconds per year, although my particular watch, in the typical usage I put it to (temperature variations, etc.), is doing better than a half-a-second every six months. Thanks for pointing us to a fascinating article. --Randy
> > -- > Clay S. Turner, V.P. > Wireless Systems Engineering, Inc. > Satellite Beach, Florida 32937 > (321) 777-7889 > www.wse.biz > csturner@wse.biz > > > > "Jerry Avins" <jya@ieee.org> wrote in message > news:40aa545f$0$3035$61fed72c@news.rcn.com... > > Jerry Avins wrote: > > > > > ... a few comments: > > > > > > * Zero-noise conditions are rare at best :-). > > > * Complex quantities in nature can't be measured in a single instant on > > > a single wire. Your method needs two complex samples of a signal on a > > > single wire -- the input to the frequency "counter". I think that > > > needs more time than Ts, maybe much more. (How many taps in your HT?) > > > * The effect of noise on accuracy is not trivially obvious, nor is the > > > amount of noise riding on the signal to be measured necessarily known. > > > * The method seems to me to be clever, to require sophisticated analysis > > > for determining its worth with a given signal, and unlike the > > > straightforward counter, understanding it uses mathematics well beyond > > > cardinal numbers. It's neat, but in my book, a bit roundabout. > > more: > > * Digitizing usually requires a signal to have been passed through an > > anti-alias filter, hardly a one-Ts operation. > > > > One of the lessons here is that how fast we can calculate on samples > > isn't the whole story. In fact, the time to acquire them may dominate. > > > > Measuring the frequency of days (the basic unit being the year) to the > > presently accepted accuracy by counting days would take about 60,000 > > years. Obviously, there are faster ways. But then, the ancients couldn't > > know or care about leap seconds. > > > > Jerry > > -- > > Engineering is the art of making what you want from things you can get. > > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; > > > >
-- Randy Yates Sony Ericsson Mobile Communications Research Triangle Park, NC, USA randy.yates@sonyericsson.com, 919-472-1124
Since this thread talks so much about frequency counters I thought I should
include this reference on frequency counters.
http://cp.literature.agilent.com/litweb/pdf/5965-7660E.pdf

I had a lot of trouble finding this when I wanted to understand the various
methods used in frequency counters - so hopefully this will save some time
for others when they use Google.

Cheers
Bhaskar


"Jerry Avins" <jya@ieee.org> wrote in message
news:40aa8bb7$0$2987$61fed72c@news.rcn.com...
> Randy Yates wrote: > > > Jerry Avins <jya@ieee.org> writes: > > > > > >>Randy Yates wrote: > >> > >> > >>>Jerry Avins <jya@ieee.org> writes: > >>> > >> > >>>>Randy Yates wrote: > >> > >> ... > >> > >> > >>>>>Why limit your count of cycles to > >>>>>integer values? There are techniques (use a PLL synth to multiply the > >>>>>input frequency up a factor of N?) one could easily use to reduce the > >>>>>required time period for a given accuracy by an order of magnitude. > >>>> > >>>>PLLs either suffer from FM or need a long time to lock up. I don't see > >>>>one as part of a good way to measure frequency rapidly and accurately. > >>> > >>>Good point. You trade off one lengthy operation (averaging time) for > >>>another > >> > >>>(lock-up time). > >>> > >> > >>>>My bias comes from hardware, so maybe you can enlighten me with a > >>>>software counterexample. > >>> > >>>I already did, which you snipped and ignored. > >> > >> > >>I was unclear. I meant a software example using a PLL. > > > > > > Gotcha. > > > > > >>The example I snipped, > >> > >> > >> > >>>Digitize the signal being measured, run the resulting real digital > >>>signal through a complex filter with frequency response H(f) = 1, > >>>f>=0, 0 otherwise, to obtain a complex signal r[n]*e^(i*theta[n]) > >>>then > >> > >>>estimate the frequency as (theta[n] - theta[n-1]/Ts), Ts = 1/Fs, Fs > >>>the sample rate. This can be done in Ts seconds to infinte accuracy in > >>>zero-noise conditions. > >> > >>needs a few comments: > >> > >>* Zero-noise conditions are rare at best :-). > > > > > > I'm just comparing apples to apples. If you inject a noiseless signal > > into your frequency counter, it still takes 100 seconds to measure to > > 0.01 Hz. > > With a counter, either the noise creates extra zero crossings, or it > doesn't matter. Some counters select a low-performance low-pass filter > with the range (gate time) switch to suppress high-frequency noise that > might create a spurious zero crossing very near the real one. A signal > has to look dirty on a scope before a counter becomes inaccurate; say, > 10 dB SNR. How much noise can the phi_2 - phi_1 method tolerate to get > .01% accuracy? > > A counter doesn't really indicate cycles per second. In reality, it > indicates zero crossings per second, which may not be exactly the same > thing in the presence of large amounts of noise. Still a front end that > squares up the signal (like the limiter in an FM receiver) adds much > robustness, and a simple RC rolloff before the zero-crossing detector > adds more. > > The noise performance of the period measurer (with or without conversion > to frequency) is less robust and harder to assess. Noise can more easily > move a zero crossing than it can create one. Measuring more periods > gives more precision -- the number of them is in the denominator -- and > divides the noise-induced jitter among them. Again. the longer the > measurement, the more accurate the result. (There ain't no free lunch.) > > >>* Complex quantities in nature can't be measured in a single instant on > >> a single wire. Your method needs two complex samples of a signal on a > >> single wire -- the input to the frequency "counter". I think that > >> needs more time than Ts, maybe much more. (How many taps in your HT?) > > > > > > I believe you're just restating my idea, i.e., the transient response > > of the filter might come into play. > > Yes. You mentioned that further down as a generality. I was specific > here. > > >>* The effect of noise on accuracy is not trivially obvious, nor is the > >> amount of noise riding on the signal to be measured necessarily
known.
> > > > > > Just say No to noise. :) (See above.) > > How? > > >>* The method seems to me to be clever, to require sophisticated analysis > >> for determining its worth with a given signal, and unlike the > >> straightforward counter, understanding it uses mathematics well
beyond
> >> cardinal numbers. It's neat, but in my book, a bit roundabout. > > > > > > It's a filter, an arctangent, and a division. In the realm of DSP, > > not too sophisticated, in my opinion. > > De Gustibus ... Which scheme would you more likely be able to explain > to a group of Cub Scouts? > > > All real sinusoids have a symmetric frequency response. Hacking off > > one side (positive or negative) of the frequency-domain leaves a > > single complex sinusoid, from which you can get delta theta/delta t. > > Gold! How, exactly? What procedure will create analytic samples from > real ones without the latency of a Hilbert transformer? The glimmering I > have involves a complex-coefficient filter that, as you put it, hacks > off the negative frequencies. But what about that filter's latency? Is > it much shorter than the Hilbert transformer? > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; >

"Randy Yates" <randy.yates@sonyericsson.com> wrote in message
news:xxpy8nobjz8.fsf@usrts005.corpusers.net...
> "Clay S. Turner" <CSTurner@WSE.Biz> writes: > > > Jerry, Randy and others, > > > > You may find the following document on timekeeping very interesting. It > > applies to the frequency estimation in the sense of how well can we
measure
> > time. I.e., measure the period of a wave and then find its frequency. > > > > http://literature.agilent.com/litweb/pdf/5965-7984E.pdf > > Hi Clay, > > I read roughly 25 percent of it so far and I do find the topic
fascinating. Of
> particular interest for me are (so far) two items: > > 1. I had always wondered why Greenwich, England was some sort of
standard. The
> ball dropping was a fascinating history lesson! > > 2. I noticed the accuracy for quartz given in the figure on page 51 > (showing the accuracy of various timing devices) doesn't match my > perception, at least not for the standard quartz watch you can buy > at Walmart now for under $10. Come on, 1 *micro*second a day? 1 > second in 2700 years? I don't think so. From my experience the > average quartz watch is accurate to about 15 second per month. > > Desiring an accurate time-piece, I purchased one of Breitling's > temperature-compensated quartz movements. Even these gems are > advertised as accurate to only 10 seconds per year, although my > particular watch, in the typical usage I put it to (temperature > variations, etc.), is doing better than a half-a-second every > six months. > > Thanks for pointing us to a fascinating article. > > --Randy > > -- > Randy Yates > Sony Ericsson Mobile Communications > Research Triangle Park, NC, USA > randy.yates@sonyericsson.com, 919-472-1124
Hello Randy, With the quartz osc, he talks about proper compensation to get those kinds of accuracies. The original watches had a frequency error, which will show as a dominant error term, but he assumes you can remove that. A remaining term is a random walk problem, so it can just be nulled out. As far as simple time pieces go, my watches hold to within 1 second a month as compared to my gps. I can even get my grandfather clock to 1 second a day until a big temperature change occurs. (The pendulum is a nontemperature compensated type.) I can add a mercury filled cylinder to the pendulum's bob to do the compensation. I glad you like the article so far. When you get to Appendix A, I think you will find the frequency-time uncertainty stuff very relevant to yours and Jerry's discussion. As a side note, the lead author, David Allan, developed the oscillator stability measure that carries his name. When you look into precision clock sources, the Allan variance is the oft specified value. Clay -- Clay S. Turner, V.P. Wireless Systems Engineering, Inc. Satellite Beach, Florida 32937 (321) 777-7889 www.wse.biz csturner@wse.biz
Randy Yates wrote:

   ...

> 2. I noticed the accuracy for quartz given in the figure on page 51 > (showing the accuracy of various timing devices) doesn't match my > perception, at least not for the standard quartz watch you can buy > at Walmart now for under $10. Come on, 1 *micro*second a day? 1 > second in 2700 years? I don't think so. From my experience the > average quartz watch is accurate to about 15 second per month.
... I remember seeing a quartz oscillator crystal mounted in an evacuated glass bulb about four inches high and just under two inches in diameter. The crystal had been aged by being run at modestly high excitation for about a year to "set" its modes, a process called "aging". The bulb was used in a vibration-isolated oven maintained at about 120F, far enough above any possible ambient so that only a heater was needed to maintain a constant temperature. (The heater's power was modulated, rather than being turned on and off.) The oscillator electronics (vacuum tube, of course) was AGCed to stay mostly out of saturation, driving the crystal at the minimum sustaining excitation. After a week or so of steady operation, it was expected to maintain a stability of better than 1/2 ms/yr. WWV was periodically corrected by astronomic observation, so I guess they could tell. This is not the stuff of cheap watches. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins wrote:
(snip)

> I remember seeing a quartz oscillator crystal mounted in an evacuated > glass bulb about four inches high and just under two inches in diameter.
(snip)
> This is not the stuff of cheap watches. > > Jerry
On the other hand, what you get for the price is amazingly good for a cheap watch. I recently got one that cost $2.50, including a whole box of the kids favorite cereal. I haven't tried to measure the accuracy yet, but for cost it probably isn't so bad. As I understand it, they use laser trimmed crystals, so they can get them fairly accurate. -- glen
glen herrmannsfeldt wrote:

> Jerry Avins wrote: > (snip) > >> I remember seeing a quartz oscillator crystal mounted in an evacuated >> glass bulb about four inches high and just under two inches in diameter. > > > (snip) > >> This is not the stuff of cheap watches. >> >> Jerry > > > On the other hand, what you get for the price is amazingly > good for a cheap watch. I recently got one that cost $2.50, > including a whole box of the kids favorite cereal. > > I haven't tried to measure the accuracy yet, but for cost > it probably isn't so bad. As I understand it, they use > laser trimmed crystals, so they can get them fairly accurate. > > -- glen
My wrist watches keep better time than any mechanical ship's chronometer used by the Navy through the Korean war. The battery in the one I'm wearing now was last changed three years ago. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;