LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging to minimize 60 Hz noise

hi...
 
i am acquiring an analog input with multifunction DAQ card. the acquisition is hardwared triggered acquisition. the signal levels i get is 0.02 V to 1V. there seems to be a lot of 60 Hz noise induced in to the data. so, i need to do averaging . can anyone suggest methods for efficient and fast averaging.
 
thank you
jithendra
0 Kudos
Message 1 of 12
(5,535 Views)
My suggestion is to get rid of the 60 Hz noise in the first place. You probably have a ground loop or something is not grounded properly.
0 Kudos
Message 2 of 12
(5,518 Views)
Creating a simple filter can help you remove the noise before it is digitized or you can even try a digital filter to remopve the 60Hz noize after digitizing.  Averaging probably wont help as much as filtering.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 12
(5,513 Views)

I checked my circuit connections and everything seems fine. I can't use a filter because i need the low frequency data. the bandwidth of my signal is from 30 Hz-3 kHz, and if i use a notch filter to get rid of the 60 Hz signal, it is attenuating other frequencies which i need.

when i connect the signal to an oscilloscope and select some averaging, it improves the signal a lot. But when i use the DAQcard-6062E and acquire the data and use the average Advanced DC-RMS  VI in Labview, the data is not so clear. can you suggest some other method of averaging?

i am attaching the VI i am using. can u please look at it and see if i am doing it correctly. any help would be appreciated.

thanks

jithendra

 

0 Kudos
Message 4 of 12
(5,507 Views)
jithendra,
You mentioned that the averaging routine of your scope seemed to work well. What averaging algorithm does it use?
 
 
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 5 of 12
(5,483 Views)

How does the 60HZ signal look like? Is it sinusoidal or does it contain higher harmonics?

You will only be able to "average out" your 60HZ component if the start of multiple scans are random with respect to the 60HZ phase. Still , it would need a lot of averages.

Maybe you can average two scans if you can trigger their start such that the 60Hz signal is 180 degrees out of phase between the two?

Maybe you can acquire your data synchronized to the 60Hz signal, then edit it out later in the fourier domain?

0 Kudos
Message 6 of 12
(5,472 Views)
thanks a lot for all your replies. i have tried an averaging routine and it seems to work. what i do is i check for a trigger, and if there is one i go into a while loop and acquire the data.
the number of times the while loop executes= no.of averages, and each time when i get a new array, i pass it through a shift register and add it to the previous value.
 
so if i give the number of averages as 10, then the while loop executes 10 times and the sum of the 10 1-D arrays (each time it executes, i get a 1-D array) is given out, which i divide by 10 to get the averaged data. there is an outer while loop enclosing the inner while loop, so when it come out of the inner loop it checks for the trigger again and continues accordingly.
 
i need to get the time stamps for the raw data as well as the averaged data, and when i uncheck the ignore time stamp on the waveform graph, the raw data is not stable and it is as if it's not triggering right. can some one suggest me how can i get the time stamp for both averaged and unaveraged data. i have not used the time stamp before and i am confused.
 
i have attached the VI which seems to work when i don't select the time stamp. any help would be appreciated.
 
thank you
jithendra 
0 Kudos
Message 7 of 12
(5,465 Views)
the scope seems to use the same averaging routine i mentioned in my previous post. and it seems to work for me also
but there is a problem with time stamp as i discussed in my previous post
 
thanks
jithendra
 
 
 
0 Kudos
Message 8 of 12
(5,463 Views)

Hello Jithendra,

You asked: "can some one suggest me how can i get the time stamp for both averaged and unaveraged data."

The "Get Waveform Components" that you used to retrieve your data, and average it, contains other components of the waveform such as the initial time, the time increment and other attributes.  You can use that to get the timestamp to any of the points you are averaging and the timestamp of your raw data.

As far as the instability you are observing in your data, are you sure you are not seeing a user interface effect, perhaps due to Autoscaling? If you think there is a problem with the graph object, please provide more details so I can reproduce it.

Best Regards,

AG. 

0 Kudos
Message 9 of 12
(5,429 Views)

AG,

thanks for your suggestion. sorry for asking a wrong question. i don't need the time stamp for each data point. and i don't need for the raw data. for the averaged data, i get a 1-D array of n samples each time, so what i need to do is write the current time (system time) to the file, and then write the 1-D array, so that i know when the 1-D array is written to the file each time. i tried using the Get Date/ Time string and it seems to work. thanks for responding.

jithendra

0 Kudos
Message 10 of 12
(5,409 Views)