### Overview

**Testimonial:**

*“Thanks to a good manual and modular software structure, the tools are extremely easy to run.”
*

**Prof. Krzysztof Kulpa, Warsaw University of Technology, Poland**

LTE MAC Lab is a system-level simulation tool running under MATLAB environment. It truly reflects the dynamic behaviour of a modelled LTE RAN focusing on Radio Resource Management features such as scheduling, carrier activation, handovers and link adaptation, also including implementation of propagation (path loss, shadowing and multipath) and mobility models. LTE MAC Lab allows customers to model a wireless LTE network deployment, analyse its performance and understand dynamic mechanisms of the radio interface, including support for Carrier Aggregation and Heterogeneous Networks. The tool allows to simulate networks with any number of base stations and with a maximum number of 5 aggregated component carriers (which gives the maximum bandwidth of up to 100 MHz).

In LTE MAC Lab a user models wireless network by defining eNBs, UEs and their parameters. Then, after running the simulations, performance parameters are determined such as system or user throughput, received power distribution, SNIR map and many more. Thanks to that a user can model in software a wireless network behaviour operating under controlled parameters and various radio resource management schemes.

LTE MAC Lab provides also MTC functionality. This functionality is realized by separate modules to allow faster processing by introducing optimization towards large number of terminals.

MTC functionality is designed to model the behavior of Machine-Type-Communications within LTE network. It includes implementation of MTC traffic – as well as propagation and mobility models. Special interest is given to Random Access procedure, which becomes a bottleneck in LTE-based MTC operation.

Action flow for MTC functionality is the same as in case of H2H usage of the LTE MAC Lab. User models wireless network by setting parameters of the eNB and the UEs. Then, after running the simulations, performance parameters characteristic for M2M traffic are determined such as packet delays, drop ratio or amount of power ramp ups. Thanks to that a user can model in software a wireless network behavior operating under controlled parameters and various radio resource management schemes.

LTE MAC Lab is implemented as a library of modular functions with well-defined interfaces, which allows a user to include its own algorithms. The tools have a 1 ms time stamp for accuracy, which can be traded for speed. There are plenty of predefined use cases and examples with well-documented functions.

### Block diagram

*Figure 1: LTE MAC Lab activity flow*

*Figure 2: LTE MAC Lab architecture*

*Figure 3: MTC scenario*

### Deliverables

LTE MAC Lab is delivered as a Toolbox operating under MATLAB environment. It consists of m-, mex- and p-files. Substantial parts of the code are open for the customer modification. All functions have well-defined interfaces with described parameters, which make it possible to replace them with proprietary customer’s implementation.

### Technical specification summary

- LTE specific features:
- Carrier Aggregation (3GPP LTE Rel. 10)
- Heterogeneous Network (multicell environment with diverse parameters of the eNBs)
- LTE channel bands: 700 – 3000 MHz
- All LTE bandwidths: 1.4MHz, 3MHz, 5MHz, 10MHz, 15MHz, 20MHz

- Simulation features:
- Dedicated functions for user defined algorithms (i.e. open API)
- Downlink transmission
- RRM Functionalities: scheduling (PF, RR, ISW proprietary), link adaptation, handover, carrier activation/deactivation
- Users Mobility Models: Random Direction Model, Random Way Point Model;

- Link model:
- Pathloss models: Modified Okumura – Hata model, 3GPP TS 36.942 Model, Winner Model, COST 231 Model;
- Multipath models: 3GPP TS 36.942 Model, Winner Model, Random Distribution Model;
- Environments: Rural, Urban, Suburban;
- Antennas Characteristic Model; Omnidirectional Characteristic, 1 or 3 Sectors Characteristic

- MTC simulations
- 3GPP MTC Traffic Model 1
- Random Access procedure
- Up to 30 000 devices in single simulation
- UL simulation only; DL assumed to be ideal
- Single omni-directional cell and 6 surrounding interferers (i.e. UEs belonging to different cells transmitting in the UL)
- Real-life smart meter case

### Applications

Application |
Benefit |
Who can benefit? |
---|---|---|

