This repository contains a MATLAB application developed as part of my Bachelor's Thesis in Telecommunication Engineering. The project was carried out within the research activities of the Signal Processing Applications Group (GAPS) at the School of Telecommunication Engineering (ETSIT), Universidad Politécnica de Madrid (UPM). The main objective of the project is to provide a software tool for the characterization of nonlinear audio systems, integrating measurement acquisition, system identification algorithms, distortion analysis, and objective performance metrics into a single graphical user interface. The application is intended to facilitate the analysis of audio devices, such as commercial audio amplifiers, by providing a complete workflow from measurement acquisition to result visualization.
The application provides the following functionality:
- MATLAB graphical user interface (GUI).
- Measurement and identification management.
- Support for multiple excitation signals:
- Maximum Length Sequence (MLS).
- Exponential Sine Sweep (ESS).
- Pure sine wave.
- Linear system identification using cross-correlation.
- Nonlinear system identification using ESS-based nonlinear convolution.
- Computation of:
- Total Harmonic Distortion (THD).
- Generalized Total Harmonic Distortion (GTHD).
- Automatic computation of objective metrics:
- Ripple.
- Frequency Range.
- Signal-to-Distortion Ratio (SDR).
- Mean Squared Error (MSE).
- Comparison against simulated reference systems.
- Interactive visualization of:
- Impulse response.
- Magnitude response.
- Phase response.
- Output prediction.
- Harmonic packets estimated from ESS.
- Management and storage of identification results.
The application follows the characterization workflow shown below.
Figure 1. Characterization workflow.
The proposed workflow supports different identification methods and distortion metrics using multiple excitation signals, enabling the analysis of cross-experiments.
By default, however, stored measurements are automatically filtered according to the excitation signal required by each identification method.
| Excitation Signal | Identification Method |
|---|---|
| MLS | Cross-Correlation |
| ESS | Nonlinear Convolution |
| SIN | THD |
| ESS | GTHD |
Based on the proposed workflow, a software state diagram was designed to describe every possible application state.
The application revolves around a central Standby state, from which every operation can be accessed.
Figure 2. Software state diagram.
According to the proposed workflow and software architecture, the project has been organized into the following directories:
Identifications/
Measurements/
Modules/
Probes/
Systems/
Trash/
Utils/
These folders contain all the components required for measurement acquisition, system identification, objective metric computation, and result visualization. The remaining folders contain testing material and the images used throughout this README.
The application provides a unified interface covering the complete characterization workflow. The GUI is divided into two main tabs: Measure, dedicated to measurement acquisition, and Identification, dedicated to system identification and distortion analysis.
Figure 3. Measurement and Identification tabs.
- MATLAB R2024b or later.
- Required MATLAB toolboxes:
- Audio Toolbox.
- DSP System Toolbox.
- Signal Processing Toolbox (required by some functions).
Clone the repository:
git clone https://github.com/mtmonserrat/TFG-Matlab-App.gitOpen the project in MATLAB and launch the application from the main .mlapp file.
Linear identification method based on MLS excitation signals for estimating the impulse response of the system.
Identification method based on Exponential Sine Sweep (ESS) signals that separates the harmonic impulse responses associated with each nonlinear order.
Conventional harmonic distortion metric obtained from sinusoidal excitation.
Novel distortion metric proposed in this work. GTHD estimates harmonic distortion using the energy of the harmonic impulse responses associated with each nonlinear order obtained through ESS-based identification.
The application automatically computes the following objective metrics:
- Ripple.
- Frequency Range.
- Signal-to-Distortion Ratio (SDR).
- Mean Squared Error (MSE).
- Total Harmonic Distortion (THD).
- Generalized Total Harmonic Distortion (GTHD).
Possible future improvements include:
- Support for additional excitation signals.
- Automatic report generation.
- Support for multichannel measurements.
- Extended experimental validation.
- Additional objective metrics.
- Further improvements to the graphical user interface.
Title: Design, Implementation and Validation of a System for the Evaluation of the Response and Linearity of Commercial Audio Amplifiers
Degree: Bachelor's Degree in Telecommunication Technologies and Services Engineering.
Institution: Escuela Técnica Superior de Ingnieros de Telecomunicación (ETSIT). Universidad Politécnica de Madrid (UPM)
For additional information about the application, its theoretical background, and the complete development process, please refer to the full Bachelor's Thesis:
📥 Download the Bachelor's Thesis (PDF)
María Teresa Monserrat Sánchez
Bachelor's Degree in Telecommunication Technologies and Services Engineering
This project is distributed under the MIT License.

