Claim Missing Document
Check
Articles

Found 4 Documents
Search

On-device training of artificial intelligence models on microcontrollers Thai, Bao-Toan; Tran, Vy-Khang; Pham, Hai; Nguyen, Chi-Ngon; Nguyen, Van-Khanh
IAES International Journal of Artificial Intelligence (IJ-AI) Vol 13, No 3: September 2024
Publisher : Institute of Advanced Engineering and Science

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.11591/ijai.v13.i3.pp2829-2839

Abstract

Numerous studies are currently training artificial intelligence (AI) models on tiny devices constrained by computing power and memory limitations by implementing model optimization algorithms. The question arises whether implementing traditional AI models directly on small devices like micro-controller units (MCUs) is feasible. In this study, a library has been developed to train and predict the artificial neural network (ANN) model on common MCUs. The evaluation results on the regression problem indicate that, despite the extensive training time, when combined with multitasking programming on multi-core MCUs, the training does not adversely affect the system's execution. This research contributes an additional solution that enables the direct construction of ANN models on MCU systems with limited resources.
Real-time anomaly detection in electric motor operation noise Nguyen, Van-Khanh; Thai, Bao-Toan; Tran, Vy-Khang; Pham, Hai; Nguyen, Chi-Ngon
IAES International Journal of Artificial Intelligence (IJ-AI) Vol 13, No 4: December 2024
Publisher : Institute of Advanced Engineering and Science

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.11591/ijai.v13.i4.pp3814-3826

Abstract

Anomaly detection plays a very important role in many fields to identify abnormalities occurring in the system earlier. This study proposes a new abnormality detection solution for 3-phase electric motors based on their working noise. Normal and abnormal operating noise data sets for an electric motor were acquired in the laboratory. These datasets are converted into the corresponding two-dimensional gray spectrogram image sets. The normal set is used to train the autoencoder (AE) model to find the abnormality evaluation threshold. This threshold is validated again with anomalous data sets. The trained AE is then quantized to be installed on a system consisting of two duo-core microcontroller units (MCUs) for real-time testing. Free real-time operating system (FreeRTOS), a real-time operating system, is used to schedule tasks on the system. Experimental results show that the designed anomaly detector can accurately detect over 99% of abnormal events. The system can communicate with a supervisory control and data acquisition (SCADA) application running on the S7-1200 programmable logic controller (PLC) platform using the Modbus transmission control protocol (TCP) protocol. The SCADA application can continuously record evaluated results from the system and adjust abnormal thresholds for the system directly on the human-machine interface (HMI) screen.
Real-time Assessment of ECG Classification based on Time-series Data and Other Types of Features Tran, Thanh-Luan; Thai, Bao-Toan; Tran, Vy-Khang; Nguyen-Thi, Xuan-Nhi; Nguyen, Chi-Ngon; Nguyen, Van-Khanh
Journal of Engineering and Technological Sciences Vol. 57 No. 4 (2025): Vol. 57 No. 4 (2025): August
Publisher : Directorate for Research and Community Services, Institut Teknologi Bandung

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.5614/j.eng.technol.sci.2025.57.4.8

Abstract

Cardiovascular diseases are the leading cause of mortality worldwide. An increasing number of studies have applied artificial intelligence (AI) to identify anomalies and classify electrocardiograms (ECGs), supporting early detection and diagnosis. This study proposes and evaluates the classification of ECG signals based on time-series data and features extracted via fast Fourier transform (FFT) and discrete cosine transform (DCT), implemented on resource-limited microcontroller units (MCUs) for selected AI models. Two models, the artificial neural network (ANN) and the convolutional neural network (CNN), were proposed for classifying five common ECG labels. These models were trained and tested with three types of input data: time-series data, FFT features, and DCT features, sourced from an available database. After training, the optimized models were quantized to assess their accuracy before being deployed in real-time to measure inference time on the ESP32 MCU. Before quantization, the ANN model achieved the highest accuracy with both DCT and time-series inputs (98.0%); meanwhile, the CNN model performed best with time-series input (97.0%). After quantization, the ANN maintained the highest accuracy with time-series input (97.1%), followed by the ANN with DCT at 95.6%. CNN models remained stable, with post-quantization accuracy of 95.8% for time-series input, 94.9% for DCT, and 90.0% for FFT. In contrast, ANN with FFT input showed a significant drop to 65.6%.
A Proposed Approach to Utilizing Esp32 Microcontroller for Data Acquisition Tran, Vy-Khang; Thai, Bao-Toan; Pham, Hai; Nguyen, Van-Khan; Nguyen, Van-Khanh
Journal of Engineering and Technological Sciences Vol. 56 No. 4 (2024)
Publisher : Directorate for Research and Community Services, Institut Teknologi Bandung

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.5614/j.eng.technol.sci.2024.56.4.4

Abstract

Accurate data acquisition is crucial in embedded systems. This study aimed to evaluate the data acquisition ability of the ESP32 Analog to Digital Converter (ADC) module when combined with the I2S module to collect high-frequency data. Sine waves at various frequencies and white noise were recorded in this mode. The recorded data were analyzed by the fast Fourier transform (FFT) to assess the accuracy of the recorded data and evaluate the generated noise. Digital filters are proposed to improve the quality of the collected signals. A 2D spectrogram imaging algorithm is proposed to convert the data to time-frequency domain images. The results showed that the ADC module could effectively collect signals at frequencies up to 96 kHz; frequency errors were proportional to the sampling rate, and the maximum was 79.6 Hz, equivalent to 0.38%. The execution time of the lowpass and highpass filters was about 6.83 ms and for the bandpass filter about 5.97 ms; the spectrogram imaging time was 40 ms; while the calculation time for an FFT transform was approximately 1.14 ms, which is appropriate for real-time running. These results are significant for data collection systems based on microcontrollers and are a premise for deploying TinML networks on embedded systems.