MAC prototyping | LTE MAC Lab shortens the development time | ODM, Research Institute, Protocol Stack Developer |

R&D | LTE MAC Lab provides simulation framework | Research Institute |

Development of PHY layer functionalities | LTE MAC Lab serves as a reference model | Chip Manufacturers, ODM, Research Institute |

Network modeling and analysis | LTE MAC Lab allows to estimate cell-level performance | ODM, OEM, Operator |

Education | LTE MAC Lab serves as an environment to visualize LTE network operation | University, Training Company |

### Example customer experience

*Figure 4: LTE MAC Lab: performance analysis*

*Figure 5: LTE MAC Lab: coverage analysis*

*Figure 6: LTE MAC Lab: performance analysis*

*Figure 7: LTE MAC Lab: coverage analysis*

### Single base station, single carrier scenario

This scenario evaluates performance of the single base station with single carrier. This scenario can be used as benchmark while comparing results from other simulations.

This script is divided into three main parts:

1. Defining network and its configuration

2. Running simulation

3. Processing the results

### Defining network configuration

Configuration for LTE MAC Lab tool is stored in object of SimulationParameters class. This class has four main methods which can be used to set parameters:

- SetSystem
- SetEnvironment
- AddUEs
- AddBaseStation

These methods can be executed in any order. We will take a look on each of them in more details, but first lets create object of this class:

```
% Initiate input parameters object
sp = SimulationParameters;
```

### Define main simulation parameters

Parameters that are not directly related to the network but rather to the simulation itself are gathered in System group. These can be set with SetSystem method.

% Number of TTIs to simulate numTTI = 1000; % Random seed of the simulation (this can be fixed number if you want to % repeat the simulations with the same random generator initial value) randomSeed = round(rand * 1e6); % SNIR mapping model snirMappingModel = 'MIESM'; % Setting given parameters sp.SetSystem(numTTI, randomSeed, snirMappingModel);

### Define environment simulation parameters

Next group of parameters are environment settings, where we can describe area that is simulated:

% Area size in pixels (resolution of the area) areaSize = 300; % Size of the single pixel in the area in meters stepSize = 1; % Pathloss model pathlossModel = 1; % Environment type environmentType = 1; % Gain of the shadowing shadowingFactor = 0.3; % Minimum coupling loss MCL = 50; % Setting given parameters sp.SetEnvironment(areaSize, stepSize, pathlossModel, environmentType, shadowingFactor, MCL);

### Define UE parameters

User Equipments can be added using single method AddUEs. You can add multiple UEs with the same parameters at once. Method can be run several times to add different groups of UEs.

% Number of UEs in this group (with the same parameters) numUE = 10; % Average height of the UEs heightUE = 1.5; % Mobility model mobilityModel = 2; % Speed in km/h speed = 0; % Multipath model multipathModel = 1; % Tx power of the UEs in dBm powerUE = 20; % Maximum number of CC max_cc_number = 1; % Adding UEs with given parameters sp.AddUEs(numUE, heightUE, mobilityModel, speed, multipathModel, powerUE, max_cc_number);

### Define eNB parameters

Last thing to do in this scenario is to define base stations. In this case this is single macro base station:

% Position of the base station position = [0.5*areaSize 0.25*areaSize]; % Height of the eNB heightBS = 30; % Output power in dBm powerBS = 46; % Antenna characteristic antennaChar = 1; % Antenna gain antennaGain = 0; % Cell ID (must be unique for each eNB) cell_id = 41; % Carrier frequency in MHz freq = 800; % FFT size (equivalent to bandwidth) fft_size = 512; % Scheduling algorithm scheduler = 1; % Adding base station with given parameters sp.AddBaseStation(position, heightBS, powerBS, antennaChar, antennaGain, cell_id, freq, fft_size, scheduler);

### Running simulation

When all parameters are set we are ready to perform simulation. This is done with single function SysLabSimulate which returns raw statistics. These will be processed in the next step.

stat = SysLabSimulate(sp);

TTI = 0 0% TTI = 100 10% TTI = 200 20% TTI = 300 30% TTI = 400 40% TTI = 500 50% TTI = 600 60% TTI = 700 70% TTI = 800 80% TTI = 900 90% TTI = 1000 100%

