LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having troubles with noise when messauring from pressaure transmitter 4-20mA to mydaq


@GerdW wrote:

any physically-realizable filter will change amplitude and phase of its input signal. And a running average is nothing else than a low pass filter...


It is possible to create a zero-phase filter, but you can't do it in "real time".  The "simple" reason for the phase delay (for a realizable filter) is the filter used the data it has "now" and "in the past".  To be phase-less, it would need to also use data "from the future", difficult to do with today's semiconductors.  But, if you already have all of the data, you can do two filter operations, one on the data, one on the data "played backwards" in time, and averaging the results appropriately.

 

Bob "Theme from Twilight Zone" Schor

0 Kudos
Message 11 of 13
(240 Views)

yes i understand this, but is there a way to accelerate the filtered or to delay the unfiltered?

0 Kudos
Message 12 of 13
(239 Views)

@mydaqKing wrote:

yes i understand this, but is there a way to accelerate the filtered or to delay the unfiltered?


Yes, you can do both.  To "accelerate the filtered" (I'm not 100% certain I understand what you mean), you can "shorten the time constant" (have you ever heard the phrase "time constant" associated with the word "filter"?), which will shorten the number of data points going into the filter.  And, if you know anything about Low Pass Filters, a shorter Time Constant means that more high frequency stuff (often called "noise") stays in the signal.

 

As for "delaying the unfiltered", for the purpose of plotting it, you can always simply delay the plot as much as you want (I'd use a circular buffer for this).  But think this through -- suppose you want to plot an 11-point Moving Average (why 11?  So that it covers 5 points before and 5 point after the center point) of data.  So for the first 10 points, you have not enough points to plot the average.  Now you get Point 11, calculate the Average, and where do you put it?  Over point 6 (I'm counting as though the first point is Point 1, not Point 0 -- I learned to count from 1 in First Grade ...).  So you "delay" the Average (make it appear later) and it will "line up" with the underlying points being averaged (a so-called "phase-less" filter).  Of course, it is still requiring "seeing into the future", as the average (over Point 6) requires data from future points (7 .. 11) ...

 

Ah, the joys of Signal Analysis ...

 

Bob Schor

0 Kudos
Message 13 of 13
(222 Views)