Determining the Fundamental Frequency Component

In summary, the easiest way to determine the peak value of the fundamental frequency component of the waveform from the samples is to buffer a number of samples and preform a DFT.
  • #1
jegues
1,097
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
  • #2
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.
 
  • #3
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 cnh1995
  • #4
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.
 
  • #5
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?
 
  • #6
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?
 

What is the fundamental frequency component?

The fundamental frequency component refers to the lowest frequency present in a complex sound signal. It is also known as the first harmonic and determines the perceived pitch of the sound.

How is the fundamental frequency component determined?

The fundamental frequency component can be determined through various methods such as Fourier analysis, autocorrelation, and cepstrum analysis. These methods involve analyzing the frequency content of the sound signal and identifying the lowest frequency present.

What factors can affect the determination of the fundamental frequency component?

The accuracy of determining the fundamental frequency component can be affected by factors such as background noise, the presence of harmonics, and the quality of the recording equipment. Additionally, individual differences in human perception can also play a role.

Why is determining the fundamental frequency component important?

Determining the fundamental frequency component is important in many fields, including speech analysis, music composition, and acoustics. It helps in understanding the properties of sound signals and can also aid in identifying and diagnosing certain speech and voice disorders.

Can the fundamental frequency component change over time?

Yes, the fundamental frequency component can change over time. This is particularly true for speech signals, where the pitch of the voice can vary depending on the words being spoken and the emotional state of the speaker. In music, the fundamental frequency component can also change due to intentional pitch variations in singing or playing instruments.

Similar threads

  • Electrical Engineering
Replies
4
Views
842
Replies
7
Views
3K
Replies
22
Views
2K
Replies
9
Views
1K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
6
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
6K
Back
Top