From waveform to inspectable intervals

Partial-Discharge Detection & Segmentation

Two related but distinct tasks: classify short segments as partial discharge or noise, then segment long records into intervals of different discharge types and noise.

Period
Oct 2024 — Mar 2026
Focus
Industrial Machine Learning · Time-Series Classification · 1D Segmentation
Core stack
Python · PyTorch · FCN · CNN-BiLSTM

TL;DR

Problem
Short windows need a class and confidence; long records need start and end positions for every signal regime. Treating both as one classification problem loses the temporal boundaries engineers must review.
What I did
Implemented FCN and CNN-BiLSTM classification paths and an inference interface.
Result / limit
Delivered the classification interface to production and traced persistently near-uniform output probabilities to a unit/scale mismatch between customer signals and training data; segmentation and anomaly detection were implemented and deployed only in the test environment.
Published waveforms from four artificial defect types in XLPE cable experiments.
Public research figure, not project data: four defect configurations produce visibly different waveforms.

01 · A

Problem

Short windows need a class and confidence; long records need start and end positions for every signal regime. Treating both as one classification problem loses the temporal boundaries engineers must review.

01 · B

Context

At an anonymized industrial measurement technology company, expert labels from the annotation workflow fed model experiments. Deployment exposed a scale mismatch between laboratory-style inputs and customer measurements; the public account keeps the device and customer context private.

02

Why it matters

Internal, surface, corona and other discharge mechanisms do not look identical, and interference can imitate them. Persistent insulation degradation can progress toward breakdown or flashover; if an arc event develops, equipment outage, fire and severe personnel hazards become possible. The task is therefore not just pattern recognition—it is evidence preparation for safer engineering decisions.

Four artificial cable defect configurations: needle, surface, air-gap and floating discharge.
Different physical defect mechanisms produce different discharge patterns; one generic label is not enough for diagnosis.
Explore technical detailsWhat made it hard · System path · Key trade-offs
02 · B

What made it hard

  1. 01

    Input length varies between isolated events and long continuous records.

  2. 02

    Measurement units and scales can differ between laboratory and deployment data.

  3. 03

    Class imbalance and disputed boundaries affect both loss design and evaluation.

  4. 04

    Offline results do not establish cross-customer generalization.

03

My approach

System path

01

Classify events

FCN and CNN-BiLSTM paths assign signal type and confidence to short segments

02

Enforce the data contract

Inspect logits, then normalize units, scales, channels and label semantics before inference

03

Segment sequences

Configurable U-Time-style 1D models use Dice plus cross-entropy and optional wavelet channels

04

Explore anomalies

TCN autoencoding learns common noise and routes high-distance intervals to review

Illustrative waveform classification separating partial discharge candidates from noise.
Task 1 · Classification. Fixed-seed illustrative data shows the decision problem, not measured accuracy or project output.
Illustrative long signal divided into noise and several partial-discharge intervals.
Task 2 · Segmentation. The target is an interval map over a long record, including boundaries between discharge types and noise.

Two segmentation routes

The same timeline can be segmented from labels or from reconstruction surprise

U-Time learns an explicit class map from expert interval labels. TCNAE learns the structure of common noise without class labels and turns reconstruction deviations into candidates for review. They produce related timelines, but they do not make the same claim.

01Supervised · U-Time

Learn an interval class map from expert labels

Best suited when interval semantics are stable enough to supervise a dense one-dimensional segmentation model.

Supervision
Expert interval labels
Learns
Class boundaries and temporal context
Training signal
Dice loss + cross-entropy
Decision
Per-segment class probabilities
  1. 01
    Build aligned windows

    Slice long records while preserving the mapping between samples, segment labels and source coordinates.

  2. 02
    Create input channels

    Use the normalized waveform alone or add selected discrete-wavelet bands as synchronized channels.

  3. 03
    Encode at several scales

    Configurable 1D convolution and pooling stages enlarge context while reducing temporal resolution.

  4. 04
    Decode with skip connections

    Upsampling combines bottleneck context with encoder detail before the segment classifier.

  5. 05
    Train and validate boundaries

    Optimize Dice plus cross-entropy, schedule the learning rate, stop early and inspect interval overlap and boundary quality.

OUTPUTAn explicit noise / discharge-class interval map with probabilities at the chosen segmentation frequency.

BOUNDARYThe model inherits disputed labels and cannot prove cross-customer generalization from an offline split.

02Unsupervised · TCNAE

Learn common noise, then surface reconstruction anomalies

Useful when abnormal examples are scarce or their physical labels remain disputed, but common noise can be modeled.