### Processing results

LTE MAC Lab offers different functions for processing results. In this scenario we will focus on displaying network overview.

### Rx Power

In the first figure we will show received power at each position in the defined area.

[ ~, highest_rx ] = RxPower( stat ); figure('Name', 'Received power'); mesh(highest_rx); xlabel('X coordinate'); ylabel('Y coordinate'); zlabel('Received power [dBm]'); title('Received power'); colorbar;

### Display eNB and UE positions

You can also preview where UEs were placed. Different random seeds value will affect this position, so you can run multiple instances of the simulation and average the results to get more accurate results.

[ ~, posx, posy] = UsersPositions( stat ); figure('Name', 'UE and eNB positions'); plot(posx, posy, 'x', 'LineWidth', 3); hold on; plot(stat(1).base_stations(1).position(2), stat(1).base_stations(1).position(1), 'rs', 'LineWidth', 2); axis([0 300 0 300]); axis square; legend('UEs', 'eNB'); xlabel('X coordinate'); ylabel('Y coordinate'); title('UE and eNB positions');

### Single base station, Carrier Aggregation(two carriers) scenario

This scenario evaluates performance of the single base station with two component carriers.

This script is divided into three main parts:

1. Defining network and its configuration

2. Running simulation

3. Processing the results

### Defining network configuration

Configuration for LTE MAC Lab tool is stored in object of SimulationParameters class. This class has four main methods which can be used to set parameters:

- SetSystem
- SetEnvironment
- AddUEs
- AddBaseStation

These methods can be executed in any order. We will take a look on each of them in more details, but first lets create object of this class:

```
% Initiate input parameters object
sp = SimulationParameters;
```

### Define main simulation parameters

Parameters that are not directly related to the network but rather to the simulation itself are gathered in System group. These can be set with SetSystem method.

% Number of TTIs to simulate numTTI = 1000; % Random seed of the simulation (this can be fixed number if you want to % repeat the simulations with the same random generator initial value) randomSeed = round(rand * 1e6); % SNIR mapping model snirMappingModel = 'MIESM'; % Setting given parameters sp.SetSystem(numTTI, randomSeed, snirMappingModel);

### Define environment simulation parameters

Next group of parameters are environment settings, where we can describe area that is simulated:

% Area size in pixels (resolution of the area) areaSize = 300; % Size of the single pixel in the area in meters stepSize = 1; % Pathloss model pathlossModel = 1; % Environment type environmentType = 1; % Gain of the shadowing shadowingFactor = 0.3; % Minimum coupling loss MCL = 50; % Setting given parameters sp.SetEnvironment(areaSize, stepSize, pathlossModel, environmentType, shadowingFactor, MCL);

### Define UE parameters

User Equipments can be added using single method AddUEs. You can add multiple UEs with the same parameters at once. Method can be run several times to add different groups of UEs.

% Number of UEs in this group (with the same parameters) numUE = 10; % Average height of the UEs heightUE = 1.5; % Mobility model mobilityModel = 2; % Speed in km/h speed = 0; % Multipath model multipathModel = 1; % Tx power of the UEs in dBm powerUE = 20; % Maximum number of CC max_cc_number = 2; % Adding UEs with given parameters sp.AddUEs(numUE, heightUE, mobilityModel, speed, multipathModel, powerUE, max_cc_number);

### Define eNB parameters

Last thing to do in this scenario is to define base stations. In this case this is single macro base station:

% Position of the base station position = [0.5*areaSize 0.25*areaSize]; % Height of the eNB heightBS = 30; % Output power in dBm powerBS = 46; % Antenna characteristic antennaChar = 1; % Antenna gain antennaGain = 0; % Cell ID (must be unique for each eNB) cell_id = 41; % Carrier frequency in MHz freq = [800 830]; % FFT size (equivalent to bandwidth) fft_size = [512 512]; % Scheduling algorithm scheduler = 1; % Adding base station with given parameters sp.AddBaseStation(position, heightBS, powerBS, antennaChar, antennaGain, cell_id, freq, fft_size, scheduler);

