(2 intermediate revisions by the same user not shown) | |||
Line 187: | Line 187: | ||
Multiplying both sides by <math class="inline">\left(1+\frac{1}{2}e^{-j\omega}\right)\left(1+j\sqrt{3} - e^{-j\omega}\right)\left(1-j\sqrt{3}-e^{-j\omega}\right)</math> and simplifying, we get: | Multiplying both sides by <math class="inline">\left(1+\frac{1}{2}e^{-j\omega}\right)\left(1+j\sqrt{3} - e^{-j\omega}\right)\left(1-j\sqrt{3}-e^{-j\omega}\right)</math> and simplifying, we get: | ||
− | <math>A+(1-j\sqrt{3})B+(1+ | + | <math>A+(1-j\sqrt{3})B+(1+j\sqrt{3})C-\left[\frac{A}{2}+\frac{(1+j\sqrt{3})}{2}B+\frac{(1-j\sqrt{3})}{2}C\right]e^{-j\omega} + \left(\frac{A}{4}-\frac{B}{2}-\frac{C}{2}\right)e^{-2j\omega}=2-e^{-j\omega}</math> |
Comparing both sides we have that: | Comparing both sides we have that: | ||
Line 196: | Line 196: | ||
<math>\begin{align} | <math>\begin{align} | ||
− | \mathcal{H}(\omega)&=\frac{4}{3}\cdot \frac{1}{1+\frac{1}{2}e^{-j\omega}}+\frac{1}{3} \cdot \frac{1}{1+j\sqrt{3}-e^{-j\omega}}+\frac{1}{3} \cdot \frac{1}{1-j\ | + | \mathcal{H}(\omega)&=\frac{4}{3}\cdot \frac{1}{1+\frac{1}{2}e^{-j\omega}}+\frac{1}{3} \cdot \frac{1}{1+j\sqrt{3}-e^{-j\omega}}+\frac{1}{3} \cdot \frac{1}{1-j\sqrt{3}-e^{-j\omega}} \\ |
&=\frac{4}{3} \cdot \frac{1}{1+\frac{1}{2}e^{-j\omega}} +\frac{1}{3(1+j\sqrt{3})} \cdot \frac{1}{1-\frac{1}{1+j\sqrt{3}}e^{-j\omega}}+\frac{1}{3(1-j\sqrt{3})} \cdot \frac{1}{1-\frac{1}{1-j\sqrt{3}}e^{-j\omega}} | &=\frac{4}{3} \cdot \frac{1}{1+\frac{1}{2}e^{-j\omega}} +\frac{1}{3(1+j\sqrt{3})} \cdot \frac{1}{1-\frac{1}{1+j\sqrt{3}}e^{-j\omega}}+\frac{1}{3(1-j\sqrt{3})} \cdot \frac{1}{1-\frac{1}{1-j\sqrt{3}}e^{-j\omega}} | ||
\end{align} | \end{align} | ||
Line 211: | Line 211: | ||
\end{align} | \end{align} | ||
</math> | </math> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | [[HW7 ECE301 Spring2011 Prof Boutin| HW7]] | ||
+ | |||
+ | [[2011 Spring ECE 301 Boutin|Back to 2011 Spring ECE 301 Boutin]] | ||
+ | |||
+ | [[Category:2011_Spring_ECE_301_Boutin]] |
Latest revision as of 07:23, 21 March 2011
Contents
Homework 7 Solutions, ECE301 Spring 2011 Prof. Boutin
Students should feel free to make comments/corrections or ask questions directly on this page.
Question 1
$ \begin{align} \mathcal{X}(\omega)&= \sum_{n=-\infty}^{\infty} 5^{-|n+2|}e^{-j\omega n}\\ &= \sum_{n=-\infty}^{-3} 5^{(n+2)}e^{-j\omega n} + \sum_{n=-2}^{\infty}5^{-(n+2)}e^{-j\omega n} \\ &= 25 \sum_{n=-\infty}^{-3} \left(\frac{1}{5}e^{j\omega}\right)^{-n} + e^{2j\omega}\sum_{n=-2}^{\infty} (5e^{j\omega})^{-(n+2)} \\ &= 25 \sum_{n=3}^{\infty} \left(\frac{1}{5}e^{j\omega}\right)^{n} + e^{2j\omega}\sum_{n=0}^{\infty} \left(\frac{1}{5}e^{-j\omega}\right)^n\\ &= 25\cdot \frac{\left(\frac{1}{5}e^{j\omega}\right)^{3}}{1-\frac{1}{5}e^{j\omega}} + \frac{e^{2j\omega}}{1-\frac{1}{5}e^{-j\omega}}\\ &=\frac{e^{3j\omega}}{5-e^{j\omega}} + \frac{5e^{2j\omega}}{5-e^{-j\omega}} \end{align} $
To verify our answer using the table, we first write:
$ x[n]=5^{(n+2)}u[-n-3]+5^{-(n+2)}u[n+2]=\frac{1}{5}\left(\frac{1}{5}\right)^{-(n+3)}u[-(n+3)]+\left(\frac{1}{5}\right)^{(n+2)}u[n+2] $.
Using the time reversal property (for the first term), the time shift property (for both terms), the appropriate pair from the table, and the linearity of the FT, we get:
$ \begin{align} \mathcal{X}(\omega)&=\frac{e^{3j\omega}}{5}\left(\frac{1}{1-\frac{1}{5}e^{j\omega}}\right)+\frac{e^{2j\omega}}{1-\frac{1}{5}e^{-j\omega}} \\ &=\frac{e^{3j\omega}}{5-e^{j\omega}}+\frac{5e^{2j\omega}}{5-e^{-j\omega}} \end{align} $.
Question 2
We choose the period from $ (-\pi,\pi) $ (which corresponds to the part of the spectrum for k=0) to compute the inverse DT Fourier transform of the given signal:
$ \begin{align} x[n]&=\frac{1}{2\pi}\int_{-\pi}^{\pi} \mathcal{X}(\omega)e^{j\omega n}d\omega \\ &=\frac{1}{2\pi}\int_{-\pi}^{\pi} \left[ \delta (\omega) +\pi\delta\left(\omega -\frac{\pi}{2}\right)+\pi\delta\left(\omega +\frac{\pi}{2}\right) \right] d\omega \\ &=\frac{1}{2\pi}\int_{-\pi}^{\pi} \delta (\omega) d\omega +\frac{1}{2}\int_{-\pi}^{\pi}\delta\left(\omega -\frac{\pi}{2}\right) d\omega+\frac{1}{2}\int_{-\pi}^{\pi}\delta\left(\omega +\frac{\pi}{2}\right) d\omega \\ &=\frac{1}{2\pi} + \frac{1}{2}e^{-j\frac{\pi}{2}n}+\frac{1}{2}e^{j\frac{\pi}{2}n} \\ &=\frac{1}{2\pi} + \cos\left(\frac{\pi}{2}n\right) \end{align} $
Question 3
a) First, we find the FT of $ x[n] $ and $ h[n] $:
$ \mathcal{X}(\omega)=\frac{1}{1-\frac{3}{4}e^{-j\omega}} $
$ \mathcal{H}(\omega)=\frac{1}{1-\frac{1}{2}e^{-j\omega}} $
Then,
$ \mathcal{Y}(\omega)=\mathcal{H}(\omega)\mathcal{X}(\omega)=\frac{8}{(4-3e^{-j\omega})(2-e^{-j\omega})} $
Now, we need to write out the partial fraction expansion.
$ \frac{1}{(4-3e^{-j\omega})(2-e^{-j\omega})}=\frac{A}{4-3e^{-j\omega}}+\frac{B}{2-e^{-j\omega}} $
Multiplying both sides by $ (4-3e^{-j\omega})(2-e^{-j\omega}) $, we get:
$ A(2-e^{-j\omega})+B(4-3e^{-j\omega})=1 $
Comparing both sides and solving, we have that:
$ A=\frac{3}{2} $, $ B=-\frac{1}{2} $.
Then, we have that:
$ \mathcal{Y}(\omega)=\frac{12}{4-3e^{-j\omega}}-\frac{4}{2-e^{-j\omega}}=\frac{3}{1-\frac{3}{4}e^{-j\omega}}-\frac{2}{1-\frac{1}{2}e^{-j\omega}} $
Using DTFT pairs, we get:
$ y[n]=3\left(\frac{3}{4}\right)^nu[n]-2\left(\frac{1}{2}\right)^nu[n]=\left[3\left(\frac{3}{4}\right)^n-2\left(\frac{1}{2}\right)^n\right]u[n] $
b) First, we find the FT of $ x[n] $ and $ h[n] $:
$ \mathcal{X}(\omega)=\frac{1}{\left(1-\frac{1}{4}e^{-j\omega}\right)^2} $
$ \mathcal{H}(\omega)=\frac{1}{1-\frac{1}{2}e^{-j\omega}} $
Then,
$ \mathcal{Y}(\omega)=\mathcal{H}(\omega)\mathcal{X}(\omega)=\frac{1}{\left(1-\frac{1}{4}e^{-j\omega}\right)^2\left(1-\frac{1}{2}e^{-j\omega}\right)} $
Now, we need to write out the partial fraction expansion.
$ \frac{1}{\left(1-\frac{1}{4}e^{-j\omega}\right)^2\left(1-\frac{1}{2}e^{-j\omega}\right)}=\frac{A}{\left(1-\frac{1}{4}e^{-j\omega}\right)^2}+\frac{B}{1-\frac{1}{4}e^{-j\omega}}+\frac{C}{1-\frac{1}{2}e^{-j\omega}} $
Multiplying both sides by $ \left(1-\frac{1}{4}e^{-j\omega}\right)^2\left(1-\frac{1}{2}e^{-j\omega}\right) $, we get:
$ A(1-\frac{1}{2}e^{-j\omega})+B\left(1-\frac{1}{4}e^{-j\omega}\right)\left(1-\frac{1}{2}e^{-j\omega}\right)+C\left(1-\frac{1}{4}e^{-j\omega}\right)^2=1 $
Simplifying we get:
$ A+C+B -\left(\frac{A}{2}+3\frac{B}{4}+\frac{C}{2}\right)e^{-j\omega}+\left(\frac{C}{16}+\frac{B}{8}\right)e^{-2j\omega}=1 $
Now, comparing and solving we have that:
$ A=-1, B=-2, C=4 $.
Hence,
$ \mathcal{Y}(\omega)=-\frac{1}{\left(1-\frac{1}{4}e^{-j\omega}\right)^2}-\frac{2}{1-\frac{1}{4}e^{-j\omega}}+\frac{4}{1-\frac{1}{2}e^{-j\omega}} $
Using DTFT pairs we get:
$ y[n]=-(n+1)\left(\frac{1}{4}\right)^nu[n]-2\left(\frac{1}{4}\right)^nu[n]+4\left(\frac{1}{2}\right)^nu[n]=\left[4\left(\frac{1}{2}\right)^n-(n+3)\left(\frac{1}{4}\right)^n\right]u[n] $
c) We can rewrite the given signal as:
$ x[n]=(-1)^n=e^{j\pi n} $
The system is LTI, then we have that:
$ \begin{align} y[n]&=\mathcal{H}(\pi)e^{j\pi n} \\ &=\frac{1}{1-\frac{1}{2}e^{-j\pi}} e^{j\pi n} \\ &=\frac{2}{2+1}e^{j\pi n} \\ &=\frac{2}{3}e^{j\pi n} \\ &=\frac{2}{3}(-1)^n \end{align} $
Question 4
We have that:
$ x[n]=\cos(\omega_0 n)=\frac{e^{j\omega_0 n}}{2}+\frac{e^{-j\omega_0 n}}{2} $
Since the given system is LTI, then:
$ y[n]=\frac{\mathcal{H}(\omega_0)}{2}e^{j\omega_0 n} + \frac{\mathcal{H}(-\omega_0)}{2}e^{-j\omega_0 n} $
But it is given that $ y[n]=\omega_0\cos(\omega_0 n) $, hence we have that:
$ \mathcal{H}(\omega_0)=\mathcal{H}(-\omega_0)=\omega_0 \text{ for } 0\leq\omega_0\leq\pi $
From the above we conclude that the frequency response of the system is:
$ \mathcal{H}(\omega)=|\omega| \text{ for } -\pi\leq\omega\leq\pi $
Now, we find the unit impulse response by using the IDTFT integral.
For $ n=0 $, we have that:
$ h[0]=\frac{1}{2\pi}*\pi^2=\frac{\pi}{2} $
For $ n\neq 0 $, we have that:
$ \begin{align} h[n]&=\frac{1}{2\pi}\int_{-\pi}^{\pi} |\omega| e^{j\omega n} d\omega \\ &=\frac{1}{2\pi}\int_{0}^{\pi} \omega e^{j\omega n} d\omega - \frac{1}{2\pi}\int_{-\pi}^{0} \omega e^{j\omega n} d\omega \\ &=\frac{1}{2\pi}\left[\frac{\omega e^{j\omega n}}{jn}+\frac{e^{j\omega n}}{n^2}\right]_0^{\pi}-\frac{1}{2\pi}\left[\frac{\omega e^{j\omega n}}{jn}+\frac{e^{j\omega n}}{n^2}\right]^0_{-\pi} \\ &=\frac{1}{2\pi}\left[\frac{\pi e^{j\pi n}}{jn}+\frac{e^{j\pi n}}{n^2}-\frac{1}{n^2}\right]-\frac{1}{2\pi}\left[\frac{1}{n^2}\frac{\pi e^{j\pi n}}{jn}-\frac{e^{j\pi n}}{n^2}\right] \\ &=-\frac{1}{\pi n^2}+e^{j\pi n}{\pi n^2} \\ &=\frac{1}{\pi n^2}[(-1)^n-1] \end{align} $
Question 5
a) Since we have a cascade of LTI systems, then:
$ \begin{align} \mathcal{Y}(\omega)&=\mathcal{H}_1(\omega)\mathcal{H}_2(\omega)\mathcal{X}(\omega) \\ &=\frac{2-e^{-j\omega}}{\left(1+\frac{1}{2}e^{-j\omega}\right)\left(1-\frac{1}{2}e^{-j\omega}+\frac{1}{4}e^{-2j\omega}\right)}\mathcal{X}(\omega) \end{align} $
Simplifying, we have that:
$ \left(1+\frac{1}{8}e^{-3j\omega}\right)\mathcal{Y}(\omega)=(2-e^{-j\omega})\mathcal{X}(\omega) $
Now, using inverse of the delay property of the DTFT we get:
$ y[n]=-\frac{1}{8}y[n-3]+2x[n]-x[n-1] $
b) The frequency response of the cascade system is:
$ \mathcal{H}(\omega)=\frac{2-e^{-j\omega}}{\left(1+\frac{1}{2}e^{-j\omega}\right)\left(1-\frac{1}{2}e^{-j\omega}+\frac{1}{4}e^{-2j\omega}\right)} $
Finding the roots of the quadratic equation in the denominator, we get:
$ \mathcal{H}(\omega)=\frac{2-e^{-j\omega}}{\left(1+\frac{1}{2}e^{-j\omega}\right)\left(1+j\sqrt{3} - e^{-j\omega}\right)\left(1-j\sqrt{3}-e^{-j\omega}\right)} $
Now we need to find the partial fraction expansion of $ \mathcal{H}(\omega) $.
$ \frac{2-e^{-j\omega}}{\left(1+\frac{1}{2}e^{-j\omega}\right)\left(1+j\sqrt{3} - e^{-j\omega}\right)\left(1-j\sqrt{3}-e^{-j\omega}\right)}=\frac{A}{1+\frac{1}{2}e^{-j\omega}}+\frac{B}{1+j\sqrt{3}-e^{-j\omega}}+\frac{C}{1-j\sqrt{3}-e^{-j\omega}} $
Multiplying both sides by $ \left(1+\frac{1}{2}e^{-j\omega}\right)\left(1+j\sqrt{3} - e^{-j\omega}\right)\left(1-j\sqrt{3}-e^{-j\omega}\right) $ and simplifying, we get:
$ A+(1-j\sqrt{3})B+(1+j\sqrt{3})C-\left[\frac{A}{2}+\frac{(1+j\sqrt{3})}{2}B+\frac{(1-j\sqrt{3})}{2}C\right]e^{-j\omega} + \left(\frac{A}{4}-\frac{B}{2}-\frac{C}{2}\right)e^{-2j\omega}=2-e^{-j\omega} $
Comparing both sides we have that:
$ A=\frac{4}{3},B=C=\frac{1}{3} $
Hence,
$ \begin{align} \mathcal{H}(\omega)&=\frac{4}{3}\cdot \frac{1}{1+\frac{1}{2}e^{-j\omega}}+\frac{1}{3} \cdot \frac{1}{1+j\sqrt{3}-e^{-j\omega}}+\frac{1}{3} \cdot \frac{1}{1-j\sqrt{3}-e^{-j\omega}} \\ &=\frac{4}{3} \cdot \frac{1}{1+\frac{1}{2}e^{-j\omega}} +\frac{1}{3(1+j\sqrt{3})} \cdot \frac{1}{1-\frac{1}{1+j\sqrt{3}}e^{-j\omega}}+\frac{1}{3(1-j\sqrt{3})} \cdot \frac{1}{1-\frac{1}{1-j\sqrt{3}}e^{-j\omega}} \end{align} $
From the table of pairs we have that:
$ \begin{align} h[n]&=\frac{4}{3}\left(-\frac{1}{2}\right)^nu[n]+\frac{1-j\sqrt{3}}{12}\left(\frac{1}{1+j\sqrt{3}}\right)^nu[n]+\frac{1+j\sqrt{3}}{12}\left(\frac{1}{1-j\sqrt{3}}\right)^nu[n] \\ &=\frac{4}{3}\left(-\frac{1}{2}\right)^nu[n]+\frac{1-j\sqrt{3}}{12}e^{-j\frac{\pi}{3}n}\left(\frac{1}{2}\right)^nu[n]+\frac{1+j\sqrt{3}}{12}e^{j\frac{\pi}{3}n}\left(\frac{1}{2}\right)^nu[n] \\ &=\left[\frac{4}{3}(-1)^n\left(\frac{1}{2}\right)^n + \frac{1}{6} \cos\left(\frac{\pi}{3}n\right)\left(\frac{1}{2}\right)^n-\frac{\sqrt{3}}{6}\sin \left(\frac{\pi}{3}n\right)\left(\frac{1}{2}\right)^n\right]u[n] \\ &=\left[\frac{4}{3}(-1)^n + \frac{1}{6} \cos\left(\frac{\pi}{3}n\right)-\frac{\sqrt{3}}{6}\sin \left(\frac{\pi}{3}n\right)\right]\left(\frac{1}{2}\right)^nu[n] \end{align} $