Final Note

I hope the cross-correlation equations of a real periodic signal are now clear, as promised.

Discrete-time signal:

Rxy[l]=n=lN1x[n]y[nl]

Continuous-time signal:

Rxy(τ)=1TT/2T/2f(t)g(tτ)dt

In some textbooks, you may encounter different definitions where k and τ appear with a plus sign:

Rxy[l]=n=kN1x[n]y[n+l]
Rxy(τ)=1TT/2T/2f(t)g(t+τ)dt

The difference in the definitions of cross-correlation comes down to the conventions and contexts in which they are used. Both definitions are valid but emphasize different perspectives on how the signals are aligned and shifted.

The first definition, g(tτ), implies looking at how the signal g(t) would need to be delayed to match f(t).

The second definition, g(t+τ), implies looking at how g(t) would need to be advanced to match f(t).

We used the first definition that is commonly used in signal processing and engineering. Here, τ represents the time lag by which g(t) is shifted to the right.

The second definition is often found in mathematics and statistics. In this case, τ represents the time shift by which g(t) is shifted to the left.

In signal processing and electrical engineering, the first definition is prevalent because it aligns with the typical practice of shifting the second signal to compare it with the first.

The second definition might be used more frequently in mathematics, statistics, and some theoretical contexts.