LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using high pass filter

 

I have a general question on using HPF in labview.

If I apply a hpf on 10 sets of data, 20 points each, is the results the same as applying the filter on all 200 points(the same values of course) at once?

 

I tried it and the results seem to be differenet....

0 Kudos
Message 1 of 9
(3,115 Views)

No.  In general it will not be the same. All filters have an initial transient response (although in many applications it is not noticeable). With ten sets of data you will see the transient response on each set. And with only 20 points of data, the transient may not even be complete at the end of the data set. It depends on the type of filter, the order, the sampling rate and other things. With the combined 200 point data set you would have only one transient.

 

What is it that you are trying to do? Can you post your VI along with some typical data?

 

Lynn

0 Kudos
Message 2 of 9
(3,095 Views)
Thanks! I will post a sample tomorrow but in the meantime this is what I am trying to do: It is a Butterworth filter, high pass, third order, sampling rate at 20 Hz. I have a version of the program which uses all 200 points and applies the hpf.

Now I would like to have another program that does the same thing, but this time works on smaller data sets. ..so as I mentioned 10 sets of 20 points each. These data point would be provided continously. Ideally I would like to achieve the same results, but it seems that it may not be possible. Another solution would be to save the data until I have enough points ( to get a valid result) )and then apply the hpf.

But how many points would I need to achieve similar results?

Hope this explains what I am trying to do.
0 Kudos
Message 3 of 9
(3,081 Views)

Look for Butterworh filter point by point.  That maintains the state between calls.

 

Also look at the detailed help for the regular Butterworth filter.  You'll see there is an input that if you wire a True to it, it will maintain the state between calls.

0 Kudos
Message 4 of 9
(3,076 Views)

Your question about how many points cannot be answered without the specifications of the filter and a look at the data.

 

Lynn

0 Kudos
Message 5 of 9
(3,048 Views)

Thanks! Part of my problem is solved.

How could I acheive the following code using labview? This is what I am ultimately trying to do. I have it in a mathscript node for now:

 

 

Wn=high_cutoff*2/20;

[fb fa]=butter(3,Wn,'high');

HPF = filtfilt(fb,fa,data);

 


Where high_cutoff  value is provided

 

I dont think there is an exact equivalent for filtfilt() in labview, is there?

 

 

0 Kudos
Message 6 of 9
(3,043 Views)

I do not know what filtfilt() does.

 

You can create almost any kind of filter you want in LV, but there may not be a ready-to-use VI.  What are the actual filter specifications?

 

Lynn

0 Kudos
Message 7 of 9
(3,035 Views)

Here is a link to the description:

http://www.mathworks.com/help/signal/ref/filtfilt.html

0 Kudos
Message 8 of 9
(3,033 Views)

Have a look at this post:

http://forums.ni.com/t5/Signal-Conditioning/IIR-Filter-Someone-please-help-me/m-p/2427108/highlight/...

 

to provide more help, please post some sample data, the result you expect, and your vi ..

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 9 of 9
(3,001 Views)