Skip to content

A native Qt GUI application to calculate the theoretical maximum throughput for 4G (LTE) and 5G (NR) mobile networks

License

Notifications You must be signed in to change notification settings

nuloperrito/CellularThroughputCalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4G/5G Theoretical Throughput Calculator

License Platform Qt Version

A desktop application built with Qt C++ to calculate the theoretical maximum throughput for 4G (LTE) and 5G (NR) mobile networks. It provides a detailed and interactive interface for network engineers, students, and telecom enthusiasts to experiment with various carrier configurations.

Features

  • Dual-Mode Calculation: Separate, dedicated tabs for both 4G (LTE) and 5G (NR) calculations.
  • Carrier Aggregation (CA): Supports adding multiple component carriers (CC) to simulate and calculate the aggregated throughput.
  • Uplink Carrier Aggregation: Secondary carriers can be configured to contribute to the total uplink throughput.
  • Comprehensive Duplexing Support: Accurately models Frequency Division Duplex (FDD), Time Division Duplex (TDD), Supplemental Downlink (SDL), and Supplemental Uplink (SUL) bands.
  • Detailed Parameter Configuration:
    • 4G LTE: Bandwidth, Resource Blocks (RBs), MIMO layers, Downlink/Uplink Modulation (QPSK, 16QAM, 64QAM, 256QAM), TDD Configuration (0-6), and Special Subframe Configuration (0-8).
    • 5G NR: Subcarrier Spacing (SCS), Bandwidth (for DL and UL), MIMO layers, Downlink/Uplink Modulation, Scaling Factor, and flexible TDD slot patterns.
  • Dynamic UI: The user interface intelligently adapts based on the selected band's characteristics, showing only relevant configuration options (e.g., TDD settings only appear for TDD bands).
  • Data-Driven Design: Network band characteristics, resource block counts, and other parameters are loaded from external JSON files, making the data easy to view and update.
  • Modern Themed Interface: A custom dark theme styled with QSS for a clean and professional look.

How It Works: Calculation Logic

The calculator implements standard formulas to estimate the theoretical peak data rates.

4G (LTE) Calculation

  • FDD Mode: A simplified formula is used, which provides a close approximation of the maximum throughput: $Throughput = 0.5 \times N_{RBs} \times Multiplier_{Modulation} \times Multiplier_{MIMO}$
  • TDD Mode: The calculation is more detailed, accounting for the ratio of downlink to uplink resources. It considers:
    1. The TDD Uplink/Downlink Configuration (0-6).
    2. The Special Subframe Configuration (0-8).
    3. The Cyclic Prefix Length (Normal or Extended). These parameters determine the number of downlink, uplink, and special subframes within a radio frame. The final throughput is calculated based on this resource allocation and then reduced by a standard factor of 25% to account for control channel overhead (e.g., PDCCH).

5G (NR) Calculation

The 5G NR calculation is based on the formula specified in 3GPP TS 38.306. The data rate for a single carrier is given by:

$$ \text{DataRate (Mbps)} = 10^{-6} \cdot \sum_{j=1}^{N_{CC}} \left( v_{\text{Layers}}^{(j)} \cdot Q_m^{(j)} \cdot f^{(j)} \cdot R_{\text{max}} \cdot \frac{N_{\text{PRB}}^{\text{BW}(j),\mu} \cdot 12}{T_s^\mu} \cdot (1 - OH^{(j)}) \right) $$

Where:

  • $N_{CC}$ is the number of aggregated Component Carriers.
  • $v_{\text{Layers}}^{(j)}$ is the maximum number of MIMO layers for carrier $j$.
  • $Q_m^{(j)}$ is the modulation order (e.g., 6 for 64QAM, 8 for 256QAM).
  • $f^{(j)}$ is the scaling factor.
  • $R_{\text{max}}$ is the maximum code rate, which is fixed at 948/1024.
  • $N_{\text{PRB}}^{\text{BW}(j),\mu}$ is the number of Resource Blocks for a given bandwidth and subcarrier spacing $\mu$.
  • $T_s^\mu$ is the average OFDM symbol duration for subcarrier spacing $\mu$.
  • $OH^{(j)}$ is the overhead, which is a fixed percentage based on the frequency range (FR1 or FR2).

For TDD mode, the above result is scaled by the percentage of available downlink or uplink symbols, which are derived from the user-configured TDD slot patterns.

Usage Guide

  1. Launch the Application: The main window will open with two tabs.
  2. Select a Technology: Click on the "4G Calculator" or "5G Calculator" tab.
  3. Configure the Primary Carrier:
    • The first carrier row is the Primary Component Carrier (PCC). It cannot be removed.
    • Use the "Band" dropdown to select a frequency band. The UI will automatically adjust to show relevant options.
    • Set the other parameters like Bandwidth, Modulation, and MIMO layers.
    • For TDD bands, additional TDD-specific configuration panels will become visible.
  4. Add More Carriers (Carrier Aggregation):
    • Click the "Add Carrier" button at the bottom to add a Secondary Component Carrier (SCC).
    • Configure the SCC just like the primary carrier.
  5. Enable Uplink Aggregation:
    • For any secondary carrier, click the "Aggregate Uplink" button to include its uplink throughput in the total calculation. By default, only the PCC's uplink is active.
  6. View Results:
    • The total aggregated Downlink and Uplink throughput is always visible at the top of the window.
    • Each carrier row's header displays its individual calculated throughput.
    • Click on a carrier row's header to expand or collapse its configuration panel.

Prerequisites for building from source

  • Qt Framework: Version 5.15 or newer.
  • C++ Compiler: A compiler with C++17 support (e.g., GCC, Clang, MSVC).

Screenshots

4G Calculator UI 5G Calculator UI

Project Structure

├── main.cpp                 // Application entry point
├── mainwindow.h/cpp/ui      // Main window containing the tab widget
├──
├── calc4gwidget.h/cpp/ui    // Widget for the 4G calculator tab
├── carrierrow4g.h/cpp/ui    // Widget for a single 4G carrier configuration row
├──
├── calc5gwidget.h/cpp/ui    // Widget for the 5G calculator tab
├── carrierrow5g.h/cpp/ui    // Widget for a single 5G carrier configuration row
├──
├── appconfig.h/cpp          // Singleton class to load and manage JSON configuration data
├── utils.h                  // Common data structures and helper functions
├──
├── resources.qrc            // Qt resource file for embedding assets
└── res/
    ├── lteBandData.json     // Configuration data for LTE bands
    ├── lteSsubConf.json     // Configuration for LTE special subframes
    ├── nrBandData.json      // Configuration data for NR bands
    ├── nrRbData.json        // NR Resource Block counts per BW/SCS
    └── style.qss            // Application stylesheet

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A native Qt GUI application to calculate the theoretical maximum throughput for 4G (LTE) and 5G (NR) mobile networks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published