Documentation

comm.PhaseFrequencyOffset System object

Package: comm

Apply phase and frequency offsets to input signal

Description

The PhaseFrequencyOffset object applies phase and frequency offsets to an incoming signal.

To apply phase and frequency offsets to the input signal:

  1. Define and set up your phase frequency offset object. See Construction.

  2. Call step to apply phase and frequency offsets to the input signal according to the properties of comm.PhaseFrequencyOffset. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.PhaseFrequencyOffset creates a phase and frequency offset System object™, H. This object applies phase and frequency offsets to an input signal.

H = comm.PhaseFrequencyOffset(Name,Value) creates a phase and frequency offset object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

PhaseOffset

Phase offset

Specify the phase offset in degrees. The default is 0. If the step method input is an M-by-N matrix, the PhaseOffset property can be set to a numeric scalar, an M-by-1, or 1-by-N numeric vector, or an M-by-N numeric matrix.

When you set the PhaseOffset property to a scalar value, the object applies the constant specified phase offset to each column of the input matrix.

When you set this property to an M-by-1 vector, the object applies time varying phase offsets, specified in the vector of this property, to each column of the input to the step method.

When you set this property to a 1-by-N vector, the object applies the i-th constant phase offset of this property to the i-th column of the input to the step method.

When you set this property to an M-by-N matrix, the object applies the i-th time varying phase offsets, specified in the i-th column of this property, to the i-th column of the input to the step method. This property is tunable.

FrequencyOffsetSource

Source of frequency offset

Specify the source of the frequency offset as one of Property | Input port. The default is Property. If you set this property to Property, you can specify the frequency offset using the FrequencyOffset property. If you set this property to Input port, you specify the frequency offset as a step method input.

FrequencyOffset

Frequency offset

Specify the frequency offset in Hertz. The default is 0. If the step method input is an M-by-N matrix, then the FrequencyOffset property is a numeric scalar, an M-by-1, or 1-by-N numeric vector, or an M-by-N numeric matrix.

This property applies when you set the FrequencyOffsetSource property to Property.

When you set this property to a scalar value, the object applies the constant specified frequency offset to each column of the input to the step method.

When you set this property to an M-by-1 vector, the object applies time-varying frequency offsets. These offsets are specified in the property, to each column of the input to the step method.

When you set this property to a 1-by-N vector, the object applies the i-th constant frequency offset in this property to the i-th column of the input to the step method.

When you set this property to an M-by-N matrix, the object applies the i-th time varying frequency offset. This offset is specified in the i-th column of this property and to the i-th column of input to the step method. This property is tunable.

SampleRate

Sample rate

Specify the sample rate of the input samples in seconds as a double-precision, real, positive scalar value. The default is 1.

SampleRate = Input Vector Size / Simulink® Sample Time

Methods

cloneCreate phase and frequency offset object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
stepApply phase and frequency offsets to input signal

Examples

collapse all

Introduce Phase Offset to 16-QAM Signal

Introduce a phase offset to a 16-QAM signal and view its effect on the constellation.

Create a QAM modulator and a phase frequency offset System object™. Set the phase offset to 30 degrees.

MOD = comm.RectangularQAMModulator('ModulationOrder',16);
PFO = comm.PhaseFrequencyOffset('PhaseOffset',30);

Generate random symbols and apply 16-QAM modulation.

data = (0:15)';
modData = step(MOD,data);

Plot the 16-QAM constellation.

scatterplot(modData);
title(' Original Constellation')
xlim([-5 5])
ylim([-5 5])

Introduce a phase offset using the step method of PFO and plot the offset constellation. Note that it has been shifted 30 degress.

impairedData = step(PFO,modData);
scatterplot(impairedData);
title('Constellation after phase offset')
xlim([-5 5])
ylim([-5 5])

Algorithms

This object implements the algorithm, inputs, and outputs described on the Phase/Frequency Offset block reference page. The object properties correspond to the block parameters, except:

The object provides a SampleRate property, which you must specify. The block senses the sample time of the signal and therefore does not have a corresponding parameter.
Was this topic helpful?