6.3: Discrete data conversion and filtering
- Page ID
- 121979
\( \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{\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}\)- Usefulness with discrete data
- Also possible to use complex exponential and Euler formula \[ \mathbf{e}^{\pm i\theta} =\cos\theta \pm i\sin\theta \] \[\cos \theta = \frac{[\mathbf{e}^{i\theta}+\mathbf{e}^{-i\theta}]}{2} \] \[ \sin \theta = \frac{[\mathbf{e}^{i\theta}-\mathbf{e}^{-i\theta}]}{2}\]
- Complex formulation simplifies multiplication of real and imaginary components through complex conjugates
- When the integration is expanded beyond single period to \(\infty\), then conversion of data from time domain to frequency domain possible \[Y(\omega) = \int_{-\infty}^{+\infty}y(t)\mathbf{e}^{-i\omega t}dt \]
-
What does plot of simple periodic appear in frequency domain?
- Answer
-
Show single stem plot.
-
What happens if multiple frequencies are present?
- Answer
-
Image of multiple stems of multi-frequency image.
-
- Tool for discrete data is fast Fourier transform (FFT)
- developed in 1940's when computation was laborious
- divides data in half and sums over \(N/2\) steps instead of \(N^{2}\) process
- Simple fft call in Matlab
- Using the FFT
- Input is the real data array collected of length \(N\) points
- Output is equal length complex (real + imaginary) array
- similar to \(A_{n}\) and \(B_{n}\) of Fourier Coefficients when \(y(t)\) was known
- BUT exists at ALL frequency points, not just harmonics of integer frequency value \(n\omega\)
- Displaying the data on plot
- Horizontal axis is now cyclic frequency (\(f\))
- Lowest frequency: at \(f_{min} = 0 \) the peak represents mean value
- Largest frequency is resolution of smallest time step \(f_{max} =1/ \delta t\)
- Frequency increment is total time of collection \[ df = \frac{1}{N \delta t} = \frac{1}{t_{end}-t_{0}}\]
- Which part to plot, real or imaginary?
- Can use both through absolute value: \[z = |x + yi| = \sqrt{x^{2} + y^{2}} \] \[C = |Y(\omega)| = \sqrt{\Re(Y(\omega))^{2} + \Im(Y(\omega))^{2}} \]
- Since no data are known between the \(df\), acts as a comb function (stem plot in Matlab) rather than continuous curve
- Note that the FFT causes a folding symmetry about the \(N/2\) point
- Hence, magnitude of stem is half of amplitude at that particular frequency
- Introduces potential for amplitude ambiguity
- When full period is collected, single peak appears AT particular frequency
- Portions of periods cause spread of peak to adjacent frequencies (Figures need to be incorporated through example)
- Acts similar to the statistics functions from Section 2.1 where time range affected value
- How to reduce ambiguity? Increase total time to make ambiguity smaller percentage of overall data collected (i.e. have MORE total periods)
- What about signals with discontinuities (i.e. \(\infty\) frequencies)? There will always be spreading
- Filtering in frequency domain
- With raw data in temporal or spatial domain, the Fourier Transform converts to a frequency
- Recall types of filtering from MEE 321 (vibrations) and/or MEE 322 (dynamic systems and control)
- Describe a band-pass filter in terms of low-pass versus high-pass conditions
- Analogy of window of visibility into a room
- Using the FFT data, user may select either:
- particular frequencies that stand out (include side shoulders for amplitude ambiguity described from Section 6.2.E)
- amplitudes above some noise level
- Practical considerations that must be implemented:
- Must utilize FFT symmetry though
- every \(f_{r}\) retained, must also include \(f_{max}-f_{r}\)
- other frequency domain values made zero in both real and imaginary domains
- Use the inverse fast Fourier transform (ifft) to return to time domain
- Output will retain complex number elements, but only real portion has value (imaginary should be \(\rightarrow 0\))
- Plotting noisy versus filtered data in Matlab examples
- Must utilize FFT symmetry though

