Matlab Toolbox - 4G/LTE

 

 

 

UL SRS

 

The sounding reference signal, or SRS, lets the eNB measure the uplink channel over a band that the UE may not be using for PUSCH. The eNB uses that measurement for frequency-selective scheduling and for uplink timing. This page uses lteSRSInfo, lteSRS and lteSRSIndices to show when the SRS is sent, what its values look like, and where it sits in the resource grid.

Description/explanation will come later !

Followings are the topics to be covered in this page.

Checking UL SRS Subframe

In which subframes may a UE send SRS? The answer has two layers. The cell sets the subframes where SRS is allowed at all, and each UE gets its own period and offset within them. This section checks the cell layer with lteSRSInfo.

    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;

     

     

The loop sets ue1.NSubframe and asks lteSRSInfo whether that subframe is an SRS subframe. It collects IsSRSSubframe into ul_srs_flag, one entry per subframe. The three runs below change only ul_srs.SubframeConfig, which is the cell-specific parameter srs-SubframeConfig.

     

      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

     

SubframeConfig 0. Every subframe is an SRS subframe.

     

      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

     

SubframeConfig 1. Every second subframe is an SRS subframe.

     

      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

     

SubframeConfig 2. The same period as SubframeConfig 1, shifted by one subframe.

36.211 v19.3.0 Table 5.5.3.3-1 gives each srs-SubframeConfig a period TSFC and an offset set ΔSFC. A subframe n is an SRS subframe when n mod TSFC is in ΔSFC. Configuration 0 has a period of 1, so every subframe qualifies. Configurations 1 and 2 have a period of 2, with offsets 0 and 1.

 

SubframeConfig

TSFC

ΔSFC

SRS subframes

ul_srs_flag

0

1

0

0 to 9

1 1 1 1 1 1 1 1 1 1

1

2

0

0, 2, 4, 6, 8

0 1 0 1 0 1 0 1 0 1

2

2

1

1, 3, 5, 7, 9

1 0 1 0 1 0 1 0 1 0

 

The flags look reversed at first sight. The reason is the loop: it runs subframeNo = 1:10, not 0:9. So the first flag belongs to subframe 1 and the last to subframe 10, which is subframe 0 of the next frame. With that shift, configuration 1 gives flags for the even subframes, as the table requires. The parameter boxes list ue1.NSubframe = 0, but the loop overwrites that value.

ConfigIdx = 2 is the UE-specific index ISRS. 36.213 v19.4.0 Table 8.2-1 maps it to a period of 5 subframes and an offset of 0, so this UE would sound only in subframes 0 and 5. The flags do not show that restriction. IsSRSSubframe therefore reports the cell-specific configuration only, and the UE-specific pattern has to be worked out separately.

  • srs-SubframeConfig sets the cell SRS subframes : 36.211 Table 5.5.3.3-1.
  • The loop runs 1:10 : the first flag is subframe 1, not subframe 0.
  • ConfigIdx 2 means every 5 ms, offset 0 : 36.213 Table 8.2-1, not visible in IsSRSSubframe.

Generating UL SRS Symbol

What values does the SRS carry? The SRS is a Zadoff-Chu type base sequence with a cyclic shift, like the PUCCH and PUSCH DMRS. Its length depends on the SRS bandwidth, and the example below uses a short one.

    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');

With NULRB = 6, BWConfig = 7 and BW = 0, 36.211 Table 5.5.3.2-1 gives mSRS,0 = 4 RB. That is 48 subcarriers. The SRS uses every second subcarrier, the transmission comb, so the sequence has 24 values. The plot below shows them as a constellation on the left and value by value on the right.

     

      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;

     

    Constellation and real and imaginary parts of a 24-value UL SRS sequence

     

24 SRS values. All of them fall on four points at +/-0.7071 on each axis.

A sequence of 24 values is shorter than 36, so 36.211 clause 5.5.1.2 does not use a Zadoff-Chu sequence here. It takes a computer-generated sequence from Table 5.5.1.2-2 instead, where each value has a phase of pi/4 times -3, -1, 1 or 3. That is why the constellation shows exactly four points, like QPSK. SeqGroup = 0 selects row u = 0 of that table. SeqIdx matters only for sequences of 72 values or more, and CyclicShift = 0 adds no extra phase ramp. A longer SRS, 36 values or more, would use a Zadoff-Chu sequence and spread over the unit circle.

  • 4 RB with comb 2 : 24 SRS values.
  • Fewer than 36 values : a computer-generated sequence with four phases.
  • Magnitude 1 on every value : 0.7071 on each axis.

UL SRS RE Mapping

Where does the SRS sit in the uplink grid? It always takes the last SC-FDMA symbol of the subframe, and its frequency position follows from the bandwidth configuration. This section maps the SRS with lteSRSIndices for 6 RB and for 25 RB.

    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]]);

     

The code writes the constant ul_srs_scale into the SRS REs, because the multiplication by ul_srs_sym is commented out. So the plot shows positions only. The two concatenations add one more column and one more row to the grid. The function surface draws a cell between each pair of grid points, so without them it would drop the last symbol and the last subcarrier. The parameter boxes below give the two configurations.

     

      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;

    UL SRS RE positions in a 6 RB uplink grid

    UL SRS RE positions in a 25 RB uplink grid

     

Left: 6 RB, BWConfig 7, SRS on subcarriers 12 to 58. Right: 25 RB, BWConfig 3, SRS on subcarriers 24 to 262. In both, the SRS takes symbol 13 only, on every second subcarrier.

36.211 clause 5.5.3.2 places the SRS around the centre of the carrier when FreqPosition and BW are 0. The first subcarrier is (floor(NRB/2) - mSRS,0/2) x 12 + kTC. With 6 RB and 4 SRS RB, that is (3 - 2) x 12 + 0 = 12, and the SRS spans RB 1 to 4. With 25 RB, BWConfig 3 gives mSRS,0 = 20 RB. The start is then (12 - 10) x 12 = 24, and the SRS spans RB 2 to 21, which is 120 REs.

TxComb = 0 selects the even subcarriers, which is why the yellow REs alternate with empty ones. A second UE with TxComb = 1 could sound the same RBs on the odd subcarriers at the same time. Symbol 13 is the last symbol of the subframe, so a PUSCH or a shortened PUCCH in an SRS subframe has to leave it free. The PUCCH Format 1 page shows the same surface plot for the PUCCH.

  • SRS in symbol 13 only : the last SC-FDMA symbol of the subframe.
  • Centred with FreqPosition 0 : RB 1 to 4 at 6 RB, RB 2 to 21 at 25 RB.
  • Even subcarriers with TxComb 0 : the odd ones are free for another UE.

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.

Reference

[1] 3GPP TS 36.211 v19.3.0 - clause 5.5.1.2, base sequences, and clause 5.5.3, Sounding reference signal, Tables 5.5.3.2-1 and 5.5.3.3-1

[2] 3GPP TS 36.213 v19.4.0 - clause 8.2 and Table 8.2-1, UE specific SRS periodicity and subframe offset