Compensate for frequency offset for PAM, PSK, or QAM
The CoarseFrequencyCompensator
System object™ compensates for the frequency offset of received signals.
To compensate for the frequency offset of a PAM, PSK, or QAM signal:
Define and set up your coarse frequency compensator object. See Construction.
Call step
to compensate for the frequency offset of a PAM,
PSK, or QAM signal according to the properties of comm.CoarseFrequencyCompensator
. The behavior of step
is specific to each object in the toolbox.
Note
Starting in R2016b, instead of using the step
method to
perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example,
y = step(obj,x)
and y = obj(x)
perform equivalent
operations.
CFC = comm.CoarseFrequencyCompensator
creates a coarse frequency offset
compensator object, CFC
. This object uses an openloop technique to estimate
and compensate for the carrier frequency offset in a received signal.
CFC = comm.CoarseFrequencyCompensator(Name,Value)
creates a coarse
frequency offset compensator object, CFC
, with the specified property
Name
set to the specified Value
. You can specify
additional namevalue pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.

Modulation type Specify the signal modulation type as  

Algorithm used to estimate frequency offset Specify the estimation algorithm as one of The table shows the allowable combinations of the modulation type and the estimation algorithm.
Use the correlationbased algorithm for HDL implementations and for other situations in which you want to avoid using an FFT. This property appears when  

Frequency resolution (Hz) Specify the frequency resolution for the offset frequency estimation as a positive, real
scalar of data type  

Maximum measurable frequency offset (Hz) Specify the maximum measurable frequency offset as a positive, real scalar of data type
The value of this property must be less than f_{samp} /
M, where f_{samp} is the sample rate
and M is the modulation order. As a best practice, set
 

Sample rate (Hz) Specify the sample rate in samples per second as a positive, real scalar of data type
 

