Bachelor’s thesis

A digital twin for physiological signals.

Human–machine interactionAcademic prototype

My bachelor’s thesis connected ECG and skin-conductance sensing to a modular User Digital Twin, exploring rest and cognitively demanding task recordings.

UNIMORE · Dipartimento di Ingegneria Enzo Ferrari · Mantova

My role
User Digital Twin, acquisition pipeline and physiological-signal analysis
Focus
IoT · Signal processing · Digital twins
Schematic connecting ECG and EDA sensing, an Android bridge, MQTT and a User Digital Twin.
An original schematic of the implemented pipeline, from ECG and EDA sensing to the User Digital Twin’s analysis output.

Schematic signals · no inference on a person

Signal pipeline.

Bachelor’s thesisIllustrative explorer

Follow the signal through the twin

Inspect the stages, then move the window to explore prepared examples of frame handling.

Illustrative ECG and EDA signal windowTwo original schematic traces. A movable shaded window indicates a selected part of the drawing; it does not classify physiological state.ECGEDA
Original illustrative traces, without measured units.

Begin with two signals

My prototype acquires ECG and electrodermal activity with a BITalino board. The drawings here are illustrative: their shapes do not establish whether someone is at rest or under stress.

ECG + EDA · BITalino acquisition

Move frames into the digital system

An Android application receives frames over Bluetooth Low Energy, retains CSV records and publishes MQTT messages for the digital twin.

Bluetooth Low Energy → Android → MQTT

Give each module a clear responsibility

The WLDT implementation separates collection, frame validation and analysis. Its sequence checks can reorder frames and fill a missing value from neighbouring values before invoking Python.

Collect → validate → analyse

Make the analysis available downstream

My research extracted ECG/EDA features and compared five classifiers. Results can be published for a consumer. The machine-side twin and adaptive robot control remained future work.

Features → classifier evaluation → published output

Prepared message

Window
02 / 05
Frame example
Out of sequence
Handling
Restore sequence order
Classification
Not run in this explorer

The example illustrates ordering frames before analysis.

Traces and messages are illustrative. No live physiological inference runs here. I implemented the User Digital Twin; machine-side adaptation remained future work.

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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 participants

Each contributed a rest and a task-condition recording.

Experimental data70 recordings

Recording-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
Make yourself at home

Search the portfolio.

↑ ↓ navigate↵ openesc close
Quick tour

Explore