RI Title
RI logo

Smoothing is a form of averaging. It can be thought of as horizontal averaging, where each point in an array is averaged with neighboring points. It is employed primarily for reducing noise, or reducing deviant points caused by measurement error.

The tester provides two smoothing functions: 'smooth' and 'smooth bilateral'. They both will smooth an array of data, but in slightly different ways.


The Smooth Bilateral algorithm is more recent and does a better job of smoothing a set of data while not shifting it left or right. It also treats the end points in a more intelligent fashion. It is the recommended choice unless there are compelling reasons to use the simpler Smooth approach.

Smooth Bilateral

This algorithm takes an argument which is the number of points to smooth on either side of the index point. The function will average this number of points before AND after the current point. If you provide an argument of 3, the routine will average the 3 points before the index point, the index point itself, and 3 points after the index point for a total of 7 points.

At either endpoint, it reduces the number of smoothed points to fit. In the example above, the 3rd point will be the average of points 1 and 2 (2 before the index), the 3rd point itself, and points 4 and 5 (2 points after). The actual end points are copied to the output without any averaging at all.


This algorithm does a one-sided smoothing of the data. If you tell it to smooth 3 points, as above, it will average the index point and the 2 points after the index point. Like a traditional moving average, the smoothed data does not "line up" perfectly with the source. It appears to lead the actual data because the smoothing window on one side is always looking ahead of the index point.

At the endpoint, this algorithm fills in the last N points with the same value as the last average. In the example of 3 smoothed points, the last 3 points will have exactly the same value, since there is no more data to add to the moving average and it always maintains a smoothing window of 3 points. This leads to a "flat tail" on the end of the smoothed data.

You must use caution when employing any form of smoothing. If the Device Under Test (DUT) is actually producing a deviant point in the data, smoothing can hide that point. Smoothing is valid only when the deviant data point(s) are caused by noise or by measurement inaccuracy. In that case, smoothing will provide a more accurate result.

PrintEmail Link
©2009-2024 Roos Instruments, Inc. All rights reserved.