Pressure sensor- Digital_Filter

Click For Summary

Discussion Overview

The discussion revolves around the processing of data from a pressure sensor, specifically focusing on the application of digital filters to analyze the frequency components of the signal. Participants explore the implications of using different types of filters, such as band pass and low pass, and their effects on the output waveform, particularly regarding the presence of negative voltage values.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant notes that the FFT of the pressure sensor data shows a maximum point at 3.3378Hz and that a band pass filter was applied between 3.3Hz and 3.6Hz, but the resulting waveform contains negative values.
  • Another participant suggests that the presence of negative values indicates the filtering out of a DC component (0 Hz) and proposes using a low pass filter instead.
  • Some participants express confusion about the rationale behind using a low pass filter over a band pass filter and seek clarification on how this would affect the voltage readings at the specified frequency.
  • A later reply explains that filtering out the 0 Hz component results in a waveform that can include negative values, and that a low pass filter would allow the DC component to reappear.
  • Participants discuss the mathematical representation of the signal and the expected outcomes of applying different filters, with one providing a specific example of a signal that includes both a constant and a cosine term.
  • There is a reiteration of the importance of understanding frequency analysis and Fourier Series before engaging with FFTs and filters.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the application of filters, with some agreeing on the effectiveness of the low pass filter while others remain uncertain about the underlying principles. The discussion does not reach a consensus on the best approach to filtering the signal.

Contextual Notes

Some participants indicate a lack of clarity regarding the differences between band pass and low pass filters, particularly in relation to the presence of DC components and the implications for the output waveform. There is also mention of the need for foundational knowledge in frequency analysis to fully grasp the concepts being discussed.

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
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
1K