Skip to main content

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.

View Source All Use Cases

Key Metrics

Measured 2026-04-24 on synthetic 50 Hz PMU-style frequency streams spanning outage, healthy fundamental, 2nd / 3rd / 4th-harmonic distortion.

90.0%
Synthetic-window accuracy (200 windows)
6.18
d' Sensitivity (SDT, log-linear)
0.900
Macro F1 Score
3,800
Bytes RAM (20 neurons)
0.23
µs / step (avg)
5
Event Classes

Classification Results

EventFrequencyTPFPPrecisionRecallF1
Outage1910.9500.9500.950
Nominal50 Hz1930.8640.9500.905
2nd Harmonic100 Hz1730.8500.8500.850
3rd Harmonic150 Hz1730.8500.8500.850
4th Harmonic200 Hz1801.0000.9000.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 lengthH3 windowsTotalH3 ratio
200 steps43013.3%
400 steps83026.7%
600 steps123040.0%
800 steps163053.3%
1200 steps243666.7%

Rolling Brownouts (load-shedding cycles)

Each scheduled dip produces exactly one Outage window — clean separation from the nominal majority.

DipsDip lengthOutage windowsNominalOutage %
2602385.0%
48043610.0%
610063415.0%
10120103025.0%

Noise Resilience — synthetic random-spike transients only

Synthetic noise %AccuracyVerdict
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

LimitationStatusImpact
Categorical, not preciseBy design49.5-50.5 Hz all → Nominal. Use a PMU for ±0.005 Hz
No voltage / sag-swellBy designFrequency-only input
No phase / sequence / unbalanceBy designSingle-stream input
Single-label outputMitigated v0.2step_multi() reports Fund + H3 simultaneously
Synthetic data onlyOpenReal 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

SystemRAMLatencyAvg power @ 1 HzTier indication
CricketBrain UC04 (event triage)3.7 KB0.13-0.34 µs/step< 0.5 µW compute<$5 embedded triage node (BOM TBD)
Classical FFT analyser (Cortex-M4 + DSP libs)64-256 KB1-5 ms~500 µWSubstation gateway, $50-100 board
TinyML PQ classifier (CNN, MFCC)20-100 KB50-200 ms5-30 mWCortex-M4F+/M7 module, $50-500
Commercial PQM (Schneider PowerLogic, Fluke 1770)MB-class Linux50-200 ms5-10 W mainsIEC-Class-A measurement, $2 k-5 k
PMU (Schweitzer / GE / ABB, IEEE C37.118)1-4 MB20 ms10-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

ScenarioRecommendation
Wide-deployment edge sensor on every distribution transformerCricketBrain
Substation-class harmonic-amplitude analysis (50+ lines)Classical FFT analyser
IEC 61000-4-30 Class A compliance + sag/swell + voltageSchneider 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

FieldValue
DatasetEPFL Smart-Grid Distribution Test Network
LicenseCC BY 4.0
URLepfl.ch/labs/desl-pwrs/smart-grid/
EquipmentOpenPMU + EPFL synchrophasor units
Sampling50 frame/s synchrophasor + 50 kHz aux waveform
License: CricketBrain source is AGPL-3.0. Commercial use requires paid license (details). EPFL data is CC BY 4.0 — attribution required.

Quick Start

Terminal
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