Transmit and Receive LTE using adrv9371 and ZC706

Hi,

I am trying to modify the Transmit and Receive LTE MIMO code given in the below link.

https://www.mathworks.com/help/supportpkg/xilinxzynqbasedradio/examples/transmit-and-receive-lte-mimo-using-a-single-analog-devices-ad9361-ad9364.html

This code runs perfectly on AD RF SOM.

Now, I am trying the same example to run on ADRV9371.

ad9361_LTE() ( The code that's in the Legacy folder under LTE_MATLAB) uses IIO hence, I modified this code to 9371 and it works for the dummy data which is used in trData. (I was able to see LTE spectrum on the Spectrum Analyzer). Please note that I upsampled the enodeBOutput by 8 (to match 122.88Mhz) for Transnmission.

But, when I modify it to the above image and try to Transmit, MATLAB crashes. After a bit debugging, I understood that the buffer size that I have pre-allocated,is too large and that could be the reason for my Crash. (Not sure though)

Next, I changed the IIO objects to Adi Objects and used adi.AD9371.Tx and could similarly transmit the dummy Data but, when tried to Transmit the full grid, I get an error.

This error is related to SamplesPerFrame. The Final enodeBOutput is much larger than 2^20, Hence,I always get an error. 

How, do I transmit this whole grid either using IIO objects or ADI objects?

Please suggest any work around.

Regards

sravan

Error

Error using adi.AD9371.Base/set.SamplesPerFrame (line 65)
Expected SamplesPerFrame to be a scalar with value <= 1.04858e+06.

Error in adi.AD9371.Tx/setupImpl (line 71)
obj.SamplesPerFrame = size(data,1);

Error in ad9371_LTE_adi_Tx_3 (line 216)
tx(eNodeBOutput);

Parents Reply Children
  • I tried to save the final output into a text file and load in TES. but I guess there is a limit on file size so it always pops an error  message file not found.(the file size is around 63 MB).

    I truncated the output to one frame ie:153600*8 since my upsampling factor is 8. 

    I see a frame on the receive data as expected, in frequency domain.

    Yes, I am enabling the cyclic buffers.

    And, in the receiver side, I flush the buffers as it was did in example codes.

  • 0
    •  Analog Employees 
    on Jul 18, 2019 8:11 PM over 1 year ago in reply to sravanreddych

    Can you provide your MATLAB script?

    -Travis

  • %% Transmitter
    %% ad971_LTE_adi_Tx_singlecarrier
    close all;
    clc;
    clear;
    %%
    %ip = '192.168.3.2';
    LTEmode = 'LTE10';
    %load eNBupsampfilter.mat;
    
    
    %%
    
    % Setup handle for image plot
    if ~exist('imFig', 'var') || ~ishandle(imFig)
        imFig = figure;
        imFig.NumberTitle = 'off';
        imFig.Name = 'Image Plot';
        imFig.Visible = 'off';
    else
        clf(imFig); % Clear figure
        imFig.Visible = 'off';
    end
    
    
    % Setup handle for channel estimate plots
    if ~exist('hhest', 'var') || ~ishandle(hhest)
        hhest = figure('Visible','Off');
        hhest.NumberTitle = 'off';
        hhest.Name = 'Channel Estimate';
    else
        clf(hhest); % Clear figure
        hhest.Visible = 'off';
    end
    
    % Setup Spectrum viewer
    spectrumScope = dsp.SpectrumAnalyzer( ...
        'SpectrumType',    'Power density', ...
        'SpectralAverages', 10, ...
        'YLimits',         [-135 -45], ...
        'Title',           'Received Baseband LTE Signal Spectrum', ...
        'YLabel',          'Power spectral density');
    
    % Setup the constellation diagram viewer for equalized PDSCH symbols
    constellation = comm.ConstellationDiagram('Title','Equalized PDSCH Symbols',...
                                    'ShowReferenceConstellation',false);
    
    %% Pick up LTE parameters according to LTE Mode
    
    if strcmp(LTEmode,'LTE1.4') == 1
        configuration = 'R.4';
        samplingrate = 1.92e6;
        bandwidth = 1.08e6;
        fir_data_file = 'LTE1p4_MHz.ftr';
    elseif strcmp(LTEmode,'LTE3') == 1
        configuration = 'R.5';
        samplingrate = 3.84e6;
        bandwidth = 2.7e6;
        fir_data_file = 'LTE3_MHz.ftr';
    elseif strcmp(LTEmode,'LTE5') == 1
        configuration = 'R.6';
        samplingrate = 7.68e6;
        bandwidth = 4.5e6;
        fir_data_file = 'LTE5_MHz.ftr';
    elseif strcmp(LTEmode,'LTE10') == 1
        configuration = 'R.7';
        samplingrate = 15.36e6;
        bandwidth = 9e6;
        fir_data_file = 'LTE10_MHz.ftr';
    else
        error('Please input LTE1.4, LTE3, LTE5 or LTE10.');
    end
    
    
    
    uri = 'ip:192.168.3.2';
    
    %fc = 0.7e9;
    
    
    %% Generate LTE Signal using LTE System Toolbox
    
    % Check for LST presence
    if isempty(ver('lte'))
        error('ad9361_LTE:NoLST','Please install LTE System Toolbox to run this example.');
    end
    
    % Generate the LTE signal
    txsim.RC = configuration; % Base RMC configuration
    txsim.NCellID = 143;       % Cell identity
    txsim.NFrame = 700;       % Initial frame number
    txsim.TotFrames = 1;      % Number of frames to generate
    txsim.RunTime = 200;       % Time period to loop waveform in seconds
    %%%  Changing this RunTime to 2000 did'nt have any effect, Initially it was 20 
    
    txsim.DesiredCenterFrequency = 2.45e9; % Center frequency in Hz
    txsim.NTxAnts = 1;
    
    %% Prepare Tx Image
    % Input an image file and convert to binary stream
    fileTx = 'peppers.png';            % Image file name
    fData = imread(fileTx);            % Read image data from file
    scale = 0.5;                       % Image scaling factor
    origSize = size(fData);            % Original input image size
    scaledSize = max(floor(scale.*origSize(1:2)),1); % Calculate new image size
    heightIx = min(round(((1:scaledSize(1))-0.5)./scale+0.5),origSize(1));
    widthIx = min(round(((1:scaledSize(2))-0.5)./scale+0.5),origSize(2));
    fData = fData(heightIx,widthIx,:); % Resize image
    imsize = size(fData);              % Store new image size
    binData = dec2bin(fData(:),8);     % Convert to 8 bit unsigned binary
    trData = reshape((binData-'0').',1,[]).'; % Create binary stream
    
    %% Display Tx Image
    % Plot transmit image
    figure(imFig);
    imFig.Visible = 'on';
    subplot(211);
        imshow(fData);
        title('Transmitted Image');
    subplot(212);
        title('Received image will appear here...');
        set(gca,'Visible','off'); % Hide axes
        set(findall(gca, 'type', 'text'), 'visible', 'on'); % Unhide title
    
    pause(1); % Pause to plot Tx image
    %%  Create RMC
    
    
    % Generate RMC configuration and customize parameters
    rmc = lteRMCDL(txsim.RC);
    %%
    % Calculate the required number of LTE frames based on the size of the
    % image data
    trBlkSize = rmc.PDSCH.TrBlkSizes;
    txsim.TotFrames = ceil(numel(trData)/sum(trBlkSize(:)));
    
    
    rmc.NCellID = txsim.NCellID;
    rmc.NFrame = txsim.NFrame;
    rmc.TotSubframes = txsim.TotFrames*10; % 10 subframes per frame
    rmc.CellRefP = txsim.NTxAnts; % Configure number of cell reference ports
    rmc.PDSCH.RVSeq = 0;
    % Add noise to unallocated PDSCH resource elements
    if verLessThan('matlab','9.2')
        rmc.OCNG = 'On';
    else
        rmc.OCNGPDSCHEnable = 'On';
        rmc.OCNGPDCCHEnable = 'On';
    end
    
    fprintf('\nGenerating LTE transmit waveform:\n')
    fprintf('  Packing image data into %d frame(s).\n\n', txsim.TotFrames);
    
    % Pack the image data into a single LTE frame
    [eNodeBOutput,txGrid,rmc] = lteRMCDLTool(rmc,trData);
    %txsim.SamplingRate = rmc.SamplingRate;
    
    % Scale the signal for better power output and cast to int16. This is the
    % native format for the SDR hardware. Since we are transmitting the same
    % signal in a loop, we can do the cast once to save processing time.
    powerScaleFactor = 0.7;
    eNodeBOutput = eNodeBOutput.*(1/max(abs(eNodeBOutput))*powerScaleFactor);
    
    
    eNodeBOutput  = resample(eNodeBOutput,8,1);
    %eNodeBOutput1 = filter(eNBupsampfilter,1,eNodeBOutput);
    
     figure();
        pwelch(eNodeBOutput,[],[],[],15.36e6*8,'centered');
        title('Spectrum of Upsampled eNodeBOutput')
    %     figure();
    %     pwelch(eNodeBOutput1,[],[],[],15.36e6*8,'centered');
    %     title('Spectrum of Upsampled and filtered eNodeBOutput1')
        
    
    % Cast the transmit signal to int16 ---
    % this is the native format for the SDR hardware.
    %%%%%%%%%%%%%%%%%%%%%%
    
    eNodeBOutput = int16(eNodeBOutput*2^15);
    %% Tx set up
    
    tx = adi.AD9371.Tx('uri',uri);
    
    tx.CenterFrequency = txsim.DesiredCenterFrequency;
    tx.EnableCustomProfile = true;
    tx.CustomProfileFileName = 'profile_TxBW100_ORxBW100_RxBW100.txt';
    tx.DataSource = 'DMA';
    tx.EnableCyclicBuffers = true;   
    tx.AttenuationChannel0 = 0;
    
    %save ('allvbles.mat');
    %pause(2);
    tx(eNodeBOutput);
    
    

    %% Receiver
    
    %% ad971_LTE_adi_Rx_singlecarrier
    %% User defined parameters --- configure the same as transmitter
    
    %%
    %load allvbles.mat
    %load rxfilter_30pi72M.mat
    %load rxfilter_15pi36M.mat
    
    osf=8;
    rxsim = struct;
    rxsim.RadioFrontEndSampleRate = samplingrate*osf;%tx.BasebandSampleRate; % Configure for same sample rate
                                                           % as transmitter
    rxsim.RadioCenterFrequency = txsim.DesiredCenterFrequency;
    rxsim.NRxAnts = txsim.NTxAnts;
    rxsim.FramesPerBurst = txsim.TotFrames+1; % Number of LTE frames to capture in each burst.
                                              % Capture 1 more LTE frame than
                                              % transmitted to allow for timing
                                              % offset wraparound...
    rxsim.numBurstCaptures = 1; % Number of bursts to capture
    % Derived parameters
    samplesPerFrame = 10e-3*rxsim.RadioFrontEndSampleRate/osf; % LTE frames period is 10 ms
    %An SDR Receiver system object is used with the named radio 'AD936x' to
    %receive baseband data from the SDR hardware.
    
    sdrReceiver = adi.AD9371.Rx('uri',uri);
    
    sdrReceiver.CenterFrequency = rxsim.RadioCenterFrequency;
    
    
    sdrReceiver.SamplesPerFrame = samplesPerFrame*osf; %% Capture 6 frames of this length to decode
    
    sdrReceiver.GainControlMode = 'automatic';
    
    
    
    %% burstCaptures holds sdrReceiver.FramesPerBurst number of consecutive frames worth
    % of baseband LTE samples. Each column holds one LTE frame worth of data.
    burstCaptures = zeros(samplesPerFrame*osf,rxsim.NRxAnts,rxsim.FramesPerBurst);
    enb.PDSCH = rmc.PDSCH;
    enb.DuplexMode = 'FDD';
    enb.CyclicPrefix = 'Normal';
    enb.CellRefP = 4;
    
    % Bandwidth: {1.4 MHz, 3 MHz, 5 MHz, 10 MHz, 20 MHz}
    SampleRateLUT = [1.92 3.84 7.68 15.36 30.72]*1e6;
    NDLRBLUT = [6 15 25 50 100];
    enb.NDLRB = NDLRBLUT(SampleRateLUT==rxsim.RadioFrontEndSampleRate/osf);
    if isempty(enb.NDLRB)
        error('Sampling rate not supported. Supported rates are %s.',...
                '1.92 MHz, 3.84 MHz, 7.68 MHz, 15.36 MHz, 30.72 MHz');
    end
    fprintf('\nSDR hardware sampling rate configured to capture %d LTE RBs.\n',enb.NDLRB);
    %% Channel estimation configuration structure
    cec.PilotAverage = 'UserDefined';  % Type of pilot symbol averaging
    cec.FreqWindow = 9;                % Frequency window size in REs
    cec.TimeWindow = 9;                % Time window size in REs
    cec.InterpType = 'Cubic';          % 2D interpolation type
    cec.InterpWindow = 'Centered';     % Interpolation window type
    cec.InterpWinSize = 3;             % Interpolation window size
    enbDefault = enb;
    
    
    %%
        % Setup Spectrum viewer
        spectrumScope = dsp.SpectrumAnalyzer( ...
            'SpectrumType',    'Power density', ...
            'SpectralAverages', 10, ...
            'YLimits',         [-60 80], ...
            'Title',           'Received Baseband LTE Signal Spectrum', ...
            'YLabel',          'Power spectral density');
    %%
    
    for i=1:20
        sdrReceiver();
    end
    
    %% Receive, detect and decode packet
    while rxsim.numBurstCaptures
        % Set default LTE parameters
        enb = enbDefault;
    
        % SDR Capture
        fprintf('\nStarting a new RF capture.\n\n')
        len=0;
        for frame = 1:rxsim.FramesPerBurst
            while len == 0
                % Store one LTE frame worth of samples
                [data,len] = sdrReceiver();
            end
            burstCaptures(:,:,frame) = data;%((frame-1)*frameLen+1:frameLen*frame);
         end
        
        
        %burstCapturesadi = burstCaptures; % only for debugging
        if rxsim.NRxAnts == 2
            rxWaveform = reshape(permute(burstCaptures,[1 3 2]), ...
                            rxsim.FramesPerBurst*samplesPerFrame,rxsim.NRxAnts);
            spectrumScope.ShowLegend = true; % Turn on legend for spectrum analyzer
            spectrumScope.ChannelNames = {'SDR Channel 1','SDR Channel 2'};
        else        
            % Downsample the received signal
              rxWaveform = resample(burstCaptures(:),1,osf);
              %rxWaveform = filter(rxfilter_15pi36M,1,rxWaveform);
              %rxWaveform = filter(rxfilter_30pi72M,1,rxWaveform);
    %            figure();
    %            pwelch(rxWaveform,[],[],[],15.36e6,'centered');
    %            title(' Spectrum After DownSampling')
        end
    %%%%%%%%%%  After resampling shouldn't we use LowPass filetring%%%%
        % Show power spectral density of captured burst    
        spectrumScope.SampleRate = rxsim.RadioFrontEndSampleRate/(osf);
        spectrumScope(rxWaveform);
        
           % Perform frequency offset correction for known cell ID
        frequencyOffset = lteFrequencyOffset(enb,rxWaveform);
        rxWaveform = lteFrequencyCorrect(enb,rxWaveform,frequencyOffset);
        fprintf('\nCorrected a frequency offset of %i Hz.\n',frequencyOffset)
    
        
         % Perform the blind cell search to obtain cell identity and timing offset
        %   Use 'PostFFT' SSS detection method to improve speed
        cellSearch.SSSDetection = 'PostFFT'; cellSearch.MaxCellCount = 1;
        [NCellID,frameOffset] = lteCellSearch(enb,rxWaveform,cellSearch);
        fprintf('Detected a cell identity of %i.\n', NCellID);
        enb.NCellID = NCellID; % From lteCellSearch
        
       
    
        % Sync the captured samples to the start of an LTE frame, and trim off
        % any samples that are part of an incomplete frame.
        rxWaveform = rxWaveform(frameOffset+1:end,:);
        tailSamples = mod(length(rxWaveform),samplesPerFrame);
        rxWaveform = rxWaveform(1:end-tailSamples,:);
        enb.NSubframe = 0;
        fprintf('Corrected a timing offset of %i samples.\n',frameOffset)
    
        % OFDM demodulation
        rxGrid = lteOFDMDemodulate(enb,rxWaveform);
    
        % Perform channel estimation for 4 CellRefP as currently we do not
        % know the CellRefP for the eNodeB.
        [hest,nest] = lteDLChannelEstimate(enb,cec,rxGrid);
    
        sfDims = lteResourceGridSize(enb);
        Lsf = sfDims(2); % OFDM symbols per subframe
        LFrame = 10*Lsf; % OFDM symbols per frame
        numFullFrames = length(rxWaveform)/samplesPerFrame;
    
        rxDataFrame = zeros(sum(enb.PDSCH.TrBlkSizes(:)),numFullFrames);
        recFrames = zeros(numFullFrames,1);
        rxSymbols = []; txSymbols = [];
    
        % For each frame decode the MIB, PDSCH and DL-SCH
        for frame = 0:(numFullFrames-1)
            fprintf('\nPerforming DL-SCH Decode for frame %i of %i in burst:\n', ...
                frame+1,numFullFrames)
    
            % Extract subframe #0 from each frame of the received resource grid
            % and channel estimate.
            enb.NSubframe = 0;
            rxsf = rxGrid(:,frame*LFrame+(1:Lsf),:);
            hestsf = hest(:,frame*LFrame+(1:Lsf),:,:);
    
            % PBCH demodulation. Extract resource elements (REs)
            % corresponding to the PBCH from the received grid and channel
            % estimate grid for demodulation.
            enb.CellRefP = 4;
            pbchIndices = ltePBCHIndices(enb);
            [pbchRx,pbchHest] = lteExtractResources(pbchIndices,rxsf,hestsf);
            [~,~,nfmod4,mib,CellRefP] = ltePBCHDecode(enb,pbchRx,pbchHest,nest);
    
            % If PBCH decoding successful CellRefP~=0 then update info
            if ~CellRefP
                fprintf('  No PBCH detected for frame.\n');
                continue;
            end
            enb.CellRefP = CellRefP; % From ltePBCHDecode
    
            % Decode the MIB to get current frame number
            enb = lteMIB(mib,enb);
    
            % Incorporate the nfmod4 value output from the function
            % ltePBCHDecode, as the NFrame value established from the MIB
            % is the system frame number modulo 4.
            enb.NFrame = enb.NFrame+nfmod4;
            fprintf('  Successful MIB Decode.\n')
            fprintf('  Frame number: %d.\n',enb.NFrame);
    
            % The eNodeB transmission bandwidth may be greater than the
            % captured bandwidth, so limit the bandwidth for processing
            enb.NDLRB = min(enbDefault.NDLRB,enb.NDLRB);
    
            % Store received frame number
            recFrames(frame+1) = enb.NFrame;
    
            % Process subframes within frame (ignoring subframe 5)
            for sf = 0:9
                if sf~=5 % Ignore subframe 5
                    % Extract subframe
                    enb.NSubframe = sf;
                    rxsf = rxGrid(:,frame*LFrame+sf*Lsf+(1:Lsf),:);
    
                    % Perform channel estimation with the correct number of CellRefP
                    [hestsf,nestsf] = lteDLChannelEstimate(enb,cec,rxsf);
    
                    % PCFICH demodulation. Extract REs corresponding to the PCFICH
                    % from the received grid and channel estimate for demodulation.
                    pcfichIndices = ltePCFICHIndices(enb);
                    [pcfichRx,pcfichHest] = lteExtractResources(pcfichIndices,rxsf,hestsf);
                    [cfiBits,recsym] = ltePCFICHDecode(enb,pcfichRx,pcfichHest,nestsf);
    
                    % CFI decoding
                    enb.CFI = lteCFIDecode(cfiBits);
    
                    % Get PDSCH indices
                    [pdschIndices,pdschIndicesInfo] = ltePDSCHIndices(enb, enb.PDSCH, enb.PDSCH.PRBSet);
                    [pdschRx, pdschHest] = lteExtractResources(pdschIndices, rxsf, hestsf);
    
                    % Perform deprecoding, layer demapping, demodulation and
                    % descrambling on the received data using the estimate of
                    % the channel
                    [rxEncodedBits, rxEncodedSymb] = ltePDSCHDecode(enb,enb.PDSCH,pdschRx,...
                                                   pdschHest,nestsf);
    
                    % Append decoded symbol to stream
                    rxSymbols = [rxSymbols; rxEncodedSymb{:}]; %#ok<AGROW>
    
                    % Transport block sizes
                    outLen = enb.PDSCH.TrBlkSizes(enb.NSubframe+1);
    
                    % Decode DownLink Shared Channel (DL-SCH)
                    [decbits{sf+1}, blkcrc(sf+1)] = lteDLSCHDecode(enb,enb.PDSCH,...
                                                    outLen, rxEncodedBits);  %#ok<SAGROW>
    
                    % Recode transmitted PDSCH symbols for EVM calculation
                    %   Encode transmitted DLSCH
                    txRecode = lteDLSCH(enb,enb.PDSCH,pdschIndicesInfo.G,decbits{sf+1});
                    %   Modulate transmitted PDSCH
                    txRemod = ltePDSCH(enb, enb.PDSCH, txRecode);
                    %   Decode transmitted PDSCH
                    [~,refSymbols] = ltePDSCHDecode(enb, enb.PDSCH, txRemod);
                    %   Add encoded symbol to stream
                    txSymbols = [txSymbols; refSymbols{:}]; %#ok<AGROW>
    
                    release(constellation); % Release previous constellation plot
                    constellation(rxEncodedSymb{:}); % Plot current constellation
                    pause(0); % Allow constellation to repaint
                end
            end
    
            % Reassemble decoded bits
            fprintf('  Retrieving decoded transport block data.\n');
            rxdata = [];
            for i = 1:length(decbits)
                if i~=6 % Ignore subframe 5
                    rxdata = [rxdata; decbits{i}{:}]; %#ok<AGROW>
                end
            end
    
            % Store data from receive frame
            rxDataFrame(:,frame+1) = rxdata;
    
            % Plot channel estimate between CellRefP 0 and the receive antennae
            focalFrameIdx = frame*LFrame+(1:LFrame);
            figure(hhest);
            hhest.Visible = 'On';
            surf(abs(hest(:,focalFrameIdx,1,1)));
            shading flat;
            xlabel('OFDM symbol index');
            ylabel('Subcarrier index');
            zlabel('Magnitude');
            title('Estimate of Channel Magnitude Frequency Repsonse');
        end
        rxsim.numBurstCaptures = rxsim.numBurstCaptures-1;
    %     release(spectrumScope);
    %     % Setup Spectrum viewer
    %     spectrumScope = dsp.SpectrumAnalyzer( ...
    %         'SpectrumType',    'Power density', ...
    %         'SpectralAverages', 10, ...
    %         'YLimits',         [-135 -45], ...
    %         'Title',           'Received Baseband LTE Signal Spectrum', ...
    %         'YLabel',          'Power spectral density');
    
    end
    
    
    % Release both the transmitter and receiver objects once reception is complete
    %release(sdrTransmitter);
    release(tx);
    release(sdrReceiver);
    %% Determine index of first transmitted frame (lowest received frame number)
    [~,frameIdx] = min(recFrames);
    
    fprintf('\nRecombining received data blocks:\n');
    
    decodedRxDataStream = zeros(length(rxDataFrame(:)),1);
    frameLen = size(rxDataFrame,1);
    % Recombine received data blocks (in correct order) into continuous stream
    for n=1:numFullFrames
        currFrame = mod(frameIdx-1,numFullFrames)+1; % Get current frame index
        decodedRxDataStream((n-1)*frameLen+1:n*frameLen) = rxDataFrame(:,currFrame);
        frameIdx = frameIdx+1; % Increment frame index
    end
    
    % Perform EVM calculation
    if ~isempty(rxSymbols)
        evmCalculator = comm.EVM();
        evmCalculator.MaximumEVMOutputPort = true;
        [evm.RMS,evm.Peak] = evmCalculator(txSymbols, rxSymbols);
        fprintf('  EVM peak = %0.3f%%\n',evm.Peak);
        fprintf('  EVM RMS  = %0.3f%%\n',evm.RMS);
    else
        fprintf('  No transport blocks decoded.\n');
    end
    
    % Perform bit error rate (BER) calculation
    bitErrorRate = comm.ErrorRate;
    err = bitErrorRate(decodedRxDataStream(1:length(trData)), trData);
    fprintf('  Bit Error Rate (BER) = %0.5f.\n', err(1));
    fprintf('  Number of bit errors = %d.\n', err(2));
    fprintf('  Number of transmitted bits = %d.\n',length(trData));
    
    % Recreate image from received data
    fprintf('\nConstructing image from received data.\n');
    str = reshape(sprintf('%d',decodedRxDataStream(1:length(trData))), 8, []).';
    decdata = uint8(bin2dec(str));
    receivedImage = reshape(decdata,imsize);
    
    % Plot receive image
    if exist('imFig', 'var') && ishandle(imFig) % If TX figure is open
        figure(imFig); subplot(212);
    else
        figure; subplot(212);
    end
    imshow(receivedImage);
    title(sprintf('Received Image: %dx%d Antenna Configuration',txsim.NTxAnts, rxsim.NRxAnts));

    Hi Travis,

    Please find the attached code. I couldn't attach a zip file or .m file.

    In the transmitter please use the profile 'profile_TxBW100_ORxBW100_RxBW100.txt';

    please let me know if you need any files while running

  • Hi Travis,

    Have you got an opportunity to go through the codes?

    please let me know if there are any problems in the codes?

    Thanks in advance

    sravan

  • 0
    •  Analog Employees 
    on Jul 23, 2019 12:11 AM over 1 year ago in reply to sravanreddych

    I don't have a board on me right now, but looking at the code RX data is 1/5 the size of a TX frame.  "burstCaptures" should be 2*length(eNodeBOutput).

    Make sure you set a profile on the RX side too.

    -Travis