Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Math Help - Discrete convolution.

  1. #1
    Newbie
    Joined
    Aug 2010
    Posts
    10

    Discrete convolution.

    First of all sorry if this is in the wrong forum.

    Could somebody please help me with my math problem, thanks in advance.

    Yes I understand its will be a long answer so send me a pm if necessary.
    Attached Thumbnails Attached Thumbnails Discrete convolution.-mathproblem.jpg  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    Quote Originally Posted by SanMiguel View Post
    First of all sorry if this is in the wrong forum.

    Could somebody please help me with my math problem, thanks in advance.

    Yes I understand its will be a long answer so send me a pm if necessary.
    discrete convolution is much easier (as for math calculation) than another types (like convolution of analog signals), but when you have convolution of discrete signals it's just multiplication of two signals

    now i assume that you know what is impulse signal ? do you know how to draw that you wrote up there (signals) ? we will start from there
    Last edited by mr fantastic; August 14th 2010 at 02:54 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Aug 2010
    Posts
    10
    Not really sure what your asking but, yes I know what an impulse signal is. Not really sure how to draw it.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    okay
    impulse signal is defined so it's one in n=0 and zero elsewhere so if you have convolution of any signal with impulse signal it will be that same signal but just in place of impulse signal

    if let's say your impulse signal is shifted left or right... let's say to n=2 meaning that delta signal is \delta [n-2] then convolution of any signal x[n] with that impulse signal is going to be that signal but in n=2 , meaning it will be x[n-2] ... (i hope you can conclude how that works)

    convolution can be done by putting one (usually more complex signal) at the spot, so you don't move that one nowhere , and another signal move from -\infty to +\infty) and calculate when they overlap... no need to calculate where one of those two are zero

    i see you have there formula for discrete convolution here are that impulse signal and response of filter on impulse signal, and of course x[n] for which you need to calculate convolution

    do you have idea how to start ? (it's better to understand it, no use if i put all calculation )

    Hint: maybe you know maybe you don't but when shifting one signal, it's shifted for integer (that's one thing which is easier with discrete convolution, you have here sum of products, but in convolution of analog signals you have to solve a lot of integrals )

    try

    P.S. you don't need to draw this but i did it so you can see what that convolution actually do
    that what you have there is periodical discrete convolution

    sorry fot that delta(t) , instead of every "t" on the drawing it should say "n" sorry again
    Attached Thumbnails Attached Thumbnails Discrete convolution.-signals.jpg  
    Last edited by yeKciM; August 15th 2010 at 03:07 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    here is one quick example of periodical discrete convolution

    let's say we have

    x_p[k]=k for 0<k<3

    h_p[k]=1 for k=0,1
    h_p[k]=-1 for k=2,3

    with K_0=4 which is basic period

    first look at the sequences x_p[m] we will put stationary. h_p[m] we will be moving so we need to draw h_p[-m] and then move that sequence from left to right and at the end you see result as y[m] and y_p[m]

    this is calculating part

    \displaystyle y[0]=\sum_{m=0} ^3 x[m]h \cdot [-m]=x[0] \cdot h[1]+x[1] \cdot h[-1]+x[2] \cdot h[-1] +x[3] \cdot h[1]=0

    \displaystyle y[1]=\sum_{m=0} ^3 x[m]h \cdot [1-m]=x[0] \cdot h[1]+x[1] \cdot h[1]+x[2] \cdot h[-1] +x[3] \cdot h[-1]=-4

    \displaystyle y[2]=\sum_{m=0} ^3 x[m]h \cdot [2-m]=x[0] \cdot h[-1]+x[1] \cdot h[1]+x[2] \cdot h[1] +x[3] \cdot h[-1]=0

    \displaystyle y[3]=\sum_{m=0} ^3 x[m]h \cdot [3-m]=x[0] \cdot h[-1]+x[1] \cdot h[-1]+x[2] \cdot h[1] +x[3] \cdot h[1]=4

    sorry for graph 7 it says x_p[m]\cdot h_p[2-m] and it should say x_p[m]\cdot h_p[3-m] sorry

    there's example of discrete convolution, but if you notice this example is periodical discrete convolution, something like problem that you have
    Attached Thumbnails Attached Thumbnails Discrete convolution.-dicreteconvolution.jpg  
    Last edited by yeKciM; August 15th 2010 at 03:02 PM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Aug 2010
    Posts
    10
    \displaystyle y[0]=\sum_{m=0} ^3 x[m]h \cdot [-m]=x[0] \cdot h[1]+x[1] \cdot h[-1]+x[2] \cdot h[-1] +x[3] \cdot h[1]=0

    \displaystyle y[1]=\sum_{m=0} ^3 x[m]h \cdot [1-m]=x[0] \cdot h[1]+x[1] \cdot h[1]+x[2] \cdot h[-1] +x[3] \cdot h[-1]=-4

    \displaystyle y[2]=\sum_{m=0} ^3 x[m]h \cdot [2-m]=x[0] \cdot h[-1]+x[1] \cdot h[1]+x[2] \cdot h[1] +x[3] \cdot h[-1]=0

    \displaystyle y[3]=\sum_{m=0} ^3 x[m]h \cdot [3-m]=x[0] \cdot h[-1]+x[1] \cdot h[-1]+x[2] \cdot h[1] +x[3] \cdot h[1]=4



    So is this the answer then? Should there not be y4 and y5 etc?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    Quote Originally Posted by SanMiguel View Post
    \displaystyle y[0]=\sum_{m=0} ^3 x[m]h \cdot [-m]=x[0] \cdot h[1]+x[1] \cdot h[-1]+x[2] \cdot h[-1] +x[3] \cdot h[1]=0

    \displaystyle y[1]=\sum_{m=0} ^3 x[m]h \cdot [1-m]=x[0] \cdot h[1]+x[1] \cdot h[1]+x[2] \cdot h[-1] +x[3] \cdot h[-1]=-4

    \displaystyle y[2]=\sum_{m=0} ^3 x[m]h \cdot [2-m]=x[0] \cdot h[-1]+x[1] \cdot h[1]+x[2] \cdot h[1] +x[3] \cdot h[-1]=0

    \displaystyle y[3]=\sum_{m=0} ^3 x[m]h \cdot [3-m]=x[0] \cdot h[-1]+x[1] \cdot h[-1]+x[2] \cdot h[1] +x[3] \cdot h[1]=4



    So is this the answer then? Should there not be y4 and y5 etc?


    that is for my example that i give there and no there is no need for calculating for y4,y5 ... because your basic period is 4... and as any periodical function, it repeat it self afterwards for any mK (where m is any positive integer,and K basic period )

    your convolution have bigger period show what have you done there
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Aug 2010
    Posts
    10
    Im afraid im still a bit lost with this
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    Quote Originally Posted by SanMiguel View Post
    Im afraid im still a bit lost with this
    that there what i have done calculating is just example (not based on your values) so you can do yours and post it, and say (if there is) where is the problem that you have where do you get lost ?

    P.S. i can do one more example more similar to your problem (of convolution two sequences that are not periodical ) i'm not going to do yours but i'm willing to help you understand it in your head
    Last edited by yeKciM; August 16th 2010 at 02:28 PM.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Aug 2010
    Posts
    10
    Maybe if you could do the first bit I could pick it up from there, hopefully.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    Quote Originally Posted by SanMiguel View Post
    Maybe if you could do the first bit I could pick it up from there, hopefully.
    first of all you must know something about discrete convolution (convolution sum)

    x[k]*h[k]=h[k]*x[k]

    x[k]*(h_1[k]+h_2[k])=x[k]h_1[k]+x[k]h_2[k]

    x[k]*(h_1[k]*h_2[k])=(x[k]*h_1[k])*h_2[k]

    x[k]*h[k]=y[k] \Rightarrowx[k-m]*h[k-n]=y[k-m-n]

    x[k]*\delta [k] = x[k] \Rightarrow x[k]*\delta [k-m] = x[k-m]


    now after that said, let's do one (not that which you have to do, but it's the same as that one, just smaller and you can pick up from there... yours can be done at the same way but that will you do and we will see did you get it right )



    we have two sequences (finite) and we have to calculate convolution of those two sequences... sequences are :

    x[k]=\left\{\begin{matrix}<br />
2 &,\; 0\le k \le 2\\ <br />
0 &,\; elsewhere <br />
\end{matrix}\right.

    h[k]=\left\{\begin{matrix}<br />
 k+1&,\; 0\le k \le 4\\ <br />
 0&,\; elsewhere<br />
\end{matrix}\right.

    so we have convolution (discrete convolution) :

    \displaystayle y[n]= \sum _{k=0} ^{N-1} h_k x_{n-k} = \sum _{k=0} ^{N-1} x_k h_{n-k}

    as you see it's the same. never mind which one you will move

    first step (i'll again do it like that one before so you can see what and why is that like it is) you will change x[k] and h[k] to x[m] and h[m] and sketch how they look like (yours have just values "1" and "-1" not like this one )

    Discrete convolution.-representation_of_x_and_h.jpg

    there you have how do they look

    now we will decide which one will we move ? (doesn't matter which one you chose) I'll put x[m] to be stationary and flip h[m] to h[-m] (meaning that any value for h[2] will be now in the h[-2] and so on... ) now we will move that sequence for chosen value of "k". in this case it's k=3... (that's something you must know from theoretical knowledge )after doing that h[-m] and shifted h[k-m] will look like this

    Discrete convolution.-afterflip_and_shifting.jpg


    third step is represents multiplying sequences x[m]h[k-m] and calculating sum \displaystayle  \sum _{m= -\infty} ^{+\infty}  x[m] h[k-m] product of that is given on the next image


    Discrete convolution.-moving_h_.jpg


    - overlapping sequences x[m] and h[k-m], will be different for different values of k.
    - sequences will not overlap for k<0
    - all products for k<0 will be zero. overlap begins for k=2, and for 0\le k \le 2 we have partially overlapping of sequences.


    for 0\le k \le 2 convolution sum is :


    y[k]=\displaystyle \sum_{m=0} ^k x[m]h[k-m] = \sum_{m=0} ^k 2\cdot h[k-m+1]
    \displaystayle =2(k+1)  \sum_{m=0} ^k 1 - 2\sum_{m=0} ^k m

    \displaystayle = 2(k+1)^2 - 2\sum_{m=0} ^k m

    \displaystayle = 2(k+1)^2 - 2 \frac {k(k+1)}{2}

    \displaystayle =k^2+3k+2



    if we now increase "k" so 2\le k \le 4 and we have

     y[k]=\displaystyle \sum_{m=0} ^2 x[m]h[k-m]  =\sum_{m=0} ^2 2(k-m+1)

    \displaystayle = 2(k+1) \sum_{m=0} ^2 1 - 2 \sum_{m=0} ^2 m

    \displaystayle = 6(k+1)-6 = 6k



    more increasing of "k" we will have 5\le k \le 6

    \displaystayle y[k] = \sum_{m=k-4} ^2 x[m]h[k-m] =\sum_{m=k-4} ^2 2(k-m+1)

    \displaystayle  =2(k+1) \sum_{m=k-4} ^2 1 -2\sum_{m=k-4} ^2 m

    \displaystayle  =2(k+1)(7-k) -(7-k)(k-2) = -k^2 +3k+28


    for k>6 there is no overlapping so y[k]=0


    now you have solution :

    y[k] = \left\{\begin{matrix}<br />
0 &, \;\; k<0\\ <br />
 k^2+3k+2&, \;\; 0\le k \le 2\\ <br />
 6k&, \;\;  2\le k \le 4\\ <br />
 -k^2+3k+17& , \;\; 5\le k \le 6 \\<br />
0 & , \;\; k>6<br />
\end{matrix}\right.
    Last edited by yeKciM; August 17th 2010 at 12:50 PM.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Aug 2010
    Posts
    10
    Yes I have an example similar to yours with the answer. The main problem is how I use my numbers (+1, -1 ect) in it. So if I was to know the first line, I would propably be able to do it.
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    Quote Originally Posted by SanMiguel View Post
    Yes I have an example similar to yours with the answer. The main problem is how I use my numbers (+1, -1 ect) in it. So if I was to know the first line, I would propably be able to do it.
    hm... how does it's "main problem" is using "your" numbers (+1 and -1 ) ?!?!?!?!?!
    On two examples i showed to you principles of how do you do discrete convolution. I don't see how can it be any (much) different, yes it's different your problem is much easier

    show what you have done....
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    Aug 2010
    Posts
    10
    ok, Ive had a go. I did it on a word document and cant get it on here so I will just put the basics so you can understand them.

    y0=h0x0

    y0=1

    ________

    y1=h0x1+h1x0

    y1= (+1*+1) + (+1*-1)

    y1=0

    ________

    y2= h0x2+h1x1+h2x2

    y2= (+1*-1) + (+1*+1)+(+1*-1)

    y2= -1

    ________

    k 0 1 2 3 4 5 6
    hk +1 +1 +1 -1 -1 +1 -1
    xk -1 +1 -1 -1 +1 +1 +1


    Got my values from the table I made above

    only done the first 3 values of y as I wasnt sure I was doing it right. Am I?

    If it makes it easier I could email you the word document?

    I couldn't get on this website yesterday for some reason.

    Ps. I really need the answer to this by Sunday at the latest.
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Senior Member yeKciM's Avatar
    Joined
    Jul 2010
    Posts
    456
    yes your are going really good

     y[0] = -1
     y[1] = 0
     y[2]= -1
     y[3] = 0
     y[4] = -1
     y[5] = 0
    ............

    your solutions will be in interval from y[0] to y[12]  because from y[0] to  y[6]  your let's say "h" will be entering in "x" so at  y[6]  he will be overlap totally but then he starts to exiting so you have six more
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. Convolution
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: June 14th 2011, 05:09 PM
  2. Discrete Time Convolution Integral
    Posted in the Advanced Applied Math Forum
    Replies: 1
    Last Post: April 20th 2011, 01:00 PM
  3. Discrete convolution
    Posted in the Calculus Forum
    Replies: 3
    Last Post: November 8th 2010, 02:34 AM
  4. convolution help
    Posted in the Calculus Forum
    Replies: 7
    Last Post: July 16th 2008, 07:25 AM
  5. Discrete Convolution confusion
    Posted in the Advanced Applied Math Forum
    Replies: 5
    Last Post: December 25th 2007, 09:22 AM

Search Tags


/mathhelpforum @mathhelpforum