[Math] Autocorrelation of heaviside functions

calculuscorrelationsignal processing

I'm trying to find the expression that describes the auto-correlation $r_{xx}(\tau)$ of two heaviside functions $u(t)$. I was told that the result must be $1/2$, which makes total sense, as the power spectral density of the heaviside function must be $\frac{\delta(t)}{2}$ (which can be seen using the Fourier Transform).

This is how I thought it:

$$
r_{xx}(\tau) = <u(t+\tau) \cdot u(t)> = \lim_{T\to\infty} \frac{1}{2T} \int\limits_{-T}^{T} u(t+\tau) \cdot u(t) dt = \lim_{T\to\infty} \frac{1}{2T} \left( \int\limits_{0}^{T}dt + \int\limits_{\tau}^{T}dt \right) = \lim_{T\to\infty} \frac{1}{2T}(T+T-\tau) = \lim_{T\to\infty} \frac{1}{2T} (2T – \tau) = 1 – \lim_{T\to\infty} \frac{\tau}{2T} = 1
$$

What am I missing?

Thanks in advanced.

Best Answer

The last equality in the first line of your equation is wrong. Note that you have

$$u(t)u(t+\tau)=\begin{cases}u(t),&\tau>0\\u(t+\tau),&\tau<0\end{cases}$$

Now compute the integral for both cases ($\tau>0$ and $\tau<0$), and you'll get the desired result.