(New page: rhea edit ---- == 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. <math>y[n] = h[n]\text{ when }x[n] = ...)
 
Line 63: Line 63:
 
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] <br/>
 +
y[n] = h[n] * u[n] <br/>
 +
y[n] = <math>0.5^nu[n] + 2(0.5)^{n-1}u[n-1]</math> * 0.25^nu[n] <br/>
 +
y[n] = <math>(0.5^nu[n] * u[n]) + (2(0.5)^{n-1}u[n-1] * 0.25^nu[n]) </math><br/>
  
 +
Splitting the expression into two parts, we evaluate them individually, <br/>
 +
Using the definition of convolution, <br/>
 +
<math>(f * g)[n]\ \stackrel{\mathrm{def}}{=}\ \sum_{k=-\infty}^{\infty} f[k]\, g[n - k]</math>
 +
 +
<math>
 +
\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} \frac{0.5^k}{0.25^k} 0.25^nu[n - k] \\
 +
&= \sum_{k=0}^{n} \frac{0.5^k}{0.25^k} 0.25^nu[n] \\
 +
&= 0.25^nu[n] \sum_{k=0}^{n} \frac{0.5^k}{0.25^k}  \\
 +
&= 0.25^nu[n] \frac{1-\frac{(0.5)^{n+1}}{(0.25)^{n+1}}}{1-\frac{0.5}{0.25}} \\
 +
&= 0.25^nu[n] \frac{1-2^{n+1}}{1-2} \\
 +
&= 0.25^n(2^{n+1} - 1)u[n]  \\
 +
\end{align}
 +
</math>
 +
 +
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,
 +
 +
<math>
 +
\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}
 +
</math>
 +
 +
Combining the two,
 +
 +
<math>
 +
\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}
 +
</math>
 +
 +
Credit: Prof. Bouman
 
----
 
----
  

Revision as of 16:05, 20 October 2010

rhea edit


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].

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]) $

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].

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]) $

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} \frac{0.5^k}{0.25^k} 0.25^nu[n - k] \\ &= \sum_{k=0}^{n} \frac{0.5^k}{0.25^k} 0.25^nu[n] \\ &= 0.25^nu[n] \sum_{k=0}^{n} \frac{0.5^k}{0.25^k} \\ &= 0.25^nu[n] \frac{1-\frac{(0.5)^{n+1}}{(0.25)^{n+1}}}{1-\frac{0.5}{0.25}} \\ &= 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

Alumni Liaison

Sees the importance of signal filtering in medical imaging

Dhruv Lamba, BSEE2010