# Carrier frequency offset

Carrier frequency offset (CFO) is one of many non-ideal conditions that may affect in baseband receiver design. In designing a baseband receiver, we should notice not only the degradation invoked by non-ideal channel and noise, we should also regard RF and analog parts as the main consideration. Those non-idealities include sampling clock offset, IQ imbalance, power amplifier, phase noise and carrier frequency offset nonlinearity.
Carrier frequency offset often occurs when the local oscillator signal for down-conversion in the receiver does not synchronize with the carrier signal contained in the received signal. This phenomenon can be attributed to two important factors: frequency mismatch in the transmitter and the receiver oscillators; and the Doppler effect as the transmitter or the receiver is moving.
When this occurs, the received signal will be shifted in frequency. For an OFDM system, the orthogonality among sub carriers is maintained only if the receiver uses a local oscillation signal that is synchronous with the carrier signal contained in the received signal. Otherwise, mismatch in carrier frequency can result in inter-carrier interference (ICI). The oscillators in the transmitter and the receiver can never be oscillating at identical frequency. Hence, carrier frequency offset always exists even if there is no Doppler effect.
A standard-compliant communication system usually requires oscillators to have a small enough tolerance and thus bounds CFO. For example, IEEE 802.11 WLAN specifies the oscillator precision tolerance to be less than ±20 ppm, so that CFO is in the range from -40 ppm to +40 ppm.

## Example

If the TX oscillator runs at a frequency that is 20 ppm above the nominal frequency and if the RX oscillator is running at 20 ppm below, then the received baseband signal will have a CFO of 40 ppm. With a carrier frequency of 5.2 GHz in this standard, the CFO is up to ±208 kHz. In addition, if the transmitter or the receiver is moving, the Doppler effect adds some hundreds of hertz in frequency spreading.
Compared to the CFO resulting from the oscillator mismatch, the Doppler effect in this case is relatively minor.

## Effects of synchronization error