Samples per symbol Specify the number of samples per symbol, s, as a real positive finite
integer scalar, such that s ≥ 2. The default value is This property appears when 
info  Characteristic information about coarse frequency compensator 
step  Compensate for frequency offset 
The correlationbased estimation algorithm, which can be used to estimate the frequency
offset for PSK and PAM signals, is described in [1]. To determine the
frequency offset, Δf, the algorithm performs a maximum likelihood (ML)
estimation of the complexvalued oscillation exp
(j2πΔft).
The observed signal, r_{k}, is represented as
$${r}_{k}={e}^{j\left(2\pi \Delta fk{\text{T}}_{s}+\theta \right)},\text{\hspace{0.17em}}1\le k\le N\text{\hspace{0.17em}},$$
where T_{s} is the sampling interval, θ is an unknown random phase, and N is the number of samples. The maximum likelihood estimation of the frequency offset is equivalent to seeking the maximum of the likelihood function, Λ(Δf),
$$\Lambda (\Delta f)\approx {\left{\displaystyle \sum _{i=1}^{N}{r}_{i}{e}^{j2\pi \Delta fi{T}_{s}}}\right}^{2}={\displaystyle \sum _{k=1}^{N}{\displaystyle \sum _{m=1}^{N}{r}_{k}{r}_{m}^{*}{e}^{j2\pi \Delta f{T}_{s}(km)}}}\text{\hspace{0.17em}}.$$
After simplifying, the problem is expressed as a discrete Fourier transform, weighted by a parabolic windowing function. It is expressed as
$$\mathrm{Im}\left\{{\displaystyle \sum _{k=1}^{N1}k(Nk)R(k){e}^{j2\pi \Delta \widehat{f}{T}_{s}}}\right\}=0\text{\hspace{0.17em}},$$
where R(k) denotes the estimated autocorrelation of the sequence r_{k} and is represented as
$$R(k)\triangleq \frac{1}{Nk}{\displaystyle \sum _{i=k+1}^{N}{r}_{i}\text{\hspace{0.17em}}{r}_{ik}^{*}},\text{\hspace{0.17em}}0\le k\le N1\text{\hspace{0.17em}}.$$
The term k(N–k) is the parabolic windowing function. In [1], it is shown that R(k) is a poor estimate of the autocorrelation of r_{k} when k = 0 or when k is close to N. Consequently, the windowing function can be expressed as a rectangular sequence of 1s for k = 1, 2, ..., L, where L ≤ N – 1. The results is a modified ML estimation strategy in which
$$\mathrm{Im}\left\{{\displaystyle \sum _{k=1}^{L}R(k){e}^{j2\pi \Delta \widehat{f}k{T}_{s}}}\right\}=0\text{\hspace{0.17em}}.$$
This results in an estimate of $$\Delta \widehat{f}$$ in which
$$\Delta \widehat{f}\cong \frac{{f}_{samp}}{\pi (L+1)}\mathrm{arg}\left\{{\displaystyle \sum _{k=1}^{L}R(k)}\right\}\text{\hspace{0.17em}}.$$
The sampling frequency, f_{samp}, is the reciprocal of T_{s}. The number of elements used to compute the autocorrelation sequence, L, are determined as
$$L=\mathrm{round}\left(\frac{{f}_{samp}}{{f}_{max}}\right)1,\text{\hspace{0.17em}}$$
where f_{max} is the maximum expected frequency
offset and round
is the nearest integer function. The frequency offset
estimate improves when L ≥ 7 and leads to the recommendation that f_{max} ≤
f_{samp} / (4M).
FFTbased algorithms can be used to estimate the frequency offset for all modulation types. Two variations are used in comm.CoarseFrequencyCompensator.
For BPSK
, QPSK
, 8PSK
,
PAM
, or QAM
modulations the FFTbased algorithm used
is described in [2]. The algorithm estimates $$\Delta \widehat{f}$$ by using a periodogram of the
m^{th} power of the received signal and is given
as
$$\Delta \widehat{f}=\frac{{f}_{samp}}{N\cdot m}\mathrm{arg}\underset{f}{\mathrm{max}}\left{\displaystyle \sum _{k=0}^{N1}{r}^{m}(k){e}^{j2\pi kt/N}}\right,\text{\hspace{1em}}\left(\frac{{R}_{sym}}{2}\le f\le \frac{{R}_{sym}}{2}\right)\text{\hspace{0.17em}},$$
where m is the modulation order, r(k) is the received sequence, R_{sym} is the symbol rate, and N is the number of samples. The algorithm searches for a frequency that maximizes the time average of the m^{th} power of the received signal multiplied by various frequencies in the range of [–R_{sym}/2, R_{sym}/2]. As the form of the algorithm is the definition of the discrete Fourier transform of r^{m}(t), searching for a frequency that maximizes the time average is equivalent to searching for a peak line in the spectrum of r^{m}(t). The number of points required by the FFT is
$$N={2}^{\lceil {\mathrm{log}}_{2}\left(\frac{{f}_{samp}}{{f}_{r}}\right)\rceil}\text{\hspace{0.17em}},$$
where f_{r} is the desired frequency resolution.
For OQPSK
modulation the FFTbased algorithm used is described in
[4]. The algorithm searches for
spectral peaks at +/ 200 kHz around the symbol rate. This technique locates desired peaks in
the presence of interference from spectral content around baseband frequencies due to
filtering.
[1] Luise, M. and R. Regiannini. “Carrier recovery in alldigital modems for burstmode transmissions.” IEEE^{®} Transactions on Communications. Vol. 43, No. 2, 3, 4, Feb/Mar/April, 1995, pp. 1169–1178.
[2] Wang, Y., K. Shi, and E. Serpedi. “NonDataAided Feedforward Carrier Frequency Offset Estimators for QAM Constellations: A Nonlinear LeastSquares Approach.” EURASIP Journal on Applied Signal Processing. 2004:13, pp. 1993–2001.
[3] Nakagawa, T., M. Matsui, T. Kobayashi, K. Ishihara, R. Kudo, M. Mizoguchi, and Y. Miyamoto. “NonDataAided WideRange Frequency Offset Estimator for QAM Optical Coherent Receivers.” Optical Fiber Communication Conference and Exposition (OFC/NFOEC), 2011 and the National Fiber Optic Engineers Conference. March 2011, pp. 1–3.
[4] Olds, Jonathan. "Designing an OQPSK demodulator".
comm.PhaseFrequencyOffset
 comm.CarrierSynchronizer
 dsp.FFT