Motor Current Signature Analysis
v0.2.1MCP server for Motor Current Signature Analysis — fault detection in electric motors
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
calculate_motor_params
Calculate motor operating parameters from nameplate and measured data. Computes synchronous speed, slip, rotor frequency, and slip frequency. These parameters are required inputs for fault frequency calculations.
| Parameter | Type | Description |
|---|---|---|
poles * | integer | Number of magnetic poles (even, ≥ 2) |
rotor_speed_rpm * | number | Measured rotor speed in RPM |
supply_freq_hz * | number | Supply (line) frequency in Hz, e.g. 50 or 60 |
compute_fault_frequencies
Calculate expected fault frequencies for common induction-motor faults. Computes characteristic frequencies for broken rotor bars, eccentricity, stator faults, and mixed eccentricity based on motor operating parameters. Use these frequencies to know WHERE to look in the current spectrum.
| Parameter | Type | Description |
|---|---|---|
poles * | integer | Number of magnetic poles |
rotor_speed_rpm * | number | Rotor speed in RPM |
supply_freq_hz * | number | Supply frequency in Hz |
harmonics | integer | Number of harmonic orders to compute |
compute_bearing_frequencies
Calculate bearing characteristic defect frequencies (BPFO, BPFI, BSF, FTF). Returns normalised frequencies (multiples of shaft speed) and, if shaft speed is provided, absolute frequencies in Hz. If supply frequency is also given, computes expected stator-current sidebands.
| Parameter | Type | Description |
|---|---|---|
ball_dia_mm * | number | Ball (roller) diameter in mm |
n_balls * | integer | Number of rolling elements in the bearing |
pitch_dia_mm * | number | Pitch (cage) diameter in mm |
contact_angle_deg | number | Contact angle in degrees |
shaft_speed_rpm | number | Shaft speed in RPM (optional, for absolute Hz) |
supply_freq_hz | number | Supply frequency in Hz (optional, for current sidebands) |
preprocess_signal
Preprocess a stator-current signal for spectral analysis. Applies (in order): DC offset removal → notch filtering → bandpass filtering → normalisation → windowing. Returns the preprocessed signal.
| Parameter | Type | Description |
|---|---|---|
sampling_freq_hz * | number | Sampling frequency in Hz |
signal * | array | Raw current signal as a list of amplitude values |
bandpass_high_hz | Upper bandpass cutoff in Hz (optional) | |
bandpass_low_hz | Lower bandpass cutoff in Hz (optional) | |
nominal_current | Nominal current for normalisation (A). Omit for RMS normalisation | |
notch_freqs_hz | Frequencies to notch-filter (optional) | |
window | string | Window function: hann, hamming, blackman, flattop, rectangular |
compute_spectrum
Compute the single-sided amplitude spectrum (FFT) of a current signal. Returns a spectrum_id referencing the stored spectrum, plus a compact summary with top peaks. Use spectrum_id in downstream fault-detection tools.
| Parameter | Type | Description |
|---|---|---|
max_freq_hz | Maximum frequency to return (Hz). Omit for full range | |
n_fft | FFT length (zero-padding). Omit for auto | |
sampling_freq_hz | Sampling frequency in Hz. Auto-resolved when using signal_id. | |
signal | Time-domain signal array. Use signal_id instead for large signals. | |
signal_id | ID of a stored signal. Preferred over raw array. |
compute_power_spectral_density
Compute Power Spectral Density using Welch's method. Better for noisy signals and trend analysis than a raw FFT. Returns a spectrum_id plus compact summary.
| Parameter | Type | Description |
|---|---|---|
max_freq_hz | Maximum frequency to return (Hz) | |
nperseg | FFT segment length. Omit for auto | |
sampling_freq_hz | Sampling frequency in Hz. Auto-resolved when using signal_id. | |
signal | Time-domain signal array. Use signal_id instead. | |
signal_id | ID of a stored signal. Preferred over raw array. |
find_spectrum_peaks
Detect peaks in a frequency spectrum. Returns a list of peaks sorted by amplitude (highest first) with frequency, amplitude, and prominence values.
| Parameter | Type | Description |
|---|---|---|
amplitudes | Amplitude or PSD values. Use spectrum_id instead. | |
freq_high_hz | Upper frequency bound for search | |
freq_low_hz | Lower frequency bound for search | |
frequencies_hz | Frequency axis from spectrum/PSD. Use spectrum_id instead. | |
max_peaks | integer | Maximum number of peaks to return |
min_distance_hz | Min distance between peaks in Hz | |
min_height | Minimum peak height | |
min_prominence | Minimum peak prominence | |
spectrum_id | ID of a stored spectrum (from compute_spectrum or compute_power_spectral_density). Preferred over raw arrays. |
detect_broken_rotor_bars
Detect broken rotor bar faults from current spectrum. Computes the BRB fault index by measuring sidebands at (1 ± 2s)·f_s relative to the fundamental. Returns severity classification: healthy / incipient / moderate / severe.
| Parameter | Type | Description |
|---|---|---|
amplitudes | Spectrum amplitude values. Use spectrum_id instead. | |
frequencies_hz | Spectrum frequency axis (Hz). Use spectrum_id instead. | |
poles | integer | Number of poles |
rotor_speed_rpm | number | Rotor speed in RPM |
spectrum_id | ID of a stored spectrum (from compute_spectrum). Preferred over raw arrays. | |
supply_freq_hz | number | Supply frequency in Hz |
tolerance_hz | number | Frequency search tolerance in Hz |
detect_eccentricity
Detect air-gap eccentricity faults from current spectrum. Analyses sidebands at f_s ± k·f_r for static and dynamic eccentricity. Returns severity classification.
| Parameter | Type | Description |
|---|---|---|
amplitudes | Spectrum amplitude values. Use spectrum_id instead. | |
frequencies_hz | Spectrum frequency axis (Hz). Use spectrum_id instead. | |
harmonics | integer | Number of harmonic orders to check |
poles | integer | Number of poles |
rotor_speed_rpm | number | Rotor speed in RPM |
spectrum_id | ID of a stored spectrum. Preferred over raw arrays. | |
supply_freq_hz | number | Supply frequency in Hz |
tolerance_hz | number | Frequency search tolerance in Hz |
detect_stator_faults
Detect stator inter-turn short circuit faults from current spectrum. Analyses sidebands at f_s ± 2k·f_r caused by stator winding asymmetry.
| Parameter | Type | Description |
|---|---|---|
amplitudes | Spectrum amplitude values. Use spectrum_id instead. | |
frequencies_hz | Spectrum frequency axis (Hz). Use spectrum_id instead. | |
harmonics | integer | Number of harmonic orders |
poles | integer | Number of poles |
rotor_speed_rpm | number | Rotor speed in RPM |
spectrum_id | ID of a stored spectrum. Preferred over raw arrays. | |
supply_freq_hz | number | Supply frequency in Hz |
tolerance_hz | number | Frequency search tolerance in Hz |
detect_bearing_faults
Detect bearing defect signatures in the stator-current spectrum. Bearing faults modulate motor torque, creating sidebands at f_s ± k·f_defect. Note: bearing signatures in current are typically weak; envelope analysis or vibration data can improve detection.
| Parameter | Type | Description |
|---|---|---|
amplitudes | Spectrum amplitude values. Use spectrum_id instead. | |
bearing_defect_freq_hz | number | Bearing characteristic defect frequency in Hz (BPFO, BPFI, BSF, or FTF) |
defect_type | string | Defect type label: bpfo, bpfi, bsf, or ftf |
frequencies_hz | Spectrum frequency axis (Hz). Use spectrum_id instead. | |
harmonics | integer | Number of sideband orders |
spectrum_id | ID of a stored spectrum. Preferred over raw arrays. | |
supply_freq_hz | number | Supply frequency in Hz |
tolerance_hz | number | Frequency search tolerance in Hz |
compute_envelope_spectrum
Compute the envelope spectrum of a current signal. Uses the Hilbert transform to extract the amplitude envelope, then computes its FFT. Useful for detecting bearing and mechanical faults that modulate the current at low frequencies.
| Parameter | Type | Description |
|---|---|---|
bandpass_high_hz | Upper bandpass cutoff before envelope (optional) | |
bandpass_low_hz | Lower bandpass cutoff before envelope (optional) | |
max_freq_hz | Max frequency to return (Hz) | |
sampling_freq_hz | Sampling frequency in Hz. Auto-resolved when using signal_id. | |
signal | Time-domain current signal. Use signal_id instead. | |
signal_id | ID of a stored signal. Preferred over raw array. |
compute_band_energy
Compute the integrated spectral energy in a frequency band. Useful as a generic fault/cavitation indicator — measures the energy concentration around a characteristic frequency in the PSD.
| Parameter | Type | Description |
|---|---|---|
centre_freq_hz * | number | Centre of the frequency band (Hz) |
bandwidth_hz | number | Total bandwidth for energy integration (Hz) |
frequencies_hz | PSD frequency axis (Hz). Use spectrum_id instead. | |
psd_values | PSD values. Use spectrum_id instead. | |
spectrum_id | ID of a stored PSD spectrum. Preferred over raw arrays. |
compute_time_frequency
Compute Short-Time Fourier Transform (STFT) for time-frequency analysis. For non-stationary conditions (variable speed/load, start-up transients). If target_freq_hz is provided, also tracks that frequency's amplitude over time. Returns a summary (not the full 2D matrix) to keep output manageable.
| Parameter | Type | Description |
|---|---|---|
nperseg | integer | Window length per segment (samples) |
sampling_freq_hz | Sampling frequency in Hz. Auto-resolved when using signal_id. | |
signal | Time-domain current signal. Use signal_id instead. | |
signal_id | ID of a stored signal. Preferred over raw array. | |
target_freq_hz | Frequency to track over time (Hz). If provided, returns amplitude vs time for that frequency | |
tolerance_hz | number | Tolerance for frequency tracking (Hz) |
inspect_signal_file
Inspect a signal file without fully loading it. Returns file metadata: size, format details, estimated number of samples, sampling frequency (for WAV), column headers (for CSV), and array shape (for NPY). Use this before load_signal_from_file to verify the file format and plan the loading parameters.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Absolute path to the signal file (CSV, WAV, or NPY) |
load_signal_from_file
Load a motor-current signal from a file (CSV, WAV, or NumPy NPY). Supports the most common formats used by industrial DAQ systems: - **CSV/TSV/TXT**: Columnar data with optional time column. The sampling frequency is inferred from the time column or must be provided explicitly. - **WAV**: Audio files from portable recorders or DAQ. Sampling frequency is read from the WAV header. - **NPY**: NumPy binary arrays. Sampling frequency must be provided. Returns the signal, sampling frequency, number of samples, duration, and file metadata. The returned sig…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Absolute path to the signal file (CSV, WAV, or NPY) |
channel | integer | WAV channel index (0-based) for multi-channel files |
delimiter | CSV delimiter. Auto-detected if null (comma for .csv, tab for .tsv/.txt) | |
max_rows | Max data rows to read from CSV (null = all) | |
sampling_freq_hz | Sampling frequency in Hz. Required for NPY; optional for CSV if a time column exists; auto-detected for WAV | |
signal_column | CSV column containing the current signal (0-based index or header name) | |
skip_header | integer | Number of CSV header rows to skip |
time_column | CSV column for time (index or name). Set to null if no time column |
generate_test_current_signal
Generate a synthetic motor-current test signal. Creates a simulated stator-current waveform with the fundamental, supply harmonics, noise, and optional fault signatures. Useful for testing, validation, and demonstration of MCSA analysis tools.
| Parameter | Type | Description |
|---|---|---|
duration_s | number | Signal duration in seconds |
fault_severity | number | Fault component amplitude (0-1 relative) |
faults | Faults to inject: 'brb', 'eccentricity', 'bearing'. Omit for healthy signal | |
noise_level | number | Noise standard deviation (0-1 relative) |
poles | integer | Number of poles |
rotor_speed_rpm | number | Rotor speed in RPM |
sampling_freq_hz | number | Sampling frequency in Hz |
supply_freq_hz | number | Supply frequency in Hz |
run_full_diagnosis
Run a comprehensive MCSA diagnostic analysis on a current signal. Performs the full pipeline: preprocessing → spectrum → fault detection for broken rotor bars, eccentricity, stator faults, and optionally bearing defects. Returns a complete diagnostic report.
| Parameter | Type | Description |
|---|---|---|
bearing_defect_freq_hz | Bearing defect frequency in Hz (optional, for bearing analysis) | |
poles | integer | Number of poles |
rotor_speed_rpm | number | Rotor speed in RPM |
sampling_freq_hz | Sampling frequency in Hz. Auto-resolved when using signal_id. | |
signal | Raw time-domain current signal. Use signal_id instead for large signals. | |
signal_id | ID of a stored signal (from generate_test_current_signal or load_signal_from_file). Preferred over raw array. | |
supply_freq_hz | number | Supply frequency in Hz |
tolerance_hz | number | Frequency search tolerance in Hz |
diagnose_from_file
Load a signal from file and run the full MCSA diagnostic pipeline. One-shot tool: reads the signal file, preprocesses, computes the spectrum, runs all fault detectors, and returns a complete diagnostic report. Ideal for batch or automated condition-monitoring workflows.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Absolute path to the signal file (CSV, WAV, or NPY) |
poles * | integer | Number of poles |
rotor_speed_rpm * | number | Rotor speed in RPM |
supply_freq_hz * | number | Supply frequency in Hz |
bearing_defect_freq_hz | Bearing defect frequency in Hz (optional) | |
channel | integer | WAV channel index |
sampling_freq_hz | Sampling frequency in Hz (required for NPY, optional for CSV with time column, auto-detected for WAV) | |
signal_column | CSV column for the current signal | |
time_column | CSV column for time (null if absent) | |
tolerance_hz | number | Frequency search tolerance in Hz |
list_stored_data
List all signals and spectra currently stored on disk. Returns a compact summary of each stored item (ID, type, size, and key metadata) without returning the raw data arrays. The data is persisted in the MCSA data directory and survives server restarts.
clear_stored_data
Delete stored signals and spectra from disk and memory. Pass a specific data_id to remove one item, or omit to clear all.
| Parameter | Type | Description |
|---|---|---|
data_id | ID of a specific item to remove, or omit to clear everything |