Post Go back to editing

The Rx signal of stingray is not correct

Category: Hardware

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

  • Hi Dongyu, 

    The Stingray hardware you are using appears to be working fine. This board is designed to operate in half duplex mode and was not optimized to run in full duplex mode. Both the Tx and Rx channels are high gain so any EM leakage can couple across channels and be amplified if operating in full duplex. I suspect leakage is what you're observing on the unused channels. You can mute the unused channels by either setting the Gain to 0 and enabling the 15 dB attenuator on the ADAR1000 or adjusting the amplifier bias.  

    The video of your experiment is helpful. The amplitude of the reflected received signal is apparent, but the triggering of your scope is relatively slow. Doing some quick math, your hand needs to be moving at 10 m/s to create a doppler shift of 333 Hz for a carrier of 10 GHz. The slower the movement of your hand, the smaller the doppler frequency. I suppose that will be tough to resolve on the scope by eye.

    Do you have a frequency measurement enabled on the scope? I'd recommend beginning with a CW signal to verify, then moved to pulsed.

    Another possible option would be a real time spectrum analyzer if available. A spectrogram plot should provides an intuitive display and the real time spec an should be able to capture the doppler shift.

    Regards, 
    Sam 

  • Hi Sam,

    Thanks for your reply! After I increase the sampling rate of oscilloscope, I can detect the weak distance response. A metal target is located at different distance,the test setup is as follows:
      

    The Rx signals (green ones) returned from targets at different distances are as follows (Tx signals are yellow ones):
      

    The time shift matched the range shift (one-way 30cm). But the above results are obtained using plused wave with a bandwidth of 0.0001ms. 

    I am still wondering that:

    1. How to detect the distance response using CW signal? How can we know the time shift between TX and RX using CW?

    2. We can measure the frequency on the scope. Could yu tell me more about how to see the doppler shift using CW?

    3. Have you tested in your lab that how far can this radar detect signals? I mean the maxium range between the target and radar setup.

    Thanks again for your detailed answer!

    Best,

    Dongyu

  • Hi Dongyu, 

    1. You would need to operate FMCW to resolve range. My initial CW recommendation was just a baseline test to verify Doppler shift. 

    2. If using a frequency measurement marker you should be able to see a frequency difference if your target is moving fast enough. 

    3. We have not tested object detection in our lab. Our primary use case is pulsed mode. Minimum range is determined by the switching time which is 150 m based on a 500 ns pulse width and 500 ns switching time. Max range can be calculated using the radar range equation and leveraging the Tx/Rx performance data of the system.

    Regards, 
    Sam  

  • Hi Sam,

    1. The switching time you mentioned is the switch between Tx and Rx controlled by TR pin on the Stingray board, right? 

    2.  Do you mean that we can only detect the target with a distance far than 150m? In this case, can we receive enough energy returned by target? In my pervious experiments, the intensity returned by targets will greatly decrease when the distance over 5m.

    Regards,

    Dongyu 

  • Hi Sam,

    1. The switching time you mentioned is the switch between Tx and Rx controlled by TR pin on the Stingray board, right? 

    2.  Do you mean that we can only detect the target with a distance far than 150m? In this case, can we receive enough energy returned by target? In my pervious experiments, the intensity returned by targets will greatly decrease when the distance over 5m.

    Regards,

    Dongyu 

  • Hi Dongyu, 

    1. Correct.

    2. In pulsed mode, yes, min distance you can detect an object is 150m. Due to the switching speed, you will have a blind spot in time as you transition modes of operation.

    What is your Tx duty cycle? Are you using the scope to detect your target or the using ADCs? Are you coherently combining the transmitted and received signals? 

    Sam

  • Hi Sam,

    In my experiments, I set the frame length as 1ms and the Tx duty cycle as 10%. I use both scope and ADC to detect the RX signals. The results are shown as below:
      

    The yellow one is Tx and the green one is Rx. We use 2 subarray as Tx which is controlled by TDD and 2 subarray as Rx which is controlled by spi signal. In this case, there will be some signal leakage but we can somehow receive the signals returned from the near target (not necessary to put the target over 150m). The signal received after the Tx is off can be considered to be the part that is not affected by the signal leakage. Therefore, we can see the obvious peak when the target is located at 50cm - 100cm. But there is no obvious peak when the target distance increase to 250cm.

    1. What's your meaning of coherently combining the transmitted and received signals?

    2. Have you tested that you can receive a target signal when placing an object in a position greater than 150m? (using the switch mode)

    3. I am thinking which way is more easier to achieve the object detection. Try to solve the signal leakage problem and use full duplex mode or place the target over 150m and try to receive the signal. What's your suggestion?

    Thanks again for your kind help!

    Best,

    Dongyu