mixed pucch format transmission and reception -凯发k8网页登录
this example shows the transmission and reception of physical uplink control channel (pucch) formats 1 and 2, including the case where the same physical resource is shared between transmissions of format 1 and format 2 simultaneously from two different user equipments (ues) using the lte toolbox™.
introduction
this example configures two user equipments (ues) to transmit a physical uplink control channel (pucch) format 1 signal from the first ue and a pucch format 2 signal from the second ue. appropriate demodulation reference signals (drs) are also generated. the transmitted signals are passed through two different fading channels and added, together with additive white gaussian noise (awgn), simulating the reception of the signals from the two ues at an enodeb. each signal (i.e. that belonging to each ue) is then synchronized, sc-fdma demodulated, equalized, pucch demodulated and then finally decoded. a plot is produced showing that the channels can be estimated independently for the two different signals, even though they share the same physical resource elements (res).
ue 1 configuration
the first ue is configured using a structure ue1
.
ue1.nulrb = 6; % number of resource blocks ue1.nsubframe = 0; % subframe number ue1.ncellid = 10; % physical layer cell identity ue1.rnti = 61; % radio network temporary identifier ue1.cyclicprefixul = 'normal'; % cyclic prefix ue1.hopping = 'off'; % frequency hopping ue1.shortened = 0; % reserve last symbols for srs transmission ue1.ntxants = 1; % number of transmit antennas
ue 2 configuration
similarly a configuration structure is used to configure the second ue, ue2
. this structure is identical to the configuration of ue1
with two exceptions:
no
shortened
field as this does not apply to pucch format 2.a different radio network temporary identifier (rnti) value (not used here as it is only relevant for physical uplink shared channel (pusch) transmission, but different ues would have different rnti).
ue2.nulrb = 6; % number of resource blocks ue2.nsubframe = 0; % subframe number ue2.ncellid = 10; % physical layer cell identity ue2.rnti = 77; % radio network temporary identifier ue2.cyclicprefixul = 'normal'; % cyclic prefix ue2.hopping = 'off'; % frequency hopping ue2.ntxants = 1; % number of transmit antennas
pucch 1 configuration
for the first ue, a pucch of format 1 is used, so an appropriate configuration structure pucch1
is created. the parameter cyclicshifts
specifies the number of cyclic shifts used by pucch format 1 in resource blocks where a mixture of pucch format 1 and pucch format 2 are to be transmitted. the parameter resourcesize
specifies the size of the resources used by pucch format 2, effectively determining the starting position of pucch format 1 transmissions; here we specify resourceidx=0
which will use the first pucch format 1 resource.
pucch1.resourceidx = 0; % pucch resource index pucch1.deltashift = 1; % delta shift pucch1.cyclicshifts = 1; % number of cyclic shifts pucch1.resourcesize = 0; % size of resources allocated to pucch format 2
pucch 2 configuration
for the second ue, a pucch of format 2 is used, so an appropriate configuration structure pucch2
is created. the values of parameters cyclicshifts
and resourcesize
are the same as in the pucch format 1 configuration. the value of resourceidx
is set to the first pucch format 2 resource, meaning that the physical resource blocks now configured for pucch format 1 and pucch format 2 will be the same.
pucch2.resourceidx = 0; % pucch resource index pucch2.cyclicshifts = 1; % number of cyclic shifts pucch2.resourcesize = 0; % size of resources allocated to pucch format 2
channel propagation model configuration
the propagation channel that the two ues will transmit through is configured using a structure channel
. the sampling rate of the channel is configured to match the sampling rate at the output of the first ue; note that the same sampling rate is used at the output of the second ue because ue1.nulrb
and ue2.nulrb
are the same. when we use this channel configuration for each ue, the seed
parameter of the structure will be set differently for each ue so that different propagation conditions result.
channel.nrxants = 4; % number of receive antennas channel.delayprofile = 'etu'; % delay profile channel.dopplerfreq = 300.0; % doppler frequency channel.mimocorrelation = 'low'; % mimo correlation channel.inittime = 0.0; % initialization time channel.nterms = 16; % oscillators used in fading model channel.modeltype = 'gmeds'; % rayleigh fading model type channel.initphase = 'random'; % random initial phases channel.normalizepathgains = 'on'; % normalize delay profile power channel.normalizetxants = 'on'; % normalize for transmit antennas % set sampling rate info = ltescfdmainfo(ue1); channel.samplingrate = info.samplingrate;
noise configuration
the snr is given by where is the energy of the signal of interest and is the noise power. the power of the noise to be added can be determined so that and are normalized after the sc-fdma demodulation to achieve the desired snr snrdb
. the noise added before sc-fdma demodulation will be amplified by the ifft. the amplification is the square root of the size of the ifft. in this simulation this is taken into consideration by dividing the desired noise power by this value. in addition, because real and imaginary parts of the noise are created separately before being combined into complex additive white gaussian noise, the noise amplitude must be scaled by so the generated noise power is 1.
snrdb = 21.0; % normalize noise power snr = 10^(snrdb/20); n = 1/(snr*sqrt(double(info.nfft)))/sqrt(2.0); % configure random number generators rng('default');
channel estimation configuration
the channel estimator is configured using a structure cec
. here cubic interpolation will be used with an averaging window of 12-by-1 res. this configures the channel estimator to use a special mode which ensures the ability to despread and orthogonalize the different overlapping pucch transmissions.
cec = struct; % channel estimation config structure cec.pilotaverage = 'userdefined'; % type of pilot averaging cec.freqwindow = 12; % frequency averaging window in res (special mode) cec.timewindow = 1; % time averaging window in res (special mode) cec.interptype = 'cubic'; % cubic interpolation
pucch format 1 generation
now all the necessary configuration is complete, the pucch format 1 and its drs are generated. the pucch format 1 carries the harq indicators hi1
and in this case there are 2 indicators, meaning that the transmission will be of format 1b. the pucch format 1 drs carries no data.
% pucch 1 modulation/coding hi1 = [0; 1]; % create harq indicators disp('hi1:');
hi1:
disp(hi1.');
0 1
pucch1sym = ltepucch1(ue1, pucch1, hi1);
% pucch 1 drs creation
pucch1drssym = ltepucch1drs(ue1, pucch1);
pucch format 2 generation
the pucch format 2 drs carries the harq indicators hi2
and in this case there are 2 indicators, meaning that the transmission will be of format 2b. the pucch format 2 itself carries coded channel quality information (cqi). the information cqi
here is coded and then modulated.
% pucch 2 drs modulation hi2 = [1; 1]; % create harq indicators disp('hi2:');
hi2:
disp(hi2.');
1 1
pucch2drssym = ltepucch2drs(ue2, pucch2, hi2); % pucch 2 coding cqi = [0; 1; 1; 0; 0; 1]; % create channel quality information disp('cqi:');
cqi:
disp(cqi.');
0 1 1 0 0 1
codedcqi = lteuciencode(cqi);
% pucch 2 modulation
pucch2sym = ltepucch2(ue2, pucch2, codedcqi);
pucch index generation
the indices for the pucch and pucch drs transmissions are created
pucch1indices = ltepucch1indices(ue1, pucch1); pucch2indices = ltepucch2indices(ue2, pucch2); pucch1drsindices = ltepucch1drsindices(ue1, pucch1); pucch2drsindices = ltepucch2drsindices(ue2, pucch2);
transmission for ue 1
the overall signal for the first ue is now transmitted. the steps are to map the pucch format 1 and corresponding drs signal into an empty resource grid, perform sc-fdma modulation and then transmit through a fading propagation channel.
% create resource grid grid1 = lteulresourcegrid(ue1); grid1(pucch1indices) = pucch1sym; grid1(pucch1drsindices) = pucch1drssym; % sc-fdma modulation txwave1 = ltescfdmamodulate(ue1, grid1); % channel modeling. an additional 25 samples added to the end of the % waveform to cover the range of delays expected from the channel modeling % (a combination of implementation delay and channel delay spread) channel.seed = 13; rxwave1 = ltefadingchannel(channel,[txwave1; zeros(25,1)]);
transmission for ue 2
the overall signal for the second ue is now transmitted. note that a different random seed channel.seed
is used compared to that used for the first ue. this ensures that different propagations are used for the two transmissions.
% create resource grid grid2 = lteulresourcegrid(ue2); grid2(pucch2indices) = pucch2sym; grid2(pucch2drsindices) = pucch2drssym; % sc-fdma modulation txwave2 = ltescfdmamodulate(ue2, grid2); % channel modeling. an additional 25 samples added to the end of the % waveform to cover the range of delays expected from the channel modeling % (a combination of implementation delay and channel delay spread) channel.seed = 15; rxwave2 = ltefadingchannel(channel, [txwave2; zeros(25, 1)]);
reception at the base station
the input to the base station receiver is modeled by adding the two faded signals together with gaussian noise with power as described above.
rxwave = rxwave1 rxwave2;
% add noise
noise = n*complex(randn(size(rxwave)), randn(size(rxwave)));
rxwave = rxwave noise;
synchronization and sc-fdma demodulation for ue 1
the uplink frame timing estimate for ue1 is calculated using the pucch 1 drs signals and then used to demodulate the sc-fdma signal. the resulting grid rxgrid1
is a 3 dimensional matrix. the number of rows represents the number of subcarriers. the number of columns equals the number of sc-fdma symbols in a subframe. the number of subcarriers and symbols is the same for the returned grid from as the grid passed into . the number of planes (3rd dimension) in the grid corresponds to the number of receive antennas.
% synchronization offset1 = lteulframeoffsetpucch1(ue1, pucch1, rxwave); % sc-fdma demodulation rxgrid1 = ltescfdmademodulate(ue1, rxwave(1 offset1:end, :));
channel estimation and equalization for ue 1
an estimate of the channel between each transmitter and the base station receiver is obtained and used to equalize its effects. to create an estimation of the channel is used. the channel estimation function is configured by the structure cec
. the function returns a 3-d matrix of complex weights which are applied to each resource element by the channel in the transmitted grid. the 1st dimension is the subcarrier, the 2nd dimension is the sc-fdma symbol and the 3rd dimension is the receive antenna. the effect of the channel on the received resource grid is equalized using . this function uses the estimate of the channel (h1
) to equalize the received resource grid (rxgrid1
).
% channel estimation [h1, n0] = lteulchannelestimatepucch1(ue1, pucch1, cec, rxgrid1); % extract res corresponding to the pucch from the given subframe across all % receive antennas and channel estimates [pucchrx1, pucchh1] = lteextractresources(pucch1indices, rxgrid1, h1); % equalization eqgrid1 = lteulresourcegrid(ue1); eqgrid1(pucch1indices) = lteequalizemmse(pucchrx1, pucchh1, n0);
pucch 1 decoding
finally the pucch format 1 channel is decoded and the useful harq indicator bits are extracted.
rxhi1 = ltepucch1decode(ue1, pucch1, length(hi1), ... eqgrid1(pucch1indices)); disp('rxhi1:');
rxhi1:
disp(rxhi1.');
0 1
receiver for ue 2
the uplink frame timing estimate for ue2 is calculated using the pucch 2 drs signals and then used to demodulate the sc-fdma signal. in this case, the hybrid arq indicators as conveyed on the pucch format 2 drs are also found. the resulting grid rxgrid2
is a 3 dimensional matrix. to create an estimation of the channel is used. the effect of the channel on the received resource grid is equalized using lteequalizemmse. finally the pucch format 2 channel is decoded and the useful cqi information bits are extracted.
% synchronization (and pucch 2 drs demodulation/decoding) [offset2,rxhi2] = lteulframeoffsetpucch2(ue2,pucch2,rxwave,length(hi2)); disp('rxhi2:');
rxhi2:
disp(rxhi2.');
1 1
% sc-fdma demodulation rxgrid2 = ltescfdmademodulate(ue2, rxwave(1 offset2:end, :)); % channel estimation [h2, n0] = lteulchannelestimatepucch2(ue2, pucch2, cec, rxgrid2, rxhi2); % extract res corresponding to the pucch from the given subframe across all % receive antennas and channel estimates [pucchrx2, pucchh2] = lteextractresources(pucch2indices, rxgrid2, h2); % equalization eqgrid2 = lteulresourcegrid(ue2); eqgrid2(pucch2indices) = lteequalizemmse(pucchrx2, pucchh2, n0); % pucch 2 demodulation rxcodedcqi = ltepucch2decode(ue2, pucch2, eqgrid2(pucch2indices)); % pucch 2 decoding rxcqi = lteucidecode(rxcodedcqi, length(cqi)); disp('rxcqi:');
rxcqi:
disp(rxcqi.');
0 1 1 0 0 1
display estimated channels
a plot is produced showing that the channels can be estimated independently for the two different signals, even although they share the same physical res. the pucch format 1 channel estimate is shown in red and the pucch format 2 channel estimate is shown in blue.
hpucchmixedformatdisplay(h1, eqgrid1, h2, eqgrid2);
appendix
this example uses this helper function.