Skip to main content
Chemistry LibreTexts

Moving Average Exercise

  • Page ID
    77574
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    A moving average spreadsheet similar to the Ensemble Averaging spreadsheet can be accessed by clicking here.

    1. Remove all noise from the data, and adjust the following parameters in the moving average spreadsheet:
      • Peak Intensity = 5 μV (All 3 peaks)
      • Peak #1 Mean & Standard Deviation = (1.00 ± 0.02) min
      • Peak #2 Mean & Standard Deviation = (2.00 ± 0.05) min
      • Peak #3 Mean & Standard Deviation = (3.00 ± 0.10) min
      • Offset= 1 μv
    2. Select unweighted (MA) as the filter type for Dataset 1 and set the length of the smoothing window to 1. Select MA as the filter type for Dataset 2 and observe what happens to the smoothed data as you increase the size of the filter window.
    3. Select weighted (SG) as the filter type for Dataset 2 and observe what happens to the smoothed data as the size of the filter window increases.
    4. Compare and contrast unweighted and weighted filters and their effect on the distortion of the peak width and height of the original signal.
    5. Adjust the number of elements in both moving average filters to 5 points. Make one filter unweighted (MA) and one weighted (SG) Compare and contrast the effect of unweighted and Savitzky-Golay smoothing filters with equal lengths on peak distortion.
    6. Repeat this exercise with filter lengths of 9, 13, 17 and 21 elements. Under what conditions does minimal peak distortion occur? Will an unweighted filter always distort the original signal? Will a weighted signal always provide an undistorted signal?
    7. Remove all noise from the data, and adjust the following parameters in the moving average spreadsheet:
      • Peak Intensity 1 μV (Peak #1), 1 μV (Peak #2), 1 μV (Peak #3).
      • Peak #1 Mean & Standard Deviation = (1.00 ± 0.02) min
      • Peak #2 Mean & Standard Deviation = (2.00 ± 0.04) min
      • Peak #3 Mean & Standard Deviation = (4.00 ± 0.10) min
      • Offset= 1 μV
    8. Select unweighted (MA) as the filter type for Dataset 1 and set the length of the smoothing window to 1. Select MA as the filter type for Dataset 2 and set the length of the smoothing window to 5. The peak distortion for the widest peak will be ~1%. Gradually increase the noise until Peak #3 in Dataset #1 has a S/N of ~3. Then select weighted (SG) as the filter type for Dataset #2 and repeat the gradual increase in the noise level. Note the appearance of the raw and smoothed signals in both cases as the noise increases.
    9. Compare and contrast the ability of properly sized unweighted and weighted filters to clearly extract signals from noise based on S/N enhancement. Which of the S/N enhancement approaches best enhances signals at or below the detection limit?

    This page titled Moving Average Exercise is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Contributor.

    • Was this article helpful?