This example demonstrates how to configure User Equipment (UE) and cell-specific Sounding Reference Signals (SRS) transmission. Physical Uplink Control Channel (PUCCH) is also configured for transmission.
The SRS configuration is split into 2 parts - UE-specific and cell-specific. The UE-specific part describes the schedule and content of actual SRS transmissions for this UE. The cell-specific part describes the time schedule when any UE in the cell can transmit - the UE-specific schedule must be a subset of this schedule.
In this example the cell-specific SRS configuration has 5ms periodicity with an offset of 0 (signaled by
srs.SubframeConfig = 3 as indicated in TS36.211, Table 184.108.40.206-1 [ 1 ]). The UE-specific SRS configuration has 10ms periodicity with an offset of 0 (signaled by
srs.ConfigIdx = 7 as indicated in TS36.213, Table 8.2-1 [ 2 ]). The cell-specific configuration means that for this cell, two opportunities for SRS transmission exist within each frame, subframes 0 and 5. All UEs in the cell must shorten their Physical Uplink Control Channel (PUCCH) transmissions during these subframes to allow for SRS reception without interference, even if they are not transmitting SRS themselves. The UE-specific configuration means that this UE is configured to generate SRS only in subframe 0.
The output at the MATLAB® command window when running this example shows PUCCH transmission in all 10 subframes, with shortening in subframes 0 and 5, and an SRS transmission in subframe 0.
ue = struct; ue.NULRB = 15; % Number of resource blocks ue.NCellID = 10; % Physical layer cell identity ue.Hopping = 'Off'; % Disable frequency hopping ue.CyclicPrefixUL = 'Normal'; % Normal cyclic prefix ue.DuplexMode = 'FDD'; % Frequency Division Duplex (FDD) ue.NTxAnts = 1; % Number of transmit antennas ue.NFrame = 0; % Frame number
pucch = struct; % Vector of PUCCH resource indices, one per transmission antenna pucch.ResourceIdx = 0:ue.NTxAnts-1; pucch.DeltaShift = 1; % PUCCH delta shift parameter pucch.CyclicShifts = 0; % PUCCH delta offset parameter pucch.ResourceSize = 0; % Size of resources allocated to PUCCH
srs = struct; srs.NTxAnts = 1; % Number of transmit antennas srs.SubframeConfig = 3; % Cell-specific SRS period = 5ms, offset = 0 srs.BWConfig = 6; % Cell-specific SRS bandwidth configuration srs.BW = 0; % UE-specific SRS bandwidth configuration srs.HoppingBW = 0; % SRS frequency hopping configuration srs.TxComb = 0; % Even indices for comb transmission srs.FreqPosition = 0; % Frequency domain position srs.ConfigIdx = 7; % UE-specific SRS period = 10ms, offset = 0 srs.CyclicShift = 0; % UE-cyclic shift
The processing loop generates a subframe at a time. These are all concatenated to create the resource grid for a frame (10 subframes). The loop performs the following operations:
SRS Information: By calling lteSRSInfo we can get information related to SRS for a given subframe. The
IsSRSSubframe field of the structure
srsInfo returned from the lteSRSInfo call indicates if the current subframe (given by
ue.NSubframe) is a cell-specific SRS subframe (
IsSRSSubframe = 1) or not (
IsSRSSubframe = 0). The value of this field can be copied into the
ue.Shortened field. This ensures that the subsequent PUCCH generation will correctly respect the cell-specific SRS configuration for all subframes, omitting the last symbol of the PUCCH in the cell-specific SRS subframes.
PUCCH 1 Demodulation Reference Signal (DRS) Generation and Mapping: The DRS signal is located in the 3rd, 4th and 5th symbols of each slot and therefore never has the potential to collide with the SRS.
PUCCH 1 Generation and Mapping: Unlike the DRS, the PUCCH 1 transmission can occupy the last symbol of the subframe unless
ue.Shortened = 1. In this case the last symbol of the subframe will be left empty.
SRS Generation and Mapping: Here we generate and map the SRS according to the UE-specific SRS configuration. Both the lteSRSIndices and lteSRS functions use the fields
srs.ConfigIdx to determine if the current subframe is configured for SRS transmission; if not, the output of both functions is empty.
txGrid = ; % Create empty resource grid for i = 1:10 % Process 10 subframes % Configure subframe number (0-based) ue.NSubframe = i-1; fprintf('Subframe %d:\n',ue.NSubframe); % Establish if this subframe is a cell-specific SRS subframe, % and if so configure the PUCCH for shortened transmission srsInfo = lteSRSInfo(ue, srs); ue.Shortened = srsInfo.IsSRSSubframe; % Copy SRS info to ue struct % Create empty uplink subframe txSubframe = lteULResourceGrid(ue); % Generate and map PUCCH1 DRS to resource grid drsIndices = ltePUCCH1DRSIndices(ue, pucch);% DRS indices drsSymbols = ltePUCCH1DRS(ue, pucch); % DRS sequence txSubframe(drsIndices) = drsSymbols; % Map to resource grid % Generate and map PUCCH1 to resource grid pucchIndices = ltePUCCH1Indices(ue, pucch); % PUCCH1 indices ACK = [0; 1]; % HARQ indicator values pucchSymbols = ltePUCCH1(ue, pucch, ACK); % PUCCH1 sequence txSubframe(pucchIndices) = pucchSymbols; % Map to resource grid if (ue.Shortened) disp('Transmitting shortened PUCCH'); else disp('Transmitting full-length PUCCH'); end % Configure the SRS sequence group number (u) according to TS % 36.211 Section 220.127.116.11 with group hopping disabled srs.SeqGroup = mod(ue.NCellID,30); % Configure the SRS base sequence number (v) according to TS 36.211 % Section 18.104.22.168 with sequence hopping disabled srs.SeqIdx = 0; % Generate and map SRS to resource grid % (if active under UE-specific SRS configuration) [srsIndices, srsIndicesInfo] = lteSRSIndices(ue, srs);% SRS indices srsSymbols = lteSRS(ue, srs); % SRS seq. if (srs.NTxAnts == 1 && ue.NTxAnts > 1) % Map to resource grid % Select antenna for multiple antenna selection diversity txSubframe( ... hSRSOffsetIndices(ue, srsIndices, srsIndicesInfo.Port)) = ... srsSymbols; else txSubframe(srsIndices) = srsSymbols; end % Message to console indicating when SRS is mapped to the resource % grid. if(~isempty(srsIndices)) disp('Transmitting SRS'); end % Concatenate subframes to form frame txGrid = [txGrid txSubframe]; %#ok end
Subframe 0: Transmitting shortened PUCCH Transmitting SRS Subframe 1: Transmitting full-length PUCCH Subframe 2: Transmitting full-length PUCCH Subframe 3: Transmitting full-length PUCCH Subframe 4: Transmitting full-length PUCCH Subframe 5: Transmitting shortened PUCCH Subframe 6: Transmitting full-length PUCCH Subframe 7: Transmitting full-length PUCCH Subframe 8: Transmitting full-length PUCCH Subframe 9: Transmitting full-length PUCCH
The figure produced shows the number of active subcarriers in each SC-FDMA symbol across the 140 symbols in
txGrid. All SC-FDMA symbols contain 12 active subcarriers corresponding to the single resource block bandwidth of the PUCCH except:
symbol 13, the last symbol of subframe 0 which has 48 active subcarriers corresponding to an 8 resource block SRS transmission
symbol 83, the last symbol of subframe 5 which has 0 active subcarriers corresponding to the shortened PUCCH (last symbol empty) to allow for potential SRS transmission by another UE in this cell.
figure; for i = 1:ue.NTxAnts subplot(ue.NTxAnts,1,i); plot(0:size(txGrid,2)-1,sum(abs(txGrid(:,:,i)) ~= 0),'r:o') xlabel('symbol number'); ylabel('active subcarriers'); title(sprintf('Antenna %d',i-1)); end
Plot the resource grid with the PUCCH at the band edges and the SRS comb transmission in subframe 0.
figure; pcolor(abs(txGrid)); colormap([1 1 1; 0 0 0.5]) shading flat; xlabel('SC-FDMA symbol'); ylabel('subcarrier')
SRS transmit antenna selection can be demonstrated by setting
ue.NTxAnts = 2 and examining the subplots produced for each antenna; the SRS is transmitted on antenna 0 while the PUCCH is shortened on both (all) antennas. A pattern of antenna selection across this one-frame run can be shown by further configuring
srs.SubframeConfig = 0 and
srs.ConfigIdx = 0. This configures a cell-specific SRS configuration of 2ms periodicity with an offset of 0 (signaled by
srs.SubframeConfig = 0) and also a UE-specific SRS configuration of 2ms periodicity with an offset of 0 (signaled by
srs.ConfigIdx = 0). In this case an SRS is transmitted by this UE on even subframes, and the transmit antenna alternates with each transmission.
SRS transmission on multiple antennas using resource diversity can be shown by setting
ue.NTxAnts = 2 and
srs.NTxAnts = 2. In this case the SRS is always transmitted on both (all) antennas with orthogonal resources on each antenna.
This example uses the following helper functions:
3GPP TS 36.211 "Physical channels and modulation"
3GPP TS 36.213 "Physical layer procedures"