Main Content

lteULFrameOffsetPUCCH2

PUCCH format 2 DM-RS uplink subframe timing estimate

Description

offset = lteULFrameOffsetPUCCH2(ue,chs,waveform,oack) performs synchronization using PUCCH format 2 demodulation reference signals (DM-RS) for the time-domain waveform, waveform, given UE-specific settings, ue, PUCCH format 2 configuration chs, and the number of Hybrid ARQ indicators oack.

The returned value offset indicates the number of samples from the start of the waveform waveform to the position in that waveform where the first subframe containing the DM-RS begins.

offset provides subframe timing; frame timing can be achieved by using offset with the subframe number, ueNSubframe. This behavior is consistent with real-world operation because the base station knows when, in which subframe, to expect uplink transmissions.

example

[offset,ack] = lteULFrameOffsetPUCCH2(ue,chs,waveform,oack) also returns a vector ack of decoded PUCCH format 2 Hybrid ARQ indicators.

example

[offset,ack,corr] = lteULFrameOffsetPUCCH2(ue,chs,waveform,oack) also returns a complex matrix corr, which is used to extract the timing offset.

example

Examples

collapse all

This example performs synchronization and uses the PUCCH format 2 DM-RS when demodulating a transmission that has been delayed by 5 samples.

Initialize ue specific parameter structure, PUCCH2 structure, UL resource grid and txAck parameter.

ue.NULRB = 6;
ue.NCellID = 0;
ue.NSubframe = 0;
ue.Hopping = 'Off';
ue.CyclicPrefixUL = 'Normal';
ue.NTxAnts = 1;
pucch2.ResourceIdx = 0;
pucch2.ResourceSize = 0;
pucch2.CyclicShifts = 0;
rgrid = lteULResourceGrid(ue);
txAck = [1;1];
rgrid(ltePUCCH2DRSIndices(ue,pucch2)) = ltePUCCH2DRS(ue,pucch2,txAck);

Generate modulated waveform and add a five sample delay.

waveform = lteSCFDMAModulate(ue,rgrid);
tx = [zeros(5,1);waveform];

Use PUCCH format 2 DM-RS to estimate UL frame offset timing, then demodulate the waveform.

offset = lteULFrameOffsetPUCCH2(ue,pucch2,tx,length(txAck))
offset = 
5
rxGrid = lteSCFDMADemodulate(ue,tx(1+offset:end));

View the Hybrid ARQ indicators for a PUCCH format 2 transmission waveform. The transmission contains PUCCH format 2 demodulation reference signal (DM-RS) symbols available for estimating the waveform timing.

UE Configuration

Create configuration structures for ue and pucch2.

ue.NULRB = 6;
ue.NCellID = 0;
ue.NSubframe = 0;
ue.Hopping = 'Off';
ue.CyclicPrefixUL = 'Normal';
ue.NTxAnts = 1;

pucch2.ResourceIdx = 0;
pucch2.ResourceSize = 0;
pucch2.CyclicShifts = 0;

Generate Transmission Waveform

On the transmit side, populate a resource grid and generate a waveform containing PUCCH2 DM-RS.

reGrid = lteULResourceGrid(ue);
txAck = [0;1];
reGrid(ltePUCCH2DRSIndices(ue,pucch2)) = ltePUCCH2DRS(ue,pucch2,txAck);

tx = lteSCFDMAModulate(ue,reGrid);

Waveform Reception

On the receive side, calculate timing offset using the PUCCH2 DM-RS symbols for the time-domain waveform and return decoded PUCCH format 2 Hybrid ARQ indicators.

[offset,ack] = lteULFrameOffsetPUCCH2(ue,pucch2,tx,length(txAck));
ack
ack = 2x1 logical array

   0
   1

Correct the timing offset and demodulate the received waveform.

rxGrid = lteSCFDMADemodulate(ue,tx(1+offset:end));

View the correlation peak for a transmission waveform that has been delayed. The transmission contains PUCCH format 2 demodulation reference signal (DM-RS) symbols available for estimating the waveform timing.

UE Configuration

Create configuration structures for ue and pucch2.

ue.NULRB = 6;
ue.NCellID = 0;
ue.NSubframe = 0;
ue.Hopping = 'Off';
ue.CyclicPrefixUL = 'Normal';
ue.NTxAnts = 1;

pucch2.ResourceIdx = 0;
pucch2.ResourceSize = 0;
pucch2.CyclicShifts = 0;

Generate Transmission Waveform

On the transmit side, populate a resource grid and generate a waveform containing PUCCH2 DM-RS.

