Hello,
We set 2 subarrays of the Stingray as Tx and 2 subarrays as Rx. Then, we directly test the Tx signal and Rx signal on the Stingray board using an oscilloscope. The connection is as follows:
In this experiment, we utilized the normal mode without TDD. However, we observed that the waveform returned by the target at different depths only alters the intensity of the RX signal, indicating no time shift of the RX signal. Consequently, the returned signal fails to indicate the target depth. Please refer to the video (the yellow one represents Tx, and the green one represents Rx):
Then, we test another RX port which is not connected to an antenna (the third port from left to right in the second picture above). Theoretically, this RX port cannot receive any signal from free space, but we detect the same signal as in the video above. Does it mean the Stingray has something wrong? How can we solve this problem?
The following is our control code:
clear all, close all, clc %% Array Mapping %verify element maps correctly to hardware! subarray = ... [[1 2 5 6 9 10 13 14];... %subarray 1 [3 4 7 8 11 12 15 16];... %subarray 2 [19 20 23 24 27 28 31 32];... %subarray 3 [17 18 21 22 25 26 29 30]]'; %subarray 4 subarray_ref = [2 4 18 20]; %subarray reference elements dac_map = [4 3 2 1]; %DAC map to subarray dac_ref = 20; %DAC reference channel adc_map = [4 1 2 3]; %ADC map to subarray adc_ref = 4; %ADC reference channel %% Config Dev Kit uri = 'ip:192.168.0.101'; %uri = 'ip:169.254.183.161'; amplitude = 2^15*db2mag(-6); %Tx Baseband Amplitude [dBFS] interFreq = 4.5e9; %Tx NCO Frequency [Hz] fs_TxIQ = 250e6; %Tx Decimated IQ Sample Rate [Hz] periods = 4; %Desired Number Of Periods For Tx Signal basebandFreq = fs_TxIQ/periods; %Baseband Frequency [Hz] %Setup AD9081 Tx tx = adi.AD9081.Tx; tx.uri = uri; tx.EnabledChannels = [1 2 3 4];%Enabled Tx Channels, Only Needed for DMA tx.SamplesPerFrame = 2^15; %Number Of Samples tx.NCOEnables = ones(1,numel(tx.EnabledChannels)); tx.ChannelNCOGainScales = ones(1,numel(tx.EnabledChannels)).*0.5; %MxFE0 Digital Gain Code %DMA Configuration tx.DataSource = 'DMA'; %'DMA' or 'DDS' tx.EnableCyclicBuffers = 1; %0: Don't Cycle Tx Waveform, 1: Cycle Tx Waveform tx.DDROffloadEnable = 1; swv1 = dsp.SineWave(amplitude, basebandFreq); swv1.ComplexOutput = true; swv1.SamplesPerFrame = tx.SamplesPerFrame; swv1.SampleRate = fs_TxIQ; y = swv1(); y(1:tx.SamplesPerFrame/4) = 0; waveform = ones(tx.SamplesPerFrame,numel(tx.EnabledChannels)).*y; release(tx) tx.MainNCOFrequencies = ones(1,numel(tx.EnabledChannels))*interFreq; %NCO Frequency tx.MainNCOPhases = zeros(1,numel(tx.EnabledChannels)); %NCO Phase % Setup ADAR1000EVAL1Z in Tx Mode sray = adi.Stingray; sray.uri = uri; sray.Mode(2,:) = {'Tx'}; %set mode, 'Rx', 'Tx, 'Disabled' txPhaseCalOffsets = zeros(size(sray.TxGain)); sray.TxAttn(3:4,:) = 1; %1: Attenuation Off, 0: Attenuation On sray.TxGain(3:4,:) = 127; %127: Highest Gain, 0: Lowest Gain, Decimal Value sray(); %Stingray Constructor sray.SteerTx(0,0,txPhaseCalOffsets); %Broadside sray.LatchTxSettings; %Latch settings to devices %Setup ADXUD1AEBZ, %Tx Mode sray.TXRX0 = 0; %0: RX, 1: TX Subarray 4 sray.TXRX1 = 1; % Subarray 3 sray.TXRX2 = 1; % Subarray 2 sray.TXRX3 = 0; % Subarray 1 % sray.RxGainMode = 0; %0: Low Gain, 1: High Gain, RX Mode only sray.ADF4371Frequency = 14.6e9; %program if using on-board LO PLL sray.PllOutputSel = 1; %1: ADF4371 RF1 (8 GHz to 16 GHz), 0: ADF4371 RF2 (16 GHz to 32 GHz) sray.PABiasOn(3:4,:) = -1.06; sray.TxPAEnable(2,:) = true; %sray.TxPowerDown(3:4,:) = true; %Disable all channels for TX %% Rx fs_RxTxIQ = 250e6; %I/Q Data Rate in MSPS %Setup AD9081 RX rx = adi.AD9081.Rx; rx.uri = uri; rx.EnabledChannels = [1 2 3 4]; rx.MainNCOFrequencies = ones(1,4)*490e6; %NCO Frequency rx.SamplesPerFrame = 2^15; %Number Of Samples To Capture: 4096 rx.kernelBuffersCount = 1; %Number Of Buffers To Subsequently Capture rx.EnablePFIRs = true; %MxFE pFIR Configuration; false: Don't Use pFIRs, true: Use pFIRs rx.PFIRFilenames = 'disabled.cfg'; %MxFE0 pFIR File data = rx(); %Initialize The Rx System; Grab The Rx Data Into 'data' Matrix rx.setRegister(hex2dec('FF'),'19'); %Fine DDC Page rx.setRegister(hex2dec('61'),'283'); %Fine DDC Control, bypass fine NCO % Setup ADAR1000EVAL1Z in RX Mode rxPhaseCalOffsets = zeros(size(sray.RxGain)); sray.Mode(1,:) = {'Rx'}; %set mode, 'Rx', 'Tx, 'Disabled' sray.RxAttn(1:2,:) = 1; %1: Attenuation Off, 0: Attenuation On sray.RxGain(1:2,:) = 127; %127: Highest Gain, 0: Lowest Gain, Decimal Value %sray(); %constructor to write properties to hardware sray.SteerRx(0,0,rxPhaseCalOffsets); %Broadside sray.LatchRxSettings; %Latch SPI settings to devices %Setup ADXUD1AEBZ, %Rx High Gain Mode sray.RxGainMode = 1; %0: Low Gain, 1: High Gain - RX Mode only %% tx(waveform); sray.TxPowerDown(3:4,:) = false; %Enable all channels for TX sray.RxPowerDown(1:2,:) = false; %Enable RX Channels fig = figure('Position', [100, 100, 900, 600]); % [left, bottom, width, height] for i=1:10 data = rx(); %capture data from ADCs, 4096x4 matrix %Calculate FFT of sample domain data for frequency response plots hanningWindow = hanning(rx.SamplesPerFrame); hanNoiseEqBw = enbw(hanningWindow); scalingFactor = sqrt(hanNoiseEqBw)*(rx.SamplesPerFrame/2)*2^15; complexData = data./scalingFactor; windowedData = complexData.*hanningWindow; clf; sgtitle(['Time:', num2str(i)]) subplot(2,2,1) plot(real(data(:,adc_map(1)))) title('Real Value Sample Domain: Subarray 1, ADC3') xlabel('Sample Number') ylabel('ADC Code Value') ylim([-32768 32768]); yticks(linspace(-2^15, 2^15, 11)); yticklabels({'-32768' '-26214' '-19661' '-13107' '-6554' '0' '6554' '13107' '19661' '26214' '32768'}); xlim([0 2^15]); grid on; subplot(2,2,2) plot(real(data(1:4000,adc_map(2)))) title('Real Value Sample Domain: Subarray 2, ADC1') xlabel('Sample Number') ylabel('ADC Code Value') ylim([-32768 32768]); yticks(linspace(-2^15, 2^15, 11)); yticklabels({'-32768' '-26214' '-19661' '-13107' '-6554' '0' '6554' '13107' '19661' '26214' '32768'}); xlim([0 2^15]); grid on; subplot(2,2,3) plot(real(data(:,adc_map(3)))) title('Real Value Sample Domain: Subarray 3, ADC0') xlabel('Sample Number') ylabel('ADC Code Value') ylim([-32768 32768]); yticks(linspace(-2^15, 2^15, 11)); yticklabels({'-32768' '-26214' '-19661' '-13107' '-6554' '0' '6554' '13107' '19661' '26214' '32768'}); xlim([0 2^15]); grid on; subplot(2,2,4) plot(real(data(:,adc_map(4)))) title('Real Value Sample Domain: Subarray 4, ADC2') xlabel('Sample Number') ylabel('ADC Code Value') ylim([-32768 32768]); yticks(linspace(-2^15, 2^15, 11)); yticklabels({'-32768' '-26214' '-19661' '-13107' '-6554' '0' '6554' '13107' '19661' '26214' '32768'}); xlim([0 2^15]); grid on; pause(0.001) end sray.RxPowerDown(1:2,:) = true; %Disable Rx channels sray.TxPowerDown(3:4,:) = true; rx.release; tx.release;
Thanks!
Dongyu