Why the calculated phase differs so much from the real phase of the signal?

14 views (last 30 days)
Hi guys,
I have a small question regarding my code below. In my code I create a complex signal E1 solely consisting of the phase noise phi. My question is how to obtain the correct values for phi? My idea was to create the FFT of my signal E1 and then simply calculating the phase of the FFT by using the angle() function.
But plotting phi and phi_ang (phase obtain with angle function) shows that both phase vectors differ enormously.
I hope you can help me with my question.
Kind regards
Janko
The code:
clear
clc
N = 10000000;
wn = randn(N,1);
phi = cumsum(wn);
E1 = exp(1i*phi);
E1_fft = fftshift(fft(E1));
phi_ang = angle(E1_fft);
plot(phi)
hold on
plot(unwrap(phi_ang))

Accepted Answer

William Rose
William Rose on 5 Feb 2024
The DFT expresses a signal x(k) as a sum of sinusoids, each of which is sampled at regular intervals. The phase angles of the elements of the DFT are the phases of the individual sinusoidal components, at t=0.
Your signal can be thought of as a regularly sampled signal whose phase advances by a random amount (forward or backward) with each timestep. Thus phi is a random walk with Gaussian steps. The phase angles (phi) of the random walk are not equal to the phase angles of the sinusoids which, when added up, will equal x(k).
  19 Comments
Janko
Janko on 13 Feb 2024
thank you very much for the help and the detailed answers!
I will for sure look into the hilbert transformation!
And thank you for providing me the frequencyNoise script!
Here is the link to the paper I've mentioned above: https://doi.org/10.1364/OE.20.005291
(Kazuro Kikuchi, "Characterization of semiconductor-laser phase noise and estimation of bit-error rate performance with low-speed offline digital coherent receivers," Opt. Express 20, 5291-5302 (2012))
Thank you again for your time!
Kind regards
Janko

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!