LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Collect specific frequency data from power spectrum

Solved!
Go to solution

It looks like you would take f0 + df * i , where i is the index you have labeled as "Maximum Frequency"

0 Kudos
Message 11 of 19
(1,978 Views)

I  you mean the I of iteration of while loop?

0 Kudos
Message 12 of 19
(1,976 Views)

Ok I got it I am sorry for putting question again

 

0 Kudos
Message 13 of 19
(1,975 Views)

The frequency of the maximum point of the spectrum may not be the actual frequency of the strongest component in the signal. Look at the image below.

 

Spectrum peak.png

 

Note that the spectrum graph has two changes. The Y-axis is logarithmic and the X-axis is expanded around the maximum value in the magnitude array.  This was a voice signal, not your signal, which you did not post. Just 2 Hz from the highest point in that graph is a point about 1/50 of the magnitude of the peak. The energy in that signal is spread across several Hz near the high point.  The point I want to make is that unless the signal is very steady and periodic, the maximum point in the spectrum may only represent a small fraction of the total energy in that component of the signal and it may be at a different frequency (although usually close).

 

Try using Extract Tone Information.vi or Extract Multiple Tone Information.vi on your data. Those VIs locate the largest component in the signal and make a pretty good estimate of the total energy and the frequency of that component.

 

Can you post your file of the sound of the alarm or save some of the data as default on the Sound Signal graph?

 

Lynn

0 Kudos
Message 14 of 19
(1,968 Views)

Thank you for reply. But I am giving input signal through inbuilt sound recorder through my computer. I have used acquire sound standard VI in labview version of 2015. I am posting my VI as well as front pannel again. Which is readable in 2011 format and readable in 2015 format as well. New version is readable in 2011. The  term project is readable in 2015 version.

Download All
0 Kudos
Message 15 of 19
(1,965 Views)

Yes But I have to ring a alarm. How do i collect data for that? I mean frequency, amplitude, Phase. Will it be in array form or will it be in numeric form?

0 Kudos
Message 16 of 19
(1,962 Views)

This is some quick sound plots.

0 Kudos
Message 17 of 19
(1,952 Views)

I do not understand your questions.

 

It appears that you are using the word "alarm" for two different meanings. One refers to the smoke alarm siren. The other appears to refer to an output from your program which occurs after a particular sequence of sounds from the siren.

 

I suggest that you use the word "alarm" for the sound from the smoke alarm siren and the word "alert" for the output from the program.  So that would change your last post to 'But I have to ring a[n] alert.' Is this correctly interpreting your statement?

 

The format of the data cannot be determined until you figure out how to sense the siren alarm.  I have attached a modified version of your VI (LV2015). Run this until you have some of the siren sound displayed on the Sound Signal graph. Stop the VI. Make sure the siren sound is still displayed because of the delay between pushing Stop and the last acquisition. Then right-click on the Waveform indicator in the lower right corner of the front panel and select Make Current Value Default. Save and post that VI. (Save for Previous to allow others who do not have LV2015 to work with the data also). This will preserve the siren sound data so we can look at it.

 

Lynn

0 Kudos
Message 18 of 19
(1,952 Views)

I will post alarm signal also.

0 Kudos
Message 19 of 19
(1,950 Views)