Main Content

Coarse Frequency Compensator

Compensate for carrier frequency offset for PAM, PSK, or QAM



  • Coarse Frequency Compensator block


The Coarse Frequency Compensator block compensates for a carrier frequency offset for BPSK, QPSK, OQPSK, 8-PSK, PAM, and QAM modulation schemes. The block accepts a single input signal. To obtain an estimate of the frequency offset in Hz, select the Estimated frequency offset output port check box. The block accepts a sample- or frame-based complex input signal and returns a complex output signal and a real frequency offset estimate. The output signal has the same dimensions as the input signal. The frequency offset estimate is a scalar.


Modulation type of input signal

Specify the modulation type as BPSK, QPSK, OQPSK, 8PSK, PAM, or QAM.

The default setting is QAM.

Estimation algorithm

Specify the frequency offset estimation algorithm as FFT-based or Correlation-based. This parameter appears when Modulation type of input signal is BPSK, QPSK, 8PSK, or PAM.

The table shows the allowable combinations of the modulation type and the estimation algorithm.

ModulationFFT-Based AlgorithmCorrelation-Based Algorithm
Frequency resolution (Hz)

Specify the frequency resolution in Hz as a positive real scalar. This option is available when the FFT-based algorithm is used. The default setting is 0.001 Hz.

Samples per symbol

Specify the number of samples per symbol as a positive integer scalar greater than or equal to 4. The default setting is 4.

Maximum frequency offset (Hz)

Specify the maximum frequency offset in Hz as a positive real scalar. This option is appears when you set Estimation algorithm to Correlation-based. The default setting is 0.05 Hz.

Estimated frequency offset output port

Select this check box to provide the estimated frequency offset to an output port. The default for this parameter is selected.

Simulate using

Select the simulation mode.

Code generation

On the first model run, simulate and generate code for the block using only MATLAB® functions supported for code generation. If the structure of the block does not change, subsequent model runs do not regenerate the code.

If the simulation mode is Code generation, System objects accept a maximum of nine inputs.

Interpreted execution

Simulate your model using all supported MATLAB functions. Choosing this option can slow simulation performance.

The default setting is Code generation.


This block implements the algorithm, inputs, and outputs described on the comm.CoarseFrequencyCompensator reference page. The object properties correspond to the block parameters.


expand all

Correct for a frequency offset imposed on a noisy 8-PSK channel by using the Coarse Frequency Compensator block.

Build the doc_coarsefreqcomp model as shown in this figure.

Open the dialog boxes to set these parameter values:

Run the model. The Spectrum Analyzer block shows both the frequency offset signal and the compensated signal. In addition, the Display (Simulink) block shows the estimate of the frequency offset. Observe that the spectrum plot shows that the Coarse Frequency Compensator correctly centers the signal around 0 Hz. Additionally, the display shows that the estimated frequency offset is 2000 Hz.

Adjust the parameters in the Phase/Frequency Offset and Coarse Frequency Compensator blocks and see their effect on frequency compensation performance.

Supported Data Types

PortSupported Data Types
Signal Input
  • Double-precision floating point

  • Single-precision floating point

Signal Output
  • Double-precision floating point

  • Single-precision floating point

Frequency Estimate
  • Double-precision floating point

  • Single-precision floating point


[1] Luise, M. and R. Regiannini. “Carrier recovery in all-digital modems for burst-mode 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. “Non-Data-Aided Feedforward Carrier Frequency Offset Estimators for QAM Constellations: A Nonlinear Least-Squares 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. “Non-Data-Aided Wide-Range 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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2015b