LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to sort out fundamental frequencies from harmonic?

Hello,

 

I have a problem, because I have signals with different frequencies and with their harmonic. But I need only fundamental frequencies. I have found a device: Harmonic distorsion analizer that is theoretically able to find all the fundamental frequencies. I am using PXI 6221 but now for simulating I am using waveforms. In this waveform I have 3 music voice together, but this VI is able to found only two of them. I have an E, C, A - like an "A minor " chord.

It founds After FFT analysis all the fundamental frequency is visible on the graph but I can not measure using this VI. These frequencies are 219, 260, 328 Hz, but the first one is missing. On the indicator called Measured frequency all the fundamental and the harmonic frequency can be seen. Displaid datas depend on the number set using max num tones.

 

I would be really happy if anybody could help me.

 

Unfortunately this forum not allowes to attach wav files, but I can send it to anybody by e-mail.

 

Thanks you

 

0 Kudos
Message 1 of 6
(3,656 Views)

L.I.G,

 

How do you know which frequencies are "fundamentals" and which are harmonics?  Do you know how many fundamentals there are?

 

One way to include typical data is to run your VI with your .wav file. After the VI stops while the "data" graph still shows the signal, go to Edit >> Make Current Values Default.  Then save the VI (with a different name if you do not want to change the original) and post that VI.  It may be quite a bit larger due to all the data stored in the file.

 

Lynn

0 Kudos
Message 2 of 6
(3,639 Views)

Hello.

 

Firstly, I would recommend you to do some changes in your VI, relted to organisation on your block diagram and Froont panel. For example, labels of your terminals are overlapping, you have indicators that represents sama data (for example  Data and File data).....

 

Secondly, Lynn has nice idea, it would be good to see on your indicators what is data that you are sending from file, but also to see on other indicators what are outputs of functions that you are using.

 

You said: " After FFT analysis all the fundamental frequency is visible on the graph but I can not measure using this VI", please explain me part "but I can not measure using this VI". If I understand correctly first part of your statement, you can see all frequencies on Waveform graph (please give better names to your indicators), but what is VI that you can not measure with???

 

Also, did you try to check examples from Example finder, which are using same functions like you do in your vi? Those examples can be really usefull in order to understand how certain functions are working.


Best regards, 
Sofija 

 

0 Kudos
Message 3 of 6
(3,617 Views)

Hello Sofija and Lynn,

 

Many thanks for your answer. At first all I have tried to find examples but it didn't help me. I addtached that datas you were interested in.

So I tired to use the harmonic distorsion analyzer to find the fundamental frequencies. 

I know that values, because that waveform was made in a church and I plaid it on the organ. So I pushed 3 different key - a c' e' voices, the instrument was tuned up appoximately 438 Hz, so the frequencies of these voices is possible to be calculated using some frequency proportions

octav = 2 : 1

quint = 3 : 2

quart = 4 : 3

big terc = 5 : 4

small terc = 6 : 5

 

so the a' equals 438 Hz -> the e' equals: 438*4:3=328,5 Hz -> the measured value is 328,7

c' will be: 328,7*4:5= 262,98 Hz -> the measured one is 260,9

and finally the "a" will be one octav lower than the reference 438 Hz one-> so 438:2=219 -> measured one: 219,4

 

So in this way I know the fundamental frequencies, and on the spectrum they are visible as well, but unfortunately this device was able to found only two of them and I don't know where I did the mistake.


Download All
0 Kudos
Message 4 of 6
(3,605 Views)

And of course here is the VI

 

Thank you

0 Kudos
Message 5 of 6
(3,604 Views)

L.I.G.,

 

What would help more than images of your data is to include the actual data.  Either Zip the wave file and attach it or run the VI so that it shows data as in the measured values.gif.  Then go to Edit >> Make Current Values Default. Save the VI.  Post that VI.  This will have the data saved in the File Data graph indicator so that we can run it.

 

Looking at the values.gif raises some questions.  You indicate that you want to find the values ~219, ~261, and ~329.  An automated process which looks at the largest amplitudes in the spectrum will find the second harmaonic of the 219 because it is larger than the fundamental.  If you look at the lowest frequencies first, the three low frequency peaks complicate things.  Are those low frequencies power line related or are they from something else?  To automatically analyze something like this you often need to add information.  For example specifying a minimum frequency of 170 to 200 Hz would eliminate the three low freqeuncy peaks. If you know that the first three harmonics will always be present at levels above the noise, that information could be used to locate the fundamentals. Is there any information like that which you can guarantee will always occur? 

 

Lynn

0 Kudos
Message 6 of 6
(3,578 Views)