---
title: "Motor-fault classifier"
description: "A 1D convolutional network that classifies demagnetization, eccentricity and inter-turn faults from simulated permanent-magnet motor stator current, running client-side in the browser through ONNX Runtime."
url: "https://emazaheri.com/lab/motor-fault"
runtime: "ONNX Runtime Web"
author: "Ehsan Mazaheri Tehrani"
---

# Motor-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.

## What it shows

An in-browser motor-fault classifier. A 1D CNN trained in PyTorch on simulated permanent-magnet stator current, exported to ONNX and run client-side, so nothing leaves the visitor's browser. The generator encodes real fault signatures: demagnetization at multiples of the rotor frequency, eccentricity sidebands at f0 +/- fr, and a raised third harmonic for inter-turn shorts. Source in lab/motor-fault.

The lab is interactive and has no Markdown equivalent. Open the page in a browser to run it.

## Other labs

- [Inverse PINN flux observer](https://emazaheri.com/lab/flux-observer): A physics-informed network is trained from scratch in your browser to find a motor's magnet strength from its terminals alone.
