Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Analysis Quesstion: Power Spectrum Calc not what I expected

I have an application that I am testing with a sine wave input. I acquire the sine wave data, plot the raw data, calc and display the power spectrum. When the sine wave is centered about 0 volts the power spectrum seems to work fine. The problem I have is when the sine wave is not centered about 0 volts, or has a small amplitude. In this case I do not see a "peak" on the power spectrum at the input sine wave frequency. I need to extract the frequency information from a signal with a non-zero average that has a frequency imposed on top of it. The real world case is a pressure probe that may have an average pressure of 800 psi but a 30 psi, 10 Hz pressure oscillation on top of it. I need to the graph to show that the pressure pulsations are happening at 30 Hz. Any suggestions.

Ch = CWArray1.IndexArray(DataEngUnitsByCh, Array(i, Null))

CWDSP1.AutoPowerSpectrum Ch, 1 / CBRate(brd), Spectrum, df
CWGraph(brd).Plots(i + 1).PlotY Ch, 0, 1 / CBRate(brd)
CWGraphFFT(brd).Plots(i + 1).PlotY Spectrum, 0, df

Thank You
0 Kudos
Message 1 of 4
(6,486 Views)
More information about my problem. After more testing it looks like I am not seeing the result of the small sine wave oscillations on top of the large fixed signal because the signal at zero Hz is so large. Makes sense...as the offset or fixed signal increases, the small oscillation is a smaller precentage and the "peak" at its frequency will decrease....making the graph appear that it is incorrect when it is not. With a signal of 5V added to a sine wave of +/-.1V it is very difficult to see the +/- .1V signal on the power spectrum graph. How can I change the results display to better graphically illustrate the +/-.1 V signal? I thought of calculating the average and subtracting the average from the signal before the power spectrum processing, but I don't know if I should have to do that. Or, I saw a Labview demo program that displayed the y-axis results as dB which should aid in showing a wider range of signal...I like this solution

Any help would be greatly appreciated.
0 Kudos
Message 2 of 4
(6,478 Views)
Hi,

If you have a very large fixed component, you are correct that it will drown out the smaller changes on the power spectrum.

There are a couple of ways you can do this. The first is to take a subset of the array that you are analyzing and cut out the ultra-low frequency values. For example, if you only took a look at values above 2Hz. The other solution is to remove the DC signal from the raw data. Subtracting the average value is the best way to do this, as all of your frequency components will still exist in their original proportion, but they will be able to be displayed on the graph.

Allen P.
NI
0 Kudos
Message 3 of 4
(6,459 Views)
Thank you for the response. Subtracting the average value seems to work. The graph is now what I expected originally.

Thanks Again
0 Kudos
Message 4 of 4
(6,445 Views)