Supervision
No class labels; common-noise assumption
Learns
Compressed representation of usual patterns
Training signal
Window reconstruction error
Decision
Score, threshold and interval post-processing
  1. 01
    Window and robustly scale

    Convert the signal contract, normalize by robust statistics and create overlapping windows whose target is the input itself.

  2. 02
    Encode with a TCN

    Dilated causal convolutions and residual blocks expand the receptive field without recurrent state.

  3. 03
    Compress the representation

    Concatenate multi-scale TCN features, project them and pool them into a lower-dimensional temporal code.

  4. 04
    Reconstruct and overlap-add

    Reverse-dilation decoder blocks rebuild each window; overlapping predictions are averaged back onto the source timeline.

  5. 05
    Score and return candidates

    Use reconstruction residuals as anomaly evidence, then threshold and merge candidate intervals before expert review.

OUTPUTAn anomaly-score timeline and candidate intervals—not an automatic physical discharge diagnosis.

BOUNDARYThis path computes residual and MSE diagnostics. I also used Mahalanobis scoring in deployment analysis; this case study focuses on the residual-based path.

The architecture explanation follows the U-Time and TCN-AE papers. I use those papers to explain the methods, without reusing their benchmark results as results from my project.

Short-window classification

From waveform samples to a class and confidence

The classifier path keeps feature extraction, variable-length aggregation and final evidence separate so deployment failures can be inspected layer by layer.

01input

Signal window

Normalized 1D samples

02local patterns

Conv features

FCN or CNN-BiLSTM representation

03fixed vector

Length aggregation

GAP/SPP variants explored

04diagnostic

Logits

Inspect absolute scale before softmax

05reviewable output

Class + confidence

PD candidate or noise

Near-zero logits pointed to an input contract problem rather than a softmax problem.

  • Python
  • PyTorch
  • FCN
  • CNN-BiLSTM
  • U-Time
  • Wavelets
  • IoU
  • TCN-AE

Key trade-offs

01

Fix the contract before the model

Near-zero logits exposed a silent unit/scale mismatch; the repair was to make input semantics explicit, not to tune the softmax.

02

Compare architecture choices under one task

I explored pooling and wavelet-channel variants as controlled model choices, without drawing conclusions from incomparable accuracy measurements.

03

Anomaly does not mean confirmed discharge

Unfamiliar patterns are routed to review rather than promoted directly to a physical diagnosis.

04 · A

My contribution

  • Implemented FCN and CNN-BiLSTM classification paths and an inference interface.
  • Diagnosed a unit/scale mismatch revealed during deployment and made the input contract explicit.
  • Implemented a U-Time-style supervised segmentation path with Dice plus cross-entropy, IoU-oriented evaluation and wavelet-channel experiments.
  • Built a TCN autoencoder reconstruction path that learns common noise patterns and returns high-error windows to expert review.

04 · B

What was implemented

  • Handled records of up to 560 million sample points; the annotation tool supports 1–8 signal pairs with a designed capacity of 4.48 billion sample points. Chunked access and downsampling produced a 70% performance improvement in profiling.
  • Quantized TCN-AE pre-screening left about 5% of each signal for manual correction and improved annotation efficiency by about 60%.
  • FCN and CNN-BiLSTM reached 98% accuracy on a balanced test set and 94%–96% on customer measurement data. Quantization cut model-level CPU inference time by 50% with no apparent loss of accuracy.
  • Delivered the classification interface to production and traced persistently near-uniform output probabilities to a unit/scale mismatch between customer signals and training data; segmentation and anomaly detection were implemented and deployed only in the test environment.
04 · C

Lessons learned

01

A sophisticated architecture cannot rescue an undefined measurement contract.

02

Boundary quality and abstention behavior matter as much as a headline class score in expert-facing systems.

What I can share

Raw customer data and customer or device context are not public; the figures and text here show aggregated metrics.

Public sources

Open-access study of four cable-defect waveforms https://www.mdpi.com/1996-1073/13/17/4566U-Time paper · NeurIPS 2019 https://proceedings.neurips.cc/paper_files/paper/2019/hash/57bafb2c2dfeefba931bb03a835b1fa9-Abstract.htmlTCN-AE anomaly-detection paper · Applied Soft Computing 2021 https://doi.org/10.1016/j.asoc.2021.107751OMICRON guide to partial-discharge measurements https://www.omicronenergy.com/uploads/tx_downloader/51c20/A_Guide_for_PD_Measurements_on_MV_and_HV_apparatus_-_Part1.pdfOSHA arc-flash hazard guidance https://www.osha.gov/sites/default/files/publications/OSHA4475.pdf