README

Fan Blade Fault Detection

Example Summary

The fan_blade_fault_detection example demonstrates an AI-powered motor/fan fault classification application across TI wireless MCU families (CC13XX, CC27XX, CC35XX) and leverages TI’s Edge AI Studio to enable the development of AI applications capable of efficiently running locally on the device, on the Edge.

The system acquires vibration data from an ADXL355 accelerometer mounted on a brushless DC fan, extracts frequency-domain features on-device, and runs inference using a pre-trained neural network model. On CC27XX/CC35XX devices the inference is accelerated by the Custom Datapath Extension (CDE).

The model classifies the fan’s mechanical state into four classes:

This is a single example that supports two runtime modes, selected by TI’s Edge AI Studio over the Device Agent Protocol (DAP) via UART/USB:

  1. Data Acquisition - streams raw time-domain ADXL355 vibration samples to the host for offline dataset building, model training, and verification.
  2. Sensor Inferencing (Live Preview) - extracts features on-device, runs the AI model, and transfers the inferred class and per-class output values to the host for real-time visualization in Edge AI Studio.

TI’s Edge AI Studio guides users through the entire AI pipeline with these key steps:

  1. Live Sensor Data Acquisition. Build application-specific datasets by acquiring vibration data directly from the device. Label each instance with the appropriate fault class and define the number of samples per instance and the measurement duration (time).

  2. Model Selection. Select a pre-trained neural network architecture and a suitable device for inference.

  3. Model Training. Select a feature extraction preset and define training hyperparameters such as the number of epochs and learning rate. Feature extraction is supported on the MCU side through the feature extraction library.

  4. Model Compilation. Compiles the trained AI model into efficient C code optimized for the target device architecture:
  1. Live Inference Results Preview. Flash the complete application (including the compiled AI model) onto the device and run inference on real vibration data with real-time result visualization.

Edge AI Studio

TI’s Edge AI Studio is a collection of tools that provide a fully integrated graphical user interface solution for collecting and annotating data, training and compiling models for deployment on live development platforms. Users can select from a variety of pre-trained models in the TI Model Zoo and optionally re-train them with custom data to improve accuracy and performance.

Prerequisites

Please go through the Release Notes to make sure you consider all the correct hardware and software dependencies.

Project Structure

  1. ai_artifacts
    • Contains the AI neural network model header file tvmgen_default.h, the pre-compiled model code mod.a, and user_input_config.h. These files are regenerated each time a new model is trained through TI’s Edge AI Studio.
  2. feature_extraction
    • Application wrapper around the feature extraction library:
      • FeatureExtract_config: Initializes the on-device feature extraction pipeline for the fan-fault model.
      • FeatureExtract_run: Executes one frame of feature extraction. For each of the 3 axes the pipeline removes the DC component, applies a Hann window, computes a 256-point FFT, bins the magnitude spectrum (16 bins of 8) and applies 20·log10 scaling. The per-frame features are concatenated across an 8-frame rolling history to form the model input tensor.
      • FeatureExtract_findClass: Determines the labeled fault class from the model’s output vector (argmax).
    • core: The device-independent feature extraction library sources compiled with the example - feature_extract.c (alloc/init/run plus all DSP stages) and feature_extract_fft_cmsis.c (the FFT stage via CMSIS-DSP). The application wrapper above is the only intended entry point.
  3. sensor
    • Sensor_init: Initializes the sensor task, opening SPI and GPIO and configuring the ADXL355 (range, power control, interrupt map).
    • Sensor_getData: Collects one frame of interleaved XYZ samples from the ADXL355 on each data-ready (DRDY) interrupt and copies it to the caller’s buffer.
  4. fan_blade_fault_detection
    • Main application task that processes input from TI’s Edge AI Studio through the Device Agent Protocol (DAP) to operate in different modes. Supported modes:
      • Live preview of raw sensor data acquisition.
      • Live preview of sensor inferencing.
    • The Device Agent Protocol (DAP) is a UART-based serial communication protocol that enables interaction between TI’s Edge AI Studio (the host) and supported devices.

Peripherals & Pin Assignments

When this project is built, the SysConfig tool generates the TI-Driver configurations into the ti_drivers_config.c and ti_drivers_config.h files and the TI-EdgeAI configuration into the ti_edgeai_config.c, ti_edgeai_config.h and ti_edgeai_fe_config.h files. Information on peripheral configuration, resources and parameters used is present in the generated files. The System Configuration file (*.syscfg) in the project may be opened with SysConfig’s graphical user interface to inspect the resources used.

BoosterPacks, Board Resources & Jumper Settings

For board specific jumper settings, resources and BoosterPack modifications, refer to the Board.html file.

Example Usage

  1. Hardware Setup

Important: Ensure the sensor supply does not exceed its rated voltage and that the digital ground and power are connected to the respective pins on the sensor.

  1. Connect the Launchpad to the XDS110 debug probe.

  2. Connect the XDS110 debug probe to the PC over USB.

The connection will have the following settings by default:

    Baud-rate:     115200
    Data bits:          8
    Stop bits:          1
    Parity:          None
    Flow Control:    None
  1. Build, load, and run the application on the device.

  2. Go to TI’s Edge AI Studio and open the fan blade fault detection example.

  3. Select the correct serial COM port and the default baudrate (115200), then connect to the device.

  4. Follow the steps defined by TI’s Edge AI Studio:

Software Details

Notes

References