EE 451 - HW 2

Solutions

1.
Problem 2.2
(a)

\begin{displaymath}y[n] = x[n] * h[n] = \sum_{k=-\infty}^{\infty}h[k] x[n-k]\end{displaymath}

h[k] = 0 for k < N0 and for k > N1 so we only have to sum over these indices:

\begin{displaymath}y[n] = x[n] * h[n] = \sum_{k=N_0}^{N_1}h[k] x[n-k]\end{displaymath}

We can change variables of summation by letting l = n - k, or k = n-l:

\begin{displaymath}y[n] = x[n] * h[n] = \sum_{l=n-N_0}^{n-N_1}h[n-l] x[l]\end{displaymath}

Since x[l] = 0 for l<N2, there will be no nozero x[l] in the sum if n-N0 < N2, or n < N0 + N2. Similarly, since x[l] = 0 for l>N3, there will be no nozero x[l] in the sum if n-N1 > N3, or n < N1 + N3. Thus, y[n] will be zero for n < N0+N2 and for n > N1 + N3, and N4 = N0 + N2, and N5 = N1 + N3.

(b)
N = N3 - N2 + 1. M = N1 - N0 + 1. Nonzero points of y[n] go from N4 to N5, which is N5 - N4 + 1 long, or

N5 - N4 + 1 = (N1 + N3) - (N0 + N2) + 1 = (N1 - N0 +1) + (N3 - N2 +1) -1 = N + M - 1

2.
Problem 2.5
(a)
The characteristic equation is p2 - 5 p + 6 = 0. This has roots p1 = 2, p2 = 3. Thus, the homogenous equation is

yh[n] = C1 2n u[n] + C2 3n u[n]

(b)

h[n] = C1 p1n u[n] + C2 p2n u[n] = C1 2n u[n] + C2 3n u[n]

Thus h[0] = C1 + C2 and h[1] = 2 C1 + 3 C2. You can also find h[n] from the difference equation, where $x[n] = \delta[n]$:

\begin{displaymath}h[0] = 5 h[-1] - 6 h[-2] + 2 \delta[-1] = 0\end{displaymath}


\begin{displaymath}h[1] = 5 h[0] - 6 h[-1] + 2 \delta[0] = 2\end{displaymath}

Thus,

C1 + C2 = 0


2 C1 + 3 C2 = 2

This has the solution C1 = -2 and C2 = 2, so h[n] = -2 (2)n u[n] + 2 (3)n u[n].

(c)
The step response will be

g[n] = C1 p1n u[n] + C2 p2n u[n] + D u[n] = C1 2n u[n] + C2 3n u[n] + D u[n]

Thus, as in (b) g[0] = C1 + C2 + D, g[1] = 2 C1 + 3 C2 + D, and g[2] = 4 C1 + 9 C2 + D.

Also,

g[0] = 5 g[-1] - 6 g[-2] + 2 u[-1] = 0


g[1] = 5 g[0] - 6 g[-1] + 2 u[0] = 2


g[2] = 5 g[1] - 6 g[0] + 2 u[1] = 12

and

C1 + C2 + D = 0


2 C1 + 3 C2 + D = 2


4 C1 + 9 C2 + D = 12

This gives C1 = -4, C2 = 3, and D = 1, so

g[n] = -4 (2)n u[n] + 3 (3)n u[n] + u[n]

(d)
n = 0:20;
h = -2 * 2.^n + 2 * 3.^n;
subplot(211)
stem(n,h)
g = -4 * 2.^n + 3 * 3.^n + (n>=0);
subplot(212)
stem(n,g)

3.
Problem 2.18. An LTI system is causal if its impulse response is 0 for n<0.
(a)
Causal - h[n] turns on at n=0.
(b)
Causal - h[n] turns on at n=1.
(c)
Non-causal - e.g., h[-1] = 1/2
(d)
Non-causal - e.g., h[-1] = 1
(e)
Non-causal - e.g., h[-1] = 1/3

4.
No solution 4.

5.
Since x[n] = u[n] - u[n-10], all values of x[n] are zero except for n = 0 ... 9:

\begin{displaymath}y[n] = x[n] * h[n] = \sum_{k=-\infty}^{\infty}x[k] h[n-k]
= \sum_{k=0}^{9} h[n-k] = \sum_{k=0}^{9} (0.9)^{(n-k)} u[n-k] \end{displaymath}

For n<0, u[n-k] = 0 for all k (since k only goes from 0 to 9), so y[n] = 0 for n<0

For $0 \le n \le 9$, u[n-k] = 1 for k up to n in the sum, so

\begin{displaymath}y[n] = \sum_{k=0}^{n} (0.9)^{(n-k)} = (0.9)^n \sum_{k=0}^{n} ...
...{-1})^{n+1}}{1-(0.9)^{-1}}
= 10 \left[ 1 - (0.9)^{n+1} \right] \end{displaymath}

For n>9, u[n-k] = 1 for all k in the sum (since k only goes up to 9), so

\begin{displaymath}y[n] = \sum_{k=0}^{9} (0.9)^{(n-k)} = (0.9)^n \sum_{k=0}^{9} ...
...}{1-(0.9)^{-1}}
= 10 (0.9)^{n-9} \left[ 1 - (0.9)^{10} \right] \end{displaymath}

Here is a MATLAB program to plot the output:

   n=-5:50;                            
   y=zeros(size(n));                   
   ii=find((n>=0)&(n<=9));             
   y(ii)=10*(1-0.9.^n(ii));            
   ii=find(n>9);                       
   y(ii)=10*0.9.^(n(ii)-9)*(1-0.9^10);
   stem(n,y)

6.
(a)
$h[n] = h[n-1] + h[n-2] + \delta[n-1]$. Using this formula, $h[0] = h[-1] + h[-2] + \delta[-1] = 0$, and $h[1] = h[0] + h[-1] + \delta[0]
= 1$. For n>1, h[n] = h[n-1] + h[n-2]. Thus, the impulse response of the difference equation gives the Fibonacci series.
(b)
The characteristic equation is p2 - p - 1 = 0. This has the roots $p_{1,2} = (1 \pm \sqrt{5})/2$. Thus, yh[n] = C1 p1n u[n] + C2 p2n u[n]. Since N = 2 and M = 1, there are no $\delta$s in the impulse response, and h[n] = C1 p1n u[n] + C2 p2n u[n]. Therefore

h[0] = C1 + C2 = 0


h[1] = C1 p1 + C2 p2 = 1

This gives $C_1 = \sqrt{5}$, and $C_2 = -\sqrt{5}$, and

\begin{displaymath}h[n] = \frac{\sqrt{5}}{5} \left[ \frac{1 + \sqrt{5}}{2} \righ...
...\frac{\sqrt{5}}{5} \left[ \frac{1 - \sqrt{5}}{2} \right]^n u[n]\end{displaymath}



Bill Rison
1999-09-14