04-29-2014 02:38 PM
How to implement an 8 point moving averge filter for a sample size of 1000?
04-29-2014 02:54 PM
There are many ways to do this. One of my favorite is to just use an FIR Filter. But the most straight forward way is to use the Mean Pt By Pt VI inside of a FOR loop.
04-30-2014 01:00 AM
Its not working as i have stored my input samples in an array.
04-30-2014 02:32 AM
check these links below
http://forums.ni.com/t5/LabVIEW/Moving-Average-Filter-w-continuous-data-acquisition/td-p/2571975
moving average filter
http://forums.ni.com/t5/LabVIEW/Moving-Average-Filter/td-p/2550513
12-27-2018 10:13 AM
Hi, sorry to reanimate this thread. Why would one use the FIR Pt By Pt instead of Mean Pt By Pt for a moving average filter?
12-27-2018 10:18 AM
@jfalesi wrote:
Hi, sorry to reanimate this thread. Why would one use the FIR Pt By Pt instead of Mean Pt By Pt for a moving average filter?
I wouldn't! You need an 8 pt moving average, use the mean pt By pt.
12-27-2018 11:30 AM - edited 12-27-2018 12:04 PM
@jithin12 wrote:
Its not working as i have stored my input samples in an array.
You don't tell what is "not working", but if you want to use "mean ptbypt", simply wrap a FOR loop around it and autoindex on the array, right?
Of course you can also process the array directly, such as convoluting with an array containing 8 elements with a value of 1/8, then trim back to size.
(we need to trim because we don't have the output size option for 1D arrays )
Note that the ptbypt version has a startup distortion for the first 7 points because fewer points are averaged at the beginning. Of course you might want to shift the subset start for the convolution version to eliminate the filter delay. (not shown)
12-28-2018 03:26 AM
Try the below method.
12-28-2018 10:52 AM
@kartiknattar wrote:
Try the below method.
That is NOT scalable! Most of the entire code would need to be rewritten if the history length should be changed to something else. What would you do to make a 1000 point average instead? Get a much bigger monitor? 😄
A properly written, scalable solution only need to change a single integer value to work with any history length. try it! 😉
(See also my NI Week presentation (Part II) where I compare four different running average implementations)
01-03-2019 02:55 AM
@jithin12 wrote:
How to implement an 8 point moving averge filter for a sample size of 1000?
Hii, I have send you an PDF. You will get the whole information, hope that helps. Be sure to share results.