• Support PF! Buy your school textbooks, materials and every day products Here!

Identifying Fundamental Frequencies

  • #1
1,266
11

Homework Statement



I have made a plot of a given .wav file in Matlab. The problem asks: find the fundamental frequencies of the 3 vibrating strings, and identify some of their harmonics.

Homework Equations


3. The Attempt at a Solution [/B]

So I made a Matlab plot of the power spectrum over the range 0 to 2000 Hz (the range we are required to plot):

Z0falcG.jpg


So how can I identify the fundamental frequencies using this plot (or by any other method)? And what would be their "harmonics"?

Any explanation would be greatly appreciated.
 

Answers and Replies

  • #2
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,668
6,445
How would you approach the problem if there was one vibrating string? What is charachteristic for the fundamental frequency of a string?
 
  • #3
1,266
11
How would you approach the problem if there was one vibrating string? What is charachteristic for the fundamental frequency of a string?
That is exactly my question. How would you approach this problem? I was told that the vibrating strings should have fundamental frequencies of around 440, 523 and 698 Hz. But how can we see that from the graph?

P. S. the .wav file I am plotting is a digitized recording of a three note chord being played on a piano.
 
  • #4
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,668
6,445
Did you actually look at the graph and try to identify the resonant frequencies?
 
  • #5
1,266
11
Thank you, yes the first resonance peak is at 440 Hz, the second one is at 523 Hz, and the third one is at 698 Hz.

There is also a fourth peak in the graph at ##881 \ Hz##. Is it valid to say that this is the second harmonic of the fundamental frequency ##439.8 \ Hz,## since ##881/2 \approx 440##?

I also identified a few other overtones of the 3 fundamental frequencies, but they are only approximately related to the fundamental frequency by a factor of N (= integer).
 
  • #6
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,668
6,445
Thank you, yes the first resonance peak is at 440 Hz, the second one is at 523 Hz, and the third one is at 698 Hz.

There is also a fourth peak in the graph at ##881 \ Hz##. Is it valid to say that this is the second harmonic of the fundamental frequency ##439.8 \ Hz,## since ##881/2 \approx 440##?
Yes, this is where you expect the first overtone to be. In general, the overtones for an oscillating string are expected to be located at integer multiples of the fundamental frequency.

I also identified a few other overtones of the 3 fundamental frequencies, but they are only approximately related to the fundamental frequency by a factor of N (= integer).
Just looking at the diagram, I would say that the correspondence to integer multiples of the fundamental frequencies is pretty good. There are many factors which could result in not getting the exact corresponding values, including rounding errors, non-ideal strings, etc.

I would say every single peak in the diagram can be directly related to one of the fundamental frequencies.
 
  • #7
1,266
11
Thank you so much for the explanation, it makes perfect sense now.
 
  • #8
Merlin3189
Homework Helper
Gold Member
1,509
622
Now that you've got your answers, I thought I might add some obiter dictum.
I don't know how you got the figures for the frequencies you have detected, but IMO you can't believe everything you see on a graph like this. Putting aside the resolution of the graphic and your ability to interpolate the axis scales, the mathematical calculations on which it is based are not exact. Depending on your sampling frequency and the number of terms in your transform, 440 Hz may not be one of the possible frequencies and the peak at 440 has to be shared between say 439.5 and 441.4.
Then the duration of your sample and the window function you use causes more smearing over other frequencies.

So I had thought to suggest, the one reliable feature of the data would be the ratio of the harmonics. As far as I understand it, harmonics are mathematically defined to be exactly 2x, 3x, 4x etc of the fundamental frequency.
But I thought I'd better check! This is sampled from a piano and sure enough harmonics of piano notes are not necessarily true harmonics! (Inharmonicity in musical instruments.)

So there's nothing you can bet your life on! I expect these days you can use many more sample points, calculate more accurately and get things more nearly ideal than I could with much slower computers, but there are inherent limitations which can't be removed entirely.
 

Related Threads on Identifying Fundamental Frequencies

Replies
16
Views
89K
Replies
5
Views
6K
Replies
12
Views
5K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
2K
Top