I'm trying to understand why a waveform uploaded to the Pluto's internal memory and then transmitted continuously would result in a received waveform with an apparent arbitrary phase shift.
Below is a Matlab plot showing the transmitted waveform using the transmitRepeat() function and the resulting received waveform. The waveform simply consists of two CW tones at 10 and 20 KHz summed together. It appears as though the received waveform is correct, but that a phase shift was added to one of the tones.
Matlab code I used to configure the radio and generate the figure above is shown below
% Clear Environment
% Set Properties
CarrierFreq = 1e9; % 1 GHz
samples = 10e3; % Number of total samples
fs = 1e6; % 1 Msps
f1 = 10e3; % 10 KHz tone
f2 = 20e3; % 20 KHz tone
% Define Timebase
t = 0:1/fs:1/fs*(samples-1);
% Build a complex waveform from two CW tones
cw1 = (0.1 * (cos(2*pi*f1*t) - j*sin(2*pi*f1*t)))';
cw2 = (0.1 * (cos(2*pi*f2*t) - j*sin(2*pi*f2*t)))';
tx_waveform = cw1 + cw2;
% Initialize SDR
% Initialize SDR Receiver Functionality
radio_rx = sdrrx('Pluto',...
% Initialize SDR Transmit Functionality
radio_tx = sdrtx('Pluto',...
'RadioID', ' usb:0',...
% Trigger transmit of on device stored waveform
% Command Window feedback
% ---- RUN LOOP ----
% Create Figure
runtime = tic;
while toc(runtime) < 60 % run for 1 minute
% Receive Radio Samples
rx_waveform = radio_rx();
% Plot snippet of TX and RX waveform
% Wait 1 second
% Release Pluto resources and exit
- I've tested this in two configurations. First with direct loop back with the supplied coax cable hooking up TX to RX directly on the Pluto. Second, I've run the TX through a splitter with one output going directly back to the Pluto RX port, and the other going into a spectrum analyzer. The spectrum analyzer shows two steady tones, but I can't tell if the phase shift is present or not.
- If I'm literally copying the same sample used to generate the Matlab plot into the Pluto's memory to generate the waveform, how could a phase shift be introduced? I can understand if the amplitude would be different, or if there was added noise, but I can't explain this.
- 'testScript.m" - A simple matlab script demonstrating this. Hook up the Pluto to a computer and connect a coax between the TX and RX port. The script will run for approximately 1 minute and the received waveform will update at about once a second and you'll (presumably) see the same thing in the picture above.
I appreciate any feedback or suggestions you may have. Thank You,