Given a carrier frequency offset,Δ$f$, the received continuous-time signal will be rotated by a constant frequency and is in the form of
$z_{i,n}=z(t)e^{j2\pi \Delta ft}|_{t=i(N+N_{g})T_{s}+N_{g}T_{s}+nT_{s}}$
The carrier frequency offset can first be normalized with respect to the sub carrier spacing ($f_{S}=1/(NT_{s}))$ and then decomposed into the integral component $(\epsilon _{I})$ and fractional component $(\epsilon _{f})$, that is, $\Delta f=(\epsilon _{I}+\epsilon _{f})f_{S}$ and $-0.5\leq \epsilon _{f}<0.5$. The received frequency-domain signal then becomes
$Z_{i,k}=X_{i,k-\epsilon _{I}}H_{k-\epsilon _{I}}{\frac {\sin(\pi \epsilon _{f})}{N\sin(\pi \epsilon _{f}/N)}}\exp(j2\pi {\frac {i(N+N_{g})+N_{g}}{N}}(\epsilon _{f}+\epsilon _{I}))\exp(j\pi {\frac {N-1}{N}}\epsilon _{f})+\sum _{l=-N/2,l\neq k-\epsilon _{I}}^{N/2-1}{X_{i,l}H_{l}{\frac {\sin(\pi (\epsilon _{I}+\epsilon _{f}+l-k))}{N\sin(\pi (\epsilon _{I}+\epsilon _{f}+l-k)/N)}}}\times \exp(j2\pi {\frac {i(N+N_{g})+N_{g}}{N}}{(\epsilon _{I}+\epsilon _{f}})\exp(j\pi {\frac {N-1}{N}}(\epsilon _{I}+\epsilon _{f}+l-k))+V_{i,k}$
The second term of the equation denotes the ICI, namely signals from other subcarriers that interfere with the desired subcarrier signal. Also note that $V_{i,k}$ is the channel noise component. The fractional carrier frequency offset, $\epsilon _{f}$, results in attenuation in magnitude, phase shift, and ICI, while the integer carrier frequency offset, $\epsilon _{I}$, causes index shift as well as phase shift in the received frequency-domain signals. Note that the phase shift is identical in every subcarrier and is also proportional to the symbol index $i$.

## Carrier frequency offset estimation
### Fractional CFO estimation
#### Maximum likelihood (ML) estimation

An estimate of the CFO, if within a certain limit, can be obtained simultaneously when the coarse symbol timing is acquired by the algorithms mentioned earlier. The ML CFO estimator is given by
${\widehat {\Delta f}}={\frac {1}{2\pi LT_{s}}}\angle \ (\sum _{r=0}^{R-1}{z_{m-r}z_{m-r-L}^{*}})$
Note that the phase can only be resolved in $\left[-\pi ,\pi \right]$, and the above formula estimates only the part of the CFO that is within $\left[-1/(2LT_{s}),1/(2LT_{s})\right]$ $Hz$. If $L=N$, then ${\widehat {\Delta f}}={\widehat {\epsilon }}_{f}f_{S}$, the part of the CFO that is within plus and minus half the subcarrier spacing, also known as the fractional CFO. In the case in which $L>1/(\Delta fT_{s})$, frequency ambiguity occurs, and the total CFO must be resolved by additional integer CFO estimation.

#### BLUE

If the preamble has U identical repetitions, where $U>2$, then another best linear unbiased estimator (BLUE) exploiting the correlation of the repeated segments is possible. Assume that there are R samples in a segment, so, in total, $UR=N$ samples are available. The BLUE estimation algorithm starts with computing several linear auto-correlation functions with $uR$ samples of delay,
$\Phi _{BLUE(u)}={\frac {1}{N-uR}}\sum _{m=uR}^{N-1}{z_{m}z_{m-uR}^{*}},\ \ \ \ \ \ \ 0\leq u\leq K.$
Then the phase differences between all pairs of auto-correlation functions with delay difference $R$ are computed,
$\phi (u)=[\angle \left\{\Phi _{BLUE}(u)\right\}]-\angle \left\{\Phi _{BLUE}(u-1)\right\}]_{2\pi }\ \ \ \ \ 1\leq u\leq K,$
where $[\ \cdot \ ]_{2\pi }$ denotes a modulo-$2\pi$ operation and $K$ is a design parameter less than $U$. Note that each $\phi (u)$ represents an estimate of the CFO, scaled by a constant. The smaller the constant $u$, the better accuracy it achieves. To gain an effective CFO estimate, the BLUE estimator uses a weighted average of all $\phi (u)$ and computes
${\widehat {\Delta f}}/f_{S}={\frac {U}{2\pi }}(\sum _{u=1}^{K}{w_{u}\phi (u)}),$
where
$w_{u}=3{\frac {(U-u)(U-u+1)-K(U-K)}{K(4K^{2}-6UK+3U^{2}-1)}}$
The optimal $K$ value for achieving the minimal variance of ${\widehat {\Delta f}}$ is $U/2$. The range of estimated carrier frequency offset is $-Uf_{S}/2\leq {\widehat {\Delta f}}\leq Uf_{S}/2$.
With some modification, this estimator can also be applied to preambles consisting of several repeated segments with specific sign changes. With proper acquired symbol timing, the received $U$ segments of the preamble are multiplied by their respective signs, and then the same method as the BLUE estimator can be applied.

### Integer CFO estimation

In the IEEE 802.16e OFDM mode standard, the oscillator deviation is within ±8 ppm. With the highest possible carrier frequency of 10.68 GHz, the maximum CFO is about ± 171 kHz when the transmitter LO and the receiver LO both have the largest yet opposite-sign frequency deviations, which is also equivalent to ± 1 1 sub carrier spacing $(f_{S})$ . In the 6 MHz DVB-T system, assuming that the oscillator deviation is within ±20 ppm and the carrier frequency is around 800 MHz, the maximum CFO can be up to ±38 subcarrier spacing $(f_{S})$ in the 8K transmission mode. From the previous discussion, it is clear that the estimated CFO obtained simultaneously in the coarse symbol boundary detection has ambiguity in frequency. In the following, algorithms for resolving such frequency ambiguity in the estimated carrier frequency offset will be presented.

#### Time-domain correlation

