TOOLKIT HUB·Signal Processing Workbench

Signal Processing Workbench

Generate or import a uniformly sampled series, then inspect it in time and frequency. Raw samples are never overwritten; processing is a recorded, resettable pipeline. Calculations run in a Web Worker and can be cancelled. Limit: 32 768 samples per series.

Loading worker…
1 · Source signal
Sampled (discrete) signals. Naive square, triangle and saw are sampled continuous shapes and alias harmonics above Fs/2; "square (band-limited)" sums only odd harmonics below Nyquist. All noise is seeded and reproducible.

Frequency field = tone/start/natural frequency depending on waveform.

Import CSV

Multi-channel: optional header row; first column named time/t/time_s (seconds) is used as timestamps, other columns are channels; units in brackets, e.g. accel [g]. Without a time column Fs is required. Duplicate or non-monotonic timestamps, missing cells, inconsistent rows and NaN/Infinity are rejected with the line number. Irregular timestamps are rejected unless you explicitly choose linear resampling. Start time is retained. Max 8 MB / 32 768 rows / 16 channels.

Import JSON / WAV (multi-channel)

JSON: {"fs":1000,"channels":[{"name":"accel_x","unit":"m/s²","samples":[…]}]}. WAV: PCM, every channel imported; samples are normalized by the core reader. All channels are kept unmodified; select one below to analyse. Each channel ≤ 32 768 samples (validated in the kernel).

2 · Waveform & statistics

Processing pipeline

