Showing results for 
Search instead for 
Did you mean: 

DC Filter working only for LabView signals

Go to solution



I am developing a vibration analyzer, in the integration block, I used a DC filter for the DC components that the integration injects to the signal.


This is the  DC Filter



DC FilterDC Filter


What is the problem? Well for signals from LabView block it works very well, but for signals from a signal generator it doesn't work


I have this measure a Sin 2Vpp 10 Hz 0.1df you can compare the spectrum with the same signal from a LabView block and you will see that the spectrum isn't the same.




Anyone know why this is happening? I hope I have expressed myself well.

Download All
0 Kudos
Message 1 of 5

I basically built the same code you used, except I used the "Mean" function to estimate the DC component and used the In Place Element function to do the Waveform subtraction of the Mean.  I fed this with the output of the Sinusoid Waveform Generator with an offset of 3, and it worked just fine.  Don't understand why your code doesn't also work -- the code "looks" the same, but (of course) I can't "test" the "picture" you attached.


Here is my Snippet which plots both the Sinusoid-with-offset and the Sinusoid with DC component removed.

Remove DC from Waveform.png

Bob Schor 


0 Kudos
Message 2 of 5

Thanks for answering


I wasn't clear enough,


The problem is when i'm using a physical signal from a signal generator.



Heres is a .vi i made comparing both signal the physical and virtual, up the physical and down the virtual.






Both signal are equal, but the spectrum are not. As you can see in the physical signal (up) the DC component is not being removed.


That is my problem.

Download All
0 Kudos
Message 3 of 5
Accepted by topic author FCance

Your file data has a small DC offset which your integrator turns into a linear trend.  It's this linear trend that puts low-freq data into your spectrum.


You'll get better results if you *also* subtract out the DC offset of the original file data *before* integrating.


But don't expect perfection.  Simple methods like these will likely leave you with some artifacts and inaccuracies.



-Kevin P

0 Kudos
Message 4 of 5

Thanks Kevin


A DC Filter before integrating solved my problem. I will keep this in mind for future measures.

0 Kudos
Message 5 of 5