Coarse Frequency Compensator
Compensate for carrier frequency offset in PAM, PSK, or QAM
Libraries:
Communications Toolbox /
RF Impairments Correction
Communications Toolbox /
Synchronization
Description
The Coarse Frequency Compensator block compensates for carrier frequency offset in QAM, 8-PSK, BPSK, OQPSK, PAM, and QPSK modulation schemes.
Examples
Compensate Signal Frequency and Phase Offset in Simulink
Compensate for a frequency offset imposed on a noisy 8-PSK channel by using the Coarse Frequency Compensator block.
The doc_coarsefreqcomp
model compares a frequency offset impaired signal to one that has coarse frequency compensation applied.
A spectrum analyzer plot shows the transmitted signal before and after applying coarse frequency compensation.
Estimated frequency offset is 1999.9694824.2 Hz.
Ports
Input
In — Input signal
column vector
Input signal, specified as a column vector.
Data Types: single
| double
Complex Number Support: Yes
Output
Out — Compensated output signal
complex column vector
Compensated output signal, returned as a complex column vector with the same dimensions and data type as the input In.
Data Types: single
| double
FreqEst — Estimate of frequency offset
scalar
Estimate of the frequency offset, returned as a scalar.
Dependencies
To add this port, select Estimated frequency offset output port.
Data Types: single
| double
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
Modulation type of input signal — Modulation type
QAM
(default) | 8PSK
| BPSK
| OQPSK
| PAM
| QPSK
Modulation type, specified as QAM
,
8PSK
, BPSK
,
OQPSK
, PAM
, or
QPSK
.
Estimation algorithm — Algorithm used to estimate frequency offset
FFT-based
(default) | Correlation-based
Specify the frequency offset estimation algorithm as
FFT-based
or
Correlation-based
.
The table shows the allowable combinations of the modulation type and the estimation algorithm.
Modulation | FFT-Based Algorithm | Correlation-Based Algorithm |
---|---|---|
8PSK , BPSK ,
PAM , QPSK | ✓ | ✓ |
OQPSK , QAM | ✓ | — |
For more information, see Algorithms.
Dependencies
This parameter appears when you set Modulation type of input signal to
8PSK
, BPSK
,
PAM
, or
QPSK
.
Frequency resolution (Hz) — Frequency resolution
100
(default) | positive scalar
Frequency resolution in Hz, specified as a positive real scalar.
Dependencies
This parameter applies when you set Estimation algorithm to
FFT-based
.
Samples per symbol — Number of samples per symbol
4
(default) | even integer greater than or equal to 4
Number of samples per symbol, specified as an even integer scalar greater than or equal to 4.
Dependencies
This parameter appears when you set Modulation type of input signal to
OQPSK
.
Maximum frequency offset (Hz) — Maximum measurable frequency offset
5e3
(default) | positive scalar
Maximum measurable frequency offset in Hz, specified as a positive scalar.
Dependencies
This parameter appears when you set Estimation algorithm to
Correlation-based
.
Estimated frequency offset output port — Option to add estimated frequency offset output port
on
(default) | off
Select this check box to add the FreqEst output port. The FreqEst port outputs the estimated frequency offset in Hz.
Simulate using — Type of simulation to run
Code generation
(default) | Interpreted execution
Type of simulation to run, specified as Code generation
or
Interpreted execution
.
Code generation
— Simulate the model by using generated C code. The first time you run a simulation, Simulink generates C code for the block. The model reuses the C code for subsequent simulations unless the model changes. This option requires additional startup time, but the speed of the subsequent simulations is faster than with theInterpreted execution
option.Interpreted execution
— Simulate the model by using the MATLAB® interpreter. This option shortens startup time, but the speed of subsequent simulations is slower than with theCode generation
option. In this mode, you can debug the source code of the block.
For more information, see Interpreted Execution vs. Code Generation (Simulink).
Block Characteristics
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Algorithms
Correlation-Based Estimation
Reference [ 1 ] describes the correlation-based estimation algorithm used to estimate the
frequency offset for PSK and PAM signals. To determine the frequency offset,
Δf, the algorithm performs a maximum likelihood (ML) estimation
of the complex-valued oscillation exp
(j2πΔft). The
observed signal, rk, is represented as
Ts is the sampling interval, θ is an unknown random phase, and N is the number of samples. The ML estimation of the frequency offset is equivalent to seeking the maximum of the likelihood function,
After simplifying, the problem is expressed as a discrete Fourier transform, weighted by a parabolic windowing function. It is expressed as
R(k) denotes the estimated autocorrelation of the sequence rk and is represented as
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 rk 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 result is a modified ML estimation strategy in which
This equation results in an estimate of in which
The sampling frequency, fsamp, is the reciprocal of Ts. The number of elements used to compute the autocorrelation sequence, L, are determined as
fmax 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 fmax ≤
fsamp /
(4M).
FFT-Based Estimation
FFT-based estimation algorithms can be used to estimate the frequency offset for various modulation types. The coarse frequency compensator implementation supports these modulation methods by using the algorithm noted.
For
BPSK
,QPSK
,8PSK
,PAM
, orQAM
modulation, the coarse frequency compensator uses the FFT-based algorithm described in [ 2 ]. The algorithm estimates by using a periodogram of the mth power of the received signal and is given aswhere m is the modulation order, r(k) is the received sequence, Rsym is the symbol rate, and N is the number of samples. The algorithm searches for a frequency that maximizes the time average of the mth power of the received signal multiplied by various frequencies in the range of [–Rsym / 2, Rsym / 2]. Because the form of the algorithm is the definition of the discrete Fourier transform of rm(t), searching for a frequency that maximizes the time average is equivalent to searching for a peak line in the spectrum of rm(t). The number of points required by the FFT is
where fr is the desired frequency resolution.
For OQPSK modulation, the coarse frequency compensator uses the FFT-based algorithm 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.
References
[1] Luise, M., and R. Reggiannini. “Carrier Frequency Recovery in All-Digital Modems for Burst-Mode Transmissions.” IEEE® Transactions on Communications 43, no. 2/3/4 (Feb. 1995): 1169–78.
[2] Wang, Y., et al. “Non-Data-Aided Feedforward Carrier Frequency Offset Estimators for QAM Constellations: A Nonlinear Least-Squares Approach.” EURASIP Journal on Advances in Signal Processing 2004, no. 13 (Dec. 2004): 856139. https://doi.org/10.1155/S1110865704403175.
[3] Nakagawa, Tadao, et al. “Non-Data-Aided Wide-Range Frequency Offset Estimator for QAM Optical Coherent Receivers.” Optical Fiber Communication Conference/National Fiber Optic Engineers Conference 2011, OMJ1. OSA, 2011. https://doi.org/10.1364/OFC.2011.OMJ1.
[4] Olds, Jonathan. Designing an OQPSK demodulator.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2015bR2023b: Default settings change
The Coarse Frequency Compensator block parameters have new default values.
Parameter | New Default | Previous Default |
---|---|---|
Frequency resolution (Hz) | 100 | 0.001 |
Maximum frequency offset (Hz) | 5e3 | 0.05 |
When executing code created in a previous release, confirm the coarse frequency compensator settings. The new default settings change your results. To produce results using the previous default settings, you can manually update the settings of your block.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)