Frequency measurement -- how to choose sampling ?

Click For Summary

Discussion Overview

The discussion revolves around the optimal choice of sampling time (T) for measuring the frequency (f) of a periodic signal using a fixed number of data points (N). Participants explore various methods for frequency measurement, including Fourier transforms and least squares fitting, while considering the implications of sampling intervals and noise on accuracy.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests that frequency resolution is determined by 1/(N*T) and proposes choosing T as large as possible, specifically T = 1/(2*f), based on the Nyquist limit.
  • Another participant counters that there is no ideal time-step a priori, emphasizing the need for prior knowledge of the frequency to select an appropriate T.
  • It is mentioned that for a fixed N, the largest T that still resolves the frequency should be chosen, and that sampling at the Nyquist frequency could yield equal size samples.
  • One participant highlights the importance of sampling over multiple periods of the wave to improve frequency estimation accuracy.
  • A suggestion is made to low pass filter the signal before analog-to-digital conversion to avoid aliasing issues.
  • Concerns are raised about the limitations of methods to improve accuracy, particularly the impact of electronic noise and the quality of the reference signal on measurement precision.
  • It is noted that with proper setups, frequency measurements can achieve high accuracy, with some setups reaching precision levels of 1 part in 10^14.

Areas of Agreement / Disagreement

Participants express differing views on the optimal choice of sampling time and the methods for improving frequency measurement accuracy. There is no consensus on a single approach, and multiple competing perspectives remain throughout the discussion.

Contextual Notes

Participants acknowledge the dependence of sampling strategies on prior knowledge of the signal frequency and the challenges posed by noise and reference signal quality. The discussion reflects various assumptions about measurement techniques and their limitations.

csopi
Messages
81
Reaction score
2
Hi,

let's say I want to measure the frequency f of a periodic signal. I may take N data points with an arbitrary timestep of T.

The question is how shall I choose T for a fixed N to have the best accuracy? In principle the frequency resolution is 1/(N*T) when taking the Fourier transform, this would suggest to me to choose T as large as possible, i.e. T= 1/ (2*f) (Nyquist limit).

However I am not sure of that for several reasons. E.g. one may use least square fitting instead of Fourier transform, and it may increase the resolution, especially if I measure only a few oscillations. One other possibility is to pad up the measured signal with a constant signal (e.g. zeros) -- with this, one artificially increase the total measurement time, and with this the resolution. By the way, what is the theoretical max. accuracy, that one can reach with this latter trick?
 
Physics news on Phys.org
You want to find the frequency of a periodic signal by taking amplitude samples at uniform timestep - there is no way, a-priori, to choose the ideal time-step. There isn't one.

You need to have some idea what the frequency is going to be before you start - you need the time-step to be much smaller than the period of the signal but you cannot know what that is without knowing what the frequency is and that is what you are trying to measure.

Considering you have a fixed N for some reason (usually the sampling time is fixed, and you get to pick N, which determines T) then you want the largest value for T that can still resolve the frequency.
If, by some chance, you sample at exactly the nyquist frequency of the signal, then you will get equal size samples, what happens when you take the Fourier transform of that?

Since you have to measure the frequency, you will probably want a time-step smaller than 1/2f ... play around a bit with different values and see what you get.
 
You'd certainly want a sampling interval T safely smaller than 1/2f (the Nyquist frequency) as Simon Bridge mentions. In order to get the most accurate frequency estimate, what you care about is the product you mentioned: N*T = (total sampling time). Your goal is to sample as many periods of the wave as possible.

There are other methods besides Fourier transforms that can work, but the basic problem is remains the same: two waves with very close frequency only "diverge" after many oscillations, so you need to measure for a long time to tell the difference.
 
If you are measuring frequency is is usually a good idea to low pass filter the signal before it reaches the AD converter; that way you know you are not having a problem with aliasing.

Also, none of the methods you suggest work if you by "improve accuracy" mean a more accurate measurement of the true frequency. There are a few tricks you can use but you will quickly find that in practice what will ultimately limit you accuracy at short times is usually the white noise of the electronics (and the only way to improve on that is to increase the time you measure , i.e. the integration time) and well as how good your reference signal is (this obviously always sets the ultimate limit for a single device). The good news is that frequency is something we can measure really accurately quite easily, even with a basic frequency counter you should be able to get to something like 1 part in 10^7 or so within a few seconds of integration time. A "proper" lab setup will get you to something like 1 part in 10^11 or thereabouts if you have a good reference and a specialized setup will be close to maybe 1 part in 10^14 or even less (but you'd need a hydrogen maser as a reference)
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
17
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
6K
Replies
6
Views
1K