6.7: Numerical Experiment (Frequency Response of First-Order Filter)
- Page ID
- 10144
\( \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{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Consider the exponential moving average filter
\(x_{n}=\sum_{k=0}^{\infty} a^{k} u_{n-k ;} \quad a=0.98\)
- Write out a few terms of the sum to show how the filter works.
- Write \(x_n\) as a recursion and discuss the computer memory required to implement the filter.
- Compute the complex frequency response \(H(e^{j\theta})\) for the filter
- Write a MATLAB program to plot the magnitude and phase of the complex frequency response \(H(e^{j\theta})\) versus \(\theta\) for \(\theta =−\pi\) to \(+\pi\) in steps of \(\frac{2\pi}{64}\) Do this for two values of \(a\), namely, \(a=0.98\) and \(a=-0.98\). Explain your findings.
- Write a MATLAB program to pass the following signals through the filter when \(a=0.98\):
- \(u_{n}=\delta_{n}\)
- \(u_{n}=\xi_{n}\)
- \(u_{n}=\xi_{n} \cos \frac{2 \pi}{64} n\)
- \(u_{n}=\xi_{n} \cos \frac{2 \pi}{32} n\)
- \(u_{n}=\xi_{n} \cos \frac{2 \pi}{16} n\)
- \(u_{n}=\xi_{n} \cos \frac{2 \pi}{8} n\)
- \(u_{n}=\xi_{n} \cos \frac{2 \pi}{4} n\)
- \(u_{n}=\xi_{n} \cos \frac{2 \pi}{2} n\)
Plot the outputs for each case and interpret your findings in terms of the complex frequency response \(H(e^{j\theta})\). Repeat step 5 for \(a=-0.98\). Interpret your findings.


