# frequency measurement and time-frequency uncertainty

Started by July 25, 2018
```On Thursday, July 26, 2018 at 6:05:42 AM UTC-7, Randy Yates wrote:

(snip)

> OK, thanks for that Steve, but the fundamental question I have is:
> how small can we make the "observation window" and still attain
> a estimation certain accuracy (2PPM at 32.768 kHz)?

More obvious to me is a high-speed counter, hopefully as
low-noise and frequency stable as possible.

Count pulses on the high-speed counter between edges of the 32768kHz
oscillator.

You can then do usual statistical analysis on the count values.
Mean will give you the frequency. Standard deviation will have a
term related to how far you are from an integer frequency, and a
term from noise (jitter).  With enough counts, you can get accurate
enough results.  Mean improves with the square root of the number
of counts. I think SD does also, but I haven't thought about it
for a while.

```
```On Thursday, July 26, 2018 at 4:28:07 AM UTC+12, Randy Yates wrote:
> We have a requirement to measure a 32.768 KHz TTL output quickly
> and with a certain accuracy.
>
> If one used an N-bit ADC sampling at F samples per second, what is the
> relationship between T_m and F_delta, where T_m is the minimum
> measurement time (say, in seconds) for a maximum frequency error of
> F_delta (say, in PPM)?
>
> For this discussion assume the frequency is stable over the measurement
> time. Also assume the only noise is the quantization noise of the ADC.
>
> What is making my head hurt is some (seemingy) contradictory pieces of
> information I've come across over the years:
>
>   1. If the input signal was noiseless and known to ba a sinusoid, it
>   only requires 3 samples to determine the frequency.
>
>   2. The signal isn't noiseless, so I think we're getting into some
>   estimation theory here?
>
>   3. How can you square up the time-frequency uncertainty principle,
>   which I take to mean that in order to reduce the uncertainty in
>   frequency of a measurement, we have to increase the measurement
>   time (with some magic proportion involved), with 1? It sames that
>   if the assumptions of 1 were made, we can make aribtrarily faster
>   measurements by increasing the sample rate.
>
> Can you guys set me straight?
> --
> Randy Yates
> Embedded Linux Developer
> http://www.garnerundergroundinc.com

Good point and closely related is the reason why zero crossing detectors or hard limiters do not work. You just transfer uncertainty in amplitude to uncertainty in phase. This is why FM radio at poor SNRs (carrier to noise ratios) is better with no limiter at all.
```
```<gyansorova@gmail.com> wrote:

>Good point and closely related is the reason why zero crossing detectors
>or hard limiters do not work. You just transfer uncertainty in amplitude
>to uncertainty in phase. This is why FM radio at poor SNRs (carrier to
>noise ratios) is better with no limiter at all.

Either FM or FSK can be demodulated after hard limiting but there
is a performance loss, since you no longer have optimal (e.g.
maximum-likelyhood) detection as a possibility.  You have
lost the pulse shape.

But in many situations the performance loss is not that bad.

Steve
```
```On Tuesday, July 31, 2018 at 7:33:57 AM UTC+12, Steve Pope wrote:
> <gyansorova@gmail.com> wrote:
>
> >Good point and closely related is the reason why zero crossing detectors
> >or hard limiters do not work. You just transfer uncertainty in amplitude
> >to uncertainty in phase. This is why FM radio at poor SNRs (carrier to
> >noise ratios) is better with no limiter at all.
>
> Either FM or FSK can be demodulated after hard limiting but there
> is a performance loss, since you no longer have optimal (e.g.
> maximum-likelyhood) detection as a possibility.  You have
> lost the pulse shape.
>
> But in many situations the performance loss is not that bad.
>
> Steve

Depends on the CNR. Fine at high CNR ratios. There is no filtering action however in limiting. The noise is still there, just converted to another type, from additive to phase
```
```On Mon, 30 Jul 2018 16:32:40 -0700 (PDT), gyansorova@gmail.com wrote:

>On Tuesday, July 31, 2018 at 7:33:57 AM UTC+12, Steve Pope wrote:
>> <gyansorova@gmail.com> wrote:
>>
>> >Good point and closely related is the reason why zero crossing detectors
>> >or hard limiters do not work. You just transfer uncertainty in amplitude
>> >to uncertainty in phase. This is why FM radio at poor SNRs (carrier to
>> >noise ratios) is better with no limiter at all.
>>
>> Either FM or FSK can be demodulated after hard limiting but there
>> is a performance loss, since you no longer have optimal (e.g.
>> maximum-likelyhood) detection as a possibility.  You have
>> lost the pulse shape.
>>
>> But in many situations the performance loss is not that bad.
>>
>> Steve
>
>Depends on the CNR. Fine at high CNR ratios. There is no filtering action however in limiting. The noise is still there, just converted to another type, from additive to phase

A distinction in this case is that the signal of interest is already
NRZ, i.e., "limited" to rectangular pulses.   The only impairment is
the jitter that is already present, none is added by the processing.

```