Pressure sensor- Digital_Filter

Click For Summary
SUMMARY

The discussion centers on the application of digital filtering techniques to process data from a pressure sensor. The user initially applied a band-pass filter between 3.3Hz and 3.6Hz, resulting in a waveform that included negative values, which are not physically meaningful for the sensor's output. The solution proposed was to switch to a low-pass filter allowing frequencies below 5Hz, which successfully restored the positive values and provided the correct voltage reading at 3.3378Hz. The conversation emphasizes the importance of understanding Fourier Series and frequency analysis before manipulating FFTs and filters.

PREREQUISITES
  • Understanding of Fourier Series and frequency analysis
  • Experience with FFT (Fast Fourier Transform) techniques
  • Knowledge of digital filtering methods, specifically low-pass and band-pass filters
  • Familiarity with signal processing concepts and voltage measurements
NEXT STEPS
  • Study the Fourier Series to grasp the fundamentals of frequency representation
  • Learn about the implementation of low-pass filters in digital signal processing
  • Explore the differences between band-pass and low-pass filters in practical applications
  • Investigate the effects of filtering on sensor data and how to interpret the results
USEFUL FOR

Engineers, data scientists, and anyone involved in signal processing or sensor data analysis will benefit from this discussion, particularly those working with pressure sensors and digital filtering techniques.

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   Reactions: 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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
3
Views
3K
Replies
2
Views
698
  • · Replies 4 ·
Replies
4
Views
2K