LabVIEW Simulation

Boxcar Averaging


Download

Boxcar Averaging.vi (2010) LabVIEW Virtual Instrument (requires LabVIEW version 2010 or higher)
Boxcar Averaging.vi (8.5) LabVIEW Virtual Instrument (requires LabVIEW version 8.5 or higher)
BoxcarAveraging.exe Stand-alone executable (requires free LabVIEW 2010 SP1 runtime engine)

 

Description

Boxcar averaging is a signal smoothing technique that assumes the average of a small number of adjacent points to be a better measure of signal than any of the individual points.  For example, in a 3-point boxcar, the first point is the average of points 1, 2, and 3.  The second is the average of points 4, 5, and 6, and so on.  Data becomes smoother as the size of the boxcar is increased; however, important details may be lost.

 

In this simulation, a "raw data" array of 2000 points is created consisting of four complete sine wave cycles on a background of Gaussian white noise.  An array of "boxcar averaged data" is created with a user-selected boxcar size.  Both the raw and averaged data are plotted (see below).  The VI updates continuously, thereby simulating real-time data acquisition, and emphasizing the effect of a change in the boxcar size.

 

(Reference: Skoog, Holler, and Crouch Principles of Instrumental Analysis, 6th Ed Thomson Brooks/Cole 2007)

 

Front Panel

 

Boxcar Averaging Front Panel

Guiding Questions

    1. Why is “boxcar averaging” a good name for this technique?
    2. At what boxcar size does the averaged signal begin to lose the overall shape of the non-averaged signal?
    3. What dangers, if any, could you anticipate arising from using boxcar averaging for data smoothing?

 


Back to...

LabVIEW Simulations LabVIEW for Analytical Chemistry
Concordia College Mark Jensen's homepage
Concordia Chemistry Department

 

 

This page was last updated on September 21, 2011