7.9.5. DC Arc Fault Detection
DC arc fault detection is one of the main applications of Tiny ML ModelZoo. The example folder
examples/dc_arc_fault contains six configurations: two supervised classification
variants (DSK and DSI datasets), a bring-your-own-model variant, an on-device learning variant, and
two anomaly detection variants.
Example folder: examples/dc_arc_fault
(GitHub).
For AC arc faults on MSPM0, see AC Arc Fault.
7.9.5.1. Overview
Task: binary classification (normal vs. arc),
task_type: arc_fault; anomaly detection variants usegeneric_timeseries_anomalydetectionApplication: solar inverters, battery systems, DC distribution
Datasets: real current waveforms from arc fault experiments (DSK and DSI captures)
Default device: F28P55 (NPU)
7.9.5.2. Why Arc Fault Detection?
Electrical arcs are a fire hazard in buildings, damage equipment in industrial settings and are a safety risk in battery systems. Fuses and breakers do not detect low-level arcs reliably, whereas an AI model can learn the arc signature in the current waveform.
7.9.5.3. Available Configurations
Config file |
Device |
Model |
Notes |
|---|---|---|---|
|
F28P55 |
|
DSK dataset |
|
F28P55 |
|
DSI dataset |
|
F28P55 |
|
Same as |
|
AM13E2 |
|
DSI data with on-device training enabled ( |
|
F28P55 |
|
Anomaly detection on DSI data ( |
|
F28P55 |
|
Anomaly detection on DSK data ( |
Datasets are downloaded automatically from https://software-dl.ti.com/C2000/esd/mcu_ai/datasets/
(for example arc_fault_classification_dsi.zip, arc_fault_dsi_anomaly_detection.zip,
arc_fault_dsk_anomaly_detection.zip). The DSK classification dataset is resolved from its dataset name.
7.9.5.4. Running the Example
Install Tiny ML ModelZoo first (Installation, Quickstart), then run from
the tinyml-modelzoo folder:
./run_tinyml_modelzoo.sh examples/dc_arc_fault/config_dsk.yaml
See Running Examples for all launchers, for example:
run_tinyml_modelzoo.bat examples\dc_arc_fault\config_dsk.yaml
Replace config_dsk.yaml with any config from the table above.
7.9.5.5. Configuration (config_dsk.yaml)
common:
task_type: arc_fault
target_device: F28P55
dataset:
dataset_name: dc_arc_fault_example_dsk
data_processing_feature_extraction:
feature_extraction_name: FFT1024Input_256Feature_1Frame_Full_Bandwidth
variables: 1
training:
model_name: CLS_1k_NPU
batch_size: 32
training_epochs: 10
num_gpus: 0
early_stopping: true
early_stopping_patience: 5
testing: {}
compilation: {}
FFT1024Input_256Feature_1Frame_Full_Bandwidth takes a 1024-sample frame, computes the FFT and keeps
256 frequency features of one frame (no temporal concatenation). This captures the high-frequency
signature of arcs.
7.9.5.6. Configuration for the DSI Dataset
The DSI captures are sampled at 313 kHz, so the config downsamples them and windows the signal instead of using a feature extraction preset:
data_processing_feature_extraction:
data_proc_transforms: [Downsample, SimpleWindow]
gain_variations:
arc: [0.9, 1.1]
normal: [0.8, 1.2]
sampling_rate: 313000
new_sr: 3130
frame_size: 256
stride_size: 0.01
variables: 1
training:
model_name: CLS_13k_NPU
batch_size: 2048
training_epochs: 10
7.9.5.7. Available Models
Any enabled classification model can be used. Commonly used choices:
Model |
Approx. parameters |
Description |
|---|---|---|
|
500 |
Small, NPU-optimized |
|
1,000 |
Baseline NPU model (default for the DSK config) |
|
2,000 |
Medium NPU model |
|
4,000 |
Larger NPU model |
|
13,000 |
Used for the DSI config |
|
200 to 1,400 |
Arc fault specific models (also enabled in 1.5.0) |
7.9.5.8. Results from the 1.5.0 Test Run
The following values come from the automated 1.5.0 config test logs (runs of each config with default settings, device F28P55 unless noted). They illustrate what to expect; your numbers will vary with the data split and random seed.
Config |
Test accuracy |
AUC ROC |
|---|---|---|
|
100.00% |
1.000 |
|
94.98% |
0.976 |
|
85.13% |
0.960 |
|
F1 score 100.00% |
not applicable |
Note
In the same test run, config_anomaly_detection_dsk.yaml failed during quantization-aware training
(a per-channel fake-quantize error), so no result is reported for it. Treat that config as not yet working.
7.9.5.9. Interpreting Results
After training, check these outputs in the run folder (see Understanding the Run Output).
The figures below are examples from the 1.4.0 version of this page and are shown for illustration only.
ROC curve (One_vs_Rest_MultiClass_ROC_test.png): the AUC should be close to 1.0.
One-vs-rest multi-class ROC curves
Class score histogram (Histogram_Class_Score_differences_test.png): wide separation indicates a
robust classifier.
Distribution of class score differences
FPR/TPR CSV (fpr_tpr_thresholds.csv): use it to choose the operating threshold, balancing arc
detection against false alarms.
7.9.5.10. Deployment Considerations
In safety applications choose the threshold according to whether you prefer sensitivity (catch every arc, accept false alarms) or specificity (fewer false alarms, may miss subtle arcs).
Bring your own model: Bring Your Own Model (BYOM).
Deploy the compiled artifacts into an SDK example: Deploying a ModelZoo Run to an SDK Example (Golden-Vector Check) (see also NPU Device Deployment).
7.9.5.11. Next Steps
Try your own data: Classification Dataset Format
AC arc faults on MSPM0G5187: AC Arc Fault
Another example: Motor Bearing Fault