Generic Timeseries Classification is a hello world example for understanding usage of AI models on TI MCU. This project demonstrates implementation of an AI-based waveform detection system on AM26x microcontrollers. It showcases how to deploy machine learning models for real-time waveform classification in embedded systems, serving as a hello world example. TI provides a complete development ecosystem with toolchains and SDKs that significantly streamline all stages of Edge AI solution development.
The example uses a simple classification dataset with three waveform classes: sine, sawtooth, and square waveforms.
| Parameter | Value |
|---|---|
| CPU + OS | r5fss0-0 nortos |
| Toolchain | ti-arm-clang |
| Board | am263px-lp |
| Example folder | examples/ai/generic_timeseries_classification/ |
TI has created a specialized waveform dataset containing signal measurements. The dataset is divided into three classes: sine waveform, sawtooth waveform and square waveform.
| Parameter | Value |
|---|---|
| Sensor | Signal readings |
| Sampling Rate | 40 Hz |
| Channels | 1 (signal magnitude) |
| Samples per File | 25,600 samples |
| Total Files | 75 files (~25 files in each of 3 classes) |
This lightweight classification model CLS_1k_NPU contains approximately 1,000 parameters and follows a streamlined architecture consisting of four convolutional layers (each enhanced with BatchNorm and ReLU activation functions) followed by a single linear layer.
The model takes 4D input (N,C,H,W):
This model produces a 1D output representing the three possible classes. The position of the highest value in this output indicates the classification result:
Feature extraction transforms raw data into meaningful inputs for the AI model. For this waveform detection system, applying FFT to identify frequencies, followed by binning and logarithmic scaling, produces superior results.
The feature extraction pipeline is configured in user_input_config.h:
Key parameters:
FE_FRAME_SIZE: 1024 samples per FFT frameFE_FEATURE_SIZE_PER_FRAME: 64 features per frameFE_NUM_FRAME_CONCAT: 8 frames concatenatedFE_FFT_BIN_SIZE: 8 (bin width)FE_NN_OUT_SIZE: 3 (number of output classes)