brochure-button

Overview

Testimonial:

“We highly recommend IS-Wireless as a valuable and professional provider of software in the area of LTE/LTE-Advanced systems.”
Peter Jensen, Smith Myers Communication, United Kingdom

LTE PHY Lab is a complete implementation of E-UTRA physical layer according to 3GPP Release 8, with substantial elements of Release 9 and 10. It runs under Matlab / Octave and can be used as a link-level simulation tool or a golden-reference PHY library. LTE PHY Lab is designed to serve customers at all stages of the LTE software, hardware and IPR development, from research, prototyping and implementation, up to system benchmarking, verification and testing.

LTE PHY Lab models a bit-by-bit and sample-by-sample baseband processing for UE and eNB physical (PHY) layer in both downlink and uplink. It implements all 3GPP-compliant functionalities for Transport Channels, Control Info, Physical Channels and Physical Signal processing (including channel coding, MIMO precoding and OFDM / SC-FDMA modulation) and extends it by possible 5G waveforms. LTE PHY Lab provides algorithms for signal reception and recovery, including time and frequency synchronization, channel estimation and correction, MIB / DCI / SIB1 decoding. The tool supports cooperation with popular SDR hardware (e.g., USRP), in order to generate or receive the LTE waveform using VHF / UHF/ SHF frequency ranges, as well as writing and reading of the complex samples to / from a file. The key operations for eNB transmitter and receiver are presented in Figures 1 and 2, respectively, whereas Figure 3 depicts the combined processing chain for end-to-end downlink transmission. The main scenarios for simulation and experimentation using LTE PHY Lab are presented in Figure 4.

LTE PHY Lab is implemented as a library of modular functions with well-defined interfaces, which allows a user to include its own algorithms. There are plenty of predefined use cases and examples with well-documented functions. LTE PHY Lab is designed to work with 5G waveforms – the first 5G waveform implemented in LTE PHY Lab is Universal Filtered Multi-Carrier (UMFC).

Figure 1. LTE PHY Lab PHY and transport channels (eNB TX baseband processing).

Figure 2. LTE PHY Lab PHY and transport channels (eNB RX baseband processing).

Figure 3. LTE PHY Lab transmitter and receiver (downlink).

Figure 4. LTE PHY Lab simulation and experimentation scenarios.

 

Contact Sales

We would be excited to learn about your business and technical needs and propose a product or customization to fulfill them. To receive more information about our products, request a quote or get a trial, please contact us at sales@is-wireless.com.

Technical specification summary

  • Physical layer models of 3GPP Release 8, 9 and 10 E-UTRA physical layer
    • Downlink and uplink (including RACH) support
    • OFDMA and SC-FDMA end-to-end processing
    • MIB / DCI generation and decoding
    • Feedback generation and decoding (CQI, PMI, RI estimation)
  • 5G capabilities:
    • UFMC modulator and demodulator
    • Environment for developing novel waveform
  • Channel models included (AWGN, SUI IEEE 802.16, E-UTRA 3GPP TS 36.101 – EPA, EVA, ETU)
  • Support for MIMO (SM (SU-MIMO), TX diversity)
  • Support for carrier aggregation (for up to 5 CC)
  • Signal decoding:
    • RX functionalities including cell search, synchronization, channel estimation / correction, regeneration of MIB and SIB1
    • Cooperation with popular SDR hardware, including USRP (APIs for signal recording)
    • Demodulation and decoding of LTE signals from a file
  • Usage:
    • Use case scenarios (e.g. UL feedback generation, system sync procedure)
    • Interoperability with LTE MAC Lab – system level simulation tool

 

Applications

Application Benefit Who can benefit?
LTE PHY prototyping LTE PHY Lab shortens the development time Chip manufacturer, ODM
R&D LTE PHY Lab provides simulation framework Research Institute
Development of MAC protocols and RF processing LTE PHY Lab serves as a reference model ODM, Research Institute, Protocol Stack Developer
Testing and verification where LTE PHY Lab provides test signal vectors ODM, OEM, Operator
Education LTE PHY Lab serves as an environment to visualize LTE PHY operation University, Training Company

Example customer experience

LTE-PHY-Lab-time-and-frequency-results

LTE PHY Lab: time and frequency results

LTE PHY Lab GUI overview

LTE PHY Lab: GUI overview

LTE PHY Lab Real Signal Analysis

LTE PHY Lab GUI real signal analysis

Introduction

If UE is not connected to the base station it has to perform Random Access procedure. Base station broadcasts information about possible time slots for sending requests for connection. UE transmits preamble with randomly selected index within this time slot and waits for response from base station. If no other UE selected the same index and the received power of the signal was sufficient to decode it base station can preceed with the Random Access procedure.

In this example preamble will be created, transmitted and the base station will try to decode it.

Selecting preamble parameters

At the beggining we will select index for preamble. This can be either random value, as it is in real network or predefined value for verification purposes.

First step while working with LTE PHY Lab is loading configuration:

%Load default configuration:
 LTE_PHY_Lab_UL_Configuration;
%Set fixed value of preamble index
 txRAPNr           = 29;

Additionally we add flags for displaying preamble – these are not required for processing, but in this scenario we want to look into more details:

