Resolution enhancement / moving average filter

Post your LabVIEW discussions here
Post Reply
Posts: 315
Joined: Tue Oct 21, 2014 3:07 pm

Resolution enhancement / moving average filter

Post by AndrewA »

This is how 'Resolution enhancement' works-

If you collect the following data samples from the scope-


For ½ bit you replace each sample with the average of two values
(s1+s2)/2, (s2+s3)/2, (s3+s4)/2, (s4+s5)/2, (s5+s6)/2, (s6+s7)/2, (s7+s8)/2,……, (sn+s(n+1))/2,

For 1 bit 4 values

For 1½ bit use 8 samples
For 2 bits use 16 samples
For 2½ bits use 32 samples

So you can apply a simple moving average filter in your own code to enhance the vertical resolution, as we do in PicoScope 6.
I attached a basic LabVIEW code snippet for block example the averages N number samples.
You may notice the last N number samples that are invalid, you need to remove these from the array or sample addition N samples to get the required samples.
This would require some changes to the code.
If you wish to use a current streaming example with you need to create a circular buffer that returns a fixed number of samples.
moving average filter code.png
moving average filter FP.png
Regards Andrew
Technical Specialist

Post Reply