Every step is replayed from the untouched raw samples in order. Reorder or remove steps and the processed series is recomputed; the same pipeline can be applied to every imported channel.

    crestFactor = max|x| / RMS. std is the population standard deviation (divide by N) unless the core documentation states otherwise.

    3 · Analysis
    CONVENTIONS
    Forward DFT \(X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi kn/N}\); inverse includes \(1/N\). Bin spacing \(\Delta f=F_s/N\); bins run 0…\(F_s/2\) (one-sided, real input). Amplitude is window-corrected peak amplitude (divided by coherent gain); DC and even-N Nyquist bins are not doubled. PSD is in unit²/Hz; its sum × Δf estimates mean-square power. dB axis here is \(10\log_{10}\) of the plotted quantity relative to 1 signal-unit (or unit²/Hz) — not dBFS or dBm. Plot floor 160 dB below peak.

    Averaged modified periodograms, density scaling (unit²/Hz), mean removed per segment. Averaging reduces variance at the cost of resolution Δf = Fs/L. The confidence band assumes a Gaussian, stationary process and uses Welch's equivalent degrees of freedom \(\nu=2K/(1+2\sum_{j}(1-j/K)\rho^2(jD))\); the interval is \(\nu\hat P/\chi^2_{\nu,1-\alpha/2}\le S\le\nu\hat P/\chi^2_{\nu,\alpha/2}\). DC and Nyquist bins use ν/2.

    Window properties

    Window-method FIR identical in algorithm to scipy.signal.firwin (symmetric window, gain normalised at DC, Nyquist or the first passband centre), applied causally with zero initial state. Linear phase: output delayed by (taps−1)/2 samples. Cutoffs strictly in (0, Fs/2). Kaiser estimate uses kaiserord: taps = ⌈(A−7.95)/(2.285·π·Δω)+1⌉. Equiripple (Parks–McClellan) is not offered.

    Auto mode applies the operation to the entered series with itself (autocorrelation). Full linear convolution of [1,2,3] and [1,1] is [1,3,5,3]; circular convolution with N = 3 is [4,3,5] (the tail wraps). same keeps La samples centred on the full result; valid keeps only complete-overlap samples. Correlation: \(r_{xy}[k]=\sum_n x[n+k]y[n]\); positive k means x is delayed relative to y. Normalized coefficient divides by \(\sqrt{E_xE_y}\) and is undefined for zero-energy input.

    Vertical axis: frequency 0 (bottom) to Fs/2 (top). Horizontal axis: frame time. Pale = low, dark red = high.

    4 · Advanced tools
    Inputs come from the selected channel's processed series (or the raw series where noted). Pipeline steps (IIR, resampling, quantization) append to the processed series only; raw samples and all imported channels stay intact.
    Select minimum IIR order from specifications

    Single-pass specifications. Choose family/type above; Bessel and notch do not support this operation. Low/high-pass use one edge per array; band filters use two. Band-stop pass edges may be tightened while retaining the entered passbands.

    Low-pass / high-pass: one frequency, e.g. 100. Band-pass / band-stop: lower and upper edge separated by a comma, e.g. 100, 200.

    METHOD & PROVENANCE
    Analog prototype → low/high/band-pass/band-stop pole–zero transformation → bilinear transform with frequency prewarping \(\omega_a=2F_s\tan(\pi f/F_s)\) → second-order sections. The implementation follows scipy.signal.iirfilter (SciPy 1.16.3, BSD-3) and is checked against pinned SciPy poles, zeros, gain, response, sosfilt and sosfiltfilt outputs. Band types double the pole count (2N). Edge meaning: Butterworth −3.01 dB; Chebyshev I / elliptic end of the rp ripple band; Chebyshev II start of the rs stopband. Poles must lie strictly inside the unit circle. Group delay \(\tau_g=-d\varphi/d\omega\) is evaluated from the section polynomials. Zero-phase uses forward/backward odd padding: magnitude becomes \(|H|^2\), ripple/attenuation in dB double, phase is zero, and inputs not longer than the pad are rejected. Minimum-order selection above uses the independently checked buttord/cheb1ord/cheb2ord/ellipord equations with a prototype-order limit of 12; Bessel/notch are not included.

    Polyphase rational resampling with an anti-alias / anti-imaging FIR: output rate Fs·L/M. The processed sample rate is tracked separately from raw Fs; every downstream tool uses the processed Fs for processed data. Not Fourier resampling (no periodicity assumption). Output length must stay ≤ 32 768.

    Analytic signal (z[n]=x[n]+j,mathcal{H}{x}[n]) via FFT. Envelope = |z|, phase = arg z (rad, unwrapped by the core), instantaneous frequency in Hz = (1/2π)·dφ/dt. Meaningful for single-component, narrow-band signals; near-zero envelope and multi-component signals give spurious IF. FFT-based: end samples are affected by the implicit periodic extension.

    Welch-averaged: (gamma^2_{xy}=|P_{xy}|^2/(P_{xx}P_{yy})in[0,1]); H1 estimator (H=P_{xy}/P_{xx}), magnitude shown as (20log_{10}|H|) dB re 1 (output unit / input unit). Needs equal length and equal Fs. One segment gives γ² ≡ 1 (meaningless). Low coherence means noise or non-linearity; no causality or stability claim is made.

    Complex STFT then weighted overlap-add inverse. Error is measured sample by sample against the actual input series, not assumed. Reconstruction requires COLA-compatible window/overlap (e.g. Hann with 50 % overlap); incompatible settings are rejected or show large error.

    Power ratios in dB = (10log_{10}(P_1/P_2)). THD = harmonic power / fundamental power (harmonics 2…H); SNR excludes harmonics and DC; SINAD = fundamental / (noise + harmonics). Non-coherent sampling leaks power between bins — heed the core's warning. Ideal quantizer: mid-tread, step 2·FS/2^bits, values beyond ±FS clip; ideal SQNR for a full-scale sine ≈ 6.02·bits + 1.76 dB.

    Components are measured by summing PSD × Δf over ±half-width bins around each peak, so tapered windows give correct power without coherent sampling. THD = \(\sqrt{P_h/P_1}\) and THD+N = \(\sqrt{(P_{tot}-P_1)/P_1}\) are RMS-amplitude ratios relative to the fundamental; SNR = \(10\log_{10}(P_1/P_{noise})\) excludes harmonics; SINAD = \(10\log_{10}(P_1/(P_{tot}-P_1))\). The DC band (bins 0…half-width) is excluded everywhere. Peak frequency uses parabolic interpolation of the log magnitude; amplitude interpolation is approximate (≈1–2 % for Hann).

    Order tracking needs a measured speed reference. Tach mode detects rising threshold crossings (linear sub-sample timing) and assumes constant speed between pulses; angle mode unwraps a shaft-angle channel. The vibration channel is interpolated (4-point cubic) at uniform shaft angle, then transformed: the axis is order (cycles per revolution) with resolution 1/revolutions. Orders above (Fs/2)/(max rev/s) were never captured by the source sampling and are flagged. An ordinary FFT of a run-up smears orders and is not order tracking.

    The processed series is treated as a high-rate stand-in for the analog input. "Without AA" keeps every M-th sample; "with AA" first applies a causal 8th-order elliptic low-pass (0.1 dB ripple, 80 dB stopband) at the chosen fraction of the new Nyquist. Both are then quantized by an ideal mid-tread converter (LSB = 2·FS/2^bits, clipping beyond ±FS). Ideal model only: no aperture jitter, DNL/INL or thermal noise. Alias of f at Fs: \(|f-F_s\,\mathrm{round}(f/F_s)|\).

    Capability limits & scope

    Implemented and tested against pinned SciPy 1.16.3 references or analytic invariants: generators (sine, cosine, multi-tone with phase/DC, naive and band-limited square, triangle, saw, impulse, step, ramp, linear/log chirp, exponential decay, damped vibration, seeded uniform/Gaussian/pink/brown noise); multi-channel timestamp-aware CSV, JSON and WAV import; replayable, reorderable pipeline from raw (center, detrend, scale, normalize, pad, calibration, FIR, IIR, notch, resampling, moving average, Savitzky–Golay, median, quantization, integration, differentiation) applicable to all channels; FFT of any length up to 32 768 (radix-2, direct DFT ≤ 2048, Bluestein chirp-z otherwise); windows incl. parameterized Kaiser with ENBW/sidelobe metrics; Welch PSD with χ² confidence interval; Butterworth, Chebyshev I/II and elliptic IIR in all four band types plus notch; window-method FIR in all four band types; magnitude/phase/group delay, impulse/step responses and pole–zero maps; full/same/valid/circular convolution; raw/biased/unbiased/normalized correlation; interpolated peaks, band power, harmonics, THD, THD+N, SNR, SINAD; order tracking from tach or angle; ADC and anti-alias comparison; chart cursors, data tables and SVG/PNG/CSV figure export.

    Additional bounded filter and machine-marker models are below. Wavelets remain an optional, unimplemented extension. Communications modes live in the linked communications tool. Mobile performance limits above 32 768 samples have not been measured, so larger records are refused. SciPy algorithm license; numerical dependency notices: mathjs, ml-matrix, jStat.

    Equiripple FIR · Type-I Remez exchange

    Odd symmetric taps (5–129), 2–4 constant-response bands. Enter increasing band pairs in Hz, including 0/Nyquist if desired; gaps are unconstrained transition bands. Larger weights reduce error in that band. Convergence is checked on a dense grid; inspect the response between grid points. This is not a differentiator or Hilbert-transform design.

    Frequency, coefficient and step-response plots appear in the FIR tab above. Full design parameters and coefficients are retained in project exports. Resampling before this step requires redesign at the new rate.

    Bearing and gear kinematic markers

    Enter actual machine geometry; generic dimensions cannot establish a fault. Frequencies and harmonics are reported in Hz and shaft orders, including out-of-band markers without aliasing them into false peaks.