Pressure sensor- Digital_Filter

AI Thread Summary
The discussion focuses on troubleshooting a pressure sensor's output, specifically addressing issues with negative voltage readings after applying a digital band-pass filter. The original FFT analysis indicated a peak at 3.3378Hz, but the subsequent filtering resulted in a waveform with negative values, which is not possible for the sensor. Participants suggested using a low-pass filter instead of a band-pass filter to retain the DC component, which resolved the issue and restored positive values. The conversation emphasizes the importance of understanding frequency analysis fundamentals, particularly the effects of different filtering techniques on signal integrity. Ultimately, switching to a low-pass filter effectively addressed the problem and clarified the relationship between frequency components and sensor output.
btb4198
Messages
570
Reaction score
10
I have input data from a pressure sensor:https://physicsforums-bernhardtmediall.netdna-ssl.com/data/attachments/93/93464-7e84f120a9323e7d16b7dfa59c069739.jpg
PS1.png


We run this into 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 :
PS2.png

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:
Engineering news on Phys.org
Because a signal with all positive numbers includes a DC (0 hertz) component . You filtered out 0 hertz.
 
Sorry I don't understand can you please explain more ?
 
Instead of a band pass, use a low pass filter that allows anything below 5 hertz, the all positive values should reappear.
 
  • Like
Likes berkeman
anorlunda said:
Instead of a band pass, use a low pass filter that allows anything below 5 hertz, the all positive values should reappear.
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 ?
 
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 ?
picdone.png


Also is that value 4.838 the right voltage for that frequency?
 
btb4198 said:
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 ?

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.
 
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 ?
 
btb4198 said:
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 ?

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.
 
  • #10
anorlunda said:
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.
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
 
  • #11
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.
 
Back
Top