Main Content

comm.PhaseFrequencyOffset

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. 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 System object™. This object applies phase and frequency offsets to an input signal.

example

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

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 numeric scalar, an M-by-1 or 1-by-N numeric vector, or an M-by-N numeric matrix. For more information, see Interdependent Property-Input Dimensions.

Tunable: Yes

Data Types: double

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 numeric scalar, a numeric row or column vector, or a numeric matrix.

For more information, see Interdependent Property-Input Dimensions.

Tunable: Yes

Dependency

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

Data Types: double

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

Data Types: double

Usage

Description

example

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

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 numeric scalar, a numeric row or column vector, or a numeric matrix. For more information, see Interdependent Property-Input Dimensions.

Data Types: single | double

Frequency offset in Hz, specified as a numeric scalar, a numeric row or column vector, or a numeric 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