Hi,
I am currently using the pwelch function to simulate the spectrum of an OFDM signal.
Note: I used random numbers, QPSK modulation, zero padding and finally IFFT to obtain my OFDM signal.
fsMHz = 80;
Len = length(ofdm_signal);
[Pxx,f] = pwelch(ofdm_signal,[],[],Len,fsMHz);
plot([-(Len/2):((Len/2)-1)]/1024,10*log10(fftshift(Pxx)));
Resulting in:
As you can see on the PSD axis, the highest point is at around -50dBr.
I also did some calculations and I came up with the following:
Re = real(ofdm_signal); % Real part of the signal.
Im = imag(ofdm_signal); % Imaginary part of the signal.
Power = Re.*Re+Im.*Im; % Calculating Power.
AvgP = sum(Power)/Len; % Calculating Average Power.
AvgP_db = 10*log10(AvgP); % Average Power in dB.
PeakP = max(Power); % Calculating Peak Power.
PeakP_db = 10*log10(PeakP); % Peak Power in dB.
PAPR_db = 10*log10(PeakP/AvgP); % PAPR in dB.
disp(['Average Power1 = ' num2str(AvgP)]);
disp(['Average Power1 (dB) = ' num2str(AvgP_db)]);
disp(['Peak Power = ' num2str(PeakP)]);
disp(['Peak Power (dB) = ' num2str(PeakP_db)]);
disp(['PAPR (dB) = ' num2str(PAPR_db)]);
Which resulted in:
Average Power = 0.00024414
Average Power (dB) = -36.1236
Peak Power = 0.0020307
Peak Power (dB) = -26.9235
PAPR (dB) = 9.2001
What I want to know is whether there is a way to scale that PSD axis so that the highest point is around 0dB, as frequently used in theory. Here are some pictures of what I'm trying to do.
Please help me out here.
Looking forward to your answers.

 採用された回答

Honglei Chen
Honglei Chen 2013 年 9 月 30 日
編集済み: Honglei Chen 2013 年 9 月 30 日

0 投票

You just need to normalize it, for example
plot([-(Len/2):((Len/2)-1)]/1024,10*log10(fftshift(Pxx/max(Pxx))));
and
AvgP_db = 10*log10(AvgP/max(AvgP))

2 件のコメント

Jean-luc
Jean-luc 2013 年 9 月 30 日
Thank you so much Honglei Chen.
What you're trying to tell me is that I need to normalize my average power too, right?
Honglei Chen
Honglei Chen 2013 年 9 月 30 日
No, I'm just saying if you want to get 0dB, you can just normalize it. If you want the true average power, you should not normalize it. Sorry for the confusion.

サインインしてコメントする。

その他の回答 (1 件)

Wayne King
Wayne King 2013 年 9 月 30 日
編集済み: Wayne King 2013 年 9 月 30 日

0 投票

Can't you just scale the PSD estimate, Pxx, by the maximum value?
You did not provide your OFDM signal, so I'll just create a signal here
Fs = 1000;
t = 0:0.001:1;
x = cos(2*pi*100*t)+randn(size(t));
[Pxx,F] = pwelch(x,300,250,512,Fs);
maxval = max(Pxx);
Pxx = Pxx./maxval;
plot(F,10*log10(Pxx))

1 件のコメント

Jean-luc
Jean-luc 2013 年 9 月 30 日
Thank you Wayne King, it didn't occurred to me to divide by the max value.
If you don't mind;
Why did you use window as 300 and nonoverlap as 250?

サインインしてコメントする。

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by