## Pages

### Cross Correlation Vs Shifted Correlation

Orthogonal Multi-Carrier Modulation

Wireless Communication standards transmit a known preamble signal for packet detection, Carrier frequency offset (CFO) and Sample frequency offset (SFO) estimation and Time synchronization. Preamble detection can be done either through a Cross-Correlation operation with a copy of known preamble signal or Shifted-Correlation operation on the received signal. Though Cross-Correlation operation is superior in detecting the exact preamble, Shifted-Correlation operation shows superior performance in CFO and SFO estimation

Transmitted Signal $S(n)$ $$S(n) = G_N(n\bmod{N}) ~~~~~n~=~0,1,2,...$$

Multiple repetitions of signal $G_N$ is transmitted during preamble duration. Ignoring sampling time $T_s$ in the equations

Channel Convolved Signal $R(n)$ $$R(n) = \sum_{k=0}^{L-1} h(k) S(n-k) ~~~~~n~=~0,1,2,...$$
Demodulated Signal $Y(n)$ with CFO $\Delta f$ and SFO $\tau$ $$\begin{split} Y(n) &= R\left(n -n\tau\right) e^{j2\pi\frac{\Delta f}{F_s} n} e^{-j2\pi\Delta f n \tau} ~~~~~n~=~0,1,2,... \\ &= \sum_{k=0}^{L-1} h\left(k\right) S\left(n-n\tau-k\right) e^{j2\pi\frac{\Delta f}{F_s} n} e^{-j2\pi\Delta f n \tau} \\ &= \sum_{k=0}^{L-1} h\left(k\right) G_N\left(\lfloor n - n\tau - k\rfloor \bmod{N}\right) e^{j2\pi\frac{\Delta f}{F_s} n} e^{-j2\pi\Delta f n \tau} \end{split}$$
$Z_1(n)$, Cross Correlation of $Y(n)$ with $G_N$ $$\begin{split} Z_1(n) &= \sum_{m=0}^{N-1} Y(n+m) G_N(m\bmod{N}) ~~~~~n~=~0,1,2,... \\ &= \sum_{m=0}^{N-1} \left[\sum_{k=0}^{L-1} h\left(k\right) G_N\left(\lfloor p - p\tau - k\rfloor \bmod{N}\right) e^{j2\pi\frac{\Delta f}{F_s} p} e^{-j2\pi\Delta f p \tau}\right] G_N(m\bmod{N}) ~~~~~p~=~n+m, \\ &= \sum_{k=0}^{L-1} h\left(k\right) \left[\sum_{m=0}^{N-1} G_N\left(\lfloor p - p\tau - k\rfloor \bmod{N}\right) G_N(m\bmod{N}) e^{j2\pi\frac{\Delta f}{F_s} p} e^{-j2\pi\Delta f p \tau}\right] \\ &= \sum_{k=0}^{L-1} h\left(k\right) \left[\sum_{m=0}^{N-1} C_N\left(\left(n-k\right)\bmod{N}\right) e^{j2\pi\frac{\Delta f}{F_s} p} e^{-j2\pi\Delta f p \tau}\right] \\ \end{split}$$
$Z_2(n)$, N-Sample Shift Cross Correlation of $Y(n)$ $$\begin{split} Z_2(n) &= \sum_{m=0}^{N-1} Y(n+m) Y^*(n+m+N) ~~~~~n~=~0,1,2,... \\ &= \left\{ \begin{split} & \sum_{m=0}^{N-1} \left[\sum_{k=0}^{L-1} h\left(k\right) G_N\left(\left( p - k\right) \bmod{N}\right) \right] \\ & \left[\sum_{k=0}^{L-1} h\left(k\right) G_N\left(\left( p - k + N\right) \bmod{N}\right) \right]^* e^{-j2\pi\frac{\Delta f}{F_s} N} e^{j2\pi\Delta f N \tau} ~~~~~p~=~n+m \end{split} \right. \\ &= \sum_{m=0}^{N-1} \left\lvert \sum_{k=0}^{L-1} h\left(k\right) G_N\left(\left( p - k\right) \bmod{N}\right) \right\rvert^{2} e^{-j2\pi\frac{\Delta f}{F_s} N} e^{j2\pi\Delta f N \tau} \\ \end{split}$$