SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

How to average a signal

I am attemting to rid the 60 Hz noise in my signal.  I want to average my samples so that the 60 Hz signal is removed.  Where can I perform this in Signal Express?
0 Kudos
Message 1 of 6
(12,133 Views)

Hi mrelet,

 

Welcome to the NI forums!  If you have the full version of SignalExpress, you could implement either time-averaging or use a filter to remove the 60 Hz interference.  You can find these functions under Processing >> Analog Signals:

 

 

 

 

 

If you are using the Limited Edition of SignalExpress, these functions will be unavailable to you.  Here is a list of which features are present on each version of SignalExpress.

 

Depending on your hardware and connections, you may be able to reduce the 60 Hz noise by using a differential measurement with twisted-pair wiring.  You can find more good information about connecting your signal in the article: Field Wiring and Noise Considerations.  Thanks for posting!

 

-John 

Message Edited by John P on 11-17-2008 11:01 AM
John Passiak
0 Kudos
Message 2 of 6
(12,114 Views)

I am a infrequent Labview user for the last 20 years. I find that the simple things illude me. In my case, I want to time average signals and the averaging VI seems like the ticket. It has a running average option, which I would have thought is simply a first in- first out register specified by the number of points in the dialog box. In that case, I would expect the average signal would be "phase" shifted by the data rate times the number of points.  That does not appear to be what happens. The operation of the filter seems to depend on the setting for data rate and samples in the DAQ assistant, and when I write a file including the average data, there is no time stamp on the average data different than the raw data? So I tried block averaging, guessing, because I could not find detailed help, that this was an averge of sequential blocks of data of the size specified in the dialog box - i.e. each sequential group of n points would be averaged and a single value would be output. If this was the case, I would see an average data output for every n voltage inputs. Certainly that is not how it is displayed, nor written to a file. I don't want to reverse engineer the VI to figure out what it does, but it is clear that it does not do what a non-labview engineer expects.

 

Anyone able to give be some fundamental insight here, or direct me to a tutorial that enlightens me as to how Labview understands data? 

 

Thanks,

Scott Miller

 

0 Kudos
Message 3 of 6
(11,952 Views)
Hi Scott,

Welcome to the NI Forums!  The Time Averaging function works differently than many would expect--I think what you really want to use is the Statistics function (found under Analysis >> Time Domain Measurements >> Statistics).  You should use this function to take the mean of your data, and this should work close to the way you expected the block averaging to work.

Where the Time Averaging documentation needs to be a bit more clear is the following quote:
"Performs time averaging on a time signal or scalar input."

If we were using scalar inputs, the time averaging would work exactly how you expected it to: average the individual inputs.  However, since our input is a waveform (i.e. an entire signal), the function behaves differently.  For example, if you choose the number of averages to be 10, it will actually average the first ten waveforms together, sample by sample.  The first sample of each waveform will be averaged with the first sample of the other waveforms.  This function is useful if you are using a triggered acquisition and want to average out the values over multiple acquisitions (not what we are doing in this case)

If you have noise problems, one possibility would be to use the Filter function on your data, then take the Mean of the filtered result.  This would allow you the flexibility of a digital filter, and then decimate the result to take up less space in your file.  You should make sure to sample at least twice as fast at the frequency that you want to filter out, higher frequencies may be aliased back down to the passband of the filter if you do not sample at a high enough rate.

-John
John Passiak
0 Kudos
Message 4 of 6
(11,937 Views)

Hi John,

 

I am doing similar kind of stuff. I am using signal express 3.0 . I am streaming sine wave data from 6 channels of daq card, then extracting required tone, then filtering and saving data to a text file. But my file size is turning in hundereds of mega bytes. 

 

So I decide to average the data. Which average should I consider here??? From the previous posts I understood that it is waveform averaging (correct me if I am wrong).  My DAQ has total throughput of 1MS/s. Since I have six channels I set my rate to 160K  and number of samples to read is 16K.

 

1)Which avereging should I use ? statistical or waveform average???

 

2) If I set Number of averages to 10, what do this mean??? Will it take first 10 sets of data chunk (containing 16K samples?? or 160K sampples ??) and do the average , write it to file ???? how it works????

 

other Issues

 

1) I am want to write data to spreadsheet, inwhich first coloumn should be time stamp and next six coloumns should be data from the channels. But in the time stamp coloumn I am not getting continuous time stamp. If i am recording for 10 seconds, time line is continuous till third second and resettting to zero, if I change sample rate or number of samples to change to different value, time stamp is setting to zero somewhere after first second. Even I tried with absolute and relative time , but facing the same problem.

 

2) If  I am increasing my data rate above 160Ks/s. daq is giving me error that it has not sufficient settling time, but data is recording. Is ther any way to measure the accuracy of the data recorded in such conditions ???

0 Kudos
Message 5 of 6
(10,019 Views)

Thanks for posting on this forum. To get your post more attention it would be a good idea to start a new thread. You replied to posts that are three years old. Newer threads with fewer posts get more views and responses from other users.

 

Cameron T

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(9,999 Views)