% Add 'samples' to display values of the preamble
% Add 'zoom' to focus the samples plot on the first 50 samples (to make it
% readable
% Add 'scatterplot' to see I/Q plot of the preamble
global Display_PRACH;
Display_PRACH = {'samples', 'zoom', 'scatterplot'};

Setting Uplink Transmitter

The next step is to setup uplink transmitter. More information about each of the parameters can be found in help of LTEULPhyTransmitter

help LTEULPhyTransmitter;
txULSCH          = [];    % UL-SCH data
txCQI            = [];    % CQI data
txHI             = [];    % HI data
txRI             = [];    % RI data
isHI_RI          = 2;     % RI
modOrder         = 4;     % Modulation order
numSubframe      = 0;     % Number of subframe
sizeFFT          = 128;   % Size of the FFT
RIV              = [1 2]; % Resource Indication Value
isSRS            = 0;     % SRS flag
isPRACH          = 1;     % PRACH flag (set to 1 as we want to transmit PRACH)
isPUSCH          = 0;     % PUSCH flag
PUCCHformat      = -1;    % PUCCH format
N_cell_ID        = 1;     % Physical Cell ID
nRNTI            = 2;     % RNTI
trBlkSize        = 224;   % Transport block size
RVidx            = 0;     % Reduncandy version number
CPtype           = 0;     % Type of cyclic prefix
paprSettings     = [0 1 7]; %PAPR algorithm settings

Running Uplink transmitter

When all paramters are defined we can run LTEULPhyTransmitter which returns IQ samples of the SCFDMA signal. Additionally scatterplot and samples of the preamble will be displayed.

txSCFDMASymbols = LTEULPhyTransmitter(txULSCH, txCQI, txHI, txRI, txRAPNr, isHI_RI, modOrder,...
                                  numSubframe, sizeFFT, RIV, isSRS, isPRACH, isPUSCH, PUCCHformat,...
                                  N_cell_ID, nRNTI, trBlkSize, RVidx, CPtype, paprSettings);
PRACH_Synchronization_Case_01
PRACH_Synchronization_Case_02

Scatterplot shows that amplitude of each sample is equal to 1 (all points are located on unit circle). The only difference is phase of individual points.

On the preamble samples plot you can see imaginary and real parts of the preamble. This plot is zoomed to first 50 samples to make it readable.

Receiving samples

We have to setup additional parameters for the receiver. More details can be found in help :

CodeWordHARQTable   = [];      % HARQTable (see also ULSCH_PCHChDeCodRateDeM for details)
numPUSCHBits        = 64;      % number of transmitted PUSCH bits
numCQIBits          = 10;      % number of transmitted CQI bits
synchroSettings     = [0 0 0]; % synchronization setup (off for this case)
d_10                = 1;       % PUCCHformat specific parameter
SNR                 = 30;      % vector of SNR values in dB
mimoSetting         = [1 0 1 0 1 0 0 0 1 1 1 1]; % vector of MIMO settings
CQIconf             = struct('Format',{'2-0'},'Type',{0},'SubbandLabel',{0});
                               % structure which contains configuration of CQI

Running Uplink Receiver

When all paramters are defined we can run LTEULPhyReceiver which returns received signals (PUSCH, HI, etc). Parameter we are interested most in this case is rxRAPNr – number of received index of preamble.

[rxPUSCH, rxHI, rxCQI, rxUCIstruct, rxRI, rxDRSPUSCH, rxDRSPUCCH, rxSRS, rxRAPNr] = ...
LTEULPhyReceiver(txSCFDMASymbols, numSubframe, sizeFFT, RIV,...
          isSRS, isHI_RI, isPRACH, isPUSCH, PUCCHformat, CPtype, d_10,...
          N_cell_ID, nRNTI, modOrder, trBlkSize, RVidx, SNR,...
          CodeWordHARQTable, numPUSCHBits, numCQIBits, synchroSettings,...
          CQIconf, mimoSetting);

If received value is the same as transmitted, this step of Random Access Procedure is successfuly completed.

disp(['Transmitted number of PRACH sequence: ', num2str(txRAPNr)]);
disp(['Decoded number of PRACH sequence: '    , num2str(rxRAPNr)]);
if txRAPNr == rxRAPNr
   disp('Transmitted and received sequences are equal');
end
Transmitted number of PRACH sequence: 29
Decoded number of PRACH sequence: 29
Transmitted and received sequences are equal

Introduction

Downlink Control Information (DCI) contains information about resource assignments. In DCI information about location of user’s data and decoding scheme is included. Therefore, receiver must decode DCI first to be able to decode data.
In this example DCI for different users is created, mapped into LTE frame, transmitted through ideal channel and then decoded in the receiver.

Creating DCI Format 0 for user 1

For the first user we create two DCI (Format 0 for data scheduled in uplink and Format 1 for data scheduled in downlink)

First step while working with LTE PHY Lab is loading configuration:

%Load default configuration:
LTE_PHY_Lab_DL_Configuration;

HoppingFlag      = 0;        % Hopping flag
nPRB_wave        = -1;       % nPRB_wave (parameter used in frequency hopping)
RIV              = [0 2];    % Resource Indication Value
MCS              = 9;        % Modulation and coding scheme index
NewDataFlag      = 1;        % Flag for new data
TPC              = 1;        % TPC Command Field
nDMRS            = 0;        % Cyclic shift for DM RS
CQIreq           = 1;        % Channel Quality Indicator request
sizeFFT          = 512;      % FFT size

To get more information about each of the parameters you can use built-in help for each function.

help DCIFormat0;

After setting all required parameters DCI can be created using DCIFormat0 function:

%Create DCI according to format 0 with given parameters
[outputDCIFormat0_1] = DCIFormat0(HoppingFlag,nPRB_wave,RIV,MCS,NewDataFlag,...
              TPC,nDMRS,CQIreq,sizeFFT);>

Creating DCI Format 1 for user 1

Now we can create Format 1 DCI (for single antenna downlink transmission) for the same user:

Again we should start with setting the parameters:

ResourceType    = 1;    % Type of resource allocation
numRBG          = [1, 1, [0 1 1 0 0 0 0 0 0 0 0]]; % Selected RBG subset
MCS             = 9;    % Modulation and coding scheme index
HARQ            = 0;    % HARQ process number
NewDataFlag     = 1;    % Flag for new data
RedVer          = 1;    % Redundancy Version
TPC             = 0;    % TPC Command Field

And then we can call the DCIFormat1 function:

[outputDCIFormat1_1] = DCIFormat1(ResourceType,numRBG,MCS,HARQ,NewDataFlag,...
              RedVer,TPC,sizeFFT);

Creating DCI Format 0 for user 2

For the second user we also create two DCI (Format 0 for data scheduled in uplink and Format 1 for data scheduled in downlink)

HoppingFlag     = 0;        % Hopping flag
nPRB_wave       = -1;       % nPRB_wave (parameter used in frequency hopping)
RIV             = [2 3];    % Resource Indication Value
MCS             = 9;        % Modulation and coding scheme index
NewDataFlag     = 1;        % Flag for new data
TPC             = 1;        % TPC Command Field
nDMRS           = 0;        % Cyclic shift for DM RS
CQIreq          = 1;        % Channel Quality Indicator request

[outputDCIFormat0_2] = DCIFormat0(HoppingFlag,nPRB_wave,RIV,MCS,NewDataFlag,...
              TPC,nDMRS,CQIreq,sizeFFT);

Creating DCI Format 1 for user 2

Now we can create Format 1 DCI (for single antenna downlink transmission) for the same user:

ResourceType    = 0;    % Type of resource allocation
numRBG          = 1;    % Selected RBG subset
MCS             = 9;    % Modulation and coding scheme index
HARQ            = 0;    % HARQ process number
NewDataFlag     = 1;    % Flag for new data
RedVer          = 1;    % Redundancy Version
TPC             = 0;    % TPC Command Field

[outputDCIFormat1_2] = DCIFormat1(ResourceType,numRBG,MCS,HARQ,NewDataFlag,...
              RedVer,TPC,sizeFFT);

Creating DCI Format 0 for user 3

For the last user we create the same set of DCI (Format 0 for data scheduled in uplink and Format 1 for data scheduled in downlink)

HoppingFlag     = 0;        % Hopping flag
nPRB_wave       = -1;       % nPRB_wave (parameter used in frequency hopping)
RIV             = [3 2];    % Resource Indication Value
MCS             = 9;        % Modulation and coding scheme index
NewDataFlag     = 1;        % Flag for new data
TPC             = 1;        % TPC Command Field
nDMRS           = 0;        % Cyclic shift for DM RS
CQIreq          = 1;        % Channel Quality Indicator request

[outputDCIFormat0_3] = DCIFormat0(HoppingFlag,nPRB_wave,RIV,MCS,NewDataFlag,...
              TPC,nDMRS,CQIreq,sizeFFT);

Creating DCI Format 1 for user 3

Now we can create Format 1 DCI (for single antenna downlink transmission) for the same user:

ResourceType    = 0;     % Type of resource allocation
numRBG          = [4 5]; % Selected RBG subset
MCS             = 9;     % Modulation and coding scheme index
HARQ            = 0;     % HARQ process number
NewDataFlag     = 1;     % Flag for new data
RedVer          = 1;     % Redundancy Version
TPC             = 0;     % TPC Command Field

[outputDCIFormat1_3] = DCIFormat1(ResourceType,numRBG,MCS,HARQ,NewDataFlag,...
              RedVer,TPC,sizeFFT);

Running transmitter

Once we created DCI for all users we can setup downlink transmission. For that we should set required parameters (you can check LTEDLPHyTransmitter help for more details):

txDLSCH_PCH = randi([0 1],1, 1655150);  % Create random data in downlink shared channel
txDCI = struct('data', {outputDCIFormat0_1, outputDCIFormat0_2, outputDCIFormat0_3,...
outputDCIFormat1_1, outputDCIFormat1_2, outputDCIFormat1_3},'PDCCHformat',...
{0, 0, 0, 0, 0, 0}, 'nRNTI', {70, 80, 90,70, 80, 90},...
'SearchSpace', {1,1,1,1,1,1});
% Create structure of previously generated DCI
% RNTIs assigned to the users are respectively 70, 80 and 90
txHI        = randi([0 1],1, 8); % Random values of HARQ indicator
mimoSetting = [1 0 1 0 1 0 0 0 1 1 1 1]; % MIMO settings
modOrder    = 4;        % Modulation order
numSubframe = 0;        % Number of subframe
numPDCCH    = 3;        % Number of PDCCH symbols
numsPRB     = [2 3 5 6 8 9 10 11];    % Number of PRBs
nF          = 0;        % Radio Frame number
N_cell_ID   = 24;       % Physical layer cell ID
trBlkSize   = 1608;     % Transport block size
RVidx       = 0;        % Redundancy version number
PHICHtype   = 0;        % Duration of PHICH
CPtype      = 0;        % Type of cyclic prefix
Ng          = 1/6;      % Determine number of PHICH groups
paprSettings = [1 3 5]; % Settings of PAPR algorithms

When all parameters are configured we are ready to run downlink transmitter using function LTEDLPhyTransmitter. As we want to preview radio frame with specific signals we can setup global variable display_settings and select some of the channels Once we created DCI for all users we can setup downlink transmission. For that we should set required parameters (you can check LTEDLPHyTransmitter help for more details):

% Define global variable
global display_settings;
% Add PDCCH, PDSCH and group of PBCH, P-SS, S-SS and RS
display_settings = {'PDCCH', 'PDSCH', 'PBCH, P-SS, S-SS, RS'};

%
% This function returns vector of complex samples txOFDMSymbols:
[txOFDMSymbols] = ...
       LTEDLPhyTransmitter(txDLSCH_PCH, ...
       txDCI,txHI,mimoSetting, modOrder, numSubframe, sizeFFT, ...
       numPDCCH, numsPRB, N_cell_ID, nF, trBlkSize, RVidx,...
       PHICHtype, Ng, CPtype, paprSettings);
DCI_Detection_Case_01
DCI_Detection_Case_02
DCI_Detection_Case_03

First frame contains only PDCCH, where created DCI is allocated. This channel occupies first three symbols, as was defined by variable numPDCCH. Next figure presents frame with PDSCH, where user data is allocated. Allocated PRBs match those defined in DCIs. In this figure it is visible that not every resource element within PRB is allocated. Some of the REs are reserved for reference signals. Last figure presents resource elements occupied by broadcast channel as well as reference and synchronization signals.

Modelling channel

As we have output samples from transmitter we can model channel conditions. In this case we use ideal channel. You can change channel to see how robust DCI detection is.

% Set number of Tx and Rx antennas:
numTx = 1;
numRx = 1;

% Call ideal channel function
rxOFDMSymbols = IdealChannel(txOFDMSymbols, numTx, numRx);

User 1 receiver

In downlink transmission each of the users decode the same signal separately. Therefore, downlink receiver function will be called three times.

Configure settings for User 1:

% Set configuration for User 1
DCIconf = struct('Formats', {'format0','format1'},'SearchSpace',...
{1,1}, 'RNTIs', {70,70});

% Call downlink receiver (DLSynchroReceiver)
[FrameTimeOffset, N_cell_ID, CPtype,numSubframe, ...
sizeFFT, Ng, PHICHtype, nF, numPDCCH, RIV_1, numPRB_1, SynAck, BCHAck, DCIAck ] = DLSynchroReceiver(rxOFDMSymbols, numRx,DCIconf);

As you can see this function returns many output values. We are not interested in most of them at the moment (like Physical Cell ID or type of cyclic prefix). All we want to check in this case is RIV for uplink scheduling and number of PRB for downlink scheduling:

Decoded RIV for uplink scheduling for User 1:

disp(['UE1, RIV:            ' int2str(RIV_1)]);
UE1, RIV:            0  2

Decoded numbers of PRB for downlink scheduling for User 1:

disp(['UE1, Allocated PRBs: ' int2str(numPRB_1)]);
UE1, Allocated PRBs: 5  6

Decoded RIV and allocated PRBs agree with those which were transmitted. RIV for User 1 was set to [0 2], while assigned PRBs were 4 5 which is equivalent to the setting [1, 1, [0 1 1 0 0 0 0 0 0 0 0]].

User 2 receiver

The same procedure is performed for User 2

% Set configuration for User 2
DCIconf = struct('Formats', {'format0','format1'},'SearchSpace',...
{1,1}, 'RNTIs', {80,80});

% Call downlink receiver (DLSynchroReceiver)
[FrameTimeOffset, N_cell_ID, CPtype,numSubframe, ...
sizeFFT, Ng, PHICHtype, nF, numPDCCH, RIV_2, numPRB_2, SynAck, BCHAck, DCIAck ] = DLSynchroReceiver(rxOFDMSymbols, numRx,DCIconf);

Decoded RIV for uplink scheduling for User 2:

disp(['UE2, RIV:            ' int2str(RIV_2)])
UE2, RIV:            2  3

Decoded numbers of PRB for downlink scheduling for User 2:

disp(['UE2, Allocated PRBs: ' int2str(numPRB_2)]);
UE2, Allocated PRBs: 2  3

In case of User 2 transmitted RIV was equal [2 3] and allocated RBG was set to 1 which is equivalent to PRB 2 and 3.

User 3 receiver

The same procedure is performed for User 3

% Set configuration for User 3
DCIconf = struct('Formats', {'format0','format1'},'SearchSpace',...
{1,1}, 'RNTIs', {90,90});

% Call downlink receiver (DLSynchroReceiver)
[FrameTimeOffset, N_cell_ID, CPtype,numSubframe, ...
sizeFFT, Ng, PHICHtype, nF, numPDCCH, RIV_3, numPRB_3, SynAck, BCHAck, DCIAck ] = DLSynchroReceiver(rxOFDMSymbols, numRx,DCIconf);

Decoded RIV for uplink scheduling for User 3:

disp(['UE3, RIV:            ' int2str(RIV_3)])
UE3, RIV:            3  2

Decoded numbers of PRB for downlink scheduling for User 3:

disp(['UE3, Allocated PRBs: ' int2str(numPRB_3)]);
UE3, Allocated PRBs: 8   9  10  11

Third user’s decoded RIV is the same as transmitted, namely [3, 2]. Assigned PRBs are also correctly decoded. Previously set RBG = 4, 5 means that assigned PRBs are [8, 9, 10, 11].

Summary

This case walked you through creating and decoding DCI. We showed how to create DCI Format 0 and Format 1 for three users, apply it in downlink transmitter, setup channel and receive signal for all the users and decode their DCI. You can modify this scenario to verify robustness of DCI decoding and check if it will success in low SNR case.

[/one_full]

Multiple Antennas Scenario

This example shows how multiple antenna transmission can be performed.

Introduction

Using multiple antennas can improve robustness of the system and increase resistance to noise and increase throughput by transmitting more data in single time slot.

Setting the configuration

First step while working with LTE PHY Lab is loading configuration:

%Load default configuration:
LTE_PHY_Lab_DL_Configuration;

When default configuration is loaded we can adjust some parameters. Let’s change number of Tx and Rx antennas. All antenna related parameters are gathered in AntennaConfiguration structure.

% Set number of Tx antennas to 2
LTE_PHY_Lab_Configuration.AntennaConfiguration.Antenna_TxAntennas = 2;
% Set number of Rx antennas to 2
LTE_PHY_Lab_Configuration.AntennaConfiguration.Antenna_RxAntennas = 2;

When number of antennas is increased we should also choose the MIMO mode and increase number of layers:

% Set transmit diversity
LTE_PHY_Lab_Configuration.AntennaConfiguration.Antenna_ModeCtrl = 2;
% Set transmit diversity
LTE_PHY_Lab_Configuration.AntennaConfiguration.Antenna_ModeData = 2;

% Set number of layers to 2
LTE_PHY_Lab_Configuration.AntennaConfiguration.Antenna_numLayersCtrl = 2;
% Set number of layers to 2
LTE_PHY_Lab_Configuration.AntennaConfiguration.Antenna_numLayersData = 2;

In this case we will use SUI channel model, profile 1 and turn off rest of the channel models

LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_SUI   = 1;
LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_Ideal = 0;
LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_EUTRA = 0;

% We can set SNR to random values:
LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_SNR = randi([5 10], 1, 10);

Signal generation

When all parameters are configured we are ready to run downlink simulation

% Create variables for storing signal
TxSignal_antenna1 = [];
TxSignal_antenna2 = [];
RxSignal_antenna1 = [];
RxSignal_antenna2 = [];

% Run LTE Downlink PHY Transmitter 10 times (for each subframe in frame)
for i = 0:9
   % Update configuration each subframe

   LTE_PHY_Lab_UpdateSubframeConfiguration(i);
   LTE_PHY_Lab_SetParameter( { System_numSubframe }, i );

Running transmitter

For each subframe we run downlink signal generation. It creates 1ms of signal. After 10 subframes whole LTE frame is generated (10 ms)

% Run transmitter
LTEDLPhyTransmitter();

Output signal is stored in LTE_PHY_Lab_Configuration.TxSignals.Tx_Signals_OFDM. Store signal from each subframe from each antenna:

TxSignal_antenna1 = [TxSignal_antenna1 LTE_PHY_Lab_Configuration.TxSignals.Tx_Signals_OFDM(1, :)];
TxSignal_antenna2 = [TxSignal_antenna2 LTE_PHY_Lab_Configuration.TxSignals.Tx_Signals_OFDM(2, :)];

Applying channel model

Output signal is the one that can be transmitted over the air. In this case we use channel model for 2×2 MIMO setting.

% We can apply channel according to our previous settings
Channel();

% Distorted samples are stored in LTE_PHY_Lab_Configuration.RxSignals.Rx_Signals_OFDM.
RxSignal_antenna1 = [RxSignal_antenna1 LTE_PHY_Lab_Configuration.RxSignals.Rx_Signals_OFDM(1, :)];
RxSignal_antenna2 = [RxSignal_antenna2 LTE_PHY_Lab_Configuration.RxSignals.Rx_Signals_OFDM(2, :)];
end

Output plots

When frame is generated and distorted by the channel we can preview Tx and Rx signal:

% We can plot it to see how signals look like:
figure(''Name', ''Tx signal, 'antenna 1');
plot(abs(TxSignal_antenna1));
figure(''Name';, ''Tx signal;, 'antenna 2');
plot(abs(TxSignal_antenna2));
figure(''Name';, ''Rx signal;, 'antenna 1');
plot(abs(RxSignal_antenna1));
figure(''Name';, ''Rx signal;, 'antenna 2');
plot(abs(RxSignal_antenna2));
Multiple_Antennas_Case_01
Multiple_Antennas_Case_02
Multiple_Antennas_Case_03
Multiple_Antennas_Case_04

Channel case

This example shows how the channel can be modified and how it affects the transmitted signal.

Introduction

Channel introduces distortion to the signal, which might cause difficulties in reception. This script shows how signal looks like after transmission through fading channel with additive white gaussian noise.

First step while working with LTE PHY Lab is loading configuration:

%Load default configuration:
LTE_PHY_Lab_DL_Configuration;

Verifying channel model

When default configuration is loaded we can adjust the parameters. Let’s set channel model to EUTRA. All channel settings are gathered in ChannelConfiguration structure.

EUTRA channel has three delay profiles according to the 3GPP TS 36.101. These profiles affect fading of this channel.

We can preview how channel will affect the signal by running single function from LTE PHY Lab, namely EUTRAChannel. It returns random channel impulse response calculated according to the specification for given delay profile. More information can be found in:

help EUTRAChannel

numEUTRA = 1;
CIR = EUTRAChannel(numEUTRA);

Channel impulse response and channel frequency response (for 20MHz bandwidth) for profile 1 looks as follows:

figure('Name', 'CIR, profile 1');
stem(CIR);
title('Channel Impulse Response, profile 1');
xlabel('Time samples');
ylabel('Amplitude');
figure('Name', 'CFR, profile 1');
plot(linspace(-10, 10, 2048), abs(fftshift(fft(CIR, 2048))));
title('Channel Frequency Response, profile 1');
xlabel('Frequency [MHz]');
ylabel('Magnitude');
LTE_PHY_Lab_Channel_Case_01

We can try another setting of the profile:

numEUTRA = 2;
CIR = EUTRAChannel(numEUTRA);

figure('Name', 'CIR, profile 2');
stem(CIR);
title('Channel Impulse Response, profile 2');
xlabel('Time samples');
ylabel('Amplitude');
figure('Name', 'CFR, profile 2');
plot(linspace(-10, 10, 2048), abs(fftshift(fft(CIR, 2048))));
title('Channel Frequency Response, profile 2');
xlabel('Frequency [MHz]');
ylabel('Magnitude');
LTE_PHY_Lab_Channel_Case_03

Based on this example we can see that profile 2 is much more selective – longer impulse response gives rapid changes of frequency response. We can use this profile in this simulation.

Setting parameters

Activate EUTRA channel, profile 2

LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_EUTRA = 2;
% Deactivate other channels
LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_Ideal = 0;
LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_SUI   = 0;

Channel model consists of two parts: fading and noise. So far, we showed component related to fading. Let’s configure noise part of the channel. Noise model used in LTE PHY Lab is AWGN – additive white gaussian noise. We can control this noise by setting ratio between signal power and the noise power (SNR).

When channel fading model is selected we can adjust SNR conditions for each subframe separately. In this case we can set higher SNR in each subframe to observe how noise level will decrease in consecutive subframes:

LTE_PHY_Lab_Configuration.ChannelConfiguration.Channel_SNR =  [1, 3, 5, 7, 9, 11, 13, 15, 17, 19] ;

When all parameters are configured we are ready to run downlink simulation

TxSignal = [];
RxSignal = [];
% Run LTE Downlink PHY Transmitter 10 times (for each subframe in frame)
for i = 0:9
% Update configuration each subframe
LTE_PHY_Lab_UpdateSubframeConfiguration(i);
    LTE_PHY_Lab_SetParameter( { 'System_numSubframe' }, i );

Running transmitter

For each subframe we run downlink signal generation. It creates 1ms of signal. After 10 subframes whole LTE frame isgenerated (10 ms)

   % Run transmitter
    LTEDLPhyTransmitter();

Output signal is stored in LTE_PHY_Lab_Configuration.TxSignals.Tx_Signals_OFDM. Store signal from each subframe:

TxSignal = [TxSignal LTE_PHY_Lab_Configuration.TxSignals.Tx_Signals_OFDM];

Applying channel model

We can apply channel according to our previous settings

% Apply channel model
    Channel();
% Distorted samples are stored in LTE_PHY_Lab_Configuration.RxSignals.Rx_Signals_OFDM.
    RxSignal = [RxSignal LTE_PHY_Lab_Configuration.RxSignals.Rx_Signals_OFDM];
end

Output plots

When frame is generated and distorted by the channel we can preview Tx and Rx signal:

% We can plot it to see how not distorted signal looks like:
figure('Name', 'Tx signal');
plot(linspace(0, 0.001, numel(abs(TxSignal))), abs(TxSignal));
xlabel('Time [s]');
ylabel('Signal magnitude');
title('Tx signal');
figure('Name', 'Rx signal');
plot(linspace(0, 0.001, numel(abs(RxSignal))), abs(RxSignal));
xlabel('Time [s]');
ylabel('Signal magnitude');
title('Rx signal');
LTE_PHY_Lab_Channel_Case_01

As you can see noise level decreases in each subframe. It is visible particularly in parts, where Tx signal value was equal 0.

Introduction

Physical layer configuration is based on information from higher layers of the LTE stack. To help user with setting the parameters we introduced interoperability with our other MATLAB tool, namely LTE MAC Lab – system level simulation tool. While setting LTE PHY Lab parameters you can use LTE MAC Lab as a supporting tool. In such approach we can extract from system level simulations results, some information, that physical layer would get from higher layers.

Following parameters can be updated based on system level simulations:

  • System_numPRB
  • System_ModOrder
  • System_trBlkSize
  • Tx_Signals_SCH
  • Channel_Coeffs
  • Channel_Type

This script shows how to configure LTE PHY Lab and LTE MAC Lab to make them work together, perform simulation and display results.

Setting parameters

First of all we must tell LTE PHY Lab to use LTE MAC Lab for configuration update. To do so, we can use LTE_PHY_Lab_connect_LTE_MAC_Lab function.

LTE_PHY_Lab_connect_LTE_MAC_Lab;
Adding LTE MAC Lab from: ..\LTE_MAC_Lab_v1.3.0\
 LTE MAC Lab successfully added

Then we can load default LTE PHY Lab configuration

LTE_PHY_Lab_DL_Configuration;

 

And create exemplary LTE MAC Lab parameters (there are three presets available). We can select second preset, which performs system level simulations for single base station with Proportional Fair scheduling algorithm.

preset = 2;
LTE_MAC_Lab_parameters = LTE_PHY_Lab_create_LTE_MAC_Lab_parameters( preset );
numFrames = ceil(LTE_MAC_Lab_parameters.system.numTTI / 10);

 

You can further investigate system level simulation parameters, which are gathered in LTE_MAC_Lab_parameters object.

LTE_MAC_Lab_parameters
LTE_MAC_Lab_parameters =

SimulationParameters with properties:

environment: [1x1 struct]
base_stations: [1x1 eNB]
ue: [1x1 struct]
system: [1x1 struct]

Then we create variable in which we will aggregate PHY Tx signal.

aggregated_signal = [];

Updating configuration and running simulations

When all parameters are set we can update LTE PHY Lab configuration based on LTE MAC Lab simulations and run LTE PHY Lab. These operations are performed on a frame basis.

% Configuration and execution of LTE PHY Lab is performed on frame basis (10 ms)
for frame = 1 : numFrames

     % Update LTE PHY Lab configuration based on LTE MAC Lab results using
     % LTE_PHY_Lab_LTE_MAC_Lab_based_configuration_update function
     LTE_PHY_Lab_LTE_MAC_Lab_based_configuration_update(LTE_MAC_Lab_parameters, frame);

     % Run LTE PHY Lab by executing exemplary function LTELinkLevelSimulateDL
     [outputSymbols] = LTELinkLevelSimulateDL();

     % Aggregate Tx signal
     aggregated_signal = [aggregated_signal outputSymbols];

end
Running LTE MAC Lab to generate updated parameters
TTI = 0   0%
TTI = 2   10%
TTI = 4   20%
TTI = 6   30%
TTI = 8   40%
TTI = 10   50%
TTI = 12   60%
TTI = 14   70%
TTI = 16   80%
TTI = 18   90%
TTI = 20   100%
Updating parameters
Done

Displaying results

After all calculations are done we can procede to displaying results.

% We can display spectrogram of the signal from LTE PHY Lab
 subplot(122);
 [s,f,t,p] = SpectrogramWrapper(aggregated_signal, 256, 128, [], 30.72e6/2048*256, []);
 surf(f, t, 10*log10(abs(p)), 'FaceColor', 'interp', 'EdgeColor', 'none');
 view(0, 90);
 xlabel('Frequency [Hz]');
 ylabel('Time [s]');
 title({'LTE PHY Lab', 'Frame spectrogram'});

%And compare it with the map of assigned resources from LTE MAC Lab
 subplot(121);
 global LTE_MAC_Lab_output;
 PRB_map = UE_DL_PRB_Map( LTE_MAC_Lab_output, 1, 1);
 [t, prb] = size(PRB_map);
 imagesc([0 prb],[0 t / 1000],PRB_map);
 colorbar;
 axis xy;
 xlabel('PRB index');
 ylabel('Time [s]');
 title({'LTE MAC Lab','Resource assignment map','1 - PRB assigned, 0 - PRB not assigned'});

LTE_PHY_Lab_ExampleSimulation_LTE_MAC_Lab_interoperability_01

Above results show how does the transmittesd signal looks like and compare it with the results from LTE MAC Lab.

On the left side you can see visualization of updated LTE PHY Lab configuration. Update is done based on LTE MAC Lab results. In this case we can see where user get resource assignment (x-axis show different Physical Resource Blocks (PRBs), while y-axis is time). Value 0 means that particular PRB was not assigned, while 1 means that resource was assigned).

On the right side you can see spectrogram of transmitted signal from LTE PHY Lab (x-axis represents frequency, y-axis represents time).

By comparing both plots you can see that if particular PRB was not assigned to the user only control data is transmitted (reference or synchronization signals or broadcast channel). On the other hand, if particular PRB is assigned you can see that also in the spectrogram.

Indroduction

This usecase provides an example on how to use LTE PHY Lab modules to decode key system parameters from the LTE downlink signal stored in the file.

Prepare environment

Define the configuration structure containing fields for system parameters

LTE_PHY_Lab_Receiver_Configuration;

% Set default configuration for the receiver
LTE_PHY_Lab_Receiver_Configuration_setDefault;

% Define whether the cell search algorithms should be used.
% 0 - no frequency offset detection
% 1 - simple frequency detection with the accuracy of 15 kHz
% 2 - fine frequency detection with the accuracy of 5 kHz
frequency_offset_detection = 2;

Load signal

The path to the file containing received IQ samples should be determined. Several example signals are stored in the RealSignal\Sample_signals folder. For this purpose, function LoadSignalFromFile can be used to load the IQ samples of the example signal together with all its recording parameters. The output parameters are: filename = name of the file, rxSamples = loaded IQ samples of the signal, samplingFrequency = sampling frequency of the signal, freqOffset = known offset for the center frequency of the signal, SDR_device = the name of the receiver, e.g. ‘ThinkRF_WSA5000’

index = 1;
 [filename, rxSamples, samplingFrequency, freqOffset, SDR_device] = LoadSignalFromFile(index);
% Include the settings in configuration structure
names = { 'Rx_Filename', 'Receiver_Type', 'Rx_Signals_OFDM',...
    'Rx_SamplingFrequency', 'Rx_FreqOffset', 'Algorithm_CellSearch' };
LTE_PHY_Lab_SetParameter( names, filename, SDR_device, rxSamples,...
     samplingFrequency, freqOffset, frequency_offset_detection );
...Loading signal
      filename:                 WSA5000_201656_195651.4_2660000000Hz_125000000Hz_100ms_1.mat
      samplingFrequency:        125000000
      centerFreq:               2660 MHz
      freqOffset:               0 Hz
      number of loaded frames:  10
   => Signal loaded properly.

Signal decoding

Signal processing of the received signal is performed. As a result, the following parameters can be recovered:

– cellID = the structure containing cell parameters:
– – cellID.CPtype = the Cyclic Prefix type (normal or extended)
– – cellID.N_cell_ID = Physical Cell ID (0-503) – MIB = the structure containing the parameters of the Master Information Block
– rxCFI = received Control Format Indicator for the subframe containing SIB1
– rxHI = received bit stream of HARQ indicators for the subframe containing SIB1
– decodedDCI = the structure containing the recovered information from DCI correlated with SI-RNTI
– DL_SCH_ACK = ACK for SCH bit stream
– SIB1 = received bit stream of System Information Block 1

[cellID MIB rxCFI rxHI decodedDCI DL_SCH_ACK SIB1] = DL_Rx_Processing_Chain();

...Cell Search

   => Frequency offset recovered in fine synchronization: -2.5 kHz

...Initial synchronization
   => Frame time offset : 500651
   => Carrier frequency offset : 0.011793
   => Physical Cell ID recovered successfully.
    N_cell_ID: 1
       CPtype: 0

...OFDM demodulation
...Channel estimation
...Noise estimation
...PBCH processing
...MIB decoding
      FFTsize: 1024
           Ng: 1
    PHICHtype: 0
          SFN: 739
        numTx: 1

   => MIB decoded successfully.

...Resampling from 1.92 MS/s to 15.36 MS/s
...Signal shifted to the next subframe containing SIB1 message.
...OFDM demodulation
...Channel estimation
...Noise estimation
  => RSRP for the SIB subframe is -47.2127 dBm
...PCFICH processing
   => CFI decoded successfully.

...PHICH processing
   => HI decoded successfully.

...PDCCH processing
   => DCI decoded successfully.
   The following DCI formats were decoded:
      format1A

...PDSCH processing
   => SIB1 decoded successfully.

Decoding results

disp('==============================')
disp('   Recovered parameters    ')
disp('==============================')

% Master Information Block
disp('=== Master Information Block ===')
disp(MIB)

% Control Format Indicator
disp(' ')
disp('=== Control Format Indicator ===')
disp(['CFI = ' num2str(rxCFI)])

% Hybrid-ARQ Indicator
disp(' ')
disp('=== Hybrid-ARQ Indicator ===')
disp(['HI bits : ' num2str(rxHI)])

% Downlink Control Information
disp(' ')
disp('=== DCI correlated with SI-RNTI ===')
disp(decodedDCI)

% Physical Downlink Shared Channel
disp(' ')
disp('=== SIB1 ===')
disp(['SIB1 length : ' num2str(length(SIB1)) ' bits'])
disp(['SIB1 bits : ' num2str(SIB1)])
==============================
     Recovered parameters
==============================
 === Master Information Block ===
              FFTsize: 1024
                   Ng: 1
            PHICHtype: 0
                  SFN: 739
                numTx: 1


=== Control Format Indicator ===
CFI = 3

=== Hybrid-ARQ Indicator ===
HI bits : 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 0 1 0 0 1

=== DCI correlated with SI-RNTI ===
               Format: '1A'
     CarrierIndicator: []
              VRBtype: 0
                  RIV: [0 4]
                  MCS: 2
                 HARQ: 0
          NewDataFlag: 'reserved'
               RedVer: 3
             N_PBR_1A: 3

=== SIB1 ===
 SIB1 length : 144 bits
 SIB1 bits : 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Example plots

Generated plots show the properties of the analyzed signal in time and frequency domains.

disp(' ')
disp('==============================')
disp(' Example plots ')
disp('==============================')

% Get frequency and time offsets recovered in cell search and
% synchronization procedures
[freqOffset Offsets] = LTE_PHY_Lab_GetParameter({'Rx_FreqOffset', 'Channel_Offsets'});

% Frame time offset
frameTimeOffset = Offsets(1);

% Determine the subframeLength in correspondance to receiver's sampling
% frequency
subframeLength = samplingFrequency/1e3;

% Verify whether the signal contains of at least 10 subframes
N_subframes = 10;
if  floor((length(rxSamples) - frameTimeOffset)/subframeLength) < N_subframes
    N_subframes = floor((length(rxSamples) - frameTimeOffset)/subframeLength);
end

for numSubframe = 1:10
    % Determine the subframe samples taking into account the frame time
    % offset. The function DL_Rx_preProcessing is used in order to
    % calibrate IQ samples and achieve required sampling rate.
    subframeSamples = rxSamples(1+subframeLength*(numSubframe-1) + frameTimeOffset : subframeLength * numSubframe + frameTimeOffset);
    subframeSamples = DL_Rx_preProcessing(subframeSamples, samplingFrequency, MIB.FFTsize, freqOffset);

    % Display spectrum
    figure(1)
    f_axis = -samplingFrequency/2+1 : samplingFrequency/length(subframeSamples) : samplingFrequency/2;
    plot(f_axis, 20*log10(abs(fftshift(fft(subframeSamples)))/length(subframeSamples)))
    % NOTE: Line above is adjusted to the example signal which was recorded
    % by ThinkRF WSA5000. To retrieve correct spectrum for other
    % signals the modification might be required.
    ylabel('Magnitude [dBm]');
    xlabel('Frequency [MHz]');
    title(['Subframe ' num2str(numSubframe) ' - Resource grid' ])

    % Display spectrogram
    figure(2)
    fs = 30.72e6 * MIB.FFTsize / 2048;
    window = round(fs / 1000 / 14);
    [s,f,t,p] = SpectrogramWrapper(subframeSamples, window, [], 0 : 15e3 : fs, fs);
    t_axis = unique(t)*1000;                        % in ms
    f_axis = (unique(f) - unique(max(f))/2)/1e6;    % in MHz
    imagesc(t_axis,f_axis,20*log10(abs(p)));
    xlabel('Time [ms]');
    ylabel('Frequency [MHz]');
    title(['Subframe' num2str(numSubframe) ' - Spectrogram' ])

    % Display spectrogram in 3D
    figure(3)
    mesh(t_axis,f_axis,20*log10(abs(p)))
    % NOTE: Line above is adjusted to the example signal which was recorded
    % by ThinkRF WSA5000. To retrieve correct spectrum for other
    % signals the modification might be required.
    view(-70,30)
    shading interp
    xlabel('Time [ms]');
    ylabel('Frequency [MHz]');
    zlabel('Magnitude [dBm]');
    title(['Subframe ' num2str(numSubframe) ' - 3D Spectrogram' ])
    colormap('default')
    disp(['Subframe ' num2str(numSubframe) '. Press any key to display plots for next subframe...'])
    pause()
end

==============================
 Example plots
==============================
 Subframe 1. Press any key to display plots for next subframe...
 Subframe 2. Press any key to display plots for next subframe...
 Subframe 3. Press any key to display plots for next subframe...
 Subframe 4. Press any key to display plots for next subframe...
 Subframe 5. Press any key to display plots for next subframe...
 Subframe 6. Press any key to display plots for next subframe...
 Subframe 7. Press any key to display plots for next subframe...
 Subframe 8. Press any key to display plots for next subframe...
 Subframe 9. Press any key to display plots for next subframe...
 Subframe 10. Press any key to display plots for next subframe...
DL_SignalFromFile_Decoding_01
DL_SignalFromFile_Decoding_02
DL_SignalFromFile_Decoding_03