DSPRelated.com
Forums

Convolution of a signal with the time reversed version of itself

Started by aru_3D March 2, 2012
Hi,

I am somewhat new to the world of DSP and my math skill need a lot of
push-forward. So the question may be fairly basic and the answer is
probably quite simple but I am having a hard time to figure it out.

So say I have a signal x(n) and I want to convolve it with x(-n).
Let's call the operator sum from k = -INF to INF as S.
So if I take the first variable as x(-n) then from the conv. equation the
answer is:

  S(x(-k) * x(n-k))

Now if I take the first variable as x(n) then I get into trouble:

conv(x(n),x(-n))= S(x(k)x(k-n)). 
The way I got the above is as follows: I take p(n) = x(-n).
Then from the conv equation I get:

conv(x(n),x(-n)) = S(x(k)* p(n-k)). Now p(n-k)=x(k-n) (that's what I
think).

Now the two answers can't be different because convolution is commutative
so I am having a hard time to convince myself. anyone put a light on why
they are different and what I am missing here?

Thanks

Also is there any way in this forum to insert mathematical symbols like sum
from -INF to INF etc. I am new to this forum so not sure if copy pasting
from equation editor would work.


On Mar 2, 7:29&#4294967295;am, "aru_3D" <arunavdev@n_o_s_p_a_m.yahoo.com> wrote:
> Hi, > > I am somewhat new to the world of DSP and my math skill need a lot of > push-forward. So the question may be fairly basic and the answer is > probably quite simple but I am having a hard time to figure it out. > > So say I have a signal x(n) and I want to convolve it with x(-n). > Let's call the operator sum from k = -INF to INF as S. > So if I take the first variable as x(-n) then from the conv. equation the > answer is: > > &#4294967295; S(x(-k) * x(n-k)) > > Now if I take the first variable as x(n) then I get into trouble: > > conv(x(n),x(-n))= S(x(k)x(k-n)). > The way I got the above is as follows: I take p(n) = x(-n). > Then from the conv equation I get: > > conv(x(n),x(-n)) = S(x(k)* p(n-k)). Now p(n-k)=x(k-n) (that's what I > think). > > Now the two answers can't be different because convolution is commutative > so I am having a hard time to convince myself. anyone put a light on why > they are different and what I am missing here? > > Thanks > > Also is there any way in this forum to insert mathematical symbols like sum > from -INF to INF etc. I am new to this forum so not sure if copy pasting > from equation editor would work.
I don't understand what your mathematical notation means, and cannot tell you where you are going astray. Convolution of a signal with its time-reversed version is called autocorrelation of the signal. Autocorrelation functions are _even_ functions: R_x[n] = R_x[-n] for all n with a positive peak at the origin: R_x[0] > |R_x[n]| for n not equal to zero except that if x is periodic with period N, then R_x is also periodic with period N. R_x[n] = sum from k = -infinity to +infinity of x[k]x[k-n] = sum from k = -infinity to +infinity of x[k]y[n-k] = x*y where y is defined via y[t] = x[-t], that is, y is the time reverse of x (and so we replaced x[k-n] by y[n-k] in the above. Dilip Sarwate
On 3/2/12 9:23 AM, dvsarwate wrote:
> On Mar 2, 7:29 am, "aru_3D"<arunavdev@n_o_s_p_a_m.yahoo.com> wrote: >> >> Also is there any way in this forum to insert mathematical symbols like sum >> from -INF to INF etc. I am new to this forum so not sure if copy pasting >> from equation editor would work.
have you used LaTeX or the equation syntax at sites like Wikipedia? that's one method (one that i am not fond of for here). i like to use what i call "ASCII math" (in the sense of "ASCII art"). i'll show you...
> > I don't understand what your mathematical notation > means, and cannot tell you where you are going astray. > > Convolution of a signal with its time-reversed > version is called autocorrelation of the signal. > Autocorrelation functions are _even_ functions: > > R_x[n] = R_x[-n] for all n >
R_x means "R sub x". i (and Dilip) like to stick with a convention that's a couple of decades old where discrete functions of time (or lag or frequency) have the independent variable n surrounded by square brackets x[n] or X[k] instead of round parenths as would be the case for continuous-time or continuous-frequency, x(t) or X(f).
> with a positive peak at the origin: R_x[0]> |R_x[n]| > for n not equal to zero except that if x is periodic with > period N, then R_x is also periodic with period N. > > R_x[n] = sum from k = -infinity to +infinity of x[k]x[k-n] >
my ASCII notation here would be this (assuming the reader is using a mono-spaced font): +inf R_x[n] = SUM{ x[k] * x[k-n] } k=-inf
> = sum from k = -infinity to +infinity of x[k]y[n-k] > > = x*y
and, because we use it so for programming languages, i would leave the naked asterisk * for multiplication, not convolution. for convolution, i would jazz it up a little: x (*) y
> where y is defined via y[t] = x[-t], that is, y is the > time reverse of x (and so we replaced x[k-n] by y[n-k] > in the above.
one thing, Dilip, that i would add is that the above definition of auto-correlation doesn't work for periodic x[n] or any other finite-power x[n] (it blows up). to compute the auto-correlation for a finite-power signal, including periodic, would be like: +K R_x[n] = lim 1/(2K+1) * SUM{ x[k] * x[k-n] } K->inf k=-K so, aru_3D, can you read that math sufficiently? using a mono-spaced font? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 02.03.2012 13:29, aru_3D wrote:
> Hi, > > I am somewhat new to the world of DSP and my math skill need a lot of > push-forward. So the question may be fairly basic and the answer is > probably quite simple but I am having a hard time to figure it out. > > So say I have a signal x(n) and I want to convolve it with x(-n). > Let's call the operator sum from k = -INF to INF as S. > So if I take the first variable as x(-n) then from the conv. equation the > answer is: > > S(x(-k) * x(n-k)) > > Now if I take the first variable as x(n) then I get into trouble: > > conv(x(n),x(-n))= S(x(k)x(k-n)). > The way I got the above is as follows: I take p(n) = x(-n). > Then from the conv equation I get: > > conv(x(n),x(-n)) = S(x(k)* p(n-k)). Now p(n-k)=x(k-n) (that's what I > think). > > Now the two answers can't be different because convolution is commutative > so I am having a hard time to convince myself. anyone put a light on why > they are different and what I am missing here?
All all you need to do is to relabel the indices. The first sum equals to \sum_k x(-k) x(n-k) and the second to \sum_k x(k) x(k-n) = \sum_j x(-j) x(-j-n) = \sum_l x(-l+n) x(-l) = \sum_k x(-k) x(n-k) the first is the substitution k -> -j, the second j -> l-n (thus -j = n-l => j+n = l => -l = -n -j ) and the last just renamed l to k. HTHH, Thomas