7.9.9. Fan Blade Fault Classification

Detect faults in BLDC fans from 3-axis accelerometer data, from data collection to deployment on a C2000 device. This is a full application example: it covers data capture with the Edge AI Studio Model Composer, training with Tiny ML ModelZoo, and live preview on the F28P55x LaunchPad.

Example folder: examples/fan_blade_fault_classification (GitHub)

7.9.9.1. Overview

  • Task: classification of 4 conditions (task_type: motor_fault); an anomaly detection variant is also provided

  • Sensor: ADXL355-PMDZ accelerometer (X, Y, Z), 3 variables, default 4 kHz sampling in the capture firmware

  • Dataset: fan_blade_fault from https://software-dl.ti.com/C2000/esd/mcu_ai/datasets/fan_blade_fault_dsi.zip

  • Model: CLS_4k_NPU for the main configs

  • Primary device: F28P55

7.9.9.2. Demo Setup

Fan blade fault demo setup

Hardware setup for the fan blade fault demo

7.9.9.3. Fault Types

Normal operation

Normal: fan running without faults

Blade damage

Blade damage: physical damage to the fan blades

Blade imbalance

Blade imbalance: uneven weight distribution

Blade obstruction

Blade obstruction: foreign object interfering with the blade

7.9.9.4. Available Configurations

Config file

Device

Model

Notes

config.yaml

F28P55

CLS_4k_NPU

classification

config_CC1312.yaml, config_CC1314.yaml, config_CC1352.yaml, config_CC1354.yaml, config_CC2755.yaml, config_CC35X1.yaml

CC1312, CC1314, CC1352, CC1354, CC2755, CC35X1

CLS_4k_NPU

classification, same dataset and preset

config_MSPM0.yaml

MSPM0G5187

CLS_1k_NPU

dataset fan_blower_imbalance_dataset, preset MotorFault_256Input_FE_RFFT_16Feature_8Frame_3InputChannel_removeDC_2D1, QAT with 4-bit weights

config_anomaly_detection.yaml

F28P55

AD_17k

autoencoder, dataset fan_blade_ad_dataset.zip, 200 epochs

fan_blade_anomaly_detection_ondevice_training.yaml

F29H85

Ondevice_Trainable_AD_Linear

anomaly detection with on-device training; see On-Device Training — Overview

7.9.9.5. Running the Example

Install Tiny ML ModelZoo first (Installation, Quickstart), then run from the tinyml-modelzoo folder:

./run_tinyml_modelzoo.sh examples/fan_blade_fault_classification/config.yaml

7.9.9.6. Configuration (config.yaml)

common:
  task_type: motor_fault
  target_device: F28P55
dataset:
  dataset_name: fan_blade_fault
  input_data_path: https://software-dl.ti.com/C2000/esd/mcu_ai/datasets/fan_blade_fault_dsi.zip
data_processing_feature_extraction:
  data_proc_transforms: []
  feature_extraction_name: Input256_FFTBIN_16Feature_8Frame_3InputChannel_removeDC_2D1
  variables: 3
training:
  model_name: CLS_4k_NPU
  batch_size: 256
  training_epochs: 20
testing: {}
compilation: {}

7.9.9.7. Collecting Your Own Data

The example readme.md describes the full data capture flow:

  1. Connect the ADXL355-PMDZ accelerometer to the F28P55 LaunchPad over SPI (chip select, MOSI, MISO, SCLK, data ready, ground and 3.3 V). The pin table and pinout pictures are in the example folder’s readme.md.

  2. Load eAI_data_acq_dap_f28p55x.zip (in examples/fan_blade_fault_classification/assets) from CCS onto the LaunchPad.

  3. In Edge AI Studio Model Composer, select the serial port, choose Capture & Display Live Data, sensor Vibration, and capture each condition.

  4. Train with Model Composer or with the config above.

See also Edge AI Studio Model Composer and Classification Dataset Format.

7.9.9.8. Results

The example readme.md states that config.yaml should give 100% accuracy. In the automated 1.5.0 config test run, every classification config reached a test accuracy of 100.00% (AUC ROC 1.000): F28P55, CC1312, CC1314, CC1352, CC1354, CC2755, CC35X1 (CLS_4k_NPU, 3,842 parameters) and MSPM0G5187 (CLS_1k_NPU, 994 parameters). The figures below are illustrative examples from the 1.4.0 version of this page.

ROC curve

One-vs-rest ROC curves

Class score histogram

Class score differences between class pairs

PCA of extracted features

PCA of the extracted training features: clear cluster separation shows the classes are separable with this preset

7.9.9.9. Deploying and Live Preview

The compiled model is written to .../compilation/artifacts in the run folder, and feature extraction golden vectors to .../training/quantization/golden_vectors. Integrate them into a CCS project as described in Deploying a ModelZoo Run to an SDK Example (Golden-Vector Check). A single-sensor live preview project (eAI_mfd_eval_f28p55x.zip) is included in the example’s assets folder.

7.9.9.10. Anomaly Detection Variant

config_anomaly_detection.yaml trains an AD_17k autoencoder on normal data only (100 normal files); the 187 anomaly files (imbalance, damage, obstruction) are used only for testing. The example’s readme_anomaly_detection.md reports, at threshold mean + 4.0 * std (28.18): false positive rate 0.15%, recall 100%, precision 99.98% and F1 99.99%. In the 1.5.0 test run this config produced an F1 score of 99.99%, and the on-device training config an F1 score of 99.79%.

Reconstruction error

Reconstruction error for normal vs. fault data (illustrative, from 1.4.0)

7.9.9.11. See Also