lteULFrameOffset
PUSCH DMRS uplink subframe timing estimate
Description
performs
synchronization using PUSCH DMRS signals for the timedomain waveform, offset
= lteULFrameOffset(ue
,chs
,waveform
)waveform
,
given UEspecific settings, ue
, and PUSCH configuration, chs
.
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 DMRS begins.
offset
provides subframe timing; frame
timing can be achieved by using offset
with the
subframe number, ue
.
NSubframe
.
This information is consistent with realworld operation, since the
base station knows when, or in which subframe, to expect uplink transmissions.
Examples
Synchronize and SCFDMA Demodulate Delayed Transmission
Synchronization and demodulation of transmission which has been delayed by 5 samples.
Initialize waveform and insert a 5 sample delay.
ue = lteRMCUL('A32');
waveform = lteRMCULTool(ue,[1;0;0;1]);
tx = [zeros(5,1); waveform];
Determine offset
and demodulate the waveform.
offset = lteULFrameOffset(ue,ue.PUSCH,tx)
offset = 5
rxGrid = lteSCFDMADemodulate(ue,tx(1+offset:end));
View PUSCH Transmission Correlation Peaks
View the correlation peak for a delayed transmit waveform. The transmission contains PUSCH demodulation reference signal (DMRS) symbols available for estimating the waveform timing.
UE Configuration
Configure UEspecific settings and generate the transmit waveform.
ue = lteRMCUL('A32');
tx = lteRMCULTool(ue,[1;0;0;1]);
Determine Offset
Calculate timing offset and return the correlations for the transmit waveform and for a delayed version of the transmit waveform.
[~,corr] = lteULFrameOffset(ue,ue.PUSCH,tx); txDelayed = [zeros(6,1); tx]; [offset,corrDelayed] = lteULFrameOffset(ue,ue.PUSCH,txDelayed);
Plot the correlation data before and after delay is added. Zoom in on the xaxis to view correlation peaks.
plot(corr) hold on plot(corrDelayed) hold off xlim([0 100])
Correct the timing offset and demodulate the received waveform.
rxGrid = lteSCFDMADemodulate(ue,txDelayed(1+offset:end));
Input Arguments
ue
— UEspecific settings
scalar structure
UEspecific settings, specified as a scalar structure with the following fields.
Parameter Field  Required or Optional  Values  Description 

NULRB  Required  Scalar integer from 6 to 110  Number of uplink resource blocks. ($${N}_{\text{RB}}^{\text{UL}}$$) 
NCellID  Required  Integer from 0 to 503  Physical layer cell identity 
NSubframe  Required  0 (default), nonnegative scalar integer  Subframe number 
CyclicPrefixUL  Optional 
 Cyclic prefix length 
NTxAnts  Optional  1 (default), 2, 4  Number of transmission antennas. 
Hopping  Optional 
 Frequency hopping method. 
SeqGroup  Optional  0 (default), integer from 0 to 29 
PUSCH sequence group assignment (Δ_{SS}). Only used if 
CyclicShift  Optional  0 (default), integer from 0 to 7  Number of cyclic shifts used for PUSCH DMRS (yields $${n}_{DMRS}^{(1)}$$). 
NPUSCHID  Optional  0 (default), nonnegative scalar integer from 0 to 509  PUSCH virtual cell identity. If this field is not present, See footnote. 
NDMRSID  Optional  0 (default), nonnegative scalar integer from 0 to 509  DMRS identity for cyclic shift hopping ($${n}_{ID}^{csh\_DMRS}$$).
If this field is not present, See footnote. 

Data Types: struct
chs
— PUSCH configuration
scalar structure
PUSCH configuration, specified as a scalar structure with the following fields.
Parameter Field  Required or Optional  Values  Description 

PRBSet  Required  Integer column vector or twocolumn matrix  0based physical resource block indices (PRBs) for the slots of the current PUSCH resource allocation. As a column vector, the resource allocation is the same in both slots of the subframe. As a twocolumn matrix, it specifies different PRBs for each slot in a subframe. 
NLayers  Optional  1 (default), 2, 3, 4  Number of transmission layers. 
DynCyclicShift  Optional  0 (default), integer from 0 to 7  Cyclic shift for DMRS (yields $${n}_{DMRS}^{(2)}$$). 
OrthCover  Optional 
 Applies ( 
The following field is required
only when ue . NTxAnts is
set to 2 or 4.  
PMI  Optional  0 (default), nonnegative scalar integer from 0 to 23.  Scalar precoder matrix indication (PMI) to be used during precoding See 
Data Types: struct
waveform
— Timedomain waveform
numeric matrix
Timedomain waveform, specified as a numeric matrix. waveform
must be a
N_{S}byN_{R}
matrix, where N_{S} is the number of
timedomain samples and N_{R} is the
number of receive antennas. waveform
should be at least
one subframe long and contain the DMRS signals.
Generate waveform
by SCFDMA 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
Output Arguments
offset
— Offset number of samples
scalar integer
Offset number of samples, returned as a scalar integer. This
output is the number of samples from the start of the waveform to
the position in that waveform where the first subframe containing
the DMRS begins. offset
is computed by extracting
the timing of the peak of the correlation between waveform
and
internally generated reference waveforms containing DMRS signals.
The correlation is performed separately for each antenna and the antenna
with the strongest correlation is used to compute offset
.
Note
offset
is the position of mod(max(abs(corr),L_{SF}))
,
where L_{SF} is the subframe
length.
corr
— Signal used to extract the timing offset
complexvalued numeric matrix
Signal used to extract the timing offset, returned as a complexvalued
numeric matrix. corr
has the same dimensions
as waveform
.
Version History
Introduced in R2014a
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)