LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Spectrum

Ok here's the deal.. I acquire data (of type numeric array) from an acuqisition unit (the specifics of it aren't important for the problem) at a known sampling rate and wish to perform a power spectrum on this data. I've used the build waveform function to build a waveform from the 1D array of data with the addition of the dt value (1/Fs) and a timestamp and fed this waveform into the power spectrum vi. The spectrum is then plotted on a waveform chart.

 

However each time a new data set arrives from the acuqisition unit, the chart is overwritten.I would like to keep the previous data but would prefer not to use shift registers due to the possible size of the array. I thought if the chart's type was a "strip chart" it would hold the data until the buffer is reached but this doesn't seem to be the case.

 

Another possible issue is with the timestamp but I think I've accounted for that.

 

Note: The attached vi won't run successfully due to not being connected the the acquisition unit. I was hoping the problem might be clear to someone with more experience using the power spectrum function. I have used it successfully with generic sine waves.

 

Strokes

0 Kudos
Message 1 of 4
(2,502 Views)

@Strokes wrote:
[..]I would like to keep the previous data[..]

 

Strokes



Strokes,

 

how should this look like. I mean, i have a hard time to imagine this.

The simple reason:

The power spectrum is the frequency domain, so the first "sample" should refer to 0 Hz.

 

So all your new sets create a new power spectrum which essentially is in the very same frequency range as the previous power spectrum.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 4
(2,494 Views)

@Norbert_B wrote:

@Strokes wrote:
[..]I would like to keep the previous data[..]

 

Strokes



Strokes,

 

how should this look like. I mean, i have a hard time to imagine this.

The simple reason:

The power spectrum is the frequency domain, so the first "sample" should refer to 0 Hz.

 

So all your new sets create a new power spectrum which essentially is in the very same frequency range as the previous power spectrum.....

 

Norbert


Well assume the data is aquired through a sensor, then the power spectrum could change no? depending on the frequency content of the signal? 

 

If the power spectrum is the very same frequency range as the previous power spectrum then I guess I don't really have an issue only that the graph keeps refreshing.

0 Kudos
Message 3 of 4
(2,488 Views)

Strokes,

 

you listen to mp3 music from time to time? Maybe, you have configured your application playing those mp3 to display something called "Bars and Waves" (at least, Microsoft calls it like this in Media Player). This display is comparable to an equalizer view.

 

Your display of the power spectrum analysis is really comparable to this 😉

Does it make sense that the graph does not replace (read: update) instead of "concatenating"? 

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 4
(2,466 Views)