In the 802.16e OFDM mode, the initial estimated CFO is within $[-2f_{S},2f_{S}]$. Besides this estimation, additional frequency offset of $\pm 12f_{S}$, $\pm 8f_{S}$, or $\pm 4f_{S}$, is possible given a CFO range of $\pm 11f_{S}$. In order to estimate this additional integer CFO, a matched filter matching the fractional CFO-compensated received signal against the modulated long preamble waveforms can be used. The coefficients of the matched filter are the complex conjugate of the long preamble and they are modulated by a sinusoidal wave whose frequency is a possible integer CFO mentioned above. The output of the matched filter will have a maximum peak value if its coefficients are modulated by the carrier with the correct integer CFO. It is possible to deploy one such matched filter for each possible integer CFO. In this case, seven matched filters are needed. However, we can use only one set of matched filter hardware that handles different integer CFOs sequentially. In addition, as suggested previously in the symbol timing detection subsection, the coefficients of the matched filter can be quantized to -1, 0, 1 to reduce hardware complexity.

## Carrier frequency offset estimation in MIMO-OFDM system

In MIMO-OFDM systems, the transmit antennas are often co-located, so are the receive antennas.
Hence, it is valid to assume that only one oscillator is referenced in either the transmitter side or the receiver side. As a result, a single CFO set is to be estimated for the multiple receive antennas. The ML estimation for the fractional CFO is quite popular in MIMO-OFDM systems.
Another fractional CFO estimation algorithm for MIMO-OFDM systems applies different weights to the receive signals according to the respective degrees of channel fading
The preamble is designed so that each transmit antenna uses non-overlapping sub carriers to facilitate separation of signals from different transmit antennas. At each receive antenna, the cross-correlation between the received signal and the known preamble is examined.
The magnitude of the cross-correlation output reflects the channel fading between the corresponding transmit and receive antenna pair.
Based on the channel fading information, weights are applied to the received signals to emphasize those with stronger channel gains and at the same time to suppress those that are deeply faded.
Then, the CFO is estimated based on the phase of delay correlation of weighted signals. For integer CFO, frequency-domain cross-correlation and frequency-domain PN correlation can be used with slight modification. First, the received signals must be compensated by the estimated fractional CFO.
Then, the compensated signals are transformed into the frequency domain. The frequency-domain cross-correlation algorithm for one specific receive antenna is similar to that in the SISO case

## Residual CFO and SCO Estimation

Although the CFO in the received signal has been estimated and compensated in the receiver, some residual CFO may still exist. Besides, the CFO contained in the received signal may very well be time-varying and, thus, it needs to be continuously tracked.
The received signal also suffers from sampling clock offset (SCO), which may cause a gradual drift of the safe DFT window in addition to extra phase shift in the received frequency-domain signals. In frame-based OFDM systems, both the residual CFO tracking and the SCO tracking are inevitable, because the receiver may operate for a long period of time. In packet-based OFDM systems, however, the influences of these two offsets depend on the packet length and the magnitude of the offsets.
The SCO may not be easily estimated from the time-domain signal. However, it can be examined through the phase shift of the frequency-domain pilot signals. The residual CFO can also be estimated in a similar way. In many OFDM wireless communication standards, for example, DVB-T, IEEE 802.11 a/g/n, and IEEE 802.16e OFDM mode, dedicated pilot subcarriers are allocated to facilitate receiver synchronization.
The phase shifts in the received frequency-domain signals caused by the CFO are identical at all subcarriers provided that the ICI is ignored. On the other hand, the SCO causes phase shifts that are proportional to the respective sub carrier indices.
The received signals contain ICI and noise, and therefore the phases deviate from the two ideal straight lines. Conventionally, the SCO can be estimated by computing a slope from the plot of measured pilot subcarrier phase differences versus pilot subcarrier indices. Moreover, joint estimation of CFO and SCO has also been studied extensively.

## Carrier Frequency Offset Compensation

In order to suppress the ICI and thereby reduce SNR degradation, the residual CFO must be sufficiently small. For example, when using the 64QAM constellation, it is better to keep the residual CFO below 0. 01/s to ensure that DSNR < 0 . 3 dB for moderate SNR.
On the other hand, when QPSK is used, the residual CFO can be up to 0.03 fs.