TSimTool

·

Completed

·

TSimTool interface with simulation and plot settings, a plot area and the chat assistant

What it is

TSimTool was my bachelor’s thesis at Universitat Pompeu Fabra, built with Alba Soldevila González and Arnau Ranchal Marín and supervised by Alfonso Martínez and Josep Font-Segura from the UPF MatCom research group. It answers a simple question about a digital transmission system: how likely is it to get a message wrong? Given a modulation, a signal-to-noise ratio, a rate and a code length, it computes the error probability, the error exponent and the optimal ρ behind them.

How it works

Pick a PAM, QAM or PSK constellation, set the SNR, rate and code length, and either compute the metrics or plot one against another, as a line or as a contour over two variables. The heavy lifting happens in a C++ library that evaluates the E₀(ρ) function behind the random-coding error exponent, using Gauss-Hermite quadrature and gradient descent to find the optimal ρ. A FastAPI backend calls it through ctypes, and the browser draws the results with D3.

The assistant

There’s also a chat assistant that turns questions like “compare 4-PAM and 8-PSK at an SNR of 5” into calls to the same functions and plots. It can run on a small local model or through OpenRouter.

Running it

This version is meant to run locally. A setup script installs the Python dependencies and builds the C++ library, and the app then opens at localhost:8000. The steps are in the README on GitHub.

Built with

Python, FastAPI, C++, Eigen, D3.js