Forum Replies Created
- AuthorPosts
MZhanParticipantMZhan January 28, 2022 at 12:24 pm in reply to: Calibration/Correction in MATLAB I/Q Data //php bbp_reply_id(); ?>
Code is below:
sm = SMIQReceiver(‘Networked’, ‘192.168.2.10’);
fprintf(‘Open Status: %s\n’, sm.getstatusstring());
fprintf(‘SN = %d\n’, sm.SerialNumber);captureDuration = 10e-3;
sm.CenterFrequency = 2.4e9;
sm.DecimationFactor = 2;
sm.SoftwareFilterEnabled = 1;
sm.Bandwidth = sm.samplerate() * 0.8;
sm.RefLevel = 0;
sm.PreselectorEnabled = 0;
sm.OutputFormat = ‘non-interleaved’;
Fs = sm.samplerate();
captureSamps = sm.samplerate() * captureDuration;sm.start();
iqData = sm.recv(captureSamps, true);
correction = sm.getcorrection();
sm.stop();RBW = 100e3;
NFFT = round(Fs/RBW);
freq = [-floor(NFFT/2) : ceil(NFFT/2)-1] * Fs/NFFT;
freq = freq(1:NFFT) + sm.CenterFrequency;
Pxx = fftshift(pwelch(iqData, NFFT, NFFT/2, NFFT, Fs));
power = 10*log10(Pxx*RBW);
plot(freq, power)
MZhanParticipantMZhan January 27, 2022 at 5:02 pm in reply to: Calibration/Correction in MATLAB I/Q Data //php bbp_reply_id(); ?>
Understood. The perplexing thing is that we are getting frequency-dependent differences between our conversion to dBm in MATLAB and the spike results. The following is for a tone from a sig gen at -30 dBm. I recorded the correction factor for SA but did not apply it. If it were a simple scaling issue, but the calibration is already correctly applied in the float data, I would expect a consistent offset.
Frequency (MHz) MATLAB Spike Correction Factor
400 -30.5 -30.44 0.2907
1000 -31.47 -30.27 0.2586
2000 -34.26 -30.49 0.2422
3000 -31.81 -31.08 0.2457
4000 -30.96 -31.05 0.2539
5000 -32.34 -31.43 0.2505- AuthorPosts