LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does point-by-point filtering work?

How many samples does the pt-by-pt filter need to function? How does it work? Or how can I measure the lag caused by a pt-by-pt filter? I don't understand how it can filter in real-time.

 

 

Thanks

Graham  

0 Kudos
Message 1 of 3
(5,541 Views)

Hey Graham

 

Im going to use the butterworth ptbypt vi as a reference for this. Are you aware that you can open these vi's up to see how they work? The butterworth from what I can work out has a few shift registers that values need to filter through before a value is passed out.

 

In this example then there will be a lag created by this that is measurable by benchmarking the sub vi using tick count. Have you come across doing this before?

 

In regards to the number of samples needed, In this example there are 5 shift registers involved in the averaging code so I assume 5 samples are needed.

 

Hope this helps

Matthew Trott
Applications Engineer
National Instruments UK
www.ni.com/ask
0 Kudos
Message 2 of 3
(5,503 Views)

Graham,

 

Any filter has a delay associated with it.  The delay is a function of the bandwidth, filter type, and filter order. One way to measure the delay of a software filter is to feed it an array with zero elements followed by a continuous sinusoidal signal with a frequency in the pass band of the filter.  Look at the output and observe the point where it becomes nonzero. The difference between the number of zero elements at the beginning of the data set and the number in the output is the delay.  The transient response is show by the output signal varying in some manner before settling to a steady state signal.  The steady state output signal compared to the input signal will show any phase shift or passband attenuation.

 

The way the pt-by-pt VIs work in "real time" is that after the delay and transient portions have passed, each time a new input sample is received the VI generates a new output sample.  The output sample is still delayed, the same as in a hardware filter.

 

Lynn

Message 3 of 3
(5,483 Views)