From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering voltage spikes

Hi There

 

I am recording a signal through my USB9221 DAQ.  it is a relatively noisy enviroment but my main problem is that im sitting above massive contactors which switch every so often, and when they do the line picks up the spikes. i dont think it is possible to modify anything physically to shield itself from the noise so is there any way to do it in labview?

i have tried a few different VI low pass filters but as i am new to LV its really difficult to find the right filter.

 

the best filter i found was the express filter. it filters most of the smaller noise but does very little to the spikes

 

 

the signal obtained is a speed signal and the frequency is very low or sometimes DC.

 

 Hope you can help

 

Regards

0 Kudos
Message 1 of 11
(6,945 Views)

A low pass filter should work.  Set the cutoff frequency a little above the highest frequency in your speed signal.

 

If that does not work, something like the noise blanker used in radio receivers to eliminate impulse noise might help. A blanker detects the spike and replaces the data with the average of the values immediately preceeding it.

 

Are the spikes you get consistent in amplitude and duration or do they vary significantly depending on which contactor switches?  Does the magnitude of the spike always exceed the largest possible speed signal?  Can you post an image of the spikes on the speed signal?

 

Lynn 

0 Kudos
Message 2 of 11
(6,922 Views)

You could also try to sampling with a much higher samplerate than needed, and then down sample your signal with averaging. Se example. Then doing only doing averaging you will not get any phase displacement in the output signal



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 11
(6,911 Views)

Hi Lynn

 

im not sure which VI filter to use. i have tried The butterworth filter (on low pass setting) before id made the post but it seems to show a resonating signal completly different to the original signal. do you have a example of how to use the low pass filter?

 

 

regards

 

 

0 Kudos
Message 4 of 11
(6,887 Views)

Without some data any example would be guesswork.  Can you post what you have tried with some typical data saved as default?  Please indicate the sample rate and the maximum bandwidth of the desired signal.

 

Lynn 

0 Kudos
Message 5 of 11
(6,875 Views)

I have attached the data i recorded,

 

if you plot this on excel you can see the parts where there a spikes, idealy i would like it to be a smooth line as possible by means of filtering.

 

column 1 is the time in seconds, and column 2 is the speed.

 

sampling rate is 200 hz, the maximum bandwidth is no more than 1 hz

 

 

0 Kudos
Message 6 of 11
(6,861 Views)
I would try median filter and downsampling. If you need a data rate equal to 200Hz you must increase the sample rate times downsampling rate


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 11
(6,839 Views)

Are your "spikes" the bursts which show up at 7.7, 29.5, and 37.5 on the time axis?

 

If so, a simple Butterworth  filter with a 5-10 Hz cutoff seems to work fine.  See attached VI.

 

You will get a "bump" in the filtered waveform because the raw data shows the bursts consist primarily of voltages which increase from the mean value of your speed before and after the burst.  If the burst had voltages going both above and below by about equal amounts the "bumps" would not appear.

 

The bursts appear to last about half a second.  This seems long and the unipolar nature of the data seems unusual for simple pickup from contactor activation.  I wonder if something else is adding to your problems.  Some non-linearity in the signal path or quite a bit of energy storage?

 

Lynn 

Message 8 of 11
(6,831 Views)

sorry about late reply, i didnt get the chance to try it out until yesterday afternoon. the VI you (lynn) made was excelent - was exactly what i was looking or, however when i tryed to implement it in the application the chart shows a static line instad of the scrolling chart it normally shows, i know it may be a simple fix but i will admit im new to labview. do you know what is wrong?

 

Message Edited by Labviewuser3 on 05-25-2009 10:07 PM
0 Kudos
Message 9 of 11
(6,799 Views)
Please remember to always post some code or at least a picture. Else the answers is pretty much guesswork. My guess is that you have not set the init/cont Boolean input to true. If you are measuring a constant signal this variable should be set to true. Se the context help for more info


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 10 of 11
(6,773 Views)