Physiological signals and the User Digital Twin.
For my bachelor’s thesis, I built a modular pipeline to collect, organise and analyse ECG and electrodermal activity.
The project explored the distinction between rest and cognitively demanding tasks as a possible input to future adaptive human–machine systems. My implemented contribution was the User Digital Twin: the part that represents, processes and analyses the person’s physiological signals.
Data acquisition and analysis.
I implemented the acquisition and analysis path around a WLDT User Digital Twin, with separate responsibilities for collection, data management and analysis.
- 01
Collect ECG and EDA
A BITalino board acquires the two signals at 100 Hz. An Android application receives frames over Bluetooth Low Energy, controls acquisition, retains CSV records and publishes the data through MQTT.
- 02
Keep the flow organised
Inside the User Digital Twin, a Data Collector buffers frames, a Data Manager orders them and handles missing values, and a Data Analyzer invokes the signal processing.
- 03
Extract features and compare models
Python analysis extracts ECG and EDA features. I compared Decision Tree, Logistic Regression, KNN, SVC and Gaussian Naive Bayes on the experimental recordings.
- 04
Return the analysis
The results are republished to MQTT topics for a downstream consumer, keeping the sensing, processing and future machine-side response separate.
Inside the signal analysis
The ECG path extracts R-peaks, RR intervals and heart-rate variability features. The EDA path measures regression slope and deviation area in 20-second windows with five-second steps.
I compared two feature configurations: ECG features with mean EDA features, and ECG features with five values for each EDA feature. The study used rest recordings and tasks including Stroop, mental arithmetic, fast counting and 2-back.
Prototype evaluation.
Study group35 participantsEach contributed a rest and a task-condition recording.
Experimental data70 recordingsRecording-level samples used to compare feature and model choices.
The prototype connected acquisition, data management, feature extraction and an analysis output. The study also exposed a practical constraint: movement and electrode placement affected signal quality, and classification results changed with the feature configuration.
More reliable acquisition, improved filtering and a larger dataset were clear next steps. The recording-level evaluation did not establish how well the classifiers would generalise to independently held-out people.
The exploratory classifier result
With five values per EDA feature, Gaussian Naive Bayes reached 0.71 test accuracy and 0.7015 weighted F1, the strongest accuracy shown for that configuration.
This was one small recording-level holdout result, not a cross-validation average. Each participant contributed two recordings, and the illustrated split did not group them by participant. The result therefore leaves generalisation to new people open.
Prototype scope and next steps.
This project taught me to treat data acquisition, signal quality and software architecture as part of the same engineering problem. A modular pipeline made it possible to inspect each stage and see where better inputs or methods were needed.
The User Digital Twin was the implemented prototype.
The machine-side twin and adaptive robot control remained future work. The study concerned experimental rest and task conditions; it did not demonstrate a robot responding to a person’s state.
- BITalino
- Android
- Bluetooth Low Energy
- MQTT
- WLDT / Java
- Python
- SciPy
- BioSPPy
- NeuroKit2
- scikit-learn
Academic project details
IoT Digital Twin for Physiological Signals Analysis in Human-Machine Interaction
- Degree
- Bachelor’s in Computer Engineering
- University
- Università degli Studi di Modena e Reggio EmiliaDipartimento di Ingegneria Enzo Ferrari · Mantova campus
- Supervisors
- Prof. Valeria Villani · Prof. Marco Picone