How to scale PSD/Pwelch highest point to 0dB?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Wayne King
le 30 Sep 2013
Modifié(e) : Wayne King
le 30 Sep 2013
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 commentaire
Jean-luc
le 30 Sep 2013
Catégories
En savoir plus sur Spectral Estimation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!