I am trying to compare power spectral density values (obtained from dsp.SpectrumAnalyzer) with PSD values obtained from hardware which has a VSA. MATLAB's documentation says that " The power spectral density is the magnitude squared of the spectrum normalized to a bandwidth of 1 hertz." and expressed in dBm/Hz
whereas the hardware expresses PSD in units dBm/RBW per 100 kHz So,I'm assuming that it is normalized w.r.t 100Khz bandwidth
This is an example snippet of hardware's vsa( not my actual output)
Do I need to do any kind of conversion or something in terms of PSD ? For ex: dBm-->mW--> multiply by 100e3 something like that to properly compare? Kind of confused with these units. MATLAB's output is off by approx 20 dBm
EDIT>>>
0) RBW is set to 100KHz on hardware and in MATLAB too 1) I'm guessing there is a factor 100 which I need to multiply to PSD in mW to make it similar, but not sure why I need to do that
2)The reference load for matlab is set to 1 ohm by default, whereas hardware (litepoint ) reference impedance is 50 ohms
3) Updating basic specAnalyzer code in matlab if that helps in understanding
nSpectralAverages = 3;
specAnalyzer = dsp.SpectrumAnalyzer('SpectrumType','Power density',...
'SampleRate',fs);
specAnalyzer.FrequencySpan = 'Span and center frequency';
specAnalyzer.Span = psdSpanLpVSA;
specAnalyzer.SpectralAverages = nSpectralAverages;
% Resolution Bandwidth
specAnalyzer.RBWSource = 'Property';
specAnalyzer.RBW = resolutionBandwidthHz;
specAnalyzer.AveragingMethod = 'Exponential';
specAnalyzer.ForgettingFactor = 1;
% Run the spec An and get collective result
specAnalyzer(WiFi_iqData_bw20MHz);
specData = specAnalyzer.getFramework.Visual;
I'm using exponential averaging method as its pretty clean and similar to litepoint's output
4) My other question is: Can I even compare outputs directly like this? Or should I just add the difference in spectrum peaks and then compare (after adding 50 Ohms to the MATLAB's output)
EDIT 5) I have converted dB/Hz (which matlab provides) to dBm/100Khz for comparison and also calculated power values for 50 ohm
Pwr in dBm/Hz --> convert to mW --> multiply by 10000/50 (100e3 for 100KHz and 50 for 50 ohms conversion) --> then reconvert to dBm
Here is the output
Any comments /suggestions
Thanks