Main Content

Carrier Synchronizer

Compensate for carrier frequency offset

  • Carrier Synchronizer block

Libraries:
Communications Toolbox / Synchronization

Description

The Carrier Synchronizer block compensates for carrier frequency and phase offsets in signals that use single-carrier modulation schemes. The carrier synchronizer algorithm is compatible with BPSK, QPSK, OQPSK, 8-PSK, PAM, and rectangular QAM modulation schemes.

Note

Modulation-type dependent phase ambiguities may be introduced by the synchronization algorithm. For more information, see Potential Phase Ambiguity.

This icon shows the block without optional port.

Examples

expand all

Correct for a phase and frequency offset imposed on a noisy 16-QAM channel by using the Carrier Synchronizer block.

The doc_qamcarriersync model configures a 16-QAM signal, adds phase and frequency offset, passes the signal through a noisy AWGN channel, and then corrects the offsets by using the Carrier Synchronizer block.

The constellation diagram shows the signal constellation before and after carrier synchronization. Before synchronization, the signal appears as a spiral pattern that results from a phase and frequency offset. After the carrier synchronizer converges to a solution, the signal symbols are grouped around the reference constellation.

Experiment with the parameters in the Phase/Frequency Offset and Carrier Synchronizer blocks. By varying these parameters, you can change how quickly the output conforms to an ideal 16-QAM constellation. If the signal does not converge to the expected constellation, additional measures can be taken to achieve successful recovery.

While correcting for a phase and frequency offset imposed on a QPSK signal, the Carrier Synchronizer block introduces symbol phase ambiguity that increases the symbol error rate (SER). To resolve the symbol phase ambiguity, this example adds a frame preamble to the transmitted signal and includes a subsystem block that computes the phase ambiguity introduced by the carrier synchronization.

The doc_carrsync_resolve_ambig model configures a QPSK-modulated data frame that includes a Barker sequence preamble and random data. The data frame gets impaired by phase and frequency offsets and an AWGN channel. A Phase/Frequency Offset block sets the phase offset to 45 degrees and frequency offset to 1 kHz. The frequency offset is 1% of the 10 kHz sample rate. A Carrier Synchronizer block corrects the offsets but introduces symbol phase ambiguity that results in a poor symbol error rate (SER).

The model initializes variables used to configure block parameters by using the InitFcn callback function. For more information, see Model Callbacks (Simulink).

The constellation diagram shows the transmitted signal along with the signal constellation before and after carrier synchronization. Before synchronization, the phase and frequency offset cause the constellation points to shift around outlining a circle. After the carrier synchronizer converges to a solution, the signal symbols are grouped around the reference constellation but there may be a symbol phase ambiguity in the placement of constellation points that results in symbol errors. The model computes the SER before and after resolution of symbol phase ambiguity. Removing the phase ambiguity reduces the SER dramatically.

Ports

Input

expand all

Input signal, specified as a scalar or vector.

This port is unnamed on the block.

Data Types: double | single
Complex Number Support: Yes

Output

expand all

Phase corrected output signal, returned as a scalar or column vector with the same data type and length as the input signal. The output signal adjusts the input signal compensating for carrier frequency and phase offsets in signals that use single-carrier modulation schemes.

This port is unnamed on the block until the Estimated phase error output port parameter is selected.

Data Types: double | single
Complex Number Support: Yes

Phase estimate in radians, returned as a scalar or column vector with the same length as the input signal.

Dependencies

To enable this port, select the Estimated phase error output port parameter.

Data Types: double | single

Parameters

expand all

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, specified as QAM, 8PSK, BPSK, OQPSK, PAM, or QPSK.

Modulation phase offset method, specified as Auto or Custom.

  • Auto — Apply the traditional offset for the specified modulation type.

    ModulationPhase Offset (radians)
    BPSK, QAM, or PAM0
    OQPSK or QPSKπ/4
    8PSKπ/8
  • Custom — Specify a user-defined phase offset with the CustomPhaseOffset property.

Tunable: Yes

Custom phase offset in radians, specified as a scalar.

Dependencies

This parameter applies when you set Modulation phase offset to Custom.

