LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring frequencies present in an analog signal

Solved!
Go to solution

Hello,

I want to measure the frequencies present in an incoming analog pulse signal.

I tried it as shown in the vi using ‘Extract single tone information.vi’ which was showing the value as ‘39m’ I dont understand what is this value. Can someone explain the right way of measuring the frequencies present in the signal so that I can feed them to my bandpass filter limits.

Thanks.

0 Kudos
Message 1 of 9
(3,488 Views)
Solution
Accepted by topic author GoviRe

You are not supplying any of the timing information needed to do an FFT and get your frequencies.  You need to use Build Waveform and supply a dt, which is your sample rate (seconds/sample).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(3,483 Views)

Beyond what crossrulz has mentioned the explanation for the '39m' value you saw is that the FFT will be interpretted as having a sample rate of 1 sample per second in the absence of any other information.

 

The for loop can be replaced by the simpller loop above it in the image below. This has the advantage that it does not need to allocate memory for the 0,1 array.

 

Lynn

 

Simpler filter.png

0 Kudos
Message 3 of 9
(3,443 Views)

Hi,

Now I am able to see the detected frquencies.

and I think the detected pulse signal will have different harmonics of needed frequencies and the 60Hz frequency component. So, before filtering I want to see the different harmonics of frequency components present in the detected signal for which I tried the power spectrum as shown in the attachment.

Can someone explain me a better method to see the harmonics components present in the detected signal.

Thanks.

0 Kudos
Message 4 of 9
(3,404 Views)

The signal you connect to the power spectrum VI still has no timing information. You have an array of DBL wired to the input.  Use the waveform you connected to Extract Single Tone Information.vi for the power spectrum input also.

 

Two other things:

1. You have a large DC component in the signal - DC = 0.071, AC = 0.004. Remove that before doing the other processing.

2. Use a logarithmic Y-axis scale for the spectrum.

 

Please post your complete VI with some typical data saved as default.

 

Lynn

0 Kudos
Message 5 of 9
(3,397 Views)

Hi,

Now I am able to see the DC component and frequency of the measured signal.

But I am unable to get the 1)DC fitlered signal 2) Power Spectrum waveform.

I want to see what all the main frequency components present and the harmonic components present in it.So, that I can set a frequency limit of only desired main components.

Attachments:Measured data and vi.

Can someone suggest me of how to do this.

Thanks.

 

Download All
0 Kudos
Message 6 of 9
(3,312 Views)

1.  The DC filtered signal Is an ARRAY of Waveforms. Apparently subtracting an array of DBL from a waveform results in an array of waveforms where each element is the original waveform data minus the value in the corresponding element of the array of DBL. That is an array of ~15000 waveforms, each with ~15000 datapoints = 225 M DBL = 1.8 GB.  What you want is to get a single DC value, not an array, and subtract that single value.

 

2. The Spectral Measurements output is in decibels. The graph Y axis needs to be set to Linear, not Logarithmic. The logarithm of -5 dB is undefined. The Log10 function returns NaN. So most points do not plot. 

 

Here is a simplifed version with the data from the file saved as default in "all rows."  The spectrum shows a significant 50 Hz component and a smaller 150 Hz component (power line frequency?).

 

Lynn

Message 7 of 9
(3,278 Views)

Hello,

The acquired analog signal is pretty much filtered as shown in the attached image.

Now I am collecting data for 5 seconds (collecting 2500 samples using collector.vi ) and finding the single tone frequency from it and plotting the measured frequency after 5secs in a waveform chart.

But I am confused with these1)The original detected signal has an amplitude of above 1.6V but the measured amplitude only shows 0.6V and 2) how the waveform chart has a plot plotted over the duration of 5seconds  when the frequency is measured for every 5seconds data I mean shouldn’t  the chart has a plotted value of HeartRate plotted  for every 5 seconds.

Can someone explain a bit about these.

Thanks.

Download All
0 Kudos
Message 8 of 9
(3,171 Views)
Solution
Accepted by topic author GoviRe

Hi GoviRe,

   Amplitude is generally half of the peak to peak signal strength. Think of a sine wave which has amplitude 1, but swings from 1 to -1. The waveform chart should update every 5 seconds with one new frequency point added. If you want the time axis (x-axis) to display seconds, then right click the chart --> properties --> scales --> multiplier, set it to 5 seconds, or 0.0833 for minutes.

 

Have fun coding!

0 Kudos
Message 9 of 9
(3,164 Views)