Documentation

lteFrequencyOffset

Frequency offset estimation using cyclic prefix

Syntax

  • foffset = lteFrequencyOffset(cfgdl,waveform)
  • foffset = lteFrequencyOffset(cfgul,waveform)
    example
  • [foffset, corr] = lteFrequencyOffset(___)
  • [foffset, corr] = lteFrequencyOffset(___,toffset)

Description

foffset = lteFrequencyOffset(cfgdl,waveform) estimates the average frequency offset, foffset, of the time-domain waveform, waveform, by calculating correlation of the cyclic prefix. The parameters of waveform are given in the downlink settings structure, cfgdl. cfgdl must contain the field NDLRB to specify that a downlink signal is expected in waveform.

example

foffset = lteFrequencyOffset(cfgul,waveform) estimates the average frequency offset, foffset, of the time-domain waveform, waveform, by calculating correlation of the cyclic prefix. The parameters of waveform are given in the uplink settings structure, cfgul. cfgul must contain the field NULRB to specify that an uplink signal is expected in waveform.

[foffset, corr] = lteFrequencyOffset(___) also returns a complex matrix, corr, spanning one slot and containing the same number of antennas, or columns, as waveform. corr is the signal used to extract the timing of the correlation for the estimation of the frequency offset.

[foffset, corr] = lteFrequencyOffset(___,toffset) provides control over the position in the correlator output used to estimate the frequency offset. When present toffset is the timing offset in samples from the start of the correlator output to the position used for the frequency offset estimation. This input allows a timing offset to be calculated externally on a signal of longer duration than the input waveform. Which allows a short-term frequency offset estimate to be obtained while retaining the benefit of a longer-term timing estimate.

    Note:   If toffset is absent, the quality of the internal timing estimate is subject to the length and signal quality of the input waveform and, therefore, it may result in inaccurate frequency offset measurements.

Examples

collapse all

Estimate Frequency Offset

Perform frequency offset estimation and correction on an uplink signal, to which a frequency offset has been applied.

Generate uplink RMC A3-2.

[txWaveform,rgrid,cfg] = lteRMCULTool('A3-2',[1;0;0;1],'Fdd',2);

Apply an arbitrary frequency offset of 51.2 Hz.

t = (0:length(txWaveform)-1).'/cfg.SamplingRate;
txWaveform = txWaveform .* exp(1i*2*pi*51.2*t);

Estimate and display the frequency offset.

offset = lteFrequencyOffset(cfg,txWaveform);
fprintf('Frequency offset: %0.2fHz\n',offset);
Frequency offset: 51.20Hz

Correct for frequency offset.

rxWaveform = lteFrequencyCorrect(cfg,txWaveform,offset);

Perform SC-FDMA demodulation.

rxGrid = lteSCFDMADemodulate(cfg,rxWaveform);

Input Arguments

collapse all

cfgdl — Downlink configurationstructure

Downlink configuration, specified as a structure having the following fields.

Parameter FieldRequired or OptionalValuesDescription
NDLRBRequired

Scalar integer (6,...,110). Standard bandwidth values are 6, 15, 25, 50, 75, and 100. NDLRB also accepts the standardized bandwidths in string format from the set {'1.4MHz', '3MHz', '5MHz', '10MHz', '15MHz', '20MHz'}.

Number of downlink (DL) resource blocks (RBs)

CyclicPrefixOptional

'Normal' (default), 'Extended'

Cyclic prefix length

DuplexModeOptional

'FDD' (default), 'TDD'

Duplexing mode, specified as:

  • 'FDD' for Frequency Division Duplex or

  • 'TDD' for Time Division Duplex

The following apply when DuplexMode is set to 'TDD'.

  TDDConfigOptional

0 (default), 1, 2, 3, 4, 5, 6

Uplink or downlink configuration

  SSCOptional

0 (default), 1, 2, 3, 4, 5, 6, 7, 8, 9

Special subframe configuration (SSC)

  NSubframeOptional

Nonnegative integer

Subframe number.

Data Types: struct

cfgul — Uplink configurationstructure

Uplink configuration, specified as a structure having the following fields.

Parameter FieldRequired or OptionalValuesDescription
NULRBRequired

Positive scalar integer

Number of uplink (UL) resource blocks (RBs).

CyclicPrefixULOptional

'Normal' (default), 'Extended'

Cyclic prefix length

DuplexModeOptional

'FDD' (default), 'TDD'

Duplexing mode, specified as:

  • 'FDD' for Frequency Division Duplex or

  • 'TDD' for Time Division Duplex

The following apply when DuplexMode is set to 'TDD'.

  TDDConfigOptional

0 (default), 1, 2, 3, 4, 5, 6

Uplink or downlink configuration

  SSCOptional

0 (default), 1, 2, 3, 4, 5, 6, 7, 8, 9

Special subframe configuration (SSC)

  NSubframeOptional

Nonnegative integer

Subframe number.

Data Types: struct

waveform — Input time-domain waveformnumeric column vector

Input time-domain waveform, specified as a numeric column vector.

Data Types: double | single
Complex Number Support: Yes

toffset — Timing offsetscalar value

Timing offset, specified as a scalar value expressed in samples. Use toffset to control the position in the correlator output used to estimate the frequency offset. If toffset is absent, or empty, the position of the peak magnitude of the correlator output is used.

Data Types: double | single

Output Arguments

collapse all

foffset — Average frequency offset estimatescalar value

Average frequency offset estimate, returned as a scalar value expressed in Hertz. This function can only accurately estimate frequency offsets of up to ±7.5 kHz (a range of 15 kHz, the subcarrier spacing).

Data Types: double | single

corr — Correlation timing signalnumeric matrix

Correlation timing signal, returned as a numeric matrix. corr is a complex matrix that spans one slot and contains the same number of antennas, or columns, as waveform. It is the signal used to extract the timing of the correlation for the frequency offset estimation.

Data Types: double | single
Complex Number Support: Yes

Introduced in R2014a

Was this topic helpful?