m (Corrected from H(0,v) = 2(1+cos(v)) to 1/2(1+cos(v))) |
|||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Category:HW11ECE438F13]][[Category:HW11ECE438F13]][[Category:HW11ECE438F13]][[Category:HW11ECE438F13]][[Category:HW11ECE438F13]] | [[Category:HW11ECE438F13]][[Category:HW11ECE438F13]][[Category:HW11ECE438F13]][[Category:HW11ECE438F13]][[Category:HW11ECE438F13]] | ||
− | = | + | ==Question 1== |
+ | a) | ||
− | + | <math>\begin{align} | |
+ | f(x,y)&=\frac{ e^{j 2\pi x} \sin(\pi y)}{y} \\ | ||
+ | &= \pi \frac{ e^{j 2\pi x} \sin(\pi y)}{\pi y} \\ | ||
+ | &= \pi e^{j 2\pi x} sinc(y) \\ | ||
+ | &=h(x)g(y) | ||
+ | \end{align}</math> | ||
+ | <math>\begin{align} | ||
+ | F(u,v)&=H(u)G(v) \\ | ||
+ | &= \pi \frac{ e^{j 2\pi x} \sin(\pi y)}{\pi y} \\ | ||
+ | &= \pi \delta(u-x)rect(v) | ||
+ | \end{align}</math> | ||
+ | |||
+ | b) | ||
+ | |||
+ | <math>\begin{align} | ||
+ | f(x,y)&=rect(x-x_0) \\ | ||
+ | &= rect(x-x_0) \cdot 1\\ | ||
+ | &=h(x)g(y) | ||
+ | \end{align}</math> | ||
+ | |||
+ | <math>\begin{align} | ||
+ | F(u,v)&=H(u)G(v) \\ | ||
+ | &= sinc(u) e^{-j 2\pi x_0} \delta(v)\\ | ||
+ | \end{align}</math> | ||
+ | |||
+ | c) | ||
+ | |||
+ | <math>\begin{align} | ||
+ | f(x,y)&=cos(\pi x) \\ | ||
+ | &= cos(\pi x) \cdot 1\\ | ||
+ | &=h(x)g(y) | ||
+ | \end{align}</math> | ||
+ | |||
+ | <math>\begin{align} | ||
+ | F(u,v)&=H(u)G(v) \\ | ||
+ | &= \frac{1}{2} [\delta (u-\frac{1}{2})+\delta (u+\frac{1}{2})] \delta(v)\\ | ||
+ | \end{align}</math> | ||
+ | ---- | ||
+ | ==Question 2== | ||
+ | a) | ||
+ | |||
+ | <math> | ||
+ | \begin{align} | ||
+ | y[m,n] =& -\frac{1}{8}x[m+1,n-1] + \frac{1}{2}x[m,n-1] - \frac{1}{8}x[m-1,n-1] \\ | ||
+ | & -\frac{1}{4}x[m+1,n] + x[m,n] -\frac{1}{4}x[m,n-1] \\ | ||
+ | & -\frac{1}{8}x[m+1,n+1] + \frac{1}{2}x[m,n+1] -\frac{1}{8}x[m-1,n+1] | ||
+ | \end{align}</math> | ||
+ | |||
+ | b) Yes. The coefficient matrix of h[m,n] can be written as product of two vectors. | ||
+ | |||
+ | <math> | ||
+ | \begin{pmatrix} | ||
+ | -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \\ | ||
+ | -\frac{1}{4} & 1 & -\frac{1}{4} \\ | ||
+ | -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} | ||
+ | \end{pmatrix} = | ||
+ | \begin{pmatrix} | ||
+ | \frac{1}{2} \\ | ||
+ | 1 \\ | ||
+ | \frac{1}{2} | ||
+ | \end{pmatrix} \cdot | ||
+ | \begin{pmatrix} | ||
+ | -\frac{1}{4} & 1 & -\frac{1}{4} | ||
+ | \end{pmatrix} | ||
+ | </math> | ||
+ | |||
+ | Therefore the filter can be separate into two 1-D filters. | ||
+ | |||
+ | <math>h_1[m] = -\frac{1}{4}\delta[m+1] + \delta[m] -\frac{1}{4}\delta[m-1]</math> | ||
+ | |||
+ | <math>h_2[n] = \frac{1}{2}\delta[n+1] + \delta[n] +\frac{1}{2}\delta[n-1]</math> | ||
+ | |||
+ | c) | ||
+ | |||
+ | <math>H_1(\mu) = DTFT\{h_1[m]\} = -\frac{1}{4}e^{-j\mu(-1)} + e^{-j\mu(0)} -\frac{1}{4}e^{-j\mu(1)} = 1-\frac{1}{2}cos\mu</math> | ||
+ | |||
+ | <math>H_2(\nu) = DTFT\{h_2[n]\} = \frac{1}{2}e^{-j\nu(-1)} + e^{-j\nu(0)} +\frac{1}{2}e^{-j\nu(1)} = 1+cos\nu</math> | ||
+ | |||
+ | Using the separability, | ||
+ | |||
+ | <math>H(\mu, \nu) = DSFT\{ h[m,n]\} = H_1(\mu)\cdot H_2(\nu) = (1-\frac{1}{2}cos\mu)(1+cos\nu)</math> | ||
+ | |||
+ | <math>H(\mu, 0) = 2(1-\frac{1}{2}cos\mu)</math> | ||
+ | |||
+ | [[Image:HW8Q1fig1.jpg]] | ||
+ | |||
+ | <math>H(0, \nu) = \frac{1}{2}(1+cos\nu)</math> | ||
+ | |||
+ | [[Image:HW8Q1fig2.jpg]] | ||
+ | |||
+ | d) | ||
+ | |||
+ | <math>\begin{array}{cccccccccccc} | ||
+ | 0 & 0 & 0 & 0 & -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} & 0 & 0 & 0& 0 \\ | ||
+ | 0 & 0 & 0 & -\frac{1}{8} & \frac{1}{8} & \frac{10}{8} & \frac{1}{8} & -\frac{1}{8} & 0 & 0 & 0 \\ | ||
+ | 0 & 0 & -\frac{1}{8} & \frac{1}{8} & \frac{7}{8} & \frac{10}{8} & \frac{7}{8} & \frac{1}{8} & -\frac{1}{8} & 0 & 0 \\ | ||
+ | 0 & -\frac{1}{8} & \frac{1}{8} & \frac{7}{8} & \frac{9}{8} & 1 & \frac{9}{8} & \frac{7}{8} & \frac{1}{8} & -\frac{1}{8} & 0 \\ | ||
+ | -\frac{1}{8} & \frac{1}{8} & \frac{7}{8} & \frac{9}{8} & 1 & 1 & 1 & \frac{9}{8} & \frac{7}{8} & \frac{1}{8} & -\frac{1}{8} \\ | ||
+ | -\frac{3}{8} & 1 & \frac{9}{8} & 1 & 1 & 1 & 1 & 1 & \frac{9}{8} & 1 & -\frac{3}{8} \\ | ||
+ | -\frac{1}{2} & \frac{3}{2} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \frac{3}{2} & -\frac{1}{2} \\ | ||
+ | -\frac{1}{2} & \frac{3}{2} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \frac{3}{2} & -\frac{1}{2} \\ | ||
+ | -\frac{1}{2} & \frac{3}{2} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \frac{3}{2} & -\frac{1}{2} \\ | ||
+ | -\frac{3}{8} & \frac{9}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{9}{8} & -\frac{3}{8} \\ | ||
+ | -\frac{1}{8} & \frac{3}{8} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{3}{8} & -\frac{1}{8} | ||
+ | \end{array}</math> | ||
+ | ---- | ||
[[ HW11ECE438F13|Back to HW11ECE438F13]] | [[ HW11ECE438F13|Back to HW11ECE438F13]] |
Latest revision as of 23:11, 10 December 2013
Question 1
a)
$ \begin{align} f(x,y)&=\frac{ e^{j 2\pi x} \sin(\pi y)}{y} \\ &= \pi \frac{ e^{j 2\pi x} \sin(\pi y)}{\pi y} \\ &= \pi e^{j 2\pi x} sinc(y) \\ &=h(x)g(y) \end{align} $
$ \begin{align} F(u,v)&=H(u)G(v) \\ &= \pi \frac{ e^{j 2\pi x} \sin(\pi y)}{\pi y} \\ &= \pi \delta(u-x)rect(v) \end{align} $
b)
$ \begin{align} f(x,y)&=rect(x-x_0) \\ &= rect(x-x_0) \cdot 1\\ &=h(x)g(y) \end{align} $
$ \begin{align} F(u,v)&=H(u)G(v) \\ &= sinc(u) e^{-j 2\pi x_0} \delta(v)\\ \end{align} $
c)
$ \begin{align} f(x,y)&=cos(\pi x) \\ &= cos(\pi x) \cdot 1\\ &=h(x)g(y) \end{align} $
$ \begin{align} F(u,v)&=H(u)G(v) \\ &= \frac{1}{2} [\delta (u-\frac{1}{2})+\delta (u+\frac{1}{2})] \delta(v)\\ \end{align} $
Question 2
a)
$ \begin{align} y[m,n] =& -\frac{1}{8}x[m+1,n-1] + \frac{1}{2}x[m,n-1] - \frac{1}{8}x[m-1,n-1] \\ & -\frac{1}{4}x[m+1,n] + x[m,n] -\frac{1}{4}x[m,n-1] \\ & -\frac{1}{8}x[m+1,n+1] + \frac{1}{2}x[m,n+1] -\frac{1}{8}x[m-1,n+1] \end{align} $
b) Yes. The coefficient matrix of h[m,n] can be written as product of two vectors.
$ \begin{pmatrix} -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \\ -\frac{1}{4} & 1 & -\frac{1}{4} \\ -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ 1 \\ \frac{1}{2} \end{pmatrix} \cdot \begin{pmatrix} -\frac{1}{4} & 1 & -\frac{1}{4} \end{pmatrix} $
Therefore the filter can be separate into two 1-D filters.
$ h_1[m] = -\frac{1}{4}\delta[m+1] + \delta[m] -\frac{1}{4}\delta[m-1] $
$ h_2[n] = \frac{1}{2}\delta[n+1] + \delta[n] +\frac{1}{2}\delta[n-1] $
c)
$ H_1(\mu) = DTFT\{h_1[m]\} = -\frac{1}{4}e^{-j\mu(-1)} + e^{-j\mu(0)} -\frac{1}{4}e^{-j\mu(1)} = 1-\frac{1}{2}cos\mu $
$ H_2(\nu) = DTFT\{h_2[n]\} = \frac{1}{2}e^{-j\nu(-1)} + e^{-j\nu(0)} +\frac{1}{2}e^{-j\nu(1)} = 1+cos\nu $
Using the separability,
$ H(\mu, \nu) = DSFT\{ h[m,n]\} = H_1(\mu)\cdot H_2(\nu) = (1-\frac{1}{2}cos\mu)(1+cos\nu) $
$ H(\mu, 0) = 2(1-\frac{1}{2}cos\mu) $
$ H(0, \nu) = \frac{1}{2}(1+cos\nu) $
d)
$ \begin{array}{cccccccccccc} 0 & 0 & 0 & 0 & -\frac{1}{8} & \frac{1}{2} & -\frac{1}{8} & 0 & 0 & 0& 0 \\ 0 & 0 & 0 & -\frac{1}{8} & \frac{1}{8} & \frac{10}{8} & \frac{1}{8} & -\frac{1}{8} & 0 & 0 & 0 \\ 0 & 0 & -\frac{1}{8} & \frac{1}{8} & \frac{7}{8} & \frac{10}{8} & \frac{7}{8} & \frac{1}{8} & -\frac{1}{8} & 0 & 0 \\ 0 & -\frac{1}{8} & \frac{1}{8} & \frac{7}{8} & \frac{9}{8} & 1 & \frac{9}{8} & \frac{7}{8} & \frac{1}{8} & -\frac{1}{8} & 0 \\ -\frac{1}{8} & \frac{1}{8} & \frac{7}{8} & \frac{9}{8} & 1 & 1 & 1 & \frac{9}{8} & \frac{7}{8} & \frac{1}{8} & -\frac{1}{8} \\ -\frac{3}{8} & 1 & \frac{9}{8} & 1 & 1 & 1 & 1 & 1 & \frac{9}{8} & 1 & -\frac{3}{8} \\ -\frac{1}{2} & \frac{3}{2} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \frac{3}{2} & -\frac{1}{2} \\ -\frac{1}{2} & \frac{3}{2} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \frac{3}{2} & -\frac{1}{2} \\ -\frac{1}{2} & \frac{3}{2} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & \frac{3}{2} & -\frac{1}{2} \\ -\frac{3}{8} & \frac{9}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{6}{8} & \frac{9}{8} & -\frac{3}{8} \\ -\frac{1}{8} & \frac{3}{8} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & \frac{3}{8} & -\frac{1}{8} \end{array} $