https://github.com/conect2ai/etfa2025-mst-mpt

This repository contains the code implementation of MSTEDARLS and MPTEDARLS proposed at the IEEE ETFA 2025 conference.

https://github.com/conect2ai/etfa2025-mst-mpt

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: scholar.google
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

This repository contains the code implementation of MSTEDARLS and MPTEDARLS proposed at the IEEE ETFA 2025 conference.

Basic Info
  • Host: GitHub
  • Owner: conect2ai
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 19.1 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

   

 

MST and MPT: Lightweight Incremental Algorithms for Multivariate Anomaly Detection and Correction on TinyML Devices

✍🏾Authors: Morsinaldo Medeiros, Marianne Diniz, Ivanovitch Silva, Massimiliano Gaffurini, Dennis Brandão, Paolo Ferrari

1. Abstract/Overview

The Internet of Things (IoT) generates massive multivariate time series data that requires real-time anomaly detection and correction to ensure reliable monitoring and control. However, conventional methods relying on offline training and batch processing are impractical for embedded IoT devices due to their severe memory, processing, and energy constraints. To address this gap, we propose two lightweight incremental learning algorithms: Multivariate Sequential TEDA with RLS Correction (MST) and Multivariate Parallel TEDA with RLS (MPT), both derived from the TEDARLS framework, which enable on-device detection and correction of multivariate anomalies within the constraints of TinyML resources. Both algorithms operate without prior training, continuously updating internal statistics in real-time to identify outliers and apply immediate corrections. In experiments using real vehicular sensor data on a TinyML microcontroller, MST achieved approximately 99% precision and 100% recall with inference times around 500μs, while preserving the original data characteristics. MPT, although more sensitive to multivariate patterns, introduced greater signal distortions and required processing times exceeding 4,200μs. Overall, MST demonstrated superior stability and is more suitable for real-time anomaly correction in resource-constrained IoT environments. By enabling lightweight, accurate, and autonomous anomaly detection and correction directly at the edge, this approach addresses a critical gap in embedded analytics for IoT systems.

Python PlatformIO Edge%20AI

This repository contains the source code and experimental materials associated with the MST (Multivariate Sequential TEDA-RLS) and MPT (Multivariate Parallel TEDA-RLS) algorithms, developed for online anomaly detection and correction in multivariate vehicular data streams.

Both algorithms are designed to operate in real time, making them suitable for edge computing scenarios involving vehicular telemetry, such as OBD-II data acquisition.

Repository Structure 📂

  • ./Freematics/ — Source code from the Freematics project used for the embedded experiments (ESP32, OBD-II communication, etc.).
  • ./src/ — Source code developed for MST and MPT.
    • ./src/cpp/ — C++ implementations for embedded systems.
  • ./data/ — Datasets used for experiments, including preprocessed vehicular data.
  • ./figures/ — Figures generated for analysis and publication.
  • .git/ — Version control metadata (Git).

Datasets 📈

All experimental datasets are provided in .csv format within the data/ folder.
Each file contains the following variables:

| Variable | Description | |:--------:|:-----------| | speed | Vehicle speed (km/h) | | rpm | Engine revolutions per minute (rpm) | | tp | Throttle position (%) | | load | Engine load (%) | | timing | Ignition timing advance (°) |

The datasets are organized as follows: - Original data — Vehicular signals without injected anomalies. - Corrected data — Data after processing with MST or MPT.

Getting Started 🚀

1️⃣ Cloning the Repository

bash git clone https://github.com/conect2ai/ETFA2025-MST-MPT.git cd ETFA2025-MST-MPT

2️⃣ Installing Dependencies

It is recommended to use Python 3.11+ with a virtual environment (venv or conda):

bash pip install -r requirements.txt

3️⃣ Running the Notebooks

Open the .ipynb files using Jupyter Notebook or JupyterLab and execute the cells according to the instructions provided in each section.

Executing on Freematics One+

4️⃣ Opening the Project

Open the project folder ./Freematics/firmware_v5/telelogger on PlatformIO, as illustrated in the figure below.

5️⃣ Connecting the Device

Connect the Freematics One+ to your computer and turn it on using the Freematics Emulator or inside the vehicle.

6️⃣ Compiling, Uploading, and Monitoring

Compile, upload, and monitor the serial (steps 1, 2, and 3, respectively, in the figure below).


:pagefacingup: License

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


🌎 About Conect2AI

The Conect2AI research group is composed of undergraduate and graduate students from the Federal University of Rio Grande do Norte (UFRN) and aims to apply Artificial Intelligence (AI) and Machine Learning in emerging areas. Our expertise includes Embedded Intelligence and IoT, optimizing resource management and energy efficiency, contributing to sustainable cities. In the energy transition and mobility, we apply AI to optimize energy use in connected vehicles and promote more sustainable mobility.

Owner

  • Name: conect2ai
  • Login: conect2ai
  • Kind: organization

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Dependencies

requirements.txt pypi
  • matplotlib *
  • numpy *
  • pandas *
  • scikit-learn *
  • seaborn *
  • wandb *