dBc/Hz phase noise undefined function error?

I am trying to use phaseNoiseMeasure (https://www.mathworks.com/help/msblks/ref/phasenoisemeasure.html) function to find dBc/Hz from the time domain data. But it gives me an error as an undefined function.
I also have the FFT data in dB with me, which also probably can be used to fine the dBc/Hz.
In general, I want to find the phase noise in dBc/Hz by any means. But I am lost in how should I get there.

 Risposta accettata

Star Strider
Star Strider il 11 Ott 2020
In a Comment in how to find fwhm using fwhm()? , you requested that I look at this, so I will do what I can.
I do not have that blockset. However looking at the online documentation for the function, it woud appear that it would be possible to use the Savitzky-Golay filter function sgolayfilt the smooth out the noise in the phase signal. You can then use the differences, absolute differences, or squared differences from the observed phase to get some sort of metric from it. The documentation does not describe its calculations, so I have no idea what the output should be. I have no idea what it does or how it works, since this is the first time I learned of its existence.

4 Commenti

Ok is there any other way I can find the phase noise, let us from a handwritten code which doesn't need the blockset from file exchange?
This is the data which I am wanting to phase noise for
Actually, it’s not from the File Exchange, it’s a MathWorks product. I just don’t have it (and for most of what I do, likely don’t need it).
When I run:
D1 = readmatrix('small_data.csv');
figure
plot(D1(:,1), D1(:,2:end))
grid
xlim([0 1E+4])
the plot appears to be a magnitude plot (as it was previously), not a phase plot.
If you only have decibel values, reconstructing the phase is likely not an option, since the dB calculation loses the real and imaginary information necessary to calculate the phase.
If you have the original data, please post at least the first 150 frequencies (since those will include the first peak only), as well as the real and imaginary data for them. You can attach them as a .mat file (or some other compatible format) here, since that will be a small file.
If you want the data in units of index values instead of frequency, use the UI application (automatically in the plot function) with:
figure
plot(D1(1:500,2:end))
to get them. The ‘x’ values will be in terms of indices rather than frequencies.
.
I would llike to help, however I do not have tha blockset and I have no idea how it performs its calculations or what the results mean.

Accedi per commentare.

Più risposte (1)

Shanzeng Guo
Shanzeng Guo il 14 Mag 2021
I also try to use phaseNoiseMeasure function to find dBc/Hz from the time domain data. But I got error messages. Here is my code for this exercise:
=========================
close all;
% Specify the parameters of a signal with a sampling frequency of 1 kHz and a signal duration of 1.5 seconds.
Fs = 20000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 4000; % Length of signal samping points
t = (0:L-1)/Fs; % Time vector
pad=zeros(100,1);
%% LFM Signal -- A signal cotians two signals: f1, f2
fc=5000; % Hz
ffm=fc+800*t; % Hz
fam=0; %10;
theta=1; % important factor for umop
phs=1;
s1 = diag((1+0.5*cos(2*pi*fam*t))'*cos(2*pi*(ffm.*t)+phs*rand()/theta));
H = hilbert(s1');
% Plot the noisy signal in the time domain. It is difficult to identify the frequency components by looking at the signal X(t).
Y = fft(H); % compute FFT
% 1. Compute the two-sided spectrum P2.
% 2. Then compute the single-sided spectrum P1 based on P2
% 3. and the even-valued signal length L.
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
P1=normalize(P1,'range');
% Define the frequency domain f and plot the single-sided amplitude spectrum P1.
% The amplitudes are not exactly at 0.7 and 1, as expected, because of the added noise.
% On average, longer signals produce better frequency approximations.
f = Fs*(0:(L/2))/L; % The max frequency that can be measured, based on Nyquist
figure;
hold on;
plot(f,P1)
title('Single-Sided Amplitude Spectrum of s1(t)-LFM1')
xlabel('f (Hz)')
ylabel('|P1(f)|')
%%
f1=f';
p1=P1';
rbw = 1e3;
FrOffset = [1e3 2e3 4e3 4e3];
PNTarget = [-56 -106 -132 -143];
PNMeasure = phaseNoiseMeasure(f1,p1,rbw,FrOffset,'on','Phase noise', PNTarget)
=====
Any help is appreciated.

Prodotti

Release

R2020b

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by