Skip to content
Ehsan Mazaheri Tehrani
All labs

CH4Motor-fault classifier

A motor-fault classifier, running in this tab.

Simulated stator current for a permanent magnet motor, with the fault signatures from my dissertation baked into the physics. A small 1D CNN trained in PyTorch runs here through ONNX Runtime. Change the condition and watch the spectrum and the prediction move.

Condition
Fundamental plus the usual and saturation harmonics.
Fault severity0.70
Supply frequency50 Hz
Load90%
Noise25 dB SNR
Inside the motor

An even gap. A balanced field.

01 / Motor cross-section

02 / Balanced magnetic poles

The rotor stays centered, the magnets keep their strength, and each winding carries current through its full set of turns.

Motion slowed for clarity · Geometry exaggerated

Stator current, phase A, multiples of RMSfirst 128 of 2048 samples · 1.64 s at 1.25 kHz

One phase of the current the motor draws. Every window is divided by its own RMS before the model sees it, so the axis is multiples of that rather than amperes: a fault has to show in the shape, not in how hard the motor is working.

Spectrum, 0 to 450 Hz, dBsupply 50 Hzrotor 12.5 Hz

The same current as a spectrum, in decibels below its largest peak. Dashed lines mark the frequencies each condition is known to leave a trace at, and the ones belonging to the selected condition are drawn up. That is where the model learned to look, and where you can check it.

Model outputloading ONNX runtime
  1. Healthytrue
    0%
  2. Demagnetization
    0%
  3. Eccentricity
    0%
  4. Inter-turn short
    0%

Generator, training script and export in lab/motor-fault. Nothing leaves your browser.

The other lab

Trains in your browserWeb Worker
Replay of the reference run, window 120, from a deliberately wrong start.

Inverse PINN flux observer

A physics-informed network is trained from scratch in your browser to find a motor's magnet strength from its terminals alone.

Open the lab

Added Sep 2026