1
$\begingroup$

Attached is the question 1 part B, solution and my attempt. My attempt seems to be not correct. can someone comment?Question

Solution

Attempt

$\endgroup$
  • $\begingroup$ I'm not familiar with your notation, but you seem to have calculated the cross correlation instead of the convolution. So, mirror $h(n)$ and try again. $\endgroup$ – Max Apr 2 at 6:11
  • $\begingroup$ There are two methods to do DT Convolutions: graphical method of flip & slide. The other is demonstrated above which is numerically for short sequences. $\endgroup$ – Leo Apr 2 at 6:15
  • $\begingroup$ Ok, now I see what you did there. The mistake is that you kind of "wrapped around" $h(n)$. This is wrong. Do not wrap it around, shift it in a linear way and zero-pad it. E.g. the second line of your equation for $y(n)$ should be $\{-1\}\{0,0,0,-1,2,1\} + \{0\}\{0,0,0,0,-1,2,1\}$. Then you should obtain the correct result. $\endgroup$ – Max Apr 2 at 6:54
0
$\begingroup$

To elaborate the point of my comment:

What you did there is a kind of circular convolution, where you thought of the impulse response $h(t)$ as periodic, i.e. the system triggered by $\delta(0)$ would oscillate until infinity. The periodicity is represented by your "wrapping around" the impulse response. The output you calculated is actually just one period of the output signal.

This is different from the linear convolution that the task formulation obviously expects to be applied here. With the linear convolution, the impulse response is thought to be the graph representing $h(n)$ padded by zeros from $-\infty$ to $0$ and from $3$ to $\infty$. Here, if the system is triggered by $\delta(0)$, you would get $h(n)$ and then all zeros to infinity.

$\endgroup$
  • $\begingroup$ Ok. Thanks. I understand that there are other types of convolutions- thanks for clearing that up. I have computed y[n] = {0,0,-2,5,0,-1} for n = -1,0,1,2,3. But that is incorrect. I think because my first term in convolution was [0]{0,-1,2,1,0} and it should be [0]{-1,2,1,0}. So 2 questions: 1) the size of input sequence didn't increase by zero-padding. correct ? 2) the size of the output is larger than the size of x[n] and h[n]. What is the formula for size of output (convolution)? $\endgroup$ – Leo Apr 4 at 2:05
  • $\begingroup$ My convolution is {0,-2,5,0,-1} but that only works out for n = {-1,0,1,2,3}. $\endgroup$ – Leo Apr 4 at 2:14
  • $\begingroup$ There is not really a size, as both the signal an the impulse response go from $-\infty$ to $+\infty$ but I see what you mean. The maximum distance between two non-zero samples in the output signal will be the same distances of both input and response added minus one. $\endgroup$ – Max Apr 4 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.