A Novel Lightweight Context Exchange Protocol for Communication between Tinyml-Enabled Iot Systems and Ai Applications
A Novel Lightweight Context Exchange Protocol for Communication between Tinyml-Enabled Iot Systems and Ai Applications
Yükleniyor...
Abstract
Model Bağlam Protokolü (MCP), yapay zekâ uygulamalarının harici sistemlerle etkileşime geçmesini sağlamaktadır; ancak yüksek kaynaklı ortamlar için tasarlanmıştır ve kısıtlı kaynaklı gömülü nesnelerin interneti cihazlarıyla kullanılamaz. MQTT ve HTTP/REST gibi mevcut protokoller bu cihazlarda kullanılmakla birlikte, bağlamsal farkındalıktan yoksundur ve Küçük Ölçekli Makine Öğrenimi (TinyML) tabanlı mikrodenetleyicilerle verimli iletişim için optimize edilmemiştir. Bu tez, TinyML destekli nesnelerin interneti cihazları için optimize edilmiş Hafif Bağlam Değişim Protokolünü (LCEP) önermektedir. Geliştirilen protokol, MCP'nin yapılandırılmış veri alışverişi konseptini uyarlayarak yapay zekâ uygulamaları ile nesnelerin interneti cihazları arasında verimli iletişim sağlamaktadır. Önerilen sistem; hareket tespiti için MPU6050, sıcaklık ve nem algılama için AHT10 sensörlerini kullanan ESP32 mikrodenetleyicisi üzerinde uygulanmıştır. Hareket sınıflandırması, Edge Impulse ile eğitilen ve %97,67 doğruluk elde eden 8 bit niceliklendirilmiş bir TinyML algoritmasıyla gerçekleştirilmiştir. LCEP, paket boyutunu en aza indirmek için kompakt ikili kodlama ve delta maskeleme kullanmaktadır. 5.000 paket üzerinde gerçekleştirilen değerlendirmede ortalama yük boyutu 29,6 bayt olarak ölçülmüş; bu değer UDP/JSON için 151,1 bayt ve MQTT/JSON için 183,4 bayta kıyasla belirgin bir azalma sunmaktadır. Ortalama iletim gecikmesi 7,4 ms olarak korunmuştur. Kullanıcı girişinden LLM'e, MCP üzerinden LCEP kullanan TinyML cihazlarına uzanan tüm süreç başarıyla uygulanmış ve test edilmiştir.
The Model Context Protocol (MCP) enables AI applications to interact with external systems. However, MCP is designed for high-resource computing environments and cannot be used with resource-constrained embedded IoT devices that use TinyML. Existing communication protocols, such as MQTT and HTTP/REST, introduce significant communication overhead. While MQTT is a lightweight protocol, it is not specifically designed for contextual awareness and efficient interaction between LLMs and TinyML-based microcontrollers. This thesis proposes the Lightweight Context Exchange Protocol (LCEP), a custom-designed binary communication protocol optimized for TinyML-powered IoT devices. LCEP adapts the concept of structured data exchange from MCP and creates efficient communication between LLM applications and microcontroller-based TinyML devices. The proposed system is implemented using the ESP32 microcontroller with the MPU6050 sensor for motion detection and the AHT10 sensor for temperature and humidity sensing. Motion classification is performed using a TinyML algorithm trained with Edge Impulse using 8-bit quantization, achieving 97.67% accuracy. LCEP uses compact binary field encoding and delta-masking transmission to minimize packet size. The protocol was evaluated over 5,000 packets and achieved an average payload size of 29.6 bytes, compared to 151.1 bytes for UDP/JSON and 183.4 bytes for MQTT/JSON, while maintaining an average transmission latency of approximately 7.4 ms. The entire process from user input through LLM to MCP and TinyML devices using LCEP has been achieved and tested.
The Model Context Protocol (MCP) enables AI applications to interact with external systems. However, MCP is designed for high-resource computing environments and cannot be used with resource-constrained embedded IoT devices that use TinyML. Existing communication protocols, such as MQTT and HTTP/REST, introduce significant communication overhead. While MQTT is a lightweight protocol, it is not specifically designed for contextual awareness and efficient interaction between LLMs and TinyML-based microcontrollers. This thesis proposes the Lightweight Context Exchange Protocol (LCEP), a custom-designed binary communication protocol optimized for TinyML-powered IoT devices. LCEP adapts the concept of structured data exchange from MCP and creates efficient communication between LLM applications and microcontroller-based TinyML devices. The proposed system is implemented using the ESP32 microcontroller with the MPU6050 sensor for motion detection and the AHT10 sensor for temperature and humidity sensing. Motion classification is performed using a TinyML algorithm trained with Edge Impulse using 8-bit quantization, achieving 97.67% accuracy. LCEP uses compact binary field encoding and delta-masking transmission to minimize packet size. The protocol was evaluated over 5,000 packets and achieved an average payload size of 29.6 bytes, compared to 151.1 bytes for UDP/JSON and 183.4 bytes for MQTT/JSON, while maintaining an average transmission latency of approximately 7.4 ms. The entire process from user input through LLM to MCP and TinyML devices using LCEP has been achieved and tested.
Description
Keywords
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol, Elektrik ve Elektronik Mühendisliği
Fields of Science
Citation
WoS Q
Scopus Q
Source
Volume
Issue
Start Page
End Page
Collections
Yükleniyor...
