Average and autocorrelation of $\sum_{k=-\infty}^{+ \infty} (-1)^{k+1}\delta(t-kT)$

averagesignal processing

I was trying to calculate the average and the autocorrelation of this periodic signal:

$X(t) = \sum_{k=-\infty}^{+ \infty} (-1)^{k+1}\delta(t-kT)$

I think that $E[X(t)]$ should be $0$ because the signal is basically made by alternating a positive and a negative Dirac $\delta$.

I found that period is $2T$. But if I calculate $E[X(t)]$ in $[-T;+T]$ i find two positive deltas and a negative one so $E[X(t)]=+1$ . In $[0,+2T]$ two negative ones and one positive so $E[X(t)]=-1$. But the average must be equal in every interval with $2T$ length. Where I am wrong?

For the correlation, I would calculate it using:

$E[X(t)]=P_0$ where $P_0$ is a Fourier coefficient.

Then: $E[X(t)X(t-\tau)] = \sum |{P_k^2}| e^{j2\pi nf_ot}$

But I can't find a proper way to calculate the $P_k$ Fourier Coefficients

Best Answer

By integrating over a closed interval, you have an overlap on the interval borders for successive intervals; for example, $[0;2T]\cap[2T;4T] = \{2T\} \ne \emptyset$. Normally this doesn't matter, as the value of a function at one point doesn't affect the integral, but when using the delta distribution, you have to be careful about this.

So you have to integrate either over $[-T;+T)$ or over $(-T;+T]$, and similarly either over $[0;2T)$ or over $(0;2T]$. When doing so, you'll find in both cases that there are only two delta peaks in that interval.

On the autocorrelation part, you have the additional problem that the delta distribution is not square integrable. However, you can still calculate the expectation value as distribution, using the formula $$\int \delta(x-a)\,\delta(x-b)\,\mathrm dx = \delta(a-b)$$ as long as $a$ and $b$ are in the set you integrate over (otherwise the integral just is zero).

Thus we have for $0\le\tau<T$ (using the interval $[0;2T)$ for integration): $$\begin{aligned} E[X(t)X(t-\tau)] &= \int_{[0;2T)} \left(\sum_k (-1)^{k+1} \delta(t-kT)\right) \left(\sum_l (-1)^{l+1} \delta(t-\tau - lT)\right)\,\mathrm dt\\ &= 2\delta(\tau)-\delta(\tau+T)-\delta(\tau-T) \end{aligned}$$ where the main part is to determine for which $k,l$ the peaks are inside the interval. For $\tau$ in other ranges similar results should occur.

Now having this distribution form, doing the Fourier transform shouldn't be too hard to do.

Related Question