Number of samples per symbol, specified as a positive integer.

Tunable: Yes

Damping factor of the loop, specified as a positive scalar.

Tunable: Yes

Normalized bandwidth of the loop, specified as a scalar in the range (0,1]. The loop bandwidth is normalized by the sample rate of the synchronizer.

Decreasing the loop bandwidth reduces the synchronizer convergence time but also reduces the pull-in range of the synchronizer.

Tunable: Yes

Select this check box to provide the estimated phase error to output port phEst.

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 the Interpreted 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 the Code 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

double | single

Multidimensional Signals

no

Variable-Size Signals

yes

More About

expand all

Algorithms

The algorithm implements a closed-loop compensator that uses the PLL-based algorithm described in [1]. The output of the synchronizer, yn, is a frequency-shifted version of the complex input signal, xn, for the nth sample. The synchronizer output is yn=xneiλn,where λn is the output of the direct digital synthesizer (DDS). The DDS is the discrete-time version of a voltage-controlled oscillator and is a core component of discrete-time phase locked loops. The DDS works as an integration filter.

Carrier synchronizer input to phase shifter. Feedback loop includes a phase error detector, a loop filter and a direct digital synthesizer.

To correct for the frequency offset, first the algorithm determines the phase error, en. The value of the phase error depends on the modulation scheme.

ModulationPhase Error
QAM or QPSK

en=sgn(Re{xn})×Im{xn}sgn(Im{xn})×Re{xn}

For a detailed description of this equation, see [1].

BPSK or PAM

en=sgn(Re{xn})×Im{xn}

For a detailed description of this equation, see [1].

8-PSK

en={sgn(Re{xn})×Im{xn}(21)sgn(Im{xn})×Re{xn},for|Re{xn}||Im{xn}|(21)sgn(Re{xn})×Im{xn}sgn(Im{xn})×Re{xn},for|Re{xn}|<|Im{xn}|

For a detailed description of this equation, see [2].

OQPSK

en=sgn(Re{xn-SamplePerSymbol/2})×Im{xn-SamplePerSymbol/2}sgn(Im{xn})×Re{xn}

To ensure system stability, the phase error passes through a biquadratic loop filter governed by

ψn=gIen+ψn1,

where ψn is the output of the loop filter at sample n, and gI is the integrator gain. The integrator gain is determined from the equation

gI=4(θ2/d)KpK0,

where

  • θ=BnT(ζ+14ζ)andd=1+2ζθ+θ2,

  • Bn is the normalized loop bandwidth

  • ζ is the damping factor

  • K0 is the phase recovery gain and equals the number of samples per symbol.

  • Kp is the phase error detector gain and is determined by the modulation type.

ModulationKp
BPSK, PAM, QAM, QPSK, or OQPSK2
8-PSK1

The output of the loop filter is then passed to the DDS. The DDS is another biquadratic loop filter whose expression is based on the forward Euler integration rule

λn=(gPen-1+ψn-1)+λn-1,

where gP is the proportional gain that is expressed as

gP=4ζ(θ/d)KpK0.

The info object function returns estimates of the normalized pull-in range, the maximum frequency lock delay, and the maximum phase lock delay. The normalized pull-in range, f)pull-in, is expressed in radians and estimated as

(Δf)pull-inmin(1,2π2ζBn).

The expression for f )pull-in becomes less accurate as 2π2ζBn approaches 1.

The maximum frequency lock delay, TFL, and phase lock delay, TPL, are expressed in samples and estimated as

TFL4(Δf)pull-in2Bn3andTPL1.3Bn.

References

[1] Rice, Michael. Digital Communications: A Discrete-Time Approach. Upper Saddle River, NJ: Prentice Hall, 2008. pp. 359–393.

[2] Huang Zhijie, Yi Zhiqiang, Zhang Ming and Wang Kuang, "8PSK demodulation for new generation DVB-S2," 2004 International Conference on Communications, Circuits and Systems (IEEE Cat. No.04EX914), Chengdu, 2004, pp. 1447-1450 Vol.2, doi: 10.1109/ICCCAS.2004.1346447.

Extended Capabilities

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

Version History

Introduced in R2015a