Solution of Week12 Quiz Question 3


Q3. Given -

$ x[n] = \begin{cases} cos(\pi n / 8), & n < 0 \\ cos(\pi n / 3), & \mbox{else} \end{cases} $

and rectangular window

$ w[n] = \begin{cases} 1, & |n| < 25 \\ 0, & \mbox{else} \end{cases} $

STDFT is defined as

$ \begin{align} X(\omega,n) &= \sum_{k} x[k]w[n-k]e^{-j\omega k} \end{align} $

i. n < -25
$ \begin{align} X(\omega, n) &= \sum_{k} x[k]w[n-k]e^{-j\omega k} \\ &= \sum_{n-24}^{n+24} x[k]e^{-j\omega k} \\ &= \sum_{n-24}^{n+24} cos \left( \frac{\pi k}{8} \right) e^{-j\omega k} \\ \end{align} $

Making a change of variable, l = k - (n-24)

$ \begin{align} X(\omega, n) &= \sum_{l = 0}^{48} cos \left( \frac{\pi (l + (n-24)}{8} \right)e^{-j\omega (l+(n-24))} \\ &= \sum_{l = 0}^{48} cos \left( \frac{\pi (l + (n-24)}{8} \right)e^{-j\omega l} e^{-j\omega (n-24)} \\ &= e^{-j\omega (n-24)} \sum_{l = 0}^{48} \frac{1}{2} \left( e^{j\omega \pi(l+(n-24))/8} + e^{-j\omega \pi(l+(n-24))/8} \right) e^{-j\omega l} \\ &= \left( e^{-j\omega (n-24)}e^{j\omega \pi(n-24)/8} \sum_{l = 0}^{48} \frac{1}{2} e^{j\omega \pi l/8}e^{-j\omega l} \right) + \left( e^{-j\omega (n-24)}e^{-j\omega \pi(n-24)/8} \sum_{l = 0}^{48} \frac{1}{2} e^{-j\omega \pi l/8}e^{-j\omega l} \right) \\ &= \left( e^{-j(n-24)(\omega + \frac{\pi }{8})} \sum_{l = 0}^{48} \frac{1}{2} e^{-j(\omega - \pi /8)l} \right) + \left( e^{-j(n-24)(\omega - \frac{\pi }{8})} \sum_{l = 0}^{48} \frac{1}{2} e^{-j(\omega + \pi /8)l} \right) \\ &= \left( e^{-j(n-24)(\omega + \frac{\pi }{8})} \frac{1}{2} \sum_{l = 0}^{48} e^{-j(\omega - \pi /8)l} \right) + \left( e^{-j(n-24)(\omega - \frac{\pi }{8})} \frac{1}{2} \sum_{l = 0}^{48} e^{-j(\omega + \pi /8)l} \right) \\ &= \left( e^{-j(n-24)(\omega + \frac{\pi }{8})} \frac{1}{2} \sum_{l = 0}^{48} e^{-j(\omega - \pi /8)l} \right) + \left( e^{-j(n-24)(\omega - \frac{\pi }{8})} \frac{1}{2} \sum_{l = 0}^{48} e^{-j(\omega + \pi /8)l} \right) \\ \end{align} $

... to be continued


ii. n > 25
iii. n = 0




Back to Quiz Pool

Back to Lab wiki

Alumni Liaison

BSEE 2004, current Ph.D. student researching signal and image processing.

Landis Huffman