How the AI Works

1

Pipeline Overview

The preprocessing pipeline processes raw CSV telemetry data into clean, overlapping windows for the neural networks.

Input Channels

6 Features

We capture 3 phase currents (Ia, Ib, Ic) directly, and derive 3 phase voltages (va, vb, vc) from the duty cycles and DC bus voltage.

Windowing

200 Samples

Signals are sampled at 5,000 Hz. We extract 40ms windows (200 samples) with a 50% overlap (stride of 100) to ensure continuous monitoring.

Labeling

Fault Detection

Windows before the fault timestamp are strictly labeled "Healthy". Windows after are labeled with the specific fault type. Cross-boundary windows are discarded.

2

Data Augmentation

To make our models robust to real-world hardware variance, we augment the training data with hardware-realistic noise. We strictly isolate augmentations by split to prevent data leakage.

Techniques

  • Base Augmentations: Gaussian noise (3-5%), gain variation, and linear offset drift.
  • Advanced Probability: Random transient spikes, 3rd/5th harmonic distortions, and slight time warping.

Split Strategy

Training Set
10x Augmented
Validation Set
2x Light Noise
Test Set
0x (Original)
3

Model Architectures

MotorShield supports three deep learning models, balancing computational efficiency with long-range receptive fields.

Hybrid CNN–Transformer

~464k Parameters

Final

The ultimate architecture. A CNN stem rapidly downsamples the 200-sample window into 50 rich feature tokens, which are then processed by a 3-layer Transformer Encoder.

CNN Stem1D Conv k=7/5
Attention3 Layers, 4 Heads
PoolingConcat(Avg, Max)
Output4 Classes

Rendering Architecture Diagram...

Improved CNN

~2.1M Parameters

Uses deep residual connections (1D Convs) and channel attention to capture complex local patterns in multi-channel time-series data. It excels at extracting local feature signatures like sudden spikes or phase shifts.

Transformer

~0.4M Parameters

Applies multi-head self-attention directly across the time dimension. While slower on long sequences, it inherently models long-range dependencies and complex, non-periodic transients better than convolutions.

4

Trace a Prediction

Here's exactly what happens to a 40ms slice of motor data when it hits the Hybrid model.