(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
---- | ---- | ||
== Solution to Q3 of Week 9 Quiz Pool == | == Solution to Q3 of Week 9 Quiz Pool == | ||
Line 22: | Line 20: | ||
b. Compute the output when x[n] = u[n]. | b. Compute the output when x[n] = u[n]. | ||
− | y[n] = h[n] * x[n] | + | <math> |
− | y[n] = h[n] * u[n] | + | \begin{align} |
− | y[n] = | + | y[n] &= h[n] * x[n] \\ |
− | y[n] = | + | y[n] &= h[n] * u[n] \\ |
+ | y[n] &= 0.5^nu[n] + 2(0.5)^{n-1}u[n-1] * u[n] \\ | ||
+ | y[n] &= (0.5^nu[n] * u[n]) + (2(0.5)^{n-1}u[n-1] * u[n]) \\ | ||
+ | \end{align} | ||
+ | </math> | ||
Splitting the expression into two parts, we evaluate them individually, <br/> | Splitting the expression into two parts, we evaluate them individually, <br/> | ||
Line 63: | Line 65: | ||
c. Compute the output when x[n] = <math>0.25^n</math>u[n]. | c. Compute the output when x[n] = <math>0.25^n</math>u[n]. | ||
− | y[n] = h[n] * x[n] | + | <math> |
− | y[n] = h[n] * u[n] | + | \begin{align} |
− | y[n] = | + | y[n] &= h[n] * x[n] \\ |
− | y[n] = | + | y[n] &= h[n] * u[n] \\ |
+ | y[n] &= 0.5^nu[n] + 2(0.5)^{n-1}u[n-1] * 0.25^nu[n] \\ | ||
+ | y[n] &= (0.5^nu[n] * u[n]) + (2(0.5)^{n-1}u[n-1] * 0.25^nu[n]) \\ | ||
+ | \end{align} | ||
+ | </math> | ||
Splitting the expression into two parts, we evaluate them individually, <br/> | Splitting the expression into two parts, we evaluate them individually, <br/> | ||
Line 75: | Line 81: | ||
\begin{align} | \begin{align} | ||
0.5^nu[n] * 0.25^nu[n] &= \sum_{k=-\infty}^{\infty} 0.5^k u[k] 0.25^{n-k}u[n - k] \\ | 0.5^nu[n] * 0.25^nu[n] &= \sum_{k=-\infty}^{\infty} 0.5^k u[k] 0.25^{n-k}u[n - k] \\ | ||
− | &= \sum_{k=0}^{\infty} \frac{0.5 | + | &= \sum_{k=0}^{\infty} \left ( \frac{0.5}{0.25} \right )^k 0.25^nu[n - k] \\ |
− | &= \sum_{k=0}^{n} | + | &= \sum_{k=0}^{n} 2^k 0.25^nu[n] \\ |
− | &= 0.25^nu[n] \sum_{k=0}^{n} | + | &= 0.25^nu[n] \sum_{k=0}^{n} 2^k \\ |
− | + | ||
&= 0.25^nu[n] \frac{1-2^{n+1}}{1-2} \\ | &= 0.25^nu[n] \frac{1-2^{n+1}}{1-2} \\ | ||
&= 0.25^n(2^{n+1} - 1)u[n] \\ | &= 0.25^n(2^{n+1} - 1)u[n] \\ |
Latest revision as of 16:21, 20 October 2010
Solution to Q3 of Week 9 Quiz Pool
y[n] = x[n] + 2x[n-1] + 0.5y[n-1]
a. Compute the impulse response h[n] of the system.
$ y[n] = h[n]\text{ when }x[n] = \delta[n] $
$ h[-1] = 0 $
$ h[0] = 1 $
$ h[1] = 2 + 0.5 $
$ h[2] = 0.5(2 + 0.5) $
$ h[3] = 0.5(0.5(2 + 0.5)) $
...
$ h[n] = (0.5 + 0.5) + (0.5 + 2) + (0.5^2 + 2(0.5)^2) + (0.5^3 + 2(0.5)^3) + ... $
So
$ h[n] = 0.5^nu[n] + 2(0.5)^{n-1}u[n-1] $
b. Compute the output when x[n] = u[n].
$ \begin{align} y[n] &= h[n] * x[n] \\ y[n] &= h[n] * u[n] \\ y[n] &= 0.5^nu[n] + 2(0.5)^{n-1}u[n-1] * u[n] \\ y[n] &= (0.5^nu[n] * u[n]) + (2(0.5)^{n-1}u[n-1] * u[n]) \\ \end{align} $
Splitting the expression into two parts, we evaluate them individually,
Using the definition of convolution,
$ (f * g)[n]\ \stackrel{\mathrm{def}}{=}\ \sum_{k=-\infty}^{\infty} f[k]\, g[n - k] $
$ \begin{align} 0.5^nu[n] * u[n] &= \sum_{k=-\infty}^{\infty} 0.5^k u[k] u[n - k] \\ &= \sum_{k=0}^{\infty} 0.5^k u[n - k] \\ &= \sum_{k=0}^{n} 0.5^k u[n] \\ &= u[n] \sum_{k=0}^{n} 0.5^k \\ &= u[n] \frac{1-0.5^{n+1}}{1-0.5} \\ &= 2(1-0.5^{n+1})u[n] \end{align} $
For the next part of the expression convolve with a delta function. Recall, that convolving a function with a shifted delta results in a shifted version of the function,
$ \begin{align} 2(0.5^{n-1}u[n-1]) * u[n] &= 2(0.5^nu[n] * \delta[n-1]) * u[n] \\ &= 2(0.5^nu[n] * u[n]) * \delta[n-1] \\ &= 2(2(1-0.5^{n+1})u[n]) * \delta[n-1] \\ &= 4(1-0.5^{n})u[n-1] \\ \end{align} $
Combining the two,
$ \begin{align} y[n] &= 2(1-0.5^{n+1})u[n] + 4(1-0.5^{n})u[n-1] \end{align} $
c. Compute the output when x[n] = $ 0.25^n $u[n].
$ \begin{align} y[n] &= h[n] * x[n] \\ y[n] &= h[n] * u[n] \\ y[n] &= 0.5^nu[n] + 2(0.5)^{n-1}u[n-1] * 0.25^nu[n] \\ y[n] &= (0.5^nu[n] * u[n]) + (2(0.5)^{n-1}u[n-1] * 0.25^nu[n]) \\ \end{align} $
Splitting the expression into two parts, we evaluate them individually,
Using the definition of convolution,
$ (f * g)[n]\ \stackrel{\mathrm{def}}{=}\ \sum_{k=-\infty}^{\infty} f[k]\, g[n - k] $
$ \begin{align} 0.5^nu[n] * 0.25^nu[n] &= \sum_{k=-\infty}^{\infty} 0.5^k u[k] 0.25^{n-k}u[n - k] \\ &= \sum_{k=0}^{\infty} \left ( \frac{0.5}{0.25} \right )^k 0.25^nu[n - k] \\ &= \sum_{k=0}^{n} 2^k 0.25^nu[n] \\ &= 0.25^nu[n] \sum_{k=0}^{n} 2^k \\ &= 0.25^nu[n] \frac{1-2^{n+1}}{1-2} \\ &= 0.25^n(2^{n+1} - 1)u[n] \\ \end{align} $
For the next part of the expression convolve with a delta function. Recall, that convolving a function with a shifted delta results in a shifted version of the function,
$ \begin{align} 2(0.5^{n-1}u[n-1]) * 0.25^nu[n] &= 2(0.5^nu[n] * \delta[n-1]) * 0.25^nu[n] \\ &= 2(0.5^nu[n] * 0.25^nu[n]) * \delta[n-1] \\ &= 2(0.25^n(2^{n+1} - 1)u[n]) * \delta[n-1] \\ &= 2(0.25^{n-1}(2^{n} - 1))u[n-1] \\ \end{align} $
Combining the two,
$ \begin{align} y[n] &= 0.25^n(2^{n+1} - 1)u[n] + 2(0.25^{n-1}(2^{n} - 1))u[n-1] \end{align} $
Credit: Prof. Bouman
Back to Lab Week 9 Quiz Pool
Back to ECE 438 Fall 2010 Lab Wiki Page
Back to ECE 438 Fall 2010