7.7.5. Arc Fault Detection
Arc fault detection is one of the primary applications for Tiny ML Tensorlab. This example demonstrates detecting electrical arcs in DC power systems.
7.7.5.1. Overview
Task: Binary classification (Normal vs Arc)
Application: Solar inverters, battery systems, DC distribution
Dataset: Real current waveforms from arc fault experiments
Model: ArcFault_model_200_t (~200 parameters)
7.7.5.2. Why Arc Fault Detection?
Electrical arcs are dangerous:
Fire hazard in residential and commercial buildings
Equipment damage in industrial settings
Safety risk in electric vehicles and battery systems
Traditional protection (fuses, breakers) doesn’t detect arcs reliably. AI-based detection can identify arc signatures in current waveforms.
7.7.5.3. Running the Example
cd tinyml-modelzoo
./run_tinyml_modelzoo.sh examples/dc_arc_fault/config.yaml
cd tinyml-modelzoo
run_tinyml_modelzoo.bat examples\dc_arc_fault\config.yaml
7.7.5.4. Configuration
common:
target_module: 'timeseries'
task_type: 'generic_timeseries_classification'
target_device: 'F28P55'
run_name: '{date-time}/{model_name}'
dataset:
enable: True
dataset_name: 'dc_arc_fault_example_dsk'
input_data_path: 'https://software-dl.ti.com/C2000/esd/mcu_ai/01_03_00/datasets/dc_arc_fault_example_dsk.zip'
data_processing_feature_extraction:
feature_extraction_name: 'FFT1024Input_256Feature_1Frame_Full_Bandwidth'
variables: 1
training:
enable: True
model_name: 'ArcFault_model_200_t'
batch_size: 256
training_epochs: 20
testing:
enable: True
compilation:
enable: True
7.7.5.5. Dataset Description
The dataset contains current waveform samples:
Normal class: Regular DC current with minor noise
Arc class: Current during arc fault conditions
Data characteristics:
Single channel (current)
High sampling rate (captures arc frequency components)
Pre-processed and labeled
7.7.5.6. Feature Extraction
FFT1024Input_256Feature_1Frame_Full_Bandwidth applies:
1024-point FFT
Takes first 256 frequency bins (full bandwidth)
Single frame (no temporal concatenation)
This captures the frequency signature of arcs, which have distinct high-frequency components.
7.7.5.7. Available Models
Multiple arc fault models are available:
Model |
Parameters |
Description |
|---|---|---|
|
~200 |
Minimal, fast inference |
|
~400 |
Balanced |
|
~800 |
Higher accuracy |
|
~1,400 |
Maximum accuracy |
7.7.5.8. Expected Results
Typical results with default configuration:
Float32 Model:
Accuracy: 99%+
F1-Score: ~0.99
Quantized Model:
Accuracy: 98%+
7.7.5.9. Interpreting Results
After training, check these outputs:
ROC Curve (One_vs_Rest_MultiClass_ROC_test.png):
One-vs-Rest Multi-class ROC curves showing excellent class separation (AUC close to 1.0)
AUC should be close to 1.0
Shows trade-off between detection rate and false alarms
Class Score Histogram (Histogram_Class_Score_differences_test.png):
Distribution of class score differences showing clear separation between correct and incorrect predictions
Shows how confidently the model separates classes
Wide separation indicates robust classification
FPR/TPR CSV (fpr_tpr_thresholds.csv):
Use to select operating threshold for your application
Balance between catching arcs and avoiding false alarms
7.7.5.10. Deployment Considerations
For real-world deployment:
False Positive Rate
In safety applications, you may prefer:
Higher sensitivity (catch all arcs, accept some false alarms)
Or higher specificity (fewer false alarms, may miss subtle arcs)
Adjust the threshold in your device code accordingly.
Inference Latency
Arc detection needs to be fast:
F28P55 with NPU: ~100-200 µs
Sufficient for real-time protection
7.7.5.11. AC Arc Fault Detection
For AC systems, use the AC arc fault example:
./run_tinyml_modelzoo.sh examples/ac_arc_fault/config.yaml
AC arcs have different signatures due to the alternating current, requiring different feature extraction settings.
7.7.5.12. Next Steps
Deploy to device: NPU Device Deployment
Try with your data: Classification Dataset Format
Explore other examples: Motor Bearing Fault