0
$\begingroup$

My setup is as follows:

I have an R&S SMW signal generator which generates a 100 MHz 5G New Radio signal. The signal is passed through a channel emulator which has components like Digital-To-Analog converters, Downconverters, and Upconverts that cause a roll-off in the spectrum which gets worse at the band edges. The channel emulator in this setup is not emulating any channel and just passes the signal through. The spectrum of the signal coming out from the Channel emulator is observed at the Vector Signal Analyser and it looks like this:

enter image description here

But, when I plot the spectrum of the time series signal captured from the channel emulator using Matlab pwelch function, I see the following:

enter image description here

I'm trying to understand the discrepancy between the two spectral estimates. Why do I see an inversion of the roll-off in the matlab pwelch spectrum?

The following is the Matlab function that plots the power spectrum:

function plotSpectrum(waveform, Fs, varargin)

FsMHz = Fs/1e6;
freqrange = 'centered'; %'onesided' | 'twosided' | 'centered'
spectrumtype = 'power'; %'psd' (default) | 'power'
[PowerSpectrum,W] = pwelch(waveform, [], [], 4096, FsMHz, freqrange, spectrumtype);
if ~strcmp(freqrange,'centered')
   PowerSpectrum = fftshift(PowerSpectrum);
end

figure;
%plot([-2048:2047]*Fs/(4096),10*log10(fftshift(PowerSpectrum)),'b');
plot(W,10*log10((PowerSpectrum)),'b',W,10*log10(sgolayfilt(PowerSpectrum,41,501)),'r','LineWidth',2);


xlabel('frequency, MHz');
ylabel(spectrumtype);
if nargin>2
   title_text = varargin{1}; 
   title(title_text);
else
    title('NR Waveform');
end
legend('Original Spectrum', 'Smoothed Spectrum');
axh=gca;
grid on;
set(axh,'GridLineStyle','-');
grid minor;

end
$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.