LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Differentiatian a noisy analog signal

I am using Usb 6008 to acquire an analogue signal from a string potentiometer, i am differentiating this signal to find velocity and again to find acceleration. When doing this the noise is amplifying..

 

Is there any easy filter to implement that will rid or at least reduce?

 

I have attached an image of a simulated signal with noise.

 

Any help is appreciated.

0 Kudos
Message 1 of 11
(3,755 Views)

Differentiation is an inherently noisy process.  Search for Savitsky-Golay.  That filter may be of some value for differentiation.

 

Also, you image did not get posted.  Please stick to a single thread rather than starting new ones.

 

Lynn

0 Kudos
Message 2 of 11
(3,748 Views)

I have tried to apply the savitsky golay filter. I am not sure if i am doing it wrong though. It is smoothing my analogue input signal but i am unable to differentiate the smoothed signal. I have attached my vi in the hope that someone may see where i am going wrong.

0 Kudos
Message 3 of 11
(3,719 Views)

Without seeing your data it is hard to tell what may be happening.  I substituted a sine pattern for the DAQ Assistant output and except for an initial transient the differentiation appears to be working fine.

 

Lynn

 

Differentiation.png

0 Kudos
Message 4 of 11
(3,702 Views)

Okay. Does the savitsky golay filter perform a differentiation within itself?

0 Kudos
Message 5 of 11
(3,687 Views)

I had to look it up.  I have heard some people with better math skill than mine talk about it. From the LV help for the Savitsky-Golay FIlter Coefficients.vi:

 


Designs a Savitzky-Golay FIR smoothing filter. This VI returns the designed Savitzky-Golay filter coefficients and the differentiation filter coefficients.

....

The Savitzky-Golay filter smoothes a noisy signal by the piece-by-piece fitting of a polynomial function to the signal. This VI performs the fitting by least squares minimization. 


Look at Wikipedia also.

 

As I understand it, the S-G filter smoothes noisy data without changing the location of minima or maxima very much. Then the deriviatives are calculated from the polynomial coefficients used in the smoothing.  The help shows how to do it.

 

Lynn

0 Kudos
Message 6 of 11
(3,679 Views)

 

Smooth noise robust differentiators

 

is a good starting point 🙂

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 7 of 11
(3,675 Views)

I have tried to apply the savitsky golay filter and this has smoothed my values and got rid of the noise, the problem i am now facing is the vi does not seem to accept the output from the savitsky golay filter when i try to differentiate the smooth signal? has it lost the time element?

0 Kudos
Message 8 of 11
(3,658 Views)

Please post your  latest VI with some data saved as default.  Too many guesses otherwise.

 

Lynn

0 Kudos
Message 9 of 11
(3,656 Views)

this is my latest vi and has word doc attached with image of signal and noise.

Download All
0 Kudos
Message 10 of 11
(3,648 Views)