reGrid = lteULResourceGrid(ue);
txAck = [1;1];
reGrid(ltePUCCH2DRSIndices(ue,pucch2)) = ltePUCCH2DRS(ue,pucch2,txAck);

tx = lteSCFDMAModulate(ue,reGrid);

Waveform Reception

On the receive side, calculate timing offset using the PUCCH2 DM-RS symbols for the time-domain waveform and return the correlations for the transmit waveform and for a delayed version of the transmit waveform.

[~,ack,corr] = lteULFrameOffsetPUCCH2(ue,pucch2,tx,length(txAck));

txDelayed = [zeros(5,1); tx];
[offset,ack,corrDelayed] = lteULFrameOffsetPUCCH2(ue,pucch2,txDelayed,length(txAck));

Plot the correlation data before and after delay is added. Zoom in on the x-axis to view correlation peaks.

plot(corr)
hold on
plot(corrDelayed)
hold off
xlim([0 100])

Figure contains an axes object. The axes object contains 2 objects of type line.

Correct the timing offset and demodulate the received waveform.

rrxGrid = lteSCFDMADemodulate(ue,txDelayed(1+offset:end));

Input Arguments

collapse all

UE-specific settings, specified as a scalar structure with the following fields.

Parameter FieldRequired or OptionalValuesDescription
NULRBRequired

Scalar integer from 6 to 110

Number of uplink resource blocks. (NRBUL)

NCellIDRequired

Integer from 0 to 503

Physical layer cell identity

NSubframeRequired

0 (default), nonnegative scalar integer

Subframe number

CyclicPrefixULOptional

'Normal' (default), 'Extended'

Cyclic prefix length

NTxAntsOptional

1 (default), 2, 4

Number of transmission antennas.

HoppingOptional

'Off' (default), 'Group'

Frequency hopping method.

NPUCCHIDOptional

Integer from 0 to 503

PUCCH virtual cell identity. If this field is not present, NCellID is used as the identity.

Data Types: struct

PUCCH format 2 configuration, specified as a scalar structure with the following fields.

Parameter FieldRequired or OptionalValuesDescription
ResourceIdxOptional

0 (default), integer from 0 to 1185 or vector of integers.

PUCCH resource indices which determine the physical resource blocks, cyclic shift, and orthogonal cover used for transmission. (nPUCCH(2)). Define one index for each transmission antenna.

ResourceSizeOptional

0 (default), integer from 0 to 98.

Size of resource allocated to PUCCH format 2 (NRB(2))

CyclicShiftsOptional

0 (default), integer from 0 to 7

Number of cyclic shifts used for format 1 in resource blocks (RBs) with a mixture of format 1 and format 2 PUCCH, specified as an integer from 0 to 7. (Ncs(1))

Data Types: struct

Time-domain waveform, specified as a numeric matrix. waveform must be a NS-by-NR matrix, where NS is the number of time-domain samples and NR is the number of receive antennas. waveform should be at least one subframe long and contain the DM-RS signals.

Generate waveform by SC-FDMA modulation of a resource matrix using the lteSCFDMAModulate function, or by using one of the channel model functions, lteFadingChannel, lteHSTChannel, or lteMovingChannel.

Data Types: double
Complex Number Support: Yes

Number of uncoded Hybrid ARQ bits expected, 1 (PUCCH format 2a) or 2 (PUCCH format 2b).

Data Types: double

Output Arguments

collapse all

Number of samples from the start of the waveform to the position in that waveform where the first subframe containing the DM-RS begins, returned as a scalar integer. offset is computed by extracting the timing of the peak of the correlation between waveform and internally generated reference waveforms containing DM-RS signals. The correlation is performed separately for each antenna and the antenna with the strongest correlation is used to compute offset. This process is repeated for either one or two Hybrid ARQ indicators combination as specified by the parameter oack. This correlation amounts to a maximum likelihood (ML) decoding of the Hybrid ARQ indicators, which are signaled on the PUCCH format 2 DM-RS.

Note

offset is the position of mod(max(abs(corr),LSF)), where LSF is the subframe length.

Decoded PUCCH format 2 Hybrid ARQ bits, returned as a numeric vector or matrix. If multiple decoded Hybrid ARQ indicator vectors have a likelihood equal to the maximum, ack is a matrix where each column represents one of the equally likely Hybrid ARQ indicator vectors.

Signal used to extract the timing offset, returned as a complex numeric matrix. corr has the same dimensions as waveform.

Version History

Introduced in R2014a