Skip to main content
Engineering LibreTexts

2.2: Sampling Experimental Data

  • Page ID
    121535
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    1. Digital Data Acquisition (DAQ)
      1. Digital form has inherent discrete, quantization of analog result
        1. Sampling frequency
        2. Resolution of digital conversion
        3. Sketch of continuous form of signal (green), but where DAQ stores particular data points (red markers) Display how discrete markers indicate continuous form
      2. Under sampling errors
        1. Sampling frequency \(f_{s} = \frac{1}{\delta t}\)
          1. \(\downarrow f_{s}\) yields less data over time
          2. Misrepresents form of the data (see Frequency\_Sampling.m Matlab script)
        2. Shannon's sampling theorem (longer video description)
          1. Sample rate must be at least twice (\(2\times\)) the maximum expected frequency
          2. Mathematically \(f_{s} \geq 2f_{max}\) or in terms of time step \(\delta t \leq \frac{1}{2f_{max}}\)
        3. Aliasing frequencies occur from undersampling
          1. When Shannon's sampling theorem is not satisfied, higher frequencies appear as lower frequency signals.
          2. Consider simple periodic form without DC offset \[y(t) = C\sin(2\pi f t + \phi) \] with signal stored by DAQ at \(\delta t\) intervals \[t = [0, \delta t, 2\delta t, \ldots, r\delta t] \]
          3. Discrete form of the data at \(r \delta t\) time step:\[y(r\delta t) = C\sin(2\pi f r\delta t + \phi) \] where \(r\) is just integer number of step (\(r=[0,1,2,\ldots]\))
          4. Assume an integer multiplier of \(2\pi\) in the form of \(mr\) is added to argument \[y(r\delta t) = C\sin(2\pi f r\delta t + \phi + mr2\pi) \]output will not change due to periodicity.
          5. Collect the common terms for factoring\[y(r\delta t) = C\sin\left(2\pi r\delta t\left(f + \frac{m}{\delta t}\right) + \phi\right) \] since \(2\pi r \delta t\) is common in both equations, the fundamental frequency \(f\) will be undistinguishable from alias frequency \(f_{a} = f+ \frac{m}{\delta t}\)
          6. Folding point of aliasing is Nyquist frequency
            • \(f_{N} = \frac{f_{s}}{2} = \frac{1}{2\delta t}\)
            • Any original frequency \(f\) of the signal greater than Nyquist frequency \(f>f_{N}\) will appear as lower frequency information.
            • Nyquist folding diagram
            • Other OER available resource

     

    Exercise \(\PageIndex{1}\)

    AC voltage oscillates at 60~Hz but sampled at 90~Hz. What are the Nyquist and aliasing frequencies?

    Answer

    Determine Nyquist frequency: \(f_{N} = \frac{f_{2}}{2} = \frac{90}{2} = 45\) Hz

    Is \(f>f_{N})\)?: Yes, aliasing possible

    Determine ratio of input to Nyquist: \(\frac{f}{f_{N}} = \frac{60}{45} = 1.33\)

    Use ratio on folding diagram: \(1.33f_{N}\) drops to \(0.67f_{N}\) on bottom line

    Calculate aliasing frequency: \(f_{a} = 0.67(45) = 30 \) Hz

    Methodology can repeat for any samples up to 120 Hz when Nyquist frequency is satisfied

    1. Analog to Digital Conversion error
      1. Resolution of complex function is the result of bit resolution in analog-to-DC.
      2. Resolution error is the smallest change to least-significant-bit: \[Q = \frac{E_{fsr}}{2^{m}} \] where \(E_{fsr}\) is the full range from minimum to maximum of signal and \(m\) is number of bits used in digital form.
      3. Greater bits increases resolution at the cost of increasing hardware.
    Exercise \(\PageIndex{2}\)

    An A/D converter with 7-bit register on a full-scale output of 0.0-3.90 V converts analog values of \(\sqrt{3}\) and \(\sqrt{11}\) to a digital form. What is the binary number that the computer stores in its memory for both of these digital conversions? What is the actual decimal output with associated uncertainty of resolution?

    Answer

    The size of the least significant bit step is \(\delta v = \frac{3.9-0.0}{2^{7}} = 0.03046875\)~V.

    For \(\sqrt{3}\), the integer number of steps will be floor(\(\sqrt{3}/\delta v\)) = 56 steps. Therefore, the binary number of the integer will be 56 = 011 1000. The stored value of the 7-bit computer will be \(\sqrt{3} = 1.7062 \pm 0.0152\) 

    For comparison to \(\sqrt{11}\), 

    • floor(\(\sqrt{11}/\delta v\)) = 108 steps
    • 108 = 110 1100 in binary 
    • \(\sqrt{11} = 3.290\pm 0.0152\) with 7 bits with same uncertainty resolution 
    1. Examples of cost comparison of DAQ devices
      1. National Instruments
      2. LabJack
      3. Measurement Computing
      4. Contec
      5. Note price variance depending on number of channels, sample rates, bit resolution, and connection type

    2.2: Sampling Experimental Data is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?