### Running simulation

When all parameters are set we are ready to perform simulation. This is done with single function SysLabSimulate which returns raw statistics. These will be processed in the next step.

```
% Run simulation
stat = SysLabSimulate(sp);
```

TTI = 0 0% TTI = 100 10% TTI = 200 20% TTI = 300 30% TTI = 400 40% TTI = 500 50% TTI = 600 60% TTI = 700 70% TTI = 800 80% TTI = 900 90% TTI = 1000 100%

### Processing results

LTE MAC Lab offers different functions for processing results. In this scenario we will focus on displaying throughputs for eNB and UEs.

### eNB throughput

Results of the simulation are raw snapshots which require postprocessing. To calculate CDF of eNB throughput we can use function BS_DL_Tput_CDF:

% calculate CDF of eNB throughput [~, BS_DL_Tput_CDF_x , BS_DL_Tput_CDF_y ] = BS_DL_Tput_CDF ( stat, 10 ); % plot eNB throughput figure; plot(BS_DL_Tput_CDF_x, BS_DL_Tput_CDF_y, '-s'); title('eNB throughput CDF'); xlabel('Throughput [Mbps]'); ylabel('CDF'); grid on; [~, UE_DL_Tput_CDF_x , UE_DL_Tput_CDF_y ] = UE_DL_Tput_CDF ( stat, 10 );

### UE throughput

To calculate CDF of UEs throughput we can use function UE_DL_Tput_CDF:

% plot UE throughput figure; plot(UE_DL_Tput_CDF_x, UE_DL_Tput_CDF_y, '-s'); title('Average UE throughput CDF'); xlabel('Throughput [Mbps]'); ylabel('CDF'); grid on;

### HetNet(two base stations), single carrier scenario

This scenario evaluates performance of the two base stations with single carrier.

This script is divided into three main parts:

1. Defining network and its configuration

2. Running simulation

3. Processing the results

### Defining network configuration

Configuration for LTE MAC Lab tool is stored in object of SimulationParameters class. This class has four main methods which can be used to set parameters:

- SetSystem
- SetEnvironment
- AddUEs
- AddBaseStation

These methods can be executed in any order. We will take a look on each of them in more details, but first lets create object of this class:

```
% Initiate input parameters object
sp = SimulationParameters;
```

### Define main simulation parameters

Parameters that are not directly related to the network but rather to the simulation itself are gathered in System group. These can be set with SetSystem method.

% Number of TTIs to simulate numTTI = 1000; % Random seed of the simulation (this can be fixed number if you want to % repeat the simulations with the same random generator initial value) randomSeed = round(rand * 1e6); % SNIR mapping model snirMappingModel = 'MIESM'; % Setting given parameters sp.SetSystem(numTTI, randomSeed, snirMappingModel);

### Define environment simulation parameters

Next group of parameters are environment settings, where we can describe area that is simulated:

% Area size in pixels (resolution of the area) areaSize = 300; % Size of the single pixel in the area in meters stepSize = 1; % Pathloss model pathlossModel = 1; % Environment type environmentType = 1; % Gain of the shadowing shadowingFactor = 0.3; % Minimum coupling loss MCL = 50; % Setting given parameters sp.SetEnvironment(areaSize, stepSize, pathlossModel, environmentType, shadowingFactor, MCL);

### Define UE parameters

User Equipments can be added using single method AddUEs. You can add multiple UEs with the same parameters at once. Method can be run several times to add different groups of UEs.

% Number of UEs in this group (with the same parameters) numUE = 10; % Average height of the UEs heightUE = 1.5; % Mobility model mobilityModel = 2; % Speed in km/h speed = 0; % Multipath model multipathModel = 1; % Tx power of the UEs in dBm powerUE = 20; % Maximum number of CC max_cc_number = 1; % Adding UEs with given parameters sp.AddUEs(numUE, heightUE, mobilityModel, speed, multipathModel, powerUE, max_cc_number);

### Define eNB parameters

Last thing to do in this scenario is to define base stations. In this case we have two eNB macro base station and pico base station (small cell):

