Determining the Fundamental Frequency Component

Click For Summary

Discussion Overview

The discussion centers around methods for determining the peak value of the fundamental frequency component of a periodic waveform sampled at fixed time intervals (Δt). Participants explore various techniques, including the Discrete Fourier Transform (DFT), binning methods, and filtering approaches, while considering the implications of sampling frequency and harmonics.

Discussion Character

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

Main Points Raised

  • Some participants propose using a DFT to retrieve the fundamental frequency component and then applying a low pass filter to recover the peak value.
  • One participant shares a practical experience with using DFT for AC power measurement, suggesting it as an effective method.
  • A participant warns about the potential issue of sampling at a frequency that is a multiple of 300Hz, which could make distinguishing between 50Hz, 60Hz, and DC difficult.
  • Another participant suggests a binning approach, detailing a method to categorize samples into bins based on phase angles for both 50Hz and 60Hz, emphasizing the importance of sample timing and processing resources.
  • Some participants note that having side information about the frequency range can aid in selecting an appropriate sampling frequency that avoids harmonically related values.
  • One participant suggests using a low pass filter to remove harmonics before measuring the waveform with a voltmeter, highlighting the ease of separating the second harmonic.
  • There is a discussion about the significance of the choice of Δt and its impact on the identification of the fundamental frequency, with questions raised about who determines Δt and its possible range.

Areas of Agreement / Disagreement

Participants express differing views on the best method for determining the fundamental frequency component, with no consensus reached. Various techniques are proposed, each with its own considerations and potential drawbacks.

Contextual Notes

The discussion highlights limitations related to sampling frequency, the stability of Δt, and the presence of harmonics, which may affect the accuracy of the methods discussed. Specific assumptions about the waveform and sampling conditions are also noted but remain unresolved.

jegues
Messages
1,085
Reaction score
3
Suppose you periodically receive samples of a periodic waveform at fixed instances in time Δt. It is known ahead of time that the periodic waveform will have a fundamental frequency component of 50Hz or 60Hz, but perhaps with some higher order harmonics present.

What is the easiest way to go about determining the peak value of the fundamental frequency component of the waveform from the samples?

I suppose by buffering a number of samples and preforming a DFT one could retrieve the fundamental frequency component, and from there I could use a low pass filter with a large time constant to recover the peak value.

Is there an easier way?
 
Engineering news on Phys.org
jegues said:
I suppose by buffering a number of samples and preforming a DFT one could retrieve the fundamental frequency component, and from there I could use a low pass filter with a large time constant to recover the peak value.
To me, DFT sounds like the easiest way. I did a project on ac power measurement on arduino with the exact same method.
 
Hopefully you're Δt is not a multiple of 300Hz. If it is, then 50Hz, 60Hz, and DC will be indistinguishable.
The optimum solution depends hugely on what your processing environment is, how many samples you want to collect, how stable your Δt, 50Hz, and 60Hz are, your Δt, and whether your samples are digital or analog.

Let's say that your Δt is 7msec, your sampling is 10-bit adc, you want a decision in 500msec, your DC component is zero, and you want to be stingy with processor resources. What I would suggest is to set up 8 bins, 4 for 50Hz (bins F), 4 for 60Hz (bins S). Within each frequency, the bins will represent phase angles of 0, 45, 90, and 135 degrees. Take the first sample to be at a phase of 0 degrees for both 50Hz and 60Hz and so add that sample to bins F0 and S0. The next sample will be at 7msec.

The S Bin period is 16.66msec (1000/60) so 7msec represents 7/(1000/60) 60Hz cycles (0.42 cycles). The number of 45-degree bin increments would be eight times that (3.36 bin increments). To keep track of this bin position, we will initialize an S Bin Phase counter to 0, then on each sample increment it by 336 and compute the increment by doing an integer divide by 100. So for the first 5 samples we would have phase counter values of 0, 336, 672, 1008, and 1344 and bin numbers of 0, 3, 6, 10, and 13. Eight bin counts is 360 degrees, so every time the phase count exceeds 800, we can subtract 800 from it. This makes the phase counts 0, 336, 672, 208, and 544 and the bin increments 0, 3, 6, 2, and 5. The reason we only need four bins is because we will add the sample when it is bins 0 to 3, and subtract the sample when it is 4 to 7. So the first sample (bin increment 0) is added to S0, the second (3) is added to S3 (the 135-degree bin), the 3rd (6) is subtracted from S2, the 4th (2) is added to S2, and the 5th (5) is subtracted from S1.

The F Bin period is 20msec (1000/50) so 7msec represents 7/20 50Hz cycles (0.35 cycles). The number of 45-degree bin increments would be eight times this (2.80 bin increments).
So for 50Hz, we will add 280 to the phase count each time, force the phase count to the range 0 to 799, and compute the increment by doing an integer divide by 100. The first 5 phase counts would thus be 0, 280, 560, 40, and 320 and the increments would be 0, 2, 5, 0, and 3. So the sample would be: added to F0, added to F2, subtracted from F1, added to F0, and added to F3.

Once all of the sample have been collected, a simple and crude method for determining if there is a 50Hz and/or 60Hz component would simply be to take the absolute value of each of the 8 bins, then take the largest value of F0, F1, F2, F3 as proportional to the amplitude of the 50Hz component and the largest value of S0, S1, S2, S3 as proportional to the amplitude of the 60Hz component.
 
  • Like
Likes   Reactions: cnh1995
Getting unequivocal answers from sparse samples can be a problem. If you have any side information about the possible frequency range of the signal you're looking for - perhaps choosing between spot frequency possibilities then it can be a good idea to choose your sample frequency such that it is not harmonically related.
As .scott says, the detail of the situation are important if you want to make the right choice.
 
As the second harmonic will be 100 or 120Hz it is easily separated. So why not pass the unknown waveform through a LPF to remove harmonics and use a voltmeter?
 
The best way to identify the fundamental frequency will depend on the choice of dt.
Who gets to select dt. What range of values might dt take?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
4K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
17
Views
6K
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
8K