Self-contained deployment package for External Short Circuit (ESC) fault detection.
Classification: 97.85% (91/93) | Fault Localization: 98.6% (70/71)
BABY/
├── esc_full_detector.py # MAIN — Full detection pipeline (classify + localize)
├── features.py # 70-feature extraction (9 groups)
├── best_model.pkl # Trained ExtraTrees model + scaler + top26
│
├── train_and_save.py # Training code (ExtraTrees + feature selection)
├── generator_v3.py # Synthetic data generator V3 (domain-aware)
├── generator_original.py # Original synthetic data generator
│
├── plot_sci_figures.py # SCI Fig 1-6: Classification & Feature Analysis
├── plot_detection_sci.py # SCI Fig D1-D6: Detection & Localization
│
├── detection_report.csv # Full 93-file results (class + fault time)
├── detector_legacy.py # Legacy simple detector (A311 reference)
│
├── syn_features.npz # Synthetic features V1
├── syn_features_v5.npz # Synthetic features V5
├── real_features.npz # Real 93-file features
│
├── figures/ # Generated SCI figures (PDF + PNG, 300 DPI)
│ ├── fig1_confusion_matrix.*
│ ├── fig2_tsne.*
│ ├── fig3_feature_importance.*
│ ├── fig4_per_class_accuracy.*
│ ├── fig5_voltage_profiles.*
│ ├── fig6_feature_selection.*
│ ├── fig_d1_cusum_demo.*
│ ├── fig_d2_delay_distribution.*
│ ├── fig_d3_vdrop_vs_resistance.*
│ ├── fig_d4_dt10ohm_showcase.*
│ ├── fig_d5_performance_summary.*
│ └── fig_d6_timeline_overview.*
│
└── figures_a311/ # Original A311 figures (backup)
cd BABY
python esc_full_detector.py /root/autodl-tmp/real_fault_data_labeledpython esc_full_detector.py /path/to/some_file.csvpython plot_sci_figures.py # Classification figures (Fig 1-6)
python plot_detection_sci.py # Detection figures (Fig D1-D6)- Model: ExtraTrees (n=1000, max_depth=12) + StandardScaler
- Features: 70 statistical features → Top-26 via MI/KS domain-invariant selection
- Training: Synthetic data (physics-based generator) → real data transfer
- Bias Correction: c3_bias=0.165 for class 3 (0.1Ω)
- Algorithm: Page's CUSUM (1954) on causal dV/dt
- Signal processing: EMA(2s) → dV/dt(1s step) → CUSUM negative shift
- DT protocol: ref=t[20,35]s, search from t≥40s, confirm ≥2mV/30s
- GZ protocol: ref=t[10,25]s, search from t≥27s, confirm ≥10mV/20s
| Metric | Value |
|---|---|
| Classification Accuracy | 97.85% (91/93) |
| Fault Localization Rate | 98.6% (70/71) |
| DT 10Ω Detection | 21/21 (100%) |
| DT 0.01-1Ω Detection | 9/9 (100%) |
| GZ Detection | 40/41 (97.6%) |
| Normal False Alarm | 1/22 (4.5%) |
numpy, pandas, scikit-learn, joblib, matplotlib, scipy