Main Content

comm.PhaseFrequencyOffset

Apply phase and frequency offsets to input signal

Description

The comm.PhaseFrequencyOffset System object™ applies phase and frequency offsets to an input signal.

To apply phase and frequency offsets to an input signal:

  1. Create the comm.PhaseFrequencyOffset object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

pfo = comm.PhaseFrequencyOffset creates a phase and frequency offset object.

pfo = comm.PhaseFrequencyOffset(Name=Value) specifies additional properties using name-value arguments. For example, comm.PhaseFrequencyOffset(SampleRate=20) creates a phase and frequency offset object and sets a sample rate of 20 Hz. You can specify additional name-value pair arguments in any order as (Name1=Value1,...,NameN=ValueN).

example

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Phase offset in degrees, specified as a scalar, vector, or matrix. For more information, see Interdependent Property-Input Dimensions.

Tunable: Yes

Frequency offset source, specified as one of these values.

  • "Property" — Specify the frequency offset using the FrequencyOffset property.

  • "Input port" — Specify the frequency offset in the fOffset input argument.

Frequency offset in Hz, specified as a scalar, vector, or matrix. For more information, see Interdependent Property-Input Dimensions.

Tunable: Yes

Dependency

To enable this property, set the FrequencyOffsetSource property to "Property".

Sample rate of the input signal in Hz, specified as a positive scalar.

Usage

Description

Y = pfo(X) applies phase and frequency offsets to an input signal. To use this syntax, set the FrequencyOffsetSource to "Property".

example

Y = pfo(X,fOffset) specifies the frequency offset to apply to X. To use this syntax, set the FrequencyOffsetSource to "Input port".

Input Arguments

expand all

Input signal, specified as a scalar, vector, or matrix. For more information, see Interdependent Property-Input Dimensions.

Data Types: single | double

Frequency offset in Hz, specified as a scalar, vector, or matrix. For more information, see the description of the FrequencyOffset property and Interdependent Property-Input Dimensions.

Dependency

To enable this input, set the FrequencyOffsetSource property to "Input port".

Data Types: single | double

Output Arguments

expand all

Output signal, returned with the same dimensions and data type as X.

Data Types: single | double

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

collapse all

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

Create a phase frequency offset System object™, setting the phase offset to 30 degrees.

pfo = comm.PhaseFrequencyOffset(PhaseOffset=30);

Generate random symbols and apply 16-QAM modulation.

M = 16;
data = (0:M-1)';
x = qammod(data,M);

Plot the 16-QAM constellation.

scatterplot(x);
title("Original Constellation")
xlim([-5 5])
ylim([-5 5])

Figure Scatter Plot contains an axes object. The axes object with title Original Constellation, xlabel In-Phase, ylabel Quadrature contains a line object which displays its values using only markers. This object represents Channel 1.

Introduce a phase offset and plot the offset constellation.

y = pfo(x);
scatterplot(y);
title("Constellation After Phase Offset")
xlim([-5 5])
ylim([-5 5])

Figure Scatter Plot contains an axes object. The axes object with title Constellation After Phase Offset, xlabel In-Phase, ylabel Quadrature contains a line object which displays its values using only markers. This object represents Channel 1.

More About

expand all

Algorithms

If the input signal is u(t), then the output signal is

y(t)=u(t)(cos(2π0tf(τ)dτ+φ(t))+jsin(2π0tf(τ)dτ+φ(t))),

where f(t) is the frequency offset, and φ(t) is the phase offset.

The discrete-time output is given by

y(0)=u(0)(cos(φ(0))+jsin(φ(0))) and y(i)=u(i)(cos(2πn=0i1f(n)Δt+φ(i))+jsin(2πn=0i1f(n)Δt+φ(i))),

where i > 0, and Δt is the sample time.

Extended Capabilities

Version History

Introduced in R2012a