Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Pressure sensor- Digital_Filter

  1. Dec 14, 2016 #1
    I have input data from a pressure sensor:https://physicsforums-bernhardtmediall.netdna-ssl.com/data/attachments/93/93464-7e84f120a9323e7d16b7dfa59c069739.jpg [Broken]

    We run this in to an FFT and found that the max point is at
    3.3378Hz. So we did a Digital band pass Filter for 3.3Hz - 3.6Hz.
    and then we got this :
    and this did a fft on that and we got back the same value of 3.3378Hz and that is good.
    But the problem is that this wave form has negative numbers and the pressure sensor does not out put negative volts : like you can see in the 1st pic.

    We want to know the voltage at 3.3378Hz so we can get the pressure at that hz for troubleshooting a flow loop.

    can we did the real voltage back at the hz? are is that not something we can get back ? Why does the waveform in the second pic have negative numbers?
    Last edited by a moderator: May 8, 2017
  2. jcsd
  3. Dec 14, 2016 #2


    Staff: Mentor

    Because a signal with all positive numbers includes a DC (0 hertz) component . You filtered out 0 hertz.
  4. Dec 14, 2016 #3
    Sorry I don't understand can you please explain more ?
  5. Dec 14, 2016 #4


    Staff: Mentor

    Instead of a band pass, use a low pass filter that allows anything below 5 hertz, the all positive values should reappear.
  6. Dec 14, 2016 #5
    Ok I will try it but I do not understand why that would work. Can you explain? Also will it return the correct voltage for that frequency ?
  7. Dec 14, 2016 #6
    ok I did what you said and it seem to work.. I just wanted to know how did you know to just use a low pass filter and not a band pass ?

    Also is that value 4.838 the right voltage for that frequency?
  8. Dec 15, 2016 #7


    Staff: Mentor

    The answer to that is in post #2 which you said that you don't understand. You should not be playing with FFTs and filters until you study the basics of frequency analysis, and especially Fourier Series. Begin with the Fourier Series article on Wikipedia.

    Here is a signal like yours ##2+\cos{({3.3378*2\pi t})}##

    It can be written in the form ##2\cos{{0} t}+\cos{(3.3378*2\pi t)}##

    A FFT of that should produce two values, magnitude 2 at frequency 0 and magnitude 1 at 3.3378 hz.

    If you filter out the frequency 0 term you are left with just ##\cos{({3.3378*2\pi t})}## which has plus and minus values.
  9. Dec 15, 2016 #8
    I understand that, I think it was the way it was worded.
    anyhow, How did you know to us a low pass filter and not a ban pass filter ?
  10. Dec 15, 2016 #9


    Staff: Mentor

    You say that you understand but your questions are exasperating.

    What is the difference between a notch 0-5 hz, and a low pass allowing everything below 5 hz? Hint: there is no such thing as negative frequency.
  11. Dec 15, 2016 #10
    I did a band pass for r 3.3Hz - 3.6Hz not 0 - 5
    I get 0 -5 is the same as a low pass filter a 5hz
  12. Dec 15, 2016 #11


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    The band pass filter removed frequencies below 3.3Hz. But the constant bias (or maybe it is an extremely low frequency) is 0 Hz, so it was removed. By switching to a low pass filter, it passed the 0 Hz constant bias.

    If all you need is a low pass filter, do not use a band pass, which is more complicated.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted