Main Content

phaseNoiseMeasure

R2026b

Measure and plot phase noise profile of input signal

Description

PNMeasure = phaseNoiseMeasure(Xin,Yin,RBW,FrOffset,PlotOption,tag,Name,Value) measures the single-sideband phase noise levels of an input signal at the specified frequency offset points. The input signal can be a time-domain signal, a frequency domain signal, or direct zero-crossing timestamps. If you are using zero-crossing points as input data, they should capture both the rising and falling edges.

The function also plots phase noise profile at the specified frequency offset points when you specify the PlotOption argument as 'on'.

PNMeasure = phaseNoiseMeasure(___,PNTarget,Name=Value) in addition to the input arguments in the previous syntax compares phase noise levels at the specified frequency offsets to a target phase noise profile. Set the PlotOption argument to 'on' to plot and compare the measured phase noise profile to the target profile.

[PNMeasure,GenFrOffset,GenPN] = phaseNoiseMeasure(___) additionally returns the phase noise waveform data represented by the frequency offset vector and the corresponding phase noise vector.

Examples

collapse all

Load the power spectrum data (frequency and power vectors) of the signal obtained from spectrum analysis attached with this example.

load frequency.mat;
load corresponding_power.mat;

Set the resolution bandwidth of the spectrum analysis to 25 kHz. The target phase noise profile corresponding to the frequency offset points is:

Frequency Offset

Target Phase Noise (dBc/Hz)

30e3

-56

100e3

-106

1e6

-132

3e6

-143

10e6

-152

rbw = 25e3;
FrOffset = [30e3 100e3 1e6 3e6 10e6];
PNTarget = [-56 -106 -132 -143 -152];

Use the phaseNoiseMeasure function to measure and plot the phase noise profile.

PNMeasure = phaseNoiseMeasure(f1,p1,rbw,FrOffset,'on','Phase noise', PNTarget)

Figure Phase Noise Analysis (Phase noise) contains 2 axes objects. Axes object 1 with title Power Spectrum, xlabel Frequency (GHz), ylabel Power (dBm) contains 2 objects of type line, text. Axes object 2 with title Phase Noise, xlabel Frequency offset (Hz), ylabel Phase noise (dBc/Hz) contains 2 objects of type line. These objects represent Measured, Target.

PNMeasure = 1×5

  -70.8795 -106.2594 -136.6468 -147.3779 -157.0967

Load the time domain signal represented by the time and signal value vectors attached with this example.

load time_1.mat;
load signal_1.mat;

Set the resolution bandwidth of the spectrum analysis to 75 kHz. The target phase noise profile corresponding to the frequency offset points is:

Frequency Offset (Hz)

Target Phase Noise (dBc/Hz)

100e3

-130

300e3

-140

500e3

-135

1e6

-130

3e6

-140

10e6

-155

rbw = 75e3;
FrOffset = [100e3 300e3 500e3 1e6 3e6 10e6];
PNTarget = [-130 -140 -135 -130 -140 -155];

Use the phaseNoiseMeasure function to measure and plot the phase noise profile.

[PNMeasure] = phaseNoiseMeasure(t,x,rbw,FrOffset,'on','Phase noise',PNTarget,Type='Time',Histogram='on')

Figure contains an axes object. The axes object with title Histogram of Signal's Half-Period Data contains an object of type histogram.

Figure Phase Noise Analysis (Phase noise) contains an axes object. The axes object with title Phase Noise No. of Averages = 3 Center Frequency = 70.0001 MHz, xlabel Frequency offset (Hz), ylabel Phase noise (dBc/Hz) contains 2 objects of type line. These objects represent Measured, Target.

PNMeasure = 1×6

 -116.0947 -138.8840 -135.6692 -133.4506 -135.8644 -104.3224

Load the measured zero-crossing timestamps from the phase_noise_zc_data.mat file attached with this example.

data = load("phase_noise_zc_data.mat");
zcData = unique(data.out.simout.Data);

Set the resolution bandwidth of the spectrum analysis to 60 kHz. The target phase noise profile corresponding to the frequency offset points is:

Frequency Offset (Hz)

target Phase Noise (dBc/Hz)

100e3

-106

1e6

-132

3e6

-143

10e6

-152

rbw = 60e3;
FrOffset = [100e3 1e6 3e6 10e6];
PNTarget = [-106 -132 -143 -152];

Use the phaseNoiseMeasure function to measure and plot the phase noise profile.

[PNMeasure] = phaseNoiseMeasure(zcData,[],rbw,FrOffset,'on','Phase noise',PNTarget,Type='ZeroCrossing')

Figure Phase Noise Analysis (Phase noise) contains an axes object. The axes object with title Phase Noise No. of Averages = 2 Center Frequency = 2.7 GHz, xlabel Frequency offset (Hz), ylabel Phase noise (dBc/Hz) contains 2 objects of type line. These objects represent Measured, Target.

PNMeasure = 1×4

  -99.3343 -129.8329 -138.1230 -147.6752

Input Arguments

collapse all

Input data, specified as a positive real vector.

  • If you specify 'Type' argument as 'Time' for waveform processing, Xin is a time vector in seconds.

  • If you specify 'Type' argument as 'Frequency' for spectrum processing, Xin is a frequency vector in hertz.

  • If you specify 'Type' argument as 'ZeroCrossing' for direct precision, Xin is a vector containing the direct zero-crossing timestamps including both rising and falling edges.

Data Types: double

Signal values, specified as a real vector.

  • If you specify 'Type' argument as 'Time' for waveform processing, Yin is an instantaneous signal value vector in volts.

  • If you specify a frequency-domain signal or 'Type' argument as 'Frequency' for spectrum processing, Yin is a power vector in dBm.

  • If you specify 'Type' argument as 'ZeroCrossing' for direct precision, Yin must be an empty vector [].

Data Types: double

Resolution bandwidth used in the spectrum analysis, specified as a positive real scalar in hertz. RBW defines the smallest positive frequency at which the frequency components of a signal can be resolved.

Data Types: double

Frequency offset points at which phase noise levels are calculated, specified as a positive real vector in hertz.

Data Types: double

Plot the phase noise analysis results in a figure, specified as on or off. Set PlotOption to 'on' to view the power spectrum and phase noise profile plots. If the Name-Value pair argument 'Type' is specified as 'Time', you can only plot the phase noise profile of the time-domain signal.

Data Types: char

Figure identifier, specified as a string scalar or a character vector. Tag figures to keep multiple plots open as you change the simulation parameters.

Data Types: char | string

Target phase noise levels corresponding to the frequency offset points defined in FrOffset, specified as real vector in dBc/Hz. To compare PNTarget with PNMeasure, set PlotOption argument to on to view the phase noise comparison plot.

Data Types: double

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: PNMeasure = phaseNoiseMeasure(f1,p1,rbw,FrOffset,'on','Phase noise', PNTarget,'Type','Frequency','Histogram','on')

Type of the input signal, specified as the comma-separated consisting of 'Type' and one of the following:

  • 'Time' if the input signal contains time domain data.

  • 'Frequency' if the input signal contains power spectrum data.

  • 'ZeroCrossing' if the input signal contains direct zero-crossing timestamps.

Plot the histogram of the half-period information for the time-domain signal, specified as the comma-separated pair consisting of 'Histogram' and 'off' or 'on'. You can plot the histogram only when 'Type' is specified as 'Time'.

Output Arguments

collapse all

Measured single-sideband phase noise levels corresponding to frequency offset points defined in FrOffset, returned as a real vector in dBc/Hz. You can compare PNMeasure with the target phase noise levels with PNTarget defined in the function.

Data Types: double

Frequency offset points generated by the phaseNoiseMeasure function that are used to plot the phase noise profile, returned as a vector.

Data Types: double

Phase noise values generated by the phaseNoiseMeasure function that are used to plot the phase noise profile, returned as a vector. Each element in GenPN represents the phase noise at the corresponding frequency offset point represented in GenFrOffset.

Data Types: double

Version History

Introduced in R2020a