MatLab Toolbox - LTE                                      Home : www.sharetechnote.com

 

 

 

UL SRS

 

Description/explanation will come later !

 

< Checking UL SRS Subframe >

    ue1.NCellID = 0;

    ue1.CyclicPrefixUL = 'Normal';

    ue1.NSubframe = 1;

    ue1.Hopping = 'Off';

    ue1.NULRB = 6;

    ue1.Shortened = 0;

    ue1.NTxAnts = 1;

    ue1.SeqGroup = 0;

    ue1.CyclicShift = 0;

    ue1.RNTI = 1;

    ue1.DuplexMode = 'FDD';

     

    ul_srs.SubframeConfig=0;     

    ul_srs.ConfigIdx=2;   

    ul_srs.BWConfig=5;

     

    ul_srs_flag = [];

    for subframeNo = 1:10

        ue1.NSubframe = subframeNo;

        ul_srs_info=lteSRSInfo(ue1,ul_srs);

        ul_srs_flag = [ul_srs_flag ul_srs_info.IsSRSSubframe];

    end;

     

     

      ue1.NCellID = 0;

      ue1.NSubframe = 0;

      ue1.NULRB = 6;

      ue1.NTxAnts = 1;

       

      ul_srs.SubframeConfig=0;  

      ul_srs.ConfigIdx=2;   

      ul_srs.BWConfig=5;

     

    ul_srs_flag =

        1    1    1    1    1    1    1    1    1    1

     

      ue1.NCellID = 0;

      ue1.NSubframe = 0;

      ue1.NULRB = 6;

      ue1.NTxAnts = 1;

       

      ul_srs.SubframeConfig=1;  

      ul_srs.ConfigIdx=2;   

      ul_srs.BWConfig=5;

     

    ul_srs_flag =

        0    1    0    1    0    1    0    1    0    1

     

      ue1.NCellID = 0;

      ue1.NSubframe = 0;

      ue1.NULRB = 6;

      ue1.NTxAnts = 1;

       

      ul_srs.SubframeConfig=2;  

      ul_srs.ConfigIdx=2;   

      ul_srs.BWConfig=5;

     

    ul_srs_flag =

        1    0    1    0    1    0    1    0    1    0

 

< Generating UL SRS Symbol >

    ue1.NCellID = 0;

    ue1.CyclicPrefixUL = 'Normal';

    ue1.NFrame = 0;

    ue1.NSubframe = 0;

    ue1.Hopping = 'Off';

    ue1.NULRB = 6;

    %ue1.Shortened = 0;

    ue1.NTxAnts = 1;

    ue1.SeqGroup = 0;

    ue1.CyclicShift = 0;

    ue1.RNTI = 1;

    ue1.DuplexMode = 'FDD';

     

    ul_srs.SubframeConfig=0;     

    ul_srs.BWConfig = 7;

    ul_srs.BW = 0;

    ul_srs.CyclicShift = 0;

    ul_srs.SeqGroup = 0;

    ul_srs.SeqIdx = 0;

    ul_srs.ConfigIdx = 2;

    ul_srs.TxComb = 0;

    ul_srs.FreqPosition = 0;

    ul_srs.HoppingBW = 0;

     

    [ul_srs_sym, ul_srs_info] = lteSRS(ue1,ul_srs);

    ul_srs_sym_arrayIndex = 0:length(ul_srs_sym)-1;

     

    subplot(1,3,1);

    plot(real(ul_srs_sym),imag(ul_srs_sym),'ro','MarkerFaceColor',[1 0 0]);

    title('Constellation');

    subplot(1,3,[2 3]);

    plot(ul_srs_sym_arrayIndex,real(ul_srs_sym),'ro-',ul_srs_sym_arrayIndex,imag(ul_srs_sym),'bo-');

    xlim([0 max(ul_srs_sym_arrayIndex)]);

    title('UL SRS index vs UL SRS value. Red -> real, Blue -> Imaginary');

     

      ue1.NCellID = 0;

      ue1.NSubframe = 0;

      ue1.NULRB = 6;

      ue1.NTxAnts = 1;

       

      ul_srs.SubframeConfig=0;   

      ul_srs.BWConfig = 7;

      ul_srs.BW = 0;

      ul_srs.CyclicShift = 0;

      ul_srs.SeqGroup = 0;

      ul_srs.SeqIdx = 0;

      ul_srs.ConfigIdx = 2;

      ul_srs.TxComb = 0;

      ul_srs.FreqPosition = 0;

      ul_srs.HoppingBW = 0;

     

 

 

