0
$\begingroup$

I have an OFDM signal x, generated using QAM modulation, I first use the command in matlab y1 = ifft(x); to generate the time-domain signal. Then when I plot the PSD, I get that figure in the right of below picture. On the other hand, when I generate the time-domain signal using y2 = F’*x; where F = dftmtx(N)/sqrt(N); and N is the length of subcarriers, I get the PSD plot as shown on the left of picture!
However (y1 – y2) is almost 0, why do we get that difference ? Which one is correct? NP: What is strange for me is the difference between the two ways however the signal is the same.

enter image description here

$\endgroup$
7
  • $\begingroup$ @DanBoschen I am asking why do I get that difference. However i almost use the same way to plot the PSD .. The way of ploting the PSD is OK and I agree with the explanation you shared, but I couldn't understand the difference shown above. $\endgroup$
    – Sajjad
    Commented Apr 14, 2022 at 1:56
  • $\begingroup$ @Sajjad It looks like on the right-hand side you're plotting only half the spectrum. $\endgroup$
    – MBaz
    Commented Apr 14, 2022 at 2:00
  • $\begingroup$ @DanBoschen I only use ifft(x), I don't use what you mentioned y1 = ifftshift (ifft(x)). $\endgroup$
    – Sajjad
    Commented Apr 14, 2022 at 2:08
  • $\begingroup$ @MBaz but also y axis is different, the right one is between 20 - 40 while the other one between 0 - 60. $\endgroup$
    – Sajjad
    Commented Apr 14, 2022 at 2:09
  • 1
    $\begingroup$ @DanBoschen Pxx=periodogram(x); Hpsd=dspdata.psd(Pxx,'Fs',1.0000e+09); plot(Hpsd); I use this code to plot the PSD. 2- the signal x is real because I am using [0 x 0 flipud(conj(x))]; iso the output of ifft becomes real. $\endgroup$
    – Sajjad
    Commented Apr 14, 2022 at 2:25

1 Answer 1

1
$\begingroup$

The reason is the OP is using the MATLAB/Octave periodogram(X) function to plot the power spectral density and this function will return different results depending on if X is real or complex. When X is real-values, a one-sided spectrum will be estimated, but if X is complex-valued, or the optional 'RANGE" parameter is used to specify "twosided", then a full spectrum will be estimated.

For the one on the right, the data was truly real, and we get a one-sided spectrum result (although the frequency specified is twice as high). For the one on the left, the data was complex, even though the imaginary values were significantly small. The periodogram recognized the complex values and returns a two-sided spectrum as on the left.

$\endgroup$
1
  • $\begingroup$ Can you send code here for the psd? I need to plot psd in this way but don't know how just plot it using fft. $\endgroup$
    – Rosa Red
    Commented Jul 17, 2022 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.