Power-Grid Harmonic-Pattern Triage
4-channel ResonatorBank flags which harmonic-frequency band is dominant in a PMU stream — Outage / Nominal / 2nd / 3rd / 4th harmonic. 20 neurons in 3,800 bytes, designed for <$5-class embedded triage nodes mounted at distribution-transformer secondaries.
Validation status: synthetic 50 Hz frequency-pattern streams only. Real EPFL Smart-Grid PMU validation is planned. Hardware BOM, certification path and field-trial costs are pending and not part of this v0.1 release.
Triage, not metrology. Detects frequency-pattern signatures of harmonic-like events. Does not measure calibrated harmonic amplitudes, THD, phase, sag/swell or IEC 61000-4-30 Class-A power-quality quantities.
Key Metrics
Measured 2026-04-24 on synthetic 50 Hz PMU-style frequency streams spanning outage, healthy fundamental, 2nd / 3rd / 4th-harmonic distortion.
Classification Results
| Event | Frequency | TP | FP | Precision | Recall | F1 |
|---|---|---|---|---|---|---|
| Outage | — | 19 | 1 | 0.950 | 0.950 | 0.950 |
| Nominal | 50 Hz | 19 | 3 | 0.864 | 0.950 | 0.905 |
| 2nd Harmonic | 100 Hz | 17 | 3 | 0.850 | 0.850 | 0.850 |
| 3rd Harmonic | 150 Hz | 17 | 3 | 0.850 | 0.850 | 0.850 |
| 4th Harmonic | 200 Hz | 18 | 0 | 1.000 | 0.900 | 0.947 |
Real-World & Stress Tests
Factory Startup (3rd-harmonic VFD load)
Nominal grid → sudden 3rd-harmonic burst from a starting variable-frequency drive → recovery to nominal. The H3-window ratio scales linearly with disturbance length.
| Disturbance length | H3 windows | Total | H3 ratio |
|---|---|---|---|
| 200 steps | 4 | 30 | 13.3% |
| 400 steps | 8 | 30 | 26.7% |
| 600 steps | 12 | 30 | 40.0% |
| 800 steps | 16 | 30 | 53.3% |
| 1200 steps | 24 | 36 | 66.7% |
Rolling Brownouts (load-shedding cycles)
Each scheduled dip produces exactly one Outage window — clean separation from the nominal majority.
| Dips | Dip length | Outage windows | Nominal | Outage % |
|---|---|---|---|---|
| 2 | 60 | 2 | 38 | 5.0% |
| 4 | 80 | 4 | 36 | 10.0% |
| 6 | 100 | 6 | 34 | 15.0% |
| 10 | 120 | 10 | 30 | 25.0% |
Noise Resilience — synthetic random-spike transients only
| Synthetic noise % | Accuracy | Verdict |
|---|---|---|
| 0% | 100% | OK on synthetic random-spike noise |
| 10% | 100% | OK on synthetic random-spike noise |
| 30% | 100% | OK on synthetic random-spike noise |
| 50% | 98% | OK on synthetic random-spike noise |
These numbers characterise behaviour under synthetic random-spike noise only. Real PMU recordings additionally exhibit sustained broadband interference, DC-offset drift, and inter-harmonics — real-data validation pending.
Remaining Limitations
| Limitation | Status | Impact |
|---|---|---|
| Categorical, not precise | By design | 49.5-50.5 Hz all → Nominal. Use a PMU for ±0.005 Hz |
| No voltage / sag-swell | By design | Frequency-only input |
| No phase / sequence / unbalance | By design | Single-stream input |
| Single-label output | Mitigated v0.2 | step_multi() reports Fund + H3 simultaneously |
| Synthetic data only | Open | Real EPFL PMU validation pending |
How It Compares
CricketBrain is not a replacement for Class-A PQ analysers or PMUs. It targets the earlier layer in the measurement chain: cheap, always-on event triage before expensive measurement equipment is dispatched. Fluke 1770 / Schneider PowerLogic / Schweitzer SEL-487E remain the right tools for IEC-compliant amplitude, THD, sag/swell, phase and synchrophasor measurement — CricketBrain is the front-end that decides when those tools should look. The systems below do not perform the same task; the table is an operating-envelope indicator, not a head-to-head deployment-cost benchmark.
RAM, Latency & Tier
| System | RAM | Latency | Avg power @ 1 Hz | Tier indication |
|---|---|---|---|---|
| CricketBrain UC04 (event triage) | 3.7 KB | 0.13-0.34 µs/step | < 0.5 µW compute | <$5 embedded triage node (BOM TBD) |
| Classical FFT analyser (Cortex-M4 + DSP libs) | 64-256 KB | 1-5 ms | ~500 µW | Substation gateway, $50-100 board |
| TinyML PQ classifier (CNN, MFCC) | 20-100 KB | 50-200 ms | 5-30 mW | Cortex-M4F+/M7 module, $50-500 |
| Commercial PQM (Schneider PowerLogic, Fluke 1770) | MB-class Linux | 50-200 ms | 5-10 W mains | IEC-Class-A measurement, $2 k-5 k |
| PMU (Schweitzer / GE / ABB, IEEE C37.118) | 1-4 MB | 20 ms | 10-20 W mains | ±0.005 Hz synchrophasor, $10 k+ |
List-price bands and power figures are order-of-magnitude tier indicators from vendor datasheets, not a one-to-one head-to-head benchmark. The other systems are full instruments with sensor chains, certification and data-logging built in — CricketBrain is the compute core only. Per-deployment economics depend on hardware BOM, certification, sensors, network and labour costs that are out of scope for this v0.1 release.
When to Pick Which
| Scenario | Recommendation |
|---|---|
| Wide-deployment edge sensor on every distribution transformer | CricketBrain |
| Substation-class harmonic-amplitude analysis (50+ lines) | Classical FFT analyser |
| IEC 61000-4-30 Class A compliance + sag/swell + voltage | Schneider PowerLogic / Fluke 1770 |
| ±0.005 Hz precision, IEEE C37.118 (PMU class) | Schweitzer / GE / ABB PMU |
Full sourced breakdown: docs/competitive_analysis.md.
Dataset & License
| Field | Value |
|---|---|
| Dataset | EPFL Smart-Grid Distribution Test Network |
| License | CC BY 4.0 |
| URL | epfl.ch/labs/desl-pwrs/smart-grid/ |
| Equipment | OpenPMU + EPFL synchrophasor units |
| Sampling | 50 frame/s synchrophasor + 50 kHz aux waveform |
Quick Start
cd use_cases/04_power_grid
cargo run --release # Synthetic demo
cargo run --release -- --factory # Factory-startup transient
cargo run --release -- --brownout # Rolling brownout
cargo run --release -- --csv data/processed/sample_grid.csv # CSV mode
cargo run --release --example grid_sdt # SDT benchmark
cargo run --release --example grid_stress # Stress test