LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subtracting baseline frequency noise

I'm acquiring two signals essentially.  One is a baseline zero set with inherent noise, and the other is my actual signal of an experiment.  I'm looking to take the fft of both and subtract the frequency spectrum data of the baseline set from the frequency spectrum data of the actual set, but the problem I'm running into is that, due to differing data set sizes, my arrays of frequency magnitudes are vastly different.  Is there a function to extrapolate values for my smaller baseline frequency spectrum such that the size of the baseline vector matches that of my experimental data?


Thanks!
0 Kudos
Message 1 of 12
(7,196 Views)
bump 🙂
0 Kudos
Message 2 of 12
(7,171 Views)
Is there some reason you cannot take a baseline dataset which is the same size as the actual data? This would eliminate the problem directly.

Zero padding can be used to extend the length of the baseline set. However putting many zeros in the dataset will change the magnitude of the resulting spectrum. Perhaps you could take a full baseline set as mentioned above and compare the result to a zero padded shorter set in an attempt to adjust the magnitudes.

Lynn
0 Kudos
Message 3 of 12
(7,169 Views)

I have the same basic problem as Jeanius.

 

I built a reflectance spectrometer and have some opensource software that generates a spectrograph from the input signal, in this case simply a photo of the spectrum. The opensource software outputs an array of wavelength vs peak height values. However, the x-axis (wavelength) cannot be fixed, but instead depends on a manual selection of the spectrum range. The result is that the reference spectrograph has x-values that are different from the sample spectrograph.

 

Please see  http://holeman.org/spectra/rose%20spectroscopy.html for a more complete description of the application.

 

I need to be able to subtract the sample spectrograph from the illumination source spectrograph in order to generate a sample reflectance spectrograph. I can pad the arrays to match up the number of data points between the sample and reference arrays but this does not solve my problem because the x-values are are still different and so the y-values cannot be subtracted directly.

 

Is it possible with Labview to subtract one graph from the other? It guess that is to say, is there any interpolation function that will generate reasonably valid matching x-values from the raw data?

 

 

0 Kudos
Message 4 of 12
(6,970 Views)
Hi fnktut.  Yes there are interpolation VI's.  They are all in the Mathmatics pallet.  However I dont think you need to go that route as the resluting function will probably have more error than just taking linear differential of your own data points.  By that I mean, since the resolution of the x-axis is already fine of enough granulation then you wouldn't be losing any information if you were to simply calulate the linear line function the between every two Y value points in one X-domain and then recalculate the corresponding Y value using the other X-domain. This is of course assuming that your Y values are part of a continuous function.  Then you can simple add and subtract them together.
Chris Bakker
SET Americas
CEO

0 Kudos
Message 5 of 12
(6,943 Views)

Thanks Chris, that was my first thought as well. I can script that myself in vb or php but I was hoping to find something ready-made and thought Labview might have some curve arithmetic built in.

0 Kudos
Message 6 of 12
(6,935 Views)

I have a very similar problem.  I first measured the background noise from my accelerometers and did FFT on that data.  I then measure the accelerations during a "real" test and subtract the background data from the "real" data, my problem is the frequency peaks are not perfectly lined up so the noise is not subtacted properly.  I am using the align and resample express VI to get the same t0 and dt on the baseline and "real" data.  Any ideas on how to ensure the peaks align properly?

 

Thanks,

 

Jacob

0 Kudos
Message 7 of 12
(6,685 Views)

How close is your noise frequency spectrum to your signal spectrum?

 

Could you use your FT peak(s) as input(s) to a time domain band pass filter on your target signal?

Message Edited by Timmar on 05-27-2010 02:58 PM
iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
0 Kudos
Message 8 of 12
(6,658 Views)

Jacob,

 

If you run the background acquisition several times, how reproducible is the result?  If it is not very reproducible, baseline subtraction will not work.

 

What is different about your mechanical system when you run the baseline compared to running the real test?  Is the device which excites the system present in both cases? Are there things which could change the mechanical resonances during the real test?  Anything like this could change the transfer function of the system enough to invalidate the background.

 

Tell us more about what you are doing, please.

 

Lynn 

0 Kudos
Message 9 of 12
(6,639 Views)

The system is definitely different when testing compared to when checking background noise.  This is a friction tester and when I collect data with out the friction samples in contact I get vibration signals.  These signals show up again during the actual testing and I would like to subtract this "system noise" from the test data.  I understand there will be a frequency shift since the damping, stiffness, geometry is different between the two. 

 

Thanks,  

 

Jacob

0 Kudos
Message 10 of 12
(6,628 Views)