Pressure sensor- Digital_Filter

In summary, the conversation discusses the use of an FFT and filters to analyze data from a pressure sensor. The max point is found at 3.3378Hz and a band pass filter is used to filter out frequencies below 3.3Hz. The resulting waveform has negative numbers, which is not expected from the pressure sensor. The individual suggests using a low pass filter instead, which allows frequencies below 5Hz and should produce a waveform with all positive values. The conversation also touches on the basics of frequency analysis and the difference between a notch filter and a low pass filter. Ultimately, the low pass filter is successful in obtaining the correct voltage for the desired frequency.
  • #1
btb4198
572
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
  • #2
Because a signal with all positive numbers includes a DC (0 hertz) component . You filtered out 0 hertz.
 
  • #3
Sorry I don't understand can you please explain more ?
 
  • #4
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
  • #5
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 ?
 
  • #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 ?
picdone.png


Also is that value 4.838 the right voltage for that frequency?
 
  • #7
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.
 
  • #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 ?
 
  • #9
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.
 

1. What is a pressure sensor?

A pressure sensor is a device that measures the force of a fluid or gas on a surface, converting it into an electrical signal. It is used to monitor and control pressure in various applications, such as industrial processes, automotive systems, and medical devices.

2. How does a pressure sensor work?

A pressure sensor contains a sensing element, typically a thin diaphragm, which flexes in response to changes in pressure. This movement is converted into an electrical signal by a transducer, such as a piezoelectric or capacitive element.

3. What is the difference between an analog and digital pressure sensor?

An analog pressure sensor provides a continuous output signal, while a digital pressure sensor provides a discrete output signal in the form of binary code. This allows for more precise and accurate pressure readings, as well as easier integration with digital systems.

4. What is a digital filter in a pressure sensor?

A digital filter is a mathematical algorithm used to process the output signal of a pressure sensor. It removes unwanted noise and fluctuations, providing a smoother and more accurate pressure reading. It can also be used to adjust the response time and frequency of the sensor.

5. What are the factors to consider when selecting a pressure sensor with a digital filter?

The key factors to consider are the accuracy and resolution of the pressure sensor, the sampling rate and response time of the digital filter, and the desired frequency range for the application. It is also important to consider the power consumption, temperature range, and durability of the sensor.

Similar threads

  • Electrical Engineering
Replies
1
Views
858
Replies
7
Views
845
  • Materials and Chemical Engineering
Replies
12
Views
539
  • Electrical Engineering
Replies
1
Views
974
Replies
3
Views
2K
  • Electrical Engineering
Replies
1
Views
2K
  • Electrical Engineering
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
  • Electromagnetism
Replies
10
Views
2K
Back
Top