< UL SRS RE Mapping >

 

    ue1.NCellID = 0;

    ue1.CyclicPrefixUL = 'Normal';

    ue1.NFrame = 0;

    ue1.NSubframe = 0;

    ue1.Hopping = 'Off';

    ue1.NULRB = 6;

    %ue1.Shortened = 0;

    ue1.NTxAnts = 1;

    ue1.SeqGroup = 0;

    ue1.CyclicShift = 0;

    ue1.RNTI = 1;

    ue1.DuplexMode = 'FDD';

     

    ul_srs.SubframeConfig=0;     

    ul_srs.BWConfig = 7;

    ul_srs.BW = 0;

    ul_srs.CyclicShift = 0;

    ul_srs.SeqGroup = 0;

    ul_srs.SeqIdx = 0;

    ul_srs.ConfigIdx = 2;

    ul_srs.TxComb = 0;

    ul_srs.FreqPosition = 0;

    ul_srs.HoppingBW = 0;

     

    [ul_srs_sym ,ul_srs_info] = lteSRS(ue1,ul_srs);

    ul_srs_sym_arrayIndex = 0:length(ul_srs_sym)-1;

    ul_srs_sym_ind = lteSRSIndices(ue1,ul_srs);

     

    resourceGridUL = lteULResourceGrid(ue1);

     

    ul_srs_scale = 0.5;

     

    resourceGridUL(ul_srs_sym_ind) = ul_srs_scale; % * ul_srs_sym;

    resourceGridUL = [ resourceGridUL resourceGridUL(:,13)];

    resourceGridUL = [ resourceGridUL; resourceGridUL((ue1.NULRB*12-1),:) ];

     

    xStep = 0:14;

    yStep = 0:(ue1.NULRB*12);

    surface(xStep,yStep,abs(resourceGridUL));

    axis([0 14 0 (ue1.NULRB*12) 0 2]);

    view([0,90]);

    set(gca,'xtick',[0 6 7 13]);

    set(gca,'ytick',[[0:12:ue1.NULRB*12-1] [ue1.NULRB*12-1]]);

     

       

      ue1.NCellID = 0;

      ue1.NSubframe = 0;

      ue1.NULRB = 6;

      ue1.NTxAnts = 1;

       

      ul_srs.SubframeConfig=0;   

      ul_srs.BWConfig = 7; % C_SRS

      ul_srs.BW = 0; % B_SRS

      ul_srs.CyclicShift = 0;

      ul_srs.SeqGroup = 0;

      ul_srs.SeqIdx = 0;

      ul_srs.ConfigIdx = 2;

      ul_srs.TxComb = 0;

      ul_srs.FreqPosition = 0;

      ul_srs.HoppingBW = 0;

      ue1.NCellID = 0;

      ue1.NSubframe = 0;

      ue1.NULRB = 25;

      ue1.NTxAnts = 1;

       

      ul_srs.SubframeConfig=0;   

      ul_srs.BWConfig = 3;

      ul_srs.BW = 0;

      ul_srs.CyclicShift = 0;

      ul_srs.SeqGroup = 0;

      ul_srs.SeqIdx = 0;

      ul_srs.ConfigIdx = 2;

      ul_srs.TxComb = 0;

      ul_srs.FreqPosition = 0;

      ul_srs.HoppingBW = 0;

     

 

 

Disclaimer ! :

 

This page is only to show you the overall logics and visualization for various LTE physical layer channels. I haven't investigated much about verifying about the accuracy.

If you think the code is not so efficient, it is 100% my fault. I haven't made any effort for effiecient code. I just tried to create code as simple as possible for the readers. As you know, easy-to-read code is not always efficient for a specific chipset.

If you find any mistake in terms of accuracy, it is also very highly likely be my fault. Not the problem of Matlab tool box itself.

Any comment and corrections if you find any mistake will be welcome and appreciated.