% Position of the base station position = [0.5*areaSize 0.25*areaSize]; % Height of the eNB heightBS = 30; % Output power in dBm powerBS = 46; % Antenna characteristic antennaChar = 1; % Antenna gain antennaGain = 0; % Cell ID (must be unique for each eNB) cell_id = 41; % Carrier frequency in MHz freq = 800; % FFT size (equivalent to bandwidth) fft_size = 512; % Scheduling algorithm scheduler = 1; % Adding base station with given parameters sp.AddBaseStation(position, heightBS, powerBS, antennaChar, antennaGain, cell_id, freq, fft_size, scheduler); % Position of the base station position = [0.5*areaSize 0.75*areaSize]; % Height of the eNB heightBS = 30; % Output power in dBm powerBS = 30; % Antenna characteristic antennaChar = 1; % Antenna gain antennaGain = 0; % Cell ID (must be unique for each eNB) cell_id = 42; % Carrier frequency in MHz freq = 800 ; % FFT size (equivalent to bandwidth) fft_size = 512; % Scheduling algorithm scheduler = 1; % Adding base station with given parameters sp.AddBaseStation(position, heightBS, powerBS, antennaChar, antennaGain, cell_id, freq, fft_size, scheduler);

### Running simulation

When all parameters are set we are ready to perform simulation. This is done with single function SysLabSimulate which returns raw statistics. These will be processed in the next step.

```
% Run simulation
stat = SysLabSimulate(sp);
```

TTI = 0 0% TTI = 100 10% TTI = 200 20% TTI = 300 30% TTI = 400 40% TTI = 500 50% TTI = 600 60% TTI = 700 70% TTI = 800 80% TTI = 900 90% TTI = 1000 100%

### Processing results

LTE MAC Lab offers different functions for processing results. In this scenario we will focus on displaying both network overview and throughputs for eNB and UEs.

### Rx Power

In the first figure we will show received power at each position in the defined area.

[ ~, highest_rx ] = RxPower( stat ); figure('Name', 'Received power'); mesh(highest_rx); xlabel('X coordinate'); ylabel('Y coordinate'); zlabel('Received power [dBm]'); title('Received power'); colorbar;

### Display eNB and UE positions

You can also preview where UEs were placed. Different random seeds value will affect this position, so you can run multiple instances of the simulation and average the results to get more accurate results.

[ ~, posx, posy] = UsersPositions( stat ); figure('Name', 'UE and eNB positions'); plot(posx, posy, 'x', 'LineWidth', 3); hold on; plot(stat(1).base_stations(1).position(2), stat(1).base_stations(1).position(1), 'rs', 'LineWidth', 2); plot(stat(1).base_stations(2).position(2), stat(1).base_stations(2).position(1), 'gs', 'LineWidth', 2); axis([0 300 0 300]); axis square; legend('UEs', 'macro eNB', 'pico eNB'); xlabel('X coordinate'); ylabel('Y coordinate'); title('UE and eNB positions');

### eNB throughput

Results of the simulation are raw snapshots which require postprocessing. To calculate CDF of eNB throughput we can use function BS_DL_Tput_CDF:

% calculate CDF of eNB throughput [~, BS_DL_Tput_CDF_x_macro , BS_DL_Tput_CDF_y_macro ] = BS_DL_Tput_CDF ( stat, 10, 1 ); [~, BS_DL_Tput_CDF_x_pico , BS_DL_Tput_CDF_y_pico ] = BS_DL_Tput_CDF ( stat, 10, 2 ); % plot eNB throughput figure; plot(BS_DL_Tput_CDF_x_macro, BS_DL_Tput_CDF_y_macro, '-s', BS_DL_Tput_CDF_x_pico, BS_DL_Tput_CDF_y_pico, '-d');

title('eNB throughput CDF'); legend('macro eNB', 'pico eNB'); xlabel('Throughput [Mbps]'); ylabel('CDF'); grid on;

### UE throughput

To calculate CDF of UEs throughput we can use function UE_DL_Tput_CDF:

[~, UE_DL_Tput_CDF_x , UE_DL_Tput_CDF_y ] = UE_DL_Tput_CDF ( stat, 10 ); % plot UE throughput figure; plot(UE_DL_Tput_CDF_x, UE_DL_Tput_CDF_y, '-s'); title('Average UE throughput CDF'); xlabel('Throughput [Mbps]'); ylabel('CDF'); grid on;

### HetNet(two base stations), Carrier Aggregation(two carriers) scenario

This scenario evaluates performance of the two base stations, each with two carriers.

This script is divided into three main parts:

1. Defining network and it’s configuration

2. Running simulation

3. Processing the results

### Defining network configuration

- SetSystem
- SetEnvironment
- AddUEs
- AddBaseStation

```
% Initiate input parameters object
sp = SimulationParameters;
```

### Define main simulation parameters

Parameters that are not directly related to the network but rather to the simulation itself are gathered in System group.

These can be set with SetSystem method.

% Number of TTIs to simulate numTTI = 1000; % Random seed of the simulation (this can be fixed number if you want to % repeat the simulations with the same random generator initial value) randomSeed = 8631; % SNIR mapping model snirMappingModel = 'MIESM'; % Setting given parameters sp.SetSystem(numTTI, randomSeed, snirMappingModel);

### Define environment simulation parameters

Next group of parameters are environment settings, where we can describe area that is simulated:

### Define UE parameters

User Equipments can be added using single method AddUEs. You can add multiple UEs with the same parameters at once. Method

can be run several times to add different groups of UEs.

% Number of UEs in this group (with the same parameters) numUE = 10; % Average height of the UEs heightUE = 1.5; % Mobility model mobilityModel = 2; % Speed in km/h speed = 0; % Multipath model multipathModel = 1; % Tx power of the UEs in dBm powerUE = 20; % Maximum number of CC - allow users to use two component carriers max_cc_number = 2; % Adding UEs with given parameters sp.AddUEs(numUE, heightUE, mobilityModel, speed, multipathModel, powerUE, max_cc_number);

### Define eNB parameters

Last thing to do in this scenario is to define base stations. In this case we have two eNB macro base station and pico

base station (small cell):

% Position of the base station position = [0.5*areaSize 0.25*areaSize]; % Height of the eNB heightBS = 30; % Output power in dBm powerBS = 46; % Antenna characteristic antennaChar = 1; % Antenna gain antennaGain = 0; % Cell ID (must be unique for each eNB) cell_id = 41; % Carrier frequency in MHz for each of the carriers freq = [800 1800]; % FFT size (equivalent to bandwidth) for each of the carriers fft_size = [512 512]; % Scheduling algorithm scheduler = 1; % Adding base station with given parameters sp.AddBaseStation(position, heightBS, powerBS, antennaChar, antennaGain, cell_id, freq, fft_size, scheduler); % Position of the base station position = [0.5*areaSize 0.75*areaSize]; % Height of the eNB heightBS = 30; % Output power in dBm powerBS = 30; % Antenna characteristic antennaChar = 1; % Antenna gain antennaGain = 0; % Cell ID (must be unique for each eNB) cell_id = 42; % Carrier frequency in MHz for each of the carriers freq = [800 1800]; % FFT size (equivalent to bandwidth) for each of the carriers fft_size = [512 512]; % Scheduling algorithm scheduler = 1; % Adding base station with given parameters sp.AddBaseStation(position, heightBS, powerBS, antennaChar, antennaGain, cell_id, freq, fft_size, scheduler);

### Running simulation

```
% Run simulation
stat = SysLabSimulate(sp);
```

TTI = 100 10%

TTI = 200 20%

TTI = 300 30%

TTI = 400 40%

TTI = 500 50%

TTI = 600 60%

TTI = 700 70%

TTI = 800 80%

TTI = 900 90%

TTI = 1000 100%

### Processing results

LTE MAC Lab offers different functions for processing results. In this scenario we will focus on displaying both network

overview and throughputs for eNB and UEs.

### Rx Power

In the first figure we will show received power at each position in the defined area.

[ ~, highest_rx ] = RxPower( stat ); figure('Name', 'Received power'); mesh(highest_rx); xlabel('X coordinate'); ylabel('Y coordinate'); zlabel('Received power [dBm]'); title('Received power'); colorbar;

### Display eNB and UE positions

You can also preview where UEs were placed. Different random seeds value will affect this position, so you can run

multiple instances of the simulation and average the results to get more accurate results.

[ ~, posx, posy] = UsersPositions( stat ); figure('Name', "'UE and eNB positions'); plot(posx, posy, 'x', 'LineWidth', 3); hold on; plot(stat(1).base_stations(1).position(2), stat(1).base_stations(1).position(1), 'rs', 'LineWidth', 2); plot(stat(1).base_stations(2).position(2), stat(1).base_stations(2).position(1), 'gs', 'LineWidth', 2); axis([0 300 0 300]); axis square; legend('UEs', 'macro eNB', 'pico eNB'); xlabel('X coordinate'); ylabel('Y coordinate'); title('UE and eNB positions');

### eNB throughput

Results of the simulation are raw snapshots which require postprocessing. To calculate CDF of eNB throughput we can use

function BS_DL_Tput_CDF:

% calculate CDF of eNB throughput [~, BS_DL_Tput_CDF_x_macro , BS_DL_Tput_CDF_y_macro ] = BS_DL_Tput_CDF ( stat, 10, 1 ); [~, BS_DL_Tput_CDF_x_pico , BS_DL_Tput_CDF_y_pico ] = BS_DL_Tput_CDF ( stat, 10, 2 ); % plot eNB throughput figure; plot(BS_DL_Tput_CDF_x_macro, BS_DL_Tput_CDF_y_macro, '-s', BS_DL_Tput_CDF_x_pico, BS_DL_Tput_CDF_y_pico, '-d'); title('eNB throughput CDF'); legend('macro eNB', 'pico eNB'); xlabel('Throughput [Mbps]'); ylabel('CDF'); grid on;

### UE throughput

To calculate CDF of UEs throughput we can use function UE_DL_Tput_CDF:

[~, UE_DL_Tput_CDF_x , UE_DL_Tput_CDF_y ] = UE_DL_Tput_CDF ( stat, 10 ); % plot UE throughput figure; plot(UE_DL_Tput_CDF_x, UE_DL_Tput_CDF_y, '-s'); title('Average UE throughput CDF'); xlabel('Throughput [Mbps]'); ylabel('CDF'); grid on;

### Introduction

As number of devices in network constantly increases collisions during Random Access procedure occure more frequently. LTE MAC Lab offers functionality to analyze how network behaves in presence of many devices. In this script we will show ho to verify collision probability if there are 1000-10000 devices in the network.

### Setting simulation parameters

Let’s start by loading default simulation parameters for Random Access procedure

input_parameters = RandomAccessParameters;

%Output values should not be visualised – we will use and plot custom output data

output_settings = {‘none‘};

%Set number of measurements points

N = 7;

To get proper results we should run several simulations with the same parameters and average the results (to avoid getting results for some very specific initial state)

%Set number of simulations to be averaged

averages = 5;

%Set the range of measurements

number_of_terminals = round(linspace(1000, 10000, N));

%Initialize output vector

collisions = zeros(1, N);

### Executing simulations

When all parameters are set we can execute simulations for all settings.

for j = 1:averages % For all defined numbers of terminals for i = 1:N %Change number of terminals in the input parameters input_parameters.mobility.numberOfTerminals = number_of_terminals(i); %Run simulation results = RandomAccessSimulation( input_parameters, output_settings ); %Store results collisions(i) = collisions(i) + results.dynamic_part.total_collisions / averages; end end

### Displaying results

When calculations are done we can display the results

%Plot the results h_col = figure('Name', 'Collision analysis'); plot(number_of_terminals, collisions, '-s'); grid on; xlabel('Number of terminals'); ylabel('Number of collisions'); title('Collisions vs number of terminals');

Above plot shows number of collisions during random access procedure. As you can see for relatively small number of terminals (1000) only few collisions occur. As one can expect number of collisions increase with increasing number of devices (it becomes more probable that two or devices will transmit in the same slot). For 10000 terminals approximately 160 collisions occur.