LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast Fourier Transformation and Filtering with Low Pass Filter

Hello LabVIEW experts, 

 

I will ask a relatively easy question. I would like to filter a signal from a potentiometer sensor. The signal is a bit noisy. I developed an fft which shows the amplitude with frequency. The frequency (x-axis) is related with the sampling rate of the signal and it needs to be x2 the signal frequency. I don’t know what cut off frequency to use to filter the noise with a low pass filter. How is related with the fft?

 

Thank you community. 

Myra

 

 

0 Kudos
Message 1 of 6
(5,496 Views)

Myra,

 

The selection of the filter cut off frequency depends on what you are doing with the data. It is not really related to the FFT at all. The only relationship with the sampling rate is that filters cannot be set above the Nyquist rate.

 

Other questions that may be relevant:

1. Is the noise random or is it an interfering signal such as power line frequency?

2. What is the bandwidth or spectral characteristic of the noise and how does it compare with that of the desired signal?

3. Does the frequency of the desired signal vary? Over what range and how fast?

4. What is the actual sampling rate? 

5. How often do you need to update the signals?

6. What are you doing with the signal? Display to a user, feedback control of a nuclear power plant? 

 

Lynn

0 Kudos
Message 2 of 6
(5,482 Views)

Hey Lynn, 

 

The test is a sudden load crush test. The deflection readings are taken each 2.4 KHz sampling. I am trying to differentiate the signal so I need to clear the signal first. I developed an FFT with a magnitude of around 37 Hz and the frequency is stabilizing at 400 Hz. I guess is fine 400x2 = 800 Hz < 2.4 kHz.

 

But I would like to know about the low pass filter order and cut off frequency. 

 

Myra

0 Kudos
Message 3 of 6
(5,472 Views)

Myra,

 

The 2.4 kHz sampling should be fine.

 

If you want to differentiate a noisy signal, look at the Savitsky-Golay filter.  It will smooth the data and calculate derivatives. It may well be a better choice than a simple low pass filter.

 

Can you post an example of your data? 

 

Lynn

0 Kudos
Message 4 of 6
(5,456 Views)

Hi Lynn, 

 

Basically, I am using a low pass Butterworth filter but I need to specify a limit frequency and an order for the signal..Does the limit frequency comes from the FFT? Or is it just a trial and error procedure?

 

Myra

0 Kudos
Message 5 of 6
(5,374 Views)

Both the filters and the FFT depend on the sampling theorem - meaning that they cannot process any frequency higher than half the samping frequency.

 

From your description it the highest frequency of interest in your signal is about 400 Hz.  With a sampling frequency of 2.4 kHz your signal bandwidth is 1.2 kHz. So any noise energy in the 400+ to 1200 Hz range is your target for filtering.  Noise below 400 Hz cannot be removed by filtering without also removing some or all of the signal.

 

All real filters have a transition region between the passband where they pass almost all of the signal unmodified and the stop band where they suppress almost all of the signal (or noise).  The design of a filter is the process of selecting tradeoffs regarding that transition region.  If you use a very steep transition region, then you get a more complicated filter, probably large phase shifts near the cutoff frequency, and possibly a longer initial transient.  If you use a gradual rolloff, more of the noise in the higher frequencies gets through.

 

In your case you probably do not have any basis for defining the filter characteristics so some trial and error will likely be required.  Set up two signal paths for comparison. First do the differentiation and any other processing on the unfitlered signal. In the second path duplicate the first path but insert a filter before the differentiation. Plot the outputs of both paths on the same graph so you can see the differences. Then change the filter parameters to see if you can get the results you want.

 

I would start with the cutoff frequency at 500-600 Hz to make sure you do not attenuate the 400 Hz component of your signal very much. Start with a 2nd order filter. Then vary the cutoff frequency and order.

 

My guess - without seeing your data - is that any filter which does not affect your data too much will reduce the noise by about one third or less.

 

Lynn

0 Kudos
Message 6 of 6
(5,363 Views)