Suppose that I have two signals $x[n] = \left\{2,4,1\right\}$ and $p[n] = \left\{5,1,8\right\}$ and I want to multiply them.
- How do you do that?
- How different is it from convolving two signals?
I understand that multiplication in one domain is equal to convolution in other domain. How do you choose as to what to use : multiplication or convolution?
Answer
Yes, you are correct. Multiplication in time domain means convolution in frequency domain and vice versa. Multiplying your signals $x[n]$ and $y[n]$ will give an output:
\begin{align} z[n]&=\{2\cdot 5, 4\cdot 1, 1\cdot 8\}\\ &= \{10, 4, 8\}\end{align}
Remember that this output is in time domain. When you convolve $x[n]$ and $y[n]$, you will get $z[n]$ in time domain as:
\begin{align} z[n]&=\{5\cdot 2, 5\cdot 4+1\cdot 2, 5\cdot 1+1\cdot 4+8\cdot 2, 1\cdot 1+8\cdot 4, 8\cdot 1\}\\ &= \{10,22,25,33,8\} \end{align}
Just flip one of the signals around zero and start moving right one place at a time. Multiply the corresponding points as you go along. The output has a larger sequence because convolution output has ${\rm length}(x)+{\rm length}(y)-1$ points.
To answer your query about where to use multiplication & convolution, assume you want to pass signal $x(n)$ through filter $y(n)$. The output of the filter $z(n)$ will be convolution of $x(n)$ and $y(n)$.
Now assume that you first converted from time to frequency domain, i.e. $X(e^{i\omega})$ and $Y(e^{i\omega})$ are frequency domain representation of $x(n)$ and $y(n)$. Now, to find $Z(e^{i\omega})$(output in frequency domain), you have to multiply $X(e^{i\omega})$ and $Y(e^{i\omega})$. To get the output in time domain i.e. $z(n)$ you have to apply inverse transform.
So that's how you use convolution and multiplication.
No comments:
Post a Comment