# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# comm.PhaseFrequencyOffset System object

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.

### 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.

## 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

 step Apply phase and frequency offsets to input signal
Common to All System Objects
`clone`

Create System object with same property values

`getNumInputs`

Expected number of inputs to a System object

`getNumOutputs`

Expected number of outputs of a System object

`isLocked`

Check locked states of a System object (logical)

`release`

Allow System object property value changes

## Examples

expand all

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.

```qamModulator = comm.RectangularQAMModulator('ModulationOrder',16); pfo = comm.PhaseFrequencyOffset('PhaseOffset',30);```

Generate random symbols and apply 16-QAM modulation.

```data = (0:15)'; modData = qamModulator(data);```

Plot the 16-QAM constellation.

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

Introduce a phase offset using `pfo` and plot the offset constellation. Note that it has been shifted 30 degress.

```impairedData = 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.