π Edge-based Incremental Clustering with Continual Learning for Real-Time Driver Behavior Analysis
Authors: Morsinaldo Medeiros, Marianne Diniz, Daniel G. Costa, and Ivanovitch Silva
The increasing availability of vehicular telemetry through onboard sensors and the Internet of Things (IoT) has facilitated novel approaches to driver behavior analysis. Nevertheless, most existing methods depend on offline datasets and static clustering structures, which do not adequately capture the dynamic nature of driver behavior in streaming environments. This limitation often results in unstable clusters and inconsistent semantic labels. This study presents a continual learning framework for driver behavior analysis that incorporates soft-sensor feature representation, incremental clustering with plasticity control, and temporal semantic stabilization. The proposed methodology extends the MMCloud algorithm by improving feature stability and preserving structural consistency across multiple driving sessions, while maintaining compatibility with resource-constrained edge computing environments. Results from a case study using real-world vehicular telemetry indicate improvements in clustering compactness, structural stability, and temporal consistency. Additionally, embedded evaluations demonstrate that the proposed method processes each sample within a few milliseconds, confirming its suitability for real-time deployment in vehicular monitoring systems. These findings suggest that the proposed framework offers a computationally efficient solution for driver behavior modeling in streaming vehicular environments.
EAIS2026-MMCloudCL/
βββ README.md
βββ data/
β βββ raw/
β β βββ merged_dataset.csv
β βββ processed/
β βββ freematics_csv/
β βββ 362_STRUCT.CSV
β βββ ...
β βββ 374_STRUCT.CSV
βββ figures/
β βββ conecta_logo.png
β βββ platformio.png
β βββ upload.png
βββ notebooks/
β βββ compare_mmcloud_original_vs_continual_learning_new_radar_area.ipynb
β βββ analysis_replay_performance.ipynb
β βββ analysis_replay_article_metrics.ipynb
βββ results/
β βββ intermediate/
β β βββ freematics_replay/
β β βββ new_radar_area/
β βββ tables/
β β βββ freematics_replay/
β β βββ new_radar_area/
β βββ figures/
β βββ freematics_replay/
β βββ new_radar_area/
βββ scripts/
β βββ mmcloud_original.py
β βββ mmcloud_continual_learning.py
β βββ mmcloud_continual_learning_window.py
βββ embedded/
βββ freematics/
βββ firmware_v5/
β βββ telelogger/
βββ libraries/If your goal is simply to reproduce the main results, follow this order:
git clone https://github.com/conect2ai/EAIS2026-MMCloudCL.git
cd EAIS2026-MMCloudCLThe primary entry point for offline reproducibility is:
notebooks/compare_mmcloud_original_vs_continual_learning_new_radar_area.ipynbThe notebook loads the merged dataset from:
data/raw/merged_dataset.csvThe notebook uses the following scripts:
scripts/mmcloud_original.py
scripts/mmcloud_continual_learning.py
scripts/mmcloud_continual_learning_window.pyThe generated outputs include comparison tables, quality summaries, WCSS summaries, and time-series figures for the evaluated vehicles.
This section is meant for readers who want to reproduce the paper results in a more linear way.
Use:
This is the main notebook for comparing the original MMCloud pipeline against the continual learning variants.
The experiments rely on:
This file is the main offline input used to replay the vehicular telemetry data.
The notebook imports three main implementations:
scripts/mmcloud_original.py: baseline MMCloud implementation;scripts/mmcloud_continual_learning.py: MMCloud variant with continual learning;scripts/mmcloud_continual_learning_window.py: window-based continual learning variant.
The execution generates artifacts such as:
- comparison tables for the evaluated configurations;
- per-trip quality summaries;
WCSSsummaries;- article-ready figures for selected vehicles.
Results are organized under the results/ directory.
For someone opening the repository for the first time, this is the recommended order:
- Read this
README - Open
notebooks/compare_mmcloud_original_vs_continual_learning_new_radar_area.ipynb - Identify where the dataset is loaded
- Inspect the scripts in
scripts/ - Run the notebook end-to-end
- Review outputs in
results/ - Explore the additional analysis notebooks
This order keeps the repository easier to understand and reduces the amount of file-hopping needed during reproduction.
After reproducing the main pipeline, you can inspect the complementary notebooks:
notebooks/analysis_replay_performance.ipynbnotebooks/analysis_replay_article_metrics.ipynb
These notebooks are useful for deeper analysis, but they are best explored after the main comparison notebook.
The following table links each vehicle to its identifier and corresponding structured CSV file.
| Vehicle | Vehicle ID | Structured CSV |
|---|---|---|
| Eclipse | E-1 |
data/processed/freematics_csv/362_STRUCT.CSV |
| Etios | ET-1 |
data/processed/freematics_csv/364_STRUCT.CSV |
| Fastback | FB-1 |
data/processed/freematics_csv/365_STRUCT.CSV |
| HB-20 | HB-1 |
data/processed/freematics_csv/366_STRUCT.CSV |
| Fit | F-1 |
data/processed/freematics_csv/367_STRUCT.CSV |
| Hilux | H-1 |
data/processed/freematics_csv/368_STRUCT.CSV |
| Polo Branco | P-1 |
data/processed/freematics_csv/370_STRUCT.CSV |
| Polo Prata | P-2 |
data/processed/freematics_csv/372_STRUCT.CSV |
| Renegade | R-1 |
data/processed/freematics_csv/373_STRUCT.CSV |
| T-Cross | TC-1 |
data/processed/freematics_csv/374_STRUCT.CSV |
If you want to reproduce the embedded part of the project, follow the steps below.
- Visual Studio Code
- PlatformIO as a VS Code extension
Open the following folder in PlatformIO:
./embedded/freematics/firmware_v5/teleloggerConnect the Freematics One+ to your computer and power it on, either:
- through the Freematics Emulator; or
- directly in the vehicle.
Use the PlatformIO controls to:
- compile the firmware;
- upload it to the device;
- open the serial monitor.
The device can send collected information to a server and also store data locally on the SD card. Communication can be configured through Wi-Fi or 4G, depending on your setup.
The main configuration file is:
Typical parameters include:
- Wi-Fi SSID and password
- server host
- server port
- protocol type
- APN for mobile connectivity
Example configuration:
/**************************************
* Configuration Definitions
**************************************/
// ...
// define your email
#define USER_EMAIL "email@email.com"
/**************************************
* Networking configurations
**************************************/
#ifndef ENABLE_WIFI
#define ENABLE_WIFI 0
// WiFi settings
#define WIFI_SSID "FREEMATICS"
#define WIFI_PASSWORD "PASSWORD"
#endif
#ifndef SERVER_HOST
// cellular network settings
#define CELL_APN "claro.com.br"
// Freematics Hub server settings
#define SERVER_HOST "serverconect2ai.dca.ufrn.br"
#define SERVER_PROTOCOL PROTOCOL_HTTP
#endif
// SIM card setting
#define SIM_CARD_PIN ""
// HTTPS settings
#define SERVER_METHOD PROTOCOL_METHOD_POST
#define SERVER_PATH "/freematics"
#if !SERVER_PORT
#undef SERVER_PORT
#if SERVER_PROTOCOL == PROTOCOL_UDP
#define SERVER_PORT 8081
#elif SERVER_PROTOCOL == PROTOCOL_HTTP
#define SERVER_PORT 1880
#elif SERVER_PROTOCOL == PROTOCOL_HTTPS
#define SERVER_PORT 443
#endif
#endifIf you want to use mobile data instead of Wi-Fi:
- set
ENABLE_WIFIto0; - configure
CELL_APNaccording to your carrier.
Examples of Brazilian carrier APNs:
- TIM:
timbrasil.br - Claro:
claro.com.br - Oi:
gprs.oi.com.br - Vivo:
zap.vivo.com.br
The results/ directory is organized to make analysis easier:
results/intermediate/: intermediate artifacts and replay outputsresults/tables/: tables ready for inspection or paper writingresults/figures/: plots and article-ready visual outputs
This structure helps separate temporary artifacts from final visual results.
This project is licensed under the MIT License. See the LICENSE file for details.
The Conect2AI research group is composed of undergraduate and graduate students from the Federal University of Rio Grande do Norte (UFRN). The group develops Artificial Intelligence and Machine Learning solutions in emerging domains, with emphasis on Embedded Intelligence, IoT, energy efficiency